|
||
class CApaDoor : public CApaDoorBase;
A wrapper for an embedded document that can be displayed in a user interface as an icon or a glass door.
CBase
-
Base class for all classes to be instantiated on the heap.
CPicture
- Abstract base class for: drawing a picture to a graphics context, storing and re...
CApaDoorBase
- The base class for the graphic representation of an embedded document.
CApaDoor
- A wrapper for an embedded document that can be displayed in a user interface as ...
Defined in CApaDoor
:
AppUidL()const
Gets the application specific UID associated with the embedded document.Capability()const
Gets the picture's capabilities.Caption()const
Gets the name of the application with which the embedded document is associated.DetachFromStoreL(TDetach)
Detaches the door from its store, restoring any unrestored elements of the pictu...DocumentL(TBool)
Returns a pointer to the embedded document represented by this wrapper.Draw(CGraphicsContext &,const TPoint &,const TRect &,MGraphicsDeviceMap *)const
Draws the door either as glass or as an icon depending on the format.ExternalizeL(RWriteStream &)const
Externalises the picture to a stream.GetCropInTwips(TMargins &)const
Gets the cropping margins of the door in twips.GetOriginalSizeInTwips(TSize &)const
Get the door's original size, in twips.GlassDoorSize()const
Returns the size of the glass door, in twips.NewL(RFs &,CApaDocument &,const TSize &)
Creates a new wrapper for the specified embedded document.NewL(RFs &,const CStreamStore &,TStreamId,CApaProcess &)
NewLC(RFs &,CApaDocument &,const TSize &)
Creates a new wrapper for the specified embedded document and places a pointer t...RestoreL(const CStreamStore &,TStreamId)
Restores the embedded document from the specified store.ScaleFactorHeight()const
Gets the door's height scale factor.ScaleFactorWidth()const
Gets the door's width scale factor.SetCropInTwips(const TMargins &)
Sets the cropping margins of a picture in twips.SetFormatToGlassL()
Sets the format of the door to glass.SetFormatToIconL()
Sets the format of the door to iconic.SetFormatToTemporaryIconL(TBool)
Switches the format of the door between temporarily iconic and glass.SetScaleFactor(TInt,TInt)
Sets the door's scale factors.StoreL(CStreamStore &)const
Stores the embedded document in the specified store as an embedded store.~CApaDoor()
Destructor.Inherited from CApaDoorBase
:
EGlassDoor
The representation is a glass door. EIconic
The representation is an icon. ETemporarilyIconic
The representation is a glass door but has been temporarily switched to an icon....ExternalizeBaseStreamL(CStreamStore &,CStreamDictionary &)const
Externalises the information contained in this base class to a stream in the spe...Format()const
Gets the current format of the representation of the embedded document.InternalizeBaseStreamL(const CStreamStore &,const CStreamDictionary &)
Internalises the information for this base class from a stream in the specified ...LineBreakPossible(TUint,TBool,TBool)const
States whether a line break is possible, either before or after an Embedded Docu...NativePixelSize(TSize &)
Returns the native pixel size of the bitmap.SetSource(TUid)
Sets the UID that identifies this door when the source originates on a non-Symbi...Source()const
Gets the UID that identifies this door when the source originates on a non-Symbi...TFormat
Defines the possible formats for the graphical representation of the embedded do...iFormat
iSource
Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from CPicture
:
AddCropInPixels(MGraphicsDeviceMap *,const TMargins &)
Adds pixel cropping margins to the picture.EDetachDraw
Internalise enough information to draw the picture (and no more); null any refer...EDetachFull
Internalise all data that is required to fully store the picture later; null any...GetSizeInPixels(MGraphicsDeviceMap *,TSize &)const
Gets the picture's size in pixels.GetSizeInTwips(TSize &)const
Gets the picture's size, in twips.ResetToOriginal()
Resets the picture's scaling and cropping attributes to their original values. SetSizeInPixels(MGraphicsDeviceMap *,const TSize &)
Sets the picture's size in pixels.SetSizeInTwips(const TSize &)
Sets the picture's size, in twipsTDetach
Options for detaching pictures from stores. Used by CPicture::DetachFromStoreL(T...IMPORT_C static CApaDoor* NewLC(RFs &aFs, CApaDocument &aDoc, const TSize &aDefaultIconSizeInTwips);
Creates a new wrapper for the specified embedded document and places a pointer to it onto the cleanup stack.
The door is of the specified size. The wrapper takes ownership of the document; if creation of the wrapper fails, the document object is destroyed.
|
|
IMPORT_C static CApaDoor* NewL(RFs &aFs, CApaDocument &aDoc, const TSize &aDefaultIconSizeInTwips);
Creates a new wrapper for the specified embedded document.
The door is of the specified size. The wrapper takes ownership of the document; if creation of the wrapper fails, the document object is destroyed.
|
|
IMPORT_C static CApaDoor* NewL(RFs &aFs, const CStreamStore &aStore, TStreamId aStreamId, CApaProcess &aProcess);
|
|
IMPORT_C ~CApaDoor();
Destructor.
Frees all resources owned by the object, prior to its destruction. In particular, it destroys the document, removing all references to it from the application process.
IMPORT_C void SetFormatToIconL();
Sets the format of the door to iconic.
The application's icon is used, or, if this cannot be found, the default icon is used instead. The function leaves only if construction of the default icon object fails.
IMPORT_C void SetFormatToGlassL();
Sets the format of the door to glass.
The function asks the document to create a fresh copy of the door and destroys any existing copy. If the process of creating the door completes without leaving, but returns a zero pointer, then the function raises an APGRFX 17 panic.
The function leaves with:
KErrNotSupported, if the document does not support being represented by a glass door.
KErrNotFound, if the application DLL cannot be found.
If the function leaves, the format remains unchanged.
CApaDocument::GlassPictureL()
Gets an object that can draw a representation of the document's content.IMPORT_C void SetFormatToTemporaryIconL(TBool aEnabled=ETrue);
Switches the format of the door between temporarily iconic and glass.
If the door is iconic, then the function does nothing.
|
IMPORT_C CApaDocument* DocumentL(TBool aCheckPassword=EFalse);
Returns a pointer to the embedded document represented by this wrapper.
If necessary, the document is restored from its embedded store.
Note that if the wrapper does not have a reference to the embedded document store, then the function raises a APGRFX 13 panic.
Constructing this wrapper through a TApaPictureFactory
or storing the embedded document through CApaDoor::StoreL(CStreamStore &)const
ensures that this wrapper has a reference to the embedded document store.
|
|
TApaPictureFactory
A factory class for instantiating and restoring an application's door.CApaDoor::StoreL(CStreamStore &)const
Stores the embedded document in the specified store as an embedded store.CApaDocument::ValidatePasswordL()const
Checks the document password.inline TDesC* Caption() const;
Gets the name of the application with which the embedded document is associated.
|
IMPORT_C TUid AppUidL() const;
Gets the application specific UID associated with the embedded document.
|
IMPORT_C void RestoreL(const CStreamStore &aStore, TStreamId aHeadStreamId);
Restores the embedded document from the specified store.
The format of the door is set to iconic if the embedded document is password protected.
|
virtual TStreamId StoreL(CStreamStore &aStore) const;
Stores the embedded document in the specified store as an embedded store.
This function saves the format of the door. It also stores the document, if the document exists in memory, otherwise, it simply copies the stream containing the embedded document into the specified store.
|
|
virtual void Draw(CGraphicsContext &aGc, const TPoint &aTopLeft, const TRect &aClipRect, MGraphicsDeviceMap *aMap) const;
Draws the door either as glass or as an icon depending on the format.
|
virtual void DetachFromStoreL(TDetach aDegree=EDetachFull);
Detaches the door from its store, restoring any unrestored elements of the picture, if necessary.
|
CApaDocument::DetachFromStoreL(CPicture::TDetach)
Restores the document to the extent that it does not need the store further.virtual void GetOriginalSizeInTwips(TSize &aSize) const;
Get the door's original size, in twips.
|
virtual void SetScaleFactor(TInt aScaleFactorWidth, TInt aScaleFactorHeight);
Sets the door's scale factors.
|
virtual void SetCropInTwips(const TMargins &aMargins);
Sets the cropping margins of a picture in twips.
These are relative to the original unscaled size of the picture.
|
virtual TPictureCapability Capability() const;
Gets the picture's capabilities.
These include whether it is scalable and croppable.
|
virtual void GetCropInTwips(TMargins &aMargins) const;
Gets the cropping margins of the door in twips.
These margins are relative to the original unscaled size of the picture.
|
virtual TInt ScaleFactorWidth() const;
Gets the door's width scale factor.
|
virtual TInt ScaleFactorHeight() const;
Gets the door's height scale factor.
|
private: virtual void ExternalizeL(RWriteStream &aStream) const;
Externalises the picture to a stream.
The presence of this function means that the standard templated stream operator<<(RWriteStream &,const T &)
is available to externalise objects of this class.
A derived class must supply an implementation of this function.
|
private: virtual TSize GlassDoorSize() const;
Returns the size of the glass door, in twips.
A concrete implementation of this function is provided by derived classes.
|