|
#include <CListView.h>

Public Member Functions | |
| CListView (const char *label=0, int layoutSize=20, CLayoutAlign layoutAlign=SP_ALIGN_TOP) | |
| Constructor in SPTK style. | |
| ~CListView () | |
| Destructor. | |
| int | handle (int) |
| Overwritten handle(). | |
| void | resize (int x, int y, int w, int h) |
| Resizes the control and inside widgets. | |
| virtual void | removeRow (uint32_t index) |
| Removes row. | |
| virtual void | addRow (int ident, const char *s1, const char *s2=NULL, const char *s3=NULL, const char *s4=NULL, const char *s5=NULL) |
| Adds new row. | |
| virtual void | addRow (int count, const char *strings[], int ident=0) |
| Adds new row. | |
| virtual void | addRow (CPackedStrings *row) |
| Adds new row. | |
| virtual void | addRow (const CStrings &row, int ident=0) |
| Adds new row. | |
| virtual void | insertRow (uint32_t position, CPackedStrings *row) |
| Inserts new row. | |
| virtual void | insertRow (uint32_t position, const CStrings &row, int ident=0) |
| Inserts new row. | |
| virtual void | updateRow (uint32_t position, CPackedStrings *row) |
| Updates a row. | |
| virtual void | updateRow (uint32_t position, const CStrings &row, int ident=0) |
| Updates a row. Optional row argument may be defined inside row parameter. | |
| virtual void | clear () |
| Removes all the rows. | |
| virtual uint32_t | size () const |
| Returns the row count. | |
| virtual int | top () const |
| Returns the scroll position. | |
| virtual void | top (int index) |
| Sets the scroll position. | |
| int | selected (int index) const |
| void | show (int index) |
| void | hide (int index) |
| void | hide () |
| Hides the list view widget. | |
| int | visible (int index) const |
| int | visible () const |
| Is the widget visible? | |
| std::string | textValue () const |
| Returns the value the selected row and sort column cell. | |
| void | textValue (std::string text) |
| void | dataMode (CListViewDataMode dm) |
| CListViewDataMode | dataMode () |
| virtual CVariant | data () const |
| virtual void | data (const CVariant v) |
| CPackedStrings * | row (uint32_t index) const |
| const CSelection & | selection () const |
| Returns selection list. | |
| CPackedStrings & | selectedRow () const |
| int | selectedIndex () const |
| Returns the row number for the selected row. | |
| bool | selectRow (uint32_t index, bool sel=true) |
| bool | displayed (uint32_t index) const |
| virtual void | displayRow (uint32_t index) |
| void | redrawRow (uint32_t index) |
| void | columns (const CColumnList &columns) |
| Sets a new column list. | |
| CColumnList & | columns () |
| Returns column list. | |
| CColumn & | column (uint32_t col) |
| Returns column informartion. | |
| CColumn & | column (const char *colname) |
| Returns column informartion. | |
| void | addColumn (const CColumn &column) |
| Adds a new column as a copy of column. | |
| void | addColumn (const std::string colname, CVariantType type, uint32_t cwidth=100, bool cvisible=true) |
| Adds a new column as a copy of column. | |
| virtual CControlKind | kind () const |
| SPTK RTTI information. | |
| bool | autoRowHeight () |
| Returns auto row height mode as true/false. | |
| void | autoRowHeight (bool arh) |
| Sets auto row height mode as true/false. | |
| Fl_Font | textFont () const |
| Returns text font type. | |
| void | textFont (Fl_Font f) |
| Sets text font type. | |
| uchar | textSize () const |
| Returns text font size. | |
| void | textSize (uchar s) |
| Sets text font size. | |
| Fl_Color | textColor () const |
| Returns text color. | |
| void | textColor (Fl_Color n) |
| Sets text color. | |
| bool | showGrid () |
| Returns show grid mode. | |
| void | showGrid (bool flag) |
| Sets show grid mode. | |
| bool | showStripes () |
| Returns show stripes. | |
| void | showStripes (bool flag) |
| Sets show stripes mode. | |
| bool | showSelection () |
| Returns show selection mode. | |
| void | showSelection (bool flag) |
| Sets show selection mode. | |
| bool | multiSelect () const |
| Returns multiple selection enabled or disabled. | |
| void | multiSelect (bool ms) |
| Sets multiple selection enabled or disabled. | |
| void | getSelections (CIntList &selection) const |
| Returns a selected rows ID list. | |
| void | setSelections (const CIntList &selection) |
| Sets a selected rows ID list. | |
| CPackedStrings * | findCaption (std::string caption) |
| Finds an item with the caption (a string in the first column). | |
| CPackedStrings * | findKey (int keyValue) |
| Finds an item with the key (an integer associated with the item - argument()). | |
| uint32_t | fullWidth () const |
| Returns maximum width of all items including the header row. | |
| uint32_t | fullHeight () |
| Returns summary height of all items including the header row. | |
| virtual int | findString (std::string str, bool select=true, uint32_t startRow=0, uint32_t endRow=0) |
| Finds a string in the sort column of list view defined with sortColumn(). | |
| std::string | sortColumnName () const |
| Returns sort column name. | |
| void | sortColumn (int column, bool sortNow) |
| Sets the sort column. | |
| int | sortColumn () const |
| Returns the sort column number. | |
| bool | sortAscending () const |
| Returns the sort direction - ascending/descending. | |
| void | sortAscending (bool ascending, bool sortNow) |
| Sets the sort direction - ascending/descending. | |
| void | sort () |
| Sorts ListView rows using existing information about sort column and direction. | |
| void | fill (CDataSource &ds, std::string keyFieldName="", uint32_t recordsLimit=0, uint32_t recordsEstimated=0, CRefreshKind refreshKind=LV_REFRESH_FULL) |
| Fills the list view with the data from datasource. | |
| void | loadList (const CXmlNode *node) |
| Fills the list with the data from XML node. | |
| void | saveList (CXmlNode *node) const |
| Saves the list data into XML node. | |
| virtual bool | preferredSize (int &w, int &h) |
| Computes the optimal widgets size. | |
| uint32_t | headerHeight () const |
| Returns header height. | |
| void | headerHeight (uint32_t hh) |
| Sets the header height, 0 to hide headers. | |
| uint32_t | activeRow () const |
| Returns the currently active row. | |
| bool | capitalizeColumnNames () const |
| Returns true if column names are auto-capitilized. | |
| void | capitalizeColumnNames (bool ccn) |
| Defines if column names should be auto-capitilized. | |
| void | terminateFill () |
| Terminate the current fill() operation (if in progress). | |
| virtual std::string | className () const |
| Returns widget class name (internal SPTK RTTI). | |
| void | imageCollection (CStrings &iconNames) |
| Sets the images that may be referred from items. | |
Protected Member Functions | |
| int | columnAt (int x) |
| Computes which column contains x-coordinate. | |
| int | find_item (int y) |
| Finds an item in vertical position y. | |
| void | bbox (int &X, int &Y, int &W, int &H) const |
| Returns the actual size of the drawing area (internal). | |
| int | hposition () const |
| Returns horizontal position of the scroll. | |
| void | hposition (int hpos) |
| Sets horizontal position of the scroll. | |
| int | find_id (int id) const |
| Finds item with ID. | |
| virtual int | get_focus () |
| Get focus callback (internal). | |
| virtual bool | item_selected (uint32_t index) const |
| Returns true if item is selected. | |
| virtual void | item_select (uint32_t index, bool select) |
| Selects or deselects the item. | |
| virtual int | item_compute_height_all () |
| Recomputes all items height. | |
| virtual int | item_compute_height (CPackedStrings *rowData) |
| Recomputes items height. | |
| virtual int | item_height (uint32_t index) const |
| Recomputes items height. | |
| virtual int | item_width (uint32_t index) const |
| Returns item width. | |
| virtual void | item_draw (uint32_t index, const CPackedStrings *rowData, int x, int y, int w, int h, int focusMode, int verticalAlign, bool paintBackground=true) const |
| Draws a row in coordinates (internal). | |
| virtual void | item_clicked (int mouse_btn) |
| Internal mouse callback. | |
| virtual Fl_Color | item_color (int column, const CPackedStrings &rowData) const |
| The function that allows to overwrite the default text color for the cell. | |
| virtual void | header_draw (int x, int y, int hh) const |
| Draws header (internal). | |
| virtual void | header_clicked (int x) |
| Header clicked mouse callback. | |
| virtual bool | header_drag_position (int x) |
| Returns true if x is the drag-sensitive area. | |
| virtual void | header_dragged (int x) |
| Header dragged to position x notification. | |
| virtual void | header_released (int x) |
| Header released in position x notification. | |
| void | redraw_line (uint32_t index) |
| Request to redraw line index. | |
| void | redraw_lines () |
| Redraw all the lines. | |
| virtual void | draw () |
| General draw function. Draws everything. | |
| void | key_changed (uint32_t index) |
| Internal callback if selected another item with the different user _data (key). | |
| virtual void | load (CQuery *) |
| Loads the key value from the query. | |
| virtual void | save (CQuery *) |
| Saves the key value from the query. | |
| virtual void | load (const CXmlNode *node, CLayoutXMLmode xmlMode) |
| Loads control data from XML. | |
| virtual void | save (CXmlNode *node, CLayoutXMLmode xmlMode) const |
| Saves control data to XML. | |
| virtual bool | valid () const |
| True if the data is valid. | |
| virtual uint32_t | cellBorderWidth () const |
| Returns the cell border width. | |
| bool | select (uint32_t index, bool sel=true, int docallbacks=false) |
| Selects the row. Internal. | |
| bool | select_only (uint32_t index, bool docallbacks=false) |
| Selects the only row. Internal. | |
| bool | activate_row (uint32_t index) |
| Selects the row. Executes the callbacks. Internal. | |
| bool | select_first () |
| Selects the first row. Executes the callbacks. Internal. | |
| bool | select_last () |
| Selects the last row. Executes the callbacks. Internal. | |
| bool | select_next () |
| Selects the next row. Executes the callbacks. Internal. | |
| bool | select_prior () |
| Selects the prior row. Executes the callbacks. Internal. | |
| bool | select_next_page () |
| Selects the next page row. Executes the callbacks. Internal. | |
| bool | select_prior_page () |
| Selects the prior page row. Executes the callbacks. Internal. | |
Static Protected Member Functions | |
| static void | scrollbar_callback (Fl_Widget *s, void *) |
| Internal vertical scrollback callback. | |
| static void | hscrollbar_callback (Fl_Widget *s, void *) |
| Internal horizontal scrollback callback. | |
| static void | scrollbar_width (int b) |
| Changes the default scrollbar width for the class. | |
| static int | scrollbar_width () |
| Returns the default scrollbar width for the class. | |
Protected Attributes | |
| bool | m_capitalizeColumnNames |
| Should the column headers to be capitilized? | |
| bool | m_multipleSelection |
| Is multiple selection allowed? | |
| int | m_horizPosition |
| The horizontal position - to be. | |
| int | m_realHorizPosition |
| The horizontal position - existing. | |
| int | m_maxWidth |
| The maximum required width for the columns. | |
| int | m_redraw1 |
| The minimal update pointer. | |
| int | m_redraw2 |
| The minimal update pointer. | |
| uint32_t | m_top |
| The scrolling position. | |
| int | m_currentTextFont |
| Text font, currently used to draw the list view. | |
| int | m_currentTextSize |
| Text size, currently used to draw the list view. | |
| CStrings | m_iconNames |
| Icon names that may be referred from items (icon size is 16). | |
| CListViewDataMode | m_dataMode |
| Data mode Defines the kind of data to work through data() method. | |
| int | m_mousePressedX |
| The mouse pressed position. | |
| CSelection | m_selection |
| The list of currently selected items. | |
| std::string | m_searchPhrase |
| Type-in search buffer. | |
| uint32_t | m_activeRow |
| The row where the focus is or should be. | |
| uint32_t | m_headerHeight |
| The height of the header area. | |
| CListViewRows | m_rows |
| The list of rows. | |
| CColumnList | m_columnList |
| The list of columns. | |
| int | m_draggingColumn |
| Dragged column. | |
| int | m_draggingStarted |
| Dragging column started. | |
| Fl_Font | m_textFont |
| The text font type. | |
| uchar | m_textSize |
| The text font size. | |
| Fl_Color | m_textColor |
| The text font color. | |
| bool | m_showStripes |
| Show/hide horizontal stripes. Stripes is an alternative to cell grid. | |
| bool | m_showGrid |
| Show/hide cell grid. Grid is an alternative to stripes. | |
| bool | m_showSelection |
| Show/hide selection. | |
| bool | m_autoRowHeight |
| Auto row height on/off. | |
| CScrollBar | scrollbar |
| Vertical scrollback. | |
| CScrollBar | hscrollbar |
| Horizontal scrollbar. | |
Static Protected Attributes | |
| static int | m_scrollbarWidth |
| Scrollbar width for this class of object. | |
Friends | |
| class | CInternalComboBoxPanel |
| class | CDBDropDownList |
Class CListView is the list of multicolumn rows. It allows to sort rows by column, supports type-in incremental search etc.
| sptk::CListView::CListView | ( | const char * | label = 0, |
|
| int | layoutSize = 20, |
|||
| CLayoutAlign | layoutAlign = SP_ALIGN_TOP | |||
| ) |
Constructor in SPTK style.
| label | const char *, label | |
| layoutSize | int, widget align in layout | |
| layoutAlign | CLayoutAlign, widget align in layout |
| bool sptk::CListView::activate_row | ( | uint32_t | index | ) | [protected] |
Selects the row. Executes the callbacks. Internal.
| index | int, row number |
| void sptk::CListView::addColumn | ( | const std::string | colname, | |
| CVariantType | type, | |||
| uint32_t | cwidth = 100, |
|||
| bool | cvisible = true | |||
| ) | [inline] |
Adds a new column as a copy of column.
| colname | const char *, column name | |
| type | CVariantType, column data type | |
| cwidth | uint32_t, column width | |
| cvisible | bool, is the column visible? |
| void sptk::CListView::addColumn | ( | const CColumn & | column | ) | [inline] |
| virtual void sptk::CListView::addRow | ( | const CStrings & | row, | |
| int | ident = 0 | |||
| ) | [virtual] |
Adds new row.
Optional row ID may be defined inside row parameter, or through ident parameter.
| row | const CStrings&, row data | |
| ident | int, row argument (key value) |
| virtual void sptk::CListView::addRow | ( | CPackedStrings * | row | ) | [virtual] |
Adds new row.
Optional row ID may be defined inside row parameter.
| row | CPackedStrings *, row data |
| virtual void sptk::CListView::addRow | ( | int | count, | |
| const char * | strings[], | |||
| int | ident = 0 | |||
| ) | [virtual] |
Adds new row.
| count | int, number of items in strings | |
| strings | char * [], row data | |
| ident | int, row argument (key value) |
| virtual void sptk::CListView::addRow | ( | int | ident, | |
| const char * | s1, | |||
| const char * | s2 = NULL, |
|||
| const char * | s3 = NULL, |
|||
| const char * | s4 = NULL, |
|||
| const char * | s5 = NULL | |||
| ) | [virtual] |
Adds new row.
| ident | int, row argument (key value) | |
| s1 | const char *, text data for the column 1 | |
| s2 | const char *, text data for the column 2 | |
| s3 | const char *, text data for the column 3 | |
| s4 | const char *, text data for the column 4 | |
| s5 | const char *, text data for the column 5 |
| void sptk::CListView::bbox | ( | int & | X, | |
| int & | Y, | |||
| int & | W, | |||
| int & | H | |||
| ) | const [protected] |
Returns the actual size of the drawing area (internal).
| X | int, output, x-xoordinate | |
| Y | int, output, y-xoordinate | |
| W | int, output, width | |
| H | int, output, height |
| void sptk::CListView::capitalizeColumnNames | ( | bool | ccn | ) | [inline] |
Defines if column names should be auto-capitilized.
| ccn | bool, true if column names should be auto-capitilized |
| CColumn& sptk::CListView::column | ( | const char * | colname | ) |
Returns column informartion.
| colname | const char *, column name |
| CColumn& sptk::CListView::column | ( | uint32_t | col | ) | [inline] |
Returns column informartion.
| col | uint32_t, column number 0..columnCount() -1 |
| int sptk::CListView::columnAt | ( | int | x | ) | [protected] |
Computes which column contains x-coordinate.
| x | int, coordinate |
| void sptk::CListView::columns | ( | const CColumnList & | columns | ) |
| virtual void sptk::CListView::data | ( | const CVariant | v | ) | [virtual] |
The universal data connector, selects row with user data
| v | const CVariant, user data value to find and select |
Reimplemented from sptk::CControl.
| virtual CVariant sptk::CListView::data | ( | ) | const [virtual] |
| CListViewDataMode sptk::CListView::dataMode | ( | ) | [inline] |
Returns data mode as LV_DATA_KEY, LV_DATA_INDEX, LV_DATA_CAPTION. Defines which information list view is working with in data() method - key value, item index, or item caption.
| void sptk::CListView::dataMode | ( | CListViewDataMode | dm | ) | [inline] |
| bool sptk::CListView::displayed | ( | uint32_t | index | ) | const |
Returns true if the row is currently visible in the scroll area
| index | int, row number |
| virtual void sptk::CListView::displayRow | ( | uint32_t | index | ) | [virtual] |
Makes the row visible in the scroll area
| index | int, row number |
| void sptk::CListView::fill | ( | CDataSource & | ds, | |
| std::string | keyFieldName = "", |
|||
| uint32_t | recordsLimit = 0, |
|||
| uint32_t | recordsEstimated = 0, |
|||
| CRefreshKind | refreshKind = LV_REFRESH_FULL | |||
| ) |
Fills the list view with the data from datasource.
Uses all available datasource information about column and data types.
| ds | CDataSource&, the datasource | |
| keyFieldName | std::string, field used to fill in key values | |
| recordsLimit | uint32_t, maximum records to retrieve | |
| recordsEstimated | uint32_t, records estimated (to use the fill progression event) | |
| refreshKind | CRefreshKind, type of refresh - full or just changed records |
| int sptk::CListView::find_id | ( | int | id | ) | const [protected] |
Finds item with ID.
| id | int, item id |
| int sptk::CListView::find_item | ( | int | y | ) | [protected] |
Finds an item in vertical position y.
| y | int, vertical position |
| CPackedStrings* sptk::CListView::findCaption | ( | std::string | caption | ) |
Finds an item with the caption (a string in the first column).
| caption | std::string, the caption to find and select. |
| CPackedStrings* sptk::CListView::findKey | ( | int | keyValue | ) |
Finds an item with the key (an integer associated with the item - argument()).
| keyValue | int, the caption to find and select. |
| virtual int sptk::CListView::findString | ( | std::string | str, | |
| bool | select = true, |
|||
| uint32_t | startRow = 0, |
|||
| uint32_t | endRow = 0 | |||
| ) | [virtual] |
Finds a string in the sort column of list view defined with sortColumn().
| str | std::string, string to find | |
| select | bool, true if we want to select the found row | |
| startRow | uint32_t, the row number to start | |
| endRow | uint32_t, the row number to finish |
| virtual void sptk::CListView::header_clicked | ( | int | x | ) | [protected, virtual] |
Header clicked mouse callback.
| x | int, x-coordinate |
| virtual void sptk::CListView::header_dragged | ( | int | x | ) | [protected, virtual] |
Header dragged to position x notification.
| x | int, x-coordinate |
| virtual void sptk::CListView::header_draw | ( | int | x, | |
| int | y, | |||
| int | hh | |||
| ) | const [protected, virtual] |
Draws header (internal).
| x | int, x-coordinate | |
| y | int, y-coordinate | |
| hh | int, header height |
| virtual void sptk::CListView::header_released | ( | int | x | ) | [protected, virtual] |
Header released in position x notification.
| x | int, x-coordinate |
| void sptk::CListView::hide | ( | int | index | ) |
Switch the visibility flag for the row index
| index | int, row number |
| void sptk::CListView::hposition | ( | int | hpos | ) | [protected] |
Sets horizontal position of the scroll.
| hpos | int, new horizontal position |
| void sptk::CListView::imageCollection | ( | CStrings & | iconNames | ) |
Sets the images that may be referred from items.
| iconNames | CStrings&, a list of icon names |
| virtual void sptk::CListView::insertRow | ( | uint32_t | position, | |
| const CStrings & | row, | |||
| int | ident = 0 | |||
| ) | [virtual] |
Inserts new row.
Optional row argument may be defined inside row parameter, or through ident parameter.
| position | uint32_t, insert position | |
| row | const CStrings&, row data | |
| ident | int, row argument (key value) |
| virtual void sptk::CListView::insertRow | ( | uint32_t | position, | |
| CPackedStrings * | row | |||
| ) | [virtual] |
Inserts new row.
Optional row ID may be defined inside row parameter.
| position | uint32_t, insert position | |
| row | CPackedStrings *, row data |
| virtual Fl_Color sptk::CListView::item_color | ( | int | column, | |
| const CPackedStrings & | rowData | |||
| ) | const [protected, virtual] |
The function that allows to overwrite the default text color for the cell.
| column | int, the column number | |
| rowData | const CPackedStrings&, row |
| virtual int sptk::CListView::item_compute_height | ( | CPackedStrings * | rowData | ) | [protected, virtual] |
| virtual void sptk::CListView::item_draw | ( | uint32_t | index, | |
| const CPackedStrings * | rowData, | |||
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h, | |||
| int | focusMode, | |||
| int | verticalAlign, | |||
| bool | paintBackground = true | |||
| ) | const [protected, virtual] |
Draws a row in coordinates (internal).
| index | uint32_t, row number | |
| rowData | const CPackedStrings *, row pointer | |
| x | int, x-coordinate | |
| y | int, y-coordinate | |
| w | int, width | |
| h | int, height | |
| focusMode | int, focus flag | |
| verticalAlign | int, vertical align | |
| paintBackground | bool, true if the item should paint the background |
| virtual int sptk::CListView::item_height | ( | uint32_t | index | ) | const [protected, virtual] |
Recomputes items height.
| index | uint32_t, row number |
| virtual void sptk::CListView::item_select | ( | uint32_t | index, | |
| bool | select | |||
| ) | [protected, virtual] |
Selects or deselects the item.
| index | uint32_t, item index | |
| select | bool, select or deselect |
| virtual bool sptk::CListView::item_selected | ( | uint32_t | index | ) | const [protected, virtual] |
Returns true if item is selected.
| index | uint32_t, item index |
| virtual int sptk::CListView::item_width | ( | uint32_t | index | ) | const [protected, virtual] |
Returns item width.
| index | uint32_t, row number |
| virtual CControlKind sptk::CListView::kind | ( | ) | const [inline, virtual] |
SPTK RTTI information.
Implements sptk::CControl.
References sptk::DCV_LISTBOX.
| virtual void sptk::CListView::load | ( | const CXmlNode * | node, | |
| CLayoutXMLmode | xmlMode | |||
| ) | [protected, virtual] |
Loads control data from XML.
Layout information may also include widget size and position, as well as visible() and active() states
| node | CXmlNode*, the XML node | |
| xmlMode | CLayoutXMLmode, the mode defining how the layout and/or data should be stored |
Reimplemented from sptk::CControl.
| void sptk::CListView::loadList | ( | const CXmlNode * | node | ) |
Fills the list with the data from XML node.
The XML node should contain the columns information, and optional list items
| node | const CXmlNode&, the node to load list from |
| virtual bool sptk::CListView::preferredSize | ( | int & | w, | |
| int & | h | |||
| ) | [virtual] |
Computes the optimal widgets size.
| w | int&, input - width offered by the program, output - width required by widget | |
| h | int&, input - height offered by the program, output - height required by widget |
Reimplemented from sptk::CLayoutClient.
| void sptk::CListView::redraw_line | ( | uint32_t | index | ) | [protected] |
Request to redraw line index.
| index | uint32_t, row number |
| void sptk::CListView::redrawRow | ( | uint32_t | index | ) | [inline] |
Requests to redraw just one row
| index | int, row number |
| virtual void sptk::CListView::removeRow | ( | uint32_t | index | ) | [virtual] |
Removes row.
| index | uint32_t, row number |
| void sptk::CListView::resize | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) | [virtual] |
Resizes the control and inside widgets.
| x | int, x-position | |
| y | int, y-position | |
| w | int, width | |
| h | int, height |
Reimplemented from sptk::CControl.
| CPackedStrings* sptk::CListView::row | ( | uint32_t | index | ) | const |
Returns row pointer
| index | int, row number |
| virtual void sptk::CListView::save | ( | CXmlNode * | node, | |
| CLayoutXMLmode | xmlMode | |||
| ) | const [protected, virtual] |
Saves control data to XML.
Layout information may also include widget size and position, as well as visible() and active() states
| node | CXmlNode*, the XML node | |
| xmlMode | CLayoutXMLmode, the mode defining how the layout and/or data should be stored |
Reimplemented from sptk::CControl.
| void sptk::CListView::saveList | ( | CXmlNode * | node | ) | const |
Saves the list data into XML node.
The XML node should contain the columns information, and optional list items
| node | const CXmlNode&, the node to save list into |
| static void sptk::CListView::scrollbar_width | ( | int | b | ) | [inline, static, protected] |
Changes the default scrollbar width for the class.
| b | int, new scrollbar width |
| bool sptk::CListView::select | ( | uint32_t | index, | |
| bool | sel = true, |
|||
| int | docallbacks = false | |||
| ) | [protected] |
Selects the row. Internal.
| index | int, row number | |
| sel | bool, true if select | |
| docallbacks | bool, true if we want to call callbacks |
| bool sptk::CListView::select_first | ( | ) | [protected] |
Selects the first row. Executes the callbacks. Internal.
| bool sptk::CListView::select_last | ( | ) | [protected] |
Selects the last row. Executes the callbacks. Internal.
| bool sptk::CListView::select_next | ( | ) | [protected] |
Selects the next row. Executes the callbacks. Internal.
| bool sptk::CListView::select_next_page | ( | ) | [protected] |
Selects the next page row. Executes the callbacks. Internal.
| bool sptk::CListView::select_only | ( | uint32_t | index, | |
| bool | docallbacks = false | |||
| ) | [protected] |
Selects the only row. Internal.
| index | int, row number | |
| docallbacks | bool, true if we want to call callbacks |
| bool sptk::CListView::select_prior | ( | ) | [protected] |
Selects the prior row. Executes the callbacks. Internal.
| bool sptk::CListView::select_prior_page | ( | ) | [protected] |
Selects the prior page row. Executes the callbacks. Internal.
| int sptk::CListView::selected | ( | int | index | ) | const |
Is row number index selected?
| index | int, row number |
| CPackedStrings& sptk::CListView::selectedRow | ( | ) | const |
Returns currently selected row, or the last selected row in case of multiple selection. Returns 0L reference if there is no selection.
| bool sptk::CListView::selectRow | ( | uint32_t | index, | |
| bool | sel = true | |||
| ) | [inline] |
Selects a row
| index | int, row number | |
| sel | bool, true if select |
| void sptk::CListView::show | ( | int | index | ) |
Switch the visibility flag for the row index
| index | int, row number |
| void sptk::CListView::sortAscending | ( | bool | ascending, | |
| bool | sortNow | |||
| ) |
Sets the sort direction - ascending/descending.
| ascending | bool, sort direction - ascending/descending | |
| sortNow | bool, true if you want to sort immediatedly |
| void sptk::CListView::sortColumn | ( | int | column, | |
| bool | sortNow | |||
| ) |
Sets the sort column.
| column | int, sort column number | |
| sortNow | bool, true if you want to sort immediatedly |
| void sptk::CListView::textValue | ( | std::string | text | ) |
Selects the row where cell in the sort column is tv
| text | CString, text to find and select |
| virtual void sptk::CListView::top | ( | int | index | ) | [virtual] |
Sets the scroll position.
| index | int, top row number |
| virtual void sptk::CListView::updateRow | ( | uint32_t | position, | |
| const CStrings & | row, | |||
| int | ident = 0 | |||
| ) | [virtual] |
Updates a row. Optional row argument may be defined inside row parameter.
| position | uint32_t, insert position | |
| row | const CStrings&, row data | |
| ident | int, row argument (key value) |
| virtual void sptk::CListView::updateRow | ( | uint32_t | position, | |
| CPackedStrings * | row | |||
| ) | [virtual] |
Updates a row.
Optional row ID may be defined inside row parameter.
| position | uint32_t, insert position | |
| row | CPackedStrings *, row data |
| int sptk::CListView::visible | ( | int | index | ) | const |
Is the row visible?
| index | int, row number |
CListViewDataMode sptk::CListView::m_dataMode [protected] |
Data mode Defines the kind of data to work through data() method.