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

#include <IMargins.h>

Inheritance diagram for IMargins:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMARGINS }
 

Public Member Functions

virtual void SetMargins (const PMReal &insideLeft, const PMReal &top, const PMReal &outsideRight, const PMReal &bottom)=0
 
virtual void GetMargins (PMRect *marginRect, bool16 wantMaster=kTrue)=0
 
virtual void GetMargins (PMReal *insideLeft, PMReal *top, PMReal *outsideRight, PMReal *bottom, bool16 wantMaster=kTrue)=0
 
virtual bool16 MarginsAreValid ()=0
 
virtual void SetMarginsAreValid (bool16 valid)=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 access the geometry information of page's margin.

See Also
kPageBoss

Member Function Documentation

virtual void IMargins::GetMargins (PMRectmarginRect,
bool16 wantMaster = kTrue 
)
pure virtual

Get the margins for the page. All positive (or 0) numbers, values relative to page edge.

Parameters
marginRectrefers to a rectangle holding four returned values(left/top/right/bottom). Note that the rectangle returned can be different in documents with two pages per spread based on the position of the page in the spread.
wantMasterindicating return the margins of a master page.
See Also
ILayoutUtils.h
QueryMargins
virtual void IMargins::GetMargins (PMRealinsideLeft,
PMRealtop,
PMRealoutsideRight,
PMRealbottom,
bool16 wantMaster = kTrue 
)
pure virtual

Get the margins for the page. All positive (or 0) numbers, values relative to page edge.

Parameters
insideLeftrefers to distance down from the top of page to the margin.
toprefers to distance up from the bottom of page to the margin.
outsideRightrefers to distance from left edge of page to the margin.
bottomrefers to distance from right edge of page to the margin.
wantMasterindicating return the margins of a master page.
virtual bool16 IMargins::MarginsAreValid ()
pure virtual

Check if margins are valid or just the default.

Returns
bool16 kTrue = if SetMargins has been called; kFalse otherwise (i.e. the margin rects hold some value after). If not valid, master's margins are in effect.
virtual void IMargins::SetMargins (const PMRealinsideLeft,
const PMRealtop,
const PMRealoutsideRight,
const PMRealbottom 
)
pure virtual

Set a page's margins.

Parameters
insideLeftrefers to inside (for facing pages case) or left margin.
toprefers to top margin.
outsideRightrefers to outside (for facing pages case) or right margin.
bottomrefers to bottom margin.
See Also
kSetPageMarginsCmdBoss
virtual void IMargins::SetMarginsAreValid (bool16 valid)
pure virtual

Set the margins to be valid or not for a page. On a regular page, if not valid, masters margins are in use. If valid, it means the margins have been overridden for that page.

Parameters
validthis could be either kTrue or kFalse.
See Also
kSetPageMarginsValidCmdBoss