InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITreeViewWidgetMgr Class Referenceabstract

#include <ITreeViewWidgetMgr.h>

Inheritance diagram for ITreeViewWidgetMgr:
IPMUnknownCTreeViewWidgetMgrBscSlDlgTreeViewWidgetMgrCusCondTxtTreeViewWidgetMgrCusDtLnkUITreeTVWidgetMgrDataUpdaterUITVWidgetMgrDCLSizTreeViewWidgetMgrLnkWtchTreeViewWidgetMgrPnlTrvTVWidgetMgrPstLstUITVWidgetMgrStringListBoxWidgetMgrTKITreeViewWidgetMgrViewListBoxTreeViewWidgetMgrWLBCmpTVWidgetMgr

Public Types

enum  { kDefaultIID = IID_ITREEVIEWWIDGETMGR }
 

Public Member Functions

Widget Factory and reuse
virtual IControlViewCreateWidgetForNode (const NodeID &node) const =0
 
virtual WidgetID GetWidgetTypeForNode (const NodeID &node) const =0
 
virtual bool16 ApplyNodeIDToWidget (const NodeID &node, IControlView *widget, int32 message=0) const =0
 
virtual void PreDeleteWidget (IControlView *widget)=0
 
Widget placement
virtual PMReal GetNodeWidgetHeight (const NodeID &node) const =0
 
virtual PMReal GetNodeWidgetWidth (const NodeID &node) const =0
 
virtual PMReal GetIndentForNode (const NodeID &node) const =0
 
Widget Style - The tree view may have different looks, i.e. Large vs. Small palette rows
virtual void SetStyle (int32 styleIdentifier)=0
 
virtual int32 GetStyle () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface responsible for creating the tree-view control widgets and applying node data to the widget.

Should be implemented by client code wishing to use a tree-view widget.

Member Function Documentation

virtual bool16 ITreeViewWidgetMgr::ApplyNodeIDToWidget (const NodeIDnode,
IControlViewwidget,
int32 message = 0 
) const
pure virtual

Change data in your nodeWidget(widget) to reflect the node passed in.

Parameters
nodespecifies node to be rendered
widgetthis is where the data from the node should be rendered
messageif you call an ITreeViewMgr method with a message, that message will be passes back to you in this parameter. For instance, if it is expensive to update the text, but not the icon. You could pass yourself a kMyIconChanged message in ITreeViewMgr::NodeChanged() and then only update the icon in ApplyDataToWidget() if message=kMyIconChanged
Returns
kTrue if you were successful in applying data, kFalse if unsuccessful. If kFalse is returned, the TreeViewMgr will ask you to create a new widget for this node with CreateWidgetForNode() and then ask to apply data again

Implemented in CusDtLnkUITreeTVWidgetMgr, PnlTrvTVWidgetMgr, DataUpdaterUITVWidgetMgr, CTreeViewWidgetMgr, CusCondTxtTreeViewWidgetMgr, and StringListBoxWidgetMgr.

virtual IControlView* ITreeViewWidgetMgr::CreateWidgetForNode (const NodeIDnode) const
pure virtual

Create the widget, but don't change the widget-data to match the node. That should be handled in ApplyNodeIDToWidget

Parameters
node
Returns
reference to IControlView interface on newly created widget boss object

Implemented in CTreeViewWidgetMgr, CusDtLnkUITreeTVWidgetMgr, PnlTrvTVWidgetMgr, DataUpdaterUITVWidgetMgr, CusCondTxtTreeViewWidgetMgr, StringListBoxWidgetMgr, TKITreeViewWidgetMgr, and ViewListBoxTreeViewWidgetMgr.

virtual PMReal ITreeViewWidgetMgr::GetIndentForNode (const NodeIDnode) const
pure virtual
Parameters
node
Returns
indent in pixels for widget rendering given node

Implemented in CusDtLnkUITreeTVWidgetMgr, PnlTrvTVWidgetMgr, DataUpdaterUITVWidgetMgr, CTreeViewWidgetMgr, and PstLstUITVWidgetMgr.

virtual PMReal ITreeViewWidgetMgr::GetNodeWidgetHeight (const NodeIDnode) const
pure virtual
Parameters
node
returndesired height in pixels of widget rendering given node

Implemented in CTreeViewWidgetMgr, StringListBoxWidgetMgr, and ViewListBoxTreeViewWidgetMgr.

virtual PMReal ITreeViewWidgetMgr::GetNodeWidgetWidth (const NodeIDnode) const
pure virtual
Parameters
node
Returns
desired width in pixels of widget rendering given node

Implemented in CTreeViewWidgetMgr, StringListBoxWidgetMgr, and ViewListBoxTreeViewWidgetMgr.

virtual int32 ITreeViewWidgetMgr::GetStyle () const
pure virtual
Returns
arbitrary style identifer used by the interface. See SetStyle

Implemented in CTreeViewWidgetMgr.

virtual WidgetID ITreeViewWidgetMgr::GetWidgetTypeForNode (const NodeIDnode) const
pure virtual

Determine a widget id that corresponds to the type of widget that should be used to render data from the given node

Parameters
nodespecifies the node of interest
Returns
a widget ID for a widget type that can be used to render this node's data

Implemented in CTreeViewWidgetMgr, CusDtLnkUITreeTVWidgetMgr, PnlTrvTVWidgetMgr, and DataUpdaterUITVWidgetMgr.

virtual void ITreeViewWidgetMgr::PreDeleteWidget (IControlViewwidget)
pure virtual

Only TreeViews that need to do something prior to the tree deleting a widget will need to override this method. This method is called from the tree view manaager before it deletes a widget. For example, this provides the widget manager client to disconnect any child widgets it wants to continue to manage.

Parameters
widgetthis is the widget that is being deleted

Implemented in CTreeViewWidgetMgr, and ViewListBoxTreeViewWidgetMgr.

virtual void ITreeViewWidgetMgr::SetStyle (int32 styleIdentifier)
pure virtual

Set a style for the TreeView. These are essentially client defined and can be used however you like. This method is not called by the Tree Architecture, but can be called by a given tree implementaion to change the look of the tree.

Parameters
styleIdentifierthis is a client defined number that arbitrarily identifies a style. For you convenience, 2 standard styles identifiers have been provided, kSmallPaletteRowsTreeStyle and kLargePaletteRowsTreeStyle

Implemented in CTreeViewWidgetMgr.