Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GDI.H>
Link against: gdi.lib

Class TPageSpec

class TPageSpec;

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"

Members

Defined in TPageSpec:


Construction and destruction


TPageSpec()

IMPORT_C TPageSpec();

Description

Default constructor.

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


TPageSpec(TPageOrientation,const TSize &)

IMPORT_C TPageSpec(TPageOrientation aOrientation, const TSize &aSize);

Description

Constructor with page orientation and size.

Parameters

TPageSpec::TPageOrientation aOrientation

Specifies the page orientation.

const TSize &aSize

Specifies the page size.

[Top]


Member functions


InternalizeL(RReadStream &)

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalises a page specification object from a read stream.

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

Parameters

RReadStream &aStream

The read stream.


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises the page specification object to a write stream.

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

Parameters

RWriteStream &aStream

The write stream.


OrientedPageSize()const

IMPORT_C TSize OrientedPageSize() const;

Description

Gets the oriented page size.

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

Return value

TSize

The oriented page size (in pixels or twips).


operator==(const TPageSpec &)const

IMPORT_C TBool operator==(const TPageSpec &aPageSpec) const;

Description

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

const TPageSpec &aPageSpec

Page specification to be compared.

Return value

TBool

ETrue, if the page specifications are equal; EFalse, otherwise.


operator!=(const TPageSpec &)const

IMPORT_C TBool operator!=(const TPageSpec &aPageSpec) const;

Description

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

const TPageSpec &aPageSpec

Page specification to be compared.

Return value

TBool

ETrue, if the page specifications differ; EFalse, otherwise.

[Top]


Member enumerations


Enum TPageOrientation

TPageOrientation

Description

The available page orientations.

EPortrait

Portrait page orientation

ELandscape

Landscape page orientation

[Top]


Member data


iPortraitPageSize

TSize iPortraitPageSize;

Description

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

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


iOrientation

TPageOrientation iOrientation;

Description

The page orientation.