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

#include <IViewPortAttributes.h>

Inheritance diagram for IViewPortAttributes:
IPMUnknownViewPortAttributes

Public Types

enum  { kDefaultIID = IID_IVIEWPORTATTRIBUTES }
 
enum  { kViewPortBMSampleOmit_Inval = 0, kViewPortBMSampleHiRes, kViewPortBMSampleLowRes, kViewPortBMSampleOptimized }
 

Public Member Functions

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

Provides the interface for determining the set of attributes supported by a port

Member Enumeration Documentation

anonymous enum

Bitmap output options

Member Function Documentation

virtual int32 IViewPortAttributes::GetAttr (VPAttrID attr,
int32 defVal = 0 
) const
pure 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

Implemented in ViewPortAttributes.

virtual PMReal IViewPortAttributes::GetAttrReal (VPAttrID attr,
PMReal defVal = 0. 
) const
pure 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

Implemented in ViewPortAttributes.

virtual int32 IViewPortAttributes::GetViewPortBitmapSampling (void ) const
pure virtual

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

Returns
one of kViewPortBMSampleOmit_Inval, kViewPortBMSampleHiRes, kViewPortBMSampleLowRes, or kViewPortBMSampleOptimized

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortCacheing (void ) const
pure 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

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortDisallowImageCrop (void ) const
pure 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

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortDrawPageShadow (void ) const
pure virtual

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

Returns
whether to draw pasteboard shadow

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortDrawPasteboardShadow (void ) const
pure virtual

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

Returns
whether to draw pasteboard shadow

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortFilterContent (void ) const
pure virtual

Gets whether this port wants to filter content

Returns
kTrue if the port should filter content

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortIsPrintingPort (void ) const
pure 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

Implemented in ViewPortAttributes.

virtual PMReal IViewPortAttributes::GetViewPortLineScreen (void ) const
pure 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

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortOmitBitmapImages (void ) const
pure virtual

Gets whether placed bitmap images should be omitted

Returns
whether placed bitmap images should be omitted

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortOmitEPS (void ) const
pure virtual

Gets whether placed EPS's should be omitted

Returns
whether placed EPS's should be omitted

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortOmitPDF (void ) const
pure virtual

Gets whether placed PDF's should be omitted

Returns
whether placed PDF's should be omitted

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortOutputOPIComments (void ) const
pure virtual

Gets whether the port wants to output OPI comments

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

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortProofPrint (void ) const
pure virtual

Gets whether the port is doing a proof print

Returns
whether the port is doing a proof print

Implemented in ViewPortAttributes.

virtual PMReal IViewPortAttributes::GetViewPortResolution (void ) const
pure 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

Implemented in ViewPortAttributes.

virtual bool16 IViewPortAttributes::GetViewPortTiling (void ) const
pure virtual

Gets whether the port supports tiling

Returns
whether the port supports tiling

Implemented in ViewPortAttributes.

virtual int32 IViewPortAttributes::GetViewPortVectorSampling (void ) const
pure virtual

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

Returns
one of kViewPortBMSampleOmit_Inval, kViewPortBMSampleHiRes, kViewPortBMSampleLowRes, or kViewPortBMSampleOptimized

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::Initialize (IDataBasedb = nil,
IControlViewcontrolView = nil 
)
pure 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

Implemented in ViewPortAttributes.

virtual bool32 IViewPortAttributes::IsAttrDefined (VPAttrID attr) const
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetAttr (VPAttrID attr,
int32 value 
)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetAttr (VPAttrID attr,
PMReal value 
)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortBitmapSampling (int32 sampling)
pure virtual

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

Parameters
samplingIN The sampling type
See Also
IViewPortAttributes::GetViewPortBitmapSampling

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortCacheing (bool16 cacheing)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortDisallowImageCrop (bool16 b)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortDrawPageShadow (bool16 drawShadow)
pure virtual

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

Parameters
drawShadowIN whether to draw pasteboard shadow

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortDrawPasteboardShadow (bool16 drawShadow)
pure virtual

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

Parameters
drawShadowIN whether to draw pasteboard shadow

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortFilterContent (bool16 filter)
pure virtual

Sets whether this port wants to filter content

Parameters
filterIN kTrue if the port should filter content

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortIsPrintingPort (bool16 b)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortLineScreen (const PMRealn)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortOmitBitmapImages (bool16 b)
pure virtual

Sets whether placed bitmap images should be omitted

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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortOmitEPS (bool16 b)
pure virtual

Sets whether placed EPS's should be omitted

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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortOmitPDF (bool16 b)
pure virtual

Sets whether placed PDF's should be omitted

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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortOutputOPIComments (bool16 b)
pure virtual

Sets whether the port wants to output OPI comments

Parameters
bIN If kTrue, the port should output OPI

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortProofPrint (bool16 b)
pure virtual

Sets whether the port is doing a proof print

Parameters
bIN kTrue if the port is doing a proof print

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortResolution (PMReal resolution)
pure 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

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortTiling (bool16 b)
pure virtual

Sets whether the port supports tiling

Parameters
bIN kTrue if the port supports tiling

Implemented in ViewPortAttributes.

virtual void IViewPortAttributes::SetViewPortVectorSampling (int32 sampling)
pure virtual

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

Parameters
samplingIN The sampling type
See Also
IViewPortAttributes::GetViewPortVectorSampling

Implemented in ViewPortAttributes.