MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / setVisibleArea

Method setVisibleArea

src/csvgrid.cpp:459–473  ·  view source on GitHub ↗

Sets the visible area of the table in a way that the given cell is central

Source from the content-addressed store, hash-verified

457
458// Sets the visible area of the table in a way that the given cell is central
459void CsvGrid::setVisibleArea(int R, int C) {
460 DEBUG_PRINTF("#### CsvGrid::setVisibleArea: %d, %d\n", R, C);
461 int r1, r2, c1, c2;
462 visible_cells(r1, r2, c1, c2);
463 if( C >= c2 ) {
464 col_position( c1 + (C - c2 + 1) );
465 } else if( C < c1) {
466 col_position( C );
467 }
468 if( R >= r2 ) {
469 row_position( r1 + (R - r2 + 1) );
470 } else if( R < r1 ) {
471 row_position( R );
472 }
473}
474
475
476

Callers 3

find_substring_CBMethod · 0.80
jumpToRowMethod · 0.80
jumpToFlaggedRowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected