class CApaModelDoor : public CApaDoorBase |
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.
Public Member Functions | |
---|---|
~CApaModelDoor() | |
IMPORT_C void | DetachFromStoreL(TDetach) |
IMPORT_C void | Draw(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap *) |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C void | GetOriginalSizeInTwips(TSize &) |
CApaModelHeader * | ModelHeader() |
IMPORT_C CApaModelDoor * | NewL(CApaModelHeader *) |
IMPORT_C CApaModelDoor * | NewL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *) |
IMPORT_C CApaModelDoor * | NewLC(CApaModelHeader *) |
IMPORT_C void | RestoreL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *) |
IMPORT_C TInt | ScaleFactorHeight() |
IMPORT_C TInt | ScaleFactorWidth() |
void | SetFormat(TFormat) |
IMPORT_C void | SetScaleFactor(TInt, TInt) |
IMPORT_C TStreamId | StoreL(CStreamStore &) |
Private Member Functions | |
---|---|
CApaModelDoor() | |
CApaModelDoor(CApaModelHeader *) | |
void | CopyStoreL(const CEmbeddedStore &, RWriteStream &) |
TSize | GlassDoorSize() |
void | InternalizeModelL(const MApaModelHeaderFactory &) |
CStreamDictionary * | ReadStreamDictionaryLC(const CStreamStore &, TStreamId) |
Inherited Enumerations | |
---|---|
CApaDoorBase:TFormat | |
CPicture:TDetach |
Private Attributes | |
---|---|
CApaModelHeader * | iModelHeader |
TSize | iScaleFactor |
CEmbeddedStore * | iStore |
CBufSeg * | iStoreHost |
Inherited Attributes | |
---|---|
CApaDoorBase::iFormat | |
CApaDoorBase::iSource |
CApaModelDoor | ( | CApaModelHeader * | aHeader | ) | [private] |
CApaModelHeader * aHeader |
IMPORT_C | ~CApaModelDoor | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
void | CopyStoreL | ( | const CEmbeddedStore & | aSourceStore, |
RWriteStream & | aTargetStream | |||
) | [private, static] |
const CEmbeddedStore & aSourceStore | |
RWriteStream & aTargetStream |
IMPORT_C void | DetachFromStoreL | ( | TDetach | = EDetachFull | ) | [virtual] |
Restores the model to the specified degree.
TDetach = EDetachFull | The degree to which restoration is needed. |
IMPORT_C void | Draw | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aClipRect, | |||
MGraphicsDeviceMap * | aMap | |||
) | const [virtual] |
Not supported; if called, raises an APPARC 17 panic.
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
const TRect & aClipRect | |
MGraphicsDeviceMap * aMap |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
Not supported; if called, raises an APPARC 17 panic.
RWriteStream & aStream |
IMPORT_C void | GetOriginalSizeInTwips | ( | TSize & | aSize | ) | const [virtual] |
Gets the door's original size, in twips.
TSize & aSize | This size, in twips. |
TSize | GlassDoorSize | ( | ) | const [private, virtual] |
Returns the size of the glass door, in twips.
A concrete implementation of this function is provided by derived classes.
The size of the glass door, in twips.
void | InternalizeModelL | ( | const MApaModelHeaderFactory & | aFactory | ) | [private] |
const MApaModelHeaderFactory & aFactory |
CApaModelHeader * | ModelHeader | ( | ) | [inline] |
Gets the application model wrapper object.
A pointer to the application model wrapper object.
IMPORT_C CApaModelDoor * | NewL | ( | CApaModelHeader * | aHeader | ) | [static] |
Creates a model door object.
A pointer to the new model door object.
CApaModelHeader * aHeader | A pointer to an existing concrete application model wrapper object. |
IMPORT_C CApaModelDoor * | NewL | ( | const CStreamStore & | aStore, |
TStreamId | aHeadStreamId, | |||
const MApaModelHeaderFactory * | aFactory | |||
) | [static] |
Creates a model door object and restores it from an embedded store within the specified store.
A pointer to the new model door object.
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. |
IMPORT_C CApaModelDoor * | NewLC | ( | CApaModelHeader * | aHeader | ) | [static] |
Creates a model door object, and puts a pointer to it onto the cleanup stack.
A pointer to the new model door object.
CApaModelHeader * aHeader | A pointer to an existing concrete application model wrapper object. |
CStreamDictionary * | ReadStreamDictionaryLC | ( | const CStreamStore & | aSourceStore, |
TStreamId | aStreamId | |||
) | [private, static] |
const CStreamStore & aSourceStore | |
TStreamId aStreamId |
IMPORT_C void | RestoreL | ( | const CStreamStore & | aStore, |
TStreamId | aHeadStreamId, | |||
const MApaModelHeaderFactory * | aFactory | |||
) |
Restores the embedded model data from the specified store.
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. |
IMPORT_C TInt | ScaleFactorHeight | ( | ) | const [virtual] |
Gets the door's height scale factor.
The height scale factor, in percent.
IMPORT_C TInt | ScaleFactorWidth | ( | ) | const [virtual] |
Gets the door's width scale factor.
The width scale factor, in percent.
void | SetFormat | ( | TFormat | aFormat | ) | [inline] |
Sets the format of the door.
TFormat aFormat | The format for the graphical representation of the embedded document. |
IMPORT_C void | SetScaleFactor | ( | TInt | aScaleFactorWidth, |
TInt | aScaleFactorHeight | |||
) | [virtual] |
Sets the door's scale factors.
IMPORT_C TStreamId | StoreL | ( | 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.
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.
CStreamStore & aStore | The store in which the model data is to be stored. |