summaryrefslogtreecommitdiffstats
path: root/Liaison/FileTableDelegate.h
blob: 43b4f8a4bba763167faaabe4277a251c9ef7f29b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* FileTableDelegate */

@class InspectorController;

@interface LiFileStore (BatchPathAdditions)
- (NSArray *)addPaths: (NSArray *)aPathList toGroup: (NSString *)aGroup;
@end

@interface FileTableDelegate : NSObject
{
    IBOutlet InspectorController *inspectorController;
    IBOutlet NSTableView *tableView;
    IBOutlet NSTextField *statusLine;
    IBOutlet NSMenu *theContextMenu;

    NSImage *ascendingSortingImage, *descendingSortingImage;

    LiFileStore *theFileStore;
    LiFilter *theFilter;
    NSString *theSearchString;
    NSTableColumn *theSelectedColumn;
    BOOL isAscending;

    NSArray *theActiveList, *theSortedList;
    NSMutableDictionary *theListPrefs;
    NSMutableDictionary *theTableColumns;
    NSMutableDictionary *theShownColumns;
    NSMutableSet *theSavedSelection;
}
- (IBAction)addFiles: (id)sender;
- (IBAction)openSelectedFiles: (id)sender;
- (IBAction)revealInFinder: (id)sender;

- (NSDictionary *)browserColumns;

- (LiBrowserColumn *)columnForIdentifier: (NSString *)anIdentifier;
- (void)showColumnWithIdentifier: (NSString *)anIdentifier;
- (void)removeColumnWithIdentifier: (NSString *)anIdentifier;
- (int)numberOfFiles;
- (LiFileHandle *)fileAtIndex: (int)index;

- (void)addAttributeFilter: (LiFilter *)aFilter;
- (void)removeAttributeFilter: (LiFilter *)aFilter;

- (void)saveSelectionOfTableView: (NSTableView *)aTableView;
- (void)restoreSelectionToTableView: (NSTableView *)aTableView
                            refresh: (BOOL)inRefresh;

- (NSSize)minSize;

- (BOOL)validateAction: (SEL)anAction;

- (void)redisplay;
@property (retain,getter=shownColumns) NSMutableDictionary *theShownColumns;
@property (retain,getter=searchString) NSString *theSearchString;
@property (retain) InspectorController *inspectorController;
@property (retain,getter=selectedColumn) NSTableColumn *theSelectedColumn;
@property (retain,getter=savedSelection) NSMutableSet *theSavedSelection;
@property (retain) NSMutableDictionary *theTableColumns;
@property (retain,getter=filter) LiFilter *theFilter;
@property (retain) NSTextField *statusLine;
@property (retain) NSMenu *theContextMenu;
@property BOOL isAscending;
@property (retain,getter=tableView) NSTableView *tableView;
@property (retain) NSMutableDictionary *theListPrefs;
@property (retain,getter=fileStore) LiFileStore *theFileStore;
@end

@interface FileTableDelegate (LiTableViewDelegate)
- (void)deleteSelectedRowsInTableView: (NSTableView *)aTableView;
@end

@interface FileTableDelegate (CommonAccessors)
- (NSString *)group;
- (void)setGroup: (NSString *)aGroupName;
@end

@interface FileTableDelegate (Accessors)
- (LiFileStore *)fileStore;
- (void)setFileStore: (LiFileStore *)aFileStore;
- (LiFilter *)filter;
- (void)setFilter: (LiFilter *)aFilter;

- (NSMutableDictionary *)shownColumns;
- (void)setShownColumns: (NSMutableDictionary *)someColumns;

- (NSArray *)sortedList;
- (void)setSortedList: (NSArray *)aFileList;
- (NSArray *)activeList;
- (void)setActiveList: (NSArray *)aFileList;
- (NSArray *)fileList;
- (NSString *)searchString;
- (void)setSearchString: (NSString *)aSearchString;
- (NSTableColumn *)selectedColumn;
- (void)setSelectedColumn: (NSTableColumn *)aColumn;
- (void)setSelectedColumn: (NSTableColumn *)aColumn
              withContext: (void *)someContext;
- (NSMutableSet *)savedSelection;
- (void)setSavedSelection: (NSMutableSet *)aSelection;
- (NSMutableDictionary *)listPrefs;
- (void)setListPrefs: (NSMutableDictionary *)listPrefs;
- (NSMutableDictionary *)columnPrefsForIdentifier: (NSString *)anIdentifier;
- (void)setColumnPrefs: (NSMutableDictionary *)columnPrefs
         forIdentifier: (NSString *)anIdentifier;
- (NSTableView *)tableView;
@end