InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CTreeViewController Class Reference
Inheritance diagram for CTreeViewController:
ITreeViewControllerIPMUnknown

Public Types

enum  { eAllowNoSelection = 0, eAllowSingleSelection = 1, eAllowMultipleSelection }
 
- Public Types inherited from ITreeViewController
enum  { kDefaultIID = IID_ITREEVIEWCONTROLLER }
 
enum  SelectCode {
  eSuccess, eNoSelectionAllowed, eSingleItemAlreadySelected, eSingleParentOnly,
  eDiscontiguousNotAllowed, eCantSelectHiddenRootNode
}
 

Public Member Functions

 CTreeViewController (IPMUnknown *boss)
 
virtual void ProcessSelectionRules (IEvent *event, UID node, bool16 notifyOfChange)
 
virtual void DeselectAll (bool16 notifyOfChange=kTrue, bool16 changeHilite=kTrue)
 
virtual SelectCode Select (const NodeID &node, bool16 notifyOfChange=kTrue, bool16 changeHilite=kTrue)
 
virtual void Deselect (const NodeID &node, bool16 notifyOfChange=kTrue, bool16 changeHilite=kTrue)
 
virtual bool16 AllowsSelection () const
 
virtual NodeID GetMasterItem () const
 
void ReadWrite (IPMStream *s, ImplementationID prop)
 

Protected Member Functions

virtual void NotifyOfChange (bool16 notifyOfChange, int32 changeMessage)
 
virtual void ChangeHilite (const NodeID &nodeToHilite, bool16 hilite)
 
virtual void UpdateSelection (const NodeID &, bool16 select)
 
virtual void ClearSelection (bool8 notifyOfSelectionChange=true)
 
virtual bool16 IsSelected (const NodeID &item) const
 
virtual void GetSelectedItems (NodeIDList &selectedItems) const
 
virtual void GetSelectedItemsDisplayOrder (NodeIDList &selectedItems) const
 
virtual bool16 IgnoreIfNodeIsSelected () const
 

Protected Attributes

NodeIDList fSelectedNodes
 
NodeID fFirstSelected
 
int16 fNumSelectableItems
 
bool16 fAllowMultipleParents
 
bool16 fAllowDiscontiguousSelection
 

Member Function Documentation

virtual bool16 CTreeViewController::AllowsSelection () const
virtual

Does this tree allow nodes to be selected.

Returns
kTrue if this tree allows nodes to be selected, kFalse if no nodes are selectable

Implements ITreeViewController.

virtual void CTreeViewController::Deselect (const NodeIDitemToDeselect,
bool16 notifyOfChange = kTrue,
bool16 changeHilite = kTrue 
)
virtual

Deselect the element specified by the given node.

Parameters
itemToDeselect
notifyOfChangekTrue if the change in state should be broadcast to registered observers, kFalse otherwise
changeHilitekTrue if the hilite state should reflect the change

Implements ITreeViewController.

virtual void CTreeViewController::DeselectAll (bool16 notifyOfChange = kTrue,
bool16 changeHilite = kTrue 
)
virtual

Deselect all elements.

Parameters
notifyOfChangekTrue if the change in state should be broadcast to registered observers, kFalse otherwise
changeHilitekTrue if the hilite state should reflect the change

Implements ITreeViewController.

virtual NodeID CTreeViewController::GetMasterItem () const
inlinevirtual

Returns the NodeID of the first item selected.

Returns
NodeID of the first item selected.

Implements ITreeViewController.

virtual void CTreeViewController::GetSelectedItems (NodeIDListselectedItems) const
protectedvirtual

Determine the items selected within the tree control.

Parameters
selectedItemsOUT parameter, is a sorted array arranged in NodeID order

Implements ITreeViewController.

virtual void CTreeViewController::GetSelectedItemsDisplayOrder (NodeIDListselectedItems) const
protectedvirtual

Determine the items selected within the tree control.

Parameters
selectedItemsOUT parameter, is a sorted array arranged in display order.

Implements ITreeViewController.

virtual bool16 CTreeViewController::IsSelected (const NodeIDitem) const
protectedvirtual

Determine if given node is selected

Returns
kTrue if the item specified is selected, kFalse otherwise

Implements ITreeViewController.

virtual void CTreeViewController::ProcessSelectionRules (IEventevent,
UID node,
bool16 notifyOfChange 
)
virtual

Handles a click on the given node to determine how it affects the selection.

Parameters
eventencapsulates event generated by end-user
noderefers to node clicked

Implements ITreeViewController.

virtual SelectCode CTreeViewController::Select (const NodeIDitemToSelect,
bool16 notifyOfChange = kTrue,
bool16 changeHilite = kTrue 
)
virtual

Select the element at the given position in the list.

Parameters
itemToSelect
notifyOfChangekTrue if the change in state should be broadcast to registered observers, kFalse otherwise
changeHilitekTrue if the hilite state should reflect the change
Returns
result of the selection

Implements ITreeViewController.