diff options
author | dynaflash <[email protected]> | 2007-12-10 19:01:04 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-12-10 19:01:04 +0000 |
commit | 51be4f891f243d6ef757cbfd9fc272f63b72c35a (patch) | |
tree | 37d944322a6eca8ce1631816c649eada6b49f814 /macosx/Controller.h | |
parent | 789878babf954631aa8635758605db0cf44f76aa (diff) |
MacGui: Update Presets to use NSOutlineView and change the associated methods to support the NSOutlineView delegate required methods.
- Change necessary to move to nested presets.
- Layout still to be determined
- Method to actually change the setting for the preset changed from -tableViewSelected to more appropriate -presetSelected in Controller.mm
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1115 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.h')
-rw-r--r-- | macosx/Controller.h | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index 45a30508e..1a40bad13 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -178,8 +178,10 @@ int presetHbDefault; // this is 1 in "Default" preset key int presetUserDefault;// this is 2 in "Default" preset key IBOutlet NSPanel * fAddPresetPanel; - IBOutlet NSTableView * tableView; - IBOutlet NSButton * fPresetsAdd; + /* new NSOutline View for the presets */ + NSArray *fDraggedNodes; + IBOutlet NSOutlineView * fPresetsOutlineView; + IBOutlet NSButton * fPresetsAdd; IBOutlet NSButton * fPresetsDelete; IBOutlet MVMenuButton * fPresetsActionButton; IBOutlet NSMenu * fPresetsActionMenu; @@ -263,7 +265,28 @@ - (IBAction) openForums: (id) sender; - (IBAction) openUserGuide: (id) sender; - // Preset Methods Here +// Preset Methods Here + +/* These are required by the NSOutlineView Datasource Delegate */ +/* We use this to deterimine children of an item */ +- (id)outlineView:(NSOutlineView *)fPresetsOutlineView child:(NSInteger)index ofItem:(id)item; +/* We use this to determine if an item should be expandable */ +- (BOOL)outlineView:(NSOutlineView *)fPresetsOutlineView isItemExpandable:(id)item; +/* used to specify the number of levels to show for each item */ +- (int)outlineView:(NSOutlineView *)fPresetsOutlineView numberOfChildrenOfItem:(id)item; +/* Used to tell the outline view which information is to be displayed per item */ +- (id)outlineView:(NSOutlineView *)fPresetsOutlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item; +/* Use to customize the font and display characteristics of the title cell */ +- (void)outlineView:(NSOutlineView *)fPresetsOutlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item; +/* We use this to edit the name field in the outline view */ +- (void)outlineView:(NSOutlineView *)fPresetsOutlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item; +/* We use this to provide tooltips for the items in the presets outline view */ +- (NSString *)outlineView:(NSOutlineView *)fPresetsOutlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tc item:(id)item mouseLocation:(NSPoint)mouseLocation; + +/* We use this to actually select the preset and act accordingly */ +- (IBAction)selectPreset:(id)sender; + +/* Manage User presets */ - (void) loadPresets; - (IBAction) customSettingUsed: (id) sender; - (IBAction) showAddPresetPanel: (id) sender; @@ -282,21 +305,7 @@ - (IBAction)insertPreset:(id)sender; - (IBAction)deletePreset:(id)sender; - (IBAction)getDefaultPresets:(id)sender; -- (IBAction)tableViewSelected:(id)sender; - - // NSTableDataSource methods -- (int)numberOfRowsInTableView:(NSTableView *)aTableView; -- (id)tableView:(NSTableView *)aTableView - objectValueForTableColumn:(NSTableColumn *)aTableColumn - row:(int)rowIndex; -- (void)tableView:(NSTableView *)aTableView - setObjectValue:(id)anObject - forTableColumn:(NSTableColumn *)aTableColumn - row:(int)rowIndex; - // To determine user presets cell display properties -- (void)tableView:(NSTableView *)aTableView - willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn - row:(int)rowIndex; + // Growl methods - (NSDictionary *) registrationDictionaryForGrowl; |