コード例 #1
0
ファイル: main.c プロジェクト: dvincent/frontier
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*/
コード例 #2
0
ファイル: Retro68Test.c プロジェクト: clehner/Retro68Test
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();
}
コード例 #3
0
ファイル: CRSVMAC.C プロジェクト: marcinch18/nasa-cosmic
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();
  }  
コード例 #4
0
ファイル: MACINIT.C プロジェクト: marcinch18/nasa-cosmic
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();
  }