bool GUICloseStatusWindow( gui_window *wnd ) { HWND status; if( !GUIHasStatus( wnd ) ) { return( false ); } status = wnd->status; wnd->status = NULLHANDLE; DestroyWindow( status ); GUIResizeBackground( wnd, true ); return( true ); }
bool GUIResizeStatusWindow( gui_window *wnd, gui_ord x, gui_ord height ) { WPI_RECT status; GUI_RECTDIM left, top, right, bottom; if( !GUIHasStatus( wnd ) ) { return( false ); } CalcStatusRect( wnd, x, height, &status ); _wpi_getrectvalues( status, &left, &top, &right, &bottom ); _wpi_movewindow( wnd->status, left, top, right - left, bottom - top, TRUE ); GUIResizeBackground( wnd, true ); return( true ); }
static void ResizeStatus( gui_window *wnd ) { WPI_RECT status; GUI_RECTDIM left, top, right, bottom; if( GUIHasStatus( wnd ) ) { _wpi_getwindowrect( wnd->status, &status ); _wpi_mapwindowpoints( HWND_DESKTOP, wnd->root, (WPI_LPPOINT)&status, 2 ); _wpi_getrectvalues( status, &left, &top, &right, &bottom ); /* maintain height and left position of status window -- tie the rest to the client are of the parent */ SetStatusRect( wnd->root, &status, left, bottom - top ); _wpi_getrectvalues( status, &left, &top, &right, &bottom ); _wpi_movewindow( wnd->status, left, top, right - left, bottom - top, TRUE ); } }
bool GUIDrawStatusText( gui_window *wnd, const char *text ) { WPI_PRES pres; const char *out_text; if( !GUIHasStatus( wnd) ) { return( false ); } pres = _wpi_getpres( wnd->status ); if( ( text == NULL ) || ( *text == '\0' ) ) { out_text = LIT( Blank ); } else { out_text = text; } StatusWndDrawLine( GUIStatusWnd, pres, wnd->font, out_text, DT_SINGLELINE | DT_VCENTER | DT_LEFT ); _wpi_releasepres( wnd->status, pres ); if( ( text == NULL ) || ( *text == '\0' ) ) { GUIEVENTWND( wnd, GUI_STATUS_CLEARED, NULL ); } return( true ); }
bool GUIDisplayHintText( gui_window *wnd_with_status, gui_window *wnd, int id, hint_type type, gui_menu_styles style ) { const char *text; if( GUIHasStatus( wnd_with_status ) && GUIHasHintType( wnd, type ) ) { if( ( style & GUI_IGNORE ) || ( style & GUI_SEPARATOR ) ) { GUIClearStatusText( wnd_with_status ); } else { text = HintTextGet( &wnd->hint, id, type ); if( text != NULL ) { GUIDrawStatusText( wnd_with_status, text ); return( TRUE ); } GUIClearStatusText( wnd_with_status ); return( TRUE ); } return( TRUE ); } return( FALSE ); }