Beispiel #1
0
extern  bool    SrcMoveDot( a_window *wnd, address addr )
{
    unsigned    line;
    mod_handle  mod;
    file_window *file;
    DIPHDL( cue, ch );

    if( wnd == NULL ) return( FALSE );
    file = WndFile( wnd );
    if( file->mod == NO_MOD && !file->track ) return( FALSE );
    if( IS_NIL_ADDR( addr ) ) {
        WndScrollAbs( wnd, 0 );
        return( FALSE );
    }
    DeAliasAddrMod( addr, &mod );
    if( DeAliasAddrCue( mod, addr, ch ) == SR_NONE ) {
        if( LineCue( mod, 0, 0, 0, ch ) == SR_NONE ) return( FALSE );
    }
    line = CueLine( ch );
    if( mod != file->mod || CueFileId( ch ) != file->file_id ) {
        if( !file->track ) return( FALSE );
        FileTrack( wnd, ch );
    }
    --line;
    WndScrollAbs( wnd, line ); //
    WndMoveCurrent( wnd, line, PIECE_SOURCE );
    FileSetDotAddr( wnd, addr );
    FileSetTitle( wnd, CueMod( ch ) );
    return( TRUE );
}
Beispiel #2
0
static void VarMoveToRoot( a_window *wnd, int row, var_node *v )
{
    var_window  *var = WndVar( wnd );
    int         new_row;

    new_row = VarFindRootRow( &var->i, v, row );
    if( new_row == row ) return;
    WndMoveCurrent( wnd, new_row, VAR_PIECE_NAME );
}
Beispiel #3
0
static void TrdRefresh( a_window *wnd )
{
    thread_state    *thd;
    int                 row;

    row = 0;
    for( thd = HeadThd; thd != NULL; thd = thd->link ) {
        if( IsThdCurr( thd ) ) {
            WndMoveCurrent( wnd, row, PIECE_ID );
            break;
        }
        ++row;
    }
    WndNoSelect( wnd );
    WndRepaint( wnd );
}
Beispiel #4
0
static void ModSetCurrent( a_window *wnd )
{
    int         i;
    mod_window  *mod = WndMod( wnd );
    wnd_row     row;
    int         piece;

    WndGetCurrent( wnd, &row, &piece );
    if( row != WND_NO_ROW && ModListMod( ModList( mod ), row ) == ContextMod ) {
        return;
    }
    for( i = 0; i < ModListNumRows( ModList( mod ) ); ++i ) {
        if( ModListMod( ModList( mod ), i ) == ContextMod ) {
            WndMoveCurrent( wnd, i, PIECE_MODULE );
        }
    }
}
Beispiel #5
0
static void RepRefresh( a_window *wnd )
{
    event_record        *ev;
    gui_ord             extent, max_addr, max_cue;
    int                 count, row;

    if( EventList != NULL )
        WndMoveCurrent( wnd, RepNumRows( wnd ) - 1, 0 );
    max_addr = 0;
    max_cue = 0;
    count = 0;
    for( ev = EventList; ev != NULL; ev = ev->next ) {
        RepInitEv( ev );
        extent = WndExtentX( wnd, ev->addr_string );
        if( max_addr < extent )
            max_addr = extent;
        extent = WndExtentX( wnd, ev->cue );
        if( max_cue < extent )
            max_cue = extent;
        ++count;
    }
    max_addr += WndMaxCharX( wnd );
    max_cue += WndMaxCharX( wnd );
    if( Indents[PIECE_SOURCE] != max_addr ||
        Indents[PIECE_COMMAND] != max_addr + max_cue ) {
        WndRepaint( wnd );
    } else {
        row = count;
        while( --row >= LastEventCount ) {
            WndRowDirty( wnd, row );
        }
    }
    LastEventCount = count;
    Indents[PIECE_ADDRESS] = 0;
    Indents[PIECE_SOURCE] = max_addr;
    Indents[PIECE_COMMAND] = max_addr + max_cue;
}
Beispiel #6
0
static void CallScrollPos( a_window *wnd )
{
    WndMoveCurrent( wnd, CallNumRows(wnd) - 1 + GetStackPos(), PIECE_TABSTOP );
}