static a_window *WndVarNewWindow( const char *item ) { a_window *wnd; WndSetOpenNoShow(); wnd = WndVarOpen(); WndSetTitle( wnd, item ); WndVarAdd( wnd, item, strlen( item ), true ); WndFirstCurrent( wnd ); WndForcePaint( wnd ); WndShrinkToMouse( wnd, WndMetrics[ WND_WATCH ] ); WndShowWindow( wnd ); return( wnd ); }
extern void WndPopUp( a_window *wnd, gui_menu_struct *menu ) { gui_point point; point.x = 0; point.y = 0; wnd->sel_end.row = 0; if( !WndHasCurrent( wnd ) ) { WndFirstCurrent( wnd ); } if( WndHasCurrent( wnd ) ) { WndNoSelect( wnd ); wnd->current.col = 0; // just to be sure WndCurrToGUIPoint( wnd, &point ); wnd->sel_end = wnd->current; wnd->sel_start = wnd->current; } WndNullPopItem( wnd ); SetWndMenuRow( wnd ); WndInvokePopUp( wnd, &point, menu ); }
static void WndMoveDown( a_window *wnd ) { if( WndAtBottom( wnd ) ) { WndDirtyCurr( wnd ); WndScroll( wnd, 1 ); if( !WndFindCloseTab( wnd, wnd->current.row ) ) { wnd->current.row--; } WndCurrVisible( wnd ); WndDirtyCurr( wnd ); } else if( WndHasCurrent( wnd ) ) { WndDirtyCurr( wnd ); if( WndFindCloseTab( wnd, wnd->current.row+1 ) ) { wnd->current.row++; } WndCurrVisible( wnd ); WndDirtyCurr( wnd ); } else { if( WndFirstCurrent( wnd ) ) { WndDirtyCurr( wnd ); } } }
void WndScrollTop( a_window *wnd ) { WndDirtyCurr( wnd ); WndScrollAbs( wnd, -wnd->title_size ); WndFirstCurrent( wnd ); }