CApaDoor Class Reference

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.

Inherits from

Public Member Functions
~CApaDoor()
IMPORT_C TUidAppUidL()
TPictureCapability Capability()
TDesC *Caption()
voidDetachFromStoreL(TDetach)
IMPORT_C CApaDocument *DocumentL(TBool)
voidDraw(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap *)
voidGetCropInTwips(TMargins &)
voidGetOriginalSizeInTwips(TSize &)
IMPORT_C CApaDoor *NewL(RFs &, CApaDocument &, const TSize &)
IMPORT_C CApaDoor *NewL(RFs &, const CStreamStore &, TStreamId, CApaProcess &)
IMPORT_C CApaDoor *NewLC(RFs &, CApaDocument &, const TSize &)
IMPORT_C voidRestoreL(const CStreamStore &, TStreamId)
TInt ScaleFactorHeight()
TInt ScaleFactorWidth()
voidSetCropInTwips(const TMargins &)
IMPORT_C voidSetFormatToGlassL()
IMPORT_C voidSetFormatToIconL()
IMPORT_C voidSetFormatToTemporaryIconL(TBool)
voidSetScaleFactor(TInt, TInt)
TStreamId StoreL(CStreamStore &)
Private Member Functions
CApaDoor(RFs &, CApaProcess &)
CApaDoor(RFs &, CApaDocument &, const TSize &)
TUid AppUidFromStreamL()
voidConstructL()
voidCopyStoreL(const CEmbeddedStore &, RWriteStream &)
voidExternalizeL(RWriteStream &)
voidExternalizeStateStreamL(CStreamStore &, CStreamDictionary &)
TSize GlassDoorSize()
voidInternalizeStateStreamL(const CStreamStore &, const CStreamDictionary &, TSize)
CStreamDictionary *ReadStreamDictionaryLC(const CStreamStore &, TStreamId)
voidRestoreDocL(const CPersistentStore &)
voidRestoreDoorStateL(const CStreamStore &, const CStreamDictionary &)
voidSetIconSizeInTwips(TSize)
voidStoreDocL(CPersistentStore &)
Inherited Functions
CApaDoorBase::CApaDoorBase()
CApaDoorBase::ExternalizeBaseStreamL(CStreamStore &,CStreamDictionary &)const
CApaDoorBase::Format()const
CApaDoorBase::InternalizeBaseStreamL(const CStreamStore &,const CStreamDictionary &)
CApaDoorBase::LineBreakPossible(TUint,TBool,TBool)const
CApaDoorBase::NativePixelSize(TSize &)
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()
Inherited Enumerations
CApaDoorBase:TFormat
CPicture:TDetach
Private Attributes
CApaDocument *iApaDoc
CApaProcess *iApaProcess
HBufC *iAppCaption
RFs &iFs
TSize iIconSizeInTwips
CPicture *iPicture
CEmbeddedStore *iStore
CBufSeg *iStoreHost
Inherited Attributes
CApaDoorBase::iFormat
CApaDoorBase::iSource

Constructor & Destructor Documentation

CApaDoor(RFs &, CApaProcess &)

CApaDoor(RFs &aFs,
CApaProcess &aProcess
)[private]

Parameters

RFs & aFs
CApaProcess & aProcess

CApaDoor(RFs &, CApaDocument &, const TSize &)

CApaDoor(RFs &aFs,
CApaDocument &aDoc,
const TSize &aDefaultIconSizeInTwips
)[private]

Parameters

RFs & aFs
CApaDocument & aDoc
const TSize & aDefaultIconSizeInTwips

~CApaDoor()

IMPORT_C~CApaDoor()

Member Functions Documentation

AppUidFromStreamL()

TUid AppUidFromStreamL()const [private]

AppUidL()

IMPORT_C TUidAppUidL()const

Capability()

TPictureCapability Capability()const [virtual]

Gets the Embedded Document's capabilities. These include whether it is scalable and croppable.

The capabilities of the Embedded Document

Caption()

TDesC *Caption()const [inline]

Gets the name of the application with which the embedded document is associated. A pointer to a descriptor containing the name of the application.

ConstructL()

voidConstructL()[private]

CopyStoreL(const CEmbeddedStore &, RWriteStream &)

voidCopyStoreL(const CEmbeddedStore &aSourceStore,
RWriteStream &aTargetStream
)[private, static]

Parameters

const CEmbeddedStore & aSourceStore
RWriteStream & aTargetStream

DetachFromStoreL(TDetach)

voidDetachFromStoreL(TDetachaDegree = EDetachFull)[virtual]

Parameters

TDetach aDegree = EDetachFull

DocumentL(TBool)

IMPORT_C CApaDocument *DocumentL(TBoolaCheckPassword = EFalse)

Parameters

TBool aCheckPassword = EFalse

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

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

Draws a picture.

Parameters

CGraphicsContext & aGcThe graphics context.
const TPoint & aTopLeftThe co-ordinates where the top left corner pixel of the picture should be placed. Note that whether this is actually drawn depends on the clipping area defined.
const TRect & aClipRectA clipping rectangle that defines the area to which the function should draw. An implementation should never draw outside this rectangle. Note that the graphics context may also have a clipping rectangle set on it.
MGraphicsDeviceMap * aMapThe device map for the graphics device. The implementation should use this to find the scaling to apply to the picture.

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aStream)const [private, virtual]

Externalises the picture to a stream.

The presence of this function means that the standard templated stream operator<<() is available to externalise objects of this class.

A derived class must supply an implementation of this function.

Parameters

RWriteStream & aStreamThe write stream.

ExternalizeStateStreamL(CStreamStore &, CStreamDictionary &)

voidExternalizeStateStreamL(CStreamStore &aStore,
CStreamDictionary &aStreamDict
)const [private]

Parameters

CStreamStore & aStore
CStreamDictionary & aStreamDict

GetCropInTwips(TMargins &)

voidGetCropInTwips(TMargins &aMargins)const [virtual]

Gets the cropping margins of a Embedded Document in twips. These margins are relative to the original unscaled size of the Embedded Document.

Parameters

TMargins & aMarginsThe cropping margins of the Embedded Document, in twips

GetOriginalSizeInTwips(TSize &)

voidGetOriginalSizeInTwips(TSize &aSize)const [virtual]

Gets the pictur's original size, in twips.

Parameters

TSize & aSizeThe size of the picture, in twips

GlassDoorSize()

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.

InternalizeStateStreamL(const CStreamStore &, const CStreamDictionary &, TSize)

voidInternalizeStateStreamL(const CStreamStore &aStore,
const CStreamDictionary &aStreamDict,
TSizeaDefaultIconSize
)[private]

Parameters

const CStreamStore & aStore
const CStreamDictionary & aStreamDict
TSize aDefaultIconSize

NewL(RFs &, CApaDocument &, const TSize &)

IMPORT_C CApaDoor *NewL(RFs &aFs,
CApaDocument &aDoc,
const TSize &aDefaultIconSizeInTwips
)[static]

Parameters

RFs & aFs
CApaDocument & aDoc
const TSize & aDefaultIconSizeInTwips

NewL(RFs &, const CStreamStore &, TStreamId, CApaProcess &)

IMPORT_C CApaDoor *NewL(RFs &aFs,
const CStreamStore &aStore,
TStreamIdaStreamId,
CApaProcess &aProcess
)[static]

Parameters

RFs & aFs
const CStreamStore & aStore
TStreamId aStreamId
CApaProcess & aProcess

NewLC(RFs &, CApaDocument &, const TSize &)

IMPORT_C CApaDoor *NewLC(RFs &aFs,
CApaDocument &aDoc,
const TSize &aDefaultIconSizeInTwips
)[static]

Parameters

RFs & aFs
CApaDocument & aDoc
const TSize & aDefaultIconSizeInTwips

ReadStreamDictionaryLC(const CStreamStore &, TStreamId)

CStreamDictionary *ReadStreamDictionaryLC(const CStreamStore &aStore,
TStreamIdaStreamId
)[private, static]

Parameters

const CStreamStore & aStore
TStreamId aStreamId

RestoreDocL(const CPersistentStore &)

voidRestoreDocL(const CPersistentStore &aStore)[private]

Parameters

const CPersistentStore & aStore

RestoreDoorStateL(const CStreamStore &, const CStreamDictionary &)

voidRestoreDoorStateL(const CStreamStore &aStore,
const CStreamDictionary &streamDic
)[private]

Parameters

const CStreamStore & aStore
const CStreamDictionary & streamDic

RestoreL(const CStreamStore &, TStreamId)

IMPORT_C voidRestoreL(const CStreamStore &aStore,
TStreamIdaHeadStreamId
)

Parameters

const CStreamStore & aStore
TStreamId aHeadStreamId

ScaleFactorHeight()

TInt ScaleFactorHeight()const [virtual]

Gets the Embedded Document height scale factor.

The height scale factor, in percent

ScaleFactorWidth()

TInt ScaleFactorWidth()const [virtual]

Gets the Embedded Document's width scale factor.

The width scale factor, in percent

SetCropInTwips(const TMargins &)

voidSetCropInTwips(const TMargins &aMargins)[virtual]

Sets the cropping margins of a Embedded Document in twips. These are relative to the original unscaled size of the Embedded Document.

Parameters

const TMargins & aMarginsThe cropping margins of the Embedded Document, in twips

SetFormatToGlassL()

IMPORT_C voidSetFormatToGlassL()

SetFormatToIconL()

IMPORT_C voidSetFormatToIconL()

SetFormatToTemporaryIconL(TBool)

IMPORT_C voidSetFormatToTemporaryIconL(TBoolaEnabled = ETrue)

Parameters

TBool aEnabled = ETrue

SetIconSizeInTwips(TSize)

voidSetIconSizeInTwips(TSizeaSize)[private]

Parameters

TSize aSize

SetScaleFactor(TInt, TInt)

voidSetScaleFactor(TIntaScaleFactorWidth,
TIntaScaleFactorHeight
)[virtual]

Sets the Embedded Document's scale factors

Parameters

TInt aScaleFactorWidthThe width scale factor, in percent
TInt aScaleFactorHeightThe height scale factor, in percent

StoreDocL(CPersistentStore &)

voidStoreDocL(CPersistentStore &aStore)const [private]

Parameters

CPersistentStore & aStore

StoreL(CStreamStore &)

TStreamId StoreL(CStreamStore &aStore)const [virtual]

Stores the Embedded Document to the specified store.

The ID of the (head) stream used to store the Embedded Document

Parameters

CStreamStore & aStoreThe store containing the stream.

Member Data Documentation

CApaDocument * iApaDoc

CApaDocument *iApaDoc[private]

CApaProcess * iApaProcess

CApaProcess *iApaProcess[private]

HBufC * iAppCaption

HBufC *iAppCaption[private]

RFs & iFs

RFs &iFs[private]

TSize iIconSizeInTwips

TSize iIconSizeInTwips[private]

CPicture * iPicture

CPicture *iPicture[private]

CEmbeddedStore * iStore

CEmbeddedStore *iStore[private]

CBufSeg * iStoreHost

CBufSeg *iStoreHost[private]