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

Public Member Functions

 SnpProcessDocumentLayerCmds ()
 
virtual ~SnpProcessDocumentLayerCmds ()
 
ErrorCode CreateNewLayer (IDocument *doc)
 
ErrorCode CopyToNewLayer (IDocument *doc, IControlView *view)
 
ErrorCode CreateActiveLayer (IDocument *doc, IControlView *view)
 
ErrorCode CopySelectedItems (IControlView *view)
 
ErrorCode SetLayerPrefs (bool16 pasteRemembersLayers)
 
bool16 GetPasteRemembersLayers ()
 
ErrorCode SelectAllItemsOnActiveLayer (IDocument *doc, IControlView *view)
 
ErrorCode ChangeItemName (UIDRef selectedItemRef, PMString itemName)
 
ErrorCode ShowHidePageItem (UIDRef selectedItemRef)
 

Detailed Description

  • how to write code that processes document layer commands and sequence of commands.

Constructor & Destructor Documentation

SnpProcessDocumentLayerCmds::SnpProcessDocumentLayerCmds ()
inline

Constructor.

virtual SnpProcessDocumentLayerCmds::~SnpProcessDocumentLayerCmds ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode SnpProcessDocumentLayerCmds::ChangeItemName (UIDRef selectedItemRef,
PMString itemName 
)

change the current selected item name if it is not assigned by user

Parameters
selectedItemRefIN the current selected item
itemNameIN the new pageitem name
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpProcessDocumentLayerCmds::CopySelectedItems (IControlViewview)

Copy/Paste the current selection into the current layer via the IScrapSuite and the clipboard.

Parameters
viewIN the control view
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpProcessDocumentLayerCmds::CopyToNewLayer (IDocumentdoc,
IControlViewview 
)
Parameters
docIN the document
viewIN the control view
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpProcessDocumentLayerCmds::CreateActiveLayer (IDocumentdoc,
IControlViewview 
)

Invokes NewLayerCmd to create a new command followed by SetActiveLayerCmd to make the new layer active.

Parameters
docIN the document
viewIN the control view
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpProcessDocumentLayerCmds::CreateNewLayer (IDocumentdoc)
Parameters
docIN the document
Returns
kSuccess on success, other ErrorCode otherwise.
bool16 SnpProcessDocumentLayerCmds::GetPasteRemembersLayers ()

Queries the layer preferences to find if the preference PasteRemembersLayers is set.

Returns
kTrue PasteRemembersLayers is On, kFalse PasteRemembersLayers is Off.
ErrorCode SnpProcessDocumentLayerCmds::SelectAllItemsOnActiveLayer (IDocumentdoc,
IControlViewview 
)

select all page items on active layer

Parameters
docIN the current document
viewIN the control view to use
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpProcessDocumentLayerCmds::SetLayerPrefs (bool16 pasteRemembersLayers)

Invokes SetLayerPrefsCmd to set layer preferences

Parameters
pasteRemembersLayersIN whether or not to set PasteRemembersLayers preference
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpProcessDocumentLayerCmds::ShowHidePageItem (UIDRef selectedItemRef)

hide the current selected item

Parameters
selectedItemRefIN the current selected item
Returns
kSuccess on success, other ErrorCode otherwise.