Esempio n. 1
0
bool GUIToolBarFixed( gui_window *wnd )
{
    if( GUIHasToolBar( wnd ) ) {
        return( wnd->tbinfo->info.is_fixed );
    }
    return( false );
}
Esempio n. 2
0
bool GUIToolBarFixed( gui_window *wnd )
{
    if( GUIHasToolBar( wnd ) ) {
        return( wnd->toolbar->info.is_fixed );
    }
    return( FALSE );
}
Esempio n. 3
0
void    WndCreateToolBar( gui_ord height, bool fixed,
                          int items, gui_toolbar_struct *tools )
{
    if( GUIHasToolBar( WndMain->gui ) ) GUICloseToolBar( WndMain->gui );
    GUICreateToolBar( WndMain->gui, fixed, height,
                      items, tools, true, &WndColours[ GUI_MENU_PLAIN ],
                      &WndColours[ GUI_MENU_STANDOUT ] );
    ToolHeight = height;
    WndSetToolBar( fixed ? GUI_TOOLBAR_FIXED : GUI_TOOLBAR_FLOATING );
}
Esempio n. 4
0
bool GUIChangeToolBar( gui_window *wnd )
{
    if( GUIHasToolBar( wnd ) ) {
        if( GUIToolBarFixed( wnd ) ) {
            return( FloatToolbar( wnd ) );
        } else {
            return( FixToolbar( wnd->tbinfo->floattoolbar ) );
        }
    }
    return( false );
}
Esempio n. 5
0
void GUIProcessMenuCurr( MENUITEM *menu )
{
    gui_window          *top_wnd;
    gui_ctl_id          id;
    gui_window          *menu_wnd;
    gui_menu_styles     style;
    hint_type           type;

    id = 0;
    if( ( menu == NULL ) || ( menu->event == EV_NO_EVENT ) ) {
        style = GUI_IGNORE;
    } else {
        if( menu->flags & ITEM_SEPARATOR ) {
            style = GUI_SEPARATOR;
        } else {
            if( IS_CTLEVENT( menu->event ) ) {
                id = EV2ID( menu->event );
                if( menu->flags & ITEM_GRAYED ) {
                    style = GUI_GRAYED;
                } else {
                    style = GUI_ENABLED;
                }
            } else {
                style = GUI_IGNORE;
            }
        }
    }
    type = MENU_HINT;
    top_wnd = GUIGetMenuWindow();
    menu_wnd = NULL;
    switch( MenuState ) {
    case MENU_NONE :
        menu_wnd = top_wnd;
        if( top_wnd != NULL && GUIHasToolBar( top_wnd ) && GUIToolBarFixed( top_wnd ) ) {
            if( GUIHasHintText( menu_wnd, id, TOOL_HINT ) ) {
                type = TOOL_HINT;
            }
        }
        break;
    case MENU_FLOAT :
        type = FLOAT_HINT;
    case MENU_SYS :
        menu_wnd = MenuWnd;
    }
    if( ( top_wnd != NULL ) && ( menu_wnd != NULL ) ) {
        GUIDisplayHintText( top_wnd, menu_wnd, id, type, style );
    }
}
Esempio n. 6
0
bool WndHaveToolBar( void )
{
    return( GUIHasToolBar( WndMain->gui ) );
}