DigitalSpaces::DICEGUIItemListbox Struct Reference
[CEGUI]

#include <CEGUIInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

unsigned long getSelectedCount ()
 Returns the number of selected items in this ItemListbox.
DICEGUIItemEntrygetLastSelectedItem ()
 Returns a pointer to the last selected item.
DICEGUIItemEntrygetFirstSelectedItem ()
 Returns a pointer to the first selected item.
DICEGUIItemEntrygetFirstSelectedItem (unsigned long start_index)
DICEGUIItemEntrygetNextSelectedItem ()
 Returns a pointer to the next seleced item relative to a previous call to getFirstSelectedItem or getNextSelectedItem.
DICEGUIItemEntrygetNextSelectedItemAfter (DICEGUIItemEntry *start_item)
 Returns a pointer to the next selected item after the item 'start_item' given.
bool isMultiSelectEnabled ()
 Returns 'true' if multiple selections are allowed. 'false' if not.
bool isItemSelected (unsigned long index)
 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 ()
 Clears all selections.
void selectRange (unsigned long a, unsigned long z)
 Select a range of items.
void selectAllItems ()
 Select all items. Does nothing if multiselect is disabled.

Member Function Documentation

unsigned long DigitalSpaces::DICEGUIItemListbox::getSelectedCount (  ) 

Returns the number of selected items in this ItemListbox.

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListbox::getLastSelectedItem (  ) 

Returns a pointer to the last selected item.

Returns:
A pointer to the last selected item, 0 is none.

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListbox::getFirstSelectedItem (  ) 

Returns a pointer to the first selected item.

Parameters:
start_index The index where the search should begin. If omitted the search will begin with the first item.
Returns:
A pointer to the first selected item in the listbox. If no item is selected the return value is 0. If start_index is out of bounds the return value is 0.
Note:
If multiselect is disabled then this does the equivalent of calling getLastSelectedItem. If multiselect is enabled it will search the array starting at start_index

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListbox::getFirstSelectedItem ( unsigned long  start_index  ) 

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListbox::getNextSelectedItem (  ) 

Returns a pointer to the next seleced item relative to a previous call to getFirstSelectedItem or getNextSelectedItem.

Returns:
A pointer to the next seleced item. If there are no further selected items the return value is 0. If multiselect is disabled the return value is 0.
Note:
This member function will take on from where the last call to getFirstSelectedItem or getNextSelectedItem returned. So be sure to start with a call to getFirstSelectedItem.
This member function should be preferred over getNextSelectedItemAfter as it will perform better, especially on large lists.

DICEGUIItemEntry* DigitalSpaces::DICEGUIItemListbox::getNextSelectedItemAfter ( DICEGUIItemEntry start_item  ) 

Returns a pointer to the next selected item after the item 'start_item' given.

Note:
This member function will search the array from the beginning and will be slow for large lists, it will not advance the internal counter used by getFirstSelectedItem and getNextSelectedItem either.

bool DigitalSpaces::DICEGUIItemListbox::isMultiSelectEnabled (  ) 

Returns 'true' if multiple selections are allowed. 'false' if not.

bool DigitalSpaces::DICEGUIItemListbox::isItemSelected ( unsigned long  index  ) 

Returns 'true' if the item at the given index is selectable and currently selected.

void DigitalSpaces::DICEGUIItemListbox::setMultiSelectEnabled ( bool  state  ) 

Set whether or not multiple selections should be allowed.

void DigitalSpaces::DICEGUIItemListbox::clearAllSelections (  ) 

Clears all selections.

void DigitalSpaces::DICEGUIItemListbox::selectRange ( unsigned long  a,
unsigned long  z 
)

Select a range of items.

Parameters:
a Start item. (inclusive)
z End item. (inclusive)

void DigitalSpaces::DICEGUIItemListbox::selectAllItems (  ) 

Select all items. Does nothing if multiselect is disabled.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:30 2008 for Digital Spaces by  doxygen 1.5.6