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 );
}