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

#include <IGuideData.h>

Inheritance diagram for IGuideData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGUIDEDATA }
 
enum  GuideType { kRulerGuide = 0, kLiquidGuide, kMagneticGuide, kGrowZoneGuide }
 

Public Member Functions

virtual void Set (bool16 isHoriz, const PMReal &distance, const UID &ownerUID, const PMReal &threshold=kDefaultViewThreshold, const int32 colorIndex=IUIColorUtils::kStockRulerGuide)=0
 
virtual void SetIsShort (bool16 isShort)=0
 
virtual void SetLocation (const PMReal &location)=0
 
virtual void SetType (const GuideType guideType)=0
 
virtual GuideType GetType () const =0
 
virtual void SetLiquidGrowZoneSize (const PMReal &size)=0
 
virtual PMReal GetLiquidGrowZoneSize () const =0
 
virtual void ModifyIsHoriz (bool16 isHoriz)=0
 
virtual void ModifyDistance (const PMReal &distance)=0
 
virtual void ModifyOwnerUID (const UID &ownerUID)=0
 
virtual void ModifyViewThreshold (const PMReal viewThreshold)=0
 
virtual void ModifyColorUID (const UID colorUID)=0
 
virtual bool16 GetIsHoriz () const =0
 
virtual PMReal GetDistance () const =0
 
virtual UID GetOwnerUID () const =0
 
virtual PMReal GetViewThreshold () const =0
 
virtual int32 GetColorIndex_FOR_CONVERSION_ONLY () const =0
 
virtual UID GetColorUID () const =0
 
virtual bool16 GetIsShort ()=0
 
virtual PMPoint GetTopLeftPoint ()=0
 
virtual PMPoint GetBottomRightPoint ()=0
 
virtual PMReal GetLocation ()=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

Represents properties of a ruler guide (kGuideItemBoss). A ruler guide is defined by it's orientation (horizontal or vertical), its distance from the origin, its owner(a page id or the pasteboard), its view threshold beyond which a guide is not drawn, and its color to draw the guide.

There are two types of ruler guides: 1) short guides which are drawn clipped to the page dimensions; 2) long guides which extend across the entire pasteboard dimensions. The guide type is determined by the owner UID.

See Also
kGuideItemBoss

Member Function Documentation

virtual PMPoint IGuideData::GetBottomRightPoint ()
pure virtual

Get bottom right point of the guide.

Returns
PMPoint represents the bottom right point.
virtual int32 IGuideData::GetColorIndex_FOR_CONVERSION_ONLY () const
pure virtual

Get the color index of the guide. DON'T use this after Anna(InDesign 2.0), USE GetColorUID() instead.

Returns
int32 the color index.
virtual UID IGuideData::GetColorUID () const
pure virtual

Get the color UID of guide.

Returns
UID the color that draws the guide.
virtual PMReal IGuideData::GetDistance () const
pure virtual

Get the distance the guide is located at.

Returns
PMReal that is the distance the guide is located at.
virtual bool16 IGuideData::GetIsHoriz () const
pure virtual

Get the orientation of the guide.

Returns
bool16 kTrue is horizontal guide, kFalse is vertical guide.
virtual bool16 IGuideData::GetIsShort ()
pure virtual

Get the color UID of guide.

Returns
bool16 kTrue if it's a short guide (page guide), kFalse if it's a long guide that extends across the pasteboard. This value is not stored. It's computed based on the OwnerUID.
virtual PMReal IGuideData::GetLiquidGrowZoneSize () const
pure virtual
Returns
Gets the size of the zone (width for vertical, height for horizontal).
virtual PMReal IGuideData::GetLocation ()
pure virtual

Get the X value of middle point for horizontal guide or Y value of middle point(X, Y) for vertical guide.

Returns
PMReal represents X or Y value of middle point(X, Y) of guide.
virtual UID IGuideData::GetOwnerUID () const
pure virtual

Get UID of the owner, a page uid for a short guide and the pasteboard for long guide.

Returns
UID the owner, for short guides this is the page it's located on, for long guides it's the pasteboard.
virtual PMPoint IGuideData::GetTopLeftPoint ()
pure virtual

Get top left point of the guide.

Returns
PMPoint represents the top left point.
virtual GuideType IGuideData::GetType () const
pure virtual
Returns
Gets the type of guide. Default is kRulerGuide.
virtual PMReal IGuideData::GetViewThreshold () const
pure virtual

Get the view threshold beyond which a guide is not drawn.

Returns
PMReal the view percentage, kNoViewThreshold means the guide is always drawn.
virtual void IGuideData::ModifyColorUID (const UID colorUID)
pure virtual

Change the color UID of guide.

Parameters
colorUIDrefers to the color that draws the guide.
Returns
void.
virtual void IGuideData::ModifyDistance (const PMRealdistance)
pure virtual

Change the distance the guide is located at. For example, move the guide.

Parameters
distancerefers to the distance from origin.
Returns
void.
virtual void IGuideData::ModifyIsHoriz (bool16 isHoriz)
pure virtual

Change the orientation of the guide. For example, switch between horizontal and vertical.

Parameters
isHorizrefers to the orientation of guide(kTrue indicates horizontal guide and kFalse indicates vertical guide).
Returns
void.
virtual void IGuideData::ModifyOwnerUID (const UIDownerUID)
pure virtual

Change the owner, a page uid for a short guide and the pasteboard for long guide.

Parameters
ownerUIDrefers to the owner of a page or the pasteboard.
Returns
void.
virtual void IGuideData::ModifyViewThreshold (const PMReal viewThreshold)
pure virtual

Change the view threshold, this represents the percentage beyond which a guide is not drawn.

Parameters
ownerUIDrefers to the owner of a page or the pasteboard.
Returns
void.
virtual void IGuideData::Set (bool16 isHoriz,
const PMRealdistance,
const UIDownerUID,
const PMRealthreshold = kDefaultViewThreshold,
const int32 colorIndex = IUIColorUtils::kStockRulerGuide 
)
pure virtual

Set the guide attributes.

Parameters
isHorizrefers to the orientation of guide(kTrue indicates horizontal guide and kFalse indicates vertical guide).
distancerefers to the distance from origin.
ownerUIDrefers to the owner of a page or the pasteboard.
thresholdrefers to the percentage beyond which a guide is not drawn.
colorIndexrefers to the color that draws the guide.
Returns
void.
virtual void IGuideData::SetIsShort (bool16 isShort)
pure virtual

Change the color UID of guide.

Parameters
colorUIDrefers to the color that draws the guide.
Returns
void.
virtual void IGuideData::SetLiquidGrowZoneSize (const PMRealsize)
pure virtual

Sets the size of the zone (width for vertical, height for horizontal).

Parameters
size[IN] specifies the size of the zone (width for vertical, height for horizontal).
virtual void IGuideData::SetLocation (const PMReallocation)
pure virtual

Set location of the guide. For horizontal guide, location is X value of the middle point(X, Y) of the guide; for vertical guide, location is Y value of the middle point(X, Y) of the guide.

Parameters
locationrefers to X or Y value of the middle point(X, Y).
Returns
void.
virtual void IGuideData::SetType (const GuideType guideType)
pure virtual

Sets the type of guide. Default is kRulerGuide.

Parameters
guideType[IN] One of ruler, liquid, magnetic, etc.