Ejemplo n.º 1
0
void GatherCurrent( sio_data * curr_sio )
/***************************************/
{
    bool    gather_active;

    gather_active = GetCurrentGather( curr_sio );
    if( curr_sio->level_open == LEVEL_SAMPLE ) {
        GatherImage( curr_sio, gather_active );
    } else if( curr_sio->level_open == LEVEL_IMAGE ) {
        GatherMod( curr_sio, gather_active );
    } else if( curr_sio->level_open == LEVEL_MODULE ) {
        GatherFile( curr_sio, gather_active );
    } else if( curr_sio->level_open == LEVEL_FILE ) {
        GatherRtn( curr_sio, gather_active );
    }
}
Ejemplo n.º 2
0
STATIC void sampleMenuItem( a_window * wnd, gui_ctl_id id, int row, int piece )
/*****************************************************************************/
{
    sio_data *      curr_sio;
    int             sort_type;

    piece=piece;
    curr_sio = WndExtra( wnd );
    row += STATUS_ROW + 1;
    switch( id ) {
    case MENU_INITIALIZE:
        if( row <= STATUS_ROW ) {
            WndMenuGrayAll( wnd );
            if( row < 0 || row-1 >= curr_sio->level_open ) break;
            WndMenuEnable( wnd, MENU_SAMP_ZOOM_IN, true );
            break;
        }
        WndMenuEnableAll( wnd );
        WndMenuCheck( wnd, MENU_SAMP_GATHER, GetCurrentGather( curr_sio ) );
        WndMenuCheck( wnd, MENU_SAMP_BAR_MAX_TIME, GetCurrentMaxBar( curr_sio ) );
        WndMenuCheck( wnd, MENU_SAMP_ABS, GetCurrentAbsBar( curr_sio ) );
        WndMenuCheck( wnd, MENU_SAMP_REL, GetCurrentRelBar( curr_sio ) );
        sort_type = GetCurrentSort( curr_sio );
        WndMenuCheck( wnd, MENU_SORT_COUNT, sort_type==SORT_COUNT );
        WndMenuCheck( wnd, MENU_SORT_NAME, sort_type==SORT_NAME );
        if( row <= STATUS_ROW || curr_sio->level_open >= LEVEL_ROUTINE ) {
            WndMenuEnable( wnd, MENU_SAMP_GATHER, false );
            WndMenuEnable( wnd, MENU_SAMP_SORT, false );
            WndMenuEnable( wnd, MENU_SORT_COUNT, false );
            WndMenuEnable( wnd, MENU_SORT_NAME, false );
            if( row <= STATUS_ROW ) {
                WndMenuEnable( wnd, MENU_SAMP_BAR_MAX_TIME, false );
                WndMenuEnable( wnd, MENU_SAMP_ABS, false );
                WndMenuEnable( wnd, MENU_SAMP_REL, false );
            }
        }
        break;
    case MENU_SAMP_ZOOM_IN:
        WPZoomIn( wnd, row );
        break;
    case MENU_SAMP_BACK_OUT:
        WPBackOut( wnd );
        break;
//    case MENU_SAMP_DATA:
//        WPSImageOpen( curr_sio );
//        break;
    case MENU_SAMP_GATHER:
        FlipCurrentGather( curr_sio );
        WndMenuCheck( wnd, MENU_SAMP_GATHER, GetCurrentGather( curr_sio ) );
        gatherSort( curr_sio );
        setDisplay( wnd, curr_sio, true );
        break;
    case MENU_SAMP_BAR_MAX_TIME:
        FlipCurrentMaxBar( curr_sio );
        WndMenuCheck( wnd, MENU_SAMP_BAR_MAX_TIME, GetCurrentMaxBar( curr_sio ) );
        setDisplay( wnd, curr_sio, false );
        break;
    case MENU_SAMP_ABS:
        FlipCurrentAbsBar( curr_sio );
        WndMenuCheck( wnd, MENU_SAMP_ABS, GetCurrentAbsBar( curr_sio ) );
        setDisplay( wnd, curr_sio, false );
        break;
    case MENU_SAMP_REL:
        FlipCurrentRelBar( curr_sio );
        WndMenuCheck( wnd, MENU_SAMP_ABS, GetCurrentRelBar( curr_sio ) );
        setDisplay( wnd, curr_sio, false );
        break;
    case MENU_SORT_COUNT:
    case MENU_SORT_NAME:
        WndMenuCheck( wnd, MENU_SORT_COUNT, ( id == MENU_SORT_COUNT ) );
        WndMenuCheck( wnd, MENU_SORT_NAME, ( id == MENU_SORT_COUNT ) );
        if( id == MENU_SORT_COUNT ) {
            SetCurrentSort( curr_sio, SORT_COUNT );
        } else {
            SetCurrentSort( curr_sio, SORT_NAME );
        }
        SortCurrent( curr_sio );
        setDisplay( wnd, curr_sio, true );
        break;
    }
}