Inheritance diagram for CEGUI::Listbox:
Public Member Functions | |
size_t | getItemCount (void) const |
Return number of items attached to the list box. | |
size_t | getSelectedCount (void) const |
Return the number of selected items in the list box. | |
ListboxItem * | getFirstSelectedItem (void) const |
Return a pointer to the first selected item. | |
ListboxItem * | getNextSelected (const ListboxItem *start_item) const |
Return a pointer to the next selected item after item start_item. | |
ListboxItem * | getListboxItemFromIndex (size_t index) const |
Return the item at index position index. | |
size_t | getItemIndex (const ListboxItem *item) const |
Return the index of ListboxItem item. | |
bool | isSortEnabled (void) const |
return whether list sorting is enabled | |
bool | isMultiselectEnabled (void) const |
return whether multi-select is enabled | |
bool | isItemTooltipsEnabled (void) const |
bool | isItemSelected (size_t index) const |
return whether the string at index position index is selected | |
ListboxItem * | findItemWithText (const String &text, const ListboxItem *start_item) |
Search the list for an item with the specified text. | |
bool | isListboxItemInList (const ListboxItem *item) const |
Return whether the specified ListboxItem is in the List. | |
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. | |
virtual void | initialise (void) |
Initialise the Window based object ready for use. | |
void | resetList (void) |
Remove all items from the list. | |
void | addItem (ListboxItem *item) |
Add the given ListboxItem to the list. | |
void | insertItem (ListboxItem *item, const ListboxItem *position) |
Insert an item into the list box after a specified item already in the list. | |
void | removeItem (const ListboxItem *item) |
Removes the given item from the list box. If the item is has the auto delete state set, the item will be deleted. | |
void | clearAllSelections (void) |
Clear the selected state for all items. | |
void | setSortingEnabled (bool setting) |
Set whether the list should be sorted. | |
void | setMultiselectEnabled (bool setting) |
Set whether the list should allow multiple selections or just a single selection. | |
void | setShowVertScrollbar (bool setting) |
Set whether the vertical scroll bar should always be shown. | |
void | setShowHorzScrollbar (bool setting) |
Set whether the horizontal scroll bar should always be shown. | |
void | setItemTooltipsEnabled (bool setting) |
void | setItemSelectState (ListboxItem *item, bool state) |
Set the select state of an attached ListboxItem. | |
void | setItemSelectState (size_t item_index, bool state) |
Set the select state of an attached ListboxItem. | |
void | handleUpdatedItemData (void) |
Causes the list box to update it's internal state after changes have been made to one or more attached ListboxItem objects. | |
void | ensureItemIsVisible (size_t item_index) |
Ensure the item at the specified index is visible within the list box. | |
void | ensureItemIsVisible (const ListboxItem *item) |
Ensure the item at the specified index is visible within the list box. | |
Listbox (const String &type, const String &name) | |
Constructor for Listbox base class. | |
virtual | ~Listbox (void) |
Destructor for Listbox base class. | |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | EventListContentsChanged |
Event triggered when the contents of the list is changed. | |
static const String | EventSelectionChanged |
Event triggered when there is a change to the currently selected item(s). | |
static const String | EventSortModeChanged |
Event triggered when the sort mode setting changes. | |
static const String | EventMultiselectModeChanged |
Event triggered when the multi-select mode setting changes. | |
static const String | EventVertScrollbarModeChanged |
Event triggered when the vertical scroll bar 'force' setting changes. | |
static const String | EventHorzScrollbarModeChanged |
Event triggered when the horizontal scroll bar 'force' setting changes. | |
Protected Types | |
typedef std::vector< ListboxItem * > | LBItemList |
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 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 caching 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 | addListboxEvents (void) |
Add list box specific events. | |
void | configureScrollbars (void) |
display required integrated scroll bars according to current state of the list box and update their values. | |
void | selectRange (size_t start, size_t end) |
select all strings between positions start and end. (inclusive) including end. | |
float | getTotalItemsHeight (void) const |
Return the sum of all item heights. | |
float | getWidestItemWidth (void) const |
Return the width of the widest item. | |
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 | 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. | |
bool | handle_scrollChange (const EventArgs &args) |
Internal handler that is triggered when the user interacts with the scrollbars. | |
void | populateRenderCache () |
Update the rendering cache. | |
virtual void | onListContentsChanged (WindowEventArgs &e) |
Handler called internally when the list contents are changed. | |
virtual void | onSelectionChanged (WindowEventArgs &e) |
Handler called internally when the currently selected item or items changes. | |
virtual void | onSortModeChanged (WindowEventArgs &e) |
Handler called internally when the sort mode setting changes. | |
virtual void | onMultiselectModeChanged (WindowEventArgs &e) |
Handler called internally when the multi-select mode setting changes. | |
virtual void | onVertScrollbarModeChanged (WindowEventArgs &e) |
Handler called internally when the forced display of the vertical scroll bar setting changes. | |
virtual void | onHorzScrollbarModeChanged (WindowEventArgs &e) |
Handler called internally when the forced display of the horizontal scroll bar setting changes. | |
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. | |
virtual void | onMouseMove (MouseEventArgs &e) |
Handler called when the mouse cursor has been moved within this window's area. | |
Protected Attributes | |
bool | d_sorted |
true if list is sorted | |
bool | d_multiselect |
true if multi-select is enabled | |
bool | d_forceVertScroll |
true if vertical scrollbar should always be displayed | |
bool | d_forceHorzScroll |
true if horizontal scrollbar should always be displayed | |
bool | d_itemTooltips |
true if each item should have an individual tooltip | |
Scrollbar * | d_vertScrollbar |
vertical scroll-bar widget | |
Scrollbar * | d_horzScrollbar |
horizontal scroll-bar widget | |
LBItemList | d_listItems |
list of items in the list box. | |
ListboxItem * | d_lastSelected |
holds pointer to the last selected item (used in range selections) |
|
Add the given ListboxItem to the list.
|
|
Perform caching 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.
|
|
Clear the selected state for all items.
|
|
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 Scrollbar widget for use as vertical scroll bar
|
|
Ensure the item at the specified index is visible within the list box.
|
|
Ensure the item at the specified index is visible within the list box.
|
|
Search the list for an item with the specified text.
|
|
Return a pointer to the first selected item.
|
|
Return the ListboxItem under the given window local pixel co-ordinate.
|
|
Return number of items attached to the list box.
|
|
Return the index of ListboxItem item.
|
|
Return the item at index position index.
|
|
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 item after item start_item.
|
|
Return the number of selected items in the list box.
|
|
Causes the list box to update it's internal state after changes have been made to one or more attached ListboxItem objects. Client code must call this whenever it has made any changes to ListboxItem objects already attached to the list box. If you are just adding items, or removed items to update them prior to re-adding them, there is no need to call this method.
|
|
Initialise the Window based object ready for use.
Reimplemented from CEGUI::Window. Reimplemented in CEGUI::ComboDropList. |
|
Insert an item into the list box after a specified item already in the list. Note that if the list is sorted, the item may not end up in the requested position.
|
|
Return whether the horizontal scroll bar is always shown.
|
|
return whether the string at index position index is selected
|
|
Return whether the specified ListboxItem is in the List.
|
|
return whether multi-select is enabled
|
|
return whether list sorting is enabled
|
|
Return whether the vertical scroll bar is always shown.
|
|
Handler called when a mouse button has been depressed within this window's area.
Reimplemented from CEGUI::Window. Reimplemented in CEGUI::ComboDropList. |
|
Handler called when the mouse cursor has been moved within this window's area.
Reimplemented from CEGUI::Window. Reimplemented in CEGUI::ComboDropList. |
|
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 the given item from the list box. If the item is has the auto delete state set, the item 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 select state of an attached ListboxItem. This is the recommended way of selecting and deselecting items attached to a list box as it respects the multi-select mode setting. It is possible to modify the setting on ListboxItems directly, but that approach does not respect the settings of the list box.
|
|
Set the select state of an attached ListboxItem. This is the recommended way of selecting and deselecting items attached to a list box as it respects the multi-select mode setting. It is possible to modify the setting on ListboxItems directly, but that approach does not respect the settings of the list box.
|
|
Set whether the list should allow multiple selections or just a single selection.
|
|
Set whether the horizontal scroll bar should always be shown.
|
|
Set whether the vertical scroll bar should always be shown.
|
|
Set whether the list should be sorted.
|
|
Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
Reimplemented from CEGUI::Window. Reimplemented in CEGUI::ComboDropList. |