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

#include <IDragDropTextHelper.h>

Inheritance diagram for IDragDropTextHelper:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDRAGDROPTEXTHELPER }
 

Public Member Functions

virtual IParcelQueryParcelFromHitObject (IControlView *view, const PMPoint &where, const IPMUnknown *hitObj, const IParcel *previousParcel)=0
 
virtual ITextStoryThreadQueryStoryThreadFromHitObject (IControlView *view, const PMPoint &where, const IPMUnknown *hitObj, const IParcel *previousParcel)=0
 
virtual void AdjustRangeFromHitTest (IControlView *view, const UIDRef &storyUIDRef, const PMReal &hitIndex, const PMReal &nextLine, RangeData &adjustedRange)=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

Helper interface used for text dragging and dropping. Installed on same boss as text drag drop source and target.

Member Function Documentation

virtual void IDragDropTextHelper::AdjustRangeFromHitTest (IControlViewview,
const UIDRefstoryUIDRef,
const PMRealhitIndex,
const PMRealnextLine,
RangeDataadjustedRange 
)
pure virtual

Description: Adjust a range data (with correct lean) as computed by AdjustHitTestTextIndex for the story and text indices. Should have length of zero. Gives helper a chance to examine the display text index and range and alter if necessary (e.g. convert to model range, etc.).

Parameters
viewIN pointer to the control view under the mouse
storyUIDRefIN Reference to the story to drop into (the destination)
hitIndexIN the display text index to construct the range with
nextLineIN the nextLine text index of the first character in the next line after the line hit (useful for computing the lean)
storyUIDRefIN Reference to the story to drop into (the destination)
RangeDataOUT the altered text range with correct lean representing the hit location.
virtual IParcel* IDragDropTextHelper::QueryParcelFromHitObject (IControlViewview,
const PMPointwhere,
const IPMUnknownhitObj,
const IParcelpreviousParcel 
)
pure virtual

Description: Query for an IParcel interface from an object.

Parameters
viewIN pointer to the control view under the mouse
whereIN the point in pasteboard coordinates to use
hitObjIN an IPMUnknown* from the object to test.
previousParcelIN an IParcel interface from a possible previous hit. May be nil, and will be nil initially.
Returns
IParcel the parcel interface from the object. Return nil if not found. Caller must release reference.
virtual ITextStoryThread* IDragDropTextHelper::QueryStoryThreadFromHitObject (IControlViewview,
const PMPointwhere,
const IPMUnknownhitObj,
const IParcelpreviousParcel 
)
pure virtual

Description: Query for an ITextStoryThread interface from an object.

Parameters
viewIN pointer to the control view under the mouse
whereIN the point in pasteboard coordinates to use
hitObjIN an IPMUnknown* from the object to test.
previousParcelIN an IParcel interface from a possible previous hit. May be nil, and will be nil initially.
Returns
ITextStoryThread the text story thread interface from the object. Return nil if not found. Caller must release reference.