|
Crazy Eddie's GUI System
0.8.4
|
ItemListbox window class. More...
Inheritance diagram for CEGUI::ItemListbox:
Collaboration diagram for CEGUI::ItemListbox:Public Member Functions | |
| size_t | getSelectedCount (void) const |
| Returns the number of selected items in this ItemListbox. | |
| ItemEntry * | getLastSelectedItem (void) const |
| Returns a pointer to the last selected item. | |
| ItemEntry * | getFirstSelectedItem (size_t start_index=0) const |
| Returns a pointer to the first selected item. | |
| ItemEntry * | getNextSelectedItem (void) const |
| Returns a pointer to the next seleced item relative to a previous call to getFirstSelectedItem or getNextSelectedItem. | |
| ItemEntry * | getNextSelectedItemAfter (const ItemEntry *start_item) const |
| Returns a pointer to the next selected item after the item 'start_item' given. | |
| bool | isMultiSelectEnabled (void) const |
| Returns 'true' if multiple selections are allowed. 'false' if not. | |
| bool | isItemSelected (size_t index) const |
| Returns 'true' if the item at the given index is selectable and currently selected. | |
| void | setMultiSelectEnabled (bool state) |
| Set whether or not multiple selections should be allowed. | |
| void | clearAllSelections (void) |
| Clears all selections. | |
| void | selectRange (size_t a, size_t z) |
| Select a range of items. | |
| void | selectAllItems (void) |
| Select all items. Does nothing if multiselect is disabled. | |
| ItemListbox (const String &type, const String &name) | |
| Constructor for the ItemListbox base class constructor. | |
| virtual | ~ItemListbox (void) |
| Destructor for the ItemListbox base class. | |
| virtual void | layoutItemWidgets () |
| Setup size and position for the item widgets attached to this ItemListbox. | |
| virtual Sizef | getContentSize () const |
| Returns the Size in unclipped pixels of the content attached to this ItemListbox. | |
| virtual void | notifyItemClicked (ItemEntry *li) |
| Notify this ItemListbox that the given ListItem was just clicked. Internal function - not to be used from client code. | |
| virtual void | notifyItemSelectState (ItemEntry *li, bool state) |
| Notify this ItemListbox that the given ListItem just changed selection state. Internal function - not to be used from client code. | |
Static Public Attributes | |
| static const String | EventNamespace |
| Namespace for global events. | |
| static const String | WidgetTypeName |
| Window factory name. | |
| static const String | EventSelectionChanged |
| static const String | EventMultiSelectModeChanged |
Protected Member Functions | |
| ItemEntry * | findSelectedItem (size_t start_index) const |
| Returns a pointer to the first selected item starting the search from start_index. | |
| bool | handle_PaneChildRemoved (const EventArgs &e) |
| Handler to manage items being removed from the content pane. If there is one! | |
| virtual void | onSelectionChanged (WindowEventArgs &e) |
| virtual void | onMultiSelectModeChanged (WindowEventArgs &e) |
| virtual void | onKeyDown (KeyEventArgs &e) |
| Handler called when a key as been depressed while this window has input focus. | |
Protected Attributes | |
| bool | d_multiSelect |
| ItemEntry * | d_lastSelected |
| Controls whether multiple items can be selected simultaneously. | |
| size_t | d_nextSelectionIndex |
| The last item that was selected. | |
ItemListbox window class.
| ItemEntry* CEGUI::ItemListbox::findSelectedItem | ( | size_t | start_index | ) | const [protected] |
Returns a pointer to the first selected item starting the search from start_index.
| start_index | The index where the search should begin (inclusive) |
| ItemEntry* CEGUI::ItemListbox::getFirstSelectedItem | ( | size_t | start_index = 0 | ) | const |
Returns a pointer to the first selected item.
| start_index | The index where the search should begin. If omitted the search will begin with the first item. |
| ItemEntry* CEGUI::ItemListbox::getLastSelectedItem | ( | void | ) | const [inline] |
Returns a pointer to the last selected item.
| ItemEntry* CEGUI::ItemListbox::getNextSelectedItem | ( | void | ) | const |
Returns a pointer to the next seleced item relative to a previous call to getFirstSelectedItem or getNextSelectedItem.
This member function should be preferred over getNextSelectedItemAfter as it will perform better, especially on large lists.
| ItemEntry* CEGUI::ItemListbox::getNextSelectedItemAfter | ( | const ItemEntry * | start_item | ) | const |
Returns a pointer to the next selected item after the item 'start_item' given.
| bool CEGUI::ItemListbox::handle_PaneChildRemoved | ( | const EventArgs & | e | ) | [protected, virtual] |
Handler to manage items being removed from the content pane. If there is one!
Reimplemented from CEGUI::ItemListBase.
| virtual void CEGUI::ItemListbox::onKeyDown | ( | KeyEventArgs & | e | ) | [protected, virtual] |
Handler called when a key as been depressed while this window has input focus.
| e | KeyEventArgs object whose 'scancode' field is set to the Key::Scan value representing the key that was pressed, and whose 'sysKeys' field represents the combination of SystemKey that were active when the event was generated. |
Reimplemented from CEGUI::Window.
| void CEGUI::ItemListbox::selectRange | ( | size_t | a, |
| size_t | z | ||
| ) |
Select a range of items.
| a | Start item. (inclusive) |
| z | End item. (inclusive) |
const String CEGUI::ItemListbox::EventMultiSelectModeChanged [static] |
Event fired when the multiselect mode of the list box is changed. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ItemListbox whose multiselect mode has been changed.
const String CEGUI::ItemListbox::EventSelectionChanged [static] |
Event fired when the list selection changes. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ItemListbox whose current selection has been changed.