Пример #1
0
void EnableMDIActions( bool enable )
{
    GUIEnableMenuItem( Root, GUI_MDI_CASCADE, enable, false );
    GUIEnableMenuItem( Root, GUI_MDI_TILE_HORZ, enable, false );
    GUIEnableMenuItem( Root, GUI_MDI_TILE_VERT, enable, false );
    GUIEnableMenuItem( Root, GUI_MDI_ARRANGE_ICONS, enable, false );
}
Пример #2
0
bool GUIEnableMDIMenus( bool enable )
{
    int         i;
    int         num_menus;
    gui_window  *root;

    root = GUIGetRootWindow();
    if( root != NULL ) {
        GUIEnableMDIActions( enable );
        num_menus = NumMDIWindows;
        if( NumMDIWindows > MAX_NUM_MDI_WINDOWS ) {
            num_menus = MAX_NUM_MDI_WINDOWS;
            GUIEnableMenuItem( root, GUI_MDI_MORE_WINDOWS, enable, false );
        }
        for( i = 0; i < num_menus; i++ ) {
            GUIEnableMenuItem( root, MDIWIN2ID( i ), enable, false );
        }
        return( true );
    }
    return( false );
}
Пример #3
0
static void WndSetPopupBits( a_window *wnd, gui_menu_struct *menu )
{
    int                 i;
    gui_menu_struct     *curr;

    curr = menu->child;
    for( i = 0; i < menu->num_child_menus; ++i ) {
        if( !( curr->style & GUI_SEPARATOR ) ) {
            GUIEnableMenuItem( WndMain->gui, curr->id, wnd && ( curr->style & GUI_GRAYED ) == 0, FALSE );
            GUICheckMenuItem( WndMain->gui, curr->id, wnd && ( curr->style & GUI_CHECKED ) != 0, FALSE );
            if( curr->child ) WndSetPopupBits( wnd, curr );
        }
        ++curr;
    }
}
Пример #4
0
extern void WndEnableMainMenu( int id, bool enable )
{
    if( WndMain == NULL || WndMainMenuPtr == NULL ) return;
    DoMenuBitOn( WndMainMenuPtr, WndNumMenus, id, !enable, GUI_GRAYED );
    GUIEnableMenuItem( WndMain->gui, id, enable, FALSE );
}