Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: W32STD.H
Link against: ws32.lib

Class RWsGraphicMsgBuf

class RWsGraphicMsgBuf : private RBuf8;

Description

Utility class for building data buffers to be attached to CWindowGc::DrawWsGraphic commands Useful when there is more than one piece of data to be attached to the draw command

Derivation

Members

Defined in RWsGraphicMsgBuf:
Append(), Append(), Append(), Append(), CleanupClosePushL(), Close(), Count(), Data(), Data(), GetFixedMsg(), Pckg(), RWsGraphicMsgBuf(), Remove(), TypeId()

Inherited from RBuf8:
Assign(), Create(), CreateL(), CreateMax(), CreateMaxL(), ReAlloc(), ReAllocL(), Swap(), __DECLARE_TEST, iEBufCPtrType, iEPtrType, operator=()

Inherited from TDes8:
AppendFill(), AppendFormat(), AppendFormatList(), AppendJustify(), AppendNum(), AppendNumFixedWidth(), AppendNumFixedWidthUC(), AppendNumUC(), Capitalize(), Collapse(), Collate(), Copy(), CopyC(), CopyCP(), CopyF(), CopyLC(), CopyUC(), Delete(), Expand(), Fill(), FillZ(), Fold(), Format(), FormatList(), Insert(), Justify(), LeftTPtr(), LowerCase(), MaxLength(), MaxSize(), MidTPtr(), Num(), NumFixedWidth(), NumFixedWidthUC(), NumUC(), PtrZ(), Repeat(), Replace(), RightTPtr(), SetLength(), SetMax(), Trim(), TrimAll(), TrimLeft(), TrimRight(), UpperCase(), WPtr(), Zero(), ZeroTerminate(), iMaxLength, operator+=(), operator[]()

Inherited from TDesC8:
Alloc(), AllocL(), AllocLC(), AtC(), Compare(), CompareC(), CompareF(), DoSetLength(), Find(), FindC(), FindF(), Left(), Length(), Locate(), LocateF(), LocateReverse(), LocateReverseF(), Match(), MatchC(), MatchF(), Mid(), Ptr(), Right(), Size(), Type(), operator!=(), operator>(), operator>=(), operator<(), operator<=(), operator==()


Construction and destruction


RWsGraphicMsgBuf()

IMPORT_C RWsGraphicMsgBuf();

Description

Default Constructor

[Top]


Member functions


Close()

IMPORT_C void Close();

Description


CleanupClosePushL()

IMPORT_C void CleanupClosePushL();

Description


Append()

IMPORT_C TInt Append(TUid aTypeId, const TDesC8 &aData);

Description

Append a descriptor as data

Parameters

TUid aTypeId

the type of the message to append

const TDesC8 &aData

arbitrary length data consisting of the whole message

Return value

TInt

KErrNone if successful, else a system-wide error code


Append()

IMPORT_C TInt Append(TUid aTypeId, const TDesC16 &aData);

Description

Append a descriptor as data

Parameters

TUid aTypeId

the type of the message to append

const TDesC16 &aData

arbitrary length data consisting of the whole message

Return value

TInt

KErrNone if successful, else a system-wide error code


Append()

IMPORT_C TInt Append(TUid aTypeId, TInt aLen, TPtr8 &aPtr);

Description

Append a message of the specified length and type, and return a pointer to allow client code to modify the message. aPtr is only set if the append succeeds. aPtr is only valid until the next message is appended to the buffer.

Parameters

TUid aTypeId

the type of the message to append

TInt aLen

the length of the message to be reserved

TPtr8 &aPtr

a modifiable descriptor to be used by the client code to write into the message body

Return value

TInt

KErrNone if successful, else a system-wide error code


Append()

IMPORT_C TInt Append(const TWsGraphicMsgFixedBase &aMsg);

Description

Append a fixed-size message

Parameters

const TWsGraphicMsgFixedBase &aMsg

the fixed-size message to append

Return value

TInt

KErrNone if successful, else a system-wide error code


Remove()

IMPORT_C void Remove(TInt aIndex);

Description

Remove a message from the buffer

Parameters

TInt aIndex

the ordinal position of message to be removed

Panic codes

if

the index is out of bounds


Count()

IMPORT_C TInt Count() const;

Description

Returns the number of messages in the buffer

Return value

TInt

the number of messages in the buffer


TypeId()

IMPORT_C TUid TypeId(TInt aIndex) const;

Description

Returns the Type ID of a message in the buffer

Parameters

TInt aIndex

the ordinal position of the message

Return value

TUid

the Type ID of the message

Panic codes

if

the index is out of bounds


Data()

IMPORT_C TPtrC8 Data(TInt aIndex) const;

Description

Returns a non-modifiable descriptor of a message body in the buffer

Parameters

TInt aIndex

the ordinal position of the message

Return value

TPtrC8

the message body

Panic codes

if

the index is out of bounds


Data()

IMPORT_C TPtr8 Data(TInt aIndex);

Description

Returns a modifiable descriptor of a message body in the buffer The returned TPtr8 is only valid until the next message is appended to the buffer.

Parameters

TInt aIndex

the ordinal position of the message

Return value

TPtr8

the message body

Panic codes

if

the index is out of bounds


GetFixedMsg()

IMPORT_C void GetFixedMsg(TWsGraphicMsgFixedBase &aMsg, TInt aIndex) const;

Description

Returns a copy of a fixed-size message in the buffer

Parameters

TWsGraphicMsgFixedBase &aMsg

TInt aIndex

the ordinal position of the message

Panic codes

if

the index is out of bounds

the

message specified is not of the correct type


Pckg()

IMPORT_C const TDesC8 &Pckg() const;

Description

Returns the message buffer as a descriptor. Example:

    RWsGraphicMsgBuf msgBuf;
    msgBuf.Append(...);
    ...
    TWsGraphicId id(...);
    SystemGc().DrawWsGraphic(id,Rect(),msgBuf.Pckg());
    msgBuf.Close();

Return value

const TDesC8 &

the message buffer to be attached a command to draw a CWsGraphic