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
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
&)
|
Constructor & Destructor Documentation
CVirtualKey(TUint, TInt, const TRect &, TInt, TInt)
CVirtualKey
|
(
|
TUint
|
aCode,
|
|
TInt
|
aScanCode,
|
|
const
TRect
&
|
aRect,
|
|
TInt
|
aHighlightBmpIdx,
|
|
TInt
|
aHighlightMaskBmpId
|
|
)
|
[private]
|
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]
|
~CVirtualKey()
IMPORT_C
|
~CVirtualKey
|
(
|
)
|
[virtual]
|
Member Functions Documentation
ConstructL(const TDesC &)
void
|
ConstructL
|
(
|
const
TDesC
&
|
aCodeData
|
)
|
[protected]
|
ConstructL(const RPointerArray< HBufC > &)
CreateKeyCtrlL(CVirtualKey *, TBool)
CVirtualKeyCtrl *
|
CreateKeyCtrlL
|
(
|
CVirtualKey
*
|
aKeyInfo,
|
|
TBool
|
aRawKeyFlag
|
|
)
|
[private]
|
Parameters
CVirtualKey
* aKeyInfo
|
The virtual key information
|
TBool
aRawKeyFlag
|
Flag indicates whether a raw key is needed
|
Dimmed()
TBool
|
Dimmed
|
(
|
)
|
const [inline]
|
DisplayCode()
TUint
|
DisplayCode
|
(
|
)
|
const [inline]
|
DisplayUnicode()
TDesC
*
|
DisplayUnicode
|
(
|
)
|
const [inline]
|
HideKeyCtrl(TBool)
IMPORT_C void
|
HideKeyCtrl
|
(
|
TBool
|
aHide
|
)
|
|
HighlightBmpIndex()
TInt
|
HighlightBmpIndex
|
(
|
)
|
[inline]
|
Get key highlight image index
HighlightMaskBmpIndex()
TInt
|
HighlightMaskBmpIndex
|
(
|
)
|
[inline]
|
Get key highlight mask image index
InnerRect()
TRect
|
InnerRect
|
(
|
)
|
[inline]
|
IsLatchKey()
TBool
|
IsLatchKey
|
(
|
)
|
[inline]
|
test whether this key a latch key
KeyCode()
TUint
|
KeyCode
|
(
|
)
|
const [inline]
|
KeyUnicodes()
const
TDesC
&
|
KeyUnicodes
|
(
|
)
|
const [inline]
|
Get key code data. Support for multi language
KeyUnicodes(TVirtualKeyTextPos)
Latched()
TBool
|
Latched
|
(
|
)
|
[inline]
|
NewL(TUint, TInt, const TRect &, const TRect &, TInt, TInt, TInt)
Factory function This is used for those languange whose character needs more unicodes.
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)
Factory function This is used for those languange whose character needs more unicodes.
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 &)
Rect()
const
TRect
&
|
Rect
|
(
|
)
|
const [inline]
|
ScanCode()
TInt
|
ScanCode
|
(
|
)
|
const [inline]
|
SetDimmed(TBool)
void
|
SetDimmed
|
(
|
TBool
|
aFlag
|
)
|
[inline]
|
Parameters
TBool
aFlag
|
The dim status
|
SetDisplayCode(TUint)
void
|
SetDisplayCode
|
(
|
TUint
|
aCode
|
)
|
[inline]
|
Parameters
TUint
aCode
|
The display code
|
SetDisplayUnicodeL(const TDesC &)
IMPORT_C void
|
SetDisplayUnicodeL
|
(
|
const
TDesC
&
|
aDspUnicode
|
)
|
|
Parameters
const
TDesC
& aDspUnicode
|
|
SetInnerRect(const TRect &)
void
|
SetInnerRect
|
(
|
const
TRect
&
|
aRect
|
)
|
[inline]
|
SetIrregualrKeyType(TVirtualKeyIrregularKeyType)
SetKeyData(const TDesC &)
void
|
SetKeyData
|
(
|
const
TDesC
&
|
aKeyData
|
)
|
[inline]
|
SetKeyScancode(TInt)
void
|
SetKeyScancode
|
(
|
TInt
|
aScancode
|
)
|
[inline]
|
SetLatchKey(TBool)
void
|
SetLatchKey
|
(
|
TBool
|
aFlag
|
)
|
[inline]
|
set key to be a latch key
Parameters
TBool
aFlag
|
The key latch style flag. ETrue if set to latch key.
|
SetLatched(TBool)
IMPORT_C void
|
SetLatched
|
(
|
TBool
|
aFlag
|
)
|
|
SetRect(const TRect &)
IMPORT_C void
|
SetRect
|
(
|
const
TRect
&
|
aRect
|
)
|
|
SetUnicodesL(RPointerArray< HBufC > &)
UnicodesListEmpty(TInt &)
Member Data Documentation
TUint
iCode
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.
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
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
TRect
iRect
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]
|
TInt
iReserver2
TInt
|
iReserver2
|
[private]
|
TUint
iScanCode
TUint
|
iScanCode
|
[private]
|
RPointerArray< HBufC > iUnicodesList
TRect
innerRect
TRect
|
innerRect
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.