#include <CEGUIListboxTextItem.h>
Inheritance diagram for CEGUI::ListboxTextItem:
Public Member Functions | |
ListboxTextItem (const String &text, uint item_id=0, void *item_data=NULL, bool disabled=false, bool auto_delete=true) | |
base class constructor | |
virtual | ~ListboxTextItem (void) |
base class destructor | |
const Font * | getFont (void) const |
Return a pointer to the font being used by this ListboxTextItem. | |
ColourRect | getTextColours (void) const |
Return the current colours used for text rendering. | |
void | setFont (const Font *font) |
Set the font to be used by this ListboxTextItem. | |
void | setFont (const String &font_name) |
Set the font to be used by this ListboxTextItem. | |
void | setTextColours (const ColourRect &cols) |
Set the colours used for text rendering. | |
void | setTextColours (colour top_left_colour, colour top_right_colour, colour bottom_left_colour, colour bottom_right_colour) |
Set the colours used for text rendering. | |
void | setTextColours (colour col) |
Set the colours used for text rendering. | |
virtual Size | getPixelSize (void) const |
Return the rendered pixel size of this list box item. | |
virtual void | draw (const Vector3 &position, float alpha, const Rect &clipper) const |
Draw the list box item in its current state. | |
const String & | getText (void) const |
return the text string set for this list box item. | |
uint | getID (void) const |
Return the current ID assigned to this list box item. | |
void * | getUserData (void) const |
Return the pointer to any client assigned user data attached to this lis box item. | |
bool | isSelected (void) const |
return whether this item is selected. | |
bool | isDisabled (void) const |
return whether this item is disabled. | |
bool | isAutoDeleted (void) const |
return whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box. | |
const Window * | getOwnerWindow (const Window *owner) |
Get the owner window for this ListboxItem. | |
ColourRect | getSelectionColours (void) const |
Return the current colours used for selection highlighting. | |
const Image * | getSelectionBrushImage (void) const |
Return the current selection highlighting brush. | |
void | setText (const String &text) |
set the text string for this list box item. | |
void | setID (uint item_id) |
Set the ID assigned to this list box item. | |
void | setUserData (void *item_data) |
Set the client assigned user data attached to this lis box item. | |
void | setSelected (bool setting) |
set whether this item is selected. | |
void | setDisabled (bool setting) |
set whether this item is disabled. | |
void | setAutoDeleted (bool setting) |
Set whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box. | |
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 added or inserted. | |
void | setSelectionColours (const ColourRect &cols) |
Set the colours used for selection highlighting. | |
void | setSelectionColours (colour top_left_colour, colour top_right_colour, colour bottom_left_colour, colour bottom_right_colour) |
Set the colours used for selection highlighting. | |
void | setSelectionColours (colour col) |
Set the colours used for selection highlighting. | |
void | setSelectionBrushImage (const Image *image) |
Set the selection highlighting brush image. | |
void | setSelectionBrushImage (const String &imageset, const String &image) |
Set the selection highlighting brush image. | |
virtual bool | operator< (const ListboxItem &rhs) const |
Less-than operator, compares item texts. | |
virtual bool | operator> (const ListboxItem &rhs) const |
Greater-than operator, compares item texts. | |
Static Public Attributes | |
const colour | DefaultTextColour = 0xFFFFFFFF |
Default text colour. | |
const colour | DefaultSelectionColour = 0xFF4444AA |
Default selection brush colour. | |
Protected Member Functions | |
ColourRect | getModulateAlphaColourRect (const ColourRect &cols, float alpha) const |
Return a ColourRect object describing the colours in cols after having their alpha component modulated by the value alpha. | |
colour | calculateModulatedAlphaColour (colour col, float alpha) const |
Return a colour value describing the colour specified by col after having its alpha component modulated by the value alpha. | |
Protected Attributes | |
ColourRect | d_textCols |
Colours used for rendering the text. | |
const Font * | d_font |
Font used for rendering text. | |
String | d_itemText |
Text for this list box item. If not rendered, this is still used for list sorting. | |
uint | d_itemID |
ID code assigned by client code. This has no meaning within the GUI system. | |
void * | d_itemData |
Pointer to some client code data. This has no meaning within the GUI system. | |
bool | d_selected |
true if this item is selected. false if the item is not selected. | |
bool | d_disabled |
true if this item is disabled. false if the item is not disabled. | |
bool | d_autoDelete |
true if the system should destroy this item, false if client code will destroy the item. | |
const Window * | d_owner |
Pointer to the window that owns this item. | |
ColourRect | d_selectCols |
Colours used for selection highlighting. | |
const Image * | d_selectBrush |
Image used for rendering selection. |
Definition at line 38 of file CEGUIListboxTextItem.h.
|
base class constructor
Definition at line 44 of file CEGUIListboxTextItem.cpp. |
|
base class destructor
Definition at line 61 of file CEGUIListboxTextItem.h. |
|
Return a colour value describing the colour specified by col after having its alpha component modulated by the value alpha.
Definition at line 86 of file CEGUIListboxItem.cpp. References CEGUI::colour::getAlpha(), and CEGUI::colour::setAlpha(). Referenced by CEGUI::ListboxItem::getModulateAlphaColourRect(). |
|
Draw the list box item in its current state.
Implements CEGUI::ListboxItem. Definition at line 106 of file CEGUIListboxTextItem.cpp. References d_textCols, CEGUI::Vector3::d_y, CEGUI::Vector3::d_z, CEGUI::Image::draw(), CEGUI::Font::drawText(), CEGUI::Font::getBaseline(), getFont(), CEGUI::Font::getLineSpacing(), CEGUI::ListboxItem::getModulateAlphaColourRect(), and PixelAligned. |
|
Return a pointer to the font being used by this ListboxTextItem. This method will try a number of places to find a font to be used. If no font can be found, NULL is returned.
Definition at line 55 of file CEGUIListboxTextItem.cpp. References d_font, and CEGUI::Window::getFont(). Referenced by draw(), getPixelSize(), and setFont(). |
|
Return the current ID assigned to this list box item. Note that the system does not make use of this value, client code can assign any meaning it wishes to the ID.
Definition at line 92 of file CEGUIListboxItem.h. References CEGUI::uint. |
|
Return a ColourRect object describing the colours in cols after having their alpha component modulated by the value alpha.
Definition at line 70 of file CEGUIListboxItem.cpp. References CEGUI::ListboxItem::calculateModulatedAlphaColour(), CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::ColourRect::d_top_left, and CEGUI::ColourRect::d_top_right. Referenced by draw(). |
|
Get the owner window for this ListboxItem. The owner of a ListboxItem is typically set by the list box widgets when an item is added or inserted.
Definition at line 150 of file CEGUIListboxItem.h. |
|
Return the rendered pixel size of this list box item.
Implements CEGUI::ListboxItem. Definition at line 87 of file CEGUIListboxTextItem.cpp. References CEGUI::Size::d_height, CEGUI::Size::d_width, getFont(), CEGUI::Font::getLineSpacing(), and CEGUI::Font::getTextExtent(). |
|
Return the current selection highlighting brush.
Definition at line 170 of file CEGUIListboxItem.h. |
|
Return the current colours used for selection highlighting.
Definition at line 160 of file CEGUIListboxItem.h. |
|
return the text string set for this list box item. Note that even if the item does not render text, the text string can still be useful, since it is used for sorting list box items.
Definition at line 79 of file CEGUIListboxItem.h. Referenced by CEGUI::Combobox::droplist_SelectionAcceptedHandler(), CEGUI::MultiColumnList::ListRow::operator<(), CEGUI::ListboxItem::operator<(), CEGUI::MultiColumnList::ListRow::operator>(), and CEGUI::ListboxItem::operator>(). |
|
Return the current colours used for text rendering.
Definition at line 87 of file CEGUIListboxTextItem.h. |
|
Return the pointer to any client assigned user data attached to this lis box item. Note that the system does not make use of this data, client code can assign any meaning it wishes to the attached data.
Definition at line 105 of file CEGUIListboxItem.h. |
|
return whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box.
Definition at line 138 of file CEGUIListboxItem.h. Referenced by CEGUI::MultiColumnList::removeColumn(), CEGUI::Listbox::removeItem(), CEGUI::MultiColumnList::removeRow(), CEGUI::MultiColumnList::resetList_impl(), and CEGUI::MultiColumnList::setItem(). |
|
return whether this item is disabled.
Definition at line 125 of file CEGUIListboxItem.h. |
|
return whether this item is selected.
Definition at line 115 of file CEGUIListboxItem.h. Referenced by CEGUI::MultiColumnList::clearAllSelections_impl(), CEGUI::MultiColumnList::getNextSelected(), CEGUI::MultiColumnList::getSelectedCount(), CEGUI::MultiColumnList::isItemSelected(), CEGUI::Listbox::isItemSelected(), CEGUI::MultiColumnList::onMouseButtonDown(), and CEGUI::Listbox::onMouseButtonDown(). |
|
Less-than operator, compares item texts.
Definition at line 395 of file CEGUIListboxItem.h. References CEGUI::ListboxItem::getText(). |
|
Greater-than operator, compares item texts.
Definition at line 402 of file CEGUIListboxItem.h. References CEGUI::ListboxItem::getText(). |
|
Set whether this item will be automatically deleted when the list box it is attached to is destroyed, or when the item is removed from the list box.
Definition at line 262 of file CEGUIListboxItem.h. |
|
set whether this item is disabled.
Definition at line 247 of file CEGUIListboxItem.h. |
|
Set the font to be used by this ListboxTextItem.
Definition at line 79 of file CEGUIListboxTextItem.cpp. |
|
Set the font to be used by this ListboxTextItem.
Definition at line 103 of file CEGUIListboxTextItem.h. Referenced by setFont(). |
|
Set the ID assigned to this list box item. Note that the system does not make use of this value, client code can assign any meaning it wishes to the ID.
Definition at line 205 of file CEGUIListboxItem.h. |
|
Set the owner window for this ListboxItem. This is called by all the list box widgets when an item is added or inserted.
Definition at line 276 of file CEGUIListboxItem.h. Referenced by CEGUI::Listbox::addItem(), CEGUI::MultiColumnList::addRow(), CEGUI::Listbox::insertItem(), CEGUI::Listbox::removeItem(), and CEGUI::MultiColumnList::setItem(). |
|
set whether this item is selected.
Definition at line 234 of file CEGUIListboxItem.h. Referenced by CEGUI::MultiColumnList::clearAllSelections_impl(), CEGUI::Listbox::onMouseButtonDown(), CEGUI::Listbox::setItemSelectState(), CEGUI::Listbox::setMultiselectEnabled(), CEGUI::MultiColumnList::setSelectForItemsInColumn(), and CEGUI::MultiColumnList::setSelectForItemsInRow(). |
|
Set the selection highlighting brush image.
Definition at line 60 of file CEGUIListboxItem.cpp. References CEGUI::ListboxItem::setSelectionBrushImage(). |
|
Set the selection highlighting brush image.
Definition at line 337 of file CEGUIListboxItem.h. Referenced by CEGUI::ListboxItem::setSelectionBrushImage(). |
|
Set the colours used for selection highlighting.
Definition at line 324 of file CEGUIListboxItem.h. |
|
Set the colours used for selection highlighting.
Definition at line 97 of file CEGUIListboxItem.cpp. References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::ListboxItem::d_selectCols, CEGUI::ColourRect::d_top_left, and CEGUI::ColourRect::d_top_right. |
|
Set the colours used for selection highlighting.
Definition at line 289 of file CEGUIListboxItem.h. |
|
set the text string for this list box item. Note that even if the item does not render text, the text string can still be useful, since it is used for sorting list box items.
Definition at line 189 of file CEGUIListboxItem.h. |
|
Set the colours used for text rendering.
Definition at line 164 of file CEGUIListboxTextItem.h. |
|
Set the colours used for text rendering.
Definition at line 128 of file CEGUIListboxTextItem.cpp. References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, d_textCols, CEGUI::ColourRect::d_top_left, and CEGUI::ColourRect::d_top_right. |
|
Set the colours used for text rendering.
Definition at line 129 of file CEGUIListboxTextItem.h. |
|
Set the client assigned user data attached to this lis box item. Note that the system does not make use of this data, client code can assign any meaning it wishes to the attached data.
Definition at line 221 of file CEGUIListboxItem.h. |
|
true if the system should destroy this item, false if client code will destroy the item.
Definition at line 433 of file CEGUIListboxItem.h. |
|
true if this item is disabled. false if the item is not disabled.
Definition at line 432 of file CEGUIListboxItem.h. |
|
Font used for rendering text.
Definition at line 204 of file CEGUIListboxTextItem.h. Referenced by getFont(). |
|
Pointer to some client code data. This has no meaning within the GUI system.
Definition at line 430 of file CEGUIListboxItem.h. |
|
ID code assigned by client code. This has no meaning within the GUI system.
Definition at line 429 of file CEGUIListboxItem.h. |
|
Text for this list box item. If not rendered, this is still used for list sorting.
Definition at line 428 of file CEGUIListboxItem.h. |
|
Pointer to the window that owns this item.
Definition at line 434 of file CEGUIListboxItem.h. |
|
Image used for rendering selection.
Definition at line 436 of file CEGUIListboxItem.h. |
|
Colours used for selection highlighting.
Definition at line 435 of file CEGUIListboxItem.h. Referenced by CEGUI::ListboxItem::setSelectionColours(). |
|
true if this item is selected. false if the item is not selected.
Definition at line 431 of file CEGUIListboxItem.h. |
|
Colours used for rendering the text.
Definition at line 203 of file CEGUIListboxTextItem.h. Referenced by draw(), and setTextColours(). |
|
Default selection brush colour.
Definition at line 38 of file CEGUIListboxItem.cpp. |
|
Default text colour.
Definition at line 38 of file CEGUIListboxTextItem.cpp. |