InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITreeViewMgr.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Joss
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ITreeViewMgr__
25 #define __ITreeViewMgr__
26 
27 #include "IPMUnknown.h"
28 #include "widgetid.h"
29 
30 //----------------------------------------------------------------------------------------
31 // Forward Declarations
32 //----------------------------------------------------------------------------------------
33 class IControlView;
34 class NodeID;
35 class NodeID_rv;
36 //----------------------------------------------------------------------------------------
37 // ITreeViewMgr
38 //----------------------------------------------------------------------------------------
39 
47 class INTERFACE_DECL ITreeViewMgr : public IPMUnknown
48 {
49 public:
50  enum { kDefaultIID = IID_ITREEVIEWMGR };
51 
65  virtual void ChangeRoot( bool16 widgetHeightIsConstant = kFalse ) = 0;
66 
70  virtual void NodeAdded( const NodeID& nodeAdded ) = 0;
71 
75  virtual void NodesAdded( const K2Vector<NodeID>& nodesAdded ) = 0;
76 
80  virtual void BeforeNodeDeleted( const NodeID& nodeDeleted ) = 0;
81 
89  virtual void BeforeNodesDeleted( K2Vector<NodeID>& nodesDeleted ) = 0;
90 
91 
99  virtual void NodeMoved( const NodeID& nodeMoved, const NodeID& oldParent ) = 0;
100 
101  //
109  virtual void NodeChanged( const NodeID& nodeChanged, bool16 childrenChangedAlso = kFalse, int32 message = 0 ) = 0;
110 
111  typedef enum { eScrollToTop, eScrollToMiddle, eScrollIntoView, eScrollToShowChildren } ScrollWhere;
112 
117  virtual void ScrollToNode( const NodeID& scrollToNode, ScrollWhere whereToScroll ) = 0;
118 
123  virtual bool16 IsNodeExpanded( const NodeID& nodeInQuestion ) const = 0;
124 
129  virtual bool16 IsNodeExpanded(IControlView* widget) const = 0;
136  virtual void ExpandNode( const NodeID& nodeToExpand, bool16 expandAllDescendants = kFalse ) = 0;
142  virtual void CollapseNode( const NodeID& nodeToCollapse, bool16 collapseAllDescendants = kFalse ) = 0;
143 
146  virtual void HandleScroll( int32 amount, bool16 up ) = 0;
147 
150  virtual void HandleResize() = 0;
151 
154  virtual void ScrollUp() = 0;
155 
158  virtual void ScrollDown() = 0;
159 
165  virtual NodeID_rv Search( const PMString& partialNodeName ) const = 0;
166 
171  virtual NodeID_rv Search( const NodeID& nodeToSearch ) const = 0;
172 
179  virtual void ClearTree( bool16 clearExpandedNodeList = kFalse ) = 0;
180 
181  //
187  virtual IControlView* QueryWidgetFromNode( const NodeID& node ) const = 0;
188 
191  virtual void Purge(int32 level) = 0;
192 
198  virtual void RefreshSubTree(const NodeID& subTreeRoot, bool16 includeEntireHier = kTrue) = 0;
199 
200  // These methods are for the other TreeMgr interfaces and shouldn't be called by client code
201  virtual void ArrangeWidgets() = 0;
202 
207  virtual PMRect GetViewableArea() = 0;
208 
212  virtual PMPoint GetSizeNeededWihtoutScrollbar() = 0;
213 
217  virtual void ScrollVerticalAbsoluteAmount(int32 amount, bool16 forceRedraw = kTrue) = 0;
218 };
219 
220 
221 
222 
223 
224 #endif // __ITreeViewMgr__