bool DlgWndSet( void ) { dlg_window_set wndset; wndset.cancel = true; ResDlgOpen( &WndSetEvent, &wndset, DIALOG_WIND ); return( !wndset.cancel ); }
extern bool DlgOptSet( void ) { dlg_window_set optset; optset.cancel = TRUE; ResDlgOpen( &OptSetEvent, &optset, DIALOG_OPTION ); if( optset.cancel ) return( FALSE ); return( TRUE ); }
extern bool DlgWndSet( void ) { dlg_window_set wndset; wndset.cancel = TRUE; ResDlgOpen( &WndSetEvent, &wndset, DIALOG_WIND ); if( wndset.cancel ) return( FALSE ); return( TRUE ); }
static void DoDlgNewProg( dlg_new_prog *pdlg ) { GetProgName( prog, sizeof( prog ) ); GetProgArgs( args, sizeof( args ) ); pdlg->prog = prog; pdlg->args = args; pdlg->cancel = true; ResDlgOpen( &ProgEvent, pdlg, DIALOG_NEW_PROG ); }
void DlgList( const char *title, void (*clear)(void), void (*add)(const char *,unsigned), char_ring *(*next)(char_ring *), char *(*name)(char_ring *) ) { dlg_list dlg; dlg.clear = clear; dlg.add = add; dlg.next = next; dlg.name = name; dlg.title = DupStr( title ); ResDlgOpen( &SourceEvent, &dlg, GUI_MAKEINTRESOURCE( DIALOG_LIST ) ); }
bool DlgVarExpand( dlg_var_expand *pvarx ) { dlg_var_expand varx; varx.start = pvarx->start; varx.end = pvarx->end; varx.cancel = true; ResDlgOpen( VarGUIEventProc, &varx, DIALOG_VARX ); if( varx.cancel ) return( false ); pvarx->start = varx.start; pvarx->end = varx.end; return( true ); }
extern bool SrchEvent( gui_window * gui, gui_event event, void * param ) { gui_ctl_id id; dlg_search *dlg; dlg = GUIGetExtra( gui ); switch( event ) { case GUI_INIT_DIALOG: SetDlgStatus( gui, dlg ); GUISetFocus( gui, CTL_SRCH_EDIT ); break; case GUI_KEY_CONTROL: return( DlgHistoryKey( gui, param, CTL_SRCH_EDIT, CTL_SRCH_LIST ) ); case GUI_CONTROL_DCLICKED: case GUI_CONTROL_CLICKED: GUI_GETID( param, id ); switch( id ) { case CTL_SRCH_LIST: DlgClickHistory( gui, CTL_SRCH_EDIT, CTL_SRCH_LIST ); if( event == GUI_CONTROL_CLICKED ) return( true ); /* fall through */ case CTL_SRCH_NEXT: dlg->direction = 1; GetDlgStatus( gui, dlg ); GUICloseDialog( gui ); break; case CTL_SRCH_EDIT_RX: ResDlgOpen( &RXEvent, NULL, GUI_MAKEINTRESOURCE( DIALOG_RX ) ); break; case CTL_SRCH_PREV: dlg->direction = -1; GetDlgStatus( gui, dlg ); GUICloseDialog( gui ); break; case CTL_SRCH_CANCEL: dlg->direction = 0; GUICloseDialog( gui ); break; default : break; } return( true ); default : break; } return( false ); }
static bool DoStackOrHistory( res_name_or_id dlg_id ) { gui_ctl_id resp; resp = CTL_STK_CANCEL; ResDlgOpen( &StkOrHistoryEvent, &resp, dlg_id ); switch( resp ) { case CTL_STK_CANCEL: _SwitchOn( SW_EXECUTE_ABORTED ); return( false ); case CTL_STK_YES: if( dlg_id == GUI_MAKEINTRESOURCE( DIALOG_STACK ) ) { LastStackPos(); } else { LastMachState(); } break; } return( true ); }
static bool DoStackOrHistory( int id ) { int resp; resp = CTL_STK_CANCEL; ResDlgOpen( &StkOrHistoryEvent, &resp, id ); switch( resp ) { case CTL_STK_CANCEL: _SwitchOn( SW_EXECUTE_ABORTED ); return( FALSE ); case CTL_STK_YES: if( id == DIALOG_STACK ) { LastStackPos(); } else { LastMachState(); } break; } return( TRUE ); }
static int DoDlgSearch( a_window *wnd, void *history, bool want_prev ) { dlg_search *dlg; int direction; dlg = WndMustAlloc( sizeof( *dlg ) ); dlg->wnd = wnd; dlg->direction = 0; dlg->case_ignore = SrchIgnoreCase; dlg->use_rx = SrchRX; dlg->history = history; ResDlgOpen( &SrchEvent, dlg, GUI_MAKEINTRESOURCE( want_prev ? DIALOG_SEARCH : DIALOG_SEARCH_ALL ) ); direction = dlg->direction; SrchRX = dlg->use_rx; SrchIgnoreCase = dlg->case_ignore; if( dlg->use_rx ) { WndSetMagicStr( SrchMagicChars ); } else { WndSetMagicStr( "" ); } WndFree( dlg ); return( direction ); }
extern unsigned DlgAsyncRun( void ) { ResDlgOpen( &AsyncEvent, 0, GUI_MAKEINTRESOURCE( DIALOG_ASYNC_RUN ) ); return( dlg.cond ); }
extern unsigned DlgAsyncRun( void ) { ResDlgOpen( &AsyncEvent, 0, DIALOG_ASYNC_RUN ); return( dlg.cond ); }