static void initmenus (void) { /* set up our apple and file menus. */ happlemenu = GetMenu (applemenu); AddResMenu (happlemenu, 'DRVR'); InsertMenu (happlemenu, 0); hfilemenu = GetMenu (filemenu); InsertMenu (hfilemenu, 0); DrawMenuBar (); } /*initmenus*/
void SetUpMenus() { short i; MenuHandle myMenus[3]; myMenus[appleM] = GetMenu(appleID); AddResMenu(myMenus[appleM],'DRVR'); myMenus[appleM] = GetMenu(appleID); myMenus[fileM] = GetMenu(fileID); myMenus[editM] = GetMenu(editID); for (i = 0; i < 3; i++) { InsertMenu(myMenus[i], 0); } DrawMenuBar(); }
SetUpMenus() { /*================================================*/ /* Get the Apple menu from the resource file, add */ /* the names of available desk accessories, and */ /* install it at the end of the menu bar. */ /*================================================*/ AppleMenu = GetMenu(AppleID); AddResMenu(AppleMenu,'DRVR'); InsertMenu(AppleMenu,0); /*==============================================*/ /* Get the File menu from the resource file and */ /* install it at the end of the menu bar. */ /*==============================================*/ FileMenu = GetMenu(FileID); InsertMenu(FileMenu,0); /*==============================================*/ /* Get the Edit menu from the resource file and */ /* install it at the end of the menu bar. */ /*==============================================*/ EditMenu = GetMenu(EditID); InsertMenu(EditMenu,0); /*=============================================*/ /* Get the Options menu from the resource file */ /* and install it at the end of the menu bar. */ /*=============================================*/ OptionsMenu = GetMenu(OptionsID); InsertMenu(OptionsMenu,0); /*======================================*/ /* Show the new menu bar on the screen. */ /*======================================*/ DrawMenuBar(); }
SetUpMenus() { /*================================================*/ /* Get the Apple menu from the resource file, add */ /* the names of available desk accessories, and */ /* install it at the end of the menu bar. */ /*================================================*/ AppleMenu = GetMenu(AppleID); AddResMenu(AppleMenu,'DRVR'); InsertMenu(AppleMenu,0); /*==============================================*/ /* Get the File menu from the resource file and */ /* install it at the end of the menu bar. */ /*==============================================*/ FileMenu = GetMenu(FileID); InsertMenu(FileMenu,0); /*==============================================*/ /* Get the Edit menu from the resource file and */ /* install it at the end of the menu bar. */ /*==============================================*/ EditMenu = GetMenu(EditID); InsertMenu(EditMenu,0); /*============================================*/ /* Get the Buffer menu from the resource file */ /* and install it at the end of the menu bar. */ /*============================================*/ BufferMenu = GetMenu(BufferID); InsertMenu(BufferMenu,0); /*===============================================*/ /* Get the Execution menu from the resource file */ /* and install it at the end of the menu bar. */ /*===============================================*/ ExecutionMenu = GetMenu(ExecutionID); InsertMenu(ExecutionMenu,0); /*============================================*/ /* Get the Watch menu from the resource file */ /* and install it at the end of the menu bar. */ /*============================================*/ WatchMenu = GetMenu(WatchID); InsertMenu(WatchMenu,0); /*============================================*/ /* Get the Browse menu from the resource file */ /* and install it at the end of the menu bar. */ /*============================================*/ BrowseMenu = GetMenu(BrowseID); InsertMenu(BrowseMenu,0); /*======================================*/ /* Show the new menu bar on the screen. */ /*======================================*/ DrawMenuBar(); }