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

#include <IGeometrySuite.h>

Inheritance diagram for IGeometrySuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGEOMETRYSUITE }
 

Public Member Functions

virtual Transform::CoordinateSpace DefaultMeasurementSpace () const =0
 
virtual Transform::CoordinateSpace DefaultBoundsSpace () const =0
 
virtual int32 GetGeometryItemsCount () const =0
 
virtual bool16 CanChangeSelectionHeight (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 CanChangeSelectionWidth (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 CanChangeSelectionSize (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 CanChangeSelectionLength (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 SelectionIsAStraightLine (PathInfo *pathInfo) const =0
 
virtual bool16 SelectionIsAPoint (PathInfo *pathInfo) const =0
 
virtual bool16 SelectionHasHeight (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 SelectionHasWidth (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 SelectionHasSize (const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual void GetSelectionDimensions_ (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > *widths, K2Vector< PMReal > *heights, bool32 *itemsHaveWidth, bool32 *itemsHaveHeight) const =0
 
virtual void GetSelectionDimensions_ (Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > *widths, K2Vector< PMReal > *heights, bool32 *itemsHaveWidth, bool32 *itemsHaveHeight) const =0
 
virtual ErrorCode ResizeSelection (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::TransformOrigin &referencePoint, const Geometry::ResizeValue &newSize, Transform::Target duplicate=Transform::OriginalItems())=0
 
virtual ErrorCode ResizeSelection (Geometry::BoundsKind boundsKind, const Transform::TransformOrigin &referencePoint, const Geometry::ResizeValue &newSize, Transform::Target duplicate=Transform::OriginalItems())=0
 
virtual void GetSelectionHeight (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetSelectionHeight (Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetSelectionWidth (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetSelectionWidth (Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetSelectionLength (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetSelectionLength (Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetSelectionSize (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMPoint > &results) const =0
 
virtual void GetSelectionSize (Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMPoint > &results) const =0
 
virtual PMRect GetSelectionBounds (const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind kind) const =0
 
virtual void GetSelectionPathInfo (PathInfo *pathInfo) const =0
 
bool16 CanChangeSelectionHeight () const
 
bool16 CanChangeSelectionWidth () const
 
bool16 CanChangeSelectionSize () const
 
bool16 CanChangeSelectionLength () const
 
bool16 SelectionHasHeight () const
 
bool16 SelectionHasWidth () const
 
bool16 SelectionHasSize () const
 
void GetSelectionHeight (Geometry::BoundsKind boundsKind, K2Vector< PMReal > &results) const
 
void GetSelectionWidth (Geometry::BoundsKind boundsKind, K2Vector< PMReal > &results) const
 
void GetSelectionLength (Geometry::BoundsKind boundsKind, K2Vector< PMReal > &results) const
 
void GetSelectionSize (Geometry::BoundsKind boundsKind, K2Vector< PMPoint > &results) const
 
void GetSelectionDimensions_ (Geometry::BoundsKind boundsKind, K2Vector< PMReal > *widths, K2Vector< PMReal > *heights, bool32 *itemsHaveWidth, bool32 *itemsHaveHeight) const
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Friends

class GeometrySuiteASB
 

Detailed Description

IID_IGEOMETRYSUITE interface; this interface involves selections, different selection (concrete selection), such as Layout, Text, Table etc. implemention it own, when clieent code ask for a method, it check current selection and let each selection CSB do their own.

Member Function Documentation

virtual bool16 IGeometrySuite::CanChangeSelectionHeight (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Can any of the CSBs change height?

Returns
bool16
virtual bool16 IGeometrySuite::CanChangeSelectionLength (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Can any of the CSBs change length?

Returns
bool16
virtual bool16 IGeometrySuite::CanChangeSelectionSize (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Can any of the CSBs change width?

Returns
bool16
virtual bool16 IGeometrySuite::CanChangeSelectionWidth (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Can any of the CSBs change width?

Returns
bool16
virtual PMRect IGeometrySuite::GetSelectionBounds (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind kind 
) const
pure virtual

Get the bounds of the selected items is one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates() is one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()

virtual void IGeometrySuite::GetSelectionDimensions_ (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > * widths,
K2Vector< PMReal > * heights,
bool32 * itemsHaveWidth,
bool32 * itemsHaveHeight 
) const
pure virtual
This routine is used by panels to collect width and height info for a list of page items.

It does the same work as GetItemsSize, GetItemsHeight, ItemsHaveWidth and ItemsHaveHeight but more efficiently because it can do it all at the same time.

Parameters
boundsSpace[IN] stroke bounds, path bounds, etc
measurementSpace[IN] inner coordinates, spread coordinates, etc.
widths[OUT] If non-nil, will contain the width values
heights[OUT] If non-nil, will contain the height values
itemsHaveWidth[OUT] If non-nil, will contain whether or not the items have width
itemsHaveHeight[OUT] If non-nil, will contain whether or not the items have height
virtual void IGeometrySuite::GetSelectionHeight (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > & results 
) const
pure virtual

Return the height of the selection. is one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates() is one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()

Parameters
K2Vector<PMReal>&
virtual void IGeometrySuite::GetSelectionLength (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > & results 
) const
pure virtual

Get the length of the selected items (note, it is not number of selected items) is one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates() is one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()

Parameters
K2Vector<PMReal>&
virtual void IGeometrySuite::GetSelectionPathInfo (PathInfopathInfo) const
pure virtual

Fill out the path info for the selection.

Parameters
pathInfo
virtual void IGeometrySuite::GetSelectionSize (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMPoint > & results 
) const
pure virtual

Get the rectangular size of the selection. is one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates() is one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()

Parameters
K2Vector<PMReal>&
virtual void IGeometrySuite::GetSelectionWidth (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > & results 
) const
pure virtual

Get the width of the selection. is one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates() is one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()

Parameters
K2Vector<PMReal>&
virtual ErrorCode IGeometrySuite::ResizeSelection (const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::TransformOriginreferencePoint,
const Geometry::ResizeValuenewSize,
Transform::Target duplicate = Transform::OriginalItems() 
)
pure virtual

ResizeSelection changes the size of every selected item according to the given newSize parameter. The change is made in coordinateSpace coordinates relative to referencePoint. The boundsKind parameter specifies whether the target size is for the bounding box of the mathematical path of each selected item or the potentially larger stroke bounds.

Note that resizing a selected page item does not, in general, reposition any content within that page item that doesn't automatically reflow on its own (like text or the children of a group). In particular, an image within a graphic frame will be cropped by the newly sized frame. The pixels themselves will not change in size or move on the page. (If one resizes the image itself, rather than the graphic frame, the pixels are simply scaled so that the image fills the new frame.)

is one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates() is the stationary point of the resize operation is one of the following: Geometry::AddTo( Geometry::KeepCurrentValue(), y_delta) Geometry::AddTo( x_delta, Geometry::KeepCurrentValue()) Geometry::AddTo( Geometry::KeepCurrentProportions(), y_delta) Geometry::AddTo( x_delta, Geometry::KeepCurrentProportions()) Geometry::AddTo( x_delta, y_delta)

Geometry::MultiplyBy( Geometry::KeepCurrentValue(), y_factor) Geometry::MultiplyBy( x_factor, Geometry::KeepCurrentValue()) Geometry::MultiplyBy( Geometry::KeepCurrentProportions(), y_factor) Geometry::MultiplyBy( x_factor, Geometry::KeepCurrentProportions()) Geometry::MultiplyBy( x_factor, y_factor)

Geometry::ResizeTo( Geometry::KeepCurrentValue(), y_value) Geometry::ResizeTo( x_value, Geometry::KeepCurrentValue()) Geometry::ResizeTo( Geometry::KeepCurrentProportions(), y_value) Geometry::ResizeTo( x_value, Geometry::KeepCurrentProportions()) Geometry::ResizeTo( x_value, y_value)

is one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()

virtual bool16 IGeometrySuite::SelectionHasHeight (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Does the selection have a height?

Returns
kTrue if selection has a 'height' attribute, kFalse otherwise
virtual bool16 IGeometrySuite::SelectionHasSize (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Does the selection have a height?

Returns
kTrue if selection has a 'width' attribute, kFalse otherwise
virtual bool16 IGeometrySuite::SelectionHasWidth (const Transform::CoordinateSpaceboundsSpace) const
pure virtual

Does the selection have a height?

Returns
kTrue if selection has a 'width' attribute, kFalse otherwise
virtual bool16 IGeometrySuite::SelectionIsAPoint (PathInfopathInfo) const
pure virtual

Is path a single point

Parameters
pathInfopath
Returns
kTrue if path is a single point, kFalse otherwise
virtual bool16 IGeometrySuite::SelectionIsAStraightLine (PathInfopathInfo) const
pure virtual

Is selection a straight line

Parameters
pathInfopath (points) information see IPathInfoUtils.h
Returns
kTrue if path is a straight line, kFalse otherwise