32 #include "../Window.h"
33 #include "../WindowManager.h"
34 #include "./TreeItem.h"
35 #include "./Scrollbar.h"
39 # pragma warning(push)
40 # pragma warning(disable : 4251)
80 CEGUI_VECTOR_ALLOC(
TreeItem*)> LBItemList;
85 static const String WidgetTypeName;
146 { populateGeometryBuffer(); }
150 { configureScrollbars(); }
162 size_t getItemCount(
void)
const
163 {
return d_listItems.size(); }
172 size_t getSelectedCount(
void)
const;
182 TreeItem* getFirstSelectedItem(
void)
const;
194 {
return d_lastSelected; }
215 TreeItem* getNextSelectedItemFromList(
const LBItemList &itemList,
217 bool& foundStartItem)
const;
227 bool isSortEnabled(
void)
const
230 void setItemRenderArea(
Rectf& r)
233 Scrollbar* getVertScrollbar()
234 {
return d_vertScrollbar; }
236 Scrollbar* getHorzScrollbar()
237 {
return d_horzScrollbar; }
246 bool isMultiselectEnabled(
void)
const
247 {
return d_multiselect; }
249 bool isItemTooltipsEnabled(
void)
const
250 {
return d_itemTooltips; }
271 TreeItem* findFirstItemWithText(
const String& text);
273 TreeItem* findNextItemWithText(
const String& text,
274 const TreeItem* start_item);
276 TreeItem* findItemWithTextFromList(
const LBItemList &itemList,
278 const TreeItem* start_item,
279 bool foundStartItem);
300 TreeItem* findFirstItemWithID(uint searchID);
301 TreeItem* findNextItemWithID(uint searchID,
const TreeItem* start_item);
302 TreeItem* findItemWithIDFromList(
const LBItemList &itemList, uint searchID,
303 const TreeItem* start_item,
304 bool foundStartItem);
314 bool isTreeItemInList(
const TreeItem* item)
const;
324 bool isVertScrollbarAlwaysShown(
void)
const;
334 bool isHorzScrollbarAlwaysShown(
void)
const;
350 virtual void initialise(
void);
358 void resetList(
void);
372 void addItem(TreeItem* item);
397 void insertItem(TreeItem* item,
const TreeItem* position);
411 void removeItem(
const TreeItem* item);
420 void clearAllSelections(
void);
421 bool clearAllSelectionsFromList(
const LBItemList &itemList);
434 void setSortingEnabled(
bool setting);
448 void setMultiselectEnabled(
bool setting);
463 void setShowVertScrollbar(
bool setting);
478 void setShowHorzScrollbar(
bool setting);
480 void setItemTooltipsEnabled(
bool setting);
505 void setItemSelectState(TreeItem* item,
bool state);
530 void setItemSelectState(
size_t item_index,
bool state);
549 virtual void setLookNFeel(
const String& look);
564 void handleUpdatedItemData(
void);
579 void ensureItemIsVisible(
const TreeItem* item);
589 Tree(
const String& type,
const String& name);
610 virtual Rectf getTreeRenderArea(
void)
const
611 {
return d_itemArea; }
625 {
return static_cast<Scrollbar*
>(getChild(name)); }
639 {
return static_cast<Scrollbar*
>(getChild(name)); }
651 virtual void cacheTreeBaseImagery()
661 bool containsOpenItemRecursive(
const LBItemList& itemList,
TreeItem* item);
667 void addTreeEvents(
void);
675 void configureScrollbars(
void);
682 void selectRange(
size_t start,
size_t end);
688 float getTotalItemsHeight(
void)
const;
689 void getTotalItemsInListHeight(
const LBItemList &itemList,
690 float *heightSum)
const;
696 float getWidestItemWidth(
void)
const;
697 void getWidestItemWidthInList(
const LBItemList &itemList,
int itemDepth,
698 float *widest)
const;
708 bool getHeightToItemInList(
const LBItemList &itemList,
711 float *height)
const;
721 bool clearAllSelections_impl(
void);
732 TreeItem* getItemFromListAtPoint(
const LBItemList &itemList,
float *bottomY,
746 bool resetList_impl(
void);
753 bool handle_scrollChange(
const EventArgs& args);
756 virtual void populateGeometryBuffer();
757 bool handleFontRenderSizeChange(
const EventArgs& args);
759 void drawItemList(LBItemList& itemList,
Rectf& itemsArea,
float widest,
852 void addTreeProperties(
void);
874 #if defined(_MSC_VER)
875 # pragma warning(pop)
878 #endif // end of guard _CEGUITree_h_