Skip to content
Newer
Older
100644 68 lines (56 sloc) 2.25 KB
dc5be1c Initial check-in.
uli authored Jul 4, 2009
1 //
2 // UKFileListController.h
3 // TalkingMoose (XC2)
4 //
5 // Created by Uli Kusterer on 2005-12-07.
720b0e7 @uliwitness Added licensing information to the source files.
authored Mar 4, 2010
6 // Copyright 2005 Uli Kusterer.
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 // claim that you wrote the original software. If you use this software
18 // in a product, an acknowledgment in the product documentation would be
19 // appreciated but is not required.
20 //
21 // 2. Altered source versions must be plainly marked as such, and must not be
22 // misrepresented as being the original software.
23 //
24 // 3. This notice may not be removed or altered from any source
25 // distribution.
dc5be1c Initial check-in.
uli authored Jul 4, 2009
26 //
27
28 #import <Cocoa/Cocoa.h>
29
30
31 /*
32 Class that lets the user select files/folders and keeps a list of them in
33 the user defaults, where you can access them.
34 */
35
36
37 @interface UKFileListController : NSObject
38 {
39 IBOutlet NSTableView* fileListView; // Table to display the files in.
40 IBOutlet NSButton* addFileButton; // Add a new file to the list.
41 IBOutlet NSButton* removeFileButton; // Remove selected file from the list.
42 NSMutableArray* listOfFiles; // List of NSDictionaries with entries for each file.
43 NSString* autosaveName; // Name to save this list under in prefs.
44 BOOL canChooseDirectories; // User may add folders to this list? (default NO)
45 BOOL canChooseFiles; // User may add files to this list? (default YES)
46 BOOL inited; // Has this object loaded its contents yet?
47 }
48
49 // Button actions:
50 -(void) addFile: (id)sender;
51 -(void) removeSelectedFile: (id)sender;
52
53 // Name to save list of files in user defaults:
54 - (NSString*) autosaveName;
55 - (void) setAutosaveName: (NSString*)anAutosaveName;
56
57 // What kinds of files can users pick?
58 -(BOOL) canChooseDirectories;
59 -(void) setCanChooseDirectories: (BOOL)state;
60
61 -(BOOL) canChooseFiles;
62 -(void) setCanChooseFiles: (BOOL)state;
63
64 // private:
65 -(NSString*) userDefaultsKey;
66
67 @end
Something went wrong with that request. Please try again.