Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: apamdr.h
Link against: apparc.lib

Class CApaModelDoor

class CApaModelDoor : public CApaDoorBase;

Description

A persistent representation of a door that also acts as a wrapper around an application's model.

The class allows embedded data to be manipulated without requiring the whole associated application.

Derivation

Members

Defined in CApaModelDoor:
DetachFromStoreL(), Draw(), ExternalizeL(), GetOriginalSizeInTwips(), GlassDoorSize(), ModelHeader(), NewL(), NewL(), NewLC(), RestoreL(), ScaleFactorHeight(), ScaleFactorWidth(), SetFormat(), SetScaleFactor(), StoreL(), ~CApaModelDoor()

Inherited from CApaDoorBase:
CApaDoorBase_Reserved1(), CApaDoorBase_Reserved2(), Capability(), EGlassDoor, EIconic, ETemporarilyIconic, ExternalizeBaseStreamL(), Format(), GetCropInTwips(), InternalizeBaseStreamL(), LineBreakPossible(), NativePixelSize(), SetCropInTwips(), SetSource(), Source(), TFormat, iFormat, iSource

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CPicture:
AddCropInPixels(), EDetachDraw, EDetachFull, GetSizeInPixels(), GetSizeInTwips(), ResetToOriginal(), SetSizeInPixels(), SetSizeInTwips(), TDetach


Construction and destruction


NewL()

static IMPORT_C CApaModelDoor *NewL(CApaModelHeader *aHeader);

Description

Creates a model door object.

Parameters

CApaModelHeader *aHeader

A pointer to an existing concrete application model wrapper object.

Return value

CApaModelDoor *

A pointer to the new model door object.


NewLC()

static IMPORT_C CApaModelDoor *NewLC(CApaModelHeader *aHeader);

Description

Creates a model door object, and puts a pointer to it onto the cleanup stack.

Parameters

CApaModelHeader *aHeader

A pointer to an existing concrete application model wrapper object.

Return value

CApaModelDoor *

A pointer to the new model door object.


NewL()

static IMPORT_C CApaModelDoor *NewL(const CStreamStore &aStore, TStreamId aHeadStreamId, const MApaModelHeaderFactory *aFactory);

Description

Creates a model door object and restores it from an embedded store within the specified store.

Parameters

const CStreamStore &aStore

The store from which the model door is to be restored.

TStreamId aHeadStreamId

The head stream ID. This is the ID of the stream containing the stream dictionary which is restored as part of the process of creating this model door object. The stream dictionary contains the ID of the stream hosting the embedded store.

const MApaModelHeaderFactory *aFactory

A pointer to a factory object for constructing the application model wrapper object, also known as the application model header, a CApaModelHeader type.

Return value

CApaModelDoor *

A pointer to the new model door object.

See also:


~CApaModelDoor()

IMPORT_C ~CApaModelDoor();

Description

Destructor.

Frees all resources owned by the object, prior to its destruction.

[Top]


Member functions


ModelHeader()

inline CApaModelHeader *ModelHeader();

Description

Gets the application model wrapper object.

Return value

CApaModelHeader *

A pointer to the application model wrapper object.


SetFormat()

inline void SetFormat(TFormat aFormat);

Description

Sets the format of the door.

Parameters

TFormat aFormat

The format for the graphical representation of the embedded document.


StoreL()

virtual IMPORT_C TStreamId StoreL(CStreamStore &aStore) const;

Description

Stores the model data in the specified store as an embedded store.

The function stores the model data, if the model exists in memory, otherwise, it simply copies the stream containing the embedded document into the specified store.

Parameters

CStreamStore &aStore

The store in which the model data is to be stored.

Return value

TStreamId

The stream ID of the head stream for the embedded model data. This stream contains the stream dictionary through which the embedded data and its door can be restored.


RestoreL()

IMPORT_C void RestoreL(const CStreamStore &aStore, TStreamId aHeadStreamId, const MApaModelHeaderFactory *aFactory);

Description

Restores the embedded model data from the specified store.

Parameters

const CStreamStore &aStore

The store from which the embedded model data is to be restored.

TStreamId aHeadStreamId

The stream ID of the head stream for the embedded model data. This stream contains the stream dictionary through which the embedded model data and its door can be restored.

const MApaModelHeaderFactory *aFactory

A pointer to a factory object for constructing the application model wrapper object, also known as the application model header, a CApaModelHeader type. The application model wrapper is provided by the application model (not the application UI), and supplies the knowledge for internalizing the application model data from an embedded store. The pointer must not be null, otherwise the function raises an APPARC 22 panic.


DetachFromStoreL()

virtual IMPORT_C void DetachFromStoreL(TDetach=EDetachFull);

Description

Restores the model to the specified degree.

Parameters

TDetach

The degree to which restoration is needed.


ExternalizeL()

virtual IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Not supported; if called, raises an APPARC 17 panic.

Parameters

RWriteStream &aStream


Draw()

virtual IMPORT_C void Draw(CGraphicsContext &aGc, const TPoint &aTopLeft, const TRect &aClipRect, MGraphicsDeviceMap *aMap) const;

Description

Not supported; if called, raises an APPARC 17 panic.

Parameters

CGraphicsContext &aGc

const TPoint &aTopLeft

const TRect &aClipRect

MGraphicsDeviceMap *aMap


GetOriginalSizeInTwips()

virtual IMPORT_C void GetOriginalSizeInTwips(TSize &aSize) const;

Description

Gets the door's original size, in twips.

Parameters

TSize &aSize

This size, in twips.


SetScaleFactor()

virtual IMPORT_C void SetScaleFactor(TInt aScaleFactorWidth, TInt aScaleFactorHeight);

Description

Sets the door's scale factors.

Parameters

TInt aScaleFactorWidth

The width scale factor, in percent.

TInt aScaleFactorHeight

The height scale factor, in percent.


ScaleFactorWidth()

virtual IMPORT_C TInt ScaleFactorWidth() const;

Description

Gets the door's width scale factor.

Return value

TInt

The width scale factor, in percent.


ScaleFactorHeight()

virtual IMPORT_C TInt ScaleFactorHeight() const;

Description

Gets the door's height scale factor.

Return value

TInt

The height scale factor, in percent.


GlassDoorSize()

private: virtual TSize GlassDoorSize() const;

Description

Returns the size of the glass door, in twips.

A concrete implementation of this function is provided by derived classes.

Return value

TSize

The size of the glass door, in twips.