Crazy Eddie's GUI System  0.8.4
CEGUI::ItemEntry Class Reference

Base class for item type widgets. More...

+ Inheritance diagram for CEGUI::ItemEntry:
+ Collaboration diagram for CEGUI::ItemEntry:

List of all members.

Public Member Functions

Sizef getItemPixelSize (void) const
 Return the "optimal" size for the item.
ItemListBasegetOwnerList (void) const
 Returns a pointer to the owner ItemListBase. 0 if there is none.
bool isSelected (void) const
 Returns whether this item is selected or not.
bool isSelectable (void) const
 Returns whether this item is selectable or not.
void setSelected (bool setting)
 Sets the selection state of this item (on/off). If this item is not selectable this function does nothing.
void select (void)
 Selects the item.
void deselect (void)
 Deselects the item.
void setSelected_impl (bool state, bool notify)
 Set the selection state for this ListItem. Internal version. Should NOT be used by client code.
void setSelectable (bool setting)
 Sets whether this item will be selectable.
 ItemEntry (const String &type, const String &name)
 Constructor for ItemEntry objects.
virtual ~ItemEntry (void)
 Destructor for ItemEntry objects.

Static Public Attributes

static const String WidgetTypeName
 Window factory name.
static const String EventSelectionChanged

Protected Member Functions

virtual bool validateWindowRenderer (const WindowRenderer *renderer) const
 Return the "optimal" size for the item.
virtual void onSelectionChanged (WindowEventArgs &e)
 Handles selection state changes.
virtual void onMouseClicked (MouseEventArgs &e)
 Handler called when a mouse button has been clicked (that is depressed and then released, within a specified time) within this window's area.

Protected Attributes

ItemListBased_ownerList
 < pointer to the owner ItemListBase. 0 if there is none.
bool d_selected
 'true' when the item is selectable.
bool d_selectable

Friends

class ItemListBase

Detailed Description

Base class for item type widgets.

Todo:
Fire events on selection / deselection. (Maybe selectable mode changed as well?)

Member Function Documentation

Return the "optimal" size for the item.

Returns:
Size describing the size in pixel that this ItemEntry's content requires for non-clipped rendering
virtual void CEGUI::ItemEntry::onMouseClicked ( MouseEventArgs e) [protected, virtual]

Handler called when a mouse button has been clicked (that is depressed and then released, within a specified time) within this window's area.

Parameters:
eMouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

void CEGUI::ItemEntry::setSelectable ( bool  setting)

Sets whether this item will be selectable.

Parameters:
setting'true' to allow this item to be selected. 'false' to disallow this item from ever being selected.
Note:
If the item is currently selectable and selected, calling this function with setting as 'false' will first deselect the item and then disable selectability.
void CEGUI::ItemEntry::setSelected ( bool  setting) [inline]

Sets the selection state of this item (on/off). If this item is not selectable this function does nothing.

Parameters:
setting'true' to select the item. 'false' to deselect the item.
virtual bool CEGUI::ItemEntry::validateWindowRenderer ( const WindowRenderer renderer) const [protected, virtual]

Return the "optimal" size for the item.

Returns:
Size describing the size in pixel that this ItemEntry's content requires for non-clipped rendering

Reimplemented from CEGUI::Window.


Member Data Documentation

< pointer to the owner ItemListBase. 0 if there is none.

'true' when the item is in the selected state, 'false' if not.

Event fired when the item's selection state changes. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ItemEntry whose selection state has changed.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends