28 #ifndef _CEGUITreeItem_h_
29 #define _CEGUITreeItem_h_
31 #include "CEGUIBase.h"
32 #include "CEGUIString.h"
33 #include "CEGUIColourRect.h"
34 #include "CEGUIRenderCache.h"
46 typedef std::vector<TreeItem*> LBItemList;
62 TreeItem(
const String& text, uint item_id = 0,
void* item_data = 0,
bool disabled =
false,
bool auto_delete =
true);
85 Font* getFont(
void)
const;
124 void setFont(
const String& font_name);
159 void setTextColours(
colour top_left_colour,
colour top_right_colour,
colour bottom_left_colour,
colour bottom_right_colour);
186 const String& getTooltipText(
void)
const {
return d_tooltipText;}
198 uint
getID(
void)
const {
return d_itemID;}
298 void setTooltipText(
const String& text) {d_tooltipText = text;}
313 void setID(uint item_id) {d_itemID = item_id;}
419 void setSelectionColours(
colour top_left_colour,
colour top_right_colour,
colour bottom_left_colour,
colour bottom_right_colour);
461 void setSelectionBrushImage(
const String& imageset,
const String& image);
473 Rect &getButtonLocation(
void) {
return d_buttonLocation; }
474 bool getIsOpen(
void) {
return d_isOpen; }
475 void toggleIsOpen(
void) { d_isOpen = !d_isOpen; }
476 TreeItem *getTreeItemFromIndex(
size_t itemIndex);
477 size_t getItemCount(
void)
const {
return d_listItems.size();}
478 LBItemList &getItemList(
void) {
return d_listItems; }
479 void addItem(TreeItem* item);
480 void setIcon(
const Image &theIcon) { d_iconImage = (Image *)&theIcon; }
493 virtual Size getPixelSize(
void)
const;
512 virtual void draw(
const Vector3& position,
float alpha,
const Rect& clipper)
const;
514 virtual void draw(RenderCache& cache,
const Rect& targetRect,
float zBase,
float alpha,
const Rect* clipper)
const;
550 colour calculateModulatedAlphaColour(
colour col,
float alpha)
const;
563 Rect d_buttonLocation;
577 #endif // end of guard _CEGUITreeItem_h_