-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindowController.h
112 lines (82 loc) · 4.33 KB
/
MainWindowController.h
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
107
108
109
110
111
112
//
// MainWindowController.h
//
// Created by Andrew Hodgkinson on 28/03/2010.
// Copyright 2010, 2011 Hipposoft. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "IconStyleArrayController.h"
#import "IconStyleManager.h"
@interface MainWindowController : NSWindowController < NSTableViewDataSource,
NSMenuDelegate >
{
/* Outlet members */
IBOutlet NSButton * startButton;
IBOutlet NSButton * clearButton;
IBOutlet NSButton * addButton;
IBOutlet NSButton * removeButton;
IBOutlet NSPopUpButton * popUpButton;
IBOutlet NSTableView * folderList;
IBOutlet NSView * folderListClipView;
IBOutlet NSProgressIndicator * spinner;
IBOutlet NSTextField * spinnerLabel;
IBOutlet IconStyleArrayController * stylesArrayController;
IBOutlet NSMenuItem * stylesSubMenuItem;
IBOutlet NSMenu * stylesSubMenu;
IBOutlet NSPanel * progressIndicatorPanel;
IBOutlet NSTextField * progressIndicatorLabel;
IBOutlet NSProgressIndicator * progressIndicator;
IBOutlet NSButton * progressStopButton;
/* Dynamically created items */
NSOpenPanel * openPanel;
NSMutableArray * tableContents;
NSThread * workerThread;
/* An icon style manager instance must be supplied by the instantiator.
* It is used to look up CoreData information for the central icon style
* collection. This is needed by things like bindings.
*/
IconStyleManager * iconStyleManager;
NSManagedObjectContext * managedObjectContext;
NSManagedObjectModel * managedObjectModel;
}
@property ( strong, readonly ) IconStyleManager * iconStyleManager;
@property ( strong, readonly ) NSManagedObjectContext * managedObjectContext;
@property ( strong, readonly ) NSManagedObjectModel * managedObjectModel;
/* Actions */
- ( IBAction ) closeProgressPanel: ( id ) sender;
- ( IBAction ) addButtonPressed: ( id ) sender;
- ( IBAction ) removeButtonPressed: ( id ) sender;
- ( IBAction ) styleSubmenuItemChosen: ( NSMenuItem * ) sender; /* Must be an NSMenuItem */
- ( IBAction ) startButtonPressed: ( id ) sender;
- ( IBAction ) clearButtonPressed: ( id ) sender;
/* Initialisation methods */
- ( void ) initOpenPanel;
- ( void ) initWindowContents;
/* Modal progress panel and related tasks */
- ( void ) showProgressPanelWithMessage: ( NSString * ) message
andAction: ( SEL ) actionSelector
andData: ( id ) actionSelectorData;
- ( void ) considerInsertingSubfoldersOf: ( NSDictionary * ) parentFolders;
- ( void ) insertSubfoldersOnTimer: ( NSTimer * ) theTimer;
- ( void ) addSubFoldersOf: ( NSDictionary * ) parentFolders;
- ( void ) createFolderIcons: ( NSArray * ) constArrayOfDictionaries;
- ( void ) advanceProgressBarFor: ( NSString * ) fullPOSIXPath;
- ( void ) considerEmptyingFolderList;
- ( void ) showAdditionFailureAlert;
/* Folder list and related table view management */
- ( void ) addFolder: ( NSString * ) path;
- ( void ) addFolder: ( NSString * ) path
withStyle: ( IconStyle * ) style;
- ( void ) insertFolder: ( NSString * ) path
atIndex: ( NSUInteger ) index;
- ( void ) insertFolder: ( NSString * ) path
atIndex: ( NSUInteger ) index
withStyle: ( IconStyle * ) style;
- ( void ) insertFolderByDictionary: ( NSDictionary * ) dictionary;
- ( NSIndexSet * ) removeDuplicatesFromIndices: ( NSIndexSet * ) sourceBlock
comparedAgainst: ( NSIndexSet * ) matchBlock;
- ( void ) folderListSelectionChanged: ( NSNotificationCenter * ) center;
- ( void ) scrollPositionChanged: ( NSNotificationCenter * ) center;
/* Styles sub-menu and general style management */
- ( void ) iconStyleListChanged: ( NSNotificationCenter * ) center;
@end