This repository was archived by the owner on Sep 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRingFactory.h
More file actions
124 lines (96 loc) · 4.58 KB
/
Copy pathRingFactory.h
File metadata and controls
124 lines (96 loc) · 4.58 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
//
// RingFactory.h
//
// Copyright 2009 SwiftRing. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class OverlayWindow;
@class RingView;
@class Ring;
@class RecordingPanel;
@interface RingFactory : NSObject
{
NSMutableDictionary *pConfigLookup;
NSMutableDictionary *pAppLookup;
NSMutableDictionary *pPrefs;
NSString *pSupportDirectory;
NSString *pPreferencesDirectory;
NSString *pBundleDirectory;
NSMutableArray *pFileDeleteList;
bool isSavedRingSelected;
IBOutlet OverlayWindow *overlayWindow;
IBOutlet RingView *previewRingView;
NSMutableDictionary *pPreviewRing;
NSMutableDictionary *pPreviewRingParent;
bool previewRingIsSubring;
IBOutlet NSOutlineView *pSavedRingsOutline;
IBOutlet NSButton *pSavedRingsRemove;
IBOutlet NSPopUpButton *pLaunchKey;
IBOutlet NSButton *pAllowArrows;
IBOutlet NSTextField *pMenuDelayText;
IBOutlet NSStepper *pMenuDelay;
IBOutlet NSButton *pEnableMenuBar;
IBOutlet NSTextField *pApplicationsLabel;
IBOutlet NSOutlineView *pApplicationsOutline;
NSMutableArray *pApplicationsOutlineData;
NSMutableIndexSet *pApplicationsOutlineDataPreSelected;
IBOutlet NSButton *pApplicationsRefresh;
IBOutlet NSTextField *pSegmentsLabel;
IBOutlet NSSlider *pSegmentsSlider;
IBOutlet NSTextField *pSegmentSetupLabel;
IBOutlet NSTableView *pSegmentSetupTable;
IBOutlet NSButton *pSegmentSetupRecord;
IBOutlet RecordingPanel *recordingPanel;
IBOutlet NSPanel *preferencesPanel;
IBOutlet NSButton *regButton;
IBOutlet NSPanel *regPanel;
IBOutlet NSTextField *regKeyEntry;
IBOutlet NSTextField *regKeyStatus;
}
+ (NSString *) prettyNameForKeycode: (NSString *) pKeyCode;
+ (NSString *) prettyPrintKeySequence: (NSString *) pKeySequence;
+ (NSString *) stringForKeyCode: (unsigned short) keyCode withModifierFlags: (NSUInteger) modifierFlags;
- (Ring *) createRing: (float) centerX: (float) centerY: (bool) isPreview;
// Outline data source methods
- (int) outlineView: (NSOutlineView *) outlineView numberOfChildrenOfItem: (id)item;
- (bool) outlineView: (NSOutlineView *) outlineView isItemExpandable: (id)item;
- (id) outlineView: (NSOutlineView *) outlineView child: (int)index ofItem: (id)item;
- (id) outlineView: (NSOutlineView *) outlineView objectValueForTableColumn: (NSTableColumn *)tableColumn byItem: (id)item;
- (void) outlineView: (NSOutlineView *) outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
// Outline delegate methods
- (void) outlineViewSelectionDidChange: (NSNotification *) aNotification;
// Table data source methods
- (NSInteger) numberOfRowsInTableView: (NSTableView *) aTableView;
- (id) tableView: (NSTableView *) aTableView objectValueForTableColumn: (NSTableColumn *) aTableColumn
row: (NSInteger) rowIndex;
- (void) tableView: (NSTableView *) aTableView setObjectValue: (id) anObject
forTableColumn: (NSTableColumn *) aTableColumn
row: (NSInteger)rowIndex;
// Table delegate methods
- (void) tableViewSelectionDidChange: (NSNotification *) aNotification;
// Button actions
- (IBAction) addSavedRings: (id) pSender;
- (IBAction) removeSavedRings: (id) pSender;
- (IBAction) refreshApplications: (id) pSender;
- (IBAction) movedSegmentsSlider: (id) pSender;
- (IBAction) recordKeySequence: (id) pSender;
- (IBAction) save: (id) pSender;
- (IBAction) cancel: (id) pSender;
- (IBAction) setLaunchKey: (id) pSender;
- (IBAction) setAllowArrows: (id) pSender;
- (IBAction) setMenuDelay: (id) pSender;
- (IBAction) setEnableMenuBar: (id) pSender;
- (IBAction) regKeyEntryStart: (id) pSender;
- (IBAction) regKeyEntryDone: (id) pSender;
- (void) recordKeySequenceDone: (NSString *) pRecordedKeys;
// Private helper methods
- (void) reloadConfigs;
- (int) numberOfSubrings: (id) item;
- (NSInteger) indexForKey: (NSString *) searchKey inDictionary: (NSDictionary *) dictionary;
- (void) updateRingSettingsControls;
- (void) disableRingSettingsControls;
- (bool) updateApplicationsOutlineData;
- (NSMutableDictionary *) ringSettingsRowInfo: (NSInteger) rowIndex: (NSInteger *) pRowType;
- (bool) isDefault;
- (void) saveConfigs;
@end