示例#1
0
bool    DlgWndSet( void )
{
    dlg_window_set      wndset;

    wndset.cancel = true;
    ResDlgOpen( &WndSetEvent, &wndset, DIALOG_WIND );
    return( !wndset.cancel );
}
示例#2
0
extern  bool    DlgOptSet( void )
{
    dlg_window_set      optset;

    optset.cancel = TRUE;
    ResDlgOpen( &OptSetEvent, &optset, DIALOG_OPTION );
    if( optset.cancel ) return( FALSE );
    return( TRUE );
}
示例#3
0
extern  bool    DlgWndSet( void )
{
    dlg_window_set      wndset;

    wndset.cancel = TRUE;
    ResDlgOpen( &WndSetEvent, &wndset, DIALOG_WIND );
    if( wndset.cancel ) return( FALSE );
    return( TRUE );
}
示例#4
0
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 );
}
示例#5
0
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 ) );
}
示例#6
0
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 );
}
示例#7
0
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 );
}
示例#8
0
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 );
}
示例#9
0
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 );
}
示例#10
0
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 );
}
示例#11
0
extern unsigned DlgAsyncRun( void )
{
    ResDlgOpen( &AsyncEvent, 0, GUI_MAKEINTRESOURCE( DIALOG_ASYNC_RUN ) );
    return( dlg.cond ); 
}
示例#12
0
extern unsigned DlgAsyncRun( void )
{
    ResDlgOpen( &AsyncEvent, 0, DIALOG_ASYNC_RUN );
    return( dlg.cond );
}