Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:

Inherited from CApaDoorBase:

Inherited from CBase:

Inherited from CPicture:


Construction and destruction


NewL(CApaModelHeader *)

IMPORT_C static 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(CApaModelHeader *)

IMPORT_C static 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(const CStreamStore &,TStreamId,const MApaModelHeaderFactory *)

IMPORT_C static 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(TFormat)

inline void SetFormat(TFormat aFormat);

Description

Sets the format of the door.

Parameters

CApaDoorBase::TFormat aFormat

The format for the graphical representation of the embedded document.


StoreL(CStreamStore &)const

IMPORT_C virtual 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(const CStreamStore &,TStreamId,const MApaModelHeaderFactory *)

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(TDetach)

IMPORT_C virtual void DetachFromStoreL(TDetach=EDetachFull);

Description

Restores the model to the specified degree.

Parameters

CPicture::TDetach

The degree to which restoration is needed.


ExternalizeL(RWriteStream &)const

Interface status: removed

IMPORT_C virtual void ExternalizeL(RWriteStream &aStream) const;

Description

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

Parameters

RWriteStream &aStream


Draw(CGraphicsContext &,const TPoint &,const TRect &,MGraphicsDeviceMap *)const

Interface status: removed

IMPORT_C virtual 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(TSize &)const

IMPORT_C virtual void GetOriginalSizeInTwips(TSize &aSize) const;

Description

Gets the door's original size, in twips.

Parameters

TSize &aSize

This size, in twips.


SetScaleFactor(TInt,TInt)

IMPORT_C virtual 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()const

IMPORT_C virtual TInt ScaleFactorWidth() const;

Description

Gets the door's width scale factor.

Return value

TInt

The width scale factor, in percent.


ScaleFactorHeight()const

IMPORT_C virtual TInt ScaleFactorHeight() const;

Description

Gets the door's height scale factor.

Return value

TInt

The height scale factor, in percent.


GlassDoorSize()const

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.