#import <SDLMain.h>
Public Member Functions | |
(void) | - quit: [implementation] |
(void) | - fixMenu:withAppName: [implementation] |
(void) | - applicationDidFinishLaunching: [implementation] |
Definition at line 10 of file SDLMain.h.
- (void) quit: | (id) | sender | [implementation] |
Definition at line 80 of file SDLMain.mm.
References uMenu::quickexit, and st_SaveConfig().
00082 :(id)sender 00083 { 00084 st_SaveConfig();
- (void) fixMenu: | (NSMenu *) | aMenu | ||
withAppName: | (NSString *) | appName | ||
[implementation] |
Definition at line 87 of file SDLMain.mm.
References fixMenu:withAppName:.
Referenced by applicationDidFinishLaunching:, and fixMenu:withAppName:.
00089 :(NSMenu *)aMenu withAppName:(NSString *)appName 00090 { 00091 NSRange aRange; 00092 NSEnumerator *enumerator; 00093 NSMenuItem *menuItem; 00094 00095 aRange = [[aMenu title] rangeOfString:@"SDL App"]; 00096 if (aRange.length != 0) 00097 [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; 00098 00099 enumerator = [[aMenu itemArray] objectEnumerator]; 00100 while ((menuItem = [enumerator nextObject])) 00101 { 00102 aRange = [[menuItem title] rangeOfString:@"SDL App"]; 00103 if (aRange.length != 0) 00104 [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]]; 00105 if ([menuItem hasSubmenu]) 00106 [self fixMenu:[menuItem submenu] withAppName:appName]; 00107 }
- (void) applicationDidFinishLaunching: | (NSNotification *) | note | [implementation] |
Definition at line 110 of file SDLMain.mm.
References fixMenu:withAppName:, gArgc, and gArgv.
00112 : (NSNotification *) note 00113 { 00114 int status; 00115 00116 #if SDL_USE_NIB_FILE 00117 /* Set the main menu to contain the real app name instead of "SDL App" */ 00118 [self fixMenu:[NSApp mainMenu] withAppName:[[NSProcessInfo processInfo] processName]]; 00119 #endif 00120 00121 /* Hand off to main application code */ 00122 status = SDL_main(gArgc, gArgv); 00123 00124 /* We're done, thank you for playing */