CApaModelDoor Class Reference

#include <mw/apamdr.h>

Link against: apparc.lib

class CApaModelDoor : public CApaDoorBase

Inherits from

Public Member Functions
~CApaModelDoor()
virtual IMPORT_C voidDetachFromStoreL(TDetach)
virtual IMPORT_C voidDraw(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap *)
virtual IMPORT_C voidExternalizeL(RWriteStream &)
virtual IMPORT_C voidGetOriginalSizeInTwips(TSize &)
CApaModelHeader *ModelHeader()
IMPORT_C CApaModelDoor *NewL(CApaModelHeader *)
IMPORT_C CApaModelDoor *NewL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *)
IMPORT_C CApaModelDoor *NewLC(CApaModelHeader *)
IMPORT_C voidRestoreL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *)
virtual IMPORT_C TIntScaleFactorHeight()
virtual IMPORT_C TIntScaleFactorWidth()
voidSetFormat(TFormat)
virtual IMPORT_C voidSetScaleFactor(TInt, TInt)
virtual IMPORT_C TStreamIdStoreL(CStreamStore &)
Inherited Attributes
CApaDoorBase::iFormat
CApaDoorBase::iSource
Inherited Enumerations
CApaDoorBase:TFormat
CPicture:TDetach
Inherited Functions
CApaDoorBase::CApaDoorBase()
CApaDoorBase::Capability()const
CApaDoorBase::ExternalizeBaseStreamL(CStreamStore &,CStreamDictionary &)const
CApaDoorBase::Format()const
CApaDoorBase::GetCropInTwips(TMargins &)const
CApaDoorBase::InternalizeBaseStreamL(const CStreamStore &,const CStreamDictionary &)
CApaDoorBase::LineBreakPossible(TUint,TBool,TBool)const
CApaDoorBase::NativePixelSize(TSize &)
CApaDoorBase::SetCropInTwips(const TMargins &)
CApaDoorBase::SetSource(TUid)
CApaDoorBase::Source()const
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CPicture::AddCropInPixels(MGraphicsDeviceMap *,const TMargins &)
CPicture::CPicture()
CPicture::GetSizeInPixels(MGraphicsDeviceMap *,TSize &)const
CPicture::GetSizeInTwips(TSize &)const
CPicture::ResetToOriginal()
CPicture::SetSizeInPixels(MGraphicsDeviceMap *,const TSize &)
CPicture::SetSizeInTwips(const TSize &)
CPicture::~CPicture()

Detailed 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.

Constructor & Destructor Documentation

~CApaModelDoor ( )

IMPORT_C~CApaModelDoor()

Destructor.

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

Member Function Documentation

DetachFromStoreL ( TDetach )

IMPORT_C voidDetachFromStoreL(TDetach = EDetachFull)[virtual]

Reimplemented from CPicture::DetachFromStoreL(TDetach)

Restores the model to the specified degree.

ParameterDescription
The degree to which restoration is needed.

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

IMPORT_C voidDraw(CGraphicsContext &aGc,
const TPoint &aTopLeft,
const TRect &aClipRect,
MGraphicsDeviceMap *aMap
)const [virtual]

Reimplemented from CPicture::Draw(CGraphicsContext &,const TPoint &,const TRect &,MGraphicsDeviceMap *)const

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

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const [virtual]

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

GetOriginalSizeInTwips ( TSize & )

IMPORT_C voidGetOriginalSizeInTwips(TSize &aSize)const [virtual]

Gets the door's original size, in twips.

ParameterDescription
aSizeThis size, in twips.

ModelHeader ( )

CApaModelHeader *ModelHeader()[inline]

Gets the application model wrapper object.

Returns: A pointer to the application model wrapper object.

NewL ( CApaModelHeader * )

IMPORT_C CApaModelDoor *NewL(CApaModelHeader *aHeader)[static]

Creates a model door object.

ParameterDescription
aHeaderA pointer to an existing concrete application model wrapper object.

Returns: A pointer to the new model door object.

NewL ( const CStreamStore &, TStreamId, const MApaModelHeaderFactory * )

IMPORT_C CApaModelDoor *NewL(const CStreamStore &aStore,
TStreamIdaHeadStreamId,
const MApaModelHeaderFactory *aFactory
)[static]

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

See also: MApaModelHeaderFactory

ParameterDescription
aStoreThe store from which the model door is to be restored.
aHeadStreamIdThe 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.
aFactoryA pointer to a factory object for constructing the application model wrapper object, also known as the application model header, a CApaModelHeader type.

Returns: A pointer to the new model door object.

NewLC ( CApaModelHeader * )

IMPORT_C CApaModelDoor *NewLC(CApaModelHeader *aHeader)[static]

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

ParameterDescription
aHeaderA pointer to an existing concrete application model wrapper object.

Returns: A pointer to the new model door object.

RestoreL ( const CStreamStore &, TStreamId, const MApaModelHeaderFactory * )

IMPORT_C voidRestoreL(const CStreamStore &aStore,
TStreamIdaHeadStreamId,
const MApaModelHeaderFactory *aFactory
)

Restores the embedded model data from the specified store.

ParameterDescription
aStoreThe store from which the embedded model data is to be restored.
aHeadStreamIdThe 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.
aFactoryA 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.

ScaleFactorHeight ( )

IMPORT_C TIntScaleFactorHeight()const [virtual]

Gets the door's height scale factor.

Returns: The height scale factor, in percent.

ScaleFactorWidth ( )

IMPORT_C TIntScaleFactorWidth()const [virtual]

Gets the door's width scale factor.

Returns: The width scale factor, in percent.

SetFormat ( TFormat )

voidSetFormat(TFormataFormat)[inline]

Sets the format of the door.

ParameterDescription
aFormatThe format for the graphical representation of the embedded document.

SetScaleFactor ( TInt, TInt )

IMPORT_C voidSetScaleFactor(TIntaScaleFactorWidth,
TIntaScaleFactorHeight
)[virtual]

Sets the door's scale factors.

ParameterDescription
aScaleFactorWidthThe width scale factor, in percent.
aScaleFactorHeightThe height scale factor, in percent.

StoreL ( CStreamStore & )

IMPORT_C TStreamIdStoreL(CStreamStore &aStore)const [virtual]

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.

ParameterDescription
aStoreThe store in which the model data is to be stored.

Returns: 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.