TPageSpec Class Reference

#include <gdi.h>

Link against: gdi.lib

class TPageSpec
Public Attributes
TPageOrientation iOrientation
TSize iPortraitPageSize
Public Member Enumerations
enumTPageOrientation { EPortrait, ELandscape }
Public Member Functions
TPageSpec()
TPageSpec(TPageOrientation, const TSize &)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C TSizeOrientedPageSize()
IMPORT_C TBooloperator!=(const TPageSpec &)
IMPORT_C TBooloperator==(const TPageSpec &)

Detailed Description

Page specification for a print operation.

The page specification consists of the page orientation and the page size in twips or pixels. By default, the page orientation is portrait. When using landscape orientation, the left hand side of the page becomes the top. "gdi.lib"
Since
5.0

Member Attribute Documentation

iOrientation

TPageOrientation iOrientation

The page orientation.

iPortraitPageSize

TSize iPortraitPageSize

The width and height of the page in portrait orientation in twips or pixels.

Note that OrientedPageSize() returns the width and height in reverse order for a landscape portrait.

Member Enumeration Documentation

Enum TPageOrientation

The available page orientations.

EnumeratorValueDescription
EPortrait

Portrait page orientation

ELandscape

Landscape page orientation

Constructor & Destructor Documentation

TPageSpec ( )

IMPORT_CTPageSpec()

Default constructor.

Initialises the page orientation to portrait and the page height and width to zero.

TPageSpec ( TPageOrientation, const TSize & )

IMPORT_CTPageSpec(TPageOrientationaOrientation,
const TSize &aSize
)

Constructor with page orientation and size.

Parameters
aOrientationSpecifies the page orientation.
aSizeSpecifies the page size.

Member Function Documentation

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalises the page specification object to a write stream.

The presence of this function means that the standard templated stream operator<<(), defined in s32strm.h, is available to externalise objects of this class.

Parameters
aStreamThe write stream.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalises a page specification object from a read stream.

The presence of this function means that the standard templated stream operator>>(), defined in s32strm.h, is available to internalise objects of this class.

Parameters
aStreamThe read stream.

OrientedPageSize ( )

IMPORT_C TSizeOrientedPageSize()const

Gets the oriented page size.

The oriented page size is the absolute width and height of the page, respecting the page orientation.

Return Value
The oriented page size (in pixels or twips).

operator!= ( const TPageSpec & )

IMPORT_C TBooloperator!=(const TPageSpec &aPageSpec)const

Inequality operator.

This operator compares two page specifications for inequality. Two page specifications are unequal if one or both of their orientations and portrait page sizes differ.

Parameters
aPageSpecPage specification to be compared.
Return Value
ETrue, if the page specifications differ; EFalse, otherwise.

operator== ( const TPageSpec & )

IMPORT_C TBooloperator==(const TPageSpec &aPageSpec)const

Equality operator.

This operator compares page specifications for equality. Two page specifications are equal if both their orientations and portrait page sizes are equal.

Parameters
aPageSpecPage specification to be compared.
Return Value
ETrue, if the page specifications are equal; EFalse, otherwise.