Public Member Functions
GUI::TreeItem Class Reference

Base class for tree items. More...

List of all members.

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)

Detailed Description

Base class for tree items.

Deprecated:
The GUI::Tree, GUI::TreeItem and any other associated classes are deprecated and their use should be minimised - preferably eliminated - where possible. It is extremely unfortunate that this widget was ever added to CEGUI since its design and implementation are poor and do not meet established standards for the CEGUI project.
While no alternative currently exists, a superior, replacement tree widget will be provided prior to the final removal of the current implementation.

Member Function Documentation

ColourRect GUI::TreeItem::getTextColours ( )

Return the current colours used for text rendering.

Returns:
ColourRect object describing the currently set colours
void GUI::TreeItem::setTextColours ( ColourRect  cols)

Set the colours used for text rendering.

Parameters:
colsColourRect object describing the colours to be used.
Returns:
Nothing.
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.

Parameters:
top_left_colourColour (as ARGB value) to be applied to the top-left corner of each text glyph rendered.
top_right_colourColour (as ARGB value) to be applied to the top-right corner of each text glyph rendered.
bottom_left_colourColour (as ARGB value) to be applied to the bottom-left corner of each text glyph rendered.
bottom_right_colourColour (as ARGB value) to be applied to the bottom-right corner of each text glyph rendered.
Returns:
Nothing.
void GUI::TreeItem::setTextColours ( Colour  col)

Set the colours used for text rendering.

Parameters:
colcolour value to be used when rendering.
Returns:
Nothing.
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.

Returns:
String object containing the current text for the tree item.
string GUI::TreeItem::getTooltipText ( )

Return the text string currently set to be used as the tooltip text for this item.

Returns:
String object containing the current tooltip text as sued by 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.

Returns:
ID code currently assigned to this tree item
bool GUI::TreeItem::isSelected ( )

return whether this item is selected.

Returns:
  • true if the item is selected.
  • false if the item is not selected.
bool GUI::TreeItem::isDisabled ( )

return whether this item is disabled.

Returns:
  • true if the item is disabled.
  • false if the item is enabled.
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.

Returns:
  • true if the item object will be deleted by the system when it is removed from the tree, or when the tree it is attached to is destroyed.
  • false if client code must destroy the item after it is removed from the tree.
Window GUI::TreeItem::getOwnerWindow ( )

Get the owner window for this TreeItem.

The owner of a TreeItem is typically set by the tree widget when an item is added or inserted.

Returns:
Ponter to the window that is considered the owner of this TreeItem.
ColourRect GUI::TreeItem::getSelectionColours ( )

Return the current colours used for selection highlighting.

Returns:
ColourRect object describing the currently set colours.
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.

Parameters:
textString object containing the text to set for the tree item.
Returns:
Nothing.
void GUI::TreeItem::setTooltipText ( string  text)

Set the tooltip text to be used for this item.

Parameters:
textString object holding the text to be used in the tooltip displayed for this item.
Returns:
Nothing.
void GUI::TreeItem::setSelected ( bool  setting)

Set the selected state for the item.

Parameters:
setting
  • true if the item is selected.
  • false if the item is not selected.
Returns:
Nothing.
void GUI::TreeItem::setDisabled ( bool  setting)

Set the disabled state for the item.

Parameters:
setting
  • true if the item should be disabled.
  • false if the item should be enabled.
Returns:
Nothing.
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.

Parameters:
setting
  • true if the item object should be deleted by the system when the it is removed from the tree, or when the tree it is attached to is destroyed.
  • false if client code will destroy the item after it is removed from the tree.
Returns:
Nothing.
void GUI::TreeItem::setSelectionColours ( ColourRect  cols)

Set the colours used for selection highlighting.

Parameters:
colsColourRect object describing the colours to be used.
Returns:
Nothing.
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.

Parameters:
top_left_colourColour (as ARGB value) to be applied to the top-left corner of the selection area.
top_right_colourColour (as ARGB value) to be applied to the top-right corner of the selection area.
bottom_left_colourColour (as ARGB value) to be applied to the bottom-left corner of the selection area.
bottom_right_colourColour (as ARGB value) to be applied to the bottom-right corner of the selection area.
Returns:
Nothing.
void GUI::TreeItem::setSelectionColours ( Colour  col)

Set the colours used for selection highlighting.

Parameters:
colcolour value to be used when rendering.
Returns:
Nothing.