|
Public Types |
| enum | TreeListControlEvents { ITEM_STATECHANGE_REQUESTED = CUSTOM_EVENT_TYPES + ITEM_CONST + 10
} |
| enum | TreeDisplayOptions {
tdoNone = 0,
tdoShowHierarchyLines = 1,
tdoShowRowLines = 2,
tdoShowColumnLines = 4,
tdoShowFullRowSelection = 8,
tdoShowColumnHeader = 16
} |
Public Member Functions |
| | TreeListControl () |
| virtual | ~TreeListControl () |
| void | init () |
| | This is going to be removed from the bext release.
|
| void | setTreeModel (TreeModel *model) |
| TreeModel * | getTreeModel () |
| ColumnModel * | getColumnModel () |
| double | getColumnWidth (const uint32 &index) |
| void | setColumnWidth (const uint32 &index, const double &width) |
| virtual void | paint (GraphicsContext *context) |
| | Paints the control.
|
| void | addItem (TreeItem *item, TreeItem *parent=NULL) |
| TreeItem * | addItem (TreeItem *parent=NULL, const String &caption="", const uint32 imageIndex=0) |
| uint32 | getItemIndent () |
| void | setItemIndent (const uint32 &itemIndent) |
| virtual void | mouseDown (MouseEvent *event) |
| | Called when one (or more) of the mouse buttons are held down.
|
| virtual void | mouseMove (MouseEvent *event) |
| | Called when the mouse moves over the control.
|
| virtual void | mouseUp (MouseEvent *event) |
| | Called when one (or more) of the mouse buttons are released.
|
| virtual void | mouseClick (MouseEvent *event) |
| | Called when one or mouse buttons are held down and immediately released ( a "mouse click" ).
|
| virtual void | mouseDblClick (MouseEvent *event) |
| | Called when one or mouse buttons are held down and immediately released ( a "mouse double click" ) twice, within some specific time period, as determined on the windowing system.
|
| virtual void | keyDown (KeyboardEvent *e) |
| | called when the user presses the key down
|
| void | setImageList (ImageList *imageList) |
| void | setStateImageList (ImageList *imageList) |
| ImageList * | getImageList () |
| ImageList * | getStateImageList () |
| int32 | getDisplayOptions () |
| void | setDisplayOptions (const int32 &displayOptions) |
| TreeItem * | isPtOverItem (Point *point) |
| void | setSelectedItem (TreeItem *item, const bool &isSelected) |
| TreeItem * | getSelectedItem () |
| bool | getAllowLabelEditing () |
| void | setAllowLabelEditing (const bool &allowLabelEditing) |
| HeaderControl * | getHeader () |
| Enumerator< TreeItem * > * | getSelectedItems () |
| bool | getAllowsMultipleSelection () |
| void | setAllowsMultipleSelection (const bool &multiSelect) |
| TreeItem * | hitTest (Point *pt, TreeItem *itemToTest) |
| TreeItem * | hitTest (Point *pt) |
| | searches all the items for a match for the point
|
| bool | stateHitTest (Point *pt, TreeItem *itemToTest) |
| void | setDefaultItemHeight (const double &defaultItemHeight) |
| double | getDefaultItemHeight () |
| void | showHierarchyLines (const bool &show) |
| void | showRowLines (const bool &show) |
| void | showColumnLines (const bool &show) |
| void | showFullRowSelection (const bool &show) |
| void | showColumnHeader (const bool &show) |
| void | clearSelectedItems () |
| TreeItem * | getNextItem (TreeItem *item, bool skipChildren=false) |
| TreeItem * | getPrevItem (TreeItem *item) |
| int | hitTestForEditColumn (Point *pt) |
| Rect | getBoundsForEdit (TreeItem *item, int column) |
| void | scrollToNextItem (TreeItem *item, bool scrollDown) |
Public Attributes |
| VCF::Delegate | ItemSelected |
| VCF::Delegate | ItemStateChangeRequested |
| VCF::Delegate | ItemExpanded |
Protected Member Functions |
| void | onModelChanged (TreeModelEvent *event) |
| void | onModelEmptied (Event *event) |
| bool | singleSelectionChange (MouseEvent *event) |
| bool | multiSelectionChange (MouseEvent *event) |
| virtual void | paintItem (TreeItem *item, GraphicsContext *context, Rect *paintRect) |
| virtual void | paintSubItem (TreeItem *item, GraphicsContext *context, const uint32 &subItemIndex, Rect *paintRect) |
| virtual void | paintExpander (TreeItem *item, GraphicsContext *context, Rect *paintRect) |
| virtual void | paintItemState (TreeItem *item, GraphicsContext *context, Rect *paintRect, const int32 ¤tIndent) |
| virtual void | paintItemImage (TreeItem *item, GraphicsContext *context, Rect *paintRect, const int32 ¤tIndent) |
| void | onColumnWidthChanged (ItemEvent *event) |
| bool | listVisibleItems (std::vector< TreeItem * > &items, TreeItem *itemToSearch, const double &top, const double &bottom) |
| bool | listSelectedItems (std::vector< TreeItem * > &items, TreeItem *firstSelectedItem, TreeItem *lastSelectedItem, TreeItem *nextItem, bool &startFound) |
| void | populateVisiblityList (std::vector< TreeItem * > &items, Rect *bounds=NULL) |
| double | getCurrentIndent (TreeItem *item) |
| Rect | getStateRect (TreeItem *item, const double &indent) |
| Rect | getExpanderRect (TreeItem *item) |
| bool | hitTest (Rect *rect, TreeItem *item, std::vector< TreeItem * > &hitTestList) |
| void | recalcScrollable () |
| void | onEditingControlKeyPressed (KeyboardEvent *event) |
| void | onEditorFocusLost (Event *e) |
| void | postFinishedEditing (Event *e) |
| void | cancelEditing () |
| void | finishEditing (bool applyEdit=true) |
| void | editItem (TreeItem *item, Point *point) |
| virtual void | finishEditingItem (TreeItem *item, Control *editControl) |
| | this is a no-op - sub classes need to derive this
|
| virtual Control * | createEditor (TreeItem *item, int column) |
| | this is a no-op - sub classes need to derive this
|
| virtual bool | finishEditingFromFocusLoss (Control *lostFocusCtrl, Control *currentFocusedCtrl) |
| | virtual function to control whether or not to allow an edit to finish due to focus loss.
|
Protected Attributes |
| HeaderControl * | header_ |
| ImageList * | imageList_ |
| ImageList * | stateImageList_ |
| TreeModel * | treeModel_ |
| double | itemHeight_ |
| double | columnHeight_ |
| uint32 | itemIndent_ |
| int32 | displayOptions_ |
| bool | allowLabelEditing_ |
| bool | allowMultipleSelection_ |
| double | visibleItemsHeight_ |
| std::vector< TreeItem * > | selectedItems_ |
EnumeratorContainer< std::vector<
TreeItem * >, TreeItem * > | selectedItemContainer_ |
| int32 | stateItemIndent_ |
| Color | rowLineColor_ |
| Color | columnLineColor_ |
| std::map< TreeItem *, double > | hierarchyHeightMap_ |
| std::vector< TreeItem * > | visibleDisplayItems_ |
| Rect | dragSelectionRect_ |
| Point | dragPoint_ |
| bool | draggingSelectionRect_ |
| std::vector< TreeItem * > | draggingSelectedItems_ |
| int | currentEditColumn_ |
| Control * | currentEditingControl_ |