1 // MacTF Copyright 2004 Nathan Oates
5 * This source code is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Public License as published
7 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version.
10 * This source code is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * Please refer to the GNU Public License for more details.
15 * You should have received a copy of the GNU Public License along with
16 * this source code; if not, write to:
17 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /* This file was modified by Kalle Olavi Niemitalo on 2007-10-18. */
22 #import <Cocoa/Cocoa.h>
23 #import "DataHandler.h"
24 #import "TFUSBController.h"
26 @interface UIElements
: NSObject
28 IBOutlet id availSpaceField
;
29 IBOutlet id freeSpaceField
;
30 IBOutlet DataHandler
* dh
; //move
31 IBOutlet id tableView
;// and this?
32 IBOutlet id statusField
;
33 IBOutlet id progressBar
;
34 IBOutlet id connectButton
;
35 IBOutlet id connectLight
;
37 IBOutlet NSTextField
* versionField
;
38 IBOutlet NSWindow
* mainWindow
;
39 IBOutlet id prefsWindow
;
40 IBOutlet id renameWindow
;
41 IBOutlet id newFolderWindow
;
43 IBOutlet id altRateSlider
;
46 IBOutlet id previewDrawer
;
47 IBOutlet id progressTime
;
48 IBOutlet id renameOld
;
49 IBOutlet id renameNew
;
50 IBOutlet id newFolderNew
;
51 IBOutlet id downloadMenu
;
52 IBOutlet id uploadMenu
;
53 IBOutlet id renameMenu
;
54 IBOutlet id deleteMenu
;
55 IBOutlet id currentlyField
;
57 IBOutlet id recDuration
;
58 IBOutlet id recDescription
;
59 IBOutlet id recExtInfo
;
61 IBOutlet id recChannel
;
62 IBOutlet id drawerTabView
;
64 IBOutlet id pauseButton
;
65 IBOutlet id searchField
;
66 NSTableColumn
* selectedColumn
;
69 TFUSBController
* tfusbc
;
70 USBDeviceContext
* context
;
71 NSString
* currentPath
;
72 NSUserDefaults
*prefs
;
74 NSString
*highlightImageData
;
75 NSImage
*highlightImage
;
77 - (BOOL
)validateMenuItem
:(NSMenuItem
*)anItem
;
78 - (void)tableViewSelectionDidChange
:(NSNotification
*)aNotification
;
79 - (void) setAvailableSpace
:(NSData
*) input
;
80 - (void) setFreeSpace
: (NSData
*) input
;
81 - (NSString
*) prepForSizeDisplay
:(NSData
*) input
;
82 - (IBAction
) connect
: (id
) sender
;
83 //- (IBAction) tempGoToPath: (id) sender;
84 - (int) goToPath
:(NSString
*) path
;
85 - (void)doubleClick
:(id
)sender
;
86 - (void) downloadFileDoubleClickThread
:(NSDictionary
*)fileInfo
;
87 //- (void) updateHDDSize ;
88 - (NSString
*) currentPath
;
89 //- (IBAction) snapshot:(id) sender;
90 - (IBAction
) downloadSelectedFile
:(id
)sender
;
91 - (IBAction
) uploadFile
: (id
) sender
;
92 - (void) uploadPath
:(NSString
*) path toPath
:(NSString
*) toPath
;
93 - (IBAction
) toggleTurbo
:(id
)sender
;
94 - (IBAction
) toggleTurboCB
:(id
)sender
;
95 - (IBAction
) togglePreview
:(id
)sender
;
96 //- (IBAction) epg:(id) sender;
97 - (void) finishTransfer
;
98 - (IBAction
)deleteFile
:(id
)sender
;
99 - (void)sheetDidEnd
:(NSWindow
*)sheet returnCode
:(int)returnCode contextInfo
:(void *)contextInfo
;
100 - (IBAction
)openPrefsSheet
:(id
)sender
;
101 - (IBAction
) mySheetDidEnd
:(NSWindow
*)sheet returnCode
:(int)returnCode contextInfo
:(void *)contextInfo
;
102 - (IBAction
)closePrefsSheet
:(id
)sender
;
103 - (IBAction
)openRenameSheet
:(id
)sender
;
104 - (IBAction
)closeRenameSheet
:(id
)sender
;
105 - (IBAction
)cancelRename
:(id
)sender
;
106 - (IBAction
)openNewFolderSheet
:(id
)sender
;
107 - (IBAction
)closeNewFolderSheet
:(id
)sender
;
108 - (IBAction
)cancelNewFolder
:(id
)sender
;
109 - (IBAction
)pathBarClick
:(id
)sender
;
110 - (IBAction
)pauseCurrentTransfer
:(id
)sender
;
112 - (USBDeviceContext
*) getContext
;
113 - (NSNumber
*) isConnected
;
114 - (id
) selectedColumn
;
115 - (id
) currentlyField
;
118 //- (NSArray*) snapshotOfPath:(NSString*)path ;