示例#1
0
void uireinitdialog( a_dialog *info, VFIELD *fields )
{
    unsigned            i;

    uiposnhotspots( info->vs, fields );
    info->dirty = FALSE;
    info->first = NULL;
    info->other = NULL;
    info->fields = fields;

    info->first = &fields[0];
    /* set first to be first field in tab sequence */
    while( notintab( info->first ) ) {
        if( info->first->typ == FLD_VOID ) {
            info->first = NULL;
            break;
        }
        ++(info->first);
    }
    info->curr = info->first;
    if( info->first != NULL ) {
        /* set curr to first field in tab sequence not an unset radio button */
        while( radiooff( info->curr ) ) {
            info->curr = nextfield( info->curr );
        }
    }

    for( i = 0 ; fields[i].typ != FLD_VOID ; ++i ) {
        print_field( info->vs, &fields[i], &fields[i] == info->curr );
    }
    enter_field( info, info->curr );
}
示例#2
0
void uireinitdialog( a_dialog *ui_dlg_info, VFIELD *fields )
{
    uiposnhotspots( ui_dlg_info->vs, fields );
    ui_dlg_info->dirty = false;
    ui_dlg_info->first = NULL;
    ui_dlg_info->other = NULL;
    ui_dlg_info->fields = fields;

    /* set first to be first field in tab sequence */
    for( ui_dlg_info->first = fields; notintab( ui_dlg_info->first ); ui_dlg_info->first++ ) {
        if( ui_dlg_info->first->typ == FLD_NONE ) {
            ui_dlg_info->first = NULL;
            break;
        }
    }
    ui_dlg_info->curr = ui_dlg_info->first;
    if( ui_dlg_info->first != NULL ) {
        /* set curr to first field in tab sequence not an unset radio button */
        while( radiooff( ui_dlg_info->curr ) ) {
            ui_dlg_info->curr = nextfield( ui_dlg_info->curr );
        }
    }

    for( ; fields->typ != FLD_NONE; fields++ ) {
        print_field( ui_dlg_info->vs, fields, ( fields == ui_dlg_info->curr ) );
    }
    enter_field( ui_dlg_info, ui_dlg_info->curr );
}
示例#3
0
static VFIELD *nextfield( VFIELD *fld )
{
    while( notintab( ++fld ) ) {                // unselectable field types!
        if( fld->typ == FLD_VOID ) {
            fld = NULL;
            break;
        }
    }
    return( fld );
}