Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
CoreSource/AdjustMenus.c
/* |
AdjustMenus.c |
This procedure contains code to adjust the menus before MenuSelect or MenuKey is called. |
*/ |
#include "MenuDispatch.h" |
#include "CoreGlobals.h" |
void AdjustMenus(void) |
{ |
WindowPtr fWindow; |
fWindow = FrontWindow(); |
/* If there is no open window then.... */ |
if(!fWindow) { |
DisableItem ( GetMHandle(FILE_MENU), FILE_CLOSE ); |
} else { |
EnableItem ( GetMHandle(FILE_MENU), FILE_CLOSE ); |
/* LET THE DOCUMENT HAVE A CHANCE TO CHANGE MENUS */ |
AdjustMenuGameWindow(fWindow); |
} |
/* THESE ARE NOT IMPLEMENTED YET */ |
DisableItem ( GetMHandle(FILE_MENU), FILE_SAVE ); |
DisableItem ( GetMHandle(FILE_MENU), FILE_OPEN ); |
DisableItem ( GetMHandle(FILE_MENU), FILE_PRINT ); |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14