CWsGraphicDrawer Class Reference

class CWsGraphicDrawer : public CBase

A window-server-side peer to a CWsGraphic

Inherits from

Public Member Functions
~CWsGraphicDrawer()
voidConstructL(MWsGraphicDrawerEnvironment &, const TGraphicDrawerId &, MWsClient &, const TDesC8 &)
IMPORT_C TBoolContains(const TArray< TGraphicDrawerId > &)
IMPORT_C voidDraw(MWsGc &, const TRect &, const TDesC8 &)
IMPORT_C voidHandleEvent(const TWservCrEvent &)
voidHandleMessage(const TDesC8 &)
IMPORT_C TBoolHasEventHandler()
IMPORT_C const TGraphicDrawerId &Id()
IMPORT_C TBoolIsSharedWith(TSecureId)
IMPORT_C const MWsClient &Owner()
IMPORT_C voidSetEventHandler(MWsEventHandler *)
IMPORT_C TIntShare(TSecureId)
IMPORT_C TIntShareGlobally()
IMPORT_C TIntUnShare(TSecureId)
IMPORT_C TIntUnShareGlobally()
Protected Member Functions
CWsGraphicDrawer()
IMPORT_C voidBaseConstructL(MWsGraphicDrawerEnvironment &, const TGraphicDrawerId &, MWsClient &)
IMPORT_C MWsGraphicDrawerEnvironment &Env()
IMPORT_C const MWsGraphicDrawerEnvironment &Env()
IMPORT_C voidInvalidate()
IMPORT_C TIntSendMessage(const TDesC8 &)
IMPORT_C TIntSendMessage(CWsMessageData &)
Private Member Functions
voidDoDraw(MWsGc &, const TRect &, const TDesC8 &)
IMPORT_C TBoolHasAsChild(const TArray< TGraphicDrawerId > &)
Inherited Functions
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()
Private Attributes
TUid iDtor_ID_Key
CPimpl *iPimpl
TInt iWsGraphicDrawerSpare

Constructor & Destructor Documentation

CWsGraphicDrawer()

IMPORT_CCWsGraphicDrawer()[protected]

Constructor

~CWsGraphicDrawer()

IMPORT_C~CWsGraphicDrawer()

Destructor

Member Functions Documentation

BaseConstructL(MWsGraphicDrawerEnvironment &, const TGraphicDrawerId &, MWsClient &)

IMPORT_C voidBaseConstructL(MWsGraphicDrawerEnvironment &aEnv,
const TGraphicDrawerId &aId,
MWsClient &aOwner
)[protected]

Completes construction of the baseclass. Derived drawers should call this from their ConstructL() implementations

Parameters

MWsGraphicDrawerEnvironment & aEnvthe environment this drawer exists in
const TGraphicDrawerId & aIdthe ID of this drawer
MWsClient & aOwnerthe client session that owns this drawer

ConstructL(MWsGraphicDrawerEnvironment &, const TGraphicDrawerId &, MWsClient &, const TDesC8 &)

voidConstructL(MWsGraphicDrawerEnvironment &aEnv,
const TGraphicDrawerId &aId,
MWsClient &aOwner,
const TDesC8 &aData
)[pure virtual]

This function should be overriden by all derived classes. The first call the implementation of this function should make is to BaseConstructL().

Parameters

MWsGraphicDrawerEnvironment & aEnvthe environment this drawer exists in
const TGraphicDrawerId & aIdthe ID of this drawer
MWsClient & aOwnerthe client session that owns this drawer
const TDesC8 & aDataarbitrary data for constructing this instance, sent from the client.

Contains(const TArray< TGraphicDrawerId > &)

IMPORT_C TBoolContains(const TArray< TGraphicDrawerId > &aIds)const

Tests whether this drawer is, or itself draws, any of the graphic drawers identified by the IDs. Calls HasAsChild() on itself to determine if this graphic does itself contain any of the IDs. Derived classes which themselves draw other graphic drawers should override HasAsChild().

Parameters

const TArray< TGraphicDrawerId > & aIdsthe (sorted in TGraphicDrawerId::Compare order) list of IDs

DoDraw(MWsGc &, const TRect &, const TDesC8 &)

voidDoDraw(MWsGc &aGc,
const TRect &aRect,
const TDesC8 &aData
)const [private, pure virtual]

Parameters

MWsGc & aGc
const TRect & aRect
const TDesC8 & aData

Draw(MWsGc &, const TRect &, const TDesC8 &)

IMPORT_C voidDraw(MWsGc &aGc,
const TRect &aRect,
const TDesC8 &aData
)const

Parameters

MWsGc & aGc
const TRect & aRect
const TDesC8 & aData

Env()

IMPORT_C MWsGraphicDrawerEnvironment &Env()[protected]

The environment this drawer exists in

Env()

IMPORT_C const MWsGraphicDrawerEnvironment &Env()const [protected]

The environment this drawer exists in

HandleEvent(const TWservCrEvent &)

IMPORT_C voidHandleEvent(const TWservCrEvent &aEvent)

Parameters

const TWservCrEvent & aEvent

HandleMessage(const TDesC8 &)

voidHandleMessage(const TDesC8 &aData)[pure virtual]

Parameters

const TDesC8 & aData

HasAsChild(const TArray< TGraphicDrawerId > &)

IMPORT_C TBoolHasAsChild(const TArray< TGraphicDrawerId > &aIds)const [private, virtual]

Called by Contains() to determine if the graphic identified by Id is contained within the other graphic drawers that this graphic drawer itself draws. Derived classes which draw other drawers should override this method and call Contains() on all graphics which they draw.

Parameters

const TArray< TGraphicDrawerId > & aIdsa (sorted in TGraphicDrawerId::Compare order) list of the drawer IDs to see if this drawer draws

HasEventHandler()

IMPORT_C TBoolHasEventHandler()const

Id()

IMPORT_C const TGraphicDrawerId &Id()const

The ID of this graphic

Invalidate()

IMPORT_C voidInvalidate()[protected]

Schedules all potentially affected parts of the screen to repaint Called by derived classes when their presentation changes (e.g. they receive new artwork via a SendMessage()) Note: this is not a suitable method for animating a graphic. For animation, use MWsGc::Invalidate when the graphic is being drawn to schedule the next animation frame instead.

IsSharedWith(TSecureId)

IMPORT_C TBoolIsSharedWith(TSecureIdaClientId)const

tests whether the client is allowed to draw this graphic Conditions include whether the client is the owner of this graphic, whether the graphic is shared globally, or whether this graphic has been explicitly shared with the client

Parameters

TSecureId aClientIdthe Secure ID of the client session's process

Owner()

IMPORT_C const MWsClient &Owner()const

Only the owner can delete, replace or send messages to this graphic. The owner and any session sharing the owner's Secure ID can always draw the graphic.

SendMessage(const TDesC8 &)

IMPORT_C TIntSendMessage(const TDesC8 &aData)[protected]

Sends this message to the client-side peer

Parameters

const TDesC8 & aDatathe data to send

SendMessage(CWsMessageData &)

IMPORT_C TIntSendMessage(CWsMessageData &aData)[protected]

Sends this message to the client-side peer

Parameters

CWsMessageData & aDatathe data to send

SetEventHandler(MWsEventHandler *)

IMPORT_C voidSetEventHandler(MWsEventHandler *aHandler)

Parameters

MWsEventHandler * aHandler

Share(TSecureId)

IMPORT_C TIntShare(TSecureIdaClientId)

Explicitly shares this graphic with client sessions with the specified Secure ID

Parameters

TSecureId aClientIdthe Secure ID of the client sessions to share with

ShareGlobally()

IMPORT_C TIntShareGlobally()

Share this drawer with all client sessions Sharing globally trumps explicit shares

UnShare(TSecureId)

IMPORT_C TIntUnShare(TSecureIdaClientId)

Stop this drawer from being shared with all client sessions with the specific Secure ID ShareGlobally() trumps explicit sharing

Parameters

TSecureId aClientIdthe Secure ID of the client sessions to not share with

UnShareGlobally()

IMPORT_C TIntUnShareGlobally()

Stop this drawer from being shared with all client sessions A drawer that isn't shared explicitly is only available to clients it has been explicitly shared with using Share()

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key[private]

CPimpl * iPimpl

CPimpl *iPimpl[private]

TInt iWsGraphicDrawerSpare

TInt iWsGraphicDrawerSpare[private]