InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpManipulateStructureView Class Reference

Public Member Functions

ErrorCode ChangeStructureViewState (IActiveContext *activeContext, bool16 setVisible)
 
bool16 IsStructureViewSelectionNonEmpty (IActiveContext *activeContext)
 
bool16 IsStructureViewShowing (const UIDRef &documentUIDRef)
 
ErrorCode SetExplicitStructureViewSelection (IActiveContext *activeContext, const XMLReference &xmlReference)
 
ErrorCode SetExplicitStructureViewRootSelected (IActiveContext *activeContext)
 

Detailed Description

Manipulate the state of the structure-view:

  • query or set selections in the structure-view
  • query visibility and change visibility.

These methods mainly take IActiveContext, implicitly meaning they are likely to be useful when writing your user interface, that is, client code.

See Also
_SnpRunnerManipulateStructureView::Run for driver code

Member Function Documentation

ErrorCode SnpManipulateStructureView::ChangeStructureViewState (IActiveContextactiveContext,
bool16 setVisible 
)

Show or hide the structure-view

Parameters
activeContextspecifies current active context
setVisiblekTrue to show, kFalse to hide
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
bool16 SnpManipulateStructureView::IsStructureViewSelectionNonEmpty (IActiveContextactiveContext)

Determine if nodes are selected in the structure-view

Parameters
activeContextspecifies current active context
Returns
bool16 indicating whether there's node(s) selected in structure view
bool16 SnpManipulateStructureView::IsStructureViewShowing (const UIDRefdocumentUIDRef)

Determine if structure-view window is showing

Precondition
documentUIDRef should allow IDocument to be instantiated
Parameters
documentUIDRefspecifies document of interest
Returns
kTrue if visible, kFalse if not
ErrorCode SnpManipulateStructureView::SetExplicitStructureViewRootSelected (IActiveContextactiveContext)

Explicitly set the root element in the structure-view to be selected.

Parameters
activeContextspecifies current active context
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpManipulateStructureView::SetExplicitStructureViewSelection (IActiveContextactiveContext,
const XMLReferencexmlReference 
)

Set a selection in the structure-view explicitly

Precondition
xmlReference should allow IIDXMLElement to be instantiated
Parameters
activeContextspecifies current active context
xmlReferencespecifies the element to select
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise