Base class for list box items. More...
Inherited by GUI::ListboxTextItem.
Public Member Functions | |
string | getText () |
return the text string set for this list box item. | |
int | getID () |
Return the current ID assigned to this list box item. | |
bool | isSelected () |
return whether this item is selected. | |
bool | isDisabled () |
return whether this item is disabled. | |
bool | isAutoDeleted () |
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. | |
Window | getOwnerWindow () |
Get the owner window for this ListboxItem. | |
ColourRect | getSelectionColours () |
Return the current colours used for selection highlighting. | |
Image | getSelectionBrushImage () |
Return the current selection highlighting brush. | |
void | setText (string text) |
set the text string for this list box item. | |
void | setID (int item_id) |
Set the ID assigned to this list 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 (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 (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 (Image image) |
Set the selection highlighting brush image. | |
void | setSelectionBrushImage (string imageset, string image) |
Set the selection highlighting brush image. | |
Size | getPixelSize () |
Return the rendered pixel size of this list box item. |
Base class for list box items.
string GUI::ListboxItem::getText | ( | ) |
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.
int GUI::ListboxItem::getID | ( | ) |
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.
bool GUI::ListboxItem::isSelected | ( | ) |
return whether this item is selected.
bool GUI::ListboxItem::isDisabled | ( | ) |
return whether this item is disabled.
bool GUI::ListboxItem::isAutoDeleted | ( | ) |
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.
Window GUI::ListboxItem::getOwnerWindow | ( | ) |
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.
ColourRect GUI::ListboxItem::getSelectionColours | ( | ) |
Return the current colours used for selection highlighting.
Image GUI::ListboxItem::getSelectionBrushImage | ( | ) |
Return the current selection highlighting brush.
void GUI::ListboxItem::setText | ( | string | text | ) |
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.
text | String object containing the text to set for the list box item. |
void GUI::ListboxItem::setID | ( | int | item_id | ) |
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.
item_id | ID code to be assigned to this list box item |
void GUI::ListboxItem::setSelected | ( | bool | setting | ) |
set whether this item is selected.
setting | true if the item is selected, false if the item is not selected. |
void GUI::ListboxItem::setDisabled | ( | bool | setting | ) |
set whether this item is disabled.
setting | true if the item is disabled, false if the item is enabled. |
void GUI::ListboxItem::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.
setting | true if the item object should be deleted by the system when the list box it is attached to is destroyed, or when the item is removed from the list. false if client code will destroy the item after it is removed from the list. |
void GUI::ListboxItem::setOwnerWindow | ( | 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.
owner | Ponter to the window that should be considered the owner of this ListboxItem. |
void GUI::ListboxItem::setSelectionColours | ( | ColourRect | cols | ) |
Set the colours used for selection highlighting.
cols | ColourRect object describing the colours to be used. |
void GUI::ListboxItem::setSelectionColours | ( | Colour | top_left_colour, |
Colour | top_right_colour, | ||
Colour | bottom_left_colour, | ||
Colour | bottom_right_colour | ||
) |
Set the colours used for selection highlighting.
top_left_colour | Colour (as ARGB value) to be applied to the top-left corner of the selection area. |
top_right_colour | Colour (as ARGB value) to be applied to the top-right corner of the selection area. |
bottom_left_colour | Colour (as ARGB value) to be applied to the bottom-left corner of the selection area. |
bottom_right_colour | Colour (as ARGB value) to be applied to the bottom-right corner of the selection area. |
void GUI::ListboxItem::setSelectionColours | ( | Colour | col | ) |
Set the colours used for selection highlighting.
col | colour value to be used when rendering. |
void GUI::ListboxItem::setSelectionBrushImage | ( | Image | image | ) |
Set the selection highlighting brush image.
image | Pointer to the Image object to be used for selection highlighting. |
void GUI::ListboxItem::setSelectionBrushImage | ( | string | imageset, |
string | image | ||
) |
Set the selection highlighting brush image.
imageset | Name of the imagest containing the image to be used. |
image | Name of the image to be used |