![]() | InDesign SDK 20.5 |

Public Types | |
| enum | { kAbove = 1, kBelow = -1 } |
| enum | { kNodeChangedMsgNotSet = 0, kNodeChangedMsgChangeAll = -1 } |
Public Types inherited from ITreeViewMgr | |
| enum | { kDefaultIID = IID_ITREEVIEWMGR } |
| enum | ScrollWhere { eScrollToTop, eScrollToMiddle, eScrollIntoView, eScrollToShowChildren } |
Public Member Functions | |
| CTreeViewMgr (IPMUnknown *boss) | |
| virtual void | ChangeRoot (bool16 widgetHeightIsConstant) |
| virtual void | NodeAdded (const NodeID &nodeAdded) |
| virtual void | NodesAdded (const NodeIDList &nodesAdded) |
| virtual void | BeforeNodeDeleted (const NodeID &nodeDeleted) |
| virtual void | BeforeNodesDeleted (NodeIDList &nodesDeleted) |
| virtual void | NodeMoved (const NodeID &nodeMoved, const NodeID &oldParent) |
| virtual void | NodeChanged (const NodeID &nodeChanged, bool16 childrenChangedAlso, int32 message=0) |
| virtual void | ScrollToNode (const NodeID &nodeDeleted, ScrollWhere whereToScroll) |
| virtual bool16 | IsNodeExpanded (const NodeID &nodeInQuestion) const |
| virtual bool16 | IsNodeExpanded (IControlView *widget) const |
| virtual void | ExpandNode (const NodeID &nodeToExpand, bool16 expandAllDescendants=kFalse) |
| virtual void | CollapseNode (const NodeID &nodeToCollapse, bool16 collapseAllDescendants=kFalse) |
| virtual void | HandleScroll (int32 amount, bool16 scrollVertical) |
| virtual void | HandleResize () |
| virtual void | ScrollUp () |
| virtual void | ScrollDown () |
| virtual NodeID_rv | Search (const PMString &partialNodeName) const |
| virtual NodeID_rv | Search (const NodeID &nodeToSearch) const |
| virtual IControlView * | QueryWidgetFromNode (const NodeID &node) const |
| virtual void | Purge (int32 level) |
| virtual void | ClearTree (bool16 clearExpandedNodeList) |
| virtual void | ReadWrite (IPMStream *s, ImplementationID prop) |
| virtual void | ArrangeWidgets () |
| virtual void | RefreshSubTree (const NodeID &subTreeRoot, bool16 includeEntireHier) |
| virtual PMRect | GetViewableArea () |
| virtual PMPoint | GetSizeNeededWihtoutScrollbar () |
| void | AllowPurge () |
| void | DisallowPurge () |
| bool | IsPurgeAllowed () const |
| virtual void | ScrollVerticalAbsoluteAmount (int32 amount, bool16 forceRedraw=kTrue) |
Static Public Member Functions | |
| static int32 | AboveOrBelow (ITreeViewHierarchyAdapter *adapter, const NodeID &referenceNode, const NodeID &nodeInQuestion) |
| static void | PurgeMemory (int32 level, void *refPtr) |
Protected Types | |
| enum | ChangeType { kNodeAdded, kNodeChanged, kNodeDeleted } |
Protected Member Functions | |
| bool16 | ExpandNodeRecurse (const NodeID &nodeToExpand, bool16 expandAllDescendants=kFalse) |
| bool16 | CollapseNodeRecurse (const NodeID &nodeToCollapse, bool16 collapseAllDescendants=kFalse) |
| void | PlaceWidgets () |
| void | DeselectNode (const NodeID &nodeToDeselect, ITreeViewController *controller, const ITreeViewHierarchyAdapter *adapter, bool16 notifyOfChange=kTrue) |
| virtual void | ScrollHorizontal (int32 amount, bool16 forceRedraw=kTrue) |
| virtual void | ScrollVertical (int32 amount, bool16 forceRedraw=kTrue) |
| virtual void | AdjustTreeScrollerSize (PMPoint scrollerSize) |
| virtual PMReal | AdjustScrollIncrements (WidgetID whichScrollBar, const PMReal &scrollerTop, const PMReal &scrollerBottom, const PMReal &viewSize) |
| void | AdjustScrollValue (bool16 vertical=kTrue) |
| PMReal | AdjustScrollerPosition () |
| IControlView * | QueryWidgetForNode (const NodeID &node) |
| IControlView * | QueryCachedWidget (WidgetID typeOfWidget) |
| void | AdjustHorizSize (IControlView *widget) |
| void | DisposeWidget (IControlView *) |
| void | DeleteWidget (IControlView *widget) |
| NodeID_rv | GetNodeIDFromInterface (IControlView *widget) const |
| bool16 | AncestorsAreExpanded (const NodeID &node) |
| bool16 | IsAncestor (const NodeID &possibleAncestor, const NodeID &possibleDescendant) const |
| PMReal | GetNewScrollerWidth (const PMReal &sizeOfChangingNode, const NodeIDList *changingNodes, ChangeType typeOfChange) |
| void | ExpandToShowNode (const NodeID &scrollToNode) |
| virtual void | MoveScroller (const PMPoint &moveTo) |
| TreeNode * | GetTreePtrFromNodeID (const NodeID &node, bool16 buildTreeToIncludeNode=kFalse) const |
| void | SetRepositionWidgetsFlag (bool16 reposition) |
| void | TestTree (const NodeID &) |
| void | CheckNode (const NodeID &, const char *, int32=-1) const |
| void | CheckWidgetPtrs () const |
Protected Attributes | |
| IControlView * | fTreeScrollerView |
| IControlView * | fVScrollBarView |
| IControlView * | fHScrollBarView |
| int32 | fVThumbScrollIncrement |
Friends | |
| class | TreeNodeTraverser |
| class | TreeNodeHelper |
| class | TreeNode |
| class | CheckReentryUtility |
| virtual |
This must be called before the object is actually deleted, so we can get it's size
| nodeDeleted |
Implements ITreeViewMgr.
| virtual |
Call this method before a collection of nodes are to be removed from the tree. This method has a K2Vector parameter that is non-const, because the nodes in this collection will be sorted after use
| nodesDeleted | nodes about to be deleted, |
Implements ITreeViewMgr.
| virtual |
Call this method to initialize the tree, using the ITreeViewHierarchyAdapter. Call this if you want the tree to repopulate it's widgets. Node expansion will be preserved unless the root node is different. If you don't want node expansion preserved, you must call ClearTree(kTrue) before calling ChangeRoot()
Debug version of ChangeRoot() which had a test parameter has been removed. To get the Tree validation, use the test menu item Test > UI > Enable TreeView Validation to turn on TreeView debugging code. Enabling this will help you find bugs in your NodeID and ITreeViewHierarchyAdapter implementations.
| widgetHeightIsConstant | if all of the widgets that will be created in your tree will have the same height, set widgetHeightIsConstant to kTrue to improve performance |
Implements ITreeViewMgr.
| virtual |
Call this to remove all the widgets. This is the same as calling ChangeRoot() when the TreeViewHierarchy will return nil for QueryRootNode(). It makes the tree empty and breaks the connection between the tree and it's root You need to call ChangeRoot() again for a new connection to be established. By default, the list of expanded nodes will not be cleared. To clear the list of expanded nodes, set clearExpandedNodeList to kTrue.
Implements ITreeViewMgr.
| virtual |
Method to collapse given node and optionally collapse all the descendants
| nodeToCollapse | specifies node that is to be collapsed |
| collapseAllDescendants | kFalse if only immediate children to be collapsed, kTrue if all descendants to be collapsed |
Implements ITreeViewMgr.
| virtual |
Method to expand node and optionally all its descendants.
| nodeToExpand | specifies node that is to be expanded |
| expandAllDescendants | kTrue if all descendants are to be expanded also, kFalse to restrict expansion to immediate children |
Implements ITreeViewMgr.
| virtual |
Returns a rectangle that specify the size needed for whole tree to draw without scrollbar
Implements ITreeViewMgr.
| virtual |
Returns a rectangle in scroller coordinates that represents the viewable area on the scrollable canvas.
Implements ITreeViewMgr.
| virtual |
This is typically only called by the scroll bar event handler/ resize widget
Implements ITreeViewMgr.
| virtual |
This is typically only called by the scroll bar event handler/ resize widget
Implements ITreeViewMgr.
| virtual |
Determine if given node is expanded.
| nodeInQuestion | node of interest |
Implements ITreeViewMgr.
| virtual |
Determine if given node is expanded.
| widget | the corresponding widget that is responsible for rendering a node |
Implements ITreeViewMgr.
| virtual |
| virtual |
This should only be called for a node whose height will not change. If the height could change call delete and then add
| nodeChanged | |
| childrenChangedAlso | |
| message |
Implements ITreeViewMgr.
This should be called when a node has moved to a new location. Do not call this if the height of the widget may have also changed. In that case, you'll have to use BeforeNodeDeleted and NodeAdded
| nodeMoved | |
| oldParent |
Implements ITreeViewMgr.
| virtual |
This should be called after a collection of nodes have been added
| nodesAdded |
Implements ITreeViewMgr.
| virtual |
Utility function to get the widget for a particular node. There is no guarantee that a widget will exist though. This call is rarely what you want. It will return nil in cases where the node in question is not visible in the tree, or when the tree has changed and the widgets have not yet been rearranged. Call NodeChanged() if you want to update data in a node. Typically, this is only called in response to mouse events.
Implements ITreeViewMgr.
| virtual |
When a subtree has changed significantly or when you aren't sure of the nodes added/removed, you can call this method to regenerate the tree below the specified node
| the | node at the top of the subtree you want refreshed |
| false | will only fix up the imediate children ignoring all grandchildren |
Implements ITreeViewMgr.
| virtual |
Would scroll down as if you had clicked in the scroll bar between the thumb and end buttons.
Implements ITreeViewMgr.
| virtual |
This allows a certain node to be scrolled into view, ancestors will be expanded to make node visible
| scrollToNode | |
| whereToScroll |
Implements ITreeViewMgr.
| virtual |
Would scroll up as if you had clicked in the scroll bar between the thumb and end buttons.
Implements ITreeViewMgr.
| virtual |
Scroll the tree view widget vertically with a specified amount in pixels
Implements ITreeViewMgr.
This method is used with typeahead to search for the first node in the tree that begins with 'partialNodeName'. TreeView must have ITreeViewTypeAhead interface for this to do anything useful
| search | the tree for a node whose text representation starts with 'partialNodeName' |
Implements ITreeViewMgr.
This method is used to determine if a node has been loaded in the tree widget.
| nodeToSearch | search the tree for a node with this ID |
Implements ITreeViewMgr.