InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ViewPortAttributes Class Reference
Inheritance diagram for ViewPortAttributes:
IViewPortAttributesIPMUnknown

Public Member Functions

 ViewPortAttributes (IPMUnknown *boss)
 
virtual void Initialize (IDataBase *db, IControlView *controlView)
 
virtual PMReal GetViewPortResolution (void) const
 
virtual void SetViewPortResolution (PMReal resolution)
 
virtual bool16 GetViewPortOutputOPIComments (void) const
 
virtual void SetViewPortOutputOPIComments (bool16 b)
 
virtual bool16 GetViewPortCacheing (void) const
 
virtual void SetViewPortCacheing (bool16 cacheing)
 
virtual int32 GetViewPortBitmapSampling (void) const
 
virtual void SetViewPortBitmapSampling (int32 sampling)
 
virtual int32 GetViewPortVectorSampling (void) const
 
virtual void SetViewPortVectorSampling (int32 sampling)
 
virtual bool16 GetViewPortFilterContent (void) const
 
virtual void SetViewPortFilterContent (bool16 filter)
 
virtual PMReal GetViewPortLineScreen (void) const
 
virtual void SetViewPortLineScreen (const PMReal &n)
 
virtual bool16 GetViewPortTiling (void) const
 
virtual void SetViewPortTiling (bool16 b)
 
virtual bool16 GetViewPortProofPrint (void) const
 
virtual void SetViewPortProofPrint (bool16 b)
 
virtual bool16 GetViewPortDisallowImageCrop (void) const
 
virtual void SetViewPortDisallowImageCrop (bool16 b)
 
virtual bool16 GetViewPortOmitEPS (void) const
 
virtual void SetViewPortOmitEPS (bool16 b)
 
virtual bool16 GetViewPortOmitPDF (void) const
 
virtual void SetViewPortOmitPDF (bool16 b)
 
virtual bool16 GetViewPortOmitBitmapImages (void) const
 
virtual void SetViewPortOmitBitmapImages (bool16 b)
 
virtual void SetViewPortDrawPasteboardShadow (bool16 drawShadow)
 
virtual bool16 GetViewPortDrawPasteboardShadow (void) const
 
virtual void SetViewPortDrawPageShadow (bool16 drawShadow)
 
virtual bool16 GetViewPortDrawPageShadow (void) const
 
virtual bool16 GetViewPortIsPrintingPort (void) const
 
virtual void SetViewPortIsPrintingPort (bool16 b)
 
virtual bool32 IsAttrDefined (VPAttrID attr) const
 
virtual void SetAttr (VPAttrID attr, int32 value)
 
virtual void SetAttr (VPAttrID attr, PMReal value)
 
virtual int32 GetAttr (VPAttrID attr, int32 defVal=0) const
 
virtual PMReal GetAttrReal (VPAttrID attr, PMReal defVal=0.) const
 

Protected Types

typedef std::map< VPAttrID,
PMReal
VPAttrMap
 

Protected Attributes

PMReal fViewPortResolution
 
PMReal fViewPortLineScreen
 
bool16 fViewPortOutputOPI
 
bool16 fViewPortDoCacheing
 
int32 fViewPortBitmapSampling
 
int32 fViewPortVectorSampling
 
bool16 fViewPortFilterContent
 
bool16 fViewPortDoTiling
 
bool16 fViewPortProofPrint
 
bool16 fViewPortDisallowImageCrop
 
bool16 fViewPortOmitPDF
 
bool16 fViewPortOmitEPS
 
bool16 fViewPortOmitBitmapImages
 
bool16 fViewPortDrawPasteboardShadow
 
bool16 fViewPortDrawPageShadow
 
bool16 fViewPortIsPrintingPort
 
VPAttrMap fViewPortAttrMap
 

Additional Inherited Members

- Public Types inherited from IViewPortAttributes
enum  { kDefaultIID = IID_IVIEWPORTATTRIBUTES }
 
enum  { kViewPortBMSampleOmit_Inval = 0, kViewPortBMSampleHiRes, kViewPortBMSampleLowRes, kViewPortBMSampleOptimized }
 

Member Function Documentation

virtual int32 ViewPortAttributes::GetAttr (VPAttrID attr,
int32 defVal = 0 
) const
virtual

Gets the value for an attribute as an integer

Parameters
attrIN The attribute to set
defValIN The attribute's default value
Returns
the attribute's value if defined, else defVal
See Also
IViewPortAttributes::IsAttrDefined

Implements IViewPortAttributes.

virtual PMReal ViewPortAttributes::GetAttrReal (VPAttrID attr,
PMReal defVal = 0. 
) const
virtual

Gets the value for an attribute as a real

Parameters
attrIN The attribute to set
defValIN The attribute's default value
Returns
the attribute's value if defined, else defVal
See Also
IViewPortAttributes::IsAttrDefined

Implements IViewPortAttributes.

virtual int32 ViewPortAttributes::GetViewPortBitmapSampling (void ) const
virtual

Gets the type of bitmap data the ViewPort wants to display, export, or print

Returns
one of kViewPortBMSampleOmit_Inval, kViewPortBMSampleHiRes, kViewPortBMSampleLowRes, or kViewPortBMSampleOptimized

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortCacheing (void ) const
virtual

Gets whether the ViewPort wants to optimize re-display by cacheing things like images. Cacheing is most useful when diplaying on-screen; for printing and exporting, it is typically not recommended.

Returns
kTrue if the port wants to cache things, else kFalse

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortDisallowImageCrop (void ) const
virtual

Gets whether we want to make sure that we get all the image data–even what has been cropped by the frame

Returns
whether to disallow image cropping

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortDrawPageShadow (void ) const
virtual

Gets whether to draw page shadow. Initial value is implementation dependent

Returns
whether to draw pasteboard shadow

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortDrawPasteboardShadow (void ) const
virtual

Gets whether to draw pasteboard shadow. Initial value is implementation dependent

Returns
whether to draw pasteboard shadow

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortFilterContent (void ) const
virtual

Gets whether this port wants to filter content

Returns
kTrue if the port should filter content

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortIsPrintingPort (void ) const
virtual

Gets whether port is a printing port. Indicates if screen drawing things should happen or not. This is the same concept as IShape::kPrinting which is passed to drawing methods, though at port level.

Returns
whether port is a printing port

Implements IViewPortAttributes.

virtual PMReal ViewPortAttributes::GetViewPortLineScreen (void ) const
virtual

Gets the port's line screen. Currently this is used in the calculation of the desired resolution when BitmapSampling is set to Optimize. Currently this is only set up for PS view ports.

Returns
the port's line screen

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortOmitBitmapImages (void ) const
virtual

Gets whether placed bitmap images should be omitted

Returns
whether placed bitmap images should be omitted

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortOmitEPS (void ) const
virtual

Gets whether placed EPS's should be omitted

Returns
whether placed EPS's should be omitted

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortOmitPDF (void ) const
virtual

Gets whether placed PDF's should be omitted

Returns
whether placed PDF's should be omitted

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortOutputOPIComments (void ) const
virtual

Gets whether the port wants to output OPI comments

Returns
kTrue if the port wants to output OPI, else kFalse

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortProofPrint (void ) const
virtual

Gets whether the port is doing a proof print

Returns
whether the port is doing a proof print

Implements IViewPortAttributes.

virtual PMReal ViewPortAttributes::GetViewPortResolution (void ) const
virtual

Gets the resolution of the view port. Currently this is used when importing an EPS because MPS requires the output device's resolution when creating the display list.

Returns
the view port's resolution

Implements IViewPortAttributes.

virtual bool16 ViewPortAttributes::GetViewPortTiling (void ) const
virtual

Gets whether the port supports tiling

Returns
whether the port supports tiling

Implements IViewPortAttributes.

virtual int32 ViewPortAttributes::GetViewPortVectorSampling (void ) const
virtual

Gets the type of vector data the ViewPort wants to display, export, or print

Returns
one of kViewPortBMSampleOmit_Inval, kViewPortBMSampleHiRes, kViewPortBMSampleLowRes, or kViewPortBMSampleOptimized

Implements IViewPortAttributes.

virtual void ViewPortAttributes::Initialize (IDataBasedb,
IControlViewcontrolView 
)
virtual

Initializes the attributes available by the Get methods below. A ViewPortBoss should call Initialize() before each time it begins to draw in order to be sure that the attributes are up to date. The optional IDataBase argument can be used by initialize to get preference settings from the given database, when it is known that the ViewPort is drawing one document. The optional IControlView argument can be used by initialize to get preference settings from the given IControlView.

Note: Initialization of the ViewPortBounds must be done explicitly with SetViewPortBounds().

Parameters
dbIN Optional database from which to take preference settings
controlViewIN Optional view from which to take preference settings
See Also
IControlView

Implements IViewPortAttributes.

virtual bool32 ViewPortAttributes::IsAttrDefined (VPAttrID attr) const
virtual

Tests whether an attribute is defined

These are an extensible system for new attributes. It's simply a map from the VPAttrID to a PMReal (commonly just using the integer portion). If you have a simple attribute you want to add, this is a good way to do it without having to modify the ViewPortAttributes interface.

Currently the following attributes use this method: kXPIsMaskPortVPAttr - See XPID.h kSpotOVPModeVPAttr - See PrintID.h

Parameters
attrIN The attribute to check
Returns
kTrue if attribute is defined, else kFalse

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetAttr (VPAttrID attr,
int32 value 
)
virtual

Sets the value for an attribute as an integer

Parameters
attrIN The attribute to set
valueIN The attribute's value
See Also
IViewPortAttributes::IsAttrDefined

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetAttr (VPAttrID attr,
PMReal value 
)
virtual

Sets the value for an attribute as a real

Parameters
attrIN The attribute to set
valueIN The attribute's value
See Also
IViewPortAttributes::IsAttrDefined

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortBitmapSampling (int32 sampling)
virtual

Sets the type of bitmap data the ViewPort wants to display, export, or print

Parameters
samplingIN The sampling type
See Also
IViewPortAttributes::GetViewPortBitmapSampling

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortCacheing (bool16 cacheing)
virtual

Sets whether the ViewPort wants to optimize re-display by cacheing things like images. Cacheing is most useful when diplaying on-screen; for printing and exporting, it is typically not recommended.

Parameters
cacheingIN If kTrue, the port should cache

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortDisallowImageCrop (bool16 b)
virtual

Gets whether we want to make sure that we get all the image data–even what has been cropped by the frame

Parameters
bIN kTrue to disallow image cropping

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortDrawPageShadow (bool16 drawShadow)
virtual

Sets whether to draw page shadow. Initial value is implementation dependent

Parameters
drawShadowIN whether to draw pasteboard shadow

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortDrawPasteboardShadow (bool16 drawShadow)
virtual

Sets whether to draw pasteboard shadow. Initial value is implementation dependent

Parameters
drawShadowIN whether to draw pasteboard shadow

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortFilterContent (bool16 filter)
virtual

Sets whether this port wants to filter content

Parameters
filterIN kTrue if the port should filter content

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortIsPrintingPort (bool16 b)
virtual

Sets whether port is a printing port. Indicates if screen drawing things should happen or not. This is the same concept as IShape::kPrinting which is passed to drawing methods, though at port level.

Parameters
bIN whether port is a printing port

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortLineScreen (const PMRealn)
virtual

Sets the port's line screen. Currently this is used in the calculation of the desired resolution when BitmapSampling is set to Optimize. Currently this is only set up for PS view ports.

Parameters
nIN The line screen to use

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortOmitBitmapImages (bool16 b)
virtual

Sets whether placed bitmap images should be omitted

Parameters
bIN kTrue if placed bitmap images should be omitted, else kFalse

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortOmitEPS (bool16 b)
virtual

Sets whether placed EPS's should be omitted

Parameters
bIN kTrue if placed EPS's should be omitted, else kFalse

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortOmitPDF (bool16 b)
virtual

Sets whether placed PDF's should be omitted

Parameters
bIN kTrue if placed PDF's should be omitted, else kFalse

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortOutputOPIComments (bool16 b)
virtual

Sets whether the port wants to output OPI comments

Parameters
bIN If kTrue, the port should output OPI

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortProofPrint (bool16 b)
virtual

Sets whether the port is doing a proof print

Parameters
bIN kTrue if the port is doing a proof print

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortResolution (PMReal resolution)
virtual

Sets the resolution of the view port. Currently this is used when importing an EPS because MPS requires the output device's resolution when creating the display list.

Parameters
resolutionIN the view port's resolution

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortTiling (bool16 b)
virtual

Sets whether the port supports tiling

Parameters
bIN kTrue if the port supports tiling

Implements IViewPortAttributes.

virtual void ViewPortAttributes::SetViewPortVectorSampling (int32 sampling)
virtual

Sets the type of bitmap data the ViewPort wants to display, export, or print

Parameters
samplingIN The sampling type
See Also
IViewPortAttributes::GetViewPortVectorSampling

Implements IViewPortAttributes.