Base class for tree items. More...
Public Member Functions | |
ColourRect | getTextColours () |
Return the current colours used for text rendering. | |
void | setTextColours (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. | |
string | getText () |
return the text string set for this tree item. | |
string | getTooltipText () |
Return the text string currently set to be used as the tooltip text for this item. | |
int | getID () |
Return the current ID assigned to this tree 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 it is removed from the tree or when the the tree it is attached to is destroyed. | |
Window | getOwnerWindow () |
Get the owner window for this TreeItem. | |
ColourRect | getSelectionColours () |
Return the current colours used for selection highlighting. | |
void | setText (string text) |
set the text string for this tree item. | |
void | setTooltipText (string text) |
Set the tooltip text to be used for this item. | |
void | setSelected (bool setting) |
Set the selected state for the item. | |
void | setDisabled (bool setting) |
Set the disabled state for the item. | |
void | setAutoDeleted (bool setting) |
Set whether this item will be automatically deleted when it is removed from the tree, or when the tree it is attached to is destroyed. | |
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. | |
bool | getIsOpen () |
void | toggleIsOpen () |
int | getItemCount () |
void | addItem (TreeItem item) |
void | setIcon (Image theIcon) |
Base class for tree items.
ColourRect GUI::TreeItem::getTextColours | ( | ) |
Return the current colours used for text rendering.
void GUI::TreeItem::setTextColours | ( | ColourRect | cols | ) |
Set the colours used for text rendering.
cols | ColourRect object describing the colours to be used. |
void GUI::TreeItem::setTextColours | ( | Colour | top_left_colour, |
Colour | top_right_colour, | ||
Colour | bottom_left_colour, | ||
Colour | bottom_right_colour | ||
) |
Set the colours used for text rendering.
top_left_colour | Colour (as ARGB value) to be applied to the top-left corner of each text glyph rendered. |
top_right_colour | Colour (as ARGB value) to be applied to the top-right corner of each text glyph rendered. |
bottom_left_colour | Colour (as ARGB value) to be applied to the bottom-left corner of each text glyph rendered. |
bottom_right_colour | Colour (as ARGB value) to be applied to the bottom-right corner of each text glyph rendered. |
void GUI::TreeItem::setTextColours | ( | Colour | col | ) |
Set the colours used for text rendering.
col | colour value to be used when rendering. |
string GUI::TreeItem::getText | ( | ) |
return the text string set for this tree item.
Note that even if the item does not render text, the text string can still be useful, since it is used for sorting tree items.
string GUI::TreeItem::getTooltipText | ( | ) |
Return the text string currently set to be used as the tooltip text for this item.
int GUI::TreeItem::getID | ( | ) |
Return the current ID assigned to this tree 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::TreeItem::isSelected | ( | ) |
return whether this item is selected.
bool GUI::TreeItem::isDisabled | ( | ) |
return whether this item is disabled.
bool GUI::TreeItem::isAutoDeleted | ( | ) |
return whether this item will be automatically deleted when it is removed from the tree or when the the tree it is attached to is destroyed.
Window GUI::TreeItem::getOwnerWindow | ( | ) |
ColourRect GUI::TreeItem::getSelectionColours | ( | ) |
Return the current colours used for selection highlighting.
void GUI::TreeItem::setText | ( | string | text | ) |
set the text string for this tree item.
Note that even if the item does not render text, the text string can still be useful, since it is used for sorting tree items.
text | String object containing the text to set for the tree item. |
void GUI::TreeItem::setTooltipText | ( | string | text | ) |
Set the tooltip text to be used for this item.
text | String object holding the text to be used in the tooltip displayed for this item. |
void GUI::TreeItem::setSelected | ( | bool | setting | ) |
Set the selected state for the item.
setting |
|
void GUI::TreeItem::setDisabled | ( | bool | setting | ) |
Set the disabled state for the item.
setting |
|
void GUI::TreeItem::setAutoDeleted | ( | bool | setting | ) |
Set whether this item will be automatically deleted when it is removed from the tree, or when the tree it is attached to is destroyed.
setting |
|
void GUI::TreeItem::setSelectionColours | ( | ColourRect | cols | ) |
Set the colours used for selection highlighting.
cols | ColourRect object describing the colours to be used. |
void GUI::TreeItem::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::TreeItem::setSelectionColours | ( | Colour | col | ) |
Set the colours used for selection highlighting.
col | colour value to be used when rendering. |