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

#include <IScrapSuitePasteHelper.h>

Inheritance diagram for IScrapSuitePasteHelper:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISCRAPSUITEPASTEHELPER }
 

Public Member Functions

virtual DragDrop::eHelperType GetHelperType () const =0
 
virtual DataExchangeResponse CanPaste (const IScrapSuite *, IDataExchangeController *dataController) const =0
 
virtual DataExchangeResponse CanPasteInside (const IScrapSuite *, IDataExchangeController *dataController, IControlView *view=nil, const PBPMPoint &point=kInvalidPoint) const =0
 
virtual void AddInternalizeableFlavorsToList (const IScrapSuite *, IDataExchangeController *, OrderedFlavorList &flavorList) const =0
 
virtual ErrorCode Paste (const IScrapSuite *, IClipboardController *clipboard, IControlView *view, bool16 ignoreAttributes=kFalse)=0
 
virtual ErrorCode PasteInside (const IScrapSuite *, IClipboardController *clipboard, IControlView *view, const PBPMPoint &point=kInvalidPoint)=0
 
virtual ErrorCode PasteFromScrap (const IScrapSuite *, IDataExchangeController *dataController, IControlView *view, bool16 ignoreAttributes=kFalse)=0
 
virtual ErrorCode PasteInsideFromScrap (const IScrapSuite *, IDataExchangeController *dataController, IControlView *view, const PBPMPoint &point=kInvalidPoint)=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

IID_ISCRAPSUITEPASTEHELPER interface; This interface is used to add extensibility to IScrapSuite. Scrap suite extensibility requires the suite be derived from CScrapSuite_Extensible. Create a new boss with an IScrapSuitePasteHelper implementation combined with a IK2ServiceProvider implementation that corresponds to the service ID defined by the extensible scrap suite implementation.

When the framework asks an extensible scrap suite if it could perform a paste (or paste inside), the suite then asks each of it's paste helpers if they could perform a paste based on the data flavors on the clipboard. One helper is chosen based on willingness to do so, and in the case of multiple helpers, prioritized by helper type. The extensible suite then forwards the subsequent paste call to the chosen helper.

See Also
IScrapSuite, CScrapSuite_Extensible

Member Function Documentation

virtual void IScrapSuitePasteHelper::AddInternalizeableFlavorsToList (const IScrapSuite,
IDataExchangeController,
OrderedFlavorListflavorList 
) const
pure virtual

Get the external flavors that can be converted during Internalize (or Paste) Flavors should be added to the end of the list, in order by quality of the conversion (highest quality first). The helper function AppendFlavorIfUnique should be used.

Parameters
suiteIN handler this helper is associated with
dataControllerIN the controller (shouldn't be needed here)
flavorListIN/OUT add flavors to the end of list
virtual DataExchangeResponse IScrapSuitePasteHelper::CanPaste (const IScrapSuite,
IDataExchangeControllerdataController 
) const
pure virtual

Could the helper perform a paste with the current data from a data exchange controller (not necessarily the clipboard).

Parameters
suiteIN the scrap suite this helper is assisting
dataControllerIN the controller holding the data
Returns
response from the data exchange handler that would perform any necessary conversions
virtual DataExchangeResponse IScrapSuitePasteHelper::CanPasteInside (const IScrapSuite,
IDataExchangeControllerdataController,
IControlViewview = nil,
const PBPMPointpoint = kInvalidPoint 
) const
pure virtual

Could the helper perform a paste inside with the current data from a data exchange controller (not necessarily the clipboard).

Parameters
suiteIN the scrap suite this helper is assisting
dataControllerIN the controller holding the data
viewIN optional active view parameter (this parameter remains for historical reasons)
pointIN point in pasteboard coordinates to use for paste inside. Use kInvalidPoint to ignore and use selection as basis. (this parameter remains for historical reasons)
Returns
response from the data exchange handler that would perform any necessary conversions
virtual DragDrop::eHelperType IScrapSuitePasteHelper::GetHelperType () const
pure virtual

Return the type or priority of the helper. This is used to resolve conflicts that can arise when more than one paste helper is capable of performing a paste operation. The presence of multiple helpers is not a conflict, a conflict would arise when one helper wants to replace or augment what another helper already does.

Returns
helper type appropriate for this helper. Use DragDrop::kDefaultHelper by default.
virtual ErrorCode IScrapSuitePasteHelper::Paste (const IScrapSuite,
IClipboardControllerclipboard,
IControlViewview,
bool16 ignoreAttributes = kFalse 
)
pure virtual

Paste item(s) from the clipboard to the active context

Parameters
suiteIN the scrap suite this helper is assisting
clipboardIN the clipboard controller
viewIN currently active view (this parameter remains for historical reasons)
ignoreAttributesIgnore the attributes when pasting, default to kFalse
Returns
DESCRIPTION
virtual ErrorCode IScrapSuitePasteHelper::PasteFromScrap (const IScrapSuite,
IDataExchangeControllerdataController,
IControlViewview,
bool16 ignoreAttributes = kFalse 
)
pure virtual

Paste item(s) from a data exchange controller to the active context

Parameters
suiteIN the scrap suite this helper is assisting
dataControllerIN the controller holding the data
viewIN currently active view (this parameter remains for historical reasons)
kFalseINOUT DESCRIPTION
Returns
DESCRIPTION
virtual ErrorCode IScrapSuitePasteHelper::PasteInside (const IScrapSuite,
IClipboardControllerclipboard,
IControlViewview,
const PBPMPointpoint = kInvalidPoint 
)
pure virtual

Paste item(s) on the clipboard inside the selected item (first of selected items)

Parameters
suiteIN the scrap suite this helper is assisting
clipboardIN the clipboard controller
viewIN currently active view (this parameter remains for historical reasons)
pointIN point in pasteboard coordinates to use for paste inside. Use kInvalidPoint to ignore and use selection as basis. (this parameter remains for historical reasons)
Returns
DESCRIPTION
virtual ErrorCode IScrapSuitePasteHelper::PasteInsideFromScrap (const IScrapSuite,
IDataExchangeControllerdataController,
IControlViewview,
const PBPMPointpoint = kInvalidPoint 
)
pure virtual

Paste item(s) from a data exchange controller inside the selected item (first of selected items)

Parameters
suiteIN the scrap suite this helper is assisting
dataControllerIN the controller holding the data
viewIN currently active view (this parameter remains for historical reasons)
pointIN point in pasteboard coordinates to use for paste inside. Use kInvalidPoint to ignore and use selection as basis. (this parameter remains for historical reasons)
Returns
DESCRIPTION