CVirtualKey Class Reference

class CVirtualKey : public CBase

CVirtualKey

Key on virtual key board. A virtual key is similar to the key in hard keyboard. It will report virtual key up/down event when pressed up/down with a TkeyEvent data

feplayoutcontrol.lib
Since
S60 V4.0

Inherits from

Public Member Functions
~CVirtualKey ()
TBool Dimmed ()
TUint DisplayCode ()
TDesC * DisplayUnicode ()
IMPORT_C void HideKeyCtrl ( TBool )
TInt HighlightBmpIndex ()
TInt HighlightMaskBmpIndex ()
TRect InnerRect ()
IMPORT_C TVirtualKeyIrregularKeyType IrregualrKeyType ()
TBool IsLatchKey ()
TUint KeyCode ()
const TDesC & KeyUnicodes ()
const TDesC & KeyUnicodes ( TVirtualKeyTextPos )
TBool Latched ()
IMPORT_C CVirtualKey * NewL ( TUint , TInt , const TRect &, const TRect &, TInt , TInt , TInt )
IMPORT_C CVirtualKey * NewL (const TDesC &, TInt , const TRect &, const TRect &, TInt , TInt , TInt )
IMPORT_C CVirtualKey * NewL ( RPointerArray < HBufC > &, TInt , const TRect &)
const TRect & Rect ()
TInt ScanCode ()
void SetDimmed ( TBool )
void SetDisplayCode ( TUint )
IMPORT_C void SetDisplayUnicodeL (const TDesC &)
void SetInnerRect (const TRect &)
IMPORT_C void SetIrregualrKeyType ( TVirtualKeyIrregularKeyType )
void SetKeyData (const TDesC &)
void SetKeyScancode ( TInt )
void SetLatchKey ( TBool )
IMPORT_C void SetLatched ( TBool )
IMPORT_C void SetRect (const TRect &)
IMPORT_C void SetUnicodesL ( RPointerArray < HBufC > &)
TBool UnicodesListEmpty ( TInt &)
Protected Member Functions
void ConstructL (const TDesC &)
void ConstructL (const RPointerArray < HBufC > &)
Private Member Functions
CVirtualKey ( TUint , TInt , const TRect &, TInt , TInt )
CVirtualKey ( TInt , const TRect &)
CVirtualKeyCtrl * CreateKeyCtrlL ( CVirtualKey *, TBool )
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
TUint iCode
HBufC * iCodeData
TBool iDimmed
HBufC * iDisplayCodeData
TInt iHighlightBmpIndex
TInt iHighlightMaskBmpIndex
TVirtualKeyIrregularKeyType iIrregularKeyType
TBool iIsLatchKey
CVirtualKeyCtrl * iKeyCtrl
TBool iLatched
TRect iRect
TInt iReserver1
TInt iReserver2
TUint iScanCode
RPointerArray < HBufC > iUnicodesList
TRect innerRect

Constructor & Destructor Documentation

CVirtualKey(TUint, TInt, const TRect &, TInt, TInt)

CVirtualKey ( TUint aCode,
TInt aScanCode,
const TRect & aRect,
TInt aHighlightBmpIdx,
TInt aHighlightMaskBmpId
) [private]

Default constructor

Since
S60 V4.0

Parameters

TUint aCode The code this key stands for
TInt aScanCode The scan code for this key
const TRect & aRect The position of the key relative to keyboard
TInt aHighlightBmpIdx The bitmap index for highlighging key background. Bitmap is stored in virtual key board.
TInt aHighlightMaskBmpId

CVirtualKey(TInt, const TRect &)

CVirtualKey ( TInt aScanCode,
const TRect & aRect
) [private]

Parameters

TInt aScanCode
const TRect & aRect

~CVirtualKey()

IMPORT_C ~CVirtualKey ( ) [virtual]

Destructor

Since
S60 V4.0

Member Functions Documentation

ConstructL(const TDesC &)

void ConstructL ( const TDesC & aCodeData ) [protected]

2nd phase constructor

Since
S60 V4.0

Parameters

const TDesC & aCodeData

ConstructL(const RPointerArray< HBufC > &)

void ConstructL ( const RPointerArray < HBufC > & aUnicodesList ) [protected]

Parameters

const RPointerArray < HBufC > & aUnicodesList

CreateKeyCtrlL(CVirtualKey *, TBool)

CVirtualKeyCtrl * CreateKeyCtrlL ( CVirtualKey * aKeyInfo,
TBool aRawKeyFlag
) [private]

Create a key control

Since
S60 V5.0

Parameters

CVirtualKey * aKeyInfo The virtual key information
TBool aRawKeyFlag Flag indicates whether a raw key is needed

Dimmed()

TBool Dimmed ( ) const [inline]

Get the key dim status

Since
S60 V4.0

DisplayCode()

TUint DisplayCode ( ) const [inline]

Get key display code

Since
S60 V4.0

DisplayUnicode()

TDesC * DisplayUnicode ( ) const [inline]

HideKeyCtrl(TBool)

IMPORT_C void HideKeyCtrl ( TBool aHide )

Parameters

TBool aHide

HighlightBmpIndex()

TInt HighlightBmpIndex ( ) [inline]

Get key highlight image index

Since
S60 V4.0

HighlightMaskBmpIndex()

TInt HighlightMaskBmpIndex ( ) [inline]

Get key highlight mask image index

Since
S60 V4.0

InnerRect()

TRect InnerRect ( ) [inline]

IrregualrKeyType()

IMPORT_C TVirtualKeyIrregularKeyType IrregualrKeyType ( )

IsLatchKey()

TBool IsLatchKey ( ) [inline]

test whether this key a latch key

Since
S60 V4.0

KeyCode()

TUint KeyCode ( ) const [inline]

Get key code

Since
S60 V4.0

KeyUnicodes()

const TDesC & KeyUnicodes ( ) const [inline]

Get key code data. Support for multi language

Since
S60 V4.0

KeyUnicodes(TVirtualKeyTextPos)

const TDesC & KeyUnicodes ( TVirtualKeyTextPos aPos ) const

Parameters

TVirtualKeyTextPos aPos

Latched()

TBool Latched ( ) [inline]

get key latch state

Since
S60 V4.0

NewL(TUint, TInt, const TRect &, const TRect &, TInt, TInt, TInt)

IMPORT_C CVirtualKey * NewL ( TUint aCode,
TInt aScanCode,
const TRect & aRect,
const TRect & aCharRect,
TInt aBaseLine,
TInt aHighlightBmpIdx = -1,
TInt aHighlightMaskBmpId = -1
) [static]

Factory function This is used for those languange whose character needs more unicodes.

Since
S60 V4.0

Parameters

TUint aCode The code this key stands for.
TInt aScanCode The scan code for this key
const TRect & aRect The position of the key relative to keyboard
const TRect & aCharRect The rect when key is drawn
TInt aBaseLine The baseline for key drawing
TInt aHighlightBmpIdx = -1 The bitmap index for highlighging key background. Bitmap is stored in virtual key board.
TInt aHighlightMaskBmpId = -1

NewL(const TDesC &, TInt, const TRect &, const TRect &, TInt, TInt, TInt)

IMPORT_C CVirtualKey * NewL ( const TDesC & aCode,
TInt aScanCode,
const TRect & aRect,
const TRect & aCharRect,
TInt aBaseLine,
TInt aHighlightBmpIdx = -1,
TInt aHighlightMaskBmpId = -1
) [static]

Factory function This is used for those languange whose character needs more unicodes.

Since
S60 V4.0

Parameters

const TDesC & aCode The code this key stands for.
TInt aScanCode The scan code for this key
const TRect & aRect The position of the key relative to keyboard
const TRect & aCharRect The rect when key is drawn
TInt aBaseLine The baseline for key drawing
TInt aHighlightBmpIdx = -1 The bitmap index for highlighging key background. Bitmap is stored in virtual key board.
TInt aHighlightMaskBmpId = -1

NewL(RPointerArray< HBufC > &, TInt, const TRect &)

IMPORT_C CVirtualKey * NewL ( RPointerArray < HBufC > & aUnicodesList,
TInt aScanCode,
const TRect & aRect
) [static]

Parameters

RPointerArray < HBufC > & aUnicodesList
TInt aScanCode
const TRect & aRect

Rect()

const TRect & Rect ( ) const [inline]

Return key position

Since
S60 V4.0

ScanCode()

TInt ScanCode ( ) const [inline]

Get key scancode

Since
S60 V4.0

SetDimmed(TBool)

void SetDimmed ( TBool aFlag ) [inline]

Dim a key

Since
S60 V4.0

Parameters

TBool aFlag The dim status

SetDisplayCode(TUint)

void SetDisplayCode ( TUint aCode ) [inline]

Set key display code

Since
S60 V4.0

Parameters

TUint aCode The display code

SetDisplayUnicodeL(const TDesC &)

IMPORT_C void SetDisplayUnicodeL ( const TDesC & aDspUnicode )

Set keyboard to key

Since
S60 V4.0

Parameters

const TDesC & aDspUnicode

SetInnerRect(const TRect &)

void SetInnerRect ( const TRect & aRect ) [inline]

Parameters

const TRect & aRect

SetIrregualrKeyType(TVirtualKeyIrregularKeyType)

IMPORT_C void SetIrregualrKeyType ( TVirtualKeyIrregularKeyType aKeyType )

Parameters

TVirtualKeyIrregularKeyType aKeyType

SetKeyData(const TDesC &)

void SetKeyData ( const TDesC & aKeyData ) [inline]

Parameters

const TDesC & aKeyData

SetKeyScancode(TInt)

void SetKeyScancode ( TInt aScancode ) [inline]

Parameters

TInt aScancode

SetLatchKey(TBool)

void SetLatchKey ( TBool aFlag ) [inline]

set key to be a latch key

Since
S60 V4.0

Parameters

TBool aFlag The key latch style flag. ETrue if set to latch key.

SetLatched(TBool)

IMPORT_C void SetLatched ( TBool aFlag )

set key latch state

Since
S60 V4.0

Parameters

TBool aFlag

SetRect(const TRect &)

IMPORT_C void SetRect ( const TRect & aRect )

Set key position

Since
S60 V4.0

Parameters

const TRect & aRect

SetUnicodesL(RPointerArray< HBufC > &)

IMPORT_C void SetUnicodesL ( RPointerArray < HBufC > & aUnicodesList )

Parameters

RPointerArray < HBufC > & aUnicodesList

UnicodesListEmpty(TInt &)

TBool UnicodesListEmpty ( TInt & aIdx )

Parameters

TInt & aIdx

Member Data Documentation

TUint iCode

TUint iCode [private]

Key event attribute for this key

HBufC * iCodeData

HBufC * iCodeData [private]

unicode data for the key. By default it only contains the key code. But for some languages, a character may need several unicodes.

TBool iDimmed

TBool iDimmed [private]

HBufC * iDisplayCodeData

HBufC * iDisplayCodeData [private]

Unicode data for the key display. Some special character need additional unicode to display. It's different than its unicode.

TInt iHighlightBmpIndex

TInt iHighlightBmpIndex [private]

The hight light bitmap index for this key. Bitmap is owned by keyboard High light bitmap is used when key does not have background bitmap itself, pressed/highlight effect is down by show the highlight bitmap then draws text on top of the bitmap. See DrawIndication.

The assumption is that when this index is >= 0 , then fading effect is not used. Key pressing effect is then implemented by bitmap.

TInt iHighlightMaskBmpIndex

TInt iHighlightMaskBmpIndex [private]

The hight light mask bitmap index for this key

TVirtualKeyIrregularKeyType iIrregularKeyType

TVirtualKeyIrregularKeyType iIrregularKeyType [private]

TBool iIsLatchKey

TBool iIsLatchKey [private]

CVirtualKeyCtrl * iKeyCtrl

CVirtualKeyCtrl * iKeyCtrl [private]

Keyboard which contains the key Key control created for this key information by key board

TBool iLatched

TBool iLatched [private]

TRect iRect

TRect iRect [private]

The position relative to the keyboard. Not relative to the layout. This is the valid region when pointer event effected to this key.

TInt iReserver1

TInt iReserver1 [private]

Reserve item

TInt iReserver2

TInt iReserver2 [private]

Reserve item

TUint iScanCode

TUint iScanCode [private]

RPointerArray< HBufC > iUnicodesList

RPointerArray < HBufC > iUnicodesList [private]

TRect innerRect

TRect innerRect [private]