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

#include <ILinkEditAction.h>

Inheritance diagram for ILinkEditAction:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ILINKEDITACTION }
 

Public Member Functions

virtual bool CanEdit (const UIDRef &linkRef) const =0
 
virtual bool BeforeOpen (const UIDRef &linkRef) const =0
 
virtual void AfterOpen (const UIDRef &linkRef) 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

ILinkEditAction is used to implement limited control over the editing of the link(s) an ILinkObject is linked to. When a link is edited, an attempt is made to get an ILinkEditAction interface off the ILinkObject the link links by calling the ILinkObject::QueryLinkedObject method. If the interface is found, a check is made to ensure the object allows editing of the link.

If editing is allowed, the BeforeOpen method is called before the link is opened for editing. Any pre-edit processing that needs to be performed by the object can be done in the BeforeOpen method. The method can also cause the edit operation to be aborted by returning false. If BeforeOpen returns true, the edit operation continues, and the link's resource is opened for edit.

After the resource is successfully opened for edit, the AfterOpen method is called to allow processing of any post open for edit operations required.

See Also
ILink
ILinkFacade
ILinkObject
ILinkResource

Member Function Documentation

virtual void ILinkEditAction::AfterOpen (const UIDReflinkRef) const
pure virtual

Called right after a link resource is opened for edit.

Parameters
linkRef[IN] UIDRef of the link whose resource is being edited.
virtual bool ILinkEditAction::BeforeOpen (const UIDReflinkRef) const
pure virtual

Called before a link resource is opened for edit.

Parameters
linkRef[IN] UIDRef of the link whose resource is to be edited.
Returns
True to continue and open the link resource for edit, else false to abort the edit operation.
virtual bool ILinkEditAction::CanEdit (const UIDReflinkRef) const
pure virtual

Called to determine if it is OK to allow a link resource to be edited.

Parameters
linkRef[IN] UIDRef of the link whose resource to check.
Returns
True to allow the link resource to be edited, else false.