Public Member Functions |
void | doTreeRender () |
void | doScrollbars () |
size_t | getItemCount (void) const |
| Return number of items attached to the tree.
|
size_t | getSelectedCount (void) const |
| Return the number of selected items in the tree.
|
TreeItem * | getFirstSelectedItem (void) const |
| Return a pointer to the first selected item.
|
TreeItem * | getLastSelectedItem (void) const |
| Return a pointer to the first selected item.
|
TreeItem * | getNextSelected (const TreeItem *start_item) const |
| Return a pointer to the next selected item after item start_item.
|
TreeItem * | getNextSelectedItemFromList (const LBItemList &itemList, const TreeItem *start_item, bool &foundStartItem) const |
bool | isSortEnabled (void) const |
| return whether tree sorting is enabled
|
void | setItemRenderArea (Rect &r) |
Scrollbar * | getVertScrollbar () |
Scrollbar * | getHorzScrollbar () |
bool | isMultiselectEnabled (void) const |
| return whether multi-select is enabled
|
bool | isItemTooltipsEnabled (void) const |
TreeItem * | findFirstItemWithText (const String &text) |
| Search the tree for an item with the specified text.
|
TreeItem * | findNextItemWithText (const String &text, const TreeItem *start_item) |
TreeItem * | findItemWithTextFromList (const LBItemList &itemList, const String &text, const TreeItem *start_item, bool foundStartItem) |
TreeItem * | findFirstItemWithID (uint searchID) |
| Search the tree for an item with the specified text.
|
TreeItem * | findNextItemWithID (uint searchID, const TreeItem *start_item) |
TreeItem * | findItemWithIDFromList (const LBItemList &itemList, uint searchID, const TreeItem *start_item, bool foundStartItem) |
bool | isTreeItemInList (const TreeItem *item) const |
| Return whether the specified TreeItem is in the tree.
|
bool | isVertScrollbarAlwaysShown (void) const |
| Return whether the vertical scroll bar is always shown.
|
bool | isHorzScrollbarAlwaysShown (void) const |
| Return whether the horizontal scroll bar is always shown.
|
virtual void | initialise (void) |
| Initialise the Window based object ready for use.
|
void | resetList (void) |
| Remove all items from the tree.
|
void | addItem (TreeItem *item) |
| Add the given TreeItem to the tree.
|
void | insertItem (TreeItem *item, const TreeItem *position) |
| Insert an item into the tree after a specified item already in the tree.
|
void | removeItem (const TreeItem *item) |
| Removes the given item from the tree. If the item is has the auto delete state set, the item will be deleted.
|
void | clearAllSelections (void) |
| Clear the selected state for all items.
|
bool | clearAllSelectionsFromList (const LBItemList &itemList) |
void | setSortingEnabled (bool setting) |
| Set whether the tree should be sorted.
|
void | setMultiselectEnabled (bool setting) |
| Set whether the tree should allow multiple selections or just a single selection.
|
void | setShowVertScrollbar (bool setting) |
| Set whether the vertical scroll bar should always be shown.
|
void | setShowHorzScrollbar (bool setting) |
| Set whether the horizontal scroll bar should always be shown.
|
void | setItemTooltipsEnabled (bool setting) |
void | setItemSelectState (TreeItem *item, bool state) |
| Set the select state of an attached TreeItem.
|
void | setItemSelectState (size_t item_index, bool state) |
| Set the select state of an attached TreeItem.
|
virtual void | setLookNFeel (const String &look) |
| Set the LookNFeel that shoule be used for this window.
|
void | handleUpdatedItemData (void) |
| Causes the tree to update it's internal state after changes have been made to one or more attached TreeItem objects.
|
void | ensureItemIsVisible (const TreeItem *item) |
| Ensure the item at the specified index is visible within the tree.
|
| Tree (const String &type, const String &name) |
| Constructor for Tree base class.
|
virtual | ~Tree (void) |
| Destructor for Tree base class.
|
Static Public Attributes |
static const String | EventNamespace |
| Namespace for global events.
|
static const String | WidgetTypeName |
static const String | EventListContentsChanged |
| Event triggered when the contents of the tree is changed.
|
static const String | EventSelectionChanged |
| Event triggered when there is a change to the currently selected item(s).
|
static const String | EventSortModeChanged |
| Event triggered when the sort mode setting changes.
|
static const String | EventMultiselectModeChanged |
| Event triggered when the multi-select mode setting changes.
|
static const String | EventVertScrollbarModeChanged |
| Event triggered when the vertical scroll bar 'force' setting changes.
|
static const String | EventHorzScrollbarModeChanged |
| Event triggered when the horizontal scroll bar 'force' setting changes.
|
static const String | EventBranchOpened |
| Event triggered when a branch of the tree is opened by the user.
|
static const String | EventBranchClosed |
| Event triggered when a branch of the tree is closed by the user.
|
Protected Member Functions |
virtual Rect | getTreeRenderArea (void) const |
| Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used for rendering tree items.
|
virtual Scrollbar * | createVertScrollbar (const String &name) const |
| create and return a pointer to a Scrollbar widget for use as vertical scroll bar.
|
virtual Scrollbar * | createHorzScrollbar (const String &name) const |
| create and return a pointer to a Scrollbar widget for use as horizontal scroll bar.
|
virtual void | cacheTreeBaseImagery () |
| Perform caching of the widget control frame and other 'static' areas. This method should not render the actual items. Note that the items are typically rendered to layer 3, other layers can be used for rendering imagery behind and infront of the items.
|
bool | containsOpenItemRecursive (const LBItemList &itemList, TreeItem *item) |
| Checks if a tree item is visible (searches sub-items).
|
void | addTreeEvents (void) |
| Add tree specific events.
|
void | configureScrollbars (void) |
| display required integrated scroll bars according to current state of the tree and update their values.
|
void | selectRange (size_t start, size_t end) |
| select all strings between positions start and end. (inclusive) including end.
|
float | getTotalItemsHeight (void) const |
| Return the sum of all item heights.
|
void | getTotalItemsInListHeight (const LBItemList &itemList, float *heightSum) const |
float | getWidestItemWidth (void) const |
| Return the width of the widest item.
|
void | getWidestItemWidthInList (const LBItemList &itemList, int itemDepth, float *widest) const |
bool | getHeightToItemInList (const LBItemList &itemList, const TreeItem *treeItem, int itemDepth, float *height) const |
| Clear the selected state for all items (implementation).
|
bool | clearAllSelections_impl (void) |
| Clear the selected state for all items (implementation).
|
TreeItem * | getItemAtPoint (const Point &pt) const |
| Return the TreeItem under the given window local pixel co-ordinate.
|
TreeItem * | getItemFromListAtPoint (const LBItemList &itemList, float *bottomY, const Point &pt) const |
bool | resetList_impl (void) |
| Remove all items from the tree.
|
virtual bool | testClassName_impl (const String &class_name) const |
| Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
|
bool | handle_scrollChange (const EventArgs &args) |
| Internal handler that is triggered when the user interacts with the scrollbars.
|
virtual void | populateGeometryBuffer () |
| Update the rendering cache.
|
void | drawItemList (LBItemList &itemList, Rect &itemsArea, float widest, Vector2 &itemPos, GeometryBuffer &geometry, float alpha) |
virtual void | onListContentsChanged (WindowEventArgs &e) |
| Handler called internally when the tree contents are changed.
|
virtual void | onSelectionChanged (TreeEventArgs &e) |
| Handler called internally when the currently selected item or items changes.
|
virtual void | onSortModeChanged (WindowEventArgs &e) |
| Handler called internally when the sort mode setting changes.
|
virtual void | onMultiselectModeChanged (WindowEventArgs &e) |
| Handler called internally when the multi-select mode setting changes.
|
virtual void | onVertScrollbarModeChanged (WindowEventArgs &e) |
| Handler called internally when the forced display of the vertical scroll bar setting changes.
|
virtual void | onHorzScrollbarModeChanged (WindowEventArgs &e) |
| Handler called internally when the forced display of the horizontal scroll bar setting changes.
|
virtual void | onBranchOpened (TreeEventArgs &e) |
| Handler called internally when the user opens a branch of the tree.
|
virtual void | onBranchClosed (TreeEventArgs &e) |
| Handler called internally when the user closes a branch of the tree.
|
virtual void | onSized (WindowEventArgs &e) |
| Handler called when the window's size changes.
|
virtual void | onMouseButtonDown (MouseEventArgs &e) |
| Handler called when a mouse button has been depressed within this window's area.
|
virtual void | onMouseWheel (MouseEventArgs &e) |
| Handler called when the mouse wheel (z-axis) position changes within this window's area.
|
virtual void | onMouseMove (MouseEventArgs &e) |
| Handler called when the mouse cursor has been moved within this window's area.
|
Protected Attributes |
bool | d_sorted |
| true if tree is sorted
|
bool | d_multiselect |
| true if multi-select is enabled
|
bool | d_forceVertScroll |
| true if vertical scrollbar should always be displayed
|
bool | d_forceHorzScroll |
| true if horizontal scrollbar should always be displayed
|
bool | d_itemTooltips |
| true if each item should have an individual tooltip
|
Scrollbar * | d_vertScrollbar |
| vertical scroll-bar widget
|
Scrollbar * | d_horzScrollbar |
| horizontal scroll-bar widget
|
LBItemList | d_listItems |
| list of items in the tree.
|
TreeItem * | d_lastSelected |
| holds pointer to the last selected item (used in range selections)
|
ImagerySection * | d_openButtonImagery |
ImagerySection * | d_closeButtonImagery |
Friends |
class | TreeItem |