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

#include <IReferencePointSuite.h>

Inheritance diagram for IReferencePointSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IREFERENCEPOINTSUITE }
 

Public Member Functions

virtual bool16 ViewHasReferencePoint (IControlView *view) const =0
 
virtual
IReferencePointData::ReferencePointPosition 
GetViewDefaultReferencePosition (IControlView *view) const =0
 
virtual
IReferencePointData::ReferencePointPosition 
GetViewReferencePointPosition (IControlView *view) const =0
 
virtual
IReferencePointData::ReferenceAppearance 
GetViewReferenceAppearance (IControlView *view) const =0
 
virtual PMLine GetViewReferenceLine (IControlView *view) const =0
 
virtual bool16 CanChangeViewReferencePoint (IControlView *view) const =0
 
virtual PBPMPoint CalculateViewReferencePoint (IControlView *view, IReferencePointData::ReferencePointPosition position, PBPMRect *referenceFrame=nil)=0
 
virtual ErrorCode ChangeViewReferencePoint (IControlView *view, IReferencePointData::ReferencePointPosition newPosition, const PMPoint &newPoint, const PBPMRect &referenceFrame=kZeroRect)=0
 
virtual ErrorCode ChangeViewReferencePosition (IControlView *view, IReferencePointData::ReferencePointPosition newPosition)=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

A selection suite to operate on the reference point. InDesign has just one global reference point and position, but it may be accessed via several suites, and the reference point in different suites has some different behaviors. e.g. In the text selection suite we never draw the reference point, though it still exists.

See Also
IRefPointUIUtils.h

Member Function Documentation

virtual PBPMPoint IReferencePointSuite::CalculateViewReferencePoint (IControlViewview,
IReferencePointData::ReferencePointPosition position,
PBPMRectreferenceFrame = nil 
)
pure virtual

Calculate the current reference point for the given position for the current selection.

Parameters
position[IN] the new reference position
nilOUT Optionally return parent rectangle in pasteboard coordinates if it exists (e.g. graphic item direct selected)
Returns
PBPMPoint
virtual bool16 IReferencePointSuite::CanChangeViewReferencePoint (IControlViewview) const
pure virtual

Can the reference point be changed for the current selection? A single guide cannot have its reference point changed, since it is always kCenter.

Returns
bool16 Return kTrue if the reference point can be changed, kFalse otherwise.
virtual ErrorCode IReferencePointSuite::ChangeViewReferencePoint (IControlViewview,
IReferencePointData::ReferencePointPosition newPosition,
const PMPointnewPoint,
const PBPMRectreferenceFrame = kZeroRect 
)
pure virtual

Change the reference point for the selection suite to the new values.

Parameters
newPosition[IN] the new reference point position
newPoint[IN] the new reference point value in pasteboard coordinates
referenceFrame[IN] the new parent reference frame, use kZeroRect if it doesn't apply
Returns
ErrorCode the result of the command to change the reference point
See Also
kMoveReferencePointCmdBoss
virtual ErrorCode IReferencePointSuite::ChangeViewReferencePosition (IControlViewview,
IReferencePointData::ReferencePointPosition newPosition 
)
pure virtual

Change just the reference position for the selection suite based on its selection.

Parameters
newPosition[IN] the new reference position
Returns
ErrorCode the result of processing the command to move the position
virtual IReferencePointData::ReferencePointPosition IReferencePointSuite::GetViewDefaultReferencePosition (IControlViewview) const
pure virtual

Return the default reference position for the specified selection. For a guide selection, it is kCenter, otherwise it is the current position.

Returns
IReferencePointData::ReferencePointPosition the current position of the reference point.
virtual IReferencePointData::ReferenceAppearance IReferencePointSuite::GetViewReferenceAppearance (IControlViewview) const
pure virtual

Return what the proxy representation should be (line, 9 point, single point, etc.)

Returns
ReferenceAppearance the appearance of the proxy.
virtual PMLine IReferencePointSuite::GetViewReferenceLine (IControlViewview) const
pure virtual

Return the PMLine for the selection, undefined if GetReferenceAppearance != kLine. We use the line appearance whenever a line is selected. Can be a vertical, horizontal, or diagonal line that best matches the angle of the line selection. Also used for

Returns
a PMLine that represents the selection.
See Also
IPathInfoUtils.h
GetLine
virtual IReferencePointData::ReferencePointPosition IReferencePointSuite::GetViewReferencePointPosition (IControlViewview) const
pure virtual

Return the reference position for the current selection.

Returns
IReferencePointData::ReferencePointPosition one of nine positions, or other.
virtual bool16 IReferencePointSuite::ViewHasReferencePoint (IControlViewview) const
pure virtual

Does the current selection have a visible reference point? Currently the LayoutCSB is the only selection the has a visible reference point, and it applies whenever there is a non-guide selection. In practice, we only actually draw the reference point when one of the transform tools is also selected (e.g. Rotate, Scale, Shear tools).

Returns
bool16 Return kTrue if a reference point should be shown, kFalse otherwise.