A TableViewer is a kind of viewer that shows rows and columns and allows the user to move around within the table. The TableViewer class is meant primarily to be derived from. It handles the basics of table editing without doing anything really useful. You should derive from a TableViewer and implement various methods as needed to do something useful. More...
#include <tableviewer.h>
Classes | |
struct | CellInfo |
struct | ColumnInfo |
struct | CursorInfo |
Set the "edit cell" for the table in world coordinates. If the cursor is currently visible and not already at the specified location it will be moved. More... | |
struct | FieldAttributes |
struct | RowInfo |
Public Types | |
enum | cmd_constant { activate, deactivate, resize } |
values that will be passed to the function call operator method. More... | |
typedef CursorWindow::input_event | input_event |
typename alias | |
typedef std::vector < std::vector< CellInfo > > | LayoutType |
typedef std::list< std::string > | paste_buffer_type |
The data type of the paste buffer. | |
typedef CursorWindow::row_col | row_col |
typename alias | |
typedef CursorWindow::viewport | viewport |
Returns true if there are unsaved edit changes in this viewer. the default return value is false. Override this function if your viewer has the ability to have unsaved edit changes -- most don't. | |
Public Member Functions | |
bool | active () const |
Return the current "is window active" flag. | |
void | addColumnData (std::string const &text) |
void | addColumnHeader (std::string const &title, size_t width, FieldAttributes const &a, bool border) |
Add a column to the column header table. | |
void | addColumnHeader (std::string const &title, size_t width, bool border) |
Add a column to the column header table. | |
void | addRow (std::string const &title, size_t height, bool bottomBorder, bool bold=false, bool editable=true, bool executable=true) |
virtual std::string const & | application_name () const |
Return the application name. | |
CellInfo * | cellInfo (size_t row, size_t col) |
return a null or a modifiable pointer to the specified cell information. | |
CellInfo const * | cellInfo (size_t row, size_t col) const |
return a null or a const pointer to the specified cell information. | |
void | clear () |
Discard all rows and columns. | |
size_t | cols () const |
return count of table columns | |
size_t | columnWidth (size_t column) const |
Consult the layout_ and the cols_ tables to determine with maximum of the column header and the widest cell in that column. Does not include gutters. | |
void | commitPasteBuffer () const |
write the paste buffer to the os clipboard. | |
CursorInfo | cursorInfo () const |
Return the current cursor information. | |
virtual std::string | description () const |
Return a description of the application. | |
virtual bool | fetchAllLines (std::list< std::string > &output) |
An optional method that fetches all the lines in this viewer object into a caller supplied list of strings. | |
void | fetchPasteBuffer () |
read the paste buffer from the os clipboard | |
virtual bool | handle_event (CursorWindow::input_event const *e, CursorWindow::viewport *vp) |
Handle keystrokes and other events. | |
virtual void | help () |
Display help about this application. | |
void | hideCursor (CursorWindow::viewport *vp) |
If cursor is visible, repaint it to remove its highlighting. Also, terminate any edit state operations (if any). | |
virtual bool | is_dirty () const |
Return true if the application has modifications. | |
size_t | longestRowTitle () const |
returns the number of chars in longest title | |
ViewerManager * | manager () |
bool | mixed_case () const |
Return the state of the mixed-case-find flag. | |
void | moveDown (CursorWindow::viewport *vp) |
Move the cursor down one row. Normally bound to the down arrow key. | |
void | moveLeft (CursorWindow::viewport *vp) |
Move the cursor left one column. Normally bound to the left arrow key. | |
void | moveRight (CursorWindow::viewport *vp) |
Move the cursor right one column. Normally bound to the right arrow key. | |
void | moveUp (CursorWindow::viewport *vp) |
Move the cursor up one row. Normally bound to the up arrow key. | |
virtual void | operator() (CursorWindow::viewport *vp, int cmd) |
Handle screen repaint commands. | |
size_t | originCol () const |
top left corner column | |
size_t | originRow () const |
top left corner row | |
void | pageBottom (CursorWindow::viewport *vp) |
Move the cursor to the last valid rows, and keep the column the same. | |
void | pageDown (CursorWindow::viewport *vp) |
Move the cursor down one page. Keep the column the same. | |
void | pageEnd (CursorWindow::viewport *vp) |
Move the cursor to maxrow,maxcol Keep the column the same. | |
void | pageHome (CursorWindow::viewport *vp) |
Move the cursor to 0,0. | |
void | pageLeft (CursorWindow::viewport *vp) |
Move the cursor left one page. Keep the column the same. | |
void | pageRight (CursorWindow::viewport *vp) |
Move the cursor right one page. Keep the column the same. | |
void | pageTop (CursorWindow::viewport *vp) |
Move the cursor to the first row in the table. keep the column the same. | |
void | pageUp (CursorWindow::viewport *vp) |
Move the cursor up one page. Keep the column the same. | |
void | paintCell (CursorWindow::viewport *vp, size_t vpRow, size_t vpCol, size_t tbRow, size_t tbCol, bool highlight=false, bool editCursor=true) |
Paint the specified cell at the specified viewport location. No validity checking is done. The most recently painted viewport is used. | |
virtual void | paintCursor (CursorWindow::viewport *) |
If the cursor is marked for display, draw it on the screen. | |
paste_buffer_type * | paste_buffer () |
Get a pointer to the viewer manager's paste buffer. | |
virtual void | repaintTitle (CursorWindow::viewport *vp) |
Repaint the title (presumably after it has changed). | |
RowInfo const & | rowInfo (size_t row) const |
get a copy of a specified row titles, etc. | |
size_t | rows () const |
return count of table rows | |
void | set_data_dirty (bool f) |
Set the 'unsaved modifications' flag. | |
virtual void | set_row_col_hint (size_t line, size_t column, bool repaint=false) |
The set_row_col_hint() method lets you specify the location where the cursor should be positioned. It is called a 'hint' because mistakes in the calling parameters are silently ignored. Also, obedience to the hint is optional. The 'repaint' parameter indicates that the screen should be immediately updated to reflect the change. | |
void | setColInfo (size_t col, std::string const &title, size_t width, bool border, bool bold, bool edit) |
Set the column header information. | |
void | setColInfo (size_t col, std::string const &title, size_t width, bool border) |
Set the column header information. | |
void | setCursorInfo (CursorWindow::viewport *vp, CursorInfo const &i) |
Set the cursor information given a CursorInfo structure. | |
virtual void | setCursorInfo (CursorWindow::viewport *vp, size_t worldRow, size_t worldCol, bool displayed=true) |
void | setDisplayTitles (bool flag) |
Set the flag that controls the permanancy of the displaying of the row and column titles. | |
void | setOrigin (size_t row, size_t col) |
Set the upper left corner column in the world world of the layout_ no the screen coordinate world. | |
void | setRowInfo (size_t row, RowInfo const &r) |
Set the titles and other row specific information givin a row. | |
void | setRowInfo (size_t row, std::string const &title, size_t height, bool border, bool bold, bool edit) |
Set the row header information. | |
void | setRowInfo (size_t row, std::string const &title, size_t height, bool border) |
Set the row header information. | |
void | setRowsAndColumns (size_t rows, size_t cols) |
Set the maximum number of rows and columns in the layout. Adding or deleting as necessary to make it happen. | |
void | showCursor (CursorWindow::viewport *vp) |
If the cursor is not already displayed, repaint it to indicate highlighting for edit. | |
TableViewer (ViewerManager *vm) | |
void | triggerLayoutRecompute () |
implement a copy constructor! | |
virtual | ~TableViewer () |
Protected Member Functions | |
void | checkLayoutRecompute () |
void | deleteRow (CursorWindow::viewport *vp) |
Erase the current row. | |
void | findFirst (CursorWindow::viewport *vp) |
Prompt the user for find string parameter and search for that string from the current edit point. | |
virtual bool | findNext (CursorWindow::viewport *vp, bool first) |
Search for the current search_text_ from the current cell to the end of the table. Update the screen to reflect the new cursor position. | |
void | forceRelayout () |
mark the table layout for recomputation at some later point in time | |
void | insertRowAbove (CursorWindow::viewport *vp, RowInfo const &info) |
Insert new row above the current row. | |
void | insertRowBelow (CursorWindow::viewport *vp, RowInfo const &info) |
Insert new row below the current row. | |
virtual void | paintField (CursorWindow::viewport *vp, size_t vpRow, size_t vpCol, CellInfo const *cell, size_t cellRow, size_t vpColumns, bool editCursor) |
Paint the text of a cell's row and any trailing blanks needed to pad the string's width to vpColumns. | |
void | positionTextInputPointer (CursorWindow::viewport *vp) |
void | setTextInputPointer (size_t vpRow, size_t vpCol) |
Set the screen location where text cursor goes. | |
Protected Attributes | |
std::vector< ColumnInfo > | cols_ |
std::vector< size_t > | colWidths_ |
bool | is_regex_ |
If true, use regular expression searches. | |
LayoutType | layout_ |
ViewerManager * | manager_ |
bool | match_words_ |
If true, use word searches. | |
bool | mixed_case_ |
If true, use case insensitive searches. | |
size_t | pageHeight_ |
size_t | pageWidth_ |
std::vector< RowInfo > | rows_ |
std::string | search_text_ |
Text to search for ////////////////////////////////////////////////////////////////////////////////////. | |
Private Member Functions | |
void | recomputeLayout () |
Regenerate the world coords in layout_. | |
Private Attributes | |
bool | active_ |
size_t | cursorCol_ |
bool | cursorDisplayed_ |
size_t | cursorRow_ |
bool | dataDirty_ |
CursorWindow::row_col | displayOrigin_ |
bool | displayTitles_ |
bool | layoutDirty_ |
size_t | originCol_ |
size_t | originRow_ |
CursorWindow::row_col | textInputPointer_ |
ViewerManager * | viewerManager_ |
A TableViewer is a kind of viewer that shows rows and columns and allows the user to move around within the table. The TableViewer class is meant primarily to be derived from. It handles the basics of table editing without doing anything really useful. You should derive from a TableViewer and implement various methods as needed to do something useful.
Note that the TableEditor class allows the user to edit table columns and rows.
Instructions for creating a useful table viewer sub-class:
<blockquote>
Definition at line 8 of file tableviewer.h.
typedef CursorWindow::input_event input_event [inherited] |
typedef std::vector< std::vector< CellInfo > > LayoutType |
Definition at line 624 of file tableviewer.h.
typedef std::list<std::string> paste_buffer_type [inherited] |
typedef CursorWindow::row_col row_col [inherited] |
typedef CursorWindow::viewport viewport [inherited] |
enum cmd_constant [inherited] |
values that will be passed to the function call operator method.
activate |
means you have been activated |
deactivate |
some other viewport has taken focus |
resize |
only the size has changed |
Definition at line 793 of file cursorwindow.h.
TableViewer | ( | ViewerManager * | vm | ) |
Definition at line 37 of file tableviewer.h.
~TableViewer | ( | ) | [virtual] |
Definition at line 44 of file tableviewer.cxx.
bool active | ( | ) | const |
Return the current "is window active" flag.
A given window is active if it has text focus, otherwise it is not.
Definition at line 615 of file tableviewer.h.
void addColumnData | ( | std::string const & | text | ) |
Definition at line 387 of file tableviewer.h.
void addColumnHeader | ( | std::string const & | title, | |
size_t | width, | |||
FieldAttributes const & | a, | |||
bool | border | |||
) |
Add a column to the column header table.
title | defines the title for the row | |
width | defines the number of screen columns to for this world column | |
a | defines the field attributes | |
border | defines the left border drawing option |
Definition at line 371 of file tableviewer.h.
void addColumnHeader | ( | std::string const & | title, | |
size_t | width, | |||
bool | border | |||
) |
Add a column to the column header table.
title | defines the title for the row | |
width | defines the number of screen columns to for this world column | |
border | defines the left border drawing option |
Definition at line 360 of file tableviewer.h.
void addRow | ( | std::string const & | title, | |
size_t | height, | |||
bool | bottomBorder, | |||
bool | bold = false , |
|||
bool | editable = true , |
|||
bool | executable = true | |||
) |
string const & application_name | ( | ) | const [virtual] |
Return the application name.
Implements Viewer.
Reimplemented in CsvViewer, and ScriptTableViewer.
Definition at line 416 of file tableviewer.cxx.
TableViewer::CellInfo * cellInfo | ( | size_t | row, | |
size_t | col | |||
) |
return a null or a modifiable pointer to the specified cell information.
row | defines the zero based row number of interest | |
col | defines the zero based column number of interest |
Definition at line 551 of file tableviewer.cxx.
TableViewer::CellInfo const * cellInfo | ( | size_t | row, | |
size_t | col | |||
) | const |
return a null or a const pointer to the specified cell information.
row | defines the zero based row number of interest | |
col | defines the zero based column number of interest |
Definition at line 543 of file tableviewer.cxx.
void checkLayoutRecompute | ( | ) | [protected] |
Definition at line 741 of file tableviewer.h.
void clear | ( | ) |
Discard all rows and columns.
Definition at line 1151 of file tableviewer.cxx.
size_t cols | ( | ) | const |
return count of table columns
Definition at line 254 of file tableviewer.h.
size_t columnWidth | ( | size_t | column | ) | const |
Consult the layout_ and the cols_ tables to determine with maximum of the column header and the widest cell in that column. Does not include gutters.
Definition at line 510 of file tableviewer.cxx.
void commitPasteBuffer | ( | ) | const [inherited] |
write the paste buffer to the os clipboard.
Definition at line 625 of file viewer.cxx.
CursorInfo cursorInfo | ( | ) | const |
Return the current cursor information.
Definition at line 491 of file tableviewer.h.
void deleteRow | ( | CursorWindow::viewport * | vp | ) | [protected] |
Erase the current row.
vp | the viewport to draw in -- though none is none |
Definition at line 1242 of file tableviewer.cxx.
string description | ( | ) | const [virtual] |
Return a description of the application.
Implements Viewer.
Reimplemented in CsvViewer, and ScriptTableViewer.
Definition at line 425 of file tableviewer.cxx.
bool fetchAllLines | ( | std::list< std::string > & | output | ) | [virtual, inherited] |
An optional method that fetches all the lines in this viewer object into a caller supplied list of strings.
[out] | output | The location to store all the lines from this viewer. |
Reimplemented in ListViewer.
Definition at line 705 of file viewer.cxx.
void fetchPasteBuffer | ( | ) | [inherited] |
read the paste buffer from the os clipboard
Definition at line 661 of file viewer.cxx.
void findFirst | ( | CursorWindow::viewport * | vp | ) | [protected] |
Prompt the user for find string parameter and search for that string from the current edit point.
Definition at line 1257 of file tableviewer.cxx.
bool findNext | ( | CursorWindow::viewport * | vp, | |
bool | first | |||
) | [protected, virtual] |
Search for the current search_text_ from the current cell to the end of the table. Update the screen to reflect the new cursor position.
vp | The viewport in which to draw | |
first | True if the is first time this string has been used for the search (and thus the current cell should be searched). |
Definition at line 1373 of file tableviewer.cxx.
void forceRelayout | ( | ) | [protected] |
mark the table layout for recomputation at some later point in time
Definition at line 718 of file tableviewer.h.
bool handle_event | ( | CursorWindow::input_event const * | e, | |
CursorWindow::viewport * | vp | |||
) | [virtual] |
Handle keystrokes and other events.
Implements Viewer.
Reimplemented in CsvViewer, ScriptTableViewer, and TableEditor.
Definition at line 337 of file tableviewer.cxx.
void help | ( | ) | [virtual] |
Display help about this application.
Reimplemented from Viewer.
Reimplemented in CsvViewer, and ScriptTableViewer.
Definition at line 433 of file tableviewer.cxx.
void hideCursor | ( | CursorWindow::viewport * | vp | ) |
If cursor is visible, repaint it to remove its highlighting. Also, terminate any edit state operations (if any).
Definition at line 667 of file tableviewer.cxx.
void insertRowAbove | ( | CursorWindow::viewport * | vp, | |
RowInfo const & | info | |||
) | [protected] |
Insert new row above the current row.
vp | the viewport to draw in | |
info | the title of the current row |
Definition at line 1172 of file tableviewer.cxx.
void insertRowBelow | ( | CursorWindow::viewport * | vp, | |
RowInfo const & | info | |||
) | [protected] |
Insert new row below the current row.
vp | the viewport to draw in | |
info | the title of the current row |
Definition at line 1194 of file tableviewer.cxx.
bool is_dirty | ( | ) | const [virtual] |
Return true if the application has modifications.
Reimplemented from Viewer.
Definition at line 441 of file tableviewer.cxx.
size_t longestRowTitle | ( | ) | const |
returns the number of chars in longest title
Definition at line 449 of file tableviewer.cxx.
ViewerManager* manager | ( | ) | [inherited] |
bool mixed_case | ( | ) | const |
Return the state of the mixed-case-find flag.
Definition at line 621 of file tableviewer.h.
void moveDown | ( | CursorWindow::viewport * | vp | ) |
Move the cursor down one row. Normally bound to the down arrow key.
Definition at line 896 of file tableviewer.cxx.
void moveLeft | ( | CursorWindow::viewport * | vp | ) |
Move the cursor left one column. Normally bound to the left arrow key.
Definition at line 930 of file tableviewer.cxx.
void moveRight | ( | CursorWindow::viewport * | vp | ) |
Move the cursor right one column. Normally bound to the right arrow key.
Definition at line 954 of file tableviewer.cxx.
void moveUp | ( | CursorWindow::viewport * | vp | ) |
Move the cursor up one row. Normally bound to the up arrow key.
Definition at line 869 of file tableviewer.cxx.
void operator() | ( | CursorWindow::viewport * | vp, | |
int | cmd | |||
) | [virtual] |
Handle screen repaint commands.
Implements Viewer.
Definition at line 63 of file tableviewer.cxx.
size_t originCol | ( | ) | const |
top left corner column
Definition at line 257 of file tableviewer.h.
size_t originRow | ( | ) | const |
top left corner row
Definition at line 256 of file tableviewer.h.
void pageBottom | ( | CursorWindow::viewport * | vp | ) |
Move the cursor to the last valid rows, and keep the column the same.
Normally bound to the control B key.
Definition at line 1121 of file tableviewer.cxx.
void pageDown | ( | CursorWindow::viewport * | vp | ) |
Move the cursor down one page. Keep the column the same.
Normally bound to the PageDown or Next key.
Definition at line 1001 of file tableviewer.cxx.
void pageEnd | ( | CursorWindow::viewport * | vp | ) |
Move the cursor to maxrow,maxcol Keep the column the same.
Normally bound to the end key
Definition at line 1110 of file tableviewer.cxx.
void pageHome | ( | CursorWindow::viewport * | vp | ) |
Move the cursor to 0,0.
Normally bound to the Home key
Definition at line 1101 of file tableviewer.cxx.
void pageLeft | ( | CursorWindow::viewport * | vp | ) |
Move the cursor left one page. Keep the column the same.
Normally bound to the shift-Tab key.
Definition at line 1069 of file tableviewer.cxx.
void pageRight | ( | CursorWindow::viewport * | vp | ) |
Move the cursor right one page. Keep the column the same.
Normally bound to the tab key.
Definition at line 1034 of file tableviewer.cxx.
void pageTop | ( | CursorWindow::viewport * | vp | ) |
Move the cursor to the first row in the table. keep the column the same.
Normally bound to the control B key.
Definition at line 1138 of file tableviewer.cxx.
void pageUp | ( | CursorWindow::viewport * | vp | ) |
Move the cursor up one page. Keep the column the same.
Normally bound to the PageUp or Prior key.
Definition at line 980 of file tableviewer.cxx.
void paintCell | ( | CursorWindow::viewport * | vp, | |
size_t | vpRow, | |||
size_t | vpCol, | |||
size_t | tbRow, | |||
size_t | tbCol, | |||
bool | highlight = false , |
|||
bool | editCursor = true | |||
) |
Paint the specified cell at the specified viewport location. No validity checking is done. The most recently painted viewport is used.
vp | the viewport to draw in | |
vpRow | the viewport row | |
vpCol | the column | |
tbRow | table row | |
tbCol | the table column | |
highlight | flag indicating highlighted display | |
editCursor | flag indicating the cursor should be left in edit poisiton |
Definition at line 785 of file tableviewer.cxx.
void paintCursor | ( | CursorWindow::viewport * | vp | ) | [virtual] |
If the cursor is marked for display, draw it on the screen.
The function is virtual so that derived classes can hook into the repaint functionality so they can position the edit cursor.
vp | is the viewport to positiont he cursor into |
Definition at line 684 of file tableviewer.cxx.
void paintField | ( | CursorWindow::viewport * | vp, | |
size_t | vpRow, | |||
size_t | vpCol, | |||
TableViewer::CellInfo const * | cell, | |||
size_t | cellRow, | |||
size_t | vpColumns, | |||
bool | editCursor | |||
) | [protected, virtual] |
Paint the text of a cell's row and any trailing blanks needed to pad the string's width to vpColumns.
vpRow | The upper left row where display is to start | |
vpCol | The upper left col where display is to start | |
cell | A pointer to the layout_ location being painted. | |
cellRow | The row within the cell to paint. | |
vpColumns | The width of the field. | |
editCursor | Indicates the cursor should be left in feild edit position (if true). |
This function exists to be superseeded by derived classes.
Note that the leading gutter will have been painted and the text attributes set before this function is called.
If editCursor is false, then the cursor will be left at the end end of the field. This flag is ignored if the field is not editable and the cursor will end up at the end.
Reimplemented in TableEditor.
Definition at line 834 of file tableviewer.cxx.
Viewer::paste_buffer_type * paste_buffer | ( | ) | [inherited] |
Get a pointer to the viewer manager's paste buffer.
Definition at line 601 of file viewer.cxx.
void positionTextInputPointer | ( | CursorWindow::viewport * | vp | ) | [protected] |
Definition at line 1164 of file tableviewer.cxx.
void recomputeLayout | ( | ) | [private] |
Regenerate the world coords in layout_.
Definition at line 579 of file tableviewer.cxx.
void repaintTitle | ( | CursorWindow::viewport * | vp | ) | [virtual] |
Repaint the title (presumably after it has changed).
vp | The viewport where this table is drawn. |
By default, this function prints the application name, but derived classes may wish to superseed this behavior.
Reimplemented in ScriptTableViewer.
Definition at line 48 of file tableviewer.cxx.
RowInfo const& rowInfo | ( | size_t | row | ) | const |
get a copy of a specified row titles, etc.
row | The row to modify |
Definition at line 414 of file tableviewer.h.
size_t rows | ( | ) | const |
return count of table rows
Definition at line 253 of file tableviewer.h.
void set_data_dirty | ( | bool | f | ) |
Set the 'unsaved modifications' flag.
f | defines the status of the dirty flag. |
See the function is_dirty().
Definition at line 608 of file tableviewer.h.
virtual void set_row_col_hint | ( | size_t | line, | |
size_t | column, | |||
bool | repaint = false | |||
) | [virtual, inherited] |
The set_row_col_hint() method lets you specify the location where the cursor should be positioned. It is called a 'hint' because mistakes in the calling parameters are silently ignored. Also, obedience to the hint is optional. The 'repaint' parameter indicates that the screen should be immediately updated to reflect the change.
Again, obedience to this function is entirely optional and most viewers will ignore it.
The line and column numbers are 0 base! Contrary to normal user's expectations, so account for this in any input calculations you make.
Definition at line 202 of file viewer.h.
void setColInfo | ( | size_t | col, | |
std::string const & | title, | |||
size_t | width, | |||
bool | border, | |||
bool | bold, | |||
bool | edit | |||
) |
Set the column header information.
col | defines the col number of interest (world col, not screen col) | |
title | defines the title for the row | |
width | defines the number of screen columns to for this world column | |
border | defines the left border drawing option | |
bold | defines the bold display attribute for this column | |
edit | defines the editable flag for this colum |
Definition at line 339 of file tableviewer.h.
void setColInfo | ( | size_t | col, | |
std::string const & | title, | |||
size_t | width, | |||
bool | border | |||
) |
Set the column header information.
col | defines the col number of interest (world col, not screen col) | |
title | defines the title for the row | |
width | defines the number of screen columns to for this world column | |
border | defines the left border drawing option |
Definition at line 322 of file tableviewer.h.
void setCursorInfo | ( | CursorWindow::viewport * | vp, | |
CursorInfo const & | i | |||
) |
Set the cursor information given a CursorInfo structure.
Definition at line 495 of file tableviewer.h.
void setCursorInfo | ( | CursorWindow::viewport * | vp, | |
size_t | worldRow, | |||
size_t | worldCol, | |||
bool | displayed = true | |||
) | [virtual] |
Reimplemented in CsvViewer, and TableEditor.
Definition at line 647 of file tableviewer.cxx.
void setDisplayTitles | ( | bool | flag | ) |
Set the flag that controls the permanancy of the displaying of the row and column titles.
flag | if true, means that the titles should always be displayed. |
Definition at line 259 of file tableviewer.h.
void setOrigin | ( | size_t | row, | |
size_t | col | |||
) |
Set the upper left corner column in the world world of the layout_ no the screen coordinate world.
row | is the row in the virtual world | |
col | is the column in hte virtual world |
Definition at line 443 of file tableviewer.h.
void setRowInfo | ( | size_t | row, | |
RowInfo const & | r | |||
) |
Set the titles and other row specific information givin a row.
row | The row to modify | |
r | The RowInfo to change |
Definition at line 420 of file tableviewer.h.
void setRowInfo | ( | size_t | row, | |
std::string const & | title, | |||
size_t | height, | |||
bool | border, | |||
bool | bold, | |||
bool | edit | |||
) |
Set the row header information.
row | defines the row number of interest (world row, not screen row) | |
title | defines the title for the row | |
height | defines the number of screen rows to reserve vertically for "row" | |
border | defines the bottom border drawing option | |
bold | defines the bold drawing flag for the row | |
edit | defines the editable flag for this row |
Definition at line 300 of file tableviewer.h.
void setRowInfo | ( | size_t | row, | |
std::string const & | title, | |||
size_t | height, | |||
bool | border | |||
) |
Set the row header information.
row | defines the row number of interest (world row, not screen row) | |
title | defines the title for the row | |
height | defines the number of screen rows to reserve vertically for "row" | |
border | defines the bottom border drawing option |
Definition at line 283 of file tableviewer.h.
void setRowsAndColumns | ( | size_t | rows, | |
size_t | cols | |||
) |
Set the maximum number of rows and columns in the layout. Adding or deleting as necessary to make it happen.
rows | is the exact number of rows to establish | |
cols | is the exact number of cols to establish. |
Definition at line 492 of file tableviewer.cxx.
void setTextInputPointer | ( | size_t | vpRow, | |
size_t | vpCol | |||
) | [protected] |
Set the screen location where text cursor goes.
vpRow | is the viewport relative row | |
vpCol | is the viewport relative column |
Definition at line 707 of file tableviewer.h.
void showCursor | ( | CursorWindow::viewport * | vp | ) |
If the cursor is not already displayed, repaint it to indicate highlighting for edit.
Definition at line 676 of file tableviewer.cxx.
void triggerLayoutRecompute | ( | ) |
implement a copy constructor!
Called by field editing functions to inform the table repaint mechanism, operator()(), that the column sizes need to be recomputed.
Definition at line 63 of file tableviewer.h.
bool active_ [private] |
Definition at line 636 of file tableviewer.h.
std::vector<ColumnInfo> cols_ [protected] |
Definition at line 666 of file tableviewer.h.
std::vector<size_t> colWidths_ [protected] |
Definition at line 660 of file tableviewer.h.
size_t cursorCol_ [private] |
Definition at line 640 of file tableviewer.h.
bool cursorDisplayed_ [private] |
Definition at line 641 of file tableviewer.h.
size_t cursorRow_ [private] |
Definition at line 639 of file tableviewer.h.
bool dataDirty_ [private] |
Definition at line 650 of file tableviewer.h.
CursorWindow::row_col displayOrigin_ [private] |
Definition at line 644 of file tableviewer.h.
bool displayTitles_ [private] |
Definition at line 635 of file tableviewer.h.
bool is_regex_ [protected] |
If true, use regular expression searches.
Definition at line 672 of file tableviewer.h.
LayoutType layout_ [protected] |
Definition at line 663 of file tableviewer.h.
bool layoutDirty_ [private] |
Definition at line 637 of file tableviewer.h.
ViewerManager* manager_ [protected, inherited] |
bool match_words_ [protected] |
If true, use word searches.
Definition at line 673 of file tableviewer.h.
bool mixed_case_ [protected] |
If true, use case insensitive searches.
Definition at line 671 of file tableviewer.h.
size_t originCol_ [private] |
Definition at line 633 of file tableviewer.h.
size_t originRow_ [private] |
Definition at line 632 of file tableviewer.h.
size_t pageHeight_ [protected] |
Definition at line 658 of file tableviewer.h.
size_t pageWidth_ [protected] |
Definition at line 657 of file tableviewer.h.
Definition at line 665 of file tableviewer.h.
std::string search_text_ [protected] |
Text to search for ////////////////////////////////////////////////////////////////////////////////////.
Definition at line 674 of file tableviewer.h.
CursorWindow::row_col textInputPointer_ [private] |
Definition at line 648 of file tableviewer.h.
ViewerManager* viewerManager_ [private] |
Definition at line 646 of file tableviewer.h.