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

#include <IShape.h>

Inheritance diagram for IShape:
IPMUnknownCShapeCPathShapeCGraphicFrameShapeBscShpShapeCdlChartShape

Public Types

enum  { kDefaultIID = IID_ISHAPE }
 
enum  {
  kNoFlags = 0, kDrawingClippedOutImageData = 1, kUseXOR = 2, kDrawResizeDynamic = 4,
  kDrawRotateDynamic = 8, kDrawScaleDynamic = 16, kDrawMoveDynamic = 32, kDrawCreateDynamic = 64,
  kPatientUser = 128, kDynamicPause = 256, kPrinting = 512, kDoBroadcast = 1024,
  kDrawFrameEdge = 2048, kPreviewMode = 4096
}
 
enum  {
  kSelect = 1, kDirectSelect = 2, kGroupSelect = 4, kOverrideMasterPageItemNoSelect = 8,
  kOverrideMasterPageItem = kOverrideMasterPageItemNoSelect + kSelect, kHitTest = 16, kSolidSelect = 32, kOnlyPath = 64,
  kHitTestLockedLayers = 128, kHitTextOnPath = 256, kOverrideThreadedMasterPageItems = 512
}
 
enum  {
  kIsAMasterPageItem = 1, kSkipChildren = 2, kSkipHiddenLayers = 4, kSkipLockedLayers = 8,
  kSkipHiddenAndLockedLayers = kSkipHiddenLayers + kSkipLockedLayers, kSkipGuideLayers = 16, kSkipMasterPageItems = 32, kSkipNonGuideLayers = 64,
  kIncludeHiddenFormStates = 128, kSkipNonPrintingLayers = 256, kIteratePrinting = 512, kIncludeTOPPageItems = 1024,
  kSkipFormStates = 2048, kPDFExportMode = 4096
}
 
enum  { kPathSelection = 1 }
 

Public Member Functions

virtual void ProcessDrawShape (GraphicsData *gd, int32 flags=kNoFlags)=0
 
virtual void IterateShapeDrawOrder_ (const PMMatrix *xform, ICallback *callbackInfo, int32 flags=0)=0
 
void IterateShapeDrawOrder (ICallback *callbackInfo, int32 flags=0)
 
virtual PMRect GetPaintedBBox (const PMMatrix &theMatrix, const Transform::CoordinateSpace &coordinateSpace)=0
 
virtual PMRect GetPrintedBBox (const PMMatrix &theMatrix, const Transform::CoordinateSpace &coordinateSpace, bool32 includeAdornments=kTrue)=0
 
virtual void Inval (GraphicsData *gd, ClassID reasonForInval=0, int32 flags=0)=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

This interface is used to inval and draw the item.

Member Enumeration Documentation

anonymous enum

Define the default IID for IShape.

anonymous enum

Define drawing flags.
Enumerator
kNoFlags 

kNoFlags

kDrawingClippedOutImageData 

kDrawingClippedOutImageData

kUseXOR 

when used with wireframe, causes drawing in XOR mode

kDrawResizeDynamic 

flags specifying dynamic drawing - Shapes that take too long to draw dynamicly may choose to draw differently in dynamic situations.

kDrawRotateDynamic 

kDrawRotateDynamic

kDrawScaleDynamic 

kDrawScaleDynamic

kDrawMoveDynamic 

kDrawMoveDynamic

kDrawCreateDynamic 

kDrawCreateDynamic

kPatientUser 

set if Patient user timer expired

kDynamicPause 

set if doing text composition during patient user tracker and drag and drop operations

kPrinting 

kPrinting, NOTE: see kIteratePrinting below.

kDoBroadcast 

kDoBroadcast

kDrawFrameEdge 

kDrawFrameEdge

kPreviewMode 

aka print preview

anonymous enum

Define hit test flags.
Enumerator
kSelect 

Normal selection with the pointer tool - Selects object and content

kDirectSelect 

"tunnels" the hit test to allow leaf node items and paths to be selected

kGroupSelect 

Successive clicks adds another subset of grouped objects to the selection

kOverrideMasterPageItemNoSelect 

if hitting a master page item, override it & return the local UID

kOverrideMasterPageItem 

if hitting a master page item, override it & return the local UID plus select the item

kHitTest 

Hit test items - Doesn't not include items on hidden/locked layers, but does include master page items.

kSolidSelect 

Normal selection with the pointer tool but treats every pageitem as it was filled (used by IBeamTracker).

kOnlyPath 

Used by TOPTool to only detect a hit on a path

kHitTestLockedLayers 

Hit test items on locked layers - UID returned should not be used to change the page item (used by ToolTips).

kHitTextOnPath 

Used by TextOnPath to detect a hit on a TextOnPath adornment shape

kOverrideThreadedMasterPageItems 

When using one of the kOverrideMasterPageItem flags above, additionally override text frames threaded to the hit object & return the local UID

anonymous enum

Define iterate flags.
Enumerator
kIsAMasterPageItem 

Set if the page item being iterated is from a master, clear otherwise

kSkipChildren 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through its children

kSkipHiddenLayers 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through hidden spread layers

kSkipLockedLayers 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through locked spread layers

kSkipHiddenAndLockedLayers 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through hidden and locked spread layers

kSkipGuideLayers 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through guide spread layers

kSkipMasterPageItems 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through items on the masters assigned to this hierarchy

kSkipNonGuideLayers 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through non-guide spread layers (that is, skip regular layers)

kIncludeHiddenFormStates 

Pass to IterateDrawOrderHierarchy() to allow IterateDrawOrder() to iterate over hidden form states

kSkipNonPrintingLayers 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating through non-printing spread layers

kIteratePrinting 

Pass to IterateDrawOrderHierarchy() to allow IterateDrawOrder() to iterate over as if printing. Due to lack up type checking for IShape enums, this must match kPrinting above since they are unfortunately used interchangeably in the codebase.

kIncludeTOPPageItems 

Pass to IterateDrawOrderHierarchy() to allow IterateDrawOrder() to iterate over text on path items. Must be iterating children for this to work (i.e. kSkipChildren should be off)

kSkipFormStates 

Pass to IterateDrawOrderHierarchy() to prevent IterateDrawOrder() from iterating over form states.

If specified, states in multi-state page items (e.g., buttons) will not be iterated. This supersedes kIncludeHiddenFormStates. If both flags are specified, kIncludeHiddenFormStates is implicitly ignored.

See Also
kIncludeHiddenFormStates
kPDFExportMode 

PDF export

anonymous enum

Define inval flags.
Enumerator
kPathSelection 

Inval path handle shape

Member Function Documentation

virtual PMRect IShape::GetPaintedBBox (const PMMatrixtheMatrix,
const Transform::CoordinateSpacecoordinateSpace 
)
pure virtual

Get the painted bounds. The bounds must include all painted area but does not need to be pixel perfect. Compute the bounds in pasteboard coords and then transform by theMatrix.

Parameters
theMatrixthe matrix to transform the bounds based on pasteboard coordinates.
Returns
PMRect the bounds for painting(redrawing).

Implemented in CGraphicFrameShape, CShape, and CPathShape.

virtual PMRect IShape::GetPrintedBBox (const PMMatrixtheMatrix,
const Transform::CoordinateSpacecoordinateSpace,
bool32 includeAdornments = kTrue 
)
pure virtual

Get the bounds around what will actually print. This includes the stroke bounds plus whatever adornments are set to print. Compute the bounds in pasteboard coords and then transform by theMatrix.

Parameters
theMatrixthe matrix to transform the bounds based on pasteboard coordinates.
includeAdornments[IN] Whether or not printing adornments are included in the resulting bounding box
Returns
PMRect the bounds for printing.

Implemented in CGraphicFrameShape, and CShape.

virtual void IShape::Inval (GraphicsDatagd,
ClassID reasonForInval = 0,
int32 flags = 0 
)
pure virtual

Invalidate the appropriate region of the object in the graphics context.

Parameters
gdthe graphics context used for invalidation.
reasonForInvalthe ClassID defined for inval reason for handling different inval cases.
flagsdefault as kNoFlags and serves as a drawing flag.
Returns
void.

Implemented in CShape.

virtual void IShape::IterateShapeDrawOrder_ (const PMMatrixxform,
ICallbackcallbackInfo,
int32 flags = 0 
)
pure virtual

Call callbackInfo->callback for each item in this shape's hierarchy.

Parameters
xformthe matrix to transform coordinates.
callbackInfo
flagsdefault as kNoFlags and serves as a drawing flag.
Returns
void.

Implemented in CShape.

virtual void IShape::ProcessDrawShape (GraphicsDatagd,
int32 flags = kNoFlags 
)
pure virtual

Draw the shape of item. In general, don't call draw or HitTest directly. Use IDrawMgr instead.

Parameters
gdthe graphics context used for drawing.
flagsdefault as kNoFlags and serves as a drawing flag.
Returns
void.

Implemented in CShape.