30 #ifndef _CEGUIListboxItem_h_
31 #define _CEGUIListboxItem_h_
33 #include "../CEGUIBase.h"
34 #include "../CEGUIString.h"
35 #include "../CEGUIColourRect.h"
36 #include "../CEGUITextUtils.h"
39 # pragma warning(push)
40 # pragma warning(disable : 4251)
66 ListboxItem(
const String& text, uint item_id = 0,
void* item_data = 0,
bool disabled =
false,
bool auto_delete =
true);
91 const String& getText(
void)
const {
return d_textLogical;}
94 const String& getTextVisual()
const;
106 uint
getID(
void)
const {
return d_itemID;}
203 virtual void setText(
const String& text);
205 void setTooltipText(
const String& text) {d_tooltipText = text;}
220 void setID(uint item_id) {d_itemID = item_id;}
326 void setSelectionColours(
colour top_left_colour,
colour top_right_colour,
colour bottom_left_colour,
colour bottom_right_colour);
368 void setSelectionBrushImage(
const String& imageset,
const String& image);
381 virtual Size getPixelSize(
void)
const = 0;
401 float alpha,
const Rect* clipper)
const = 0;
437 colour calculateModulatedAlphaColour(
colour col,
float alpha)
const;
461 #if defined(_MSC_VER)
462 # pragma warning(pop)
465 #endif // end of guard _CEGUIListboxItem_h_
uint getID(void) const
Return the current ID assigned to this list box item.
Definition: CEGUIListboxItem.h:106
virtual bool operator>(const ListboxItem &rhs) const
Greater-than operator, compares item texts.
Definition: CEGUIListboxItem.h:417
void setOwnerWindow(const Window *owner)
Set the owner window for this ListboxItem. This is called by all the list box widgets when an item is...
Definition: CEGUIListboxItem.h:291
String d_tooltipText
Text for the individual tooltip of this item.
Definition: CEGUIListboxItem.h:448
void * getUserData(void) const
Return the pointer to any client assigned user data attached to this lis box item.
Definition: CEGUIListboxItem.h:119
const Image * getSelectionBrushImage(void) const
Return the current selection highlighting brush.
Definition: CEGUIListboxItem.h:184
Class that represents a single Image of an Imageset.
Definition: CEGUIImage.h:57
void setSelectionColours(colour col)
Set the colours used for selection highlighting.
Definition: CEGUIListboxItem.h:339
bool isSelected(void) const
return whether this item is selected.
Definition: CEGUIListboxItem.h:129
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: CEGUIGeometryBuffer.h:42
Class that holds the size (width & height) of something.
Definition: CEGUISize.h:43
Class representing colour values within the system.
Definition: CEGUIcolour.h:45
Class that holds details of colours for the four corners of a rectangle.
Definition: CEGUIColourRect.h:44
bool d_autoDelete
true if the system should destroy this item, false if client code will destroy the item...
Definition: CEGUIListboxItem.h:453
void setUserData(void *item_data)
Set the client assigned user data attached to this lis box item.
Definition: CEGUIListboxItem.h:236
void setDisabled(bool setting)
set whether this item is disabled.
Definition: CEGUIListboxItem.h:262
Abstract class to wrap a BiDi visual mapping of a text string.
Definition: CEGUIBiDiVisualMapping.h:51
const String & getTooltipText(void) const
return the text string set for this list box item.
Definition: CEGUIListboxItem.h:89
void setSelected(bool setting)
set whether this item is selected.
Definition: CEGUIListboxItem.h:249
const Window * getOwnerWindow() const
Get the owner window for this ListboxItem.
Definition: CEGUIListboxItem.h:164
void setSelectionColours(const ColourRect &cols)
Set the colours used for selection highlighting.
Definition: CEGUIListboxItem.h:304
uint d_itemID
ID code assigned by client code. This has no meaning within the GUI system.
Definition: CEGUIListboxItem.h:449
bool isAutoDeleted(void) const
return whether this item will be automatically deleted when the list box it is attached to is destroy...
Definition: CEGUIListboxItem.h:152
const Window * d_owner
Pointer to the window that owns this item.
Definition: CEGUIListboxItem.h:454
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: CEGUIWindow.h:138
Base class for list box items.
Definition: CEGUIListboxItem.h:50
bool d_bidiDataValid
whether bidi visual mapping has been updated since last text change.
Definition: CEGUIListboxItem.h:447
const Image * d_selectBrush
Image used for rendering selection.
Definition: CEGUIListboxItem.h:456
void setID(uint item_id)
Set the ID assigned to this list box item.
Definition: CEGUIListboxItem.h:220
void * d_itemData
Pointer to some client code data. This has no meaning within the GUI system.
Definition: CEGUIListboxItem.h:450
void setSelectionBrushImage(const Image *image)
Set the selection highlighting brush image.
Definition: CEGUIListboxItem.h:352
virtual bool operator<(const ListboxItem &rhs) const
Less-than operator, compares item texts.
Definition: CEGUIListboxItem.h:410
ColourRect d_selectCols
Colours used for selection highlighting.
Definition: CEGUIListboxItem.h:455
bool d_disabled
true if this item is disabled. false if the item is not disabled.
Definition: CEGUIListboxItem.h:452
BiDiVisualMapping * d_bidiVisualMapping
pointer to bidirection support object
Definition: CEGUIListboxItem.h:445
void setAutoDeleted(bool setting)
Set whether this item will be automatically deleted when the list box it is attached to is destroyed...
Definition: CEGUIListboxItem.h:277
ColourRect getSelectionColours(void) const
Return the current colours used for selection highlighting.
Definition: CEGUIListboxItem.h:174
Class encapsulating operations on a Rectangle.
Definition: CEGUIRect.h:44
bool isDisabled(void) const
return whether this item is disabled.
Definition: CEGUIListboxItem.h:139
bool d_selected
true if this item is selected. false if the item is not selected.
Definition: CEGUIListboxItem.h:451
String class used within the GUI system.
Definition: CEGUIString.h:57
static const colour DefaultSelectionColour
Default selection brush colour.
Definition: CEGUIListboxItem.h:56