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

Public Member Functions

 SnpShowPalette ()
 
virtual ~SnpShowPalette ()
 
ErrorCode ShowHide (const PaletteRef &palRef, bool16 isShow)
 
ErrorCode ShowHideByAction (const ActionID &actionID, bool16 isShow)
 
ErrorCode GetPanelsRegistered (std::map< PMString, PaletteRef > &outNameUIDMap)
 
bool16 IsShowing (const PaletteRef &palRef)
 
bool16 IsShowingByAction (const ActionID &actionID)
 
bool16 IsShowingByWidget (const WidgetID &widgetID)
 
ErrorCode ShowHideByWidget (const WidgetID &widgetID, bool16 isShowing)
 
ErrorCode RunScenario (IActiveContext *activeContext)
 

Detailed Description

Shows how to:

  • Discover default properties of palette-panel widgets via action component (IActionComponent)
  • Show or hide a widget by ActionID, PaletteRef or WidgetID

Constructor & Destructor Documentation

SnpShowPalette::SnpShowPalette ()
inline

Constructor.

virtual SnpShowPalette::~SnpShowPalette ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode SnpShowPalette::GetPanelsRegistered (std::map< PMString, PaletteRef > & outNameUIDMap)

Acquire collection of palette-panel widgets, as mapping from names to UIDs.

Parameters
outNameUIDMapmap that contains name to UID map for known palette-panels
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
bool16 SnpShowPalette::IsShowing (const PaletteRefpalRef)

Determine if specified palette is showing

Parameters
palRefspecifies the palette-panel of interest
Returns
kTrue if showing, kFalse if not
bool16 SnpShowPalette::IsShowingByAction (const ActionIDactionID)

Determine if specified panel is showing

Parameters
actionIDspecifies panel of interest
Returns
kTrue if showing, kFalse if not
bool16 SnpShowPalette::IsShowingByWidget (const WidgetIDwidgetID)

Determine if specified panel is showing

Parameters
widgetIDspecifies panel of interest
Returns
kTrue if showing, kFalse if not
ErrorCode SnpShowPalette::RunScenario (IActiveContextactiveContext)

Implements scenario that exercises the code in this snippet.

Parameters
activeContext
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpShowPalette::ShowHide (const PaletteRefpalRef,
bool16 isShow 
)

Show or hide panel widget by its UID.

Parameters
palRefthe palette-panel to show or hide
isShowspecifies whether to show (if kTrue) or hide (if kFalse)
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpShowPalette::ShowHideByAction (const ActionIDactionID,
bool16 isShow 
)

Show or hide palette-panel widget by associated ActionID.

Parameters
actionIDidentifies the action to show the palette
isShowspecifies whether to show (if kTrue) or hide (if kFalse)
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpShowPalette::ShowHideByWidget (const WidgetIDwidgetID,
bool16 isShowing 
)

Show or hide by WidgetID

Parameters
widgetIDspecifies which widget
isShowingkTrue to show the panel, kFalse to hide it
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise