Location: apgdoor.h
Link against: apgrfx.lib
CApaDoor
Supported from 5.0
A wrapper for an embedded document that can be displayed in a user interface as an icon or a glass door.
|
Defined in CApaDoor
:
AppUidL()
, Capability()
, Caption()
, DetachFromStoreL()
, DocumentL()
, Draw()
, GetCropInTwips()
, GetOriginalSizeInTwips()
, NewL()
, NewLC()
, RestoreL()
, ScaleFactorHeight()
, ScaleFactorWidth()
, SetCropInTwips()
, SetFormatToGlassL()
, SetFormatToIconL()
, SetFormatToTemporaryIconL()
, SetScaleFactor()
, StoreL()
, ~CApaDoor()
Inherited from CApaDoorBase
:
EGlassDoor
,
EIconic
,
ETemporarilyIconic
,
ExternalizeBaseStreamL()
,
Format()
,
GlassDoorSize()
,
InternalizeBaseStreamL()
,
SetSource()
,
Source()
,
TFormat
Inherited from CBase
:
operator new()
Inherited from CPicture
:
AddCropInPixels()
,
EDetachDraw
,
EDetachFull
,
ExternalizeL()
,
GetSizeInPixels()
,
GetSizeInTwips()
,
LineBreakPossible()
,
ResetToOriginal()
,
SetSizeInPixels()
,
SetSizeInTwips()
,
TDetach
static CApaDoor* NewL(RFs& aFs,CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips);
Supported from 6.0
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.
|
|
static CApaDoor* NewLC(RFs& aFs,CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips);
Supported from 6.0
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.
|
|
static CApaDoor* NewL(CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips);
Withdrawn in 6.0
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.
|
|
static CApaDoor* NewLC(CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips);
Withdrawn in 6.0
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.
|
|
~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.
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.
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.
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.
|
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()
ensures that this wrapper has a reference to the embedded document store.
|
|
TUid AppUidL() const;
Gets the application specific UID associated with the embedded document.
|
TDesC* Caption() const;
Gets the name of the application with which the embedded document is associated.
|
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.
|
|
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.
|
void DetachFromStoreL(TDetach aDegree=EDetachFull);
Detaches the door from its store, restoring any unrestored elements of the picture, if necessary.
|
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.
|
void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight);
Sets the door's scale factors.
|
TInt ScaleFactorWidth() const;
Gets the door's width scale factor.
|
TInt ScaleFactorHeight() const;
Gets the door's height scale factor.
|
void GetOriginalSizeInTwips(TSize& aSize) const;
Get the door's original size, in twips.
|
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.
|
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.
|
TPictureCapability Capability() const;
Gets the picture's capabilities.
These include whether it is scalable and croppable.
|