GSMenu Class Reference
Inherits from | NSObject |
Conforms to | NSUserNotificationCenterDelegate |
Instance Methods
addViewToPreferences:
Adds a new tab to the Preferenes window
- (void)addViewToPreferences:(NSViewController *)ViewController
Parameters
- ViewController
A View controller
Discussion
The ViewController has to be set up like this:
NSImage *Icon = [thisBundle imageForResource:@"The name if the Icon file"];
[Icon setName:@"IconName"];
[ViewController setTitle:@"Name"];
[ViewController setRepresentedObject:@"IconName"];
NSObject *AppDelegate = [[NSApplication sharedApplication] delegate];
if ([AppDelegate respondsToSelector:@selector(addViewToPreferences:)]) {
[(GSMenu *)[[NSApplication sharedApplication] delegate] addViewToPreferences:ViewController];
}
The Name is the shown underneath the icon and the IconName is used as the identifier (@see showMainPreferencesWithIdentifier:) and there has to be a named image with that name.
generateFont:error:
Shows the export font dialog
- (BOOL)generateFont:(GSFont *)currFont error:(NSError *__autoreleasing *)error
Parameters
- currFont
The font that should be exported
- error
On output, nil if the export was successful; otherwise, error, which contains details of the failure.
Return Value
YES if successful; otherwise, NO
showMacroPanel:
Shows the macro window
- (IBAction)showMacroPanel:(id)sender
Parameters
- sender
The object that called the method
showMainPreferences:
Shows the app preferences window
- (IBAction)showMainPreferences:(id)sender
Parameters
- sender
The object that called the method