Inheritance diagram for CEGUI::MultiColumnList:
Public Types | |
enum | SelectionMode { RowSingle, RowMultiple, CellSingle, CellMultiple, NominatedColumnSingle, NominatedColumnMultiple, ColumnSingle, ColumnMultiple, NominatedRowSingle, NominatedRowMultiple } |
Enumerated values for the selection modes possible with a Multi-column list. | |
Public Member Functions | |
bool | isUserSortControlEnabled (void) const |
Return whether user manipulation of the sort column and direction are enabled. | |
bool | isUserColumnSizingEnabled (void) const |
Return whether the user may size column segments. | |
bool | isUserColumnDraggingEnabled (void) const |
Return whether the user may modify the order of the columns. | |
uint | getColumnCount (void) const |
Return the number of columns in the multi-column list. | |
uint | getRowCount (void) const |
Return the number of rows in the multi-column list. | |
uint | getSortColumn (void) const |
Return the zero based index of the current sort column. There must be at least one column to successfully call this method. | |
uint | getColumnWithID (uint col_id) const |
Return the zero based column index of the column with the specified ID. | |
uint | getColumnWithHeaderText (const String &text) const |
Return the zero based index of the column whos header text matches the specified text. | |
float | getTotalColumnHeadersWidth (void) const |
Return the total width of all column headers. | |
float | getColumnHeaderWidth (uint col_idx) const |
Return the width of the specified column header (and therefore the column itself). | |
ListHeaderSegment::SortDirection | getSortDirection (void) const |
Return the currently set sort direction. | |
ListHeaderSegment & | getHeaderSegmentForColumn (uint col_idx) const |
Return the ListHeaderSegment object for the specified column. | |
uint | getItemRowIndex (const ListboxItem *item) const |
Return the zero based index of the Row that contains item. | |
uint | getItemColumnIndex (const ListboxItem *item) const |
Return the current zero based index of the column that contains item. | |
MCLGridRef | getItemGridReference (const ListboxItem *item) const |
Return the grid reference for item. | |
ListboxItem * | getItemAtGridReference (const MCLGridRef &grid_ref) const |
Return a pointer to the ListboxItem at the specified grid reference. | |
bool | isListboxItemInColumn (const ListboxItem *item, uint col_idx) const |
return whether ListboxItem item is attached to the column at index col_idx. | |
bool | isListboxItemInRow (const ListboxItem *item, uint row_idx) const |
return whether ListboxItem item is attached to the row at index row_idx. | |
bool | isListboxItemInList (const ListboxItem *item) const |
return whether ListboxItem item is attached to the list box. | |
ListboxItem * | findColumnItemWithText (const String &text, uint col_idx, const ListboxItem *start_item) const |
Return the ListboxItem in column col_idx that has the text string text. | |
ListboxItem * | findRowItemWithText (const String &text, uint row_idx, const ListboxItem *start_item) const |
Return the ListboxItem in row row_idx that has the text string text. | |
ListboxItem * | findListItemWithText (const String &text, const ListboxItem *start_item) const |
Return the ListboxItem that has the text string text. | |
ListboxItem * | getFirstSelectedItem (void) const |
Return a pointer to the first selected ListboxItem attached to this list box. | |
ListboxItem * | getNextSelected (const ListboxItem *start_item) const |
Return a pointer to the next selected ListboxItem after start_item. | |
uint | getSelectedCount (void) const |
Return the number of selected ListboxItems attached to this list box. | |
bool | isItemSelected (const MCLGridRef &grid_ref) const |
Return whether the ListboxItem at grid_ref is selected. | |
uint | getNominatedSelectionColumnID (void) const |
Return the ID of the currently set nominated selection column to be used when in one of the NominatedColumn* selection modes. | |
uint | getNominatedSelectionColumn (void) const |
Return the index of the currently set nominated selection column to be used when in one of the NominatedColumn* selection modes. | |
uint | getNominatedSelectionRow (void) const |
Return the index of the currently set nominated selection row to be used when in one of the NominatedRow* selection modes. | |
MultiColumnList::SelectionMode | getSelectionMode (void) const |
Return the currently set selection mode. | |
bool | isVertScrollbarAlwaysShown (void) const |
Return whether the vertical scroll bar is always shown. | |
bool | isHorzScrollbarAlwaysShown (void) const |
Return whether the horizontal scroll bar is always shown. | |
uint | getColumnID (uint col_idx) const |
Return the ID code assigned to the requested column. | |
uint | getRowID (uint row_idx) const |
Return the ID code assigned to the requested row. | |
uint | getRowWithID (uint row_id) const |
Return the zero based row index of the row with the specified ID. | |
virtual void | initialise (void) |
Initialise the Window based object ready for use. | |
void | resetList (void) |
Remove all items from the list. | |
void | addColumn (const String &text, uint col_id, float width) |
Add a column to the list box. | |
void | insertColumn (const String &text, uint col_id, float width, uint position) |
Insert a new column in the list. | |
void | removeColumn (uint col_idx) |
Removes a column from the list box. This will cause any ListboxItem using the autoDelete option in the column to be deleted. | |
void | removeColumnWithID (uint col_id) |
Removes a column from the list box. This will cause any ListboxItem using the autoDelete option in the column to be deleted. | |
void | moveColumn (uint col_idx, uint position) |
Move the column at index col_idx so it is at index position. | |
void | moveColumnWithID (uint col_id, uint position) |
Move the column with ID col_id so it is at index position. | |
uint | addRow (uint row_id=0) |
Add an empty row to the list box. | |
uint | addRow (ListboxItem *item, uint col_id, uint row_id=0) |
Add a row to the list box, and set the item in the column with ID col_id to item. | |
uint | insertRow (uint row_idx, uint row_id=0) |
Insert an empty row into the list box. | |
uint | insertRow (ListboxItem *item, uint col_id, uint row_idx, uint row_id=0) |
Insert a row into the list box, and set the item in the column with ID col_id to item. | |
void | removeRow (uint row_idx) |
Remove the list box row with index row_idx. Any ListboxItem in row row_idx using autoDelete mode will be deleted. | |
void | setItem (ListboxItem *item, const MCLGridRef &position) |
Set the ListboxItem for grid reference position. | |
void | setItem (ListboxItem *item, uint col_id, uint row_idx) |
Set the ListboxItem for the column with ID col_id in row row_idx. | |
void | setSelectionMode (MultiColumnList::SelectionMode sel_mode) |
Set the selection mode for the list box. | |
void | setNominatedSelectionColumnID (uint col_id) |
Set the column to be used for the NominatedColumn* selection modes. | |
void | setNominatedSelectionColumn (uint col_idx) |
Set the column to be used for the NominatedColumn* selection modes. | |
void | setNominatedSelectionRow (uint row_idx) |
Set the row to be used for the NominatedRow* selection modes. | |
void | setSortDirection (ListHeaderSegment::SortDirection direction) |
Set the sort direction to be used. | |
void | setSortColumn (uint col_idx) |
Set the column to be used as the sort key. | |
void | setSortColumnByID (uint col_id) |
Set the column to be used as the sort key. | |
void | setShowVertScrollbar (bool setting) |
Set whether the vertical scroll bar should always be shown, or just when needed. | |
void | setShowHorzScrollbar (bool setting) |
Set whether the horizontal scroll bar should always be shown, or just when needed. | |
void | clearAllSelections (void) |
Removed the selected state from any currently selected ListboxItem attached to the list. | |
void | setItemSelectState (ListboxItem *item, bool state) |
Sets or clears the selected state of the given ListboxItem which must be attached to the list. | |
void | setItemSelectState (const MCLGridRef &grid_ref, bool state) |
Sets or clears the selected state of the ListboxItem at the given grid reference. | |
void | handleUpdatedItemData (void) |
Inform the list box that one or more attached ListboxItems have been externally modified, and the list should re-sync its internal state and refresh the display as needed. | |
void | setColumnHeaderWidth (uint col_idx, float width) |
Set the width of the specified column header (and therefore the column itself). | |
void | setUserSortControlEnabled (bool setting) |
Set whether user manipulation of the sort column and direction are enabled. | |
void | setUserColumnSizingEnabled (bool setting) |
Set whether the user may size column segments. | |
void | setUserColumnDraggingEnabled (bool setting) |
Set whether the user may modify the order of the columns. | |
void | autoSizeColumnHeader (uint col_idx) |
Automatically determines the "best fit" size for the specified column and sets the column width to the same. | |
void | setRowID (uint row_idx, uint row_id) |
Set the ID code assigned to a given row. | |
MultiColumnList (const String &type, const String &name) | |
Constructor for the Multi-column list base class. | |
virtual | ~MultiColumnList (void) |
Destructor for the multi-column list base class. | |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | EventSelectionModeChanged |
Event fired when the selection mode for the list box changes. | |
static const String | EventNominatedSelectColumnChanged |
Event fired when the nominated select column changes. | |
static const String | EventNominatedSelectRowChanged |
Event fired when the nominated select row changes. | |
static const String | EventVertScrollbarModeChanged |
Event fired when the vertical scroll bar 'force' setting changes. | |
static const String | EventHorzScrollbarModeChanged |
Event fired when the horizontal scroll bar 'force' setting changes. | |
static const String | EventSelectionChanged |
Event fired when the current selection(s) within the list box changes. | |
static const String | EventListContentsChanged |
Event fired when the contents of the list box changes. | |
static const String | EventSortColumnChanged |
Event fired when the sort column changes. | |
static const String | EventSortDirectionChanged |
Event fired when the sort direction changes. | |
static const String | EventListColumnSized |
Event fired when the width of a column in the list changes. | |
static const String | EventListColumnMoved |
Event fired when the column order changes. | |
Protected Types | |
typedef std::vector< ListRow > | ListItemGrid |
Protected Member Functions | |
virtual Rect | getListRenderArea (void) const =0 |
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering list items. | |
virtual ListHeader * | createListHeader (const String &name) const =0 |
create and return a pointer to a ListHeaer widget for use as the column headers. | |
virtual Scrollbar * | createVertScrollbar (const String &name) const =0 |
create and return a pointer to a Scrollbar widget for use as vertical scroll bar | |
virtual Scrollbar * | createHorzScrollbar (const String &name) const =0 |
create and return a pointer to a Scrollbar widget for use as horizontal scroll bar | |
virtual void | cacheListboxBaseImagery ()=0 |
Perform rendering of the widget control frame and other 'static' areas. This method should not render the actual items. Note that the items are typically rendered to layer 3, other layers can be used for rendering imagery behind and infront of the items. | |
void | addMultiColumnListboxEvents (void) |
Add multi column list box specific events. | |
virtual void | populateRenderCache () |
Update the rendering cache. | |
void | configureScrollbars (void) |
display required integrated scroll bars according to current state of the list box and update their values. | |
bool | selectRange (const MCLGridRef &start, const MCLGridRef &end) |
select all strings between positions start and end. (inclusive). Returns true if something was modified. | |
float | getTotalRowsHeight (void) const |
Return the sum of all row heights. | |
float | getWidestColumnItemWidth (uint col_idx) const |
Return the width of the widest item in the given column. | |
float | getHighestRowItemHeight (uint row_idx) const |
Return the height of the highest item in the given row. | |
bool | clearAllSelections_impl (void) |
Clear the selected state for all items (implementation). | |
ListboxItem * | getItemAtPoint (const Point &pt) const |
Return the ListboxItem under the given window local pixel co-ordinate. | |
bool | setItemSelectState_impl (const MCLGridRef grid_ref, bool state) |
Set select state for the given item. This appropriately selects other items depending upon the select mode. Returns true if something is changed, else false. | |
void | setSelectForItemsInRow (uint row_idx, bool state) |
Set select state for all items in the given row. | |
void | setSelectForItemsInColumn (uint col_idx, bool state) |
Set select state for all items in the given column. | |
void | moveColumn_impl (uint col_idx, uint position) |
Move the column at index col_idx so it is at index position. Implementation version which does not move the header segment (since that may have already happened). | |
bool | resetList_impl (void) |
Remove all items from the list. | |
virtual bool | testClassName_impl (const String &class_name) const |
Return whether this window was inherited from the given class name at some point in the inheritance heirarchy. | |
int | writePropertiesXML (OutStream &out_stream) const |
virtual void | onSelectionModeChanged (WindowEventArgs &e) |
Handler called when the selection mode of the list box changes. | |
virtual void | onNominatedSelectColumnChanged (WindowEventArgs &e) |
Handler called when the nominated selection column changes. | |
virtual void | onNominatedSelectRowChanged (WindowEventArgs &e) |
Handler called when the nominated selection row changes. | |
virtual void | onVertScrollbarModeChanged (WindowEventArgs &e) |
Handler called when the vertical scroll bar 'force' mode is changed. | |
virtual void | onHorzScrollbarModeChanged (WindowEventArgs &e) |
Handler called when the horizontal scroll bar 'force' mode is changed. | |
virtual void | onSelectionChanged (WindowEventArgs &e) |
Handler called when the current selection changes. | |
virtual void | onListContentsChanged (WindowEventArgs &e) |
Handler called when the list contents is changed. | |
virtual void | onSortColumnChanged (WindowEventArgs &e) |
Handler called when the sort column changes. | |
virtual void | onSortDirectionChanged (WindowEventArgs &e) |
Handler called when the sort direction changes. | |
virtual void | onListColumnSized (WindowEventArgs &e) |
Handler called when a column is sized. | |
virtual void | onListColumnMoved (WindowEventArgs &e) |
Handler called when the column order is changed. | |
virtual void | onSized (WindowEventArgs &e) |
Handler called when the window's size changes. | |
virtual void | onMouseButtonDown (MouseEventArgs &e) |
Handler called when a mouse button has been depressed within this window's area. | |
virtual void | onMouseWheel (MouseEventArgs &e) |
Handler called when the mouse wheel (z-axis) position changes within this window's area. | |
bool | handleHeaderScroll (const EventArgs &e) |
bool | handleHeaderSegMove (const EventArgs &e) |
bool | handleColumnSizeChange (const EventArgs &e) |
bool | handleHorzScrollbar (const EventArgs &e) |
bool | handleVertScrollbar (const EventArgs &e) |
bool | handleSortColumnChange (const EventArgs &e) |
bool | handleSortDirectionChange (const EventArgs &e) |
bool | handleHeaderSegDblClick (const EventArgs &e) |
Static Protected Member Functions | |
static bool | pred_descend (const ListRow &a, const ListRow &b) |
std algorithm predicate used for sorting in descending order | |
Protected Attributes | |
Scrollbar * | d_vertScrollbar |
vertical scroll-bar widget | |
Scrollbar * | d_horzScrollbar |
horizontal scroll-bar widget | |
ListHeader * | d_header |
The ListHeader attached to this multi-column list. | |
bool | d_forceVertScroll |
true if vertical scrollbar should always be displayed | |
bool | d_forceHorzScroll |
true if horizontal scrollbar should always be displayed | |
SelectionMode | d_selectMode |
Holds selection mode (represented by settings below). | |
uint | d_nominatedSelectCol |
Nominated column for single column selection. | |
uint | d_nominatedSelectRow |
Nominated row for single row selection. | |
bool | d_multiSelect |
Allow multiple selections. | |
bool | d_fullRowSelect |
All items in a row are selected. | |
bool | d_fullColSelect |
All items in a column are selected. | |
bool | d_useNominatedRow |
true if we use a nominated row to select. | |
bool | d_useNominatedCol |
true if we use a nominated col to select. | |
ListboxItem * | d_lastSelected |
holds pointer to the last selected item (used in range selections) | |
ListItemGrid | d_grid |
Holds the list box data. | |
Classes | |
struct | ListRow |
Struct used internally to represent a row in the list and also to ease sorting of the rows. More... |
|
Add a column to the list box.
|
|
Add a row to the list box, and set the item in the column with ID col_id to item.
|
|
Add an empty row to the list box.
|
|
Automatically determines the "best fit" size for the specified column and sets the column width to the same.
|
|
Perform rendering of the widget control frame and other 'static' areas. This method should not render the actual items. Note that the items are typically rendered to layer 3, other layers can be used for rendering imagery behind and infront of the items.
|
|
Removed the selected state from any currently selected ListboxItem attached to the list.
|
|
Clear the selected state for all items (implementation).
|
|
create and return a pointer to a Scrollbar widget for use as horizontal scroll bar
|
|
create and return a pointer to a ListHeaer widget for use as the column headers.
|
|
create and return a pointer to a Scrollbar widget for use as vertical scroll bar
|
|
Return the ListboxItem in column col_idx that has the text string text.
|
|
Return the ListboxItem that has the text string text.
|
|
Return the ListboxItem in row row_idx that has the text string text.
|
|
Return the number of columns in the multi-column list.
|
|
Return the width of the specified column header (and therefore the column itself).
|
|
Return the ID code assigned to the requested column.
|
|
Return the zero based index of the column whos header text matches the specified text.
|
|
Return the zero based column index of the column with the specified ID.
|
|
Return a pointer to the first selected ListboxItem attached to this list box.
|
|
Return the ListHeaderSegment object for the specified column.
|
|
Return a pointer to the ListboxItem at the specified grid reference.
|
|
Return the ListboxItem under the given window local pixel co-ordinate.
|
|
Return the current zero based index of the column that contains item.
|
|
Return the grid reference for item.
|
|
Return the zero based index of the Row that contains item.
|
|
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering list items.
|
|
Return a pointer to the next selected ListboxItem after start_item.
|
|
Return the index of the currently set nominated selection column to be used when in one of the NominatedColumn* selection modes.
|
|
Return the ID of the currently set nominated selection column to be used when in one of the NominatedColumn* selection modes.
|
|
Return the index of the currently set nominated selection row to be used when in one of the NominatedRow* selection modes.
|
|
Return the number of rows in the multi-column list.
|
|
Return the ID code assigned to the requested row.
|
|
Return the zero based row index of the row with the specified ID.
|
|
Return the number of selected ListboxItems attached to this list box. return uint value equal to the number of ListboxItems attached to this list box that are currently selected. |
|
Return the currently set selection mode.
|
|
Return the zero based index of the current sort column. There must be at least one column to successfully call this method.
|
|
Return the currently set sort direction.
|
|
Return the total width of all column headers.
|
|
Inform the list box that one or more attached ListboxItems have been externally modified, and the list should re-sync its internal state and refresh the display as needed.
|
|
Initialise the Window based object ready for use.
Reimplemented from CEGUI::Window. |
|
Insert a new column in the list.
|
|
Insert a row into the list box, and set the item in the column with ID col_id to item.
|
|
Insert an empty row into the list box.
|
|
Return whether the horizontal scroll bar is always shown.
|
|
Return whether the ListboxItem at grid_ref is selected.
|
|
return whether ListboxItem item is attached to the column at index col_idx.
|
|
return whether ListboxItem item is attached to the list box.
|
|
return whether ListboxItem item is attached to the row at index row_idx.
|
|
Return whether the user may modify the order of the columns.
|
|
Return whether the user may size column segments.
|
|
Return whether user manipulation of the sort column and direction are enabled.
|
|
Return whether the vertical scroll bar is always shown.
|
|
Move the column at index col_idx so it is at index position.
|
|
Move the column at index col_idx so it is at index position. Implementation version which does not move the header segment (since that may have already happened).
|
|
Move the column with ID col_id so it is at index position.
|
|
Handler called when a mouse button has been depressed within this window's area.
Reimplemented from CEGUI::Window. |
|
Handler called when the mouse wheel (z-axis) position changes within this window's area.
Reimplemented from CEGUI::Window. |
|
Handler called when the window's size changes.
Reimplemented from CEGUI::Window. |
|
Update the rendering cache. Populates the Window's RenderCache with imagery to be sent to the renderer. Reimplemented from CEGUI::Window. |
|
Removes a column from the list box. This will cause any ListboxItem using the autoDelete option in the column to be deleted.
|
|
Removes a column from the list box. This will cause any ListboxItem using the autoDelete option in the column to be deleted.
|
|
Remove the list box row with index row_idx. Any ListboxItem in row row_idx using autoDelete mode will be deleted.
|
|
Remove all items from the list. Note that this will cause 'AutoDelete' items to be deleted. |
|
Remove all items from the list.
|
|
Set the width of the specified column header (and therefore the column itself).
|
|
Set the ListboxItem for the column with ID col_id in row row_idx.
|
|
Set the ListboxItem for grid reference position.
|
|
Sets or clears the selected state of the ListboxItem at the given grid reference.
|
|
Sets or clears the selected state of the given ListboxItem which must be attached to the list.
|
|
Set the column to be used for the NominatedColumn* selection modes.
|
|
Set the column to be used for the NominatedColumn* selection modes.
|
|
Set the row to be used for the NominatedRow* selection modes.
|
|
Set the ID code assigned to a given row.
|
|
Set the selection mode for the list box.
|
|
Set whether the horizontal scroll bar should always be shown, or just when needed.
|
|
Set whether the vertical scroll bar should always be shown, or just when needed.
|
|
Set the column to be used as the sort key.
|
|
Set the column to be used as the sort key.
|
|
Set the sort direction to be used.
|
|
Set whether the user may modify the order of the columns.
|
|
Set whether the user may size column segments.
|
|
Set whether user manipulation of the sort column and direction are enabled.
|
|
Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
Reimplemented from CEGUI::Window. |