# HG changeset patch # User hgs # Date 1278427031 -28800 # Node ID 694fa80c203c9ef4b40a8f399cce0f88e6482bc7 # Parent fc42a86c98e38349bebd494a13568d7f51fe9ccc 201027 diff -r fc42a86c98e3 -r 694fa80c203c inputmethods_plat/ptiengine_key_definations_api/tsrc/group/ptiEngTestDomApi.mmp --- a/inputmethods_plat/ptiengine_key_definations_api/tsrc/group/ptiEngTestDomApi.mmp Wed Jun 23 04:57:58 2010 +0800 +++ b/inputmethods_plat/ptiengine_key_definations_api/tsrc/group/ptiEngTestDomApi.mmp Tue Jul 06 22:37:11 2010 +0800 @@ -18,12 +18,8 @@ - - -#if defined(__S60_) - // To get the OS_LAYER_SYSTEMINCLUDE-definition - #include -#endif +#include +#include TARGET ptiEngTestDomApi.dll TARGETTYPE dll @@ -46,11 +42,7 @@ USERINCLUDE ../inc -#if defined(__S60_) MW_LAYER_SYSTEMINCLUDE -#else // __S60_ not defined - SYSTEMINCLUDE /epoc32/include -#endif // __S60_ LIBRARY euser.lib diff -r fc42a86c98e3 -r 694fa80c203c inputmethods_pub/ptiengine_iti_api/tsrc/group/ptiEngineTestSdkApi.mmp --- a/inputmethods_pub/ptiengine_iti_api/tsrc/group/ptiEngineTestSdkApi.mmp Wed Jun 23 04:57:58 2010 +0800 +++ b/inputmethods_pub/ptiengine_iti_api/tsrc/group/ptiEngineTestSdkApi.mmp Tue Jul 06 22:37:11 2010 +0800 @@ -24,12 +24,8 @@ - - -#if defined(__S60_) - // To get the OS_LAYER_SYSTEMINCLUDE-definition - #include -#endif +#include +#include TARGET ptiEngineTestSdkApi.dll TARGETTYPE dll @@ -52,11 +48,7 @@ USERINCLUDE ../inc -#if defined(__S60_) MW_LAYER_SYSTEMINCLUDE -#else - SYSTEMINCLUDE /epoc32/include -#endif LIBRARY euser.lib LIBRARY stiftestinterface.lib diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF --- a/textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,349 +0,0 @@ -EXPORTS - ??0CAknFepCtrlBaseWindow@@IAE@PAVCFepUiLayout@@H@Z @ 1 NONAME ; CAknFepCtrlBaseWindow::CAknFepCtrlBaseWindow(class CFepUiLayout *, int) - ??0CAknFepCtrlButton@@IAE@PAVCFepUiLayout@@H@Z @ 2 NONAME ; CAknFepCtrlButton::CAknFepCtrlButton(class CFepUiLayout *, int) - ??0CAknFepCtrlDragButton@@IAE@PAVCFepUiLayout@@H@Z @ 3 NONAME ; CAknFepCtrlDragButton::CAknFepCtrlDragButton(class CFepUiLayout *, int) - ??0CAknFepCtrlEventButton@@IAE@PAVCFepUiLayout@@HHH@Z @ 4 NONAME ABSENT ; CAknFepCtrlEventButton::CAknFepCtrlEventButton(class CFepUiLayout *, int, int, int) - ??0CAknFepCtrlMultiModeButton@@IAE@PAVCFepUiLayout@@H@Z @ 5 NONAME ABSENT ; CAknFepCtrlMultiModeButton::CAknFepCtrlMultiModeButton(class CFepUiLayout *, int) - ??0CAknFepCtrlRangeBar@@IAE@PAVCFepUiLayout@@HW4TButtonGroupStyle@0@@Z @ 6 NONAME ; CAknFepCtrlRangeBar::CAknFepCtrlRangeBar(class CFepUiLayout *, int, enum CAknFepCtrlRangeBar::TButtonGroupStyle) - ??0CAknFepCtrlRepeatButton@@IAE@PAVCFepUiLayout@@HHH@Z @ 7 NONAME ABSENT ; CAknFepCtrlRepeatButton::CAknFepCtrlRepeatButton(class CFepUiLayout *, int, int, int) - ??0CPeninputVkbCtrlExt@@IAE@ABVTRect@@PAVCFepUiLayout@@HABVTFontSpec@@@Z @ 8 NONAME ABSENT ; CPeninputVkbCtrlExt::CPeninputVkbCtrlExt(class TRect const &, class CFepUiLayout *, int, class TFontSpec const &) - ??1CAknFepCtrlBaseWindow@@UAE@XZ @ 9 NONAME ; CAknFepCtrlBaseWindow::~CAknFepCtrlBaseWindow(void) - ??1CAknFepCtrlButton@@UAE@XZ @ 10 NONAME ; CAknFepCtrlButton::~CAknFepCtrlButton(void) - ??1CAknFepCtrlDragButton@@UAE@XZ @ 11 NONAME ; CAknFepCtrlDragButton::~CAknFepCtrlDragButton(void) - ??1CAknFepCtrlEventButton@@UAE@XZ @ 12 NONAME ; CAknFepCtrlEventButton::~CAknFepCtrlEventButton(void) - ??1CAknFepCtrlMultiModeButton@@UAE@XZ @ 13 NONAME ; CAknFepCtrlMultiModeButton::~CAknFepCtrlMultiModeButton(void) - ??1CAknFepCtrlRangeBar@@UAE@XZ @ 14 NONAME ; CAknFepCtrlRangeBar::~CAknFepCtrlRangeBar(void) - ??1CAknFepCtrlRepeatButton@@UAE@XZ @ 15 NONAME ; CAknFepCtrlRepeatButton::~CAknFepCtrlRepeatButton(void) - ??1CAknFepCtrlVkbLayout@@UAE@XZ @ 16 NONAME ; CAknFepCtrlVkbLayout::~CAknFepCtrlVkbLayout(void) - ??1CFepCtrlDropdownList@@UAE@XZ @ 17 NONAME ; CFepCtrlDropdownList::~CFepCtrlDropdownList(void) - ??1CPeninputVkbCtrlExt@@UAE@XZ @ 18 NONAME ; CPeninputVkbCtrlExt::~CPeninputVkbCtrlExt(void) - ??1CPeninputVkbKeyInfo@@UAE@XZ @ 19 NONAME ; CPeninputVkbKeyInfo::~CPeninputVkbKeyInfo(void) - ??1CPeninputVkbLayoutInfo@@UAE@XZ @ 20 NONAME ; CPeninputVkbLayoutInfo::~CPeninputVkbLayoutInfo(void) - ?ActiveRange@CAknFepCtrlRangeBar@@QAEXH@Z @ 21 NONAME ; void CAknFepCtrlRangeBar::ActiveRange(int) - ?AddModeL@CAknFepCtrlMultiModeButton@@QAEXAAVTResourceReader@@@Z @ 22 NONAME ; void CAknFepCtrlMultiModeButton::AddModeL(class TResourceReader &) - ?AddRangeL@CAknFepCtrlRangeBar@@QAEXAAVTResourceReader@@@Z @ 23 NONAME ; void CAknFepCtrlRangeBar::AddRangeL(class TResourceReader &) - ?BaseConstructL@CAknFepCtrlBaseWindow@@IAEXXZ @ 24 NONAME ; void CAknFepCtrlBaseWindow::BaseConstructL(void) - ?CancelDims@CPeninputVkbCtrlExt@@QAEXXZ @ 25 NONAME ; void CPeninputVkbCtrlExt::CancelDims(void) - ?CancelRepeat@CAknFepCtrlRepeatButton@@QAEXXZ @ 26 NONAME ; void CAknFepCtrlRepeatButton::CancelRepeat(void) - ?CandidateCount@CFepCtrlDropdownList@@UBEHXZ @ 27 NONAME ; int CFepCtrlDropdownList::CandidateCount(void) const - ?ChangeVkbLayout@CAknFepCtrlVkbLayout@@QAEXH@Z @ 28 NONAME ; void CAknFepCtrlVkbLayout::ChangeVkbLayout(int) - ?Close@CAknFepCtrlBaseWindow@@QAEXXZ @ 29 NONAME ; void CAknFepCtrlBaseWindow::Close(void) - ?ConstructFromResourceL@CAknFepCtrlButton@@QAEXAAVTResourceReader@@@Z @ 30 NONAME ; void CAknFepCtrlButton::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlButton@@UAEXXZ @ 31 NONAME ; void CAknFepCtrlButton::ConstructFromResourceL(void) - ?ConstructFromResourceL@CAknFepCtrlDragButton@@QAEXAAVTResourceReader@@@Z @ 32 NONAME ; void CAknFepCtrlDragButton::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlDragButton@@UAEXXZ @ 33 NONAME ; void CAknFepCtrlDragButton::ConstructFromResourceL(void) - ?ConstructFromResourceL@CAknFepCtrlMultiModeButton@@QAEXAAVTResourceReader@@@Z @ 34 NONAME ; void CAknFepCtrlMultiModeButton::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlMultiModeButton@@UAEXXZ @ 35 NONAME ; void CAknFepCtrlMultiModeButton::ConstructFromResourceL(void) - ?ConstructFromResourceL@CAknFepCtrlRangeBar@@QAEXAAVTResourceReader@@@Z @ 36 NONAME ; void CAknFepCtrlRangeBar::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlVkbLayout@@QAEXXZ @ 37 NONAME ; void CAknFepCtrlVkbLayout::ConstructFromResourceL(void) - ?ConstructFromResourceL@CFepCtrlDropdownList@@UAEXXZ @ 38 NONAME ; void CFepCtrlDropdownList::ConstructFromResourceL(void) - ?ConstructL@CAknFepCtrlRangeBar@@IAEXXZ @ 39 NONAME ; void CAknFepCtrlRangeBar::ConstructL(void) - ?ConstructL@CAknFepCtrlRepeatButton@@IAEXXZ @ 40 NONAME ; void CAknFepCtrlRepeatButton::ConstructL(void) - ?Control@CAknFepCtrlBaseWindow@@QAEPAVCFepUiBaseCtrl@@H@Z @ 41 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlBaseWindow::Control(int) - ?CurrentRange@CAknFepCtrlMultiModeButton@@QBEHXZ @ 42 NONAME ; int CAknFepCtrlMultiModeButton::CurrentRange(void) const - ?DimKeys@CPeninputVkbCtrlExt@@QAEXPBVHBufC16@@@Z @ 43 NONAME ; void CPeninputVkbCtrlExt::DimKeys(class HBufC16 const *) - ?DisableAllModes@CAknFepCtrlMultiModeButton@@QAEXXZ @ 44 NONAME ; void CAknFepCtrlMultiModeButton::DisableAllModes(void) - ?DisplayText@CAknFepCtrlEventButton@@IAEXXZ @ 45 NONAME ; void CAknFepCtrlEventButton::DisplayText(void) - ?DisplayText@CAknFepCtrlMultiModeButton@@IAEXXZ @ 46 NONAME ; void CAknFepCtrlMultiModeButton::DisplayText(void) - ?DoClose@CAknFepCtrlBaseWindow@@MAEHXZ @ 47 NONAME ; int CAknFepCtrlBaseWindow::DoClose(void) - ?Draw@CAknFepCtrlBaseWindow@@UAEXXZ @ 48 NONAME ; void CAknFepCtrlBaseWindow::Draw(void) - ?Draw@CAknFepCtrlButton@@UAEXXZ @ 49 NONAME ; void CAknFepCtrlButton::Draw(void) - ?Draw@CAknFepCtrlEventButton@@UAEXXZ @ 50 NONAME ; void CAknFepCtrlEventButton::Draw(void) - ?Draw@CAknFepCtrlMultiModeButton@@MAEXXZ @ 51 NONAME ; void CAknFepCtrlMultiModeButton::Draw(void) - ?Draw@CAknFepCtrlRangeBar@@UAEXXZ @ 52 NONAME ; void CAknFepCtrlRangeBar::Draw(void) - ?Draw@CFepCtrlDropdownList@@UAEXXZ @ 53 NONAME ; void CFepCtrlDropdownList::Draw(void) - ?EnableAllModes@CAknFepCtrlMultiModeButton@@QAEXXZ @ 54 NONAME ; void CAknFepCtrlMultiModeButton::EnableAllModes(void) - ?EnableSecondary@CFepCtrlDropdownList@@QAEXHH@Z @ 55 NONAME ; void CFepCtrlDropdownList::EnableSecondary(int, int) - ?Event@CAknFepCtrlEventButton@@QBEHXZ @ 56 NONAME ; int CAknFepCtrlEventButton::Event(void) const - ?FindKey@CPeninputVkbLayoutInfo@@QBEPAVCPeninputVkbKeyInfo@@H@Z @ 57 NONAME ; class CPeninputVkbKeyInfo * CPeninputVkbLayoutInfo::FindKey(int) const - ?FoldList@CFepCtrlDropdownList@@QAEXXZ @ 58 NONAME ; void CFepCtrlDropdownList::FoldList(void) - ?GetCase@CAknFepCtrlRangeBar@@QBEHH@Z @ 59 NONAME ; int CAknFepCtrlRangeBar::GetCase(int) const - ?GetRealSize@CPeninputVkbLayoutInfo@@QBE?BVTSize@@HH@Z @ 60 NONAME ; class TSize const CPeninputVkbLayoutInfo::GetRealSize(int, int) const - ?HandleControlEvent@CAknFepCtrlBaseWindow@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 61 NONAME ; void CAknFepCtrlBaseWindow::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandleControlEvent@CAknFepCtrlRangeBar@@MAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 62 NONAME ; void CAknFepCtrlRangeBar::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandleControlEvent@CFepCtrlDropdownList@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 63 NONAME ; void CFepCtrlDropdownList::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandlePointerDownEventL@CAknFepCtrlRepeatButton@@MAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 64 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlRepeatButton::HandlePointerDownEventL(class TPoint const &) - ?HandlePointerDownEventL@CFepCtrlDropdownList@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 65 NONAME ; class CFepUiBaseCtrl * CFepCtrlDropdownList::HandlePointerDownEventL(class TPoint const &) - ?HandlePointerLeave@CAknFepCtrlRepeatButton@@MAEXABVTPoint@@@Z @ 66 NONAME ; void CAknFepCtrlRepeatButton::HandlePointerLeave(class TPoint const &) - ?HandlePointerLeave@CFepCtrlDropdownList@@UAEXABVTPoint@@@Z @ 67 NONAME ; void CFepCtrlDropdownList::HandlePointerLeave(class TPoint const &) - ?HandlePointerMoveEventL@CFepCtrlDropdownList@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 68 NONAME ; class CFepUiBaseCtrl * CFepCtrlDropdownList::HandlePointerMoveEventL(class TPoint const &) - ?HandlePointerUpEventL@CAknFepCtrlEventButton@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 69 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlEventButton::HandlePointerUpEventL(class TPoint const &) - ?HandlePointerUpEventL@CAknFepCtrlRepeatButton@@MAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 70 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlRepeatButton::HandlePointerUpEventL(class TPoint const &) - ?HandlePointerUpEventL@CFepCtrlDropdownList@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 71 NONAME ; class CFepUiBaseCtrl * CFepCtrlDropdownList::HandlePointerUpEventL(class TPoint const &) - ?HandleTimerOut@CAknFepCtrlRepeatButton@@UAEXPBVCAknFepTimer@@@Z @ 72 NONAME ; void CAknFepCtrlRepeatButton::HandleTimerOut(class CAknFepTimer const *) - ?HideRange@CAknFepCtrlRangeBar@@QAEXH@Z @ 73 NONAME ; void CAknFepCtrlRangeBar::HideRange(int) - ?ImageAlreadyExist@CAknFepCtrlMultiModeButton@@IAEHJ@Z @ 74 NONAME ; int CAknFepCtrlMultiModeButton::ImageAlreadyExist(long) - ?IsEnableSecondary@CFepCtrlDropdownList@@UBEHXZ @ 75 NONAME ; int CFepCtrlDropdownList::IsEnableSecondary(void) const - ?IsGivenRangeSupported@CAknFepCtrlMultiModeButton@@QAEHH@Z @ 76 NONAME ; int CAknFepCtrlMultiModeButton::IsGivenRangeSupported(int) - ?Move@CAknFepCtrlRangeBar@@UAEXABVTPoint@@@Z @ 77 NONAME ; void CAknFepCtrlRangeBar::Move(class TPoint const &) - ?Move@CFepCtrlDropdownList@@UAEXABVTPoint@@@Z @ 78 NONAME ; void CFepCtrlDropdownList::Move(class TPoint const &) - ?Move@CPeninputVkbCtrlExt@@UAEXABVTPoint@@@Z @ 79 NONAME ; void CPeninputVkbCtrlExt::Move(class TPoint const &) - ?MoveKeys@CPeninputVkbLayoutInfo@@QAEXABVTPoint@@@Z @ 80 NONAME ; void CPeninputVkbLayoutInfo::MoveKeys(class TPoint const &) - ?NewL@CAknFepCtrlButton@@SAPAV1@PAVCFepUiLayout@@H@Z @ 81 NONAME ; class CAknFepCtrlButton * CAknFepCtrlButton::NewL(class CFepUiLayout *, int) - ?NewL@CAknFepCtrlDragButton@@SAPAV1@PAVCFepUiLayout@@H@Z @ 82 NONAME ; class CAknFepCtrlDragButton * CAknFepCtrlDragButton::NewL(class CFepUiLayout *, int) - ?NewL@CAknFepCtrlEventButton@@SAPAV1@PAVCFepUiLayout@@HHH@Z @ 83 NONAME ABSENT ; class CAknFepCtrlEventButton * CAknFepCtrlEventButton::NewL(class CFepUiLayout *, int, int, int) - ?NewL@CAknFepCtrlMultiModeButton@@SAPAV1@PAVCFepUiLayout@@H@Z @ 84 NONAME ABSENT ; class CAknFepCtrlMultiModeButton * CAknFepCtrlMultiModeButton::NewL(class CFepUiLayout *, int) - ?NewL@CAknFepCtrlRangeBar@@SAPAV1@PAVCFepUiLayout@@HW4TButtonGroupStyle@1@@Z @ 85 NONAME ; class CAknFepCtrlRangeBar * CAknFepCtrlRangeBar::NewL(class CFepUiLayout *, int, enum CAknFepCtrlRangeBar::TButtonGroupStyle) - ?NewL@CAknFepCtrlRepeatButton@@SAPAV1@PAVCFepUiLayout@@HHH@Z @ 86 NONAME ABSENT ; class CAknFepCtrlRepeatButton * CAknFepCtrlRepeatButton::NewL(class CFepUiLayout *, int, int, int) - ?NewL@CAknFepCtrlVkbLayout@@SAPAV1@XZ @ 87 NONAME ; class CAknFepCtrlVkbLayout * CAknFepCtrlVkbLayout::NewL(void) - ?NewL@CFepCtrlDropdownList@@SAPAV1@ABVTPoint@@PAVCFepUiLayout@@HAAVTResourceReader@@HHHHHPBVCFont@@PAVMListEventHandler@@W4TTextAlign@CGraphicsContext@@HVTRgb@@6666666@Z @ 88 NONAME ; class CFepCtrlDropdownList * CFepCtrlDropdownList::NewL(class TPoint const &, class CFepUiLayout *, int, class TResourceReader &, int, int, int, int, int, class CFont const *, class MListEventHandler *, enum CGraphicsContext::TTextAlign, int, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb) - ?NewL@CPeninputVkbCtrlExt@@SAPAV1@ABVTRect@@PAVCFepUiLayout@@HPBVCFont@@@Z @ 89 NONAME ABSENT ; class CPeninputVkbCtrlExt * CPeninputVkbCtrlExt::NewL(class TRect const &, class CFepUiLayout *, int, class CFont const *) - ?NewL@CPeninputVkbKeyInfo@@SAPAV1@AAVTResourceReader@@@Z @ 90 NONAME ; class CPeninputVkbKeyInfo * CPeninputVkbKeyInfo::NewL(class TResourceReader &) - ?NewL@CPeninputVkbLayoutInfo@@SAPAV1@AAVTResourceReader@@@Z @ 91 NONAME ; class CPeninputVkbLayoutInfo * CPeninputVkbLayoutInfo::NewL(class TResourceReader &) - ?NewLC@CAknFepCtrlButton@@SAPAV1@PAVCFepUiLayout@@H@Z @ 92 NONAME ; class CAknFepCtrlButton * CAknFepCtrlButton::NewLC(class CFepUiLayout *, int) - ?NewLC@CAknFepCtrlDragButton@@SAPAV1@PAVCFepUiLayout@@H@Z @ 93 NONAME ; class CAknFepCtrlDragButton * CAknFepCtrlDragButton::NewLC(class CFepUiLayout *, int) - ?NewLC@CAknFepCtrlEventButton@@SAPAV1@PAVCFepUiLayout@@HHH@Z @ 94 NONAME ABSENT ; class CAknFepCtrlEventButton * CAknFepCtrlEventButton::NewLC(class CFepUiLayout *, int, int, int) - ?NewLC@CAknFepCtrlMultiModeButton@@SAPAV1@PAVCFepUiLayout@@H@Z @ 95 NONAME ABSENT ; class CAknFepCtrlMultiModeButton * CAknFepCtrlMultiModeButton::NewLC(class CFepUiLayout *, int) - ?NewLC@CAknFepCtrlRangeBar@@SAPAV1@PAVCFepUiLayout@@HW4TButtonGroupStyle@1@@Z @ 96 NONAME ; class CAknFepCtrlRangeBar * CAknFepCtrlRangeBar::NewLC(class CFepUiLayout *, int, enum CAknFepCtrlRangeBar::TButtonGroupStyle) - ?NewLC@CAknFepCtrlRepeatButton@@SAPAV1@PAVCFepUiLayout@@HHH@Z @ 97 NONAME ABSENT ; class CAknFepCtrlRepeatButton * CAknFepCtrlRepeatButton::NewLC(class CFepUiLayout *, int, int, int) - ?NewLC@CAknFepCtrlVkbLayout@@SAPAV1@XZ @ 98 NONAME ; class CAknFepCtrlVkbLayout * CAknFepCtrlVkbLayout::NewLC(void) - ?NewLC@CFepCtrlDropdownList@@SAPAV1@ABVTPoint@@PAVCFepUiLayout@@HAAVTResourceReader@@HHHHHPBVCFont@@PAVMListEventHandler@@W4TTextAlign@CGraphicsContext@@HVTRgb@@6666666@Z @ 99 NONAME ; class CFepCtrlDropdownList * CFepCtrlDropdownList::NewLC(class TPoint const &, class CFepUiLayout *, int, class TResourceReader &, int, int, int, int, int, class CFont const *, class MListEventHandler *, enum CGraphicsContext::TTextAlign, int, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb, class TRgb) - ?NewLC@CPeninputVkbLayoutInfo@@SAPAV1@AAVTResourceReader@@@Z @ 100 NONAME ; class CPeninputVkbLayoutInfo * CPeninputVkbLayoutInfo::NewLC(class TResourceReader &) - ?NextMode@CAknFepCtrlMultiModeButton@@QBEHXZ @ 101 NONAME ; int CAknFepCtrlMultiModeButton::NextMode(void) const - ?OnDeActivate@CFepCtrlDropdownList@@UAEXXZ @ 102 NONAME ; void CFepCtrlDropdownList::OnDeActivate(void) - ?RangeOfGivenMode@CAknFepCtrlMultiModeButton@@QBEHH@Z @ 103 NONAME ; int CAknFepCtrlMultiModeButton::RangeOfGivenMode(int) const - ?Rect@CFepCtrlDropdownList@@QAEABVTRect@@XZ @ 104 NONAME ; class TRect const & CFepCtrlDropdownList::Rect(void) - ?RefreshUI@CAknFepCtrlRangeBar@@QAEXXZ @ 105 NONAME ; void CAknFepCtrlRangeBar::RefreshUI(void) - ?ReorganizeVkbKeys@CPeninputVkbCtrlExt@@QAEXPAVCPeninputVkbLayoutInfo@@@Z @ 106 NONAME ; void CPeninputVkbCtrlExt::ReorganizeVkbKeys(class CPeninputVkbLayoutInfo *) - ?Reset@CAknFepCtrlVkbLayout@@QAEXXZ @ 107 NONAME ; void CAknFepCtrlVkbLayout::Reset(void) - ?Reset@CPeninputVkbCtrlExt@@QAEXXZ @ 108 NONAME ; void CPeninputVkbCtrlExt::Reset(void) - ?ResetAndClear@CFepCtrlDropdownList@@QAEXW4TListType@1@@Z @ 109 NONAME ; void CFepCtrlDropdownList::ResetAndClear(enum CFepCtrlDropdownList::TListType) - ?ResetSize@CPeninputVkbLayoutInfo@@QAEXHHHHABVTPoint@@PBVCFont@@@Z @ 110 NONAME ; void CPeninputVkbLayoutInfo::ResetSize(int, int, int, int, class TPoint const &, class CFont const *) - ?SetActionStyle@CAknFepCtrlRangeBar@@QAEXW4TRangeBarActionStyle@1@@Z @ 111 NONAME ; void CAknFepCtrlRangeBar::SetActionStyle(enum CAknFepCtrlRangeBar::TRangeBarActionStyle) - ?SetActive@CAknFepCtrlButton@@UAEXH@Z @ 112 NONAME ; void CAknFepCtrlButton::SetActive(int) - ?SetActive@CFepCtrlDropdownList@@UAEXH@Z @ 113 NONAME ; void CFepCtrlDropdownList::SetActive(int) - ?SetBgColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 114 NONAME ; void CFepCtrlDropdownList::SetBgColor(class TRgb, int) - ?SetBorderColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 115 NONAME ; void CFepCtrlDropdownList::SetBorderColor(class TRgb, int) - ?SetButtonBmpL@CAknFepCtrlMultiModeButton@@IAEXW4TButtonBmpType@@H@Z @ 116 NONAME ; void CAknFepCtrlMultiModeButton::SetButtonBmpL(enum TButtonBmpType, int) - ?SetCandidatesL@CFepCtrlDropdownList@@QAEXABV?$RPointerArray@VHBufC16@@@@W4TListType@1@ABVTDesC16@@@Z @ 117 NONAME ; void CFepCtrlDropdownList::SetCandidatesL(class RPointerArray const &, enum CFepCtrlDropdownList::TListType, class TDesC16 const &) - ?SetCaseL@CAknFepCtrlRangeBar@@QAEXHH@Z @ 118 NONAME ; void CAknFepCtrlRangeBar::SetCaseL(int, int) - ?SetCellHeight@CFepCtrlDropdownList@@QAEXH@Z @ 119 NONAME ; void CFepCtrlDropdownList::SetCellHeight(int) - ?SetCellWidth@CFepCtrlDropdownList@@QAEXH@Z @ 120 NONAME ; void CFepCtrlDropdownList::SetCellWidth(int) - ?SetColNum@CFepCtrlDropdownList@@QAEXH@Z @ 121 NONAME ; void CFepCtrlDropdownList::SetColNum(int) - ?SetCurrentModeL@CAknFepCtrlMultiModeButton@@QAEXW4TButtonBmpType@@H@Z @ 122 NONAME ; void CAknFepCtrlMultiModeButton::SetCurrentModeL(enum TButtonBmpType, int) - ?SetDragEnable@CAknFepCtrlBaseWindow@@QAEXH@Z @ 123 NONAME ; void CAknFepCtrlBaseWindow::SetDragEnable(int) - ?SetEvent@CAknFepCtrlEventButton@@QAEXH@Z @ 124 NONAME ; void CAknFepCtrlEventButton::SetEvent(int) - ?SetEventIdForCandidateSelected@CFepCtrlDropdownList@@QAEXH@Z @ 125 NONAME ; void CFepCtrlDropdownList::SetEventIdForCandidateSelected(int) - ?SetEventIdForCase@CAknFepCtrlRangeBar@@QAEXH@Z @ 126 NONAME ; void CAknFepCtrlRangeBar::SetEventIdForCase(int) - ?SetEventIdForRange@CAknFepCtrlRangeBar@@QAEXH@Z @ 127 NONAME ; void CAknFepCtrlRangeBar::SetEventIdForRange(int) - ?SetFont@CAknFepCtrlEventButton@@QAEXPBVCFont@@@Z @ 128 NONAME ; void CAknFepCtrlEventButton::SetFont(class CFont const *) - ?SetFont@CAknFepCtrlRangeBar@@QAEXPBVCFont@@@Z @ 129 NONAME ; void CAknFepCtrlRangeBar::SetFont(class CFont const *) - ?SetFont@CFepCtrlDropdownList@@QAEXPBVCFont@@H@Z @ 130 NONAME ; void CFepCtrlDropdownList::SetFont(class CFont const *, int) - ?SetFontColor@CAknFepCtrlEventButton@@QAEXVTRgb@@@Z @ 131 NONAME ; void CAknFepCtrlEventButton::SetFontColor(class TRgb) - ?SetFontColor@CAknFepCtrlMultiModeButton@@QAEXVTRgb@@@Z @ 132 NONAME ; void CAknFepCtrlMultiModeButton::SetFontColor(class TRgb) - ?SetHighLightBgColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 133 NONAME ; void CFepCtrlDropdownList::SetHighLightBgColor(class TRgb, int) - ?SetHighLightTextColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 134 NONAME ; void CFepCtrlDropdownList::SetHighLightTextColor(class TRgb, int) - ?SetHighlight@CAknFepCtrlButton@@QAEXH@Z @ 135 NONAME ; void CAknFepCtrlButton::SetHighlight(int) - ?SetHighlightCell@CFepCtrlDropdownList@@QAEXHH@Z @ 136 NONAME ABSENT ; void CFepCtrlDropdownList::SetHighlightCell(int, int) - ?SetListEventHandler@CFepCtrlDropdownList@@QAEXPAVMListEventHandler@@@Z @ 137 NONAME ; void CFepCtrlDropdownList::SetListEventHandler(class MListEventHandler *) - ?SetNaviWidth@CFepCtrlDropdownList@@QAEXH@Z @ 138 NONAME ; void CFepCtrlDropdownList::SetNaviWidth(int) - ?SetNavigationBgColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 139 NONAME ; void CFepCtrlDropdownList::SetNavigationBgColor(class TRgb, int) - ?SetPermittedCase@CAknFepCtrlRangeBar@@QAEXHHH@Z @ 140 NONAME ; void CAknFepCtrlRangeBar::SetPermittedCase(int, int, int) - ?SetPermittedModes@CAknFepCtrlMultiModeButton@@QAEHHHH@Z @ 141 NONAME ; int CAknFepCtrlMultiModeButton::SetPermittedModes(int, int, int) - ?SetPermittedRange@CAknFepCtrlMultiModeButton@@QAEHHH@Z @ 142 NONAME ; int CAknFepCtrlMultiModeButton::SetPermittedRange(int, int) - ?SetPermittedRange@CAknFepCtrlRangeBar@@QAEXHH@Z @ 143 NONAME ; void CAknFepCtrlRangeBar::SetPermittedRange(int, int) - ?SetPermittedRanges@CAknFepCtrlRangeBar@@QAEXH@Z @ 144 NONAME ; void CAknFepCtrlRangeBar::SetPermittedRanges(int) - ?SetRange@CAknFepCtrlMultiModeButton@@QAEHH@Z @ 145 NONAME ; int CAknFepCtrlMultiModeButton::SetRange(int) - ?SetRange@CAknFepCtrlRangeBar@@QAEHH@Z @ 146 NONAME ; int CAknFepCtrlRangeBar::SetRange(int) - ?SetRepeatInterval@CAknFepCtrlRepeatButton@@QAEXABVTTimeIntervalMicroSeconds32@@@Z @ 147 NONAME ; void CAknFepCtrlRepeatButton::SetRepeatInterval(class TTimeIntervalMicroSeconds32 const &) - ?SetResourceId@CAknFepCtrlVkbLayout@@QAEXJ@Z @ 148 NONAME ; void CAknFepCtrlVkbLayout::SetResourceId(long) - ?SetRowNum@CFepCtrlDropdownList@@QAEXH@Z @ 149 NONAME ; void CFepCtrlDropdownList::SetRowNum(int) - ?SetSecondaryList@CFepCtrlDropdownList@@QAEXV?$RArray@H@@H@Z @ 150 NONAME ABSENT ; void CFepCtrlDropdownList::SetSecondaryList(class RArray, int) - ?SetShadowFont@CAknFepCtrlEventButton@@QAEXPBVCFont@@@Z @ 151 NONAME ; void CAknFepCtrlEventButton::SetShadowFont(class CFont const *) - ?SetShadowFontColor@CAknFepCtrlEventButton@@QAEXVTRgb@@@Z @ 152 NONAME ; void CAknFepCtrlEventButton::SetShadowFontColor(class TRgb) - ?SetShadowFontColor@CAknFepCtrlMultiModeButton@@QAEXVTRgb@@@Z @ 153 NONAME ; void CAknFepCtrlMultiModeButton::SetShadowFontColor(class TRgb) - ?SetSpecialTextColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 154 NONAME ; void CFepCtrlDropdownList::SetSpecialTextColor(class TRgb, int) - ?SetText@CAknFepCtrlEventButton@@QAEXABVTDesC16@@@Z @ 155 NONAME ; void CAknFepCtrlEventButton::SetText(class TDesC16 const &) - ?SetTextAlighment@CFepCtrlDropdownList@@QAEXW4TTextAlign@CGraphicsContext@@H@Z @ 156 NONAME ; void CFepCtrlDropdownList::SetTextAlighment(enum CGraphicsContext::TTextAlign, int) - ?SetTextColor@CFepCtrlDropdownList@@QAEXVTRgb@@H@Z @ 157 NONAME ; void CFepCtrlDropdownList::SetTextColor(class TRgb, int) - ?SetTextMargin@CFepCtrlDropdownList@@QAEXHH@Z @ 158 NONAME ; void CFepCtrlDropdownList::SetTextMargin(int, int) - ?SetTopLeftPoint@CFepCtrlDropdownList@@QAEXVTPoint@@@Z @ 159 NONAME ; void CFepCtrlDropdownList::SetTopLeftPoint(class TPoint) - ?SetUnicode@CAknFepCtrlEventButton@@QAEXH@Z @ 160 NONAME ; void CAknFepCtrlEventButton::SetUnicode(int) - ?SetVkbKeyboard@CAknFepCtrlVkbLayout@@QAEXPAVCPeninputVkbCtrlExt@@@Z @ 161 NONAME ; void CAknFepCtrlVkbLayout::SetVkbKeyboard(class CPeninputVkbCtrlExt *) - ?ShowAllRanges@CAknFepCtrlRangeBar@@QAEXXZ @ 162 NONAME ; void CAknFepCtrlRangeBar::ShowAllRanges(void) - ?ShowRange@CAknFepCtrlRangeBar@@QAEXH@Z @ 163 NONAME ; void CAknFepCtrlRangeBar::ShowRange(int) - ?SizeChanged@CAknFepCtrlButton@@QAEXVTRect@@H@Z @ 164 NONAME ; void CAknFepCtrlButton::SizeChanged(class TRect, int) - ?SizeChanged@CAknFepCtrlDragButton@@QAEXABVTRect@@H@Z @ 165 NONAME ABSENT ; void CAknFepCtrlDragButton::SizeChanged(class TRect const &, int) - ?SizeChanged@CAknFepCtrlMultiModeButton@@QAEXVTRect@@H@Z @ 166 NONAME ABSENT ; void CAknFepCtrlMultiModeButton::SizeChanged(class TRect, int) - ?SizeChanged@CAknFepCtrlRangeBar@@QAEXVTRect@@@Z @ 167 NONAME ; void CAknFepCtrlRangeBar::SizeChanged(class TRect) - ?SizeChanged@CFepCtrlDropdownList@@QAEXHHHVTPoint@@HH@Z @ 168 NONAME ; void CFepCtrlDropdownList::SizeChanged(int, int, int, class TPoint, int, int) - ?SizeChanged@CPeninputVkbCtrlExt@@QAEXHHABVTPoint@@@Z @ 169 NONAME ; void CPeninputVkbCtrlExt::SizeChanged(int, int, class TPoint const &) - ?Unicode@CAknFepCtrlEventButton@@QBEHXZ @ 170 NONAME ; int CAknFepCtrlEventButton::Unicode(void) const - ?VkbLayoutInfoList@CAknFepCtrlVkbLayout@@QAE?AV?$RPointerArray@VCPeninputVkbLayoutInfo@@@@XZ @ 171 NONAME ; class RPointerArray CAknFepCtrlVkbLayout::VkbLayoutInfoList(void) - ?AddCandidatesL@CFepCtrlDropdownList@@QAEXABV?$RPointerArray@VHBufC16@@@@W4TListType@1@@Z @ 172 NONAME ; void CFepCtrlDropdownList::AddCandidatesL(class RPointerArray const &, enum CFepCtrlDropdownList::TListType) - ?SetEventIdForCandidateExisted@CFepCtrlDropdownList@@QAEXH@Z @ 173 NONAME ; void CFepCtrlDropdownList::SetEventIdForCandidateExisted(int) - ?SetEventIdForNextPageCandidate@CFepCtrlDropdownList@@QAEXH@Z @ 174 NONAME ; void CFepCtrlDropdownList::SetEventIdForNextPageCandidate(int) - ?SetEventIdForPreviousPageCandidate@CFepCtrlDropdownList@@QAEXH@Z @ 175 NONAME ; void CFepCtrlDropdownList::SetEventIdForPreviousPageCandidate(int) - ?SetFlagCandidateExist@CFepCtrlDropdownList@@QAEXH@Z @ 176 NONAME ; void CFepCtrlDropdownList::SetFlagCandidateExist(int) - ??0CAknFepCtrlRawKeyButton@@IAE@PAVCFepUiLayout@@HHHH@Z @ 177 NONAME ABSENT ; CAknFepCtrlRawKeyButton::CAknFepCtrlRawKeyButton(class CFepUiLayout *, int, int, int, int) - ??1CAknFepCtrlRawKeyButton@@UAE@XZ @ 178 NONAME ; CAknFepCtrlRawKeyButton::~CAknFepCtrlRawKeyButton(void) - ?ConstructFromResourceL@CAknFepCtrlRawKeyButton@@QAEXAAVTResourceReader@@@Z @ 179 NONAME ; void CAknFepCtrlRawKeyButton::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlRawKeyButton@@UAEXXZ @ 180 NONAME ; void CAknFepCtrlRawKeyButton::ConstructFromResourceL(void) - ?HandlePointerDownEventL@CAknFepCtrlRawKeyButton@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 181 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlRawKeyButton::HandlePointerDownEventL(class TPoint const &) - ?HandlePointerUpEventL@CAknFepCtrlRawKeyButton@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 182 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlRawKeyButton::HandlePointerUpEventL(class TPoint const &) - ?NewL@CAknFepCtrlRawKeyButton@@SAPAV1@PAVCFepUiLayout@@HHHH@Z @ 183 NONAME ABSENT ; class CAknFepCtrlRawKeyButton * CAknFepCtrlRawKeyButton::NewL(class CFepUiLayout *, int, int, int, int) - ?NewL@CFepCtrlDropdownList@@SAPAV1@PAVCFepUiLayout@@HHVTPoint@@VTSize@@HH@Z @ 184 NONAME ; class CFepCtrlDropdownList * CFepCtrlDropdownList::NewL(class CFepUiLayout *, int, int, class TPoint, class TSize, int, int) - ?NewLC@CAknFepCtrlRawKeyButton@@SAPAV1@PAVCFepUiLayout@@HHHH@Z @ 185 NONAME ABSENT ; class CAknFepCtrlRawKeyButton * CAknFepCtrlRawKeyButton::NewLC(class CFepUiLayout *, int, int, int, int) - ?SetCandTruncateType@CFepCtrlDropdownList@@QAEXW4TCandTruncateType@1@@Z @ 186 NONAME ; void CFepCtrlDropdownList::SetCandTruncateType(enum CFepCtrlDropdownList::TCandTruncateType) - ?SetCellMargin@CFepCtrlDropdownList@@QAEXHH@Z @ 187 NONAME ; void CFepCtrlDropdownList::SetCellMargin(int, int) - ?SetSpinBtnHeight@CFepCtrlDropdownList@@QAEXH@Z @ 188 NONAME ; void CFepCtrlDropdownList::SetSpinBtnHeight(int) - ?HandlePointerLeave@CAknFepCtrlRawKeyButton@@UAEXABVTPoint@@@Z @ 189 NONAME ; void CAknFepCtrlRawKeyButton::HandlePointerLeave(class TPoint const &) - ??1CAknFepCtrlLabel@@UAE@XZ @ 190 NONAME ; CAknFepCtrlLabel::~CAknFepCtrlLabel(void) - ??1CPenInputSelectionList@@UAE@XZ @ 191 NONAME ; CPenInputSelectionList::~CPenInputSelectionList(void) - ?AddItemL@CPenInputSelectionList@@QAEXABVTDesC16@@@Z @ 192 NONAME ; void CPenInputSelectionList::AddItemL(class TDesC16 const &) - ?CloseWindow@CPenInputSelectionList@@QAEXXZ @ 193 NONAME ; void CPenInputSelectionList::CloseWindow(void) - ?ConstructFromResourceL@CPenInputSelectionList@@UAEXXZ @ 194 NONAME ; void CPenInputSelectionList::ConstructFromResourceL(void) - ?Display@CPenInputSelectionList@@QAEXXZ @ 195 NONAME ; void CPenInputSelectionList::Display(void) - ?Draw@CAknFepCtrlLabel@@UAEXXZ @ 196 NONAME ; void CAknFepCtrlLabel::Draw(void) - ?HandlePointerDownEventL@CPenInputSelectionList@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 197 NONAME ; class CFepUiBaseCtrl * CPenInputSelectionList::HandlePointerDownEventL(class TPoint const &) - ?HandlePointerMoveEventL@CPenInputSelectionList@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 198 NONAME ; class CFepUiBaseCtrl * CPenInputSelectionList::HandlePointerMoveEventL(class TPoint const &) - ?HandlePointerUpEventL@CPenInputSelectionList@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 199 NONAME ; class CFepUiBaseCtrl * CPenInputSelectionList::HandlePointerUpEventL(class TPoint const &) - ?NewL@CAknFepCtrlLabel@@SAPAV1@PAVCFepUiLayout@@H@Z @ 200 NONAME ; class CAknFepCtrlLabel * CAknFepCtrlLabel::NewL(class CFepUiLayout *, int) - ?NewL@CPenInputSelectionList@@SAPAV1@PAVCFepUiLayout@@HVTPoint@@VTSize@@H@Z @ 201 NONAME ; class CPenInputSelectionList * CPenInputSelectionList::NewL(class CFepUiLayout *, int, class TPoint, class TSize, int) - ?RemoveAllItems@CPenInputSelectionList@@QAEXXZ @ 202 NONAME ; void CPenInputSelectionList::RemoveAllItems(void) - ?RemoveItem@CPenInputSelectionList@@QAEXH@Z @ 203 NONAME ; void CPenInputSelectionList::RemoveItem(int) - ?SetBitmapL@CAknFepCtrlLabel@@QAEXPAVCFbsBitmap@@@Z @ 204 NONAME ; void CAknFepCtrlLabel::SetBitmapL(class CFbsBitmap *) - ?SetFont@CAknFepCtrlLabel@@UAEXABVTFontSpec@@@Z @ 205 NONAME ; void CAknFepCtrlLabel::SetFont(class TFontSpec const &) - ?SetFont@CAknFepCtrlLabel@@UAEXPBVCFont@@@Z @ 206 NONAME ; void CAknFepCtrlLabel::SetFont(class CFont const *) - ?SetFontColor@CAknFepCtrlLabel@@UAEXVTRgb@@@Z @ 207 NONAME ABSENT ; void CAknFepCtrlLabel::SetFontColor(class TRgb) - ?SetItemsL@CPenInputSelectionList@@QAEXABV?$RPointerArray@VHBufC16@@@@@Z @ 208 NONAME ; void CPenInputSelectionList::SetItemsL(class RPointerArray const &) - ?SetMaskBitmapL@CAknFepCtrlLabel@@QAEXPAVCFbsBitmap@@@Z @ 209 NONAME ; void CAknFepCtrlLabel::SetMaskBitmapL(class CFbsBitmap *) - ?SetText@CAknFepCtrlLabel@@QAEXABVTDesC16@@@Z @ 210 NONAME ; void CAknFepCtrlLabel::SetText(class TDesC16 const &) - ?SetTextAlignment@CAknFepCtrlLabel@@UAEXW4TTextAlign@CGraphicsContext@@@Z @ 211 NONAME ; void CAknFepCtrlLabel::SetTextAlignment(enum CGraphicsContext::TTextAlign) - ?SetTextProperty@CPenInputSelectionList@@QAEXPBVCFont@@VTRgb@@@Z @ 212 NONAME ; void CPenInputSelectionList::SetTextProperty(class CFont const *, class TRgb) - ?SizeChanged@CAknFepCtrlLabel@@UAEXVTRect@@H@Z @ 213 NONAME ; void CAknFepCtrlLabel::SizeChanged(class TRect, int) - ?SizeChanged@CPenInputSelectionList@@QAEXVTPoint@@VTSize@@H@Z @ 214 NONAME ; void CPenInputSelectionList::SizeChanged(class TPoint, class TSize, int) - ?TextAlignment@CAknFepCtrlLabel@@UAE?AW4TTextAlign@CGraphicsContext@@XZ @ 215 NONAME ; enum CGraphicsContext::TTextAlign CAknFepCtrlLabel::TextAlignment(void) - ?CreateSwitchL@PenInputModeSwitchFactory@@SAPAVMPenInputModeSwitchInterface@@PAVCFepUiLayout@@HW4TPluginInputMode@@@Z @ 216 NONAME ABSENT ; class MPenInputModeSwitchInterface * PenInputModeSwitchFactory::CreateSwitchL(class CFepUiLayout *, int, enum TPluginInputMode) - ?ReleaseSwitch@PenInputModeSwitchFactory@@SAXPAVMPenInputModeSwitchInterface@@@Z @ 217 NONAME ABSENT ; void PenInputModeSwitchFactory::ReleaseSwitch(class MPenInputModeSwitchInterface *) - ?SetFuzzyBoundry@CFepCtrlDropdownList@@QAEXH@Z @ 218 NONAME ; void CFepCtrlDropdownList::SetFuzzyBoundry(int) - ?SetCandExpandType@CFepCtrlDropdownList@@QAEXW4TExpandType@1@@Z @ 219 NONAME ; void CFepCtrlDropdownList::SetCandExpandType(enum CFepCtrlDropdownList::TExpandType) - ??0CAknFepCtrlCommonButton@@IAE@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 220 NONAME ; CAknFepCtrlCommonButton::CAknFepCtrlCommonButton(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ??1CAknFepCtrlCommonButton@@UAE@XZ @ 221 NONAME ; CAknFepCtrlCommonButton::~CAknFepCtrlCommonButton(void) - ?ConstructFromResourceL@CAknFepCtrlCommonButton@@QAEXAAVTResourceReader@@@Z @ 222 NONAME ; void CAknFepCtrlCommonButton::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlCommonButton@@UAEXXZ @ 223 NONAME ; void CAknFepCtrlCommonButton::ConstructFromResourceL(void) - ?Draw@CAknFepCtrlCommonButton@@UAEXXZ @ 224 NONAME ; void CAknFepCtrlCommonButton::Draw(void) - ?NewL@CAknFepCtrlCommonButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 225 NONAME ; class CAknFepCtrlCommonButton * CAknFepCtrlCommonButton::NewL(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewLC@CAknFepCtrlCommonButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 226 NONAME ; class CAknFepCtrlCommonButton * CAknFepCtrlCommonButton::NewLC(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?SetActive@CAknFepCtrlCommonButton@@UAEXH@Z @ 227 NONAME ; void CAknFepCtrlCommonButton::SetActive(int) - ?SetForgroundBmpRect@CAknFepCtrlCommonButton@@QAEXABVTRect@@@Z @ 228 NONAME ; void CAknFepCtrlCommonButton::SetForgroundBmpRect(class TRect const &) - ?SetHighlight@CAknFepCtrlCommonButton@@QAEXH@Z @ 229 NONAME ; void CAknFepCtrlCommonButton::SetHighlight(int) - ?SizeChanged@CAknFepCtrlCommonButton@@QAEXVTRect@@0H@Z @ 230 NONAME ; void CAknFepCtrlCommonButton::SizeChanged(class TRect, class TRect, int) - ??0CAknFepCtrlRawKeyButton@@IAE@PAVCFepUiLayout@@HVTAknsItemID@@11HHH@Z @ 231 NONAME ; CAknFepCtrlRawKeyButton::CAknFepCtrlRawKeyButton(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID, int, int, int) - ?NewL@CAknFepCtrlRawKeyButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11HHH@Z @ 232 NONAME ; class CAknFepCtrlRawKeyButton * CAknFepCtrlRawKeyButton::NewL(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID, int, int, int) - ?NewLC@CAknFepCtrlRawKeyButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11HHH@Z @ 233 NONAME ; class CAknFepCtrlRawKeyButton * CAknFepCtrlRawKeyButton::NewLC(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID, int, int, int) - ?OnDeActivate@CAknFepCtrlRawKeyButton@@UAEXXZ @ 234 NONAME ; void CAknFepCtrlRawKeyButton::OnDeActivate(void) - ??1CPeninputLayoutInputmodelChoice@@UAE@XZ @ 235 NONAME ; CPeninputLayoutInputmodelChoice::~CPeninputLayoutInputmodelChoice(void) - ?NewL@CPeninputLayoutInputmodelChoice@@SAPAV1@PAVCFepUiLayout@@HW4TPluginInputMode@@@Z @ 236 NONAME ; class CPeninputLayoutInputmodelChoice * CPeninputLayoutInputmodelChoice::NewL(class CFepUiLayout *, int, enum TPluginInputMode) - ?PopUpSwitchListL@CPeninputLayoutInputmodelChoice@@QAEXABVTRect@@@Z @ 237 NONAME ; void CPeninputLayoutInputmodelChoice::PopUpSwitchListL(class TPoint const &, int) - ?SetSecretEditor@CPeninputLayoutInputmodelChoice@@QAEXH@Z @ 238 NONAME ; void CPeninputLayoutInputmodelChoice::SetSecretEditor(int) - ?SwitchListRect@CPeninputLayoutInputmodelChoice@@QAE?AVTRect@@XZ @ 239 NONAME ; class TRect CPeninputLayoutInputmodelChoice::SwitchListRect(void) - ?HandlePointerDownEventL@CAknFepCtrlCommonButton@@MAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 240 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlCommonButton::HandlePointerDownEventL(class TPoint const &) - ?HandlePointerLeave@CAknFepCtrlCommonButton@@MAEXABVTPoint@@@Z @ 241 NONAME ; void CAknFepCtrlCommonButton::HandlePointerLeave(class TPoint const &) - ?HandlePointerUpEventL@CAknFepCtrlCommonButton@@MAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 242 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlCommonButton::HandlePointerUpEventL(class TPoint const &) - ?SetForegroundBmpL@CAknFepCtrlCommonButton@@QAEXPAVCFbsBitmap@@0@Z @ 243 NONAME ; void CAknFepCtrlCommonButton::SetForegroundBmpL(class CFbsBitmap *, class CFbsBitmap *) - ?DisableOneModes@CAknFepCtrlMultiModeButton@@QAEXH@Z @ 244 NONAME ; void CAknFepCtrlMultiModeButton::DisableOneModes(int) - ??0CPeninputVkbCtrlExt@@IAE@ABVTRect@@PAVCFepUiLayout@@HABVTFontSpec@@H@Z @ 245 NONAME ; CPeninputVkbCtrlExt::CPeninputVkbCtrlExt(class TRect const &, class CFepUiLayout *, int, class TFontSpec const &, int) - ?ConstructFromIrregularResourceL@CAknFepCtrlVkbLayout@@QAEXXZ @ 246 NONAME ; void CAknFepCtrlVkbLayout::ConstructFromIrregularResourceL(void) - ?ConstructFromResourceL@CAknFepCtrlBaseWindow@@MAEXXZ @ 247 NONAME ABSENT ; void CAknFepCtrlBaseWindow::ConstructFromResourceL(void) - ?CreateBaseWindowControlsL@CAknFepCtrlBaseWindowL@@MAEXFJ@Z @ 248 NONAME ABSENT ; void CAknFepCtrlBaseWindow::CreateBaseWindowControlsL(short, long) - ?NewL@CPeninputVkbCtrlExt@@SAPAV1@ABVTRect@@PAVCFepUiLayout@@HPBVCFont@@H@Z @ 249 NONAME ; class CPeninputVkbCtrlExt * CPeninputVkbCtrlExt::NewL(class TRect const &, class CFepUiLayout *, int, class CFont const *, int) - ?ResetLayoutInfo@CPeninputVkbLayoutInfo@@QAEXABVTSize@@@Z @ 250 NONAME ; void CPeninputVkbLayoutInfo::ResetLayoutInfo(class TSize const &) - ?SetDispalyCellRectsL@CAknFepCtrlRangeBar@@QAEXABV?$RArray@VTRect@@@@0@Z @ 251 NONAME ; void CAknFepCtrlRangeBar::SetDispalyCellRectsL(class RArray const &, class RArray const &) - ?SetIrregularResourceId@CAknFepCtrlVkbLayout@@QAEXJ@Z @ 252 NONAME ; void CAknFepCtrlVkbLayout::SetIrregularResourceId(long) - ?SetKeyInfo@CPeninputVkbLayoutInfo@@QAEXHHABVTRect@@0PBVCFont@@@Z @ 253 NONAME ; void CPeninputVkbLayoutInfo::SetKeyInfo(int, int, class TRect const &, class TRect const &, class CFont const *) - ?SizeChanged@CPeninputVkbCtrlExt@@QAEXABVTRect@@@Z @ 254 NONAME ; void CPeninputVkbCtrlExt::SizeChanged(class TRect const &) - ??0CAknFepCtrlBaseWindowExt@@IAE@PAVCFepUiLayout@@H@Z @ 255 NONAME ; CAknFepCtrlBaseWindowExt::CAknFepCtrlBaseWindowExt(class CFepUiLayout *, int) - ??1CAknFepCtrlBaseWindowExt@@UAE@XZ @ 256 NONAME ; CAknFepCtrlBaseWindowExt::~CAknFepCtrlBaseWindowExt(void) - ?BaseConstructL@CAknFepCtrlBaseWindowExt@@IAEXXZ @ 257 NONAME ; void CAknFepCtrlBaseWindowExt::BaseConstructL(void) - ?Close@CAknFepCtrlBaseWindowExt@@QAEXXZ @ 258 NONAME ; void CAknFepCtrlBaseWindowExt::Close(void) - ?ConstructFromResourceL@CAknFepCtrlBaseWindowExt@@MAEXXZ @ 259 NONAME ; void CAknFepCtrlBaseWindowExt::ConstructFromResourceL(void) - ?Control@CAknFepCtrlBaseWindowExt@@QAEPAVCFepUiBaseCtrl@@H@Z @ 260 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlBaseWindowExt::Control(int) - ?CreateBaseWindowControlsL@CAknFepCtrlBaseWindowExt@@MAEXFJ@Z @ 261 NONAME ; void CAknFepCtrlBaseWindowExt::CreateBaseWindowControlsL(short, long) - ?DoClose@CAknFepCtrlBaseWindowExt@@MAEHXZ @ 262 NONAME ; int CAknFepCtrlBaseWindowExt::DoClose(void) - ?Draw@CAknFepCtrlBaseWindowExt@@UAEXXZ @ 263 NONAME ; void CAknFepCtrlBaseWindowExt::Draw(void) - ?HandleControlEvent@CAknFepCtrlBaseWindowExt@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 264 NONAME ; void CAknFepCtrlBaseWindowExt::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?SetDragEnable@CAknFepCtrlBaseWindowExt@@QAEXH@Z @ 265 NONAME ; void CAknFepCtrlBaseWindowExt::SetDragEnable(int) - ?ConstructFromNonIrregularResourceL@CAknFepCtrlVkbLayout@@QAEXXZ @ 266 NONAME ; void CAknFepCtrlVkbLayout::ConstructFromNonIrregularResourceL(void) - ?SetNonIrregularResourceId@CAknFepCtrlVkbLayout@@QAEXJ@Z @ 267 NONAME ; void CAknFepCtrlVkbLayout::SetNonIrregularResourceId(long) - ?GetRealCaseByMode@CAknFepCtrlMultiModeButton@@QBEHH@Z @ 268 NONAME ; int CAknFepCtrlMultiModeButton::GetRealCaseByMode(int) const - ?HideRangeUsingIndicatorStyle@CAknFepCtrlRangeBar@@QAEXH@Z @ 269 NONAME ; void CAknFepCtrlRangeBar::HideRangeUsingIndicatorStyle(int) - ?ShowRangeUsingIndicatorStyle@CAknFepCtrlRangeBar@@QAEXH@Z @ 270 NONAME ; void CAknFepCtrlRangeBar::ShowRangeUsingIndicatorStyle(int) - ??1CFepLayoutScrollableList@@UAE@XZ @ 271 NONAME ; CFepLayoutScrollableList::~CFepLayoutScrollableList(void) - ?CalcPageInfo@CFepLayoutScrollableList@@AAEXXZ @ 272 NONAME ; void CFepLayoutScrollableList::CalcPageInfo(void) - ?ConstructFromResourceL@CFepLayoutScrollableList@@UAEXXZ @ 273 NONAME ; void CFepLayoutScrollableList::ConstructFromResourceL(void) - ?NewL@CFepLayoutScrollableList@@SAPAV1@PAVCFepUiLayout@@HVTSize@@HH11@Z @ 274 NONAME ; class CFepLayoutScrollableList * CFepLayoutScrollableList::NewL(class CFepUiLayout *, int, class TSize, int, int, class TSize, class TSize) - ?NewLC@CFepLayoutScrollableList@@SAPAV1@PAVCFepUiLayout@@HVTSize@@HH11@Z @ 275 NONAME ; class CFepLayoutScrollableList * CFepLayoutScrollableList::NewLC(class CFepUiLayout *, int, class TSize, int, int, class TSize, class TSize) - ?SetImgFrId@CFepLayoutScrollableList@@QAEXVTAknsItemID@@00000@Z @ 276 NONAME ; void CFepLayoutScrollableList::SetImgFrId(class TAknsItemID, class TAknsItemID, class TAknsItemID, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?SetTextProperty@CFepLayoutScrollableList@@QAEXPBVCFont@@VTRgb@@@Z @ 277 NONAME ; void CFepLayoutScrollableList::SetTextProperty(class CFont const *, class TRgb) - ?SizeChanged@CFepLayoutScrollableList@@QAEXVTSize@@HH00@Z @ 278 NONAME ; void CFepLayoutScrollableList::SizeChanged(class TSize, int, int, class TSize, class TSize) - ?Move@CAknFepCtrlCommonButton@@MAEXABVTPoint@@@Z @ 279 NONAME ; void CAknFepCtrlCommonButton::Move(class TPoint const &) - ??1CPeninputCommonChoiceList@@UAE@XZ @ 280 NONAME ; CPeninputCommonChoiceList::~CPeninputCommonChoiceList(void) - ?AddItemRectL@CPeninputCommonChoiceList@@QAEXABVTRect@@@Z @ 281 NONAME ; void CPeninputCommonChoiceList::AddItemRectL(class TRect const &) - ?Draw@CPeninputCommonChoiceList@@EAEXXZ @ 282 NONAME ; void CPeninputCommonChoiceList::Draw(void) - ?NewL@CPeninputCommonChoiceList@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@1W4ECommonChoiceListStyle@@@Z @ 283 NONAME ; class CPeninputCommonChoiceList * CPeninputCommonChoiceList::NewL(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, enum ECommonChoiceListStyle) - ?ReCalcLayout@CPeninputCommonChoiceList@@EAEXXZ @ 284 NONAME ; void CPeninputCommonChoiceList::ReCalcLayout(void) - ?RemoveAllItemsRect@CPeninputCommonChoiceList@@QAEXXZ @ 285 NONAME ; void CPeninputCommonChoiceList::RemoveAllItemsRect(void) - ?SetListColumnNumWithLafL@CPeninputCommonChoiceList@@QAEXH@Z @ 286 NONAME ; void CPeninputCommonChoiceList::SetListColumnNumWithLafL(int) - ?SetListSkinID@CPeninputCommonChoiceList@@QAEXVTAknsItemID@@0@Z @ 287 NONAME ; void CPeninputCommonChoiceList::SetListSkinID(class TAknsItemID, class TAknsItemID) - ?SetTextLayout@CPeninputCommonChoiceList@@QAEXABVTAknTextLineLayout@@@Z @ 288 NONAME ; void CPeninputCommonChoiceList::SetTextLayout(class TAknTextLineLayout const &) - ?SetListSeperationRect@CFepLayoutScrollableList@@QAEXABVTRect@@@Z @ 289 NONAME ; void CFepLayoutScrollableList::SetListSeperationRect(class TRect const &) - ?HitTest@CPeninputCommonChoiceList@@UAEHABVTPoint@@@Z @ 290 NONAME ; int CPeninputCommonChoiceList::HitTest(class TPoint const &) - ??0CAknFepCtrlEventButton@@IAE@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 291 NONAME ; CAknFepCtrlEventButton::CAknFepCtrlEventButton(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewL@CAknFepCtrlEventButton@@SAPAV1@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 292 NONAME ; class CAknFepCtrlEventButton * CAknFepCtrlEventButton::NewL(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewLC@CAknFepCtrlEventButton@@SAPAV1@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 293 NONAME ; class CAknFepCtrlEventButton * CAknFepCtrlEventButton::NewLC(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ??0CAknFepCtrlRepeatButton@@IAE@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 294 NONAME ; CAknFepCtrlRepeatButton::CAknFepCtrlRepeatButton(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewL@CAknFepCtrlRepeatButton@@SAPAV1@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 295 NONAME ; class CAknFepCtrlRepeatButton * CAknFepCtrlRepeatButton::NewL(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewLC@CAknFepCtrlRepeatButton@@SAPAV1@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 296 NONAME ; class CAknFepCtrlRepeatButton * CAknFepCtrlRepeatButton::NewLC(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?Draw@CAknFepCtrlDragButton@@UAEXXZ @ 297 NONAME ; void CAknFepCtrlDragButton::Draw(void) - ?Move@CAknFepCtrlDragButton@@UAEXABVTPoint@@@Z @ 298 NONAME ; void CAknFepCtrlDragButton::Move(class TPoint const &) - ?SetForegroundBmpL@CAknFepCtrlDragButton@@QAEXPAVCFbsBitmap@@0@Z @ 299 NONAME ; void CAknFepCtrlDragButton::SetForegroundBmpL(class CFbsBitmap *, class CFbsBitmap *) - ?SetForgroundBmpRect@CAknFepCtrlDragButton@@QAEXABVTRect@@@Z @ 300 NONAME ; void CAknFepCtrlDragButton::SetForgroundBmpRect(class TRect const &) - ?SizeChanged@CAknFepCtrlDragButton@@QAEXABVTRect@@0H@Z @ 301 NONAME ABSENT ; void CAknFepCtrlDragButton::SizeChanged(class TRect const &, class TRect const &, int) - ?SizeChanged@CAknFepCtrlDragButton@@QAEXVTRect@@0H@Z @ 302 NONAME ; void CAknFepCtrlDragButton::SizeChanged(class TRect, class TRect, int) - ?HandlePointerDownEventL@CAknFepCtrlDragButton@@UAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 303 NONAME ABSENT ; class CFepUiBaseCtrl * CAknFepCtrlDragButton::HandlePointerDownEventL(class TPoint const &) - ??0CAknFepCtrlMultiModeButton@@IAE@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 304 NONAME ; CAknFepCtrlMultiModeButton::CAknFepCtrlMultiModeButton(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewL@CAknFepCtrlMultiModeButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 305 NONAME ; class CAknFepCtrlMultiModeButton * CAknFepCtrlMultiModeButton::NewL(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewLC@CAknFepCtrlMultiModeButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 306 NONAME ; class CAknFepCtrlMultiModeButton * CAknFepCtrlMultiModeButton::NewLC(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?SizeChanged@CAknFepCtrlMultiModeButton@@QAEXVTRect@@0H@Z @ 307 NONAME ; void CAknFepCtrlMultiModeButton::SizeChanged(class TRect, class TRect, int) - ?SetDraw3PieceFrameInfo@CAknFepCtrlCommonButton@@QAEXUTDraw3PiecesFrame@@@Z @ 308 NONAME ; void CAknFepCtrlCommonButton::SetDraw3PieceFrameInfo(struct TDraw3PiecesFrame) - ?HandlePointerEnter@CAknFepCtrlCommonButton@@MAEXABVTPoint@@@Z @ 309 NONAME ; void CAknFepCtrlCommonButton::HandlePointerEnter(class TPoint const &) - ?Hide@CFepLayoutScrollableList@@UAEXH@Z @ 310 NONAME ; void CFepLayoutScrollableList::Hide(int) - ?SetDropdownListImgID@CFepCtrlDropdownList@@QAEXUTDropdownListDrawInfo@@@Z @ 311 NONAME ; void CFepCtrlDropdownList::SetDropdownListImgID(struct TDropdownListDrawInfo) - ?DimKeySet@CPeninputVkbCtrlExt@@QAEXPBVHBufC16@@H@Z @ 312 NONAME ; void CPeninputVkbCtrlExt::DimKeySet(class HBufC16 const *, int) - ??0CAknFepCtrlMultiImageButton@@IAE@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 313 NONAME ; CAknFepCtrlMultiImageButton::CAknFepCtrlMultiImageButton(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ??1CAknFepCtrlMultiImageButton@@UAE@XZ @ 314 NONAME ; CAknFepCtrlMultiImageButton::~CAknFepCtrlMultiImageButton(void) - ?ConstructFromResourceL@CAknFepCtrlMultiImageButton@@QAEXAAVTResourceReader@@@Z @ 315 NONAME ; void CAknFepCtrlMultiImageButton::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CAknFepCtrlMultiImageButton@@UAEXXZ @ 316 NONAME ; void CAknFepCtrlMultiImageButton::ConstructFromResourceL(void) - ?Draw@CAknFepCtrlMultiImageButton@@UAEXXZ @ 317 NONAME ; void CAknFepCtrlMultiImageButton::Draw(void) - ?Move@CAknFepCtrlMultiImageButton@@UAEXABVTPoint@@@Z @ 318 NONAME ; void CAknFepCtrlMultiImageButton::Move(class TPoint const &) - ?NewL@CAknFepCtrlMultiImageButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 319 NONAME ; class CAknFepCtrlMultiImageButton * CAknFepCtrlMultiImageButton::NewL(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?NewLC@CAknFepCtrlMultiImageButton@@SAPAV1@PAVCFepUiLayout@@HVTAknsItemID@@11@Z @ 320 NONAME ; class CAknFepCtrlMultiImageButton * CAknFepCtrlMultiImageButton::NewLC(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) - ?SizeChanged@CAknFepCtrlMultiImageButton@@QAEXVTRect@@0H@Z @ 321 NONAME ; void CAknFepCtrlMultiImageButton::SizeChanged(class TRect, class TRect, int) - ?ConstructFromResourceL@CPeninputVkbCtrlExt@@UAEXXZ @ 322 NONAME ; void CPeninputVkbCtrlExt::ConstructFromResourceL(void) - ??0CFepLayoutScrollableList@@IAE@PAVCFepUiLayout@@HVTSize@@HH11@Z @ 323 NONAME ; CFepLayoutScrollableList::CFepLayoutScrollableList(class CFepUiLayout *, int, class TSize, int, int, class TSize, class TSize) - ??0CPeninputCommonChoiceList@@IAE@PAVCFepUiLayout@@HVTAknsItemID@@1W4ECommonChoiceListStyle@@@Z @ 324 NONAME ; CPeninputCommonChoiceList::CPeninputCommonChoiceList(class CFepUiLayout *, int, class TAknsItemID, class TAknsItemID, enum ECommonChoiceListStyle) - ?CalculateItemWidth@CFepLayoutScrollableList@@MAEXXZ @ 325 NONAME ; void CFepLayoutScrollableList::CalculateItemWidth(void) - ?ConstructL@CFepLayoutScrollableList@@IAEXXZ @ 326 NONAME ; void CFepLayoutScrollableList::ConstructL(void) - ?Draw@CFepLayoutScrollableList@@UAEXXZ @ 327 NONAME ; void CFepLayoutScrollableList::Draw(void) - ?DrawItem@CFepLayoutScrollableList@@MAEXHH@Z @ 328 NONAME ; void CFepLayoutScrollableList::DrawItem(int, int) - ?DrawPageInfo@CFepLayoutScrollableList@@MAEXXZ @ 329 NONAME ; void CFepLayoutScrollableList::DrawPageInfo(void) - ?HandleControlEvent@CFepLayoutScrollableList@@MAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 330 NONAME ; void CFepLayoutScrollableList::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HitTest@CFepLayoutScrollableList@@MAEHABVTPoint@@@Z @ 331 NONAME ; int CFepLayoutScrollableList::HitTest(class TPoint const &) - ?Move@CFepLayoutScrollableList@@MAEXABVTPoint@@@Z @ 332 NONAME ; void CFepLayoutScrollableList::Move(class TPoint const &) - ?ReCalcLayout@CFepLayoutScrollableList@@UAEXXZ @ 333 NONAME ; void CFepLayoutScrollableList::ReCalcLayout(void) - ?UpdateNaviButtonStates@CFepLayoutScrollableList@@QAEXXZ @ 334 NONAME ; void CFepLayoutScrollableList::UpdateNaviButtonStates(void) - ?UpdatePageInfoL@CFepLayoutScrollableList@@IAEXHH@Z @ 335 NONAME ; void CFepLayoutScrollableList::UpdatePageInfoL(int, int) - ?CancelPointerDownL@CAknFepCtrlRepeatButton@@MAEXXZ @ 336 NONAME ; void CAknFepCtrlRepeatButton::CancelPointerDownL(void) - ?NewL@CFepCtrlDropdownList@@SAPAV1@PAVCFepUiLayout@@HHVTPoint@@PBVCFont@@VTSize@@HHHHHHW4THDirection@1@H@Z @ 337 NONAME ; class CFepCtrlDropdownList * CFepCtrlDropdownList::NewL(class CFepUiLayout *, int, int, class TPoint, class CFont const *, class TSize, int, int, int, int, int, int, enum CFepCtrlDropdownList::THDirection, int) - ?SetSecondaryList@CFepCtrlDropdownList@@QAEXAAV?$RArray@H@@H@Z @ 338 NONAME ; void CFepCtrlDropdownList::SetSecondaryList(class RArray &, int) - ?ShowBubble@CFepCtrlDropdownList@@QAEXH@Z @ 339 NONAME ; void CFepCtrlDropdownList::ShowBubble(int) - ?SetBubbleTextFont@CFepCtrlDropdownList@@QAEXPBVCFont@@@Z @ 340 NONAME ; void CFepCtrlDropdownList::SetBubbleTextFont(class CFont const *) - ?SetBubbleSize@CFepCtrlDropdownList@@QAEXABVTSize@@@Z @ 341 NONAME ; void CFepCtrlDropdownList::SetBubbleSize(class TSize const &) - ?SetFrameDiff@CFepCtrlDropdownList@@QAEXHHHH@Z @ 342 NONAME ; void CFepCtrlDropdownList::SetFrameDiff(int, int, int, int) - ?SetBubbleBitmapParam@CFepCtrlDropdownList@@QAEXPAVCFbsBitmap@@0VTAknsItemID@@@Z @ 343 NONAME ; void CFepCtrlDropdownList::SetBubbleBitmapParam(class CFbsBitmap *, class CFbsBitmap *, class TAknsItemID) - ?SetTextFormat@CFepCtrlDropdownList@@QAEXVTAknTextLineLayout@@@Z @ 344 NONAME ; void CFepCtrlDropdownList::SetTextFormat(class TAknTextLineLayout) - ?ReDrawRect@CFepCtrlDropdownList@@UAEXABVTRect@@@Z @ 345 NONAME ; void CFepCtrlDropdownList::ReDrawRect(class TRect const &) - ?CancelPointerDownL@CAknFepCtrlCommonButton@@UAEXXZ @ 346 NONAME ; void CAknFepCtrlCommonButton::CancelPointerDownL(void) - ?SetHighlightCell@CFepCtrlDropdownList@@QAEXHHH@Z @ 347 NONAME ; void CFepCtrlDropdownList::SetHighlightCell(int, int, int) - ?Hide@CFepCtrlDropdownList@@UAEXH@Z @ 348 NONAME ; void CFepCtrlDropdownList::Hide(int) diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF --- a/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,476 +0,0 @@ -EXPORTS - _ZN17CAknFepCtrlButton11SizeChangedE5TRecti @ 1 NONAME - _ZN17CAknFepCtrlButton12SetHighlightEi @ 2 NONAME - _ZN17CAknFepCtrlButton22ConstructFromResourceLER15TResourceReader @ 3 NONAME - _ZN17CAknFepCtrlButton22ConstructFromResourceLEv @ 4 NONAME - _ZN17CAknFepCtrlButton4DrawEv @ 5 NONAME - _ZN17CAknFepCtrlButton4NewLEP12CFepUiLayouti @ 6 NONAME - _ZN17CAknFepCtrlButton5NewLCEP12CFepUiLayouti @ 7 NONAME - _ZN17CAknFepCtrlButton9SetActiveEi @ 8 NONAME - _ZN17CAknFepCtrlButtonC1EP12CFepUiLayouti @ 9 NONAME - _ZN17CAknFepCtrlButtonC2EP12CFepUiLayouti @ 10 NONAME - _ZN17CAknFepCtrlButtonD0Ev @ 11 NONAME - _ZN17CAknFepCtrlButtonD1Ev @ 12 NONAME - _ZN17CAknFepCtrlButtonD2Ev @ 13 NONAME - _ZN19CAknFepCtrlRangeBar10ConstructLEv @ 14 NONAME - _ZN19CAknFepCtrlRangeBar11ActiveRangeEi @ 15 NONAME - _ZN19CAknFepCtrlRangeBar11SizeChangedE5TRect @ 16 NONAME - _ZN19CAknFepCtrlRangeBar13ShowAllRangesEv @ 17 NONAME - _ZN19CAknFepCtrlRangeBar14SetActionStyleENS_20TRangeBarActionStyleE @ 18 NONAME - _ZN19CAknFepCtrlRangeBar16SetPermittedCaseEiii @ 19 NONAME - _ZN19CAknFepCtrlRangeBar17SetEventIdForCaseEi @ 20 NONAME - _ZN19CAknFepCtrlRangeBar17SetPermittedRangeEii @ 21 NONAME - _ZN19CAknFepCtrlRangeBar18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 22 NONAME - _ZN19CAknFepCtrlRangeBar18SetEventIdForRangeEi @ 23 NONAME - _ZN19CAknFepCtrlRangeBar18SetPermittedRangesEi @ 24 NONAME - _ZN19CAknFepCtrlRangeBar22ConstructFromResourceLER15TResourceReader @ 25 NONAME - _ZN19CAknFepCtrlRangeBar4DrawEv @ 26 NONAME - _ZN19CAknFepCtrlRangeBar4MoveERK6TPoint @ 27 NONAME - _ZN19CAknFepCtrlRangeBar4NewLEP12CFepUiLayoutiNS_17TButtonGroupStyleE @ 28 NONAME - _ZN19CAknFepCtrlRangeBar5NewLCEP12CFepUiLayoutiNS_17TButtonGroupStyleE @ 29 NONAME - _ZN19CAknFepCtrlRangeBar7SetFontEPK5CFont @ 30 NONAME - _ZN19CAknFepCtrlRangeBar8SetCaseLEii @ 31 NONAME - _ZN19CAknFepCtrlRangeBar8SetRangeEi @ 32 NONAME - _ZN19CAknFepCtrlRangeBar9AddRangeLER15TResourceReader @ 33 NONAME - _ZN19CAknFepCtrlRangeBar9HideRangeEi @ 34 NONAME - _ZN19CAknFepCtrlRangeBar9RefreshUIEv @ 35 NONAME - _ZN19CAknFepCtrlRangeBar9ShowRangeEi @ 36 NONAME - _ZN19CAknFepCtrlRangeBarC1EP12CFepUiLayoutiNS_17TButtonGroupStyleE @ 37 NONAME - _ZN19CAknFepCtrlRangeBarC2EP12CFepUiLayoutiNS_17TButtonGroupStyleE @ 38 NONAME - _ZN19CAknFepCtrlRangeBarD0Ev @ 39 NONAME - _ZN19CAknFepCtrlRangeBarD1Ev @ 40 NONAME - _ZN19CAknFepCtrlRangeBarD2Ev @ 41 NONAME - _ZN19CPeninputVkbCtrlExt10CancelDimsEv @ 42 NONAME - _ZN19CPeninputVkbCtrlExt11SizeChangedEiiRK6TPoint @ 43 NONAME - _ZN19CPeninputVkbCtrlExt17ReorganizeVkbKeysEP22CPeninputVkbLayoutInfo @ 44 NONAME - _ZN19CPeninputVkbCtrlExt4MoveERK6TPoint @ 45 NONAME - _ZN19CPeninputVkbCtrlExt4NewLERK5TRectP12CFepUiLayoutiPK5CFont @ 46 NONAME ABSENT - _ZN19CPeninputVkbCtrlExt5ResetEv @ 47 NONAME - _ZN19CPeninputVkbCtrlExt7DimKeysEPK7HBufC16 @ 48 NONAME - _ZN19CPeninputVkbCtrlExtC1ERK5TRectP12CFepUiLayoutiRK9TFontSpec @ 49 NONAME ABSENT - _ZN19CPeninputVkbCtrlExtC2ERK5TRectP12CFepUiLayoutiRK9TFontSpec @ 50 NONAME ABSENT - _ZN19CPeninputVkbCtrlExtD0Ev @ 51 NONAME - _ZN19CPeninputVkbCtrlExtD1Ev @ 52 NONAME - _ZN19CPeninputVkbCtrlExtD2Ev @ 53 NONAME - _ZN19CPeninputVkbKeyInfo4NewLER15TResourceReader @ 54 NONAME - _ZN19CPeninputVkbKeyInfoD0Ev @ 55 NONAME - _ZN19CPeninputVkbKeyInfoD1Ev @ 56 NONAME - _ZN19CPeninputVkbKeyInfoD2Ev @ 57 NONAME - _ZN20CAknFepCtrlVkbLayout13SetResourceIdEl @ 58 NONAME - _ZN20CAknFepCtrlVkbLayout14SetVkbKeyboardEP19CPeninputVkbCtrlExt @ 59 NONAME - _ZN20CAknFepCtrlVkbLayout15ChangeVkbLayoutEi @ 60 NONAME - _ZN20CAknFepCtrlVkbLayout17VkbLayoutInfoListEv @ 61 NONAME - _ZN20CAknFepCtrlVkbLayout22ConstructFromResourceLEv @ 62 NONAME - _ZN20CAknFepCtrlVkbLayout4NewLEv @ 63 NONAME - _ZN20CAknFepCtrlVkbLayout5NewLCEv @ 64 NONAME - _ZN20CAknFepCtrlVkbLayout5ResetEv @ 65 NONAME - _ZN20CAknFepCtrlVkbLayoutD0Ev @ 66 NONAME - _ZN20CAknFepCtrlVkbLayoutD1Ev @ 67 NONAME - _ZN20CAknFepCtrlVkbLayoutD2Ev @ 68 NONAME - _ZN20CFepCtrlDropdownList10SetBgColorE4TRgbi @ 69 NONAME - _ZN20CFepCtrlDropdownList11SizeChangedEiii6TPointii @ 70 NONAME - _ZN20CFepCtrlDropdownList12OnDeActivateEv @ 71 NONAME - _ZN20CFepCtrlDropdownList12SetCellWidthEi @ 72 NONAME - _ZN20CFepCtrlDropdownList12SetNaviWidthEi @ 73 NONAME - _ZN20CFepCtrlDropdownList12SetTextColorE4TRgbi @ 74 NONAME - _ZN20CFepCtrlDropdownList13ResetAndClearENS_9TListTypeE @ 75 NONAME - _ZN20CFepCtrlDropdownList13SetCellHeightEi @ 76 NONAME - _ZN20CFepCtrlDropdownList13SetTextMarginEii @ 77 NONAME - _ZN20CFepCtrlDropdownList14SetBorderColorE4TRgbi @ 78 NONAME - _ZN20CFepCtrlDropdownList14SetCandidatesLERK13RPointerArrayI7HBufC16ENS_9TListTypeERK7TDesC16 @ 79 NONAME - _ZN20CFepCtrlDropdownList15EnableSecondaryEii @ 80 NONAME - _ZN20CFepCtrlDropdownList15SetTopLeftPointE6TPoint @ 81 NONAME - _ZN20CFepCtrlDropdownList16SetHighlightCellEiii @ 82 NONAME - _ZN20CFepCtrlDropdownList16SetSecondaryListE6RArrayIiEi @ 83 NONAME ABSENT - _ZN20CFepCtrlDropdownList16SetTextAlighmentEN16CGraphicsContext10TTextAlignEi @ 84 NONAME - _ZN20CFepCtrlDropdownList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 85 NONAME - _ZN20CFepCtrlDropdownList18HandlePointerLeaveERK6TPoint @ 86 NONAME - _ZN20CFepCtrlDropdownList19SetHighLightBgColorE4TRgbi @ 87 NONAME - _ZN20CFepCtrlDropdownList19SetListEventHandlerEP17MListEventHandler @ 88 NONAME - _ZN20CFepCtrlDropdownList19SetSpecialTextColorE4TRgbi @ 89 NONAME - _ZN20CFepCtrlDropdownList20SetNavigationBgColorE4TRgbi @ 90 NONAME - _ZN20CFepCtrlDropdownList21HandlePointerUpEventLERK6TPoint @ 91 NONAME - _ZN20CFepCtrlDropdownList21SetHighLightTextColorE4TRgbi @ 92 NONAME - _ZN20CFepCtrlDropdownList22ConstructFromResourceLEv @ 93 NONAME - _ZN20CFepCtrlDropdownList23HandlePointerDownEventLERK6TPoint @ 94 NONAME - _ZN20CFepCtrlDropdownList23HandlePointerMoveEventLERK6TPoint @ 95 NONAME - _ZN20CFepCtrlDropdownList30SetEventIdForCandidateSelectedEi @ 96 NONAME - _ZN20CFepCtrlDropdownList4DrawEv @ 97 NONAME - _ZN20CFepCtrlDropdownList4MoveERK6TPoint @ 98 NONAME - _ZN20CFepCtrlDropdownList4NewLERK6TPointP12CFepUiLayoutiR15TResourceReaderiiiiiPK5CFontP17MListEventHandlerN16CGraphicsContext10TTextAlignEi4TRgbSE_SE_SE_SE_SE_SE_SE_ @ 99 NONAME - _ZN20CFepCtrlDropdownList4RectEv @ 100 NONAME - _ZN20CFepCtrlDropdownList5NewLCERK6TPointP12CFepUiLayoutiR15TResourceReaderiiiiiPK5CFontP17MListEventHandlerN16CGraphicsContext10TTextAlignEi4TRgbSE_SE_SE_SE_SE_SE_SE_ @ 101 NONAME - _ZN20CFepCtrlDropdownList7SetFontEPK5CFonti @ 102 NONAME - _ZN20CFepCtrlDropdownList8FoldListEv @ 103 NONAME - _ZN20CFepCtrlDropdownList9SetActiveEi @ 104 NONAME - _ZN20CFepCtrlDropdownList9SetColNumEi @ 105 NONAME - _ZN20CFepCtrlDropdownList9SetRowNumEi @ 106 NONAME - _ZN20CFepCtrlDropdownListD0Ev @ 107 NONAME - _ZN20CFepCtrlDropdownListD1Ev @ 108 NONAME - _ZN20CFepCtrlDropdownListD2Ev @ 109 NONAME - _ZN21CAknFepCtrlBaseWindow13SetDragEnableEi @ 110 NONAME - _ZN21CAknFepCtrlBaseWindow14BaseConstructLEv @ 111 NONAME - _ZN21CAknFepCtrlBaseWindow18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 112 NONAME - _ZN21CAknFepCtrlBaseWindow4DrawEv @ 113 NONAME - _ZN21CAknFepCtrlBaseWindow5CloseEv @ 114 NONAME - _ZN21CAknFepCtrlBaseWindow7ControlEi @ 115 NONAME - _ZN21CAknFepCtrlBaseWindow7DoCloseEv @ 116 NONAME - _ZN21CAknFepCtrlBaseWindowC2EP12CFepUiLayouti @ 117 NONAME - _ZN21CAknFepCtrlBaseWindowD0Ev @ 118 NONAME - _ZN21CAknFepCtrlBaseWindowD1Ev @ 119 NONAME - _ZN21CAknFepCtrlBaseWindowD2Ev @ 120 NONAME - _ZN21CAknFepCtrlDragButton11SizeChangedERK5TRecti @ 121 NONAME ABSENT - _ZN21CAknFepCtrlDragButton22ConstructFromResourceLER15TResourceReader @ 122 NONAME - _ZN21CAknFepCtrlDragButton22ConstructFromResourceLEv @ 123 NONAME - _ZN21CAknFepCtrlDragButton4NewLEP12CFepUiLayouti @ 124 NONAME - _ZN21CAknFepCtrlDragButton5NewLCEP12CFepUiLayouti @ 125 NONAME - _ZN21CAknFepCtrlDragButtonC1EP12CFepUiLayouti @ 126 NONAME - _ZN21CAknFepCtrlDragButtonC2EP12CFepUiLayouti @ 127 NONAME - _ZN21CAknFepCtrlDragButtonD0Ev @ 128 NONAME - _ZN21CAknFepCtrlDragButtonD1Ev @ 129 NONAME - _ZN21CAknFepCtrlDragButtonD2Ev @ 130 NONAME - _ZN22CAknFepCtrlEventButton10SetUnicodeEi @ 131 NONAME - _ZN22CAknFepCtrlEventButton11DisplayTextEv @ 132 NONAME - _ZN22CAknFepCtrlEventButton12SetFontColorE4TRgb @ 133 NONAME - _ZN22CAknFepCtrlEventButton13SetShadowFontEPK5CFont @ 134 NONAME - _ZN22CAknFepCtrlEventButton18SetShadowFontColorE4TRgb @ 135 NONAME - _ZN22CAknFepCtrlEventButton21HandlePointerUpEventLERK6TPoint @ 136 NONAME - _ZN22CAknFepCtrlEventButton4DrawEv @ 137 NONAME - _ZN22CAknFepCtrlEventButton4NewLEP12CFepUiLayoutiii @ 138 NONAME ABSENT - _ZN22CAknFepCtrlEventButton5NewLCEP12CFepUiLayoutiii @ 139 NONAME ABSENT - _ZN22CAknFepCtrlEventButton7SetFontEPK5CFont @ 140 NONAME - _ZN22CAknFepCtrlEventButton7SetTextERK7TDesC16 @ 141 NONAME - _ZN22CAknFepCtrlEventButton8SetEventEi @ 142 NONAME - _ZN22CAknFepCtrlEventButtonC1EP12CFepUiLayoutiii @ 143 NONAME ABSENT - _ZN22CAknFepCtrlEventButtonC2EP12CFepUiLayoutiii @ 144 NONAME ABSENT - _ZN22CAknFepCtrlEventButtonD0Ev @ 145 NONAME - _ZN22CAknFepCtrlEventButtonD1Ev @ 146 NONAME - _ZN22CAknFepCtrlEventButtonD2Ev @ 147 NONAME - _ZN22CPeninputVkbLayoutInfo4NewLER15TResourceReader @ 148 NONAME - _ZN22CPeninputVkbLayoutInfo5NewLCER15TResourceReader @ 149 NONAME - _ZN22CPeninputVkbLayoutInfo8MoveKeysERK6TPoint @ 150 NONAME - _ZN22CPeninputVkbLayoutInfo9ResetSizeEiiiiRK6TPointPK5CFont @ 151 NONAME - _ZN22CPeninputVkbLayoutInfoD0Ev @ 152 NONAME - _ZN22CPeninputVkbLayoutInfoD1Ev @ 153 NONAME - _ZN22CPeninputVkbLayoutInfoD2Ev @ 154 NONAME - _ZN23CAknFepCtrlRepeatButton10ConstructLEv @ 155 NONAME - _ZN23CAknFepCtrlRepeatButton12CancelRepeatEv @ 156 NONAME - _ZN23CAknFepCtrlRepeatButton14HandleTimerOutEPK12CAknFepTimer @ 157 NONAME - _ZN23CAknFepCtrlRepeatButton17SetRepeatIntervalERK27TTimeIntervalMicroSeconds32 @ 158 NONAME - _ZN23CAknFepCtrlRepeatButton18HandlePointerLeaveERK6TPoint @ 159 NONAME - _ZN23CAknFepCtrlRepeatButton21HandlePointerUpEventLERK6TPoint @ 160 NONAME - _ZN23CAknFepCtrlRepeatButton23HandlePointerDownEventLERK6TPoint @ 161 NONAME - _ZN23CAknFepCtrlRepeatButton4NewLEP12CFepUiLayoutiii @ 162 NONAME ABSENT - _ZN23CAknFepCtrlRepeatButton5NewLCEP12CFepUiLayoutiii @ 163 NONAME ABSENT - _ZN23CAknFepCtrlRepeatButtonC1EP12CFepUiLayoutiii @ 164 NONAME ABSENT - _ZN23CAknFepCtrlRepeatButtonC2EP12CFepUiLayoutiii @ 165 NONAME ABSENT - _ZN23CAknFepCtrlRepeatButtonD0Ev @ 166 NONAME - _ZN23CAknFepCtrlRepeatButtonD1Ev @ 167 NONAME - _ZN23CAknFepCtrlRepeatButtonD2Ev @ 168 NONAME - _ZN26CAknFepCtrlMultiModeButton11DisplayTextEv @ 169 NONAME - _ZN26CAknFepCtrlMultiModeButton11SizeChangedE5TRecti @ 170 NONAME ABSENT - _ZN26CAknFepCtrlMultiModeButton12SetFontColorE4TRgb @ 171 NONAME - _ZN26CAknFepCtrlMultiModeButton13SetButtonBmpLE14TButtonBmpTypei @ 172 NONAME - _ZN26CAknFepCtrlMultiModeButton14EnableAllModesEv @ 173 NONAME - _ZN26CAknFepCtrlMultiModeButton15DisableAllModesEv @ 174 NONAME - _ZN26CAknFepCtrlMultiModeButton15SetCurrentModeLE14TButtonBmpTypei @ 175 NONAME - _ZN26CAknFepCtrlMultiModeButton17ImageAlreadyExistEl @ 176 NONAME - _ZN26CAknFepCtrlMultiModeButton17SetPermittedModesEiii @ 177 NONAME - _ZN26CAknFepCtrlMultiModeButton17SetPermittedRangeEii @ 178 NONAME - _ZN26CAknFepCtrlMultiModeButton18SetShadowFontColorE4TRgb @ 179 NONAME - _ZN26CAknFepCtrlMultiModeButton21IsGivenRangeSupportedEi @ 180 NONAME - _ZN26CAknFepCtrlMultiModeButton22ConstructFromResourceLER15TResourceReader @ 181 NONAME - _ZN26CAknFepCtrlMultiModeButton22ConstructFromResourceLEv @ 182 NONAME - _ZN26CAknFepCtrlMultiModeButton4DrawEv @ 183 NONAME - _ZN26CAknFepCtrlMultiModeButton4NewLEP12CFepUiLayouti @ 184 NONAME ABSENT - _ZN26CAknFepCtrlMultiModeButton5NewLCEP12CFepUiLayouti @ 185 NONAME ABSENT - _ZN26CAknFepCtrlMultiModeButton8AddModeLER15TResourceReader @ 186 NONAME - _ZN26CAknFepCtrlMultiModeButton8SetRangeEi @ 187 NONAME - _ZN26CAknFepCtrlMultiModeButtonC1EP12CFepUiLayouti @ 188 NONAME ABSENT - _ZN26CAknFepCtrlMultiModeButtonC2EP12CFepUiLayouti @ 189 NONAME ABSENT - _ZN26CAknFepCtrlMultiModeButtonD0Ev @ 190 NONAME - _ZN26CAknFepCtrlMultiModeButtonD1Ev @ 191 NONAME - _ZN26CAknFepCtrlMultiModeButtonD2Ev @ 192 NONAME - _ZNK19CAknFepCtrlRangeBar7GetCaseEi @ 193 NONAME - _ZNK20CFepCtrlDropdownList14CandidateCountEv @ 194 NONAME - _ZNK20CFepCtrlDropdownList17IsEnableSecondaryEv @ 195 NONAME - _ZNK22CAknFepCtrlEventButton5EventEv @ 196 NONAME - _ZNK22CAknFepCtrlEventButton7UnicodeEv @ 197 NONAME - _ZNK22CPeninputVkbLayoutInfo11GetRealSizeEii @ 198 NONAME - _ZNK22CPeninputVkbLayoutInfo7FindKeyEi @ 199 NONAME - _ZNK26CAknFepCtrlMultiModeButton12CurrentRangeEv @ 200 NONAME - _ZNK26CAknFepCtrlMultiModeButton16RangeOfGivenModeEi @ 201 NONAME - _ZNK26CAknFepCtrlMultiModeButton8NextModeEv @ 202 NONAME - _ZTI17CAknFepCtrlButton @ 203 NONAME ; ## - _ZTI19CAknFepCtrlRangeBar @ 204 NONAME ; ## - _ZTI19CPeninputVkbCtrlExt @ 205 NONAME ; ## - _ZTI19CPeninputVkbKeyInfo @ 206 NONAME ; ## - _ZTI20CAknFepCtrlVkbLayout @ 207 NONAME ; ## - _ZTI20CFepCtrlDropdownList @ 208 NONAME ; ## - _ZTI21CAknFepCtrlBaseWindow @ 209 NONAME ; ## - _ZTI21CAknFepCtrlDragButton @ 210 NONAME ; ## - _ZTI22CAknFepCtrlEventButton @ 211 NONAME ; ## - _ZTI22CPeninputVkbLayoutInfo @ 212 NONAME ; ## - _ZTI23CAknFepCtrlRepeatButton @ 213 NONAME ; ## - _ZTI26CAknFepCtrlMultiModeButton @ 214 NONAME ; ## - _ZTV17CAknFepCtrlButton @ 215 NONAME ; ## - _ZTV19CAknFepCtrlRangeBar @ 216 NONAME ; ## - _ZTV19CPeninputVkbCtrlExt @ 217 NONAME ; ## - _ZTV19CPeninputVkbKeyInfo @ 218 NONAME ; ## - _ZTV20CAknFepCtrlVkbLayout @ 219 NONAME ; ## - _ZTV20CFepCtrlDropdownList @ 220 NONAME ; ## - _ZTV21CAknFepCtrlBaseWindow @ 221 NONAME ; ## - _ZTV21CAknFepCtrlDragButton @ 222 NONAME ; ## - _ZTV22CAknFepCtrlEventButton @ 223 NONAME ; ## - _ZTV22CPeninputVkbLayoutInfo @ 224 NONAME ; ## - _ZTV23CAknFepCtrlRepeatButton @ 225 NONAME ; ## - _ZTV26CAknFepCtrlMultiModeButton @ 226 NONAME ; ## - _ZThn388_NK20CFepCtrlDropdownList14CandidateCountEv @ 227 NONAME ABSENT ; ## - _ZThn388_NK20CFepCtrlDropdownList17IsEnableSecondaryEv @ 228 NONAME ABSENT ; ## - _ZThn392_N20CFepCtrlDropdownList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 229 NONAME ABSENT ; ## - _ZThn448_N19CAknFepCtrlRangeBar18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 230 NONAME ABSENT ; ## - _ZThn448_N21CAknFepCtrlBaseWindow18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 231 NONAME ABSENT ; ## - _ZThn660_N23CAknFepCtrlRepeatButton14HandleTimerOutEPK12CAknFepTimer @ 232 NONAME ABSENT ; ## - _ZThn8_N17CAknFepCtrlButton22ConstructFromResourceLEv @ 233 NONAME ; ## - _ZThn8_N20CFepCtrlDropdownList22ConstructFromResourceLEv @ 234 NONAME ; ## - _ZThn8_N21CAknFepCtrlDragButton22ConstructFromResourceLEv @ 235 NONAME ; ## - _ZThn8_N26CAknFepCtrlMultiModeButton22ConstructFromResourceLEv @ 236 NONAME ; ## - _ZN20CFepCtrlDropdownList14AddCandidatesLERK13RPointerArrayI7HBufC16ENS_9TListTypeE @ 237 NONAME - _ZN20CFepCtrlDropdownList21SetFlagCandidateExistEi @ 238 NONAME - _ZN20CFepCtrlDropdownList29SetEventIdForCandidateExistedEi @ 239 NONAME - _ZN20CFepCtrlDropdownList30SetEventIdForNextPageCandidateEi @ 240 NONAME - _ZN20CFepCtrlDropdownList34SetEventIdForPreviousPageCandidateEi @ 241 NONAME - _ZThn448_NK20CFepCtrlDropdownList14CandidateCountEv @ 242 NONAME ; ## - _ZThn448_NK20CFepCtrlDropdownList17IsEnableSecondaryEv @ 243 NONAME ; ## - _ZThn452_N20CFepCtrlDropdownList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 244 NONAME ; ## - _ZThn616_N19CAknFepCtrlRangeBar18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 245 NONAME ; ## - _ZThn616_N21CAknFepCtrlBaseWindow18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 246 NONAME ; ## - _ZThn720_N23CAknFepCtrlRepeatButton14HandleTimerOutEPK12CAknFepTimer @ 247 NONAME ABSENT ; ## - _ZN20CFepCtrlDropdownList13SetCellMarginEii @ 248 NONAME - _ZN20CFepCtrlDropdownList16SetSpinBtnHeightEi @ 249 NONAME - _ZN20CFepCtrlDropdownList19SetCandTruncateTypeENS_17TCandTruncateTypeE @ 250 NONAME - _ZN20CFepCtrlDropdownList4NewLEP12CFepUiLayoutii6TPoint5TSizeii @ 251 NONAME - _ZN23CAknFepCtrlRawKeyButton21HandlePointerUpEventLERK6TPoint @ 252 NONAME - _ZN23CAknFepCtrlRawKeyButton22ConstructFromResourceLER15TResourceReader @ 253 NONAME - _ZN23CAknFepCtrlRawKeyButton22ConstructFromResourceLEv @ 254 NONAME - _ZN23CAknFepCtrlRawKeyButton23HandlePointerDownEventLERK6TPoint @ 255 NONAME - _ZN23CAknFepCtrlRawKeyButton4NewLEP12CFepUiLayoutiiii @ 256 NONAME ABSENT - _ZN23CAknFepCtrlRawKeyButton5NewLCEP12CFepUiLayoutiiii @ 257 NONAME ABSENT - _ZN23CAknFepCtrlRawKeyButtonC1EP12CFepUiLayoutiiii @ 258 NONAME ABSENT - _ZN23CAknFepCtrlRawKeyButtonC2EP12CFepUiLayoutiiii @ 259 NONAME ABSENT - _ZN23CAknFepCtrlRawKeyButtonD0Ev @ 260 NONAME - _ZN23CAknFepCtrlRawKeyButtonD1Ev @ 261 NONAME - _ZN23CAknFepCtrlRawKeyButtonD2Ev @ 262 NONAME - _ZTI23CAknFepCtrlRawKeyButton @ 263 NONAME ; ## - _ZTV23CAknFepCtrlRawKeyButton @ 264 NONAME ; ## - _ZThn8_N23CAknFepCtrlRawKeyButton22ConstructFromResourceLEv @ 265 NONAME ; ## - _ZN23CAknFepCtrlRawKeyButton18HandlePointerLeaveERK6TPoint @ 266 NONAME - _ZN16CAknFepCtrlLabel10SetBitmapLEP10CFbsBitmap @ 267 NONAME - _ZN16CAknFepCtrlLabel11SizeChangedE5TRecti @ 268 NONAME - _ZN16CAknFepCtrlLabel12SetFontColorE4TRgb @ 269 NONAME - _ZN16CAknFepCtrlLabel13TextAlignmentEv @ 270 NONAME - _ZN16CAknFepCtrlLabel14SetMaskBitmapLEP10CFbsBitmap @ 271 NONAME - _ZN16CAknFepCtrlLabel16SetTextAlignmentEN16CGraphicsContext10TTextAlignE @ 272 NONAME - _ZN16CAknFepCtrlLabel4DrawEv @ 273 NONAME - _ZN16CAknFepCtrlLabel4NewLEP12CFepUiLayouti @ 274 NONAME - _ZN16CAknFepCtrlLabel7SetFontEPK5CFont @ 275 NONAME - _ZN16CAknFepCtrlLabel7SetFontERK9TFontSpec @ 276 NONAME - _ZN16CAknFepCtrlLabel7SetTextERK7TDesC16 @ 277 NONAME - _ZN16CAknFepCtrlLabelD0Ev @ 278 NONAME - _ZN16CAknFepCtrlLabelD1Ev @ 279 NONAME - _ZN16CAknFepCtrlLabelD2Ev @ 280 NONAME - _ZN22CPenInputSelectionList10RemoveItemEi @ 281 NONAME - _ZN22CPenInputSelectionList11CloseWindowEv @ 282 NONAME - _ZN22CPenInputSelectionList11SizeChangedE6TPoint5TSizei @ 283 NONAME - _ZN22CPenInputSelectionList14RemoveAllItemsEv @ 284 NONAME - _ZN22CPenInputSelectionList15SetTextPropertyEPK5CFont4TRgb @ 285 NONAME - _ZN22CPenInputSelectionList21HandlePointerUpEventLERK6TPoint @ 286 NONAME - _ZN22CPenInputSelectionList22ConstructFromResourceLEv @ 287 NONAME - _ZN22CPenInputSelectionList23HandlePointerDownEventLERK6TPoint @ 288 NONAME - _ZN22CPenInputSelectionList23HandlePointerMoveEventLERK6TPoint @ 289 NONAME - _ZN22CPenInputSelectionList4NewLEP12CFepUiLayouti6TPoint5TSizei @ 290 NONAME - _ZN22CPenInputSelectionList7DisplayEv @ 291 NONAME - _ZN22CPenInputSelectionList8AddItemLERK7TDesC16 @ 292 NONAME - _ZN22CPenInputSelectionList9SetItemsLERK13RPointerArrayI7HBufC16E @ 293 NONAME - _ZN22CPenInputSelectionListD0Ev @ 294 NONAME - _ZN22CPenInputSelectionListD1Ev @ 295 NONAME - _ZN22CPenInputSelectionListD2Ev @ 296 NONAME - _ZTI16CAknFepCtrlLabel @ 297 NONAME ; ## - _ZTI22CPenInputSelectionList @ 298 NONAME ; ## - _ZTV16CAknFepCtrlLabel @ 299 NONAME ; ## - _ZTV22CPenInputSelectionList @ 300 NONAME ; ## - _ZThn8_N22CPenInputSelectionList22ConstructFromResourceLEv @ 301 NONAME ; ## - _ZN25PenInputModeSwitchFactory13CreateSwitchLEP12CFepUiLayouti16TPluginInputMode @ 302 NONAME ABSENT - _ZN25PenInputModeSwitchFactory13ReleaseSwitchEP28MPenInputModeSwitchInterface @ 303 NONAME ABSENT - _ZTI24CPenInputModeSwitchUtils @ 304 NONAME ABSENT ; ## - _ZTV24CPenInputModeSwitchUtils @ 305 NONAME ABSENT ; ## - _ZN20CFepCtrlDropdownList15SetFuzzyBoundryEi @ 306 NONAME - _ZN20CFepCtrlDropdownList17SetCandExpandTypeENS_11TExpandTypeE @ 307 NONAME - _ZN23CAknFepCtrlCommonButton11SizeChangedE5TRectS0_i @ 308 NONAME - _ZN23CAknFepCtrlCommonButton12SetHighlightEi @ 309 NONAME - _ZN23CAknFepCtrlCommonButton19SetForgroundBmpRectERK5TRect @ 310 NONAME - _ZN23CAknFepCtrlCommonButton22ConstructFromResourceLER15TResourceReader @ 311 NONAME - _ZN23CAknFepCtrlCommonButton22ConstructFromResourceLEv @ 312 NONAME - _ZN23CAknFepCtrlCommonButton4DrawEv @ 313 NONAME - _ZN23CAknFepCtrlCommonButton4NewLEP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 314 NONAME - _ZN23CAknFepCtrlCommonButton5NewLCEP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 315 NONAME - _ZN23CAknFepCtrlCommonButton9SetActiveEi @ 316 NONAME - _ZN23CAknFepCtrlCommonButtonC1EP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 317 NONAME - _ZN23CAknFepCtrlCommonButtonC2EP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 318 NONAME - _ZN23CAknFepCtrlCommonButtonD0Ev @ 319 NONAME - _ZN23CAknFepCtrlCommonButtonD1Ev @ 320 NONAME - _ZN23CAknFepCtrlCommonButtonD2Ev @ 321 NONAME - _ZN23CAknFepCtrlRawKeyButton4NewLEP12CFepUiLayouti11TAknsItemIDS2_S2_iii @ 322 NONAME - _ZN23CAknFepCtrlRawKeyButton5NewLCEP12CFepUiLayouti11TAknsItemIDS2_S2_iii @ 323 NONAME - _ZN23CAknFepCtrlRawKeyButtonC1EP12CFepUiLayouti11TAknsItemIDS2_S2_iii @ 324 NONAME - _ZN23CAknFepCtrlRawKeyButtonC2EP12CFepUiLayouti11TAknsItemIDS2_S2_iii @ 325 NONAME - _ZTI23CAknFepCtrlCommonButton @ 326 NONAME ; ## - _ZTV23CAknFepCtrlCommonButton @ 327 NONAME ; ## - _ZThn8_N23CAknFepCtrlCommonButton22ConstructFromResourceLEv @ 328 NONAME ; ## - _ZN23CAknFepCtrlRawKeyButton12OnDeActivateEv @ 329 NONAME - _ZN31CPeninputLayoutInputmodelChoice14SwitchListRectEv @ 330 NONAME - _ZN31CPeninputLayoutInputmodelChoice15SetSecretEditorEi @ 331 NONAME - _ZN31CPeninputLayoutInputmodelChoice16PopUpSwitchListLERK5TRect @ 332 NONAME - _ZN31CPeninputLayoutInputmodelChoice4NewLEP12CFepUiLayouti16TPluginInputMode @ 333 NONAME - _ZN31CPeninputLayoutInputmodelChoiceD0Ev @ 334 NONAME - _ZN31CPeninputLayoutInputmodelChoiceD1Ev @ 335 NONAME - _ZN31CPeninputLayoutInputmodelChoiceD2Ev @ 336 NONAME - _ZTI31CPeninputLayoutInputmodelChoice @ 337 NONAME ; ## - _ZTV31CPeninputLayoutInputmodelChoice @ 338 NONAME ; ## - _ZN23CAknFepCtrlCommonButton17SetForegroundBmpLEP10CFbsBitmapS1_ @ 339 NONAME - _ZN23CAknFepCtrlCommonButton18HandlePointerLeaveERK6TPoint @ 340 NONAME - _ZN23CAknFepCtrlCommonButton21HandlePointerUpEventLERK6TPoint @ 341 NONAME - _ZN23CAknFepCtrlCommonButton23HandlePointerDownEventLERK6TPoint @ 342 NONAME - _ZN26CAknFepCtrlMultiModeButton15DisableOneModesEi @ 343 NONAME - _ZN19CAknFepCtrlRangeBar20SetDispalyCellRectsLERK6RArrayI5TRectES4_ @ 344 NONAME - _ZN19CPeninputVkbCtrlExt11SizeChangedERK5TRect @ 345 NONAME - _ZN19CPeninputVkbCtrlExt4NewLERK5TRectP12CFepUiLayoutiPK5CFonti @ 346 NONAME - _ZN19CPeninputVkbCtrlExtC1ERK5TRectP12CFepUiLayoutiRK9TFontSpeci @ 347 NONAME - _ZN19CPeninputVkbCtrlExtC2ERK5TRectP12CFepUiLayoutiRK9TFontSpeci @ 348 NONAME - _ZN20CAknFepCtrlVkbLayout22SetIrregularResourceIdEl @ 349 NONAME - _ZN20CAknFepCtrlVkbLayout31ConstructFromIrregularResourceLEv @ 350 NONAME - _ZN22CPeninputVkbLayoutInfo10SetKeyInfoEiiRK5TRectS2_PK5CFont @ 351 NONAME - _ZN22CPeninputVkbLayoutInfo15ResetLayoutInfoERK5TSize @ 352 NONAME - _ZN24CAknFepCtrlBaseWindowExt13SetDragEnableEi @ 353 NONAME - _ZN24CAknFepCtrlBaseWindowExt14BaseConstructLEv @ 354 NONAME - _ZN24CAknFepCtrlBaseWindowExt18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 355 NONAME - _ZN24CAknFepCtrlBaseWindowExt22ConstructFromResourceLEv @ 356 NONAME - _ZN24CAknFepCtrlBaseWindowExt25CreateBaseWindowControlsLEsl @ 357 NONAME - _ZN24CAknFepCtrlBaseWindowExt4DrawEv @ 358 NONAME - _ZN24CAknFepCtrlBaseWindowExt5CloseEv @ 359 NONAME - _ZN24CAknFepCtrlBaseWindowExt7ControlEi @ 360 NONAME - _ZN24CAknFepCtrlBaseWindowExt7DoCloseEv @ 361 NONAME - _ZN24CAknFepCtrlBaseWindowExtC2EP12CFepUiLayouti @ 362 NONAME - _ZN24CAknFepCtrlBaseWindowExtD0Ev @ 363 NONAME - _ZN24CAknFepCtrlBaseWindowExtD1Ev @ 364 NONAME - _ZN24CAknFepCtrlBaseWindowExtD2Ev @ 365 NONAME - _ZTI24CAknFepCtrlBaseWindowExt @ 366 NONAME ; ## - _ZTV24CAknFepCtrlBaseWindowExt @ 367 NONAME ; ## - _ZThn616_N24CAknFepCtrlBaseWindowExt18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 368 NONAME ; ## - _ZThn8_N24CAknFepCtrlBaseWindowExt22ConstructFromResourceLEv @ 369 NONAME ; ## - _ZN20CAknFepCtrlVkbLayout25SetNonIrregularResourceIdEl @ 370 NONAME - _ZN20CAknFepCtrlVkbLayout34ConstructFromNonIrregularResourceLEv @ 371 NONAME - _ZNK26CAknFepCtrlMultiModeButton17GetRealCaseByModeEi @ 372 NONAME - _ZN19CAknFepCtrlRangeBar28HideRangeUsingIndicatorStyleEi @ 373 NONAME - _ZN19CAknFepCtrlRangeBar28ShowRangeUsingIndicatorStyleEi @ 374 NONAME - _ZN24CFepLayoutScrollableList10SetImgFrIdE11TAknsItemIDS0_S0_S0_S0_S0_ @ 375 NONAME - _ZN24CFepLayoutScrollableList11SizeChangedE5TSizeiiS0_S0_ @ 376 NONAME - _ZN24CFepLayoutScrollableList12CalcPageInfoEv @ 377 NONAME - _ZN24CFepLayoutScrollableList15SetTextPropertyEPK5CFont4TRgb @ 378 NONAME - _ZN24CFepLayoutScrollableList22ConstructFromResourceLEv @ 379 NONAME - _ZN24CFepLayoutScrollableList4NewLEP12CFepUiLayouti5TSizeiiS2_S2_ @ 380 NONAME - _ZN24CFepLayoutScrollableList5NewLCEP12CFepUiLayouti5TSizeiiS2_S2_ @ 381 NONAME - _ZN24CFepLayoutScrollableListD0Ev @ 382 NONAME - _ZN24CFepLayoutScrollableListD1Ev @ 383 NONAME - _ZN24CFepLayoutScrollableListD2Ev @ 384 NONAME - _ZTI24CFepLayoutScrollableList @ 385 NONAME ; ## - _ZTV24CFepLayoutScrollableList @ 386 NONAME ; ## - _ZThn8_N24CFepLayoutScrollableList22ConstructFromResourceLEv @ 387 NONAME ; ## - _ZN23CAknFepCtrlCommonButton4MoveERK6TPoint @ 388 NONAME - _ZN25CPeninputCommonChoiceList12AddItemRectLERK5TRect @ 389 NONAME - _ZN25CPeninputCommonChoiceList12ReCalcLayoutEv @ 390 NONAME - _ZN25CPeninputCommonChoiceList13SetListSkinIDE11TAknsItemIDS0_ @ 391 NONAME - _ZN25CPeninputCommonChoiceList13SetTextLayoutERK18TAknTextLineLayout @ 392 NONAME - _ZN25CPeninputCommonChoiceList18RemoveAllItemsRectEv @ 393 NONAME - _ZN25CPeninputCommonChoiceList24SetListColumnNumWithLafLEi @ 394 NONAME - _ZN25CPeninputCommonChoiceList4DrawEv @ 395 NONAME - _ZN25CPeninputCommonChoiceList4NewLEP12CFepUiLayouti11TAknsItemIDS2_22ECommonChoiceListStyle @ 396 NONAME - _ZN25CPeninputCommonChoiceListD0Ev @ 397 NONAME - _ZN25CPeninputCommonChoiceListD1Ev @ 398 NONAME - _ZN25CPeninputCommonChoiceListD2Ev @ 399 NONAME - _ZTI25CPeninputCommonChoiceList @ 400 NONAME ; ## - _ZTV25CPeninputCommonChoiceList @ 401 NONAME ; ## - _ZN24CFepLayoutScrollableList21SetListSeperationRectERK5TRect @ 402 NONAME - _ZN25CPeninputCommonChoiceList7HitTestERK6TPoint @ 403 NONAME - _ZN21CAknFepCtrlDragButton11SizeChangedE5TRectS0_i @ 404 NONAME - _ZN21CAknFepCtrlDragButton17SetForegroundBmpLEP10CFbsBitmapS1_ @ 405 NONAME - _ZN21CAknFepCtrlDragButton19SetForgroundBmpRectERK5TRect @ 406 NONAME - _ZN21CAknFepCtrlDragButton23HandlePointerDownEventLERK6TPoint @ 407 NONAME - _ZN21CAknFepCtrlDragButton4DrawEv @ 408 NONAME - _ZN21CAknFepCtrlDragButton4MoveERK6TPoint @ 409 NONAME - _ZN22CAknFepCtrlEventButton4NewLEP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 410 NONAME - _ZN22CAknFepCtrlEventButton5NewLCEP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 411 NONAME - _ZN22CAknFepCtrlEventButtonC1EP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 412 NONAME - _ZN22CAknFepCtrlEventButtonC2EP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 413 NONAME - _ZN23CAknFepCtrlCommonButton18HandlePointerEnterERK6TPoint @ 414 NONAME - _ZN23CAknFepCtrlCommonButton22SetDraw3PieceFrameInfoE17TDraw3PiecesFrame @ 415 NONAME - _ZN23CAknFepCtrlRepeatButton4NewLEP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 416 NONAME - _ZN23CAknFepCtrlRepeatButton5NewLCEP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 417 NONAME - _ZN23CAknFepCtrlRepeatButtonC1EP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 418 NONAME - _ZN23CAknFepCtrlRepeatButtonC2EP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 419 NONAME - _ZN26CAknFepCtrlMultiModeButton11SizeChangedE5TRectS0_i @ 420 NONAME - _ZN26CAknFepCtrlMultiModeButton4NewLEP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 421 NONAME - _ZN26CAknFepCtrlMultiModeButton5NewLCEP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 422 NONAME - _ZN26CAknFepCtrlMultiModeButtonC1EP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 423 NONAME - _ZN26CAknFepCtrlMultiModeButtonC2EP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 424 NONAME - _ZThn796_N23CAknFepCtrlRepeatButton14HandleTimerOutEPK12CAknFepTimer @ 425 NONAME ABSENT ; ## - _ZN24CFepLayoutScrollableList4HideEi @ 426 NONAME - _ZN20CFepCtrlDropdownList20SetDropdownListImgIDE21TDropdownListDrawInfo @ 427 NONAME - _ZN19CPeninputVkbCtrlExt9DimKeySetEPK7HBufC16i @ 428 NONAME - _ZThn804_N23CAknFepCtrlRepeatButton14HandleTimerOutEPK12CAknFepTimer @ 429 NONAME ; ## - _ZN27CAknFepCtrlMultiImageButton11SizeChangedE5TRectS0_i @ 430 NONAME - _ZN27CAknFepCtrlMultiImageButton22ConstructFromResourceLER15TResourceReader @ 431 NONAME - _ZN27CAknFepCtrlMultiImageButton22ConstructFromResourceLEv @ 432 NONAME - _ZN27CAknFepCtrlMultiImageButton4DrawEv @ 433 NONAME - _ZN27CAknFepCtrlMultiImageButton4MoveERK6TPoint @ 434 NONAME - _ZN27CAknFepCtrlMultiImageButton4NewLEP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 435 NONAME - _ZN27CAknFepCtrlMultiImageButton5NewLCEP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 436 NONAME - _ZN27CAknFepCtrlMultiImageButtonC1EP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 437 NONAME - _ZN27CAknFepCtrlMultiImageButtonC2EP12CFepUiLayouti11TAknsItemIDS2_S2_ @ 438 NONAME - _ZN27CAknFepCtrlMultiImageButtonD0Ev @ 439 NONAME - _ZN27CAknFepCtrlMultiImageButtonD1Ev @ 440 NONAME - _ZN27CAknFepCtrlMultiImageButtonD2Ev @ 441 NONAME - _ZTI27CAknFepCtrlMultiImageButton @ 442 NONAME ; ## - _ZTV27CAknFepCtrlMultiImageButton @ 443 NONAME ; ## - _ZThn8_N27CAknFepCtrlMultiImageButton22ConstructFromResourceLEv @ 444 NONAME ; ## - _ZN19CPeninputVkbCtrlExt22ConstructFromResourceLEv @ 445 NONAME - _ZThn8_N19CPeninputVkbCtrlExt22ConstructFromResourceLEv @ 446 NONAME ; ## - _ZN24CFepLayoutScrollableList10ConstructLEv @ 447 NONAME - _ZN24CFepLayoutScrollableList12DrawPageInfoEv @ 448 NONAME - _ZN24CFepLayoutScrollableList12ReCalcLayoutEv @ 449 NONAME - _ZN24CFepLayoutScrollableList15UpdatePageInfoLEii @ 450 NONAME - _ZN24CFepLayoutScrollableList18CalculateItemWidthEv @ 451 NONAME - _ZN24CFepLayoutScrollableList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 452 NONAME - _ZN24CFepLayoutScrollableList22UpdateNaviButtonStatesEv @ 453 NONAME - _ZN24CFepLayoutScrollableList4DrawEv @ 454 NONAME - _ZN24CFepLayoutScrollableList4MoveERK6TPoint @ 455 NONAME - _ZN24CFepLayoutScrollableList7HitTestERK6TPoint @ 456 NONAME - _ZN24CFepLayoutScrollableList8DrawItemEii @ 457 NONAME - _ZN24CFepLayoutScrollableListC1EP12CFepUiLayouti5TSizeiiS2_S2_ @ 458 NONAME - _ZN24CFepLayoutScrollableListC2EP12CFepUiLayouti5TSizeiiS2_S2_ @ 459 NONAME - _ZN25CPeninputCommonChoiceListC1EP12CFepUiLayouti11TAknsItemIDS2_22ECommonChoiceListStyle @ 460 NONAME - _ZN25CPeninputCommonChoiceListC2EP12CFepUiLayouti11TAknsItemIDS2_22ECommonChoiceListStyle @ 461 NONAME - _ZThn768_N24CFepLayoutScrollableList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 462 NONAME ; ## - _ZN23CAknFepCtrlRepeatButton18CancelPointerDownLEv @ 463 NONAME - _ZN20CFepCtrlDropdownList4NewLEP12CFepUiLayoutii6TPointPK5CFont5TSizeiiiiiiNS_11THDirectionEi @ 464 NONAME - _ZN20CFepCtrlDropdownList16SetSecondaryListER6RArrayIiEi @ 465 NONAME - _ZN20CFepCtrlDropdownList10ShowBubbleEi @ 466 NONAME - _ZN20CFepCtrlDropdownList12SetFrameDiffEiiii @ 467 NONAME - _ZN20CFepCtrlDropdownList13SetBubbleSizeERK5TSize @ 468 NONAME - _ZN20CFepCtrlDropdownList13SetTextFormatE18TAknTextLineLayout @ 469 NONAME - _ZN20CFepCtrlDropdownList17SetBubbleTextFontEPK5CFont @ 470 NONAME - _ZN20CFepCtrlDropdownList20SetBubbleBitmapParamEP10CFbsBitmapS1_11TAknsItemID @ 471 NONAME - _ZN20CFepCtrlDropdownList10ReDrawRectERK5TRect @ 472 NONAME - _ZN23CAknFepCtrlCommonButton18CancelPointerDownLEv @ 473 NONAME - _ZN20CFepCtrlDropdownList4HideEi @ 474 NONAME - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/group/bld.inf --- a/textinput/peninputcommonctrls/group/bld.inf Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project ?myapp -* -*/ - -#include - -PRJ_EXPORTS - -../rom/peninputcommonctrls.iby CORE_MW_LAYER_IBY_EXPORT_PATH( peninputcommonctrls.iby ) -../rom/peninputcommonctrlsresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(peninputcommonctrlsresources.iby) -../loc/peninputcommonctrls.loc MW_LAYER_LOC_EXPORT_PATH(peninputcommonctrls.loc) - -// From peninputbuttons -../inc/peninputvkbctrl/peninputvkbctrllayout.h |../../../inc/peninputvkbctrllayout.h -../inc/peninputvkbctrl/peninputvkbctrllayout.inl |../../../inc/peninputvkbctrllayout.inl -../inc/peninputvkbctrl/peninputvkbctrlext.h |../../../inc/peninputvkbctrlext.h - -// From peninputgeneralheaders -../inc/peninputgeneralheaders/peninputcommonctrls.hrh |../../../inc/peninputcommonctrls.hrh -../inc/peninputgeneralheaders/peninputcommonctrls.rh |../../../inc/peninputcommonctrls.rh - -// From peninputbuttons -../inc/peninputbuttons/peninputbutton.h |../../../inc/peninputbutton.h -../inc/peninputbuttons/peninputdragbutton.h |../../../inc/peninputdragbutton.h -../inc/peninputbuttons/peninputeventbutton.h |../../../inc/peninputeventbutton.h -../inc/peninputbuttons/peninputmultimodebutton.h |../../../inc/peninputmultimodebutton.h -../inc/peninputbuttons/peninputmultimodebutton.inl |../../../inc/peninputmultimodebutton.inl -../inc/peninputbuttons/peninputrepeatbutton.h |../../../inc/peninputrepeatbutton.h -../inc/peninputbuttons/peninputrawkeybutton.h |../../../inc/peninputrawkeybutton.h -../inc/peninputbuttons/peninputrawkeybutton.inl |../../../inc/peninputrawkeybutton.inl -../inc/peninputbuttons/peninputcommonbutton.h |../../../inc/peninputcommonbutton.h -../inc/peninputbuttons/peninputmultiimagebutton.h |../../../inc/peninputmultiimagebutton.h - -// From peninputbasewindow -../inc/peninputbasewindow/peninputbasewindow.h |../../../inc/peninputbasewindow.h -../inc/peninputbasewindow/peninputbasewindow.inl |../../../inc/peninputbasewindow.inl -../inc/peninputbasewindow/peninputbasewindowext.h |../../../inc/peninputbasewindowext.h -../inc/peninputbasewindow/peninputbasewindowext.inl |../../../inc/peninputbasewindowext.inl - - -// From peninputrangebar -../inc/peninputrangebar/peninputrangebar.h |../../../inc/peninputrangebar.h -../inc/peninputrangebar/peninputrangebar.inl |../../../inc/peninputrangebar.inl - -// From peninputdropdownlist -../inc/peninputdropdownlist/peninputdropdownlist.h |../../../inc/peninputdropdownlist.h -../inc/peninputdropdownlist/peninputdropdownlist.rh |../../../inc/peninputdropdownlist.rh -../inc/peninputdropdownlist/peninputdropdownlistcontext.h |../../../inc/peninputdropdownlistcontext.h - -// From peninputselectionlist -../inc/peninputselectionlist/peninputselectionlist.h |../../../inc/peninputselectionlist.h -../inc/peninputselectionlist/peninputlayoutinputmodechoice.h |../../../inc/peninputlayoutinputmodechoice.h -../inc/peninputselectionlist/peninputscrollablelist.h |../../../inc/peninputscrollablelist.h -../inc/peninputselectionlist/peninputcommonchoicelist.h |../../../inc/peninputcommonchoicelist.h - -// From peninputlabel -../inc/peninputlabel/peninputlabel.h |../../../inc/peninputlabel.h - - -PRJ_MMPFILES - -//gnumakefile peninputcommonctrls_icons.mk - -../group/peninputcommonctrls.mmp - -PRJ_EXTENSIONS -START EXTENSION s60/mifconv -OPTION TARGETFILE peninputmodeswitcher.mif -OPTION HEADERFILE peninputmodeswitcher.mbg -OPTION SOURCEFILE iconlist.txt -END -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/group/iconlist.txt --- a/textinput/peninputcommonctrls/group/iconlist.txt Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ --c8,8 qgn_graf_fep_candi_list_sec.svg --c8,8 qgn_graf_fep_candi_list_sel.svg - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/group/peninputcommonctrls.mmp --- a/textinput/peninputcommonctrls/group/peninputcommonctrls.mmp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for common controls -* -*/ - - -#include -#include - -TARGET peninputcommonctrls.dll -TARGETTYPE DLL -UID 0x1000008D 0x10281859 -CAPABILITY CAP_GENERAL_DLL - -// From peninputbuttons -SOURCEPATH ../src/peninputbuttons -SOURCE peninputbutton.cpp - -// From peninputbasewindow -SOURCEPATH ../src/peninputbasewindow -SOURCE peninputbasewindow.cpp -SOURCE peninputbasewindowext.cpp - -// From peninputrangebar -SOURCEPATH ../src/peninputrangebar -SOURCE peninputrangebar.cpp - -// From peninputvkbctrl -SOURCEPATH ../src/peninputvkbctrl -SOURCE peninputvkbctrllayout.cpp -SOURCE peninputvkbctrlext.cpp - -// From peninputdropdownlist -SOURCEPATH ../src/peninputdropdownlist -SOURCE peninputbitmapdb.cpp -SOURCE peninputcandidate.cpp -SOURCE peninputdropdownlist.cpp -SOURCE peninputlist.cpp -SOURCE peninputlistmanager.cpp -SOURCE peninputlistmultirowwithicon.cpp -SOURCE peninputlistmultirowwithouticon.cpp -SOURCE peninputlistonerowwithicon.cpp -SOURCE peninputlistonerowwithouticon.cpp -SOURCE peninputpages.cpp -SOURCE peninputlistmultirowrollwithicon.cpp -SOURCE peninputlistonerowrollwithicon.cpp -SOURCE peninputlistexpandablemultirowwithouticon.cpp -SOURCE peninputlistmultirowwithiconwithbubble.cpp -SOURCE peninputlistonerowwithiconwithbubble.cpp -SOURCE peninputlistonerowwithouticonwithbubble.cpp -SOURCE peninputlistmultirowrollwithiconwithbubble.cpp -SOURCE peninputlistonerowrollwithiconwithbubble.cpp - -// From peninputselectionlist -SOURCEPATH ../src/peninputselectionlist -SOURCE peninputselectionlist.cpp -SOURCE peninputlayoutinputmodechoice.cpp -SOURCE peninputscrollablelist.cpp -SOURCE peninputcommonchoicelist.cpp -// From peninputlabel -SOURCEPATH ../src/peninputlabel -SOURCE peninputlabel.cpp - -USERINCLUDE ../inc/peninputbasewindow -USERINCLUDE ../inc/peninputbuttons -USERINCLUDE ../inc/peninputgeneralheaders -USERINCLUDE ../inc/peninputdropdownlist -USERINCLUDE ../inc/peninputrangebar -USERINCLUDE ../inc/peninputselectionlist -USERINCLUDE ../inc/peninputlabel -USERINCLUDE ../inc/peninputvkbctrl - - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -MW_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE /epoc32/include/ecom -SYSTEMINCLUDE ../../../inc -SYSTEMINCLUDE ../../inc - -SOURCEPATH ../srcdata - -// general resource file - -START RESOURCE peninputmodeswitchutilsnew.rss -HEADER -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END -START RESOURCE peninputmodeswitchutils.rss -TARGETPATH RESOURCE_FILES_DIR -END - -LIBRARY euser.lib -LIBRARY cone.lib -LIBRARY ws32.lib -LIBRARY bafl.lib -LIBRARY efsrv.lib -LIBRARY bitgdi.lib -LIBRARY gdi.lib -LIBRARY fbscli.lib -LIBRARY aknicon.lib -LIBRARY peninputlayoutcontrol.lib -LIBRARY peninputpluginutils.lib -LIBRARY aknskins.lib -LIBRARY avkon.lib -LIBRARY eikcore.lib -LIBRARY aknlayout.lib -LIBRARY AknLayout2Scalable.lib -LIBRARY commonengine.lib -LIBRARY CentralRepository.lib -#ifdef RD_TACTILE_FEEDBACK -LIBRARY FeatMgr.lib // feature manager -LIBRARY touchfeedback.lib -#endif // RD_TACTILE_FEEDBACK -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/group/peninputcommonctrls_icons.mk --- a/textinput/peninputcommonctrls/group/peninputcommonctrls_icons.mk Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -# -# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0"" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -ifeq (WINS,$(findstring WINS, $(PLATFORM))) -ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z -else -ZDIR=\epoc32\data\z -endif - -# ---------------------------------------------------------------------------- -# Configuration for AknFep icons. -# ---------------------------------------------------------------------------- - -TARGETDIR=$(ZDIR)\resource\apps -HEADERDIR=\epoc32\include -ICONTARGETFILENAME=$(TARGETDIR)\peninputmodeswitcher.mif -HEADERFILENAME=$(HEADERDIR)\peninputmodeswitcher.mbg - -do_nothing : - @rem do_nothing - -MAKMAKE : do_nothing - -BLD : do_nothing - -CLEAN : - @del $(ICONTARGETFILENAME) - @del $(HEADERFILENAME) - @del $(TARGETDIR)\peninputmodeswitcher.mbm - -LIB : do_nothing - -CLEANLIB : do_nothing - -# ---------------------------------------------------------------------------- -# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by -# MifConv if the mask depth is defined. -# -# NOTE 2: Usually, source paths should not be included in the bitmap -# definitions. MifConv searches for the icons in all icon directories in a -# predefined order, which is currently \s60\icons, \s60\bitmaps2. -# The directory \s60\icons is included in the search only if the feature flag -# __SCALABLE_ICONS is defined. -# ---------------------------------------------------------------------------- - -RESOURCE: - mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) /Ficonlist.txt - -FREEZE : do_nothing - -SAVESPACE : do_nothing - -RELEASABLES : - @echo $(HEADERFILENAME)&& \ - @echo $(ICONTARGETFILENAME) - -FINAL : do_nothing diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindow.h --- a/textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindow.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CAknFepCtrlBaseWindow -* -*/ - - -#ifndef C_CAKNFEPCTRLBASEWINDOW_H -#define C_CAKNFEPCTRLBASEWINDOW_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CFepUiLayout; -class CAknFepCtrlButton; -class CAknFepCtrlDragButton; -class CAknFepCtrlCommonButton; -/** - * Class definiton for base window - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlBaseWindow : public CControlGroup, public MEventObserver - { -public: - - /** - * destructor. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CAknFepCtrlBaseWindow(); - - /** - * Resize - * - * @since S60 v3.2 - * @param aLandscapeStyle Current screen is landscape or not - * @return None - */ - virtual void SizeChanged(TBool aLandscapeStyle) = 0; - - /** - * Close window - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Close(); - - /** - * Enable or disable drag window - * - * @since S60 v3.2 - * @param aEnable ETrue to enable otherwise disable drag - * @return None - */ - IMPORT_C void SetDragEnable(TBool aEnable); - - /** - * Get the control by control id - * - * @since S60 v3.2 - * @param aCtrlId The control id - * @return Pointer to the control found;otherwise NULL - */ - IMPORT_C CFepUiBaseCtrl* Control(TInt aCtrlId); - - /** - * Get Header Pane - * - * @since S60 v3.2 - * @return Pointer to header pane - */ - inline CControlGroup* HeaderPane() const; - - /** - * Get Client Pane - * - * @since S60 v3.2 - * @return client pane - */ - inline CControlGroup* ClientPane() const; - - /** - * Get the title bar - * - * @since S60 v3.2 - * @return Pointer to title bar - */ - inline CControlGroup* TitleBar() const; - - /** - * Get Client Pane - * - * @since S60 v3.2 - * @return Pointer to move button - */ - inline CAknFepCtrlDragButton* MoveButton() const; - - /** - * Get close button - * - * @since S60 v3.2 - * @return Pointer to close button - */ - inline CAknFepCtrlCommonButton* CloseButton() const; - -// from base class MEventObserver - - /** - * From MEventObserver. - * Handle the observer event - * - * @since S60 v3.2 - * @param aEventType Event type - * @param aCtrl Sender control - * @param aEventData Event data - */ - IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData); - -// from base class CControlGroup - - /** - * From CControlGroup. - * Draw window - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - -protected: - - /** - * C++ default constructor - * - * @since S60 v3.2 - * @param aFepUiLayout A Ui Layout environment (CFepUiLayout) - * @param aControlId Control id - */ - IMPORT_C CAknFepCtrlBaseWindow( CFepUiLayout* aFepUiLayout, - TInt aControlId); - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void BaseConstructL(); - - /** - * call back function when closing window - * - * @since S60 v3.2 - * @return ETrue for allowing close window; otherwise EFalse - */ - IMPORT_C virtual TBool DoClose(); - -private:// data - - /** - * The title bar (Own) - */ - CControlGroup* iTitleBar; - - /** - * The move drag button (Own) - */ - CAknFepCtrlDragButton* iMoveButton; - - /** - * The close button (Own) - */ - CAknFepCtrlCommonButton* iCloseButton; - - /** - * The header pane (Own) - */ - CControlGroup* iHeaderPane; - - /** - * The client pane (Own) - */ - CControlGroup* iClientPane; - - }; - -#include "peninputbasewindow.inl" - -#endif // C_CAKNFEPCTRLBASEWINDOW_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindow.inl --- a/textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindow.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: inline file of aknfepctrlbasewindow.h -* -*/ - - -inline CControlGroup* CAknFepCtrlBaseWindow::HeaderPane() const - { - return iHeaderPane; - } - -inline CControlGroup* CAknFepCtrlBaseWindow::ClientPane() const - { - return iClientPane; - } - -inline CControlGroup* CAknFepCtrlBaseWindow::TitleBar() const - { - return iTitleBar; - } - -inline CAknFepCtrlDragButton* CAknFepCtrlBaseWindow::MoveButton() const - { - return iMoveButton; - } - -inline CAknFepCtrlCommonButton* CAknFepCtrlBaseWindow::CloseButton() const - { - return iCloseButton; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindowext.h --- a/textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindowext.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CAknFepCtrlBaseWindowExt -* -*/ - - -#ifndef C_CAKNFEPCTRLBASEWINDOWEXT_H -#define C_CAKNFEPCTRLBASEWINDOWEXT_H - -// INCLUDES - -#include -#include -#include "peninputcommonbutton.h" -#include "peninputeventbutton.h" -#include "peninputrepeatbutton.h" -#include "peninputinputcontextfield.h" - - -// FORWARD DECLARATIONS -class CFepUiLayout; -class CAknFepCtrlButton; -class CAknFepCtrlRepeatButton; -class CAknFepCtrlDragButton; -class CPeninputLayoutInputmodelChoice; -class CFepLayoutMultiLineIcf; -/** - * Class definiton for base window - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlBaseWindowExt : public CControlGroup, public MEventObserver - { -public: - - /** - * destructor. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CAknFepCtrlBaseWindowExt(); - - /** - * Resize - * - * @since S60 v3.2 - * @param aLandscapeStyle Current screen is landscape or not - * @return None - */ - virtual void SizeChanged(TBool aLandscapeStyle) = 0; - - /** - * Close window - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Close(); - - /** - * Enable or disable drag window - * - * @since S60 v3.2 - * @param aEnable ETrue to enable otherwise disable drag - * @return None - */ - IMPORT_C void SetDragEnable(TBool aEnable); - - /** - * Get the control by control id - * - * @since S60 v3.2 - * @param aCtrlId The control id - * @return Pointer to the control found;otherwise NULL - */ - IMPORT_C CFepUiBaseCtrl* Control(TInt aCtrlId); - -// from base class MEventObserver - - /** - * From MEventObserver. - * Handle the observer event - * - * @since S60 v3.2 - * @param aEventType Event type - * @param aCtrl Sender control - * @param aEventData Event data - */ - IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData); - -// from base class CControlGroup - - /** - * From CControlGroup. - * Draw window - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - -protected: - - /** - * C++ default constructor - * - * @since S60 v3.2 - * @param aFepUiLayout A Ui Layout environment (CFepUiLayout) - * @param aControlId Control id - */ - IMPORT_C CAknFepCtrlBaseWindowExt( CFepUiLayout* aFepUiLayout, - TInt aControlId); - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void BaseConstructL(); - - /** - * call back function when closing window - * - * @since S60 v3.2 - * @return ETrue for allowing close window; otherwise EFalse - */ - IMPORT_C virtual TBool DoClose(); - - IMPORT_C void ConstructFromResourceL(); - - IMPORT_C virtual void CreateBaseWindowControlsL( TInt16 aControlId, TInt32 aImageId ); - - virtual TBool CreateCustomControlL( TInt16 aControlId, TInt32 aImageId ); - - virtual void AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl); - -private: - - void ReadIcfInfoL(TResourceReader aResReader, - CFepInputContextField* icf); - void ReadMultiLineIcfInforL( TResourceReader aResReader, - CFepLayoutMultiLineIcf* icf ); - - void ReadShadowInfoL( TInt aResId ); - - inline CAknFepCtrlCommonButton* CloseButton() const; - - inline void SetCloseButton(CAknFepCtrlCommonButton* aCloseBtn); - - void ReadBackgroundInfoL( TInt aResId ); -private:// data - - /** - * The close button (Own) - */ - CAknFepCtrlCommonButton* iCloseButton; - - TBool iFirstTimeConstruct; - - CCoeEnv* iCoeEnv; - - }; - -#include "peninputbasewindowext.inl" - -#endif // C_CAKNFEPCTRLBASEWINDOWEXT_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindowext.inl --- a/textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindowext.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: inline file of aknfepctrlbasewindow.h -* -*/ - - -inline CAknFepCtrlCommonButton* CAknFepCtrlBaseWindowExt::CloseButton() const - { - return iCloseButton; - } - -inline void CAknFepCtrlBaseWindowExt::SetCloseButton(CAknFepCtrlCommonButton* aCloseBtn) - { - iCloseButton = aCloseBtn; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputbutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputbutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLBUTTON_H -#define C_CAKNFEPCTRLBUTTON_H - -// system includes -#include -#include - -// forward declarations -class TResourceReader; - -// class declarations -/** - * Basic functionality for graphic buttons - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlButton : public CButtonBase - { -public: - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlButton type object - */ - IMPORT_C static CAknFepCtrlButton* NewL(CFepUiLayout* aUiLayout, TInt aControlId); - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlButton type object - */ - IMPORT_C static CAknFepCtrlButton* NewLC(CFepUiLayout* aUiLayout, TInt aControlId); - - /** - * Destructor. - * - * @since S60 v3.2 - */ - IMPORT_C virtual ~CAknFepCtrlButton(); - - /** - * This function creates the input range button from resource. - * - * @since S60 v3.2 - * @param aReader A Reader which is created against the AKN_FEP_BUTTON resource type - * @return None - */ - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - - /** - * This function creates the input range button from resource, - * before calling this function, caller should set resource id of - * range button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * This function handles the SizeChanged event, it resizes all images and rects - * - * @since S60 v3.2 - * @param aRect New button extent - * @param aIsReloadImages Whether resize images as well, - * if only the position of the button changed, no need to reset the images as well - * @return Nothing - */ - IMPORT_C void SizeChanged(TRect aRect, TBool aIsReloadImages = EFalse); - - /** - * Draws UI - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - /** - * Set active for this button - * - * @since S60 v3.2 - * @param aActiveFlag active the button or desactive it - * @return None - */ - IMPORT_C void SetActive(TBool aActiveFlag); - - /** - * Set high light for the button - * - * @since S60 v3.2 - * @param aIsHighlight highlight the button or cancel high light it - * @return None - */ - IMPORT_C void SetHighlight(TBool aIsHighlight); - - /** - * From CFepUiBaseCtrl - * Handle pointer levae event. - * This will be called only when it's got pointer down event before and - * now pointer leaves without pointer up event - * - * @since S60 V4.0 - * @param aPoint current pointer position - */ - virtual void HandlePointerLeave(const TPoint& aPoint); - -protected: - - /** - * C++ default constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - */ - IMPORT_C CAknFepCtrlButton(CFepUiLayout* aUiLayout, TInt aControlId); - - void ResizeBitmaps(TSize aSize); - -protected: - - /** - * The first time construct flag of button - */ - TBool iFirstTimeConstruct; - -private: - - /** - * Array of background bmp (not own) - */ - RPointerArray iBmpList; - - /** - * Array of background mask bmp (not own) - */ - RPointerArray iMaskBmpList; - - /** - * The highlight flag of the button - */ - TBool iHighlight; - }; - -#endif // C_CAKNFEPCTRLBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputcommonbutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputcommonbutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,386 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLCOMMONBUTTON_H -#define C_CAKNFEPCTRLCOMMONBUTTON_H - -// system includes -#include -#include -#include -#include -#include - -// forward declarations -class TResourceReader; - -struct TDraw3PiecesFrame - { - TAknsItemID iImgLeftID; - TAknsItemID iImgMiddleID; - TAknsItemID iImgRightID; - TRect iInnerRect; - - TDraw3PiecesFrame(TAknsItemID aImgLeftID, - TAknsItemID aImgMiddleID, - TAknsItemID aImgRightID, - TRect aInnerRect) - { - - iImgLeftID = aImgLeftID; - iImgMiddleID = aImgMiddleID; - iImgRightID = aImgRightID; - - iInnerRect = aInnerRect; - - }; - - TDraw3PiecesFrame() - { - - }; - }; - -// class declarations -/** - * Basic functionality for graphic buttons - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlCommonButton : public CButtonBase - { -public: - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlCommonButton type object - */ - IMPORT_C static CAknFepCtrlCommonButton* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID); - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlCommonButton type object - */ - IMPORT_C static CAknFepCtrlCommonButton* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID); - /** - * Destructor. - * - * @since S60 v3.2 - */ - IMPORT_C virtual ~CAknFepCtrlCommonButton(); - - /** - * This function creates the input range button from resource. - * - * @since S60 v3.2 - * @param aReader A Reader which is created against the AKN_FEP_BUTTON resource type - * @return None - */ - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - - /** - * This function creates the input range button from resource, - * before calling this function, caller should set resource id of - * range button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * This function handles the SizeChanged event, it resizes all images and rects - * - * @since S60 v3.2 - * @param aRect New button extent - * @param aInnerRect New button inner - * @param aIsReloadImages Whether resize images as well, - * if only the position of the button changed, no need to reset the images as well - * @return Nothing - */ - IMPORT_C void SizeChanged(TRect aRect, TRect aInnerRect, TBool aIsReloadImages = EFalse); - - /** - * Draws UI - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - /** - * Set active for this button - * - * @since S60 v3.2 - * @param aActiveFlag active the button or desactive it - * @return None - */ - IMPORT_C void SetActive(TBool aActiveFlag); - - /** - * Set high light for the button - * - * @since S60 v3.2 - * @param aIsHighlight highlight the button or cancel high light it - * @return None - */ - IMPORT_C void SetHighlight(TBool aIsHighlight); - - /** - * Set Forground bitmap position - * - * @since S60 v3.2 - * @param aRect Forground bitmap position - * @return None - */ - IMPORT_C void SetForgroundBmpRect(const TRect& aRect); - - IMPORT_C void SetForegroundBmpL(CFbsBitmap* aBmp, - CFbsBitmap* aMaskBmp); - - IMPORT_C void SetDraw3PieceFrameInfo(TDraw3PiecesFrame a3PiecesFrameInfo); - - /** - * Cancel pointer down state - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void CancelPointerDownL(); - - /** - * Set text line layout - * - * @since S60 V4.0 - * @param aTextFormat Text line layout to be set - * @return None - */ - inline void SetTextFormat(TAknTextLineLayout aTextFormat); - - /** - * Set text to be shown on button - * - * @since S60 V4.0 - * @param aText Text to be shown on button - * @return None - */ - inline void SetTextL(const TDesC& aText); - - inline void SetImageFrameId( TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID ); - - - inline void Set3PiecesColorIcons( CPenInput3PiecesColorIcons* aColorIcons ); - - /** - * Set text color group - * - * @since S60 V4.0 - * @param aColorGroup Text color group - * @return None - */ - inline void SetTextColorIndex( TInt aColorGroup ); - inline TInt TextColorIndex() const; - - inline CFbsBitmap* ForgroundBmp(); - inline CFbsBitmap* ForgroundBmpMask(); - inline const TRect& ForgroundBmpRect() const; -protected: - - /** - * C++ default constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - */ - IMPORT_C CAknFepCtrlCommonButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID); - - - void ResizeBitmaps(TSize aInnerSize); - - void DeleteForgroundRes(); - - void CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ); - - /** - * From CFepUiBaseCtrl - * Handle pointer down event - * - * @since S60 V4.0 - * @param aPoint The point position relative the layout - * @return The control which handles the event. - */ - IMPORT_C virtual CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); - - /** - * From CFepUiBaseCtrl - * Handle pointer up event - * - * @since S60 V4.0 - * @param aPoint The point position relative the layout - * @return The control which handles the event - */ - IMPORT_C virtual CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); - - /** - * From CFepUiBaseCtrl - * Handle pointer up event - * - * @since S60 V4.0 - * @param aPoint The point position relative the layout - * @return The control which handles the event - */ - IMPORT_C virtual void HandlePointerLeave(const TPoint& aPt); - - IMPORT_C virtual void HandlePointerEnter(const TPoint& aPt); - - IMPORT_C void Move(const TPoint& aOffset); -protected: - - /** - * The first time construct flag of button - */ - TBool iFirstTimeConstruct; - - /** - * The highlight flag of the button - */ - TBool iHighlight; - - TBool iPressed; - -private: - - /** - * Froground bitmap and it's mask - */ - CFbsBitmap* iForgroundBmp; - CFbsBitmap* iForgroundBmpMask; - - /** - * Froground Dimmed bitmap's mask - */ - CFbsBitmap* iForgroundDimBmpMask; - - /** - * Froground bitmap's position - */ - TRect iForgroundBmpRect; - - /** - * The img ID of button in various states - */ - TAknsItemID iNormalImgID; - TAknsItemID iPressedImgID; - TAknsItemID iInactiveImgID; - - HBufC* iText; - TAknTextLineLayout iTextFormat; - - TDraw3PiecesFrame iDraw3PiecesInfo; - /** - * The 3 pieces color icon (owned) - */ - CPenInput3PiecesColorIcons* iColorIcons; - /** - * Text color index - */ - TInt iTextColorIndex; - }; - -inline void CAknFepCtrlCommonButton::SetTextFormat(TAknTextLineLayout aTextFormat) - { - iTextFormat = aTextFormat; - } - -inline void CAknFepCtrlCommonButton::SetTextL(const TDesC& aText) - { - delete iText; - iText = NULL; - iText = aText.AllocL(); - } - -inline void CAknFepCtrlCommonButton::SetImageFrameId( TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID ) - { - iNormalImgID = aNormalID; - iPressedImgID = aPressedID; - iInactiveImgID = aInactiveID; - } - -inline void CAknFepCtrlCommonButton:: - Set3PiecesColorIcons( CPenInput3PiecesColorIcons* aColorIcons ) - { - delete iColorIcons; - iColorIcons = aColorIcons; - } - -inline void CAknFepCtrlCommonButton::SetTextColorIndex( TInt aColorGroup ) - { - iTextColorIndex = aColorGroup; - } - -inline TInt CAknFepCtrlCommonButton::TextColorIndex() const - { - return iTextColorIndex; - } - -inline CFbsBitmap* CAknFepCtrlCommonButton::ForgroundBmp() - { - return iForgroundBmp; - } - -inline CFbsBitmap* CAknFepCtrlCommonButton::ForgroundBmpMask() - { - return iForgroundBmpMask; - } - -inline const TRect& CAknFepCtrlCommonButton::ForgroundBmpRect() const - { - return iForgroundBmpRect; - } -#endif // C_CAKNFEPCTRLCOMMONBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputdragbutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputdragbutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,242 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLDRAGBUTTON_H -#define C_CAKNFEPCTRLDRAGBUTTON_H - -// system includes -#include -#include -#include -#include - -// forward declarations -class TResourceReader; - -/** - * Basic functionality for drag button - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlDragButton : public CDragBar - { -public: - - /** - * Symbian constructor. - * - * @since S60 v3.2 - * @param aUiLayout The Ui layout - * @param aControlId The control id - * @return Pointer to created CAknFepCtrlDragButton object - */ - IMPORT_C static CAknFepCtrlDragButton* NewL(CFepUiLayout* aUiLayout, TInt aControlId); - - /** - * Symbian constructor. - * - * @since S60 v3.2 - * @param aUiLayout The Ui layout - * @param aControlId The control id - * @return Pointer to created CAknFepCtrlDragButton object - */ - IMPORT_C static CAknFepCtrlDragButton* NewLC(CFepUiLayout* aUiLayout, TInt aControlId); - - /** - * destructor. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CAknFepCtrlDragButton(); - - /** - * This function creates the button from resource. - * - * @since S60 v3.2 - * @param aReader A Reader which is created against the AKN_FEP_BUTTON resource type - * @return None - */ - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - - /** - * This function creates button from resource, before calling - * this function, caller should set resource id of button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * This function handles the SizeChanged event, it resizes all images and rects - * - * @since S60 v3.2 - * @param aRect New button extent - * @param aIsReloadImages ETrue for resizing images; otherwise EFalse - * @return None - */ - IMPORT_C void SizeChanged(TRect aRect, TRect aInnerRect = TRect(), - TBool aIsReloadImages = EFalse); - - /** - * Set Forground bitmap position - * - * @since S60 v3.2 - * @param aRect Forground bitmap position - * @return None - */ - IMPORT_C void SetForgroundBmpRect(const TRect& aRect); - - IMPORT_C void SetForegroundBmpL(CFbsBitmap* aBmp, - CFbsBitmap* aMaskBmp); - - /** - * Draws UI - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - IMPORT_C void Move(const TPoint& aOffset); - - /** - * From CFepUiBaseCtrl - * Handle pointer down event - * - * @since S60 V4.0 - * @param aPoint The point position relative the layout - * @return The control which handles the event. - */ - IMPORT_C virtual CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); - - /** - * Set text line layout - * - * @since S60 V4.0 - * @param aTextFormat Text line layout to be set - * @return None - */ - inline void SetTextFormat(TAknTextLineLayout aTextFormat); - - /** - * Set text to be shown on button - * - * @since S60 V4.0 - * @param aText Text to be shown on button - * @return None - */ - inline void SetTextL(const TDesC& aText); - - inline void SetImageFrameId( TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID ); -protected: - - /** - * C++ default constructor. - * - * @since S60 v3.2 - * @param aUiLayout The Ui layout - * @param aControlId The control id - * @return None - */ - IMPORT_C CAknFepCtrlDragButton(CFepUiLayout* aUiLayout, TInt aControlId); - - - - void ResizeBitmaps(TSize aSize); - - void DeleteForgroundRes(); - - void CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ); - - -private: - /** - * Array of background bmp (not own) - */ - RPointerArray iBmpList; - - /** - * Array of background mask bmp (not own) - */ - RPointerArray iMaskBmpList; - - /** - * The first time construct flag of button - */ - TBool iFirstTimeConstruct; - - /** - * Froground bitmap and it's mask - */ - CFbsBitmap* iForgroundBmp; - CFbsBitmap* iForgroundBmpMask; - - /** - * Froground Dimmed bitmap's mask - */ - CFbsBitmap* iForgroundDimBmpMask; - - /** - * Froground bitmap's position - */ - TRect iForgroundBmpRect; - - /** - * The img ID of button in various states - */ - TAknsItemID iNormalImgID; - TAknsItemID iPressedImgID; - TAknsItemID iInactiveImgID; - - HBufC* iText; - TAknTextLineLayout iTextFormat; - }; - - -inline void CAknFepCtrlDragButton::SetTextFormat(TAknTextLineLayout aTextFormat) - { - iTextFormat = aTextFormat; - } - -inline void CAknFepCtrlDragButton::SetTextL(const TDesC& aText) - { - delete iText; - iText = NULL; - iText = aText.AllocL(); - } - -inline void CAknFepCtrlDragButton::SetImageFrameId( TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID ) - { - iNormalImgID = aNormalID; - iPressedImgID = aPressedID; - iInactiveImgID = aInactiveID; - } - -#endif // C_CAKNFEPCTRLDRAGBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputeventbutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputeventbutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLEVENTBUTTON_H -#define C_CAKNFEPCTRLEVENTBUTTON_H - -// system includes -#include -#include -#include -#include - -// forward declarations -class TResourceReader; - -// class declarations -/** - * Basic functionality for graphic buttons - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlEventButton : public CAknFepCtrlCommonButton - { -public: - - /** - * Symbian constructor. - * - * @since S60 v3.2 - * @param aUiLayout The layout - * @param aControlId The control id - * @param aEvent An event Id to be sent - * @param aUnicode A Unicode value to be sent - * @return Pointer to created CAknFepCtrlEventButton object - */ - IMPORT_C static CAknFepCtrlEventButton* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aEvent = 0xFFFF, - TInt aUnicode = 0, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - - /** - * Symbian constructor. - * - * @since S60 v3.2 - * @param aUiLayout The layout - * @param aControlId The control id - * @param aEvent An event Id to be sent - * @param aUnicode A Unicode value to be sent - * @return Pointer to created CAknFepCtrlEventButton object - */ - IMPORT_C static CAknFepCtrlEventButton* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aEvent = 0xFFFF, - TInt aUnicode = 0, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - - /** - * destructor. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CAknFepCtrlEventButton(); - - /** - * From CButtonBase - * Handle button up event. cancel all timers - * - * @since S60 v3.2 - * @param aPoint Point position - * @return The control who handles the event - */ - IMPORT_C virtual CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); - - /** - * This function gets the current Event Id - * - * @since S60 v3.2 - * @return Current Event Id - */ - IMPORT_C TInt Event() const; - - /** - * This function gets the current Unicode value - * - * @since S60 v3.2 - * @return Current Unicode value - */ - IMPORT_C TInt Unicode() const; - - /** - * This function sets the Event Id sent by this button - * - * @since S60 v3.2 - * @param aEvent An event Id to be sent - * @return None - */ - IMPORT_C void SetEvent(TInt aEvent); - - /** - * This function sets the Unicode value sent by this button - * - * @since S60 v3.2 - * @param aUnicode A Unicode value to be sent - * @return None - */ - IMPORT_C void SetUnicode(TInt aUnicode); - - /** - * This function sets the text written on the button - * - * @since S60 v3.2 - * @param aText the text will be shown - * @return None - */ - IMPORT_C void SetText(const TDesC& aText); - - /** - * This function set the font used to draw the text - * - * @since S60 v3.2 - * @param aFont the font - * @return None - */ - IMPORT_C void SetFont(const CFont* aFont); - - /** - * This function set the shadow font used to draw the text - * - * @since S60 v3.2 - * @param aFont the shadow font - * @return None - */ - IMPORT_C void SetShadowFont(const CFont* aFont); - - /** - * This function set the font color used to draw the text - * - * @since S60 v3.2 - * @param aColor the font color - * @return None - */ - IMPORT_C void SetFontColor(const TRgb aColor); - - /** - * This function set the shadow font color used to draw the text - * - * @since S60 v3.2 - * @param aColor the shadow font color - * @return None - */ - IMPORT_C void SetShadowFontColor(const TRgb aColor); - - /** - * Draw function - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - -protected: - - /** - * C++ constructor. - * - * @since S60 v3.2 - * @param aUiLayout Ui Layout who contains this control - * @param aControlId Control Id - * @param aEvent An event Id to be sent - * @param aUnicode A Unicode value to be sent - * @return None - */ - IMPORT_C CAknFepCtrlEventButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aEvent, - TInt aUnicode, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - /** - * Display button caption. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void DisplayText(); - -private: - - /** - * Event Id - */ - TInt iEvent; - - /** - * Unicode value - */ - TInt iUnicode; - - /** - * Text shown on button - */ - HBufC* iText; - - /** - * the font used to show the text - */ - const CFont* iFont; - - /** - * the shadow font used to show the text - */ - const CFont* iShadowFont; - - /** - * the font color used to show the text - */ - TRgb iFontColor; - - /** - * the shadow font color used to show the text - */ - TRgb iShadowFontColor; - }; - -#endif // C_CAKNFEPCTRLEVENTBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultiimagebutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultiimagebutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLMULTIIMAGEBUTTON_H -#define C_CAKNFEPCTRLMULTIIMAGEBUTTON_H - -// system includes -#include -#include -#include -#include - -// forward declarations -class TResourceReader; - - -// class declarations -/** - * Basic functionality for graphic buttons - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlMultiImageButton : public CAknFepCtrlCommonButton - { -public: - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlMultiImageButton type object - */ - IMPORT_C static CAknFepCtrlMultiImageButton* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID); - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlMultiImageButton type object - */ - IMPORT_C static CAknFepCtrlMultiImageButton* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID); - /** - * Destructor. - * - * @since S60 v3.2 - */ - IMPORT_C virtual ~CAknFepCtrlMultiImageButton(); - - /** - * This function creates the input range button from resource. - * - * @since S60 v3.2 - * @param aReader A Reader which is created against the AKN_FEP_BUTTON resource type - * @return None - */ - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - - /** - * This function creates the input range button from resource, - * before calling this function, caller should set resource id of - * range button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * This function handles the SizeChanged event, it resizes all images and rects - * - * @since S60 v3.2 - * @param aRect New button extent - * @param aInnerRect New button inner - * @param aIsReloadImages Whether resize images as well, - * if only the position of the button changed, no need to reset the images as well - * @return Nothing - */ - IMPORT_C void SizeChanged(TRect aRect, TRect aInnerRect, TBool aIsReloadImages = EFalse); - - /** - * Draws UI - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - /** - * Set text line layout - * - * @since S60 V4.0 - * @param aTextFormat Text line layout to be set - * @return None - */ - inline void SetTextFormat(TAknTextLineLayout aTextFormat); - - /** - * Set text to be shown on button - * - * @since S60 V4.0 - * @param aText Text to be shown on button - * @return None - */ - inline void SetTextL(const TDesC& aText); - - inline void SetImageFrameId( TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID ); - - IMPORT_C void Move(const TPoint& aOffset); - -protected: - - /** - * C++ default constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - */ - IMPORT_C CAknFepCtrlMultiImageButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID); - - - void ResizeBitmaps(TSize aInnerSize); - - void DeleteForgroundRes(); - - void CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ); - -private: - /** - * Froground bitmap and it's mask - */ - CFbsBitmap* iForground1Bmp; - CFbsBitmap* iForground1BmpMask; - - /** - * Froground Dimmed bitmap's mask - */ - CFbsBitmap* iForground1DimBmpMask; - - /** - * Froground bitmap's position - */ - TRect iForground1BmpRect; - - /** - * Froground bitmap and it's mask - */ - CFbsBitmap* iForground2Bmp; - CFbsBitmap* iForground2BmpMask; - - /** - * Froground Dimmed bitmap's mask - */ - CFbsBitmap* iForground2DimBmpMask; - - /** - * Froground bitmap's position - */ - TRect iForground2BmpRect; - - /** - * The img ID of button in various states - */ - TAknsItemID iNormalImgID; - TAknsItemID iPressedImgID; - TAknsItemID iInactiveImgID; - - HBufC* iText; - TAknTextLineLayout iTextFormat; - }; - -inline void CAknFepCtrlMultiImageButton::SetTextFormat(TAknTextLineLayout aTextFormat) - { - iTextFormat = aTextFormat; - } - -inline void CAknFepCtrlMultiImageButton::SetTextL(const TDesC& aText) - { - delete iText; - iText = NULL; - iText = aText.AllocL(); - } - -inline void CAknFepCtrlMultiImageButton::SetImageFrameId( TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID ) - { - iNormalImgID = aNormalID; - iPressedImgID = aPressedID; - iInactiveImgID = aInactiveID; - } -#endif // C_CAKNFEPCTRLMULTIIMAGEBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultimodebutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultimodebutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,437 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLMULTIMODEBUTTON_H -#define C_CAKNFEPCTRLMULTIMODEBUTTON_H - -// system includes -#include -#include -#include -//#include -#include - -// forward declarations -class TResourceReader; - -struct TAknFepModeIndicator - { - /** - * Range id of button - */ - TInt iRangeId; - - /** - * Real mode(case) of button - */ - TInt iModeId; - - /** - * Permitted or not - */ - TBool iPermitted; - }; - -/** - * Basic functionality for multi display modes graphic buttons - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since Series 60 release 4.0 - */ -class CAknFepCtrlMultiModeButton : public CAknFepCtrlCommonButton - { -public: - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlMultiModeButton type object - */ - IMPORT_C static CAknFepCtrlMultiModeButton* NewL(CFepUiLayout* aUiLayout, TInt aControlId, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlMultiModeButton type object - */ - IMPORT_C static CAknFepCtrlMultiModeButton* NewLC(CFepUiLayout* aUiLayout, TInt aControlId, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - - /** - * Destructor. - * - * @since S60 v3.2 - */ - IMPORT_C virtual ~CAknFepCtrlMultiModeButton(); - - /** - * This function creates the button from resource. - * The function will leave if the count of display modes is invalid - * - * @since S60 v3.2 - * @param aReader A Reader which is created against the AKN_FEP_MULTIPLE_IMAGE_BUTTON resource type - * @return None - */ - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - - /** - * This function creates button from resource, before calling - * this function, caller should set resource id of button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * Add new display mode to button from resource reader - * - * @since S60 v3.2 - * @param aReader A Reader which is created against the AKN_FEP_BUTTON_IMAGE resource type - * @return None - */ - IMPORT_C void AddModeL(TResourceReader& aReader); - - /** - * Set button to given display mode - * - * @since S60 v3.2 - * @param aType The image type of button, active or nonactive - * @param aModeIndex The index of given display mode - * @return None - */ - IMPORT_C void SetCurrentModeL(const TButtonBmpType aType, const TInt aModeIndex); - - /** - * Get the mode index of next display mode - * - * @since S60 v3.2 - * @return Next display mode of button - */ - IMPORT_C TInt NextMode() const; - - /** - * Set font color for text shown in button - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void SetFontColor(const TRgb aFontColor); - - /** - * Set shadow font color for text shown in button - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void SetShadowFontColor(const TRgb aShadowFontColor); - - /** - * This function handles the SizeChanged event, it resizes all images and rects - * - * @since S60 v3.2 - * @param aRect New button extent - * @param aIsReloadImages Whether resize images as well, - * if only the position of the button changed, no need to reset the images as well - * @return Nothing - */ - IMPORT_C void SizeChanged(TRect aRect, TRect aInnerRect = TRect(), - TBool aIsReloadImages = EFalse); - - /** - * This function used to set permitted mode(case) in given range - * - * @since S60 v3.2 - * @param aRangId Range id - * @param aRealCaseId The real case id - * @param aPermit ETrue means permit given range and case, otherwise EFalse - * @return KErrNone if operation successfully, KErrNotSupported otherwise - */ - IMPORT_C TInt SetPermittedModes(const TInt aRangeId, const TInt aRealCaseId, TBool aPermit); - - /** - * This function used to set permitted range, all case in given range will be enable or not - * - * @since S60 v3.2 - * @param aRangId Range id - * @param aPermit ETrue means permit given range, otherwise EFalse - * @return KErrNone if operation successfully, KErrNotSupported otherwise - */ - IMPORT_C TInt SetPermittedRange(const TInt aRangeId, TBool aPermit); - - /** - * Enable all modes - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void EnableAllModes(); - - /** - * Disable all modes - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void DisableAllModes(); - - IMPORT_C void DisableOneModes(const TInt aRangeId); - - /** - * Judge if given range supported by this button - * - * @since S60 v3.2 - * @param aRange Given range id - * @return ETrue if given range supported, otherwise EFalse - */ - IMPORT_C TBool IsGivenRangeSupported(const TInt aRange); - - /** - * Set range - * - * @since S60 v3.2 - * @param aRange The given range - * @return KErrNone if operation successfully, otherwise KErrNotSupported - */ - IMPORT_C TInt SetRange(const TInt aRange); - - /** - * Get current active range - * - * @since S60 v3.2 - * @return Current active range if it is permitted, otherwise KErrNotSupported - */ - IMPORT_C TInt CurrentRange() const; - - /** - * Get range of given mode index - * - * @since S60 v3.2 - * @param aModeIndex Index of given mode - * @return Range of given mode if mode exist, otherwise KErrNotSupported - */ - IMPORT_C TInt RangeOfGivenMode(TInt aModeIndex) const; - - /** - * Get real case by given mode index - * - * @since S60 v3.2 - * @param aModeIndex Index of given mode - * @return Real case of given mode index if index valid, otherwise KErrNotFound - */ - IMPORT_C TInt GetRealCaseByMode(TInt aModeIndex) const; - - /** - * Get range list - * - * @since S60 v3.2 - * @param aList Carry the range list on return - * @return None - */ - void GetRangeListL(RArray& aList); - - /** - * Get index of current display mode - * - * @since S60 v3.2 - * @return Index of current display mode of button - */ - inline TInt CurrentMode() const; - - /** - * Get counts of display modes - * - * @since S60 v3.2 - * @return Counts of display modes of button - */ - inline TInt NumberOfModes() const; - - /** - * Set font for text shown in button - * - * @since S60 v3.2 - * @param aFont The font to be set for button - * @return None - */ - inline void SetFont(const CFont* aFont); - - /** - * Set font for text shown in button - * - * @since S60 v3.2 - * @param aShadowFont The font to be set for shadow text on button - * @return None - */ - inline void SetShadowFont(const CFont* aShadowFont); - -protected: - - /** - * C++ default constructor. - */ - IMPORT_C CAknFepCtrlMultiModeButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - - /** - * Judge if image resource of button already exist - * - * @since S60 v3.2 - * @param aResId The image resource id - * @return ETrue if image resource already exist, EFalse otherwise - */ - IMPORT_C TBool ImageAlreadyExist(const TInt32 aResId); - - /** - * Set bitmaps for button according to desired display mode - * - * @since S60 v3.2 - * @param aType The image type for button, can be active or nonactive etc. - * @param aMode The desired display mode index - * @return None - */ - IMPORT_C void SetButtonBmpL(const TButtonBmpType aType , const TInt aMode); - - /** - * Display text for button according to current display mode - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void DisplayText(); - - /** - * Draws UI - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - void ResizeBitmaps(TSize aSize); - -private: - - /** - * Duplicate bitmap - * - * @since S60 v3.2 - * @param aSourceBmp The source bitmap - * @return Pointer to created bitmap - */ - CFbsBitmap* DuplicateBitmapL(CFbsBitmap* aSourceBmp); - - /** - * Transfer bitmap ownship from multimode button to outside. - * - * @since S60 v3.2 - * @param aRemoved The bitmap to be transfered - * @return None - */ - void TransferOwnership(CFbsBitmap* aRemoved); - -private: // data - /** - * Array of foreground bitmaps in different modes - */ - RPointerArray iForegroundBmpList; - /** - * Array of foreground mask bitmaps in different modes - */ - RPointerArray iForegroundMaskBmpList; - /** - * Froground bitmap's position - */ - TRect iForgroundBmpRect; - - - /** - * Array of image resource Id list - */ - RArray iImageResIdList; - - /** - * The index of current display mode - */ - TInt iCurrentMode; - - /** - * The counts of display modes of button - */ - TInt iNumberOfModes; - - /** - * Font of text shown in button - */ - const CFont* iFont; - - /** - * Font of shadow text shown in button - */ - const CFont* iShadowFont; - - /** - * Font color of text shown in button - */ - TRgb iFontColor; - - /** - * Shadow Font color of text shown in button - */ - TRgb iShadowFontColor; - - /** - * Array of text shown on button - */ - RPointerArray iModeTextList; - - /** - * Array of owned bitmap - */ - //RPointerArray iOwnedBitmaps; - - /** - * Array of modes - */ - RPointerArray iModesList; - - /** - * Current bitmap type, active or nonactive - */ - TButtonBmpType iCurrentBmpType; - }; - -#include "peninputmultimodebutton.inl" - -#endif // C_CAKNFEPCTRLMULTIMODEBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultimodebutton.inl --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputmultimodebutton.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: inline file of button -* -*/ - - -inline TInt CAknFepCtrlMultiModeButton::NumberOfModes() const - { - return iNumberOfModes; - } - -inline TInt CAknFepCtrlMultiModeButton::CurrentMode() const - { - return iCurrentMode; - } - -inline void CAknFepCtrlMultiModeButton::SetFont(const CFont* aFont) - { - iFont = aFont; - } - -inline void CAknFepCtrlMultiModeButton::SetShadowFont(const CFont* aShadowFont) - { - iShadowFont = aShadowFont; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputrawkeybutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputrawkeybutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef C_CAKNFEPCTRLRAWKEYBUTTON_H -#define C_CAKNFEPCTRLRAWKEYBUTTON_H - -// system includes -#include -#include -#include -#include - -// forward declarations -class TResourceReader; - -class CAknFepCtrlRawKeyButton : public CAknFepCtrlCommonButton - { -public: - - IMPORT_C static CAknFepCtrlRawKeyButton* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID, - TInt aDownEvent = 0xffff, - TInt aUpEvent = 0xffff, - TInt aScanCode = 0); - - IMPORT_C static CAknFepCtrlRawKeyButton* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID, - TInt aDownEvent = 0xffff, - TInt aUpEvent = 0xffff, - TInt aScanCode = 0); - - IMPORT_C virtual ~CAknFepCtrlRawKeyButton(); - - IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); - IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); - IMPORT_C void HandlePointerLeave(const TPoint& aPoint); - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - IMPORT_C void ConstructFromResourceL(); - IMPORT_C void OnDeActivate(); - - inline void SetDownEvent(TInt aEvent); - inline void SetUpEvent(TInt aEvent); - inline TInt DownEvent() const; - inline TInt UpEvent() const; - inline TInt ScanCode() const; - inline void SetScanCode(TInt aScanCode); - -protected: - - IMPORT_C CAknFepCtrlRawKeyButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode); - -private: - - TInt iDownEvent; - TInt iUpEvent; - TInt iScanCode; - // indicate whether last event is pointer down event - TBool iLastPntDownEvent; - }; - -#include "peninputrawkeybutton.inl" -#endif // C_CAKNFEPCTRLRAWKEYBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputrawkeybutton.inl --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputrawkeybutton.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -inline TInt CAknFepCtrlRawKeyButton::DownEvent() const - { - return iDownEvent; - } - -inline TInt CAknFepCtrlRawKeyButton::UpEvent() const - { - return iUpEvent; - } - -inline TInt CAknFepCtrlRawKeyButton::ScanCode() const - { - return iScanCode; - } - -inline void CAknFepCtrlRawKeyButton::SetDownEvent(TInt aEvent) - { - iDownEvent = aEvent; - } - -inline void CAknFepCtrlRawKeyButton::SetUpEvent(TInt aEvent) - { - iUpEvent = aEvent; - } - -inline void CAknFepCtrlRawKeyButton::SetScanCode(TInt aScanCode) - { - iScanCode = aScanCode; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputbuttons/peninputrepeatbutton.h --- a/textinput/peninputcommonctrls/inc/peninputbuttons/peninputrepeatbutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of normal button and multidisplay button -* -*/ - - -#ifndef C_CAKNFEPCTRLREPEATBUTTON_H -#define C_CAKNFEPCTRLREPEATBUTTON_H - -// system includes -#include -#include -#include -#include - -// forward declarations -class TResourceReader; - -/** - * CAknFepCtrlRepeatButton - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlRepeatButton: public CAknFepCtrlEventButton, public MAknFepTimerHandler -{ -public: - - /** - * Symbian constructor. - * - * @since S60 v3.2 - * @param aUiLayout The layout - * @param aControlId The control id - * @param aEvent An event to be repeatedly sent - * @param aUnicode A Unicode value to be repeatedly sent - * @return Pointer to created CAknFepCtrlRepeatButton object - */ - IMPORT_C static CAknFepCtrlRepeatButton* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aEvent = 0xFFFF, - TInt aUnicode = 0, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - - /** - * Symbian constructor. - * - * @since S60 v3.2 - * @param aUiLayout The layout - * @param aControlId The control id - * @param aEvent An event to be repeatedly sent - * @param aUnicode A Unicode value to be repeatedly sent - * @return Pointer to created CAknFepCtrlRepeatButton object - */ - IMPORT_C static CAknFepCtrlRepeatButton* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aEvent = 0xFFFF, - TInt aUnicode = 0, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - /** - * destructor. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CAknFepCtrlRepeatButton(); - - /** - * Set the repeat interval. - * - * @since S60 v3.2 - * @param aTime Interval in ms. - * @return None - */ - IMPORT_C void SetRepeatInterval(const TTimeIntervalMicroSeconds32& aTime); - - /** - * Cancel key sending - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void CancelRepeat(); - -// from base class MAknFepHwrTimerHandler - - /** - * from MAknFepHwrTimerHandler - * HandleTimerOut. Handling time out event - * - * @since S60 v3.2 - * @param aTimer The timer which sending the request - * @return None - */ - IMPORT_C void HandleTimerOut(const CAknFepTimer* aTimer); - -protected: - - /** - * C++ constructor. - * - * @since S60 v3.2 - * @param aUiLayout Ui Layout who contains this control - * @param aCtrlId Control Id - * @param aEvent An event to be repeatedly sent - * @param aUnicode A Unicode value to be repeatedly sent - * @return None - */ - IMPORT_C CAknFepCtrlRepeatButton(CFepUiLayout* aUiLayout, - TInt aCtrlId, - TInt aEvent, - TInt aUnicode, - TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, - TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, - TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); - -// from base class CButtonBase - - /** - * From CButtonBase - * Handle button down event. start long press timer - * - * @since S60 v3.2 - * @param aPt Point position - * @return The control who handles the event - */ - IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPt); - - /** - * From CButtonBase - * Handle button up event. cancel all timers - * - * @since S60 v3.2 - * @param aPt Point position - * @return The control who handles the event - */ - IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPt); - - /** - * From CButtonBase - * Handle pointer levae event. - * - * @since S60 v3.2 - * @param aPoint current pointer position - * @return Nothing - */ - IMPORT_C void HandlePointerLeave(const TPoint& aPoint); - - IMPORT_C void CancelPointerDownL(); - - /** - * Symbian 2nd phase constructor. - */ - IMPORT_C void ConstructL(); - -private: - - /** - * interval of long press - */ - TTimeIntervalMicroSeconds32 iLongPressInterval; - - /** - * interval of repeat - */ - TTimeIntervalMicroSeconds32 iRepeatInterval; - - /** - * long press timer (Own) - */ - CAknFepTimer* iLongPressTimer; - - /** - * repeat timer (Own) - */ - CAknFepTimer* iRepeatTimer; - -}; - -#endif // C_CAKNFEPCTRLREPEATBUTTON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputbitmapdb.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputbitmapdb.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: bitmap db manager,which is used by drop down list -* -*/ - - -#ifndef C_BITMAPDB_H -#define C_BITMAPDB_H - -#include -#include -#include -#include - -/** - * Bitmap db manager - * - * Bitmap db manager used by drop down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CBitmapDb) : public CBase - { - -public: - /** - * bitmap type - * - * defines the types from bitmap database used by drop down list. - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ - enum TBitmapType - { - EBitmapListBg, - - EBitmapListBgMask, - - // the primary background bitmap - EBitmapPrimary, - - // the primary Mask background bitmap - EBitmapPrimaryMask, - - // the secondary background bitmap - EBitmapSecondary, - - // the secondary Mask background bitmap - EBitmapSecondaryMask, - - // the highlight cell background bitmap - EBitmapHighlight, - - // the highlight cell Mask background bitmap - EBitmapHighlightMask, - - // the pen down cell background bitmap - EBitmapPenDown, - - // the pen down cell Mask background bitmap - EBitmapPenDownMask, - - // disable bitmap for page down button - EBitmapNextDisable, - - // disable mask bitmap for page down button - EBitmapNextDisableMask, - - // bitmap for page down button - EBitmapNext, - - // mask bitmap for page down button - EBitmapNextMask, - - // pressed bitmap for page down button - EBitmapNextPress, - - // pressed mask bitmap for page down button - EBitmapNextPressMask, - - // bitmap for page close button - EBitmapClose, - - // mask bitmap for page close button - EBitmapCloseMask, - - // pressed bitmap for page close button - EBitmapClosePress, - - // pressed mask bitmap for page close button - EBitmapClosePressMask, - - // bitmap for page up button - EBitmapPrevious, - - // mask bitmap for page up button - EBitmapPreviousMask, - - // pressed bitmap for page up button - EBitmapPreviousPress, - - // pressed mask bitmap for page up button - EBitmapPreviousPressMask, - EBitmapExpand, - - EBitmapExpandMask, - - EBitmapExpandPress, - - EBitmapExpandPressMask, - - EBitmapLastType = EBitmapExpandPressMask - }; - -public: // Method - - /** - * Create a object of CBitmapDb, static method - * - * @since S60 v3.2 - * @param aReader resource reader which provide the bitmap(mask) id - * @param aBitmapSize the size needed to set for the bitmap - * @return CBitmapDb pointer. - */ - static CBitmapDb* NewL(TResourceReader& aReader, - TSize aBitmapSize, - TSize aExpandSize, - TSize aSpinBtnSize); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CBitmapDb(); - - /** - * Get bitmap from the database - * - * @since S60 v3.2 - * @param aType bitmap type - * @return the destination bitmap, Null if can't find - */ - const CFbsBitmap* GetBitMap(const TBitmapType aType); - - void ConstructFromResourceL(TResourceReader& aReader, - TSize aBitmapSize, - TSize aExpandSize, - TSize aSpinBtnSize); - - /** - * Get text color of drop down list - * - * @since S60 v3.2 - * @return Text color of drop down list - */ - const TRgb TextColor(); - - /** - * Get frame color of drop down list - * - * @since S60 v3.2 - * @return Frame color of drop down list - */ - const TRgb FrameColor(); - - static void CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ); - - void SizeChanged(TSize aSize); -private: // Data - - /** - * 2nd construct method - * - * @since S60 v3.2 - * @param aReader resource reader which provide the bitmap(mask) id - * @param aBitmapSize the size needed to set for the bitmap - * @return None - */ - void ConstructL(TResourceReader& aReader, - TSize aBitmapSize, - TSize aExpandSize, - TSize aSpinBtnSize); - - // txin - void CreateIconL(const TDesC& aBmpFileName, - TAknsItemID aId, - CFbsBitmap** aBmp, - CFbsBitmap** aMaskBmp, - TInt aBmpId, - TInt aMaskBmpId, - TSize aSize, - TBool aColorIcon); - // end - -private: // Data - - /** - * the bitmap array - */ - RPointerArray iBmpList; - - /** - * the text color of drop down list - */ - TRgb iTextColor; - - /** - * the frame color of drop down list - */ - TRgb iFrameColor; - }; - -#endif // C_BITMAPDB_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputcandidate.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputcandidate.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: candidate stands for every cell in drop down list -* -*/ - - -#ifndef C_CANDIDATE_H -#define C_CANDIDATE_H - -#include -#include - -// class forward decalaration -class CFont; -class MFepCtrlDropdownListContext; - -/** - * The following class packs the info and operation of every cell - * - * the class encapsulates all properties and methods of the cell which - * is the basic unit the drop down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CCandidate) : public CBase - { - -public: - - static CCandidate* NewL(const TDesC& aString, - MFepCtrlDropdownListContext* aOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CCandidate(); - - /** - * Get Candidate - * - * @since S60 v3.2 - * @param aString Candidate string - * @return Candidate string - */ - const TDesC& GetCandidate(); - - /** - * Get rectangle of the candidate - * - * @since S60 v3.2 - * @return Rectangle occupied by candidate string. - */ - const TRect& GetRect() const; - - - /** - * Move rectangle of the candidate - * - * @since S60 v3.2 - * @return None. - */ - void Move(const TPoint& aOffsetPoint); - - /** - * Set position of the candidate rectangle - * - * @since S60 v3.2 - * @param aLeftTopPosition the left top point - * @param aWidthForOneUnit the width of one cell - * @param aHeight the height of one cell - * @param aTextFont the font which will be used for draw text - * @return the columns the cell occupies. - */ - TInt SetPositionL(const TPoint& aLeftTopPosition, - TInt aWidthForOneUnit, - TInt aHeight, - const CFont* aTextFont, - TInt aCellHorizontalMargin); - - /** - * draw the text for the candidate - * - * @since S60 v3.2 - * @param aGc graphics context - * @param aAlignment the alighment style, can be any of ECenter, ELeft, ERight - * @param aTextColor the color for the text - * @param aSpecialTextColor the color for special text - * @param aFixedText the fixed text, it has default value of KNullDesC16 - * @return the columns the cell occupies. - */ - virtual void DrawText(CFbsBitGc& aGc, - const CGraphicsContext::TTextAlign aAlignment, - const TInt aTextMargin, - TRgb aTextColor, - TRgb aSpecialTextColor, - const TDesC& aFixedText = KNullDesC16); - - TInt CalculateDisplayTextL(const TInt aWidthForOneUnit, - const CFont* aTextFont, - TInt aColNum); -private: // Method - /** - * Constructor - * - * @since S60 v3.2 - * @param aString Candidate string - */ - CCandidate(const TDesC& aString, MFepCtrlDropdownListContext* aOwner); - void ConstructL(); - /** - * draw the text for the candidate - * - * @since S60 v3.2 - * @param aWidthForOneUnit the width of one cell - * @param aTextFont the font which will be used for drawing the text - * @return the columns the cell occupies. - */ - TInt CalculateCells(const TInt aWidthForOneUnit, - const CFont* aTextFont, - const TDesC& aText); - -// TInt CalculateDisplayTextL(const TInt aWidthForOneUnit, -// const CFont* aTextFont, -// TInt aColNum); - -private: // Data - - /** - * the candidate text - */ - const TDesC& iCandidate; - // used when candidate may be truncated - HBufC* iDisplayText; - - /** - * the baseline offset used for drawing the text - */ - TInt iBaselineOffset; - - /** - * the rectangle of the candidate - */ - TRect iRect; - - /** - * the font which will be used for drawing the text - * Not own. - */ - const CFont* iTextFont; - - // not own - MFepCtrlDropdownListContext* iOwner; - }; - -#endif // C_CANDIDATE_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputdropdownlist.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputdropdownlist.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1418 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: drop-down list control -* -*/ - - -#ifndef C_CFEPCTRLDROPDOWNLIST_H -#define C_CFEPCTRLDROPDOWNLIST_H - -// INCLUDES -#include -#include -#include -#include -#include -#include - - -/** class forward decalaration */ -class CCandidate; -class CPages; -class CBitmapDb; -class CListManager; -class MEventObserver; -class CBubbleCtrl; -class TAknTextLineLayout; - -/** The max length for fixed text */ -const TInt KMaxFixedTextNumber = 32; -const TInt KDropDownListCtrlType = EUserCtrlBase | ECtrlBaseCtrl; - -/** - * The interface dealing with outer event from any control except the list - * - * The interface dealing with outer event from any control except the list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -class MListEventHandler - { - -public: - - /** - * The method will be called when there is event from any control except from the list - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The control who sends out the event - * @param aEventData The data relative with the event - */ - virtual void HandleListOuterEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData); - - }; - -/** - * The drop-down list control - * - * The drop-down list control - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -class CFepCtrlDropdownList : public CFepUiBaseCtrl, - public MFepCtrlDropdownListContext, - public MEventObserver - { - -public: // internal type definition - /** - * The type of list, expandable or no-expandable - * - * The type of list, expandable or no-expandable - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ - enum TListType - { - EListExpandable, - EListExpandableWithBubble, - EListNoExpandable, - EListNoExpandableWithBubble, - EListExpandableWithoutIcon, - EListExpandableRollWithIcon, - EListExpandableRollWithIconWithBubble, - EListExpandableMultiRowWithoutIcon - }; - - enum TCandTruncateType - { - // beginning part of candidate are hide - ECandTruncateFromBeginning, - // end part of candidate are shown as ellipsis - ECandTruncateAsEllipsis, - // end part of candidate are hide - ECandTruncateFromEnd - }; - - enum TExpandType - { - ECandExpandUpward, - ECandExpandDownward - }; - - // horizontal direction of candidate list: shrink and expanded - enum THDirection - { - ECandFromLToR, - ECandFromRToL - }; - -public: //Method - - /** - * Destructor - * - * @since S60 v3.2 - * @return None. - */ - IMPORT_C virtual ~CFepCtrlDropdownList(); - - /** - * Create one CFepCtrlDropdownList object - * - * @since S60 v3.2 - * @param aTopLeftPoint The top left point of the drop down list - * @param aUiLayout The layout plugin - * @param aControlId This control ID - * @param aReader The reader from which the bitmaps ID can be read - * @param aCellWidth The width of one basic cell - * @param aCellHeight The height of one basic cell - * @param aNaviWidth The width of navidation - * @param aColNum The number of columns in one row - * @param aRowNum The number of rows - * @param aFont The font used to draw the text - * @param aHandler The handle which will deal with outer event to this control - * @param aAlignment The alighment used to draw text - * @param aTextMargin if alignment is not ECenter, the margin is used - * @param aBorderColor The color of border - * @param aBgColor The color of background - * @param aNavigationBgColor The background color of navigation area - * @param aTextColor The color of text - * @param aSpecialTextColor The color of special text - * @param aHighLightTextColor The color of highlight text - * @param aHighLightBgColor The background color of high light - * @param aButtonDownBgColor The background color when button pressing - * @return The CFepCtrlDropdownList object. - */ - IMPORT_C static CFepCtrlDropdownList* NewL(const TPoint& aTopLeftPoint, - CFepUiLayout* aUiLayout, - TInt aControlId, - TResourceReader& aReader, - const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TInt aColNum, - const TInt aRowNum, - const CFont* aFont = NULL, - MListEventHandler* aHandler = NULL, - const CGraphicsContext::TTextAlign aAlignment = CGraphicsContext::ECenter, - const TInt aTextMargin = 3, - const TRgb aBorderColor = KRgbBlack, - const TRgb aBgColor = TRgb(0xeeeeee), - const TRgb aNavigationBgColor = TRgb(0xeeeeee), - const TRgb aTextColor = KRgbBlack, - const TRgb aSpecialTextColor = KRgbBlack, - const TRgb aHighLightTextColor = KRgbBlack, - const TRgb aHighLightBgColor = TRgb(0xcccccc), - const TRgb aButtonDownBgColor = KRgbGray); - IMPORT_C static CFepCtrlDropdownList* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aResId, - TPoint aTopLeftPoint, - TSize aCellSize, - TInt aColNum, - TInt aRowNum); - - IMPORT_C static CFepCtrlDropdownList* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aResId, - TPoint aTopLeftPoint, - const CFont* aFont, - TSize aCellSize, - TInt aNaviWidth, - TInt aColNum, - TInt aRowNum, - TInt aSpinBtnHeight, - TInt aHorizontalCellMargin = 0, - TInt aVerticalCellMargin = 0, - THDirection aDirection = ECandFromLToR, - TBool aPageShown = ETrue); - - /** - * Create one CFepCtrlDropdownList object, need to pop up yourself - * - * @since S60 v3.2 - * @param aTopLeftPoint The top left point of the drop down list - * @param aUiLayout The layout plugin - * @param aControlId This control ID - * @param aReader The reader from which the bitmaps ID can be read - * @param aCellWidth The width of one basic cell - * @param aCellHeight The height of one basic cell - * @param aNaviWidth The width of navidation - * @param aColNum The number of columns in one row - * @param aRowNum The number of rows - * @param aFont The font used to draw the text - * @param aHandler The handle which will deal with outer event to this control - * @param aAlignment The alighment used to draw text - * @param aTextMargin if alignment is not ECenter, the margin is used - * @param aBorderColor The color of border - * @param aBgColor The color of background - * @param aNavigationBgColor The background color of navigation area - * @param aTextColor The color of text - * @param aSpecialTextColor The color of special text - * @param aHighLightTextColor The color of highlight text - * @param aHighLightBgColor The background color of high light - * @param aButtonDownBgColor The background color when button pressing - * @return The CFepCtrlDropdownList object. - */ - IMPORT_C static CFepCtrlDropdownList* NewLC(const TPoint& aTopLeftPoint, - CFepUiLayout* aUiLayout, - TInt aControlId, - TResourceReader& aReader, - const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TInt aColNum, - const TInt aRowNum, - const CFont* aFont = NULL, - MListEventHandler* aHandler = NULL, - const CGraphicsContext::TTextAlign aAlignment = CGraphicsContext::ECenter, - const TInt aTextMargin = 3, - const TRgb aBorderColor = KRgbBlack, - const TRgb aBgColor = TRgb(0xeeeeee), - const TRgb aNavigationBgColor = TRgb(0xeeeeee), - const TRgb aTextColor = KRgbBlack, - const TRgb aSpecialTextColor = KRgbBlack, - const TRgb aHighLightTextColor = KRgbBlack, - const TRgb aHighLightBgColor = TRgb(0xcccccc), - const TRgb aButtonDownBgColor = KRgbGray); - - /** - * Size change function - * - * @since S60 v3.2 - * @param aCellWidth The width of one basic cell - * @param aCellHeight The height of one basic cell - * @param aNaviWidth The width of navidation - * @param aTopLeftPoint The top left point of the drop down list - * @param aColNum The number of columns in one row - * @param aRowNum The number of rows - * @return None. - */ - IMPORT_C void SizeChanged(const TInt aCellWidth, const TInt aCellHeight, - const TInt aNaviWidth, const TPoint aTopLeftPoint = TPoint(0,0), - const TInt aColNum = 0, const TInt aRowNum = 0); - - /** - * Set top left point of the list - * - * @since S60 v3.2 - * @param aTopLeftPoint The top left point of the drop down list - * @return None. - */ - IMPORT_C void SetTopLeftPoint(const TPoint aTopLeftPoint); - - /** - * Set the width of one basic cell - * - * @since S60 v3.2 - * @param aCellWidth The width of one basic cell - * @return None. - */ - IMPORT_C void SetCellWidth(const TInt aCellWidth); - - /** - * Set the height of one basic cell - * - * @since S60 v3.2 - * @param aCellHeight The height of one basic cell - * @return None. - */ - IMPORT_C void SetCellHeight(const TInt aCellHeight); - - /** - * Set width of navigation - * - * @since S60 v3.2 - * @param aNaviWidth The width of navidation - * @return None. - */ - IMPORT_C void SetNaviWidth(const TInt aNaviWidth); - IMPORT_C void SetSpinBtnHeight(const TInt aHeight); - IMPORT_C void SetCellMargin(const TInt aHorizontalMargin, const TInt aVerticalMargin); - - /** - * Set column numbers - * - * @since S60 v3.2 - * @param aColNum The number of columns in one row - * @return None. - */ - IMPORT_C void SetColNum(const TInt aColNum); - - /** - * Set or unset highlight for cells. - * - * @since S60 v3.2 - * @param aCellIndex Which cell would be set - * @param aHighlight The flag of highlight, set highlight if ETrue, otherwise cancel highlight - * @return None. - */ - IMPORT_C void SetHighlightCell(const TInt aCellIndex, TBool aHighlight = ETrue, - const TBool aIsDraw = ETrue ); - - - /** - * Set row numbers - * - * @since S60 v3.2 - * @param aRowNum The number of rows - * @return None. - */ - IMPORT_C void SetRowNum(const TInt aRowNum); - - /** - * Set border color - * - * @since S60 v3.2 - * @param aBorderColor The border color - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetBorderColor(TRgb aBorderColor, TBool aReDraw = EFalse); - - /** - * Set background color for the whole area - * - * @since S60 v3.2 - * @param aBgColor The background color - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetBgColor(TRgb aBgColor, TBool aReDraw = EFalse); - - /** - * Set background for navigation area - * - * @since S60 v3.2 - * @param aNavigationBgColor The background color of navigation area - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetNavigationBgColor(TRgb aNavigationBgColor, TBool aReDraw = EFalse); - - /** - * Set text color - * - * @since S60 v3.2 - * @param aTextColor The color used to draw text - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetTextColor(TRgb aTextColor, TBool aReDraw = EFalse); - - /** - * Set color for special text - * - * @since S60 v3.2 - * @param aSpecialTextColor The color used to draw special text - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetSpecialTextColor(TRgb aSpecialTextColor, TBool aReDraw = EFalse); - - /** - * Set color for high light text - * - * @since S60 v3.2 - * @param aHighLightTextColor The color used to draw high light text - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetHighLightTextColor(TRgb aHighLightTextColor, TBool aReDraw = EFalse); - - /** - * Set background color for highlight - * - * @since S60 v3.2 - * @param aHighLightBgColor The background color of high light area - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetHighLightBgColor(TRgb aHighLightBgColor, TBool aReDraw = EFalse); - - /** - * The method will be called when there is event from any control except from the list - * - * @since S60 v3.2 - * @param aFont The font used to draw text - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetFont(const CFont* aFont, TBool aReDraw = EFalse); - - /** - * Set text alignment - * - * @since S60 v3.2 - * @param aAlignment The alignment used to draw text - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetTextAlighment(const CGraphicsContext::TTextAlign aAlignment, - TBool aReDraw = EFalse); - - /** - * Set text margin if alignment is not ECenter - * - * @since S60 v3.2 - * @param aTextMargin the margin used to draw text - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetTextMargin(const TInt aTextMargin, TBool aReDraw = EFalse); - - /** - * set secondary list - * - * @since S60 v3.2 - * @param aIndex the cell index need to set new color - * @param aBgColor The background color - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void SetSecondaryList(RArray& aIndexList, TBool aReDraw = EFalse); - - /** - * Set event handler when there is out event coming - * - * @since S60 v3.2 - * @param aHandler The event handler, which has implemented the interface of MListEventHandler - * @return None. - */ - IMPORT_C void SetListEventHandler(MListEventHandler* aHandler); - - /** - * Set event id when candidate is selected - * - * @since S60 v3.2 - * @param aEventId The event id when candidate is selected - * @return The CListMultiRowWithIcon pointer. - */ - IMPORT_C void SetEventIdForCandidateSelected(TInt aEventId); - - /** - * Set event id when need to get next page candidate - * - * @since S60 v3.2 - * @param aEventId The event id need next page candidate - * @return None - */ - IMPORT_C void SetEventIdForNextPageCandidate(TInt aEventId); - - /** - * Set event id when need to get previous page candidate - * - * @since S60 v3.2 - * @param aEventId The event id need previous page candidate - * @return None - */ - IMPORT_C void SetEventIdForPreviousPageCandidate(TInt aEventId); - - /** - * Set event id when need to judge if candidate exist - * - * @since S60 v3.2 - * @param aEventId The event id judge if candidate exist - * @return None - */ - IMPORT_C void SetEventIdForCandidateExisted(TInt aEventId); - - /** - * Set candidates for the list - * - * @since S60 v3.2 - * @param aCandidates the candidates array - * @param aListType The list type used when redraw - * @param aFixedText The fixed text(only used in English) - * @return None. - */ - IMPORT_C void SetCandidatesL(const RPointerArray& aCandidates, - const TListType aListType = EListExpandable, - const TDesC& aFixedText = KNullDesC16); - - IMPORT_C void SetCandTruncateType( - const TCandTruncateType aTruncateType = ECandTruncateFromEnd); - - /** - * Add candidates for the list - * - * @since S60 v3.2 - * @param aCandidates the candidates array - * @param aListType The list type used when redraw - * @return None. - */ - IMPORT_C void AddCandidatesL(const RPointerArray& aCandidates, - const TListType aListType = EListExpandable); - - /** - * Reset and clear all candidates in the list and redraw the list - * - * @since S60 v3.2 - * @param aListType The list type used when redraw - * @return None. - */ - IMPORT_C void ResetAndClear(const TListType aListType = EListNoExpandable); - - - /** - * Fold the expanding list - * - * @since S60 v3.2 - * @return None. - */ - IMPORT_C void FoldList(); - -// from base class CFepUiBaseCtrl - - /** - * Draw the list - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - /** - * Active the control - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void SetActive(TBool aActiveFlag); - - /** - * Get rect of the drop down list - * - * @since S60 v3.2 - * @return The rect of the drop down list - */ - IMPORT_C const TRect& Rect(); - - /** - * Handle pointer down event - * - * @since S60 v3.2 - * @param aPoint The point position relative the layout - */ - IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); - - /** - * Handle pointer move event - * - * @since S60 v3.2 - * @param aPoint The point position relative the layout - */ - IMPORT_C CFepUiBaseCtrl* HandlePointerMoveEventL(const TPoint& aPoint); - - /** - * Handle pointer up event - * - * @since S60 v3.2 - * @param aPoint The point position relative the layout - */ - IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); - - /** - * Handle pointer leave event - * - * @since S60 v3.2 - * @param aPoint The point position relative the layout - */ - IMPORT_C void HandlePointerLeave(const TPoint& aPoint); - -// from interface MEventObserver - - /** - * Handle event - * @since Series 60 3.1 - * @param aEventType The event type - * @param aCtrl The control who sends the event - * @param aEventData The event data - * @return None - */ - IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData); - -// from base class CFepUiBaseCtrl - - /** - * Move the drop down list - * @since Series 60 3.1 - * @param aOffset The offset point - * @return None - */ - IMPORT_C void Move(const TPoint& aOffset); - - /** - * Hide the control - * @since Series 60 3.1 - * @return None - */ - IMPORT_C void OnDeActivate(); - - /** - * Hide or show dropdown list. - * - * @param aFlag ETrue if want to hide the control. - */ - IMPORT_C void Hide( TBool aFlag ); - -// from interface MContext - - /** - * Get the candidate count - * - * @since S60 v3.2 - * @return the candidate count. - */ - IMPORT_C TInt CandidateCount() const; - - /** - * Enable multi color or not - * - * @since S60 v3.2 - * @param aEnable Enable mutil color if ETrue, otherwise disable - * @param aReDraw Redraw if ETrue, otherwise not redraw - * @return None. - */ - IMPORT_C void EnableSecondary(TBool aEnable, TBool aReDraw = EFalse); - - /** - * Get the flag of enable or disable multi color - * - * @since S60 v3.2 - * @return ETrue if enable, or EFalse. - */ - IMPORT_C TBool IsEnableSecondary() const; - - /** - * This function creates drop down list from resource, before calling - * this function, caller should set resource id of drop down list first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * Get secondary list - * - * @since S60 v3.2 - * @return color array. - */ - const RArray& GetSecondaryList() const; - - /** - * Draw mask for the appointed rect - * @since Series 60 3.1 - * @param aRect The rect which will be redrawn - * @return None - */ - void DrawMask(TRect aRect); - - /** - * Active bitmap context - * @since Series 60 3.1 - * @return None - */ - void ActivateBitmapContext(); - - /** - * Get the graphics context - * @since Series 60 3.1 - * @return The graphics context - */ - CFbsBitGc* Gc(); - - /** - * Get the first candidate visible - * - * @since S60 v3.2 - * @return The first candidate index. - */ - TInt GetFirstCandidateIndex(); - - /** - * Get the first candidate visible - * - * @since S60 v3.2 - * @return The last candidate index. - */ - TInt GetLastCandidateIndex(); - - /** - * Set the first candidate visible - * - * @since S60 v3.2 - * @return None. - */ - void SetFirstCandidateIndex(TInt aFirstIndex); - - /** - * Set the first candidate visible - * - * @since S60 v3.2 - * @return None. - */ - void SetLastCandidateIndex(TInt aLastIndex); - - /** - * Get the appointed candidate - * @since Series 60 3.1 - * @param aIndex The index which will be check out - * @return The appointed candidate - */ - CCandidate* GetCandidate(TInt aIndex); - - /** - * Get top left point - * @since Series 60 3.1 - * @return The top left point - */ - TPoint GetTopLeftPoint(); - - /** - * Get cell width - * @since Series 60 3.1 - * @return The cell width - */ - TInt GetCellWidth(); - - /** - * Get cell height - * @since Series 60 3.1 - * @return The cell height - */ - TInt GetCellHeight(); - - /** - * Get navigation width - * @since Series 60 3.1 - * @return The navigation width - */ - TInt GetNaviWidth(); - - TInt GetSpinBtnHeight(); - TInt GetCellHorizontalMargin(); - TInt GetCellVerticalMargin(); - TInt ListType(); - TInt OneRowStartCandIdx(); - void SetOneRowStartCandIdx(TInt aOriginalCandIdx); - TInt GetOriginalFirstCandIdx(); - void SetOriginalFirstCandIdx(TInt aOriginalFirstCandIdx); - TInt CandTruncateType(); - CList* ActiveList(); - void SetUpdateListReDrawFlag(TBool aReDraw); - TBool GetUpdateListRedrawFlag(); - IMPORT_C void SetFuzzyBoundry(TInt aFuzzyBoundry); - TInt FuzzyBoundry(); - TInt CandExpandType(); - IMPORT_C void SetCandExpandType(const TExpandType aType = ECandExpandDownward); - TInt CandHDirection(); - inline void SetHDirection(const THDirection aDirection = ECandFromLToR); - - // when drop down list is expandable, decide pageup/pagedown shown or not - TBool PageCtrlShown(); - inline void SetPageCtrlShown(TBool aShown = ETrue); - - /** - * Get columns number - * @since Series 60 3.1 - * @return The top left point - */ - TInt GetColNum(); - - /** - * Get rows number - * @since Series 60 3.1 - * @return The top left point - */ - TInt GetRowNum(); - - /** - * Get the font used to draw text - * @since Series 60 3.1 - * @return The font used to draw text - */ - const CFont* GetFont(); - - /** - * Get alignment used to draw the text - * @since Series 60 3.1 - * @return The alignment used to draw the text - */ - CGraphicsContext::TTextAlign GetAlignment(); - - /** - * Get text margin used to draw the text - * @since S60 v3.2 - * @return The margin used to draw the text - */ - TInt GetTextMargin(); - - /** - * Get background color - * @since Series 60 3.1 - * @return The background color - */ - TRgb GetBgColor(); - - /** - * Get button down color - * @since Series 60 3.1 - * @return The background color - */ - TRgb GetButtonDownBgColor(); - - /** - * Get border color - * @since Series 60 3.1 - * @return The border color - */ - TRgb GetBorderColor(); - - /** - * Get text color - * @since Series 60 3.1 - * @return The text color - */ - TRgb GetTextColor(); - - /** - * Get background color for highlight area - * @since Series 60 3.1 - * @return The background color for highlight area - */ - TRgb GetHighLightBgColor(); - - /** - * Get high light text color - * @since Series 60 3.1 - * @return The high light text color - */ - TRgb GetHighLightTextColor(); - - /** - * Get special text color - * @since Series 60 3.1 - * @return The special text color - */ - TRgb GetSpecialTextColor(); - - /** - * Get fixed text - * @since Series 60 3.1 - * @return The fixed text - */ - TDesC GetFixedText(); - - /** - * Get highlight cell list - * @since Series 60 3.1 - * @return The highlight cell list - */ - const RArray& GetHighlightList() const; - - /** - * Get page manager - * @since Series 60 3.1 - * @return The page manager - */ - CPages* GetPages(); - - /** - * Get bitmap manager - * @since Series 60 3.1 - * @return The bitmap manager - */ - CBitmapDb* GetBitmapDb(); - - /** - * Report event when candidate is selected - * @since Series 60 3.1 - * @param aCandidate The candidate string - * @param aSelectedIndex The index of the selected candidate - * @return None - */ - void ReportCandidateSelectEventL(const TDesC& aCandidate, const TInt aSelectedIndex); - - /** - * Invalidate some rect and redraw it - * @since Series 60 3.1 - * @param aRect The rect which will be redrawn - * @param aUpdateAll Update all or not - * @return None - */ - void Invalidate(const TRect& aRect,TBool aUpdateAll = EFalse); - - /** - * Change active list - * - * @since S60 v3.2 - * @param aList The new active list - * @param aLastIndex The last visible candidate index - * @return None. - */ - void ChangeActiveList(CList* aList, TInt aLastIndex = 0); - - /** - * Get pen size - * - * @since S60 v3.2 - * @return The pen size. - */ - const TSize GetPenSize(); - - /** - * Set pointer capture - * - * @since S60 v3.2 - * @param aFlag ETrue to capture pointer, otherwise EFalse - * @return None. - */ - void SetCapture(TBool aFlag); - - /** - * Notify get next candidate page - * - * @since S60 v3.2 - * @return None. - */ - void NotifyGetNextPage(); - - /** - * Notify get previous candidate page - * - * @since S60 v3.2 - * @return None. - */ - void NotifyGetPreviousPage(); - - /** - * Notify close candidate page - * - * @since S60 v3.2 - * @return None. - */ - void NotifyClosePage(); - - /** - * Set flag of if next candidate after last page eixsted - * - * @since S60 v3.2 - * @param aFlag ETrue if candidate exist, otherwise EFalse - * @return None - */ - IMPORT_C void SetFlagCandidateExist(TBool aFlag); - - /** - * Judge if next candidate existed - * - * @since S60 v3.2 - * @return ETrue if candidate exist, otherwise EFalse - */ - TBool NextCandidateExist(); - - /** - * Auto change active list - * - * @since S60 v3.2 - * @param aLastIndex The last visible candidate index - * @return None. - */ - void AutoChangeActiveList( TInt aLastIndex = 0 ); - - /** - * Set dropdown list image ID - * - * @since S60 v3.2 - * @param TDropdownListDrawInfo image information - * @return None. - */ - IMPORT_C void SetDropdownListImgID(TDropdownListDrawInfo aDropdownListDrawInfo); - - /** - * Show preview bubble - * - * @since S60 v3.2 - * @param aFlag Show/Hide flag - * @return None. - */ - IMPORT_C void ShowBubble(TBool aFlag); - - /** - * Set bubble bitmap param - * - * @since S60 v3.2 - * @param aBmpId - * @param aMaskBmpId - * @param aBgSkinId - * @return None. - */ - IMPORT_C void SetBubbleBitmapParam(CFbsBitmap* aBmpId, - CFbsBitmap* aMaskBmpId , - TAknsItemID aBgSkinId ); - - /** - * Set bubble text font - * - * @since S60 v3.2 - * @param aFont Text font - * @return None. - */ - IMPORT_C void SetBubbleTextFont(const CFont* aFont); - - /** - * Set bubble text format - * - * @since S60 v3.2 - * @param aTextFormat Text format - * @return None. - */ - IMPORT_C void SetTextFormat(TAknTextLineLayout aTextFormat); - - /** - * Set bubble text format - * - * @since S60 v3.2 - * @param aLeftDiff - * @param aTopDiff - * @param aRightDiff - * @param aBottomDiff - * @return None. - */ - IMPORT_C void SetFrameDiff(TInt aLeftDiff, TInt aTopDiff, - TInt aRightDiff,TInt aBottomDiff); - - /** - * Set bubble size - * - * @since S60 v3.2 - * @param aSize - * @return None. - */ - IMPORT_C void SetBubbleSize(const TSize& aSize); - - /** - * show preview bubble - * - * @since S60 v3.2 - * @param aRect - * @param aText - * @return None. - */ - void DrawBubble(const TRect aRect, const TDesC& aText); - - /** - * Hide preview bubble - * - * @since S60 v3.2 - * @return None. - */ - void ClearBubble(); - - /** - * ReDraw preview bubble - * - * @since S60 v3.2 - * @return None. - */ - void ReDrawBubble(); - - CFepUiLayout* UiLayout(); - - /** - * Redraw dropdown list - * - * @since S60 v3.2 - * @param aRect Redraw rect. - * @return None. - */ - IMPORT_C void ReDrawRect(const TRect& aRect); -protected: - - /** - * Constructor - * - * @since S60 v3.2 - * @param aTopLeftPoint The top left point of the drop down list - * @param aUiLayout The layout plugin - * @param aControlId This control ID - * @param aReader The reader from which the bitmaps ID can be read - * @param aCellWidth The width of one basic cell - * @param aCellHeight The height of one basic cell - * @param aNaviWidth The width of navidation - * @param aColNum The number of columns in one row - * @param aRowNum The number of rows - * @param aFont The font used to draw the text - * @param aHandler The handle which will deal with outer event to this control - * @param aAlignment The alignment used to draw text - * @param aTextMargin if alignment is not ECenter, the margin is used - * @param aBorderColor The color of border - * @param aBgColor The color of background - * @param aNavigationBgColor The background color of navigation area - * @param aTextColor The color of text - * @param aSpecialTextColor The color of special text - * @param aHighLightTextColor The color of highlight text - * @param aHighLightBgColor The background color of high light - * @param aButtonDownBgColor The background color when button pressing - */ - CFepCtrlDropdownList(const TPoint& aTopLeftPoint, - CFepUiLayout* aUiLayout, - TInt aControlId, - const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TInt aColNum, - const TInt aRowNum, - const CFont* aFont, - MListEventHandler* aHandler, - const CGraphicsContext::TTextAlign aAlignment, - const TInt aTextMargin, - const TRgb aBorderColor, - const TRgb aBgColor, - const TRgb aNavigationBgColor, - const TRgb aTextColor, - const TRgb aSpecialTextColor, - const TRgb aHighLightTextColor, - const TRgb aHighLighttBgColor, - const TRgb aButtonDownBgColor); - - CFepCtrlDropdownList(CFepUiLayout* aUiLayout, - TInt aControlId, - TPoint aTopLeftPoint, - TSize aCellSize, - TInt aColNum, - TInt aRowNum); - - CFepCtrlDropdownList(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aResId, - TPoint aTopLeftPoint, - const CFont* aFont, - TSize aCellSize, - TInt aNaviWidth, - TInt aColNum, - TInt aRowNum, - TInt aSpinBtnHeight, - TInt aHorizontalCellMargin, - TInt aVerticalCellMargin, - THDirection aDirection, - TBool aPageShown); - - - - /** - * 2nd construct function - * @since Series 60 3.1 - * @param aTopLeftPoint The top left point - * @param aReader The reader from which the bitmaps ID can be read - * @return None - */ - void ConstructL(const TPoint& aTopLeftPoint, TResourceReader& aReader); - - void ConstructL(TPoint aTopLeftPoint, TInt aResId); - -private: - - /** - * The list manager - * Not own - */ - CListManager* iListManager; - - /** - * The bitmap database - * Own - */ - CBitmapDb* iBitmapDb; - - /** - * The pages manager - * Own - */ - CPages* iPages; - - /** - * The candidate list - * Own - */ - RPointerArray iCandidatelist; - - /** - * The candidate color list - * Own - */ - RArray iSecondaryList; - - /** - * The high light list - * Own - */ - RArray iHighlightList; - - /** - * The flag of multi color enable or disable - */ - TBool iEnableSecondary; - - /** - * The first candidate index in the list - */ - TInt iFirstCandidateIndex; - - /** - * The last candidate index in the list - */ - TInt iLastCandidateIndex; - - /** - * The font used to draw the text - * Own - */ - const CFont* iFont; - - const CFont* iBubbleFont; - - /** - * Cell width - */ - TInt iCellWidth; - - /** - * Cell height - */ - TInt iCellHeight; - - /** - * navigation width - */ - TInt iNaviWidth; - - TInt iSpinBtnHeight; - TInt iCellHorizontalMargin; - TInt iCellVerticalMargin; - TInt iOriginalCandIdx; - TInt iOriginalFirstCandIdx; - TBool iUpdateListReDraw; - - /** - * alignment used to draw the text - */ - CGraphicsContext::TTextAlign iAlignment; - - /** - * the margin used to draw the text if alignment is not ECenter - */ - TInt iTextMargin; - - /** - * The columns number - */ - TInt iColNum; - - /** - * The rows number - */ - TInt iRowNum; - - /** - * The border color - */ - TRgb iBorderColor; - - /** - * The background color of the whole list - */ - TRgb iBgColor; - - /** - * The navigation background color - */ - TRgb iNavigationBgColor; - - /** - * The text color - */ - TRgb iTextColor; - - /** - * The special text color - */ - TRgb iSpecialTextColor; - - /** - * The highlight text color - */ - TRgb iHighLightTextColor; - - /** - * The background color of highlight area - */ - TRgb iHighLightBgColor; - - /** - * The background color when button down - */ - TRgb iButtonDownBgColor; - - /** - * The top left point the list - */ - TPoint iTopLeftPoint; - - /** - * The fixed text - */ - TBuf iFixedText; - - /** - * The event ID for candidate selected - */ - TInt iEventIdForCandidateSelected; - - /** - * The event ID for next page candidate - */ - TInt iEventIdForNextPageCandidate; - - /** - * The event ID for previous page candidate - */ - TInt iEventIdForPreviousPageCandidate; - - /** - * The event ID for judge if candidate existed - */ - TInt iEventIdForCandidateExisted; - - /** - * The event handler when out event coming - * Not own - */ - MListEventHandler* iListEventHandler; - - /** - * The first time construct flag of drop down list - */ - TBool iFirstTimeConstruct; - - /** - * The flag to indicate that candidate existed or not at given position - */ - TBool iCandidateExisted; - - /** - * The type of drop down list. - */ - TListType iListType; - - TCandTruncateType iCandTruncateType; - - TInt iFuzzyBoundry; - - TExpandType iCandExpandType; - - THDirection iCandHDirection; - - TBool iPageCtrlShown; - - CBubbleCtrl* iBubbleCtrl; - - TBool iIsShowBubble; - - TSize iBubbleSize; - - TInt iBubbleVerticalMargin; - }; - -#endif // C_CFEPCTRLDROPDOWNLIST_H - -inline void CFepCtrlDropdownList::SetHDirection(const THDirection aDirection) - { - iCandHDirection = aDirection; - } - -inline void CFepCtrlDropdownList::SetPageCtrlShown(TBool aShown) - { - iPageCtrlShown = aShown; - } -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputdropdownlist.rh --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputdropdownlist.rh Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project FEP control -* -*/ - - -#ifndef FEP_CTRL_DROP_DOWN_LIST_RH -#define FEP_CTRL_DROP_DOWN_LIST_RH - -// INCLUDES -#include - -// STRUCTURE DEFINITIONS - -// ----------------------------------------------------------------------------- -// FEP_CTRL_DROP_DOWN_LIST_IMSGE -// Resource definition for dropdownlist -// ----------------------------------------------------------------------------- -// -STRUCT FEP_CTRL_DROP_DOWN_LIST_IMAGE - { - // mbm file name - LTEXT bmpfile=""; - - LONG imgmajorskinid=0xffff; - - // list bg - WORD bmpListBg=0xffff; - WORD bmpListBgMask=0xffff; - WORD bmpListBgskinid=0xffff; - - // primary bg - WORD bmpPrimary=0xffff; - WORD bmpPrimaryMask=0xffff; - WORD bmpPrimaryskinid=0xffff; - - // secondary mask bg - WORD bmpSecondary=0xffff; - WORD bmpSecondaryMask=0xffff; - WORD bmpSecondaryskinid=0xffff; - - // highlight bg - WORD bmpHighlight=0xffff; - WORD bmpHighlightMask=0xffff; - WORD bmpHighlightskinid=0xffff; - - // pen down bg - WORD bmpPenDown=0xffff; - WORD bmpPenDownMask=0xffff; - WORD bmpPenDownskinid=0xffff; - - // disable bitmap - WORD bmpNextDisable=0xffff; - WORD bmpNextDisableMask=0xffff; - WORD bmpNextDisableskinid=0xffff; - - // bitmap - WORD bmpNext=0xffff; - WORD bmpNextMask=0xffff; - WORD bmpNextskinid=0xffff; - - // bitmap - WORD bmpNextPress=0xffff; - WORD bmpNextPressMask=0xffff; - WORD bmpNextPressskinid=0xffff; - - // bitmap - WORD bmpClose=0xffff; - WORD bmpCloseMask=0xffff; - WORD bmpCloseskinid=0xffff; - - // bitmap - WORD bmpClosePress=0xffff; - WORD bmpClosePressMask=0xffff; - WORD bmpClosePressskinid=0xffff; - - // bitmap - WORD bmpPrevious=0xffff; - WORD bmpPreviousMask=0xffff; - WORD bmpPreviousskinid=0xffff; - - // bitmap - WORD bmpPreviousPress=0xffff; - WORD bmpPreviousPressMask=0xffff; - WORD bmpPreviousPressskinid=0xffff; - - WORD bmpExpand=0xffff; - WORD bmpExpandMask=0xffff; - WORD bmpExpandskinid=0xffff; - - WORD bmpExpandPress=0xffff; - WORD bmpExpandPressMask=0xffff; - WORD bmpExpandPressskinid=0xffff; - - // text color - LONG colormajorskinid=0xffff; - WORD textcolorgrp=0xffff; - WORD textcoloridx=0xffff; - - // border color - LONG bordercolormajorskinid=0xffff; - WORD bordercolorgrp=0xffff; - WORD bordercoloridx=0xffff; - } - -#endif // FEP_CTRL_DROP_DOWN_LIST_IMSGE - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputdropdownlistcontext.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputdropdownlistcontext.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,465 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: context for list -* -*/ - - -#ifndef M_DROP_DOWN_LIST_CONTEXT_H -#define M_DROP_DOWN_LIST_CONTEXT_H - -#include -#include -#include - -class CCandidate; -class CPages; -class CBitmapDb; -class CList; - -struct TDropdownListDrawInfo - { - TAknsItemID iInactiveBtnImgID; - TAknsItemID iNormalBtnImgID; - TAknsItemID iPressedBtnImgID; - - TAknsItemID iCandidateLeftImgID; - TAknsItemID iCandidateMiddleImgID; - TAknsItemID iCandidateRightImgID; - - TAknsItemID iCandidatePressedLeftImgID; - TAknsItemID iCandidatePressedMiddleImgID; - TAknsItemID iCandidatePressedRightImgID; - - TRgb iCandidatesHighlightColor; - - TBool iSupportSkin; - - TDropdownListDrawInfo(TAknsItemID aInactiveBtnImgID, - TAknsItemID aNormalBtnImgID, - TAknsItemID aPressedBtnImgID, - - TAknsItemID aCandidateLeftImgID, - TAknsItemID aCandidateMiddleImgID, - TAknsItemID aCandidateRightImgID, - - TAknsItemID aCandidatePressedLeftImgID, - TAknsItemID aCandidatePressedMiddleImgID, - TAknsItemID aCandidatePressedRightImgID, - - TRgb aCandidatesHighlightColor, - TBool aSupportSkin = EFalse) - { - - iInactiveBtnImgID = aInactiveBtnImgID; - iNormalBtnImgID = aNormalBtnImgID; - iPressedBtnImgID = aPressedBtnImgID; - - iCandidateLeftImgID = aCandidateLeftImgID; - iCandidateMiddleImgID = aCandidateMiddleImgID; - iCandidateRightImgID = aCandidateRightImgID; - - iCandidatePressedLeftImgID = aCandidatePressedLeftImgID; - iCandidatePressedMiddleImgID = aCandidatePressedMiddleImgID; - iCandidatePressedRightImgID = aCandidatePressedRightImgID; - - iCandidatesHighlightColor = aCandidatesHighlightColor; - - iSupportSkin = aSupportSkin; - - }; - - TDropdownListDrawInfo() - { - iSupportSkin = EFalse; - }; - }; - - - -/** - * Context for list - * - * it provide all functions used by list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -class MFepCtrlDropdownListContext - { -public: // Method - - /** - * Draw mask for the appointed rect - * @since S60 v3.2 - * @param aRect the rect which will be redrawn - * @return None - */ - virtual void DrawMask(TRect aRect) = 0; - - /** - * Active bitmap context - * @since S60 v3.2 - * @return None - */ - virtual void ActivateBitmapContext() = 0; - - /** - * Get the graphics context - * @since S60 v3.2 - * @return The graphics context - */ - virtual CFbsBitGc* Gc() = 0; - - /** - * Get the candidate count - * - * @since S60 v3.2 - * @return The candidate count. - */ - virtual TInt CandidateCount() const = 0; - - /** - * Get the first candidate visible - * - * @since S60 v3.2 - * @return The first candidate index. - */ - virtual TInt GetFirstCandidateIndex() = 0; - - /** - * Get the first candidate visible - * - * @since S60 v3.2 - * @return The last candidate index. - */ - virtual TInt GetLastCandidateIndex() = 0; - - /** - * Set the first candidate visible - * - * @since S60 v3.2 - * @param aFirstIndex the first candidate index - * @return None. - */ - virtual void SetFirstCandidateIndex(TInt aFirstIndex) = 0; - - /** - * Set the first candidate visible - * - * @since S60 v3.2 - * @param aLastIndex the last candidate index - * @return None. - */ - virtual void SetLastCandidateIndex(TInt aLastIndex) = 0; - - /** - * Get the appointed candidate - * @since S60 v3.2 - * @param aIndex The index which will be check out - * @return The appointed candidate - */ - virtual CCandidate* GetCandidate(TInt aIndex) = 0; - - /** - * Get top left point - * @since S60 v3.2 - * @return The top left point - */ - virtual TPoint GetTopLeftPoint() = 0; - - /** - * Get cell width - * @since S60 v3.2 - * @return Cell width - */ - virtual TInt GetCellWidth() = 0; - - /** - * Get cell height - * @since S60 v3.2 - * @return Cell height - */ - virtual TInt GetCellHeight() = 0; - - /** - * Get navigation width - * @since S60 v3.2 - * @return Navigation width - */ - virtual TInt GetNaviWidth() = 0; - virtual TInt GetSpinBtnHeight() = 0; - virtual TInt GetCellHorizontalMargin() = 0; - virtual TInt GetCellVerticalMargin() = 0; - virtual TInt ListType() = 0; - virtual TInt OneRowStartCandIdx() = 0; - virtual void SetOneRowStartCandIdx(TInt aOriginalCandIdx) = 0; - virtual TInt GetOriginalFirstCandIdx() = 0; - virtual void SetOriginalFirstCandIdx(TInt aOriginalFirstCandIdx) = 0; - virtual TInt CandTruncateType() = 0; - virtual CList* ActiveList() = 0; - virtual void SetUpdateListReDrawFlag(TBool aReDraw) = 0; - virtual TBool GetUpdateListRedrawFlag() = 0; - // if set: when list expanded, and user press on region between - // list's rect and outerrect (list's rect plus fuzzy boundry) - // it still think that press inside list - virtual TInt FuzzyBoundry() = 0; - virtual TInt CandExpandType() = 0; - virtual TInt CandHDirection() = 0; - virtual TBool PageCtrlShown() = 0; - - /** - * Get columns number - * @since S60 v3.2 - * @return The top left point - */ - virtual TInt GetColNum() = 0; - - /** - * Get rows number - * @since S60 v3.2 - * @return The top left point - */ - virtual TInt GetRowNum() = 0; - - /** - * Get the font used to draw text - * @since S60 v3.2 - * @return The font used to draw text - */ - virtual const CFont* GetFont() = 0; - - /** - * Get alignment used to draw the text - * @since S60 v3.2 - * @return The alignment used to draw the text - */ - virtual CGraphicsContext::TTextAlign GetAlignment() = 0; - - /** - * Get text margin used to draw the text - * @since S60 v3.2 - * @return The margin used to draw the text - */ - virtual TInt GetTextMargin() = 0; - - /** - * Get background color - * @since S60 v3.2 - * @return The background color - */ - virtual TRgb GetBgColor() = 0; - - /** - * Get button down color - * @since S60 v3.2 - * @return The background color - */ - virtual TRgb GetButtonDownBgColor() = 0; - - /** - * Get border color - * @since S60 v3.2 - * @return The border color - */ - virtual TRgb GetBorderColor() = 0; - - /** - * Get text color - * @since S60 v3.2 - * @return The text color - */ - virtual TRgb GetTextColor() = 0; - - /** - * Get background color for highlight area - * @since S60 v3.2 - * @return The background color for highlight area - */ - virtual TRgb GetHighLightBgColor() = 0; - - /** - * Get high light text color - * @since S60 v3.2 - * @return The high light text color - */ - virtual TRgb GetHighLightTextColor() = 0; - - /** - * Get special text color - * @since S60 v3.2 - * @return The special text color - */ - virtual TRgb GetSpecialTextColor() = 0; - - /** - * Get fixed text - * @since S60 v3.2 - * @return The fixed text - */ - virtual TDesC GetFixedText() = 0; - - /** - * Invalidate some rect and redraw it - * @since S60 v3.2 - * @param aRect The rect which will be redrawn - * @param aUpdateAll Update all or not - * @return None - */ - virtual void Invalidate(const TRect& aRect, TBool aUpdateAll = EFalse) = 0; - - /** - * Get secondary list - * @since S60 v3.2 - * @return The secondary list - */ - virtual const RArray& GetSecondaryList() const = 0; - - /** - * Get the flag of enable or disable multi color - * - * @since S60 v3.2 - * @return ETrue if enable, or EFalse. - */ - virtual TBool IsEnableSecondary() const= 0; - - /** - * Get highlight cell list - * @since S60 v3.2 - * @return The highlight cell list - */ - virtual const RArray& GetHighlightList() const= 0; - - /** - * Report event when candidate is selected - * @since S60 v3.2 - * @param aCandidate The candidate string - * @param aSelectedIndex The index of the selected candidate - * @return None. - */ - virtual void ReportCandidateSelectEventL(const TDesC& aCandidate, const TInt aSelectedIndex)= 0; - - - /** - * Get page manager - * @since S60 v3.2 - * @return page manager - */ - virtual CPages* GetPages() = 0; - - /** - * Get bitmap manager - * @since S60 v3.2 - * @return The bitmap manager - */ - virtual CBitmapDb* GetBitmapDb() = 0; - - /** - * Change active list - * - * @since S60 v3.2 - * @param aList The new active list - * @param aLastIndex The last visible candidate index - * @return None. - */ - virtual void ChangeActiveList(CList* aList, TInt aLastIndex = 0) = 0; - - /** - * Get pen size - * - * @since S60 v3.2 - * @return The pen size. - */ - virtual const TSize GetPenSize() = 0; - - /** - * Set pointer capture - * - * @since S60 v3.2 - * @param aFlag ETrue to capture pointer, otherwise EFalse - * @return None. - */ - virtual void SetCapture(TBool aFlag ) = 0; - - /** - * Get next candidate page - * - * @since S60 v3.2 - * @return None. - */ - virtual void NotifyGetNextPage() = 0; - - /** - * Get previous candidate page - * - * @since S60 v3.2 - * @return None. - */ - virtual void NotifyGetPreviousPage() = 0; - - /** - * Notify close candidate page - * - * @since S60 v3.2 - * @return None. - */ - virtual void NotifyClosePage() = 0; - - /** - * Judge if next candidate existed - * - * @since S60 v3.2 - * @return ETrue if candidate exist, otherwise EFalse - */ - virtual TBool NextCandidateExist() = 0; - - /** - * Auto change active list - * - * @since S60 v3.2 - * @param aLastIndex The last visible candidate index - * @return None. - */ - virtual void AutoChangeActiveList( TInt aLastIndex = 0 ) = 0; - - /** - * Show preview bubble - * - * @since S60 v3.2 - * @param aRect Bubble rect - * @param aText Review bubble text - * @return None. - */ - virtual void DrawBubble(const TRect aRect, const TDesC& aText) = 0; - - /** - * Hide preview bubble - * - * @since S60 v3.2 - * @return None. - */ - virtual void ClearBubble() = 0; - - /** - * Redraw preview bubble - * - * @since S60 v3.2 - * @return None. - */ - virtual void ReDrawBubble() = 0; - }; - -#endif // M_DROP_DOWN_LIST_CONTEXT_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlist.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlist.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,368 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Abstract base class for drop-down list objects -* -*/ - - -#ifndef C_CLIST_H -#define C_CLIST_H - -// INCLUDES -#include -#include -#include -#include - -#include "peninputbitmapdb.h" -#include "peninputcandidate.h" -#include "peninputpages.h" -#include "peninputdropdownlistcontext.h" -#include "peninputlistmanager.h" - -// class forward decalaration -class CFont; - -// Empty rect -#define KEmptyRect TRect(0, 0, 0, 0); - -// Dummy rect, which is used to identify mouse down, but not click in valid area -#define KDummyRect TRect(0, 0, 1, 1); - - -/** - * abstract base list - * - * abstract base list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CList) : public CBase - { - - - -public: //Methods - - /** - * Destructor - * - * @since S60 v3.2 - * @return None. - */ - virtual ~CList(); - - /** - * Draw the list - * - * @since S60 v3.2 - * @return None. - */ - virtual void Draw(); - - /** - * Get rect of the list - * - * @since S60 v3.2 - * @return the rect of the list - */ - virtual const TRect& Rect(); - - /** - * Update the list, including re-calculate the rect of candidates. - * - * @since S60 v3.2 - * @param aRecalculate Re-calculate or not calculate the rect of candidates, the default is re-calculate - * @return None. - */ - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - - /** - * Deal with size change, it will be called when the size change - * - * @since S60 v3.2 - * @return None. - */ - virtual void SizeChanged(); - - /** - * Deal with move event, it will be called when the drop down list is moved. - * - * @since S60 v3.2 - * @param aOffsetPoint The offset point - * @return None. - */ - virtual void Move(const TPoint& aOffsetPoint); - - /** - * Set some cell to be high light. - * - * @since S60 v3.2 - * @param aCellIndex The which cell would be set - * @param aHighlight The flag of highlight, set to highlight if ETrue, else cancel highlight - * @return None. - */ - virtual void SetHighlightCell(const TInt aCellIndex, TBool aHighlight, - TBool aForceDraw = ETrue); - - virtual void SetNextPageHighlightCellAfterOnePageL(const TInt aCellIndex); - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - - /** - * Deal with the pointer leave event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerLeave(const TPoint& aPoint); - - /** - * Reset some status of the list. - * - * @since S60 v3.2 - * @return None. - */ - virtual void ResetStatus(); - - virtual TInt StartCandIdxOfLine(TInt aCandIndex); - - - void SetDropdownListImgID(TDropdownListDrawInfo aDropdownListDrawInfo); - -protected: // Methods - - /** - * Constructor. - * - * @since S60 v3.2 - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @return None. - */ - CList(CListManager* aManager,MFepCtrlDropdownListContext *aOwner); - - /** - * 2nd construct function. - * - * @since S60 v3.2 - * @return None. - */ - void ConstructL(); - - /** - * Find candidate according the assigned point. - * - * @since S60 v3.2 - * @aPosition The position assigned - * @aIndex The index of the candidate which has been found - * @return The candidate which has been found, Null if not found. - */ - CCandidate* FindCandidate(const TPoint& aPosition, TInt& aIndex); - - /** - * Calculate the position of current visible candidates. - * - * @since S60 v3.2 - * @return the last candidate visible. - */ - virtual TInt CalculatePositionsL(); - - /** - * Calculate all kinds of rectangles of list. - * - * @since S60 v3.2 - * @return None. - */ - virtual void CalculateAreas(); - - /** - * Draw select cell, which can be candidates or buttons. - * - * @since S60 v3.2 - * @param aRect The rect which will be drawn - * @param aIndicate Indicate the cell is pressed or not - * @return None. - */ - virtual void DrawSelection(const TRect& aRect, TBool aIndicate); - - /** - * Draw candidate when pressed. - * - * @since S60 v3.2 - * @param aRect The rect which will be drawn - * @param aIndicate Indicate the cell is pressed or not - * @return None. - */ - virtual void DrawCandidatePress(const TRect& aRect, TBool aIndicate); - - /** - * Draw navigation button when pressed. - * - * @since S60 v3.2 - * @param aRect The rect which will be drawn - * @param aIndicate Indicate the button is pressed or not - * @return None. - */ - virtual TBool DrawNavigationPress(const TRect& aRect, TBool aIndicate); - - /** - * Draw all visible cells. - * - * @since S60 v3.2 - * @return None. - */ - virtual void DrawCandidates(); - - /** - * Compare rects equal or not. - * - * @since S60 v3.2 - * @param aSrcRect The source rect - * @param aDesRect The destination rect - * @return ETrue If the two rects are equal. - */ - virtual TBool CompareRect(const TRect& aSrcRect, const TRect& aDesRect); - - /** - * Draw highlight cell. - * - * @since S60 v3.2 - * @param aIndicate Indicate the button is pressed or not - * @return None - */ - virtual void DrawHighightCell(const TRect& aSrcRect, const TBool aIndidate); - -protected: // Data - - /** - * The drop down list - * Not own. - */ - MFepCtrlDropdownListContext *iOwner; - - /** - * The list manager - * Not own. - */ - CListManager* iManager; - - /** - * the rectangle of the list - */ - TRect iRect; - - /** - * the content rectangle of the list - */ - TRect iContentRect; - - /** - * the navigation rectangle of the list - */ - TRect iNavigationRect; - - /** - * the next button rectangle of the list - */ - TRect iNavigationNextRect; - - /** - * the previous button rectangle of the list - */ - TRect iNavigationPreviousRect; - - /** - * the close button rectangle of the list - */ - TRect iNavigationCloseRect; - - /** - * the click rectangle of the list - */ - TRect iClickedRect; - - /** - * the move rectangle of cell, when mouse moved - */ - TRect iMoveLatestRect; - - /** - * the candidate index clicked - */ - TInt iClickedCandidateIndex; - - /** - * the flag indicating the button is click or not - */ - TBool iIndicateButtonClicked; - - /** - * the flag indicating the next button is enable or disable - */ - TBool iNextButtonDisable; - - /** - * the flag indicating the close button is enable or disable - */ - TBool iCloseButtonDisable; - - /** - * the flag indicating the previous button is enable or disable - */ - TBool iPreviousButtonDisable; - - /** - * the flag indicating the list is multi rows or one row - */ - TBool iIsMultiRows; - - /** - * the flag indicating the list is multi rows or one row - */ - TBool iPenDownInCandidate; - - TDropdownListDrawInfo iDropdownListDrawInfo; - }; - -#endif // C_CLIST_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistexpandablemultirowwithouticon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistexpandablemultirowwithouticon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Multi rows list without icon for drop-down list objects -* -*/ - - -#ifndef C_LISTEXPANDABLEMULTIROWWITHOUTICON_H -#define C_LISTEXPANDABLEMULTIROWWITHOUTICON_H - -/** - * Multi rows list without icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListExpandableMultiRowWithoutIcon) : public CList - { - -public: // Methods - - /** - * Create a object of CListArabicMultiRowWithoutIcon, static method - * - * @since S60 v3.2 - * @param aManager Pointer to the list manager - * @param iOwner The drop down list - * @return The CListArabicMultiRowWithoutIcon pointer. - */ - static CListExpandableMultiRowWithoutIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListExpandableMultiRowWithoutIcon(); - -// from base class CList - - /** - * Draw the list - * - * @since S60 v3.2 - */ - virtual void Draw(); - - /** - * Update the list, including re-calculate the rect of candidates. - * - * @since S60 v3.2 - * @param aRecalculate Re-calculate or not calculate - * the rect of candidates, the default is re-calculate - */ - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @since S60 v3.2 - * @param aManager The list manager - * @param aOwner The context of the drop down list - */ - CListExpandableMultiRowWithoutIcon( CListManager* aManager, - MFepCtrlDropdownListContext* aOwner); - -private: //Methods - - /** - * Calculate the position of current visible candidates. - * - * @since S60 v3.2 - * @return the last candidate visible. - */ - virtual TInt CalculatePositionsL(); - - /** - * Calculate all kinds of rectangles of list. - * - * @since S60 v3.2 - */ - virtual void CalculateAreas(); - - }; - -#endif // C_LISTEXPANDABLEMULTIROWWITHOUTICON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmanager.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmanager.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,267 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: List manager,which is used by drop down list -* -*/ - - -#ifndef C_LISTMANAGER_H -#define C_LISTMANAGER_H - -#include -#include - -/** class forward decalaration */ -class MFepCtrlDropdownListContext; -class CList; -class CListOneRowWithoutIcon; -class CListOneRowWithoutIconWithBubble; -class CListOneRowWithIcon; -class CListOneRowWithIconWithBubble; -class CListMultiRowWithIcon; -class CListMultiRowWithIconWithBubble; -class CListMultiRowWithoutIcon; -class CListMultiRowRollWithIcon; -class CListOneRowRollWithIcon; -class CListExpandableMultiRowWithoutIcon; -class CListOneRowRollWithIconWithBubble; -class CListMultiRowRollWithIconWithBubble; - -/** - * List manager - * - * List manager used by drop down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListManager) : public CBase - { - -public: - - /** - * Create a object of CPages, static method - * - * @since S60 v3.2 - * @param aContext The context of the drop down list - * @return CPages pointer. - */ - static CListManager* NewL(MFepCtrlDropdownListContext* aContext); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListManager(); - - /** - * Get active list - * - * @since S60 v3.2 - * @return active list. - */ - CList* ActiveList() const; - - /** - * Size change - * - * @since S60 v3.2 - * @return None. - */ - void SizeChanged(); - - /** - * Move - * - * @since S60 v3.2 - * @param aOffset The offset of move - * @return None. - */ - void Move(const TPoint& aOffset); - - /** - * Set active list - * - * @since S60 v3.2 - * @param aList The new active list - * @return None. - */ - void SetActiveList(CList* aList); - - /** - * Get the one row list without icon - * @since S60 v3.2 - * @return the one row list without icon - */ - CList* ListOneRowWithoutIcon() const; - - /** - * Get the one row list without icon with bubble - * @since S60 v3.2 - * @return the one row list without icon - */ - CList* ListOneRowWithoutIconWithBubble() const; - - /** - * Get the one row list with icon - * @since S60 v3.2 - * @return the one row list with icon - */ - CList* ListOneRowWithIcon() const; - - /** - * Get the one row list with icon with bubble - * @since S60 v3.2 - * @return the one row list with icon - */ - CList* ListOneRowWithIconWithBubble() const; - - /** - * Get the multi row list with icon - * @since S60 v3.2 - * @return the multi row list with icon - */ - CList* ListMultiRowWithIcon() const; - - /** - * Get the multi row list with icon with bubble - * @since S60 v3.2 - * @return the multi row list with icon - */ - CList* ListMultiRowWithIconWithBubble() const; - - - /** - * Get the multi row list without icon - * @since S60 v3.2 - * @return the multi row list without icon - */ - CList* ListMultiRowWithoutIcon() const; - - CList* ListMultiRowRollWithIcon() const; - - CList* ListOneRowRollWithIcon() const; - CList* ListExpandableMultiRowWithoutIcon() const; - - /** - * Get the multi row roll list with icon with bubble - * @since S60 v3.2 - * @return the multi row list with icon - */ - CList* ListMultiRowRollWithIconWithBubble() const; - - /** - * Get the one row roll list with icon with bubble - * @since S60 v3.2 - * @return the multi row list with icon - */ - CList* ListOneRowRollWithIconWithBubble() const; - - /** - * Reset some data - * @since S60 v4.0 - * @return None. - */ - void ResetStatus(); - -protected: - - /** - * 2nd construct method - * - * @since S60 v3.2 - * @param aContext The context of the drop down list - * @return None - */ - void ConstructL(MFepCtrlDropdownListContext* aContext); - -private: // Data - - /** - * The current active list - * Not own - */ - CList* iActiveList; - - /** - * The one row list without icon - * Own - */ - CListOneRowWithoutIcon* iListOneRowWithoutIcon; - - /** - * The one row list without icon with bubble - * Own - */ - CListOneRowWithoutIconWithBubble* iListOneRowWithoutIconWithBubble; - - /** - * The one row list with icon - * Own - */ - CListOneRowWithIcon* iListOneRowWithIcon; - - /** - * The one row list with icon with bubble - * Own - */ - CListOneRowWithIconWithBubble* iListOneRowWithIconWithBubble; - - /** - * The multi row list with icon - * Own - */ - CListMultiRowWithIcon* iListMultiRowWithIcon; - - /** - * The multi row list with icon with bubble - * Own - */ - CListMultiRowWithIconWithBubble* iListMultiRowWithIconWithBubble; - - /** - * The multi row list without icon - * Own - */ - CListMultiRowWithoutIcon* iListMultiRowWithoutIcon; - - CListMultiRowRollWithIcon* iListMultiRowRollWithIcon; - CListOneRowRollWithIcon* iListOneRowRollWithIcon; - CListExpandableMultiRowWithoutIcon* iListExpandableMultiRowWithoutIcon; - - /** - * The one row roll list with icon with bubble - * Own - */ - CListOneRowRollWithIconWithBubble* iListOneRowRollWithIconWithBubble; - - /** - * The multi row roll list with icon with bubble - * Own - */ - CListMultiRowRollWithIconWithBubble* iListMultiRowRollWithIconWithBubble; - - /** - * The dropdownlist context - * Not Own - */ - MFepCtrlDropdownListContext* iContext; - - }; - -#endif // C_LISTMANAGER_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowrollwithicon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowrollwithicon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef C_CLISTMULTIROWROLLWITHICON_H -#define C_CLISTMULTIROWROLLWITHICON_H - -#include "peninputlistmultirowwithicon.h" - -// forward declaration -class MFepCtrlDropdownListContext; - -NONSHARABLE_CLASS(CListMultiRowRollWithIcon) : public CListMultiRowWithIcon - { -public: // Methods - - static CListMultiRowRollWithIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - virtual ~CListMultiRowRollWithIcon(); - - // txin - virtual void HandlePointerDownL(const TPoint& aPoint); - // end - - virtual void HandlePointerUpL(const TPoint& aPoint); - - virtual void SetNextPageHighlightCellAfterOnePageL(const TInt aCellIndex); - - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - -protected: // Methods - - CListMultiRowRollWithIcon(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -protected: - - typedef struct TLineCandidateTag - { - TInt iStartIdx; - TInt iEndIdx; - } TLineCandidate; - - TInt StartCandIdxOfLine(TInt aCandIndex); - - void ResetStatus(); - -private: - - virtual TInt CalculatePositionsL(); - -private: // Data member - - // added by txin - RArray iLines; - // end adding - }; - -#endif // C_CLISTMULTIROWROLLWITHICON_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowrollwithiconwithbubble.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowrollwithiconwithbubble.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef C_CLISTMULTIROWROLLWITHICONWITHBUBBLE_H -#define C_CLISTMULTIROWROLLWITHICONWITHBUBBLE_H - -#include "peninputlistmultirowrollwithicon.h" - -// forward declaration -class MFepCtrlDropdownListContext; - -NONSHARABLE_CLASS(CListMultiRowRollWithIconWithBubble) : public CListMultiRowRollWithIcon - { -public: // Methods - - static CListMultiRowRollWithIconWithBubble* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - virtual ~CListMultiRowRollWithIconWithBubble(); - - virtual void HandlePointerDownL(const TPoint& aPoint); - - virtual void HandlePointerUpL(const TPoint& aPoint); - virtual void HandlePointerDragL(const TPoint& aPoint); - - virtual TBool CompareRect(const TRect& aSrcRect, const TRect& aDesRect); -protected: // Methods - - CListMultiRowRollWithIconWithBubble(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - - - }; - -#endif // C_CLISTMULTIROWROLLWITHICONWITHBUBBLE_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowwithicon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowwithicon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Multi rows list with icon for drop-down list objects -* -*/ - - -#ifndef C_CLISTMULTIROWWITHICON_H -#define C_CLISTMULTIROWWITHICON_H - -// INCLUDES -#include -#include - -#include "peninputlist.h" -#include "peninputcandidate.h" - -// class forward decalaration -class MFepCtrlDropdownListContext; - -/** - * Multi rows list with icon for drop-down list - * - * Multi rows list with icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListMultiRowWithIcon) : public CList - { - -public: // Methods - - /** - * Create a object of CListMultiRowWithIcon, static method - * - * @since S60 v3.2 - * @param aManager Pointer to the list manager - * @param iOwner The drop down list - * @return The CListMultiRowWithIcon pointer. - */ - static CListMultiRowWithIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListMultiRowWithIcon(); - -// from base class CList - - /** - * Draw the list - * - * @since S60 v3.2 - */ - virtual void Draw(); - - /** - * Update the list, including re-calculate the rect of candidates. - * - * @since S60 v3.2 - * @param aRecalculate Re-calculate or not calculate the rect of candidates, the default is re-calculate - */ - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @since S60 v3.2 - */ - CListMultiRowWithIcon(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -// from base class CList - - /** - * Draw navigation button when pressed. - * - * @since S60 v3.2 - * @param aRect The rect which will be drawn - * @param aIndicate indicate the button is pressed or not - */ - TBool DrawNavigationPress(const TRect& aRect, TBool aIndicate); - -protected: - - /** - * Calculate the position of current visible candidates. - * - * @since S60 v3.2 - * @return the last candidate visible. - */ - virtual TInt CalculatePositionsL(); - - /** - * Calculate all kinds of rectangles of list. - * - * @since S60 v3.2 - */ - virtual void CalculateAreas(); - - virtual void RefreshListL(TBool aRecalculate); - -protected: - - /** - * the bitmap for close button - * Not own - */ - const CFbsBitmap* iBButtonClose; - - /** - * the mask bitmap for close button - * Not own - */ - const CFbsBitmap* iBButtonMaskClose; - - /** - * the bitmap for next button - * Not own - */ - const CFbsBitmap* iBButtonDown; - - /** - * the mask bitmap for next button - * Not own - */ - const CFbsBitmap* iBButtonMaskDown; - - /** - * the bitmap for up button - * Not own - */ - const CFbsBitmap* iBButtonUp; - - /** - * the mask bitmap for up button - * Not own - */ - const CFbsBitmap* iBButtonMaskUp; - }; - -#endif //C_CLISTMULTIROWWITHICON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowwithiconwithbubble.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowwithiconwithbubble.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef C_CLISTMULTIROWWITHICONWITHBUBBLE_H -#define C_CLISTMULTIROWWITHICONWITHBUBBLE_H - -// INCLUDES -#include -#include - -#include "peninputlist.h" -#include "peninputcandidate.h" -#include "peninputlistmultirowwithicon.h" - -// class forward decalaration -class MFepCtrlDropdownListContext; - -/** - * Multi rows list with icon for drop-down list - * - * Multi rows list with icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListMultiRowWithIconWithBubble) : public CListMultiRowWithIcon - { - -public: // Methods - - /** - * Create a object of CListMultiRowWithIcon, static method - * - * @since S60 v3.2 - * @param aManager Pointer to the list manager - * @param iOwner The drop down list - * @return The CListMultiRowWithIcon pointer. - */ - static CListMultiRowWithIconWithBubble* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListMultiRowWithIconWithBubble(); - -// from base class CListMultiRowWithIcon - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @since S60 v3.2 - */ - CListMultiRowWithIconWithBubble(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -// from base class CList - - /** - * Compare rects equal or not. - * - * @since S60 v3.2 - * @param aSrcRect The source rect - * @param aDesRect The destination rect - * @return ETrue If the two rects are equal. - */ - virtual TBool CompareRect(const TRect& aSrcRect, const TRect& aDesRect); - -protected: - - - }; - -#endif //C_CLISTMULTIROWWITHICONWITHBUBBLE_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowwithouticon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistmultirowwithouticon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Multi rows list without icon for drop-down list objects -* -*/ - - -#ifndef C_LISTMULTIROWWITHOUTICON_H -#define C_LISTMULTIROWWITHOUTICON_H - -/** - * Multi rows list without icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListMultiRowWithoutIcon) : public CList - { - -public: // Methods - - /** - * Create a object of CListMultiRowWithoutIcon, static method - * - * @since S60 v3.2 - * @param aManager Pointer to the list manager - * @param iOwner The drop down list - * @return The CListMultiRowWithoutIcon pointer. - */ - static CListMultiRowWithoutIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListMultiRowWithoutIcon(); - -// from base class CList - - /** - * Draw the list - * - * @since S60 v3.2 - */ - virtual void Draw(); - - /** - * Update the list, including re-calculate the rect of candidates. - * - * @since S60 v3.2 - * @param aRecalculate Re-calculate or not calculate - * the rect of candidates, the default is re-calculate - */ - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @since S60 v3.2 - * @param aManager The list manager - * @param aOwner The context of the drop down list - */ - CListMultiRowWithoutIcon( CListManager* aManager, - MFepCtrlDropdownListContext* aOwner); - -private: //Methods - - /** - * Calculate the position of current visible candidates. - * - * @since S60 v3.2 - * @return the last candidate visible. - */ - virtual TInt CalculatePositionsL(); - - /** - * Calculate all kinds of rectangles of list. - * - * @since S60 v3.2 - */ - virtual void CalculateAreas(); - - }; - -#endif // C_LISTMULTIROWWITHOUTICON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowrollwithicon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowrollwithicon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef C_CLISTONEROWROLLWITHICON_H -#define C_CLISTONEROWROLLWITHICON_H - -#include "peninputlistonerowwithicon.h" - -NONSHARABLE_CLASS(CListOneRowRollWithIcon) : public CListOneRowWithIcon - { - -public: // Methods - - static CListOneRowRollWithIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - virtual ~CListOneRowRollWithIcon(); - - // not needed, dim next button same as its base class - // virtual void Draw(); - - virtual void HandlePointerDownL(const TPoint& aPoint); - - virtual void HandlePointerUpL(const TPoint& aPoint); - - virtual void HandlePointerDragL(const TPoint& aPoint); - - virtual void SetHighlightCell(const TInt aCellIndex, TBool aHighlight, - TBool aForceDraw = ETrue); - -protected: // Methods - - CListOneRowRollWithIcon(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - }; - -#endif // C_CLISTONEROWROLLWITHICON_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowrollwithiconwithbubble.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowrollwithiconwithbubble.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef C_CLISTONEROWROLLWITHICONWITHBUBBLE_H -#define C_CLISTONEROWROLLWITHICONWITHBUBBLE_H - -#include "peninputlistonerowrollwithicon.h" - -NONSHARABLE_CLASS(CListOneRowRollWithIconWithBubble) : public CListOneRowRollWithIcon - { - -public: // Methods - - static CListOneRowRollWithIconWithBubble* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - virtual ~CListOneRowRollWithIconWithBubble(); - - // not needed, dim next button same as its base class - // virtual void Draw(); - - virtual void HandlePointerDownL(const TPoint& aPoint); - - virtual void HandlePointerUpL(const TPoint& aPoint); - - virtual void HandlePointerDragL(const TPoint& aPoint); - - virtual void HandlePointerLeave(const TPoint& aPoint); - virtual TBool CompareRect(const TRect& aSrcRect, const TRect& aDesRect); - -protected: // Methods - - CListOneRowRollWithIconWithBubble(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - }; - -#endif // C_CLISTONEROWROLLWITHICON_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithicon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithicon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: One rows list with icon for drop-down list objects -* -*/ - - -#ifndef C_CLISTONEROWWITHICON_H -#define C_CLISTONEROWWITHICON_H - -// INCLUDES -#include -#include - -#include "peninputlist.h" -#include "peninputcandidate.h" - -// class forward decalaration -class MFepCtrlDropdownListContext; - -/** - * One rows list without icon for drop-down list - * - * One rows list without icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListOneRowWithIcon) : public CList - { - -public: // Methods - - /** - * Create a object of CListOneRowWithIcon, static method - * - * @since S60 v3.2 - * @param aManager Pointer to the list manager - * @param iOwner The drop down list - * @return CListOneRowWithIcon pointer. - */ - static CListOneRowWithIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListOneRowWithIcon(); - -// from base class CList - - /** - * Draw the list - * - * @since S60 v3.2 - */ - virtual void Draw(); - - /** - * Update the list, including re-calculate the rect of candidates. - * - * @since S60 v3.2 - * @param aRecalculate Re-calculate or not calculate the rect of candidates, the default is re-calculate - */ - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @since S60 v3.2 - */ - CListOneRowWithIcon(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -// from base class CList - - /** - * Draw navigation button when pressed. - * - * @since S60 v3.2 - * @param aRect The rect which will be drawn - * @param aIndicate Indicate the button is pressed or not - */ - TBool DrawNavigationPress(const TRect& aRect, TBool aIndicate); - -protected: - - /** - * Calculate the position of current visible candidates. - * - * @since S60 v3.2 - * @return the last candidate visible. - */ - virtual TInt CalculatePositionsL(); - - /** - * Calculate all kinds of rectangles of list. - * - * @since S60 v3.2 - */ - virtual void CalculateAreas(); - -protected: - - /** - * the bitmap for next button - * Not own - */ - const CFbsBitmap* iBButtonDown; - - /** - * the mask bitmap for next button - * Not own - */ - const CFbsBitmap* iBButtonMaskDown; - - }; - -#endif //C_CLISTONEROWWITHICON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithiconwithbubble.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithiconwithbubble.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef C_CLISTONEROWWITHICONWITHBUBBLE_H -#define C_CLISTONEROWWITHICONWITHBUBBLE_H - -// INCLUDES -#include -#include - -#include "peninputlist.h" -#include "peninputlistonerowwithicon.h" -#include "peninputcandidate.h" - -// class forward decalaration -class MFepCtrlDropdownListContext; - -/** - * One rows list without icon for drop-down list - * - * One rows list without icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListOneRowWithIconWithBubble) : public CListOneRowWithIcon - { - -public: // Methods - - /** - * Create a object of CListOneRowWithIcon, static method - * - * @since S60 v3.2 - * @param aManager Pointer to the list manager - * @param iOwner The drop down list - * @return CListOneRowWithIcon pointer. - */ - static CListOneRowWithIconWithBubble* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListOneRowWithIconWithBubble(); - -// from base class CListOneRowWithIcon - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - - // from base class CList - /** - * Deal with the pointer leave event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerLeave(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @since S60 v3.2 - */ - CListOneRowWithIconWithBubble(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -// from base class CList - - /** - * Compare rects equal or not. - * - * @since S60 v3.2 - * @param aSrcRect The source rect - * @param aDesRect The destination rect - * @return ETrue If the two rects are equal. - */ - virtual TBool CompareRect(const TRect& aSrcRect, const TRect& aDesRect); - -protected: - - -protected: - - - }; - -#endif //C_CLISTONEROWWITHICONWITHBUBBLE_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithouticon.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithouticon.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: One rows list with icon for drop-down list objects -* -*/ - - -#ifndef C_CLISTONEROWWITHOUTICON_H -#define C_CLISTONEROWWITHOUTICON_H - -// INCLUDES -#include -#include - -#include "peninputlist.h" -#include "peninputcandidate.h" - -// class forward decalaration -class MFepCtrlDropdownListContext; - -/** - * One rows list with icon for drop-down list - * - * One rows list with icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListOneRowWithoutIcon) : public CList - { - -public: // Methods - - /** - * Create a object of CListOneRowWithoutIcon, static method - * - * @since S60 v3.2 - * @param iOwner The drop down list - * @return The CListOneRowWithoutIcon pointer. - */ - static CListOneRowWithoutIcon* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListOneRowWithoutIcon(); - -// from base class CList - - /** - * Draw the list - * - * @since S60 v3.2 - */ - virtual void Draw(); - - /** - * Update the list, including re-calculate the rect of candidates. - * - * @since S60 v3.2 - * @param aRecalculate Re-calculate or not calculate the rect of candidates, the default is re-calculate - */ - virtual void UpdateListL(TBool aDrawFlag = ETrue, TBool aRecalculate = ETrue); - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - - -protected: // Methods - - /** - * Constructor. - * - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @since S60 v3.2 - */ - CListOneRowWithoutIcon(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -private: //Methods - - /** - * Calculate the position of current visible candidates. - * - * @since S60 v3.2 - * @return the last candidate visible. - */ - virtual TInt CalculatePositionsL(); - - /** - * Calculate all kinds of rectangles of list. - * - * @since S60 v3.2 - */ - virtual void CalculateAreas(); - - }; - -#endif //C_CLISTONEROWWITHOUTICON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithouticonwithbubble.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputlistonerowwithouticonwithbubble.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef C_CLISTONEROWWITHOUTICONWITHBUBBLE_H -#define C_CLISTONEROWWITHOUTICONWITHBUBBLE_H - -// INCLUDES -#include -#include - -#include "peninputlist.h" -#include "peninputlistonerowwithouticon.h" -#include "peninputcandidate.h" - -// class forward decalaration -class MFepCtrlDropdownListContext; - -/** - * One rows list with icon for drop-down list - * - * One rows list with icon for drop-down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CListOneRowWithoutIconWithBubble) : public CListOneRowWithoutIcon - { - -public: // Methods - - /** - * Create a object of CListOneRowWithoutIcon, static method - * - * @since S60 v3.2 - * @param iOwner The drop down list - * @return The CListOneRowWithoutIcon pointer. - */ - static CListOneRowWithoutIconWithBubble* NewL(CListManager* aManager, - MFepCtrlDropdownListContext* iOwner); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CListOneRowWithoutIconWithBubble(); - -// from base class CList - - /** - * Deal with the pointer down event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDownL(const TPoint& aPoint); - - /** - * Deal with the pointer up event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerUpL(const TPoint& aPoint); - - /** - * Deal with the pointer drag event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerDragL(const TPoint& aPoint); - - - // from base class CList - /** - * Deal with the pointer leave event. - * - * @since S60 v3.2 - * @param aPoint The point of the mouse - * @return None. - */ - virtual void HandlePointerLeave(const TPoint& aPoint); - -protected: // Methods - - /** - * Constructor. - * - * @param aManager The list manager - * @param aOwner The context of the drop down list - * @since S60 v3.2 - */ - CListOneRowWithoutIconWithBubble(CListManager* aManager, MFepCtrlDropdownListContext* aOwner); - -// from base class CList - - /** - * Compare rects equal or not. - * - * @since S60 v3.2 - * @param aSrcRect The source rect - * @param aDesRect The destination rect - * @return ETrue If the two rects are equal. - */ - virtual TBool CompareRect(const TRect& aSrcRect, const TRect& aDesRect); - -private: //Methods - - - }; - -#endif //C_CLISTONEROWWITHOUTICON_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputpages.h --- a/textinput/peninputcommonctrls/inc/peninputdropdownlist/peninputpages.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2200 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Pages manager,which is used by drop down list -* -*/ - - -#ifndef C_PAGES_H -#define C_PAGES_H - -#include -#include - -/** - * Pages manager - * - * Pages manager used by drop down list - * - * @lib FepCtrlDropdownList.lib - * @since S60 v3.2 - */ -NONSHARABLE_CLASS(CPages) : public CBase - { - -public: - - /** - * Create a object of CPages, static method - * - * @since S60 v3.2 - * @return CPages pointer. - */ - static CPages* NewL(); - - /** - * Destructor - * - * @since S60 v3.2 - */ - virtual ~CPages(); - - /** - * Add one page into the page list - * - * @since S60 v3.2 - * @param aFirstIndex The first index of the page - * @param aLastIndex The last index of the page - * @return None. - */ - void AddPage(const TInt aFirstIndex, const TInt aLastIndex); - - /** - * Get previous index according the appointed last index - * - * @since S60 v3.2 - * @param aLastIndex The current last index - * @param aFirstIndexOfPrevious Returned first index of previous page - * @param aLastIndexOfPrevious Returned last index of previous page - * @return The find result, ETrue if success, else EFalse. - */ - TBool GetPreviousIndex(const TInt aLastIndex, - TInt& aFirstIndexOfPrevious, - TInt& aLastIndexOfPrevious) const; - - /** - * Reset the pages, clear all pages - * - * @since S60 v3.2 - * @return None. - */ - void Reset(); - - /** - * Get page count in the list - * - * @since S60 v3.2 - * @return Page count. - */ - TInt PageCount() const; - - /** - * Get page by appointed postion. - * - * @since S60 v3.2 - * @param aPos The appointed postion - * @param aFirstIndex Returned first index of page - * @param aLastIndex Returned last index of page - * @return The find result, ETrue if success, else EFalse. - */ - TBool GetPageIndexByPos(const TInt aPos, - TInt& aFirstIndex, - TInt& aLastIndex) const; - -protected: - - /** - * 2nd construct method - * - * @since S60 v3.2 - * @return None - */ - void ConstructL(); - -private: // Data - - /** - * the list for first indexes - */ - RArray iFirstIndexList; - - /** - * the list for last indexes - */ - RArray iLastIndexList; - - }; - -#endif // C_PAGES_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputgeneralheaders/peninputcommonctrls.hrh --- a/textinput/peninputcommonctrls/inc/peninputgeneralheaders/peninputcommonctrls.hrh Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project common controls for fep -* -*/ - - -#ifndef AKNFEPCOMMONCTRLS_HRH -#define AKNFEPCOMMONCTRLS_HRH - -enum TButtonType - { - EButtonTypeNormal = 0, - EButtonTypeMultiMode, - EButtonTypePopupMode - }; - -enum TRangeType - { - ERangeTypeNormal = 0, - ERangeTypeMixed - }; - -#endif // AKNFEPCOMMONCTRLS_HRH - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputgeneralheaders/peninputcommonctrls.rh --- a/textinput/peninputcommonctrls/inc/peninputgeneralheaders/peninputcommonctrls.rh Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,318 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project hwrboxbased -* -*/ - - -#ifndef AKNFEPCOMMONCTRLS_RH -#define AKNFEPCOMMONCTRLS_RH - -// INCLUDES -#include -#include "AknFepGlobalEnums.h" - -// CONSTANT DEFINE -#define DEFAULT_ICON_COLOR_GROUP 29 - -// STRUCTURE DEFINITIONS - -// ----------------------------------------------------------------------------- -// AKN_FEP_INPUTRANGE -// Resource definition for input range -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_INPUTRANGE - { - WORD rangeid=0; - WORD rangetype=0; - WORD ctrlid=0; - WORD ctrltype=0; - LLINK indicator; - // only meaningful when whole range bar action style is ERangeBarUsingIndicatorStyle - // default is hided when actived - WORD actionstyle=0; - // shown by default - WORD hide=0; - // only meaningful when whole range bar action style is ERangeBarUsingIndicatorStyle, - // while every indicator's position is fixed, following value is position index in - // cellrect list - WORD posidx=0; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_INPUTRANGE_LIST -// Resource definition for input mode list -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_INPUTRANGE_LIST - { - STRUCT ranges[]; - WORD default=0; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_BUTTON_IMAGE -// Resource definition for button -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_BUTTON_IMAGE - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - WORD colorgroup=DEFAULT_ICON_COLOR_GROUP; - - WORD nactive=0xffff; - WORD nactivemsk=0xffff; - WORD nactiveskinid=0xffff; - - WORD nactivep=0xffff; - WORD nactivepmsk=0xffff; - WORD nactivepskinid=0xffff; - - WORD active=0xffff; - WORD activemsk=0xffff; - WORD activeskinid=0xffff; - - WORD activep=0xffff; - WORD activepmsk=0xffff; - WORD activepskinid=0xffff; - - WORD disable=0xffff; - WORD disablemsk=0xffff; - WORD disableskinid=0xffff; - - WORD moveindicator=0xffff; - WORD moveindicatormsk=0xffff; - WORD moveindicatorskinid=0xffff; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_COMMON_BUTTON_IMAGE -// Resource definition for button -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_COMMON_BUTTON_IMAGE - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - WORD colorgroup=DEFAULT_ICON_COLOR_GROUP; - - WORD forground=0xffff; - WORD forgroundmsk=0xffff; - WORD forgroundskinid=0xffff; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_RAWKEY_BUTTON -// Resource definition of raw key buttons which can be used to simulate itut keys -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_RAWKEY_BUTTON - { - WORD scancode = 0xffff; - LLINK buttonimage; // link to AKN_FEP_BUTTON_IMAGE - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_MULTIPLE_MODE_BUTTON -// Resource definition of image list for buttons which can have multiple images -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_MULTIPLE_MODE_BUTTON - { - LONG colormajorskinid=0xffff; - WORD textcolorgrp=0xffff; - WORD textcoloridx=0xffff; - WORD shadowtextcoloridx=0xffff; - STRUCT modes[]; - WORD defaultmode = 0; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_MULTI_IMAGE_BUTTON_IMAGE -// Resource definition for button -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_MULTI_IMAGE_BUTTON_IMAGE - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - WORD colorgroup=DEFAULT_ICON_COLOR_GROUP; - - WORD forground1=0xffff; - WORD forground1msk=0xffff; - WORD forground1skinid=0xffff; - - WORD forground2=0xffff; - WORD forground2msk=0xffff; - WORD forground2skinid=0xffff; - } - -STRUCT AKN_FEP_BUTTON_MODE - { - LLINK modeimage; - LTEXT modestring=""; - WORD rangeid=0xffff; - WORD modeid=0xffff; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_SELECTION_LIST_IMAGE -// Resource definition of selection list -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_SELECTION_LIST_IMAGE - { - LTEXT bmpfile=""; - LONG imgmajorskinid = 0xffff; - - WORD normalbmp = 0xffff; - WORD normalmsk = 0xffff; - WORD normalskinid = 0xffff; - - WORD highlightbmp = 0xffff; - WORD highlightmsk = 0xffff; - WORD highlightskinid = 0xffff; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_INPUTMODE_NAME -// Resource definition of inputmode name -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_INPUTMODE_NAME - { - LONG modeid= EPluginInputModeNone; - LTEXT txt = ""; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_INPUTMODE_NAME_ARRAY -// Resource definition of inputmode name ARRAY -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_INPUTMODE_NAMEARRAY - { - STRUCT names[]; - } - -STRUCT AKN_FEP_NONIRREGULAR_VKB_BITMAP - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - WORD normal=0xffff; - WORD normalmsk=0xffff; - WORD normalskinid=0xffff; - - WORD highlight=0xffff; - WORD highlightmsk=0xffff; - WORD highlightskinid=0xffff; - - WORD dimmed=0xffff; - WORD dimmedmsk=0xffff; - WORD dimmedskinid=0xffff; - } - -STRUCT AKN_FEP_IRREGULAR_VKB_BITMAP - { - LTEXT bmpfile=""; - - WORD leftdownnormal=0xffff; - WORD leftdownnormalmask=0xffff; - WORD leftdownnormalskinid=0xffff; - WORD leftdownpressed=0xffff; - WORD leftdownpressedmask=0xffff; - WORD leftdownpressedkinid=0xffff; - WORD leftdowndimmed=0xffff; - WORD leftdowndimmedmask=0xffff; - WORD leftdowndimmedskinid=0xffff; - - WORD middleupnormal=0xffff; - WORD middleupnormalmask=0xffff; - WORD middleupnormalskinid=0xffff; - WORD middleuppressed=0xffff; - WORD middleuppressedmask=0xffff; - WORD middleuppressedkinid=0xffff; - WORD middleupdimmed=0xffff; - WORD middleupdimmedmask=0xffff; - WORD middleupdimmedskinid=0xffff; - - WORD middledownnormal=0xffff; - WORD middledownnormalmask=0xffff; - WORD middledownnormalskinid=0xffff; - WORD middledownpressed=0xffff; - WORD middledownpressedmask=0xffff; - WORD middledownpressedkinid=0xffff; - WORD middledowndimmed=0xffff; - WORD middledowndimmedmask=0xffff; - WORD middledowndimmedskinid=0xffff; - - WORD rightdownnormal=0xffff; - WORD rightdownnormalmask=0xffff; - WORD rightdownnormalskinid=0xffff; - WORD rightdownpressed=0xffff; - WORD rightdownpressedmask=0xffff; - WORD rightdownpressedskinid=0xffff; - WORD rightdowndimmed=0xffff; - WORD rightdowndimmedmask=0xffff; - WORD rightdowndimmedskinid=0xffff; - - WORD rightupnormal=0xffff; - WORD rightupnormalmask=0xffff; - WORD rightupnormalskinid=0xffff; - WORD rightuppressed=0xffff; - WORD rightuppressedmask=0xffff; - WORD rightuppressedskinid=0xffff; - WORD rightupwndimmed=0xffff; - WORD rightupwndimmedmask=0xffff; - WORD rightupwndimmedskinid=0xffff; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_SCROLLABLE_LIST_IMAGE -// Resource definition for button -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_SCROLLABLE_LIST_IMAGE - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - LLINK pageup; - LLINK pagedown; - WORD listsep=0xffff; - WORD listsepmsk=0xffff; - WORD listspeskinid=0xffff; - } - -// ----------------------------------------------------------------------------- -// AKN_FEP_COLOR_ICON_IMAGE -// Resource definition for color icon -// ----------------------------------------------------------------------------- -// -STRUCT AKN_FEP_COLOR_ICON_IMAGE - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - WORD colorgroup=DEFAULT_ICON_COLOR_GROUP; - - WORD iconimage=0xffff; - WORD iconimagemsk=0xffff; - WORD iconimageskinid=0xffff; - } -#endif // AKNFEPCOMMONCTRLS_RH - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputlabel/peninputlabel.h --- a/textinput/peninputcommonctrls/inc/peninputlabel/peninputlabel.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: header file of button and dragbar -* -*/ - -#ifndef C_CAKNFEPCTRLLABEL_H -#define C_CAKNFEPCTRLLABEL_H - -#include -/** - * CAknFepCtrlLabel - * - * Label control. This class could be used directly by user. - * - * @lib peninputlayoutcontrol.lib - * @since S60 V5.0 - */ -class CAknFepCtrlLabel: public CFepUiBaseCtrl - { - -public: - //constructor and destructor - /** - * Destructor. - * - * @since S60 V4.0 - */ - IMPORT_C virtual ~CAknFepCtrlLabel(); - - /** - * Factory function. - * - * @since S60 V4.0 - * @param aRect The rectangle area for this control - * @param aUiLayout Ui layout who contains this control.Ownership not transferred - * @param aControlId control Id - * @return An instance of CButtonBase class - */ - IMPORT_C static CAknFepCtrlLabel* NewL(CFepUiLayout* aUiLayout,TInt aControlId); - - /** - * Set bitmap for given status . - * - * @since S60 V4.0 - * @param aBmp The bitmap. Ownership transferred to button - * @param aType The bitmap type used for - */ - IMPORT_C void SetBitmapL(CFbsBitmap* aBmp); - - /** - * Set mask bitmap for given status. - * - * @since S60 V4.0 - * @param aBmp The bitmap. Ownership transferred to button - * @param aType The bitmap type used for - */ - IMPORT_C void SetMaskBitmapL(CFbsBitmap* aBmp); - - //from base class CFepUiBaseCtrl - /** - * From CFepUiBaseCtrl - * Draw control - * - * @since S60 V4.0 - */ - IMPORT_C virtual void Draw(); - - /* Set the font for caption - * - * @since S60 V4.0 - * @param aFontSpec the font spec to be used. - */ - IMPORT_C virtual void SetFont(const TFontSpec& aFontSpec); - - /** - * Set font information - * - * @since S60 V4.0 - * @param aFont The font info for key drawing.Ownership not transferred - */ - IMPORT_C virtual void SetFont(const CFont* aFont); - - /** - * Set font text color - * - * @since S60 V4.0 - * @param aColor Color for font text - */ - IMPORT_C virtual void SetFontColor(const TRgb aColor); - - - /** - * Set text to label - * - * @since S60 v3.2 - * @param aText Display text in lable - * @return None - */ - IMPORT_C void SetText(const TDesC& aText); - - /** - * Label size changed - * - * @since S60 v3.2 - * @param aNewRect New rect for label - * @param aIsReloadImages resize image - * @return None - */ - IMPORT_C virtual void SizeChanged(TRect aNewRect, TBool aIsReloadImages); - - /** - * Set aligment - * - * @since S60 v3.2 - * @param aAlignment Text alignment - * @return None - */ - IMPORT_C virtual void SetTextAlignment(CGraphicsContext::TTextAlign aAlignment); - - /** - * Get aligment - * - * @since S60 v3.2 - * @return Text alignment - */ - IMPORT_C virtual CGraphicsContext::TTextAlign TextAlignment(); - -protected: - - /** - * Constructor - * - * @since S60 V4.0 - * @param aRect The rectangle area for this control - * @param aUiLayout Ui layout who contains this control.Ownership not transferred - * @param aControlId control Id - */ - CAknFepCtrlLabel(CFepUiLayout* aUiLayout,TInt aControlId); - - /** - * Bitmaps size changed - * - * @since S60 v3.2 - * @param aSize New size for bitmaps - * @return None - */ - void ResizeBitmaps(TSize aSize); - -private: - - /** - * bitmap for dimmed state - * Own. - */ - CFbsBitmap* iBmp; - - /** - * mask bitmap for dim stute - * Own. - */ - CFbsBitmap* iMaskBmp; - - /** - * lable caption - */ - HBufC* iText; - - /** - * Font object for key drawing - * Ownership depends on flag iFontOwnership. - */ - CFont* iFont; - - /** - * Font information for key drawing - */ - TFontSpec iFontSpec; - - /** - * Flag ownership flag. ETrue if CFont object is owned by this control. - */ - TBool iFontOwnership; - - /** - * Baseline for caption - */ - TInt iBaseline; - - /** - * Pen color for first level caption - */ - TRgb iFontColor; - - /** - * Text alignment - */ - CGraphicsContext::TTextAlign iAlignment; - - }; - -#endif // C_CAKNFEPCTRLLABEL_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputrangebar/peninputrangebar.h --- a/textinput/peninputcommonctrls/inc/peninputrangebar/peninputrangebar.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,616 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Control group of different input ranges -* -*/ - - -#ifndef C_CAKNFEPCTRLRANGEBAR_H -#define C_CAKNFEPCTRLRANGEBAR_H - -// system includes -#include - -// forward declarations -class CFbsBitmap; -class TResourceReader; -class CAknFepCtrlButton; -class CAknFepCtrlCommonButton; -// class declaration -/** - * This is the class definition for control group of different - * input ranges - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlRangeBar : public CControlGroup , public MEventObserver - { -public: - - /** - * Style of range bar, can be horizontal or vertical - */ - enum TButtonGroupStyle - { - EBtnGroupHorizontal, - EBtnGroupVertical - }; - - /** - * Action style of range bar, can be hide or highlight - */ - enum TRangeBarActionStyle - { - ERangeBarActionStyleHide, // all indicators action style are unitary: hide - ERangeBarActionStyleHighLight, // all indicators action style are unitary: highlight - ERangeBarUsingIndicatorStyle // every indicator can have different action style - }; - - /** - * Action style of indicator, can be hide or visible - * for using indicaotr action style, every indicator's position is fixed - */ - enum TIndicatorActionStyle - { - EIndicatorActionStyleHide, // hide - EIndicatorActionStyleHighLight, // visible and highlight - EIndicatorActionStyleNormal // just like normal button press, highlight not latched - }; - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aUtils An instance of the resource environment - * @param aControlId The control id of the Range Bar - * @param aStyle The style of Range Bar, can be vertical or horizontal - * @return The pointer point to CAknFepCtrlRangeBar type object - */ - IMPORT_C static CAknFepCtrlRangeBar* NewL(CFepUiLayout* aUiLayout, - TInt aControlId , - TButtonGroupStyle aStyle); - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aUtils An instance of the resource environment - * @param aControlId A control id of the Range Bar - * @param aStyle the style of Range Bar, can be vertical or horizontal - * @return The pointer point to CAknFepCtrlRangeBar type object - */ - IMPORT_C static CAknFepCtrlRangeBar* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId , - TButtonGroupStyle aStyle); - - /** - * Destructor. - * - * @since S60 v3.2 - */ - IMPORT_C virtual ~CAknFepCtrlRangeBar(); - - /** - * This function creates the Range Bar from resource type AKN_FEP_INPUTRANGE_LIST. - * The function will leave if the count of input ranges is invalid - * - * @since S60 v3.2 - * @param aReader A resource reader against AKN_FEP_INPUTMODE_LIST - * @return None - */ - IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); - - /** - * Refresh the curent Mode Control aera - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void RefreshUI(); - - /** - * Handles the SizeChanged event - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void SizeChanged(const TRect aRect); - - /** - * Set active input range - * - * @since S60 v3.2 - * @param aRange A specified input range - * @return ETrue if given input range set successfully, EFalse otherwise - */ - IMPORT_C TBool SetRange(const TInt aRange); - - /** - * Set mode of given range - * - * @since S60 v3.2 - * @param aRange A specified input range - * @param aModeIndex The mode index in given range - * @return None - */ - IMPORT_C void SetCaseL(const TInt aRange, const TInt aModeIndex); - - /** - * Set permitted input ranges - * - * @since S60 v3.2 - * @param aPermitted Used to decide which input ranges permitted - * @return None - */ - IMPORT_C void SetPermittedRanges(const TInt aPermitted); - - /** - * Permit given range or not - * - * @since S60 v3.2 - * @param aRangeId The range id of given range - * @param aPermit Used to enable given range or not - * @return None - */ - IMPORT_C void SetPermittedRange(const TInt aRangeId, TBool aPermit); - - /** - * Permit given range & case or not - * - * @since S60 v3.2 - * @param aRangeId The range id of given range - * @param aRealCaseId The real case id in given range - * @param aPermit Used to enable given range & case or not - * @return None - */ - IMPORT_C void SetPermittedCase(const TInt aRangeId, - const TInt aRealCaseId, - TBool aPermit); - - /** - * Hide given range, used when whole rangebar's actions tyle is - * hide or highlight - * - * @since S60 v3.2 - * @param aRange Given input range to be hide - * @return KErrNone if the button represent given range hided successfully, - * otherwise system wide error codes - */ - IMPORT_C void HideRange(const TInt aRange); - - /** - * Hide given range, function only used when whole range bar's action - * style is using indicator style - * - * @since S60 v3.2 - * @param aRange Given input range to be hide - * @return None - */ - IMPORT_C void HideRangeUsingIndicatorStyle(const TInt aRange); - - /** - * Show given range, used when whole rangebar's action style is - * hide or highlight - * - * @since S60 v3.2 - * @param aRange Given range to be shown - * @return None - */ - IMPORT_C void ShowRange(const TInt aRange); - - /** - * Show given range, function only used when whole range bar's action - * style is using indicator style - * - * @since S60 v3.2 - * @param aRange Given range to be shown - * @return None - */ - IMPORT_C void ShowRangeUsingIndicatorStyle(const TInt aRange); - - /** - * Add new input range - * - * @since S60 v3.2 - * @param aReader Given resource reader for new input range - * @return None - */ - IMPORT_C void AddRangeL(TResourceReader& aReader); - - /** - * Get current real case of given Range - * - * @since S60 v3.2 - * @param aRange Given range - * @return Current real case of given range - */ - IMPORT_C TInt GetCase(TInt aRange) const; - - /** - * Set font of range bar, this function should be called - * by container of range bar - * - * @since S60 v3.2 - * @param aFont The font to be set for range bar - * @return None - */ - IMPORT_C void SetFont(const CFont* aFont); - - /** - * Move range bar according to offset - * - * @since S60 v3.2 - * @param aOffset The moving offset - * @return None - */ - IMPORT_C void Move(const TPoint& aOffset); - - /** - * Set event id which will be sent out when range button is click - * - * @since S60 v3.2 - * @param aEventId the event id - * @return None - */ - IMPORT_C void SetEventIdForRange(TInt aEventId); - - /** - * Set event id which will be sent out when case button is click - * - * @since S60 v3.2 - * @param aEventId the event id - * @return None - */ - IMPORT_C void SetEventIdForCase(TInt aEventId); - - /** - * Display all ranges whether it is IsHide - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ShowAllRanges(); - - /** - * DrawRangeBar - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Draw(); - - /** - * SetActionStyle - * - * @since S60 v3.2 - * @param aActionStyle action style - * @return None - */ - IMPORT_C void SetActionStyle(TRangeBarActionStyle aActionStyle); - - /** - * ActiveRange - * - * @since S60 v3.2 - * @param aRange range to be activated - * @return None - */ - IMPORT_C void ActiveRange(TInt aRange); - - /** - * Get the current input range - * - * @since S60 v3.2 - * @return Current Input Range - */ - inline TInt InputRange() const; - - /** - * Set display style of range bar - * - * @since S60 v3.2 - * @param aNewStyle The style of range bar, can be vertical or horizontal - * @return None - */ - inline void SetStyle(const TButtonGroupStyle aNewStyle); - - /** - * Get display style of range bar - * - * @since S60 v3.2 - * @return Current display style of range bar - */ - inline TInt Style() const; - - /** - * Set layout rect of range bar, this function should be called - * by container of range bar - * - * @since S60 v3.2 - * @param aRect The layout rect to be set for range bar - * @return None - */ - inline void SetCellRect(const TRect aRect); - - /** - * Set display cell rects - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void SetDispalyCellRectsL( const RArray& aRects, - const RArray& aInnerRects ); - - -protected: - - /** - * From MEventObserver. - * Handle event - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The pointer points to control who sends event - * @param aEventData The event data - * @return None - */ - IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData); - - /** - * C++ default constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of the Range Bar - * @param aStyle The style of Range Bar, vertical or horizontal - */ - IMPORT_C CAknFepCtrlRangeBar(CFepUiLayout* aUiLayout, TInt aControlId, - TButtonGroupStyle aStyle); - - /** - * By default Symbian 2nd phase constructor is private. - * - * @since S60 v3.2 - * @param aUtils An instance of the resource environment - * @return None - */ - IMPORT_C void ConstructL(); - - /** - * handle pointer down event. - * - * @since S60 v3.2 - * @param aPoint - * @return control - */ - virtual CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); -public: // data - - /** - * Position of the default indicator - */ - TRect iIndicatorRect; - -protected: // data - - /** - * This class declares the range indicator - * Purpose of this class is to save some information for each indicator - * - * @since S60 v3.2 - */ - class TAknFepRangeIndicator - { - public: // data - /** - * Control type of button - */ - TInt iCtrlType; - - /** - * Id of the input range - */ - TInt iInputRange; - - /** - * Type of input range, used to judge if it is mixed - */ - TInt iRangeType; - - /** - * control Id of button - */ - TInt iCtrlId; - - /** - * Is button that represent iInputRange hided - */ - TBool iIsHide; - - /** - * Pointer to the indicator button (Own) - */ - CAknFepCtrlCommonButton* iIndicator; - - /** - * Indicator action style, - * value from TIndicatorActionStyle - */ - TInt iActionStyle; - - /** - * Indicator position index in cellrects list - * only meaningful when whole action style is - * ERangeBarUsingIndicatorStyle - */ - TInt iPosIdx; - }; - -private: - - /** - * Set layout rect of whole range bar - * - * @since S60 v3.2 - * @return None - */ - void SetWholeRect(); - - /** - * Get number of input ranges hided - * - * @since S60 v3.2 - * @return Number of hided input ranges - */ - TInt NumOfHidedRange(); - - /** - * Judge if button in given index has mixed range - * - * @since S60 v3.2 - * @param aIndex Given index - * @return ETrue if given index has mixed range, otherwise EFalse - */ - TBool IsMixedRange(const TInt aIndex); - - /** - * Report range or mode change event to observer - * - * @since S60 v3.2 - * @param aEventId the event id - * @param aEventData the event data - * @return None - */ - void ReportEventToObserver(const TInt aEventId, const TInt aEventData); - - /** - * Set new position to sub controls - * - * @since S60 v3.2 - * @return None - */ - void SetIndicatorRect(); - - /** - * update new position to sub controls - * this function used when indicator's rect get from cell rects list - * and whole range bar's action style is highlight or hide - * - * @since S60 v3.2 - * @return None - */ - void UpdateIndicatorRect( TBool aUpdateImage ); - - /** - * update new position to sub controls - * this function only used when indicator's rect get from cell rects list, - * and whole range bar's action style is using indicator style, every - * indicator's position is fixed - * - * @since S60 v3.2 - * @return None - */ - void UpdateIndicatorRectForUsingIndicatorStyle(TBool aUpdateImage); - - /** - * Get indicator index by given range - * - * @since S60 v3.2 - * @return Indicator index - */ - TInt IndicatorIdxByRange(TInt aRange); - - /** - * this function only used when indicator's rect get from cell rects list, - * and whole range bar's action style is using indicator style, and indicator - * to be hiden is using hide action style - * - * @since S60 v3.2 - * @param aIdx Indicator index to be hiden - * @param aHide Whether hide or show indicator - * @return None - */ - void HideRangeForHidingIndicatorStyle(TInt aIdx, TBool aHide); - -private: // data - - /** - * Array of input range indicators - */ - RPointerArray iIndicators; - - /** - * Current active input range - */ - TInt iInputRange; - - /** - * A rect used to erase the screen - */ - TRect iEraseRect; - - /** - * Style of range bar - */ - TButtonGroupStyle iStyle; - - /** - * Current font of range bar - */ - const CFont* iFont; - - /** - * event id for range button click - */ - TInt iEventIdForRange; - - /** - * event id for case button click - */ - TInt iEventIdForCase; - - /** - * Whether resize images as well, - * if only the position of the button changed, - * no need to reset the images as well - */ - TBool iIsReloadImages; - - /** - * action style - */ - TRangeBarActionStyle iActionStyle; - - /** - * First time construct flag - */ - TBool iFirstTimeConstruct; - - /** - * Rangebar cell rect - */ - RArray iCellRects; - RArray iCellInnerRects; - TBool iCellChanged; - }; - -#include "peninputrangebar.inl" - -#endif // C_CAKNFEPCTRLRANGEBAR_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputrangebar/peninputrangebar.inl --- a/textinput/peninputcommonctrls/inc/peninputrangebar/peninputrangebar.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: inline file of range bar -* -*/ - - -inline TInt CAknFepCtrlRangeBar::InputRange() const - { - return iInputRange; - } - -inline void CAknFepCtrlRangeBar::SetStyle(const TButtonGroupStyle aNewStyle) - { - iStyle = aNewStyle; - } - -inline TInt CAknFepCtrlRangeBar::Style() const - { - return iStyle; - } - -inline void CAknFepCtrlRangeBar::SetCellRect(const TRect aRect) - { - iIndicatorRect = aRect; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputselectionlist/peninputcommonchoicelist.h --- a/textinput/peninputcommonctrls/inc/peninputselectionlist/peninputcommonchoicelist.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: header file of choice list window -* -*/ - -#ifndef C_PENINPUTCOMMONCHOICELIST_H -#define C_PENINPUTCOMMONCHOICELIST_H - -// INCLUDES -#include -#include -#include -#include - -/** class forward decalaration */ -class CFepUiLayout; - -enum ECommonChoiceListStyle - { - EFixedLength, - EAutoFitLength - }; - -/** - * CPeninputCommonChoiceList class - * - * This class for touch input common choice list. The prop. of - * this control is depend on laf data. - * - * @lib - * @since S60 v5.0 - */ -class CPeninputCommonChoiceList : public CFepLayoutChoiceList - { -public: - - /** - * Symbian Constructor - * - * @since S60 v5.0 - * @param aUiLayout Pointer to uilayout - * @param aControlId Choice list id - * @param aItemSkinID Item skin id - * @param aBackgroundSkinID Background skin id - * @return Pointer to created CPeninputCommonChoiceList object - */ - IMPORT_C static CPeninputCommonChoiceList* NewL( CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aItemSkinID, - TAknsItemID aBackgroundSkinID, - ECommonChoiceListStyle aListStyle = EAutoFitLength); - - /** - * Destructor - * - * @since S60 v5.0 - * @return None - */ - IMPORT_C virtual ~CPeninputCommonChoiceList(); - - /** - * Add rect of item to the end of list - * - * @param aRect The rect of the item - * @since S60 v5.0 - * @return None - */ - IMPORT_C void AddItemRectL( const TRect& aRect ); - - /** - * Remove all the rects of item - * - * @since S60 v5.0 - * @return None - */ - IMPORT_C void RemoveAllItemsRect(); - - /** - * Set text layout data - * - * @param aTextLayout Text layout from laf data - * @since S60 v5.0 - * @return None - */ - IMPORT_C void SetTextLayout( const TAknTextLineLayout& aTextLayout ); - - /** - * Set list column count. The maxium column of the control is based on the laf - * Any number exceeds the maxium will be ignored. - * - * @param aMaxCount - * @since S60 v5.0 - * @return None - */ - IMPORT_C void SetListColumnNumWithLafL( TInt aMaxCount); - - /** - * Set skin ID - * - * @param aItemSkinID item skin ID - * @param aBackgroundSkinID background skin ID - * @since S60 v5.0 - * @return None - */ - IMPORT_C void SetListSkinID( TAknsItemID aItemSkinID, TAknsItemID aBackgroundSkinID ); - /** - * Hit Test - * - * @param aPoint touched point - * @return Index of list. - */ - IMPORT_C TInt HitTest(const TPoint& aPoint); -protected: - /** - * Constructor. - * - * @since S60 V4.0 - * @param aUiLayout Ui layout who contains this control.Ownership not transferred - * @param aControlId control Id - * @param aItemSkinID Item skin id - * @param aBackgroundSkinID Background skin id - */ - IMPORT_C CPeninputCommonChoiceList( CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aItemSkinID, - TAknsItemID aBackgroundSkinID, - ECommonChoiceListStyle aListStyle ); - - TInt MaxWidthOfListItem(); -private: - /** - * Choice list draw function - * - * @since S60 V4.0 - * @return None. - */ - IMPORT_C virtual void Draw(); - - /** - * Calculate rect based on item count. (only length, suppose the count is fixed) - * - * @since S60 V4.0 - * @return None. - */ - IMPORT_C virtual void ReCalcLayout(); - - void DrawBackground(); - void DrawItem( TInt aIndex, TBool aIsFocus ); -private: // data - /** - * Item rect array. - */ - RArray iItemRects; - - /** - * Item text layout - */ - TAknTextLineLayout iTextLayout; - - /** - * The skin ID of sub item and background - */ - TAknsItemID iItemSkinID; - TAknsItemID iBackgroundSkinID; - - /** - * The style of the list - */ - ECommonChoiceListStyle iListStyle; - - /** - * The last column number of the list - */ - TInt iLastColumnNum; - }; - -#endif //C_PENINPUTCOMMONCHOICELIST_H -//End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputselectionlist/peninputlayoutinputmodechoice.h --- a/textinput/peninputcommonctrls/inc/peninputselectionlist/peninputlayoutinputmodechoice.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,247 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: header file of choice list window -* -*/ - -#ifndef C_FEPLAYOUTINPUTMODELCHOICE_H -#define C_FEPLAYOUTINPUTMODELCHOICE_H - -// INCLUDES -#include -#include -#include -#include - -/** class forward decalaration */ -class CFepUiLayout; -class CRepository; - -//CONSTANT -const TInt KTouchInputModeCount = 4; - -/** - * CPeninputLayoutInputmodelChoice class - * - * This class for touch input mode switch - * - * @lib peninputmodeswitchutils - * @since S60 v5.0 - */ -class CPeninputLayoutInputmodelChoice : public CPeninputCommonChoiceList - { - -public: - - /** - * Symbian Constructor - * - * @since S60 v5.0 - * @param aUiLayout Pointer to uilayout - * @param aControlId Choice list id - * @param aInputMode Pen input mode - * @return Pointer to created CPeninputLayoutInputmodelChoice object - */ - IMPORT_C static CPeninputLayoutInputmodelChoice* NewL(CFepUiLayout* aUiLayout, TInt aControlId, - TPluginInputMode aInputMode); - - /** - * Destructor - * - * @since S60 v5.0 - * @return None - */ - IMPORT_C virtual ~CPeninputLayoutInputmodelChoice(); - - - /** - * Pop up touch input switch list - * - * @since S60 v5.0 - * @param aPoint Reference to pop up windows left and top point - * @param aListUnderBtn list is under the button - * @return none - */ - IMPORT_C void PopUpSwitchListL( const TRect& aRtControl ); - - /** - * Set current editor is Secret - * - * @since S60 V4.0 - * @param aLanguage Input language - * @return none - */ - IMPORT_C void SetSecretEditor(TBool aSecure); - - /** - * Get switch list rect - * - * @since S60 v5.0 - * @return list rect - */ - IMPORT_C TRect SwitchListRect(); - -private: - - /** - * Symbian second-phase constructor - * - * @since S60 v5.0 - * @return None - */ - void CustomConstructL(); - - /** - * Initialize internal control - * - * @since S60 v5.0 - * @return none - */ - void DoInitializeControlL(); - - /** - * C++ constructor. - * - * @since S60 v5.0 - * @param aUiLayout Pointer to uilayout - * @param aInputMode Pen input mode - * @return None - */ - CPeninputLayoutInputmodelChoice(CFepUiLayout* aUiLayout, TInt aControlId, - TPluginInputMode aInputMode); - - /** - * Insert choice item to input mode switch list - * - * @since S60 v5.0 - * @param aReader Reference to resource reader - * @param aRsFile Reference to file resource - * @return None - */ - void CreateChoiceItemL( TResourceReader &aReader, RResourceFile& aRsFile ); - - /** - * Create choice item icon - * - * @since S60 v5.0 - * @param aReader Reference to resource reader - * @param aBmpFileName Reference to file name - * @param aMajorSkinId Major skin id - * @return ETrue for creating icon successfully; otherwise EFalse - */ - TBool CreateItemIconL(TResourceReader &aReader, CFbsBitmap** aImg, TPtrC& aBmpFileName, - TInt32 aMajorSkinId); - - /** - * Get main pane rect - * - * @since S60 v5.0 - * @return Main pane rect - */ - TRect MainPaneRect(); - - /** - * nsert list item - * - * @since S60 v5.0 - * @param aIndex Item array index - * @param aInputMode Pen input mode - * @return none - */ - void InsertListItemL( const CFepLayoutChoiceList::SItem& item,TInt aInputMode ); - - /** - * Application size Changed - * - * @since S60 v5.0 - * @return none - */ - void SizeChanged(); - - - /** - * Get hide flag - * - * @since S60 V4.0 - * @return ETrue if control is hiden, otherwise EFalse - */ - TBool Hiden(); - - /** - * Reset choice list item - * - * @since S60 v5.0 - * @return none - */ - void ResetListItemL(); -private: // data - - CFepUiLayout* iUiLayout; - /** - * The background bitmap of popup window - */ - CFbsBitmap* iPopupWndBgImg; - - /** - * The focus bitmap of popup window (not own) - */ - CFbsBitmap* iPopupWndFocusImg; - - /** - * Popup window item size - */ - TSize iPopupItemSize; - - /** - * This control is construced - */ - TBool iConstructed; - - /** - * This control is construced - */ - TPluginInputMode iCurPluginInputMode; - - /** - * Input mode item array - */ - //CFepLayoutChoiceList::SItem iInputModeItem[KTouchInputModeCount]; - - RArray iInputModeItems; - /** - * Editor secure flag - */ - TBool iSecretEditor; - - /** - * Editor secure flag - */ - TRect iItemRect; - - - /** - * Text input language - */ - TLanguage iInputLanguage; - - /** - * fep repository key - */ - CRepository* iAknFepRepository; - - }; - -//#include "peninputlayoutchoicelist.inl" -#endif //C_FEPLAYOUTINPUTMODELCHOICE_H -//End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputselectionlist/peninputscrollablelist.h --- a/textinput/peninputcommonctrls/inc/peninputselectionlist/peninputscrollablelist.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,245 +0,0 @@ -/* -* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: header file of button and dragbar -* -*/ - -#ifndef C_FEPLAYOUTSCROLLABLELIST_H -#define C_FEPLAYOUTSCROLLABLELIST_H - -#include -#include -#include -#include - -#define FORMATPAGEINFO(des, ktxt, parm...) {des.Format(ktxt, parm);}; - -class CAknFepCtrlCommonButton; - -class CFepLayoutScrollableList : public CFepLayoutChoiceList, public MEventObserver - { -public: - IMPORT_C static CFepLayoutScrollableList* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize); - - IMPORT_C static CFepLayoutScrollableList* NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize); - - IMPORT_C virtual ~CFepLayoutScrollableList(); - - IMPORT_C void ConstructFromResourceL(); - - IMPORT_C void SizeChanged(TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize); - - IMPORT_C void SetTextProperty(const CFont* aFont, - TRgb aFontColor); - - IMPORT_C void SetImgFrId(TAknsItemID aBgFrId, - TAknsItemID aNaviFrId, - TAknsItemID aNaviActiveFrId, - TAknsItemID aNaviDimFrId, - TAknsItemID aItemFrId, - TAknsItemID aItemActiveFrId); - - inline void SetTextLineLayout(TAknTextLineLayout aTextLine); - - inline void SetPageInfoTextLineLayout(TAknTextLineLayout aTextLine); - inline void SetPageInfoFormatL(const TDesC& aFormat); - - // if current page include special item, the count also include - // special item - inline void SetOnePageItemCount(TInt aItemCount); - - inline void SetSpecialItemOn(TBool aOn); - - // get whole control width except item width - inline TInt CtrlWidthExceptItem(); - - // get whole control height - inline TInt CtrlHeight(); - - IMPORT_C void Draw(); - - IMPORT_C void ReCalcLayout(); - - IMPORT_C void UpdateNaviButtonStates(); - - IMPORT_C void SetListSeperationRect( const TRect& aRect ); - - inline void SetPageInfoResID( TInt aResID ); - - /** - * Hide or shoe control. A hiden control will not handle the event. - * - * @since S60 V4.0 - * @param aFlag ETrue if want to hide the control. - */ - IMPORT_C virtual void Hide(TBool aFlag); - -protected: - - IMPORT_C CFepLayoutScrollableList(CFepUiLayout* aUiLayout, - TInt aControlId, - TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize); - - IMPORT_C void ConstructL(); - - IMPORT_C TInt HitTest(const TPoint& aPoint); - - IMPORT_C virtual void DrawItem(TInt aItemIndex, TBool aItemActive = EFalse); - - IMPORT_C virtual void CalculateItemWidth(); - - IMPORT_C virtual void DrawPageInfo(); - - - void ScrollPageUp(); - - void ScrollPageDown(); - - IMPORT_C void Move(const TPoint& aOffset); - -private: - void CalcPageInfo(); -protected: - //from MEventObserver - IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData); - - IMPORT_C void UpdatePageInfoL( TInt aCurrentPage, TInt aTotalPage ); - -#ifdef RD_TACTILE_FEEDBACK - // Update tactile feedback area when scroll page up and down. - void UpdateFeedbackArea(); -#endif // RD_TACTILE_FEEDBACK - -protected: - TPoint iTopLeftPoint; - TSize iItemSize; - TSize iNaviSize; - TSize iNaviInnerSize; - TInt iHorizontalMargin; - TInt iVerticalMargin; - TInt iBaselineOffset; - const CFont* iFont; - TRgb iFontColor; - TAknTextLineLayout iTextLine; - TBool iTextLineSet; - TAknTextLineLayout iPageInfoTextLine; - TBool iPageInfoLineSet; - - RPointerArray iBmpList; - - TAknsItemID iBgFrId; - // used for special item - TAknsItemID iItemFrId; - TAknsItemID iItemActiveFrId; - - TBool iSpecialItemOn; - TBool iNaviBtnShown; - - HBufC* iPageInfoFormat; - HBufC* iPageInfo; - TInt iCurrentPage; - TInt iTotalPages; - - //TPoint iTlPos; - TInt iOnePageItemCnt; - TRect iContentRect; - TRect iScrollRect; - TRect iPageUpRect; - TRect iPageDownRect; - TRect iPageInfoRect; - RArray iItemRects; - CAknFepCtrlCommonButton* iPageUp; - CAknFepCtrlCommonButton* iPageDown; - - // List speration - TRect iSeperationRect; - CFbsBitmap* iSeperationBmp; //own - CFbsBitmap* iSeperationMaskBmp; // own - - // Res ID of page info - TInt iPageInfoResID; - - TRect iLastPageItemRect; - TInt iInitItemWidth; - }; - -inline void CFepLayoutScrollableList::SetTextLineLayout(TAknTextLineLayout aTextLine) - { - iTextLine = aTextLine; - iTextLineSet = ETrue; - } -inline void CFepLayoutScrollableList::SetPageInfoTextLineLayout(TAknTextLineLayout aTextLine) - { - iPageInfoTextLine = aTextLine; - iPageInfoLineSet = ETrue; - } - -inline void CFepLayoutScrollableList::SetPageInfoFormatL(const TDesC& aFormat) - { - delete iPageInfoFormat; - iPageInfoFormat = NULL; - iPageInfoFormat = aFormat.AllocL(); - - // on the assumption that page info do not beyond 100 - delete iPageInfo; - iPageInfo = NULL; - iPageInfo = HBufC::NewL(aFormat.Length() + 6); - } - -inline void CFepLayoutScrollableList::SetOnePageItemCount(TInt aItemCount) - { - iOnePageItemCnt = aItemCount; - } - -inline void CFepLayoutScrollableList::SetSpecialItemOn(TBool aOn) - { - iSpecialItemOn = aOn; - } - -inline TInt CFepLayoutScrollableList::CtrlWidthExceptItem() - { - return 4*iHorizontalMargin + iNaviSize.iWidth; - } - -inline TInt CFepLayoutScrollableList::CtrlHeight() - { - return (iOnePageItemCnt + 1)*iVerticalMargin + iOnePageItemCnt*iItemSize.iHeight; - } - -inline void CFepLayoutScrollableList::SetPageInfoResID( TInt aResID ) - { - iPageInfoResID = aResID; - } -#endif //C_FEPLAYOUTSCROLLABLELIST_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputselectionlist/peninputselectionlist.h --- a/textinput/peninputcommonctrls/inc/peninputselectionlist/peninputselectionlist.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef C_CPENINPUTSELECTIONLIST_H -#define C_CPENINPUTSELECTIONLIST_H - -#include -#include -#include - -class CPenInputSelectionList : public CFepUiBaseCtrl - { -public: - struct SItem - { - SItem(TRect aRect, const TDesC& aText) - :iRect(aRect), iText(aText) - { - } - - TRect iRect; - const TDesC& iText; - }; - - enum TSelectionListBmpType - { - EBmpNormal, - EBmpNormalMask, - EBmpHighlight, - EBmpHighlightMask, - EBmpLastType = EBmpHighlightMask - }; - -public: - IMPORT_C static CPenInputSelectionList* NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TPoint aTopLeftPoint, - TSize aItemSize, - TInt aItemHorizontalMargin); - - IMPORT_C ~CPenInputSelectionList(); - - IMPORT_C void SizeChanged(TPoint aTopLeftPoint, - TSize aItemSize, - TInt aItemHorizontalMargin); - - // control rect is calculated by item count - IMPORT_C void SetItemsL(const RPointerArray& aItemList); - - IMPORT_C void AddItemL(const TDesC& aItem); - - IMPORT_C void RemoveItem(TInt aItemIndex); - - IMPORT_C void RemoveAllItems(); - - IMPORT_C void ConstructFromResourceL(); - - IMPORT_C void SetTextProperty(const CFont* aFont, - TRgb aFontColor); - - IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); - IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); - IMPORT_C CFepUiBaseCtrl* HandlePointerMoveEventL(const TPoint& aPoint); - - IMPORT_C void Display(); - - IMPORT_C void CloseWindow(); - - inline void SetTextLineLayout(TAknTextLineLayout aTextLine); - - inline void SetEventIdForItemSelected(TInt aEventId); - - inline void SetBgFrId(TAknsItemID aFrId, TAknsItemID aCenterFrId); - - void Draw(); - -private: - - CPenInputSelectionList(CFepUiLayout* aUiLayout, - TInt aControlId, - TPoint aTopLeftPoint, - TSize aItemSize, - TInt aItemHorizontalMargin); - - void ConstructL(); - - void RecalculateCtrlRect(); - - // get item whose region contains the point - TInt HitTest(const TPoint& aPoint); - - void DrawItem(TInt aItemIndex); - - void CalculateFrameRects(const TRect aRect, TRect& aOuterRect, TRect& aInnerRect) const; -private: - - RArray iItemList; - TPoint iTopLeftPoint; - TSize iItemSize; - TInt iItemHorizontalMargin; - TInt iBaselineOffset; - const CFont* iFont; - TRgb iFontColor; - TAknTextLineLayout iTextLine; - - TInt iFocusItemIndex; - - RPointerArray iBmpList; - - TInt iEventId; - TBool iTextLineSet; - TAknsItemID iFrId; - TAknsItemID iCenterFrId; - }; - -inline void CPenInputSelectionList::SetTextLineLayout(TAknTextLineLayout aTextLine) - { - iTextLine = aTextLine; - iTextLineSet = ETrue; - } - -inline void CPenInputSelectionList::SetEventIdForItemSelected(TInt aEventId) - { - iEventId = aEventId; - } - -inline void CPenInputSelectionList::SetBgFrId(TAknsItemID aFrId, TAknsItemID aCenterFrId) - { - iFrId = aFrId; - iCenterFrId = aCenterFrId; - } - -#endif // C_CPENINPUTSELECTIONLIST_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrlext.h --- a/textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrlext.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: vkb extenting control -* -*/ - - -#ifndef C_CPENINPUTVKBCTRLEXT_H -#define C_CPENINPUTVKBCTRLEXT_H - -// System includes -#include - -// Forward decalaration -class CPeninputVkbLayoutInfo; - -/** - * vkb extenting control class - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputVkbCtrlExt : public CVirtualKeyboard - { - -public: - - /** - * Create one CPeninputVkbCtrlExt object - * - * @since S60 v3.2 - * @param aRect The rectangle of the control - * @param aUiLayout The layout plugin - * @param aControlId This control ID - * @param aFont The pointer to CFont object - * @return The pointer to CPeninputVkbCtrlExt object - */ - IMPORT_C static CPeninputVkbCtrlExt* NewL( const TRect& aRect, - CFepUiLayout* aUiLayout, - TInt aControlId, - const CFont* aFont, - TBool aIrregular = EFalse); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputVkbCtrlExt(); - - /** - * Handle size changing of vkb extenting control - * - * @since S60 v3.2 - * @param aUnitWidth Width of unit of vkb extenting control - * @param aUnitHeight Height of unit of vkb extenting control - * @param aLeftTopPoint The left top point of vkb extenting control - * @return None - */ - IMPORT_C void SizeChanged( const TInt aUnitWidth, - const TInt aUnitHeight, - const TPoint& aLeftTopPoint ); - - /** - * Handle size changing of vkb extenting control - * - * @since S60 v3.2 - * @param aUnitWidth Width of unit of vkb extenting control - * @param aUnitHeight Height of unit of vkb extenting control - * @param aLeftTopPoint The left top point of vkb extenting control - * @return None - */ - IMPORT_C void SizeChanged( const TRect& aRect ); - - /** - * Reorganize Vkb Keys - * - * @since S60 v3.2 - * @param aVkbLayout The vkb layout info - * @return None - */ - IMPORT_C void ReorganizeVkbKeys( CPeninputVkbLayoutInfo* aVkbLayoutInfo ); - - /** - * Move the vkb extenting control - * - * @since S60 v3.2 - * @param aOffset The offset to be moved - * @return None - */ - IMPORT_C void Move( const TPoint& aOffset ); - - /** - * Reset some value of the control - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Reset(); - - /** - * Dim keys in vkb extenting control - * - * @since S60 v3.2 - * @param aPermitted The permitted unicodes - * @return None - */ - IMPORT_C void DimKeys( const HBufC* aPermitted ); - - /** - * Cancel dim of all keys - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void CancelDims(); - - /** - * Dim keys in vkb extenting control - * - * @since S60 v3.2 - * @param aSet The unicodes set - * @param aDim The flag of dim or not - * @return None - */ - IMPORT_C void DimKeySet( const HBufC* aSet, TBool aDim ); - - /** - * Read resource and construct - * - * @since S60 v5.0 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); -protected: - - /* - * Constructor - * - * @since S60 v3.2 - * @param aRect The rectangle of the control - * @param aUiLayout The layout plugin - * @param aControlId The control ID - * @param aFontSpec The specification of font - * @return None - */ - IMPORT_C CPeninputVkbCtrlExt( const TRect& aRect, - CFepUiLayout* aUiLayout, - TInt aControlId, - const TFontSpec& aFontSpec, - TBool aIrregular = EFalse); - -protected: // Data - /** - * The vkb layout info - * Not own - */ - CPeninputVkbLayoutInfo* iVkbLayoutInfo; - -private: // Data - - - /** - * The unit width - */ - TInt iUnitWidth; - - /** - * The unit height - */ - TInt iUnitHeight; - - /** - * The left top point - */ - TPoint iLeftTopPoint; - }; - -#endif // C_CPENINPUTVKBCTRLEXT_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrllayout.h --- a/textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrllayout.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,786 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: vkb layout inline function -* -*/ - - -#ifndef C_CAKNFEPCTRLVKBLAYOUT_H -#define C_CAKNFEPCTRLVKBLAYOUT_H - -// system includes -#include -#include - -// forward declarations -class CPeninputVkbLayoutInfo; -class CPeninputVkbCtrlExt; - -// class declarations -/** - * Basic functionality for graphic buttons - * It provides creation from resource and can react according to SizeChanged Msg - * - * @lib fepcommonctrls.lib - * @since S60 v3.2 - */ -class CAknFepCtrlVkbLayout : public CBase - { -public: - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlButton type object - */ - IMPORT_C static CAknFepCtrlVkbLayout* NewL(); - - /** - * Two-phased constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - * @return The pointer point to CAknFepCtrlButton type object - */ - IMPORT_C static CAknFepCtrlVkbLayout* NewLC(); - - /** - * Destructor. - * - * @since S60 v3.2 - */ - IMPORT_C virtual ~CAknFepCtrlVkbLayout(); - - /** - * This function creates the input range button from resource, - * before calling this function, caller should set resource id of - * range button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * This function get the vkb layout info list - * - * @since S60 v3.2 - * @return The vkb layout info list - */ - IMPORT_C RPointerArray VkbLayoutInfoList(); - - /** - * Get virtual keyboard - * - * @since S60 v3.2 - * @return The pointer to CPeninputVkbCtrlExt object - */ - IMPORT_C void SetVkbKeyboard( CPeninputVkbCtrlExt* aVkbCtrl ); - - /** - * This function get the vkb layout ID - * - * @since S60 v3.2 - * @return The vkb layout ID - */ - IMPORT_C void ChangeVkbLayout( TInt aVkbLayoutId ); - - /** - * Set resource Id - * - * @since S60 V4.0 - * @param aResId The resource id; - */ - IMPORT_C void SetResourceId(TInt32 aResId); - - /** - * Set resource Id - * - * @since S60 V4.0 - * @param aResId The resource id; - */ - IMPORT_C void SetIrregularResourceId(TInt32 aResId); - - /** - * Set resource Id - * - * @since S60 V4.0 - * @param aResId The resource id; - */ - IMPORT_C void SetNonIrregularResourceId(TInt32 aResId); - - /** - * This function creates the input range button from resource, - * before calling this function, caller should set resource id of - * range button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromIrregularResourceL(); - - /** - * This function creates the input range button from resource, - * before calling this function, caller should set resource id of - * range button first - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromNonIrregularResourceL(); - - /** - * Reset - * - * @since S60 V4.0 - */ - IMPORT_C void Reset(); - -protected: - - /** - * C++ default constructor. - * - * @since S60 v3.2 - * @param aUiLayout An instance of CFepUiLayout - * @param aControlId The control id of input range button - */ - CAknFepCtrlVkbLayout(); - - void ConstructL(); - -private: - - void CreateIrregularKeyBitmapsL(TResourceReader& reader, - TPtrC& bmpFileName, - TVirtualKeyIrregularKeyType aKeyType); - - void CreateIrregularKeyBitmapL(TResourceReader& reader, TPtrC& bmpFileName, - TVirtualKeyIrregularKeyType aKeyType , - TVirtualKeyIrregularKeyState aKeyState, - TVirtualKeyIrregularKeyState aKeyStateMask); - -protected: - - RPointerArray iVkbLayoutInfoList; - - /** - * The first time construct flag of button - */ - TBool iFirstTimeConstruct; - - /** - * The resource Id associatied with this control - */ - TInt32 iResourceId; - - /** - * The resource Id associatied with this control - */ - TInt32 iIrregularResId; - - /** - * The resource Id associatied with this control - */ - TInt32 iNonIrregularResId; -private: - - /** - * The vkb extenting control for vkb area - * Not own - */ - CPeninputVkbCtrlExt* iVkbCtrl; - - /** - * The vkb layout ID - */ - TInt iVkbLayoutId; - }; - - - -class CVirtualKey; - -/** - * Vkb key info definition - * - * This class is to define key info. Application can create it from - * resource file. Key info includes Unicode, begin row, end row, - * begin column and end column. - * - * @lib peninputvkb.lib - * @since S60 v3.2 - */ -class CPeninputVkbKeyInfo : public CBase - { - -public: - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputVkbKeyInfo object - */ - IMPORT_C static CPeninputVkbKeyInfo* NewL( TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputVkbKeyInfo(); - - /** - * Get unicode logical string - * - * @since S60 v3.2 - * @return unicode logical string - */ - inline HBufC* Unicode() const; - - /** - * Get key's scan code - * - * @since S60 v3.2 - * @return Key's scan code - */ - inline TInt ScanCode() const; - - /** - * Get key's begin row - * - * @since S60 v3.2 - * @return Key's begin row - */ - inline TInt BeginRow() const; - - /** - * Get key's begin column - * - * @since S60 v3.2 - * @return Key's begin column - */ - inline TInt BeginColumn() const; - - /** - * Get key's end row - * - * @since S60 v3.2 - * @return Key's end row - */ - inline TInt EndRow() const; - - /** - * Get key's end column - * - * @since S60 v3.2 - * @return Key's end column - */ - inline TInt EndColumn() const; - - /** - * Get high light bitmap index - * - * @since S60 v3.2 - * @return High light bitmap index - */ - inline TInt HighlightBmpIndex()const; - - /** - * Get high light mask bitmap index - * - * @since S60 v3.2 - * @return High light mask bitmap index - */ - inline TInt HighlightMaskBmpIndex() const; - - /** - * Get virtual key - * - * @since S60 v3.2 - * @return The pointer to CVirtualKey object - */ - inline CVirtualKey* Key() const; - - void SetIrregularKeyType(TInt aColumns); - -protected: - - /** - * Second phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - - /** - * Contruct from resource - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructFromResourceL( TResourceReader& aReader ); - -private: - - /** - * Create key - * - * @since S60 v3.2 - * @return None - */ - void CreateKeyL(); - - TVirtualKeyIrregularKeyType KeyTypeFromColumn(TInt aColumns); - -private: // data - - /** - * Key unicode string - */ - HBufC* iUnicode; - - /** - * Scan code - */ - TInt iScanCode; - - /** - * Begin row - */ - TInt iBeginRow; - - /** - * Begin column - */ - TInt iBeginColumn; - - /** - * End row - */ - TInt iEndRow; - - /** - * End column - */ - TInt iEndColumn; - - /** - * High light bitmap index - */ - TInt iHighlightBmpIndex; - - /** - * High light mask bitmap index - */ - TInt iHighlightMaskBmpIndex; - - /** - * Virtual key - * Own - */ - CVirtualKey* iKey; - - }; - -/** - * vkb layout definition - * - * This class is to implement vkb layout. Application can create it from resource - * file. This class is to control vkb interface layout. - * - * @lib peninputvkb.lib - * @since S60 v3.2 - */ -class CPeninputVkbLayoutInfo : public CBase - { - -public: - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputVkbLayoutInfo object - */ - IMPORT_C static CPeninputVkbLayoutInfo* NewL( - TResourceReader& aReader ); - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputVkbLayoutInfo object - */ - IMPORT_C static CPeninputVkbLayoutInfo* NewLC( - TResourceReader& aReader ); - - /** - * Get real size from vkb layout - * - * @since S60 v3.2 - * @param aUnitWidth Unit width - * @param aUnitHeight Unit height - * @return The unit size - */ - IMPORT_C const TSize GetRealSize( const TInt aUnitWidth, - const TInt aUnitHeight ) const; - - /** - * Reset unit size - * - * @since S60 v3.2 - * @param aUnitWidth Unit width - * @param aUnitHeight Unit height - * @param aUnitCharWidth Unit char width - * @param aUnitCharHeight Unit char height - * @param aCharLeftTopPoint Left top point of unit char - * @return None - */ - IMPORT_C void ResetSize( const TInt aUnitWidth, - const TInt aUnitHeight, - const TInt aUnitCharWidth, - const TInt aUnitCharHeight, - const TPoint& aCharLeftTopPoint, - const CFont* aFont ); - - - /** - * Reset unit size - * - * @since S60 v3.2 - * @param aSize Keyboard size - * @return None - */ - IMPORT_C void ResetLayoutInfo( const TSize& aSize); - - - - /** - * Reset unit size - * - * @since S60 v3.2 - * @param aUnitWidth Unit width - * @param aUnitHeight Unit height - * @param aUnitCharWidth Unit char width - * @param aUnitCharHeight Unit char height - * @param aCharLeftTopPoint Left top point of unit char - * @return None - */ - IMPORT_C void SetKeyInfo(const TInt aRow, - const TInt aColumn, - const TRect& aKeyRect, - const TRect& aCharRect, - const CFont* aFont ); - - - - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputVkbLayoutInfo(); - - /** - * Find the key from the vkb accroding to the unicode - * - * @since S60 v3.2 - * @param aUnicode Unicode - * @return The pointer to CPeninputVkbKeyInfo object - */ - IMPORT_C CPeninputVkbKeyInfo* FindKey( const TInt aUnicode ) const; - - /** - * Get layout id - * - * @since S60 v3.2 - * @return Layout id - */ - inline TInt LayoutID() const; - - /** - * Get column count - * - * @since S60 v3.2 - * @return Column count - */ - inline TInt Columns() const; - - /** - * Get row count - * - * @since S60 v3.2 - * @return Row count - */ - inline TInt Rows() const; - - /** - * Get the unit's width - * - * @since S60 v3.2 - * @return The unit's width - */ - inline TInt UnitWidth() const; - - /** - * Get the unit's height - * - * @since S60 v3.2 - * @return The unit's height - */ - inline TInt UnitHeight() const; - - /** - * Get the char's width - * - * @since S60 v3.2 - * @return The char's width - */ - inline TInt UnitCharWidth() const; - - /** - * Get the char's height - * - * @since S60 v3.2 - * @return The char's height - */ - inline TInt UnitCharHeight() const; - - /** - * Get the char's left top point - * - * @since S60 v3.2 - * @return The char's left top point - */ - inline TPoint CharLeftTopPoint() const; - - /** - * Get the char's font - * - * @since S60 v3.2 - * @return The char's font - */ - inline const CFont* CharFont() const; - - /** - * Get background bitmap - * - * @since S60 v3.2 - * @return The pointer to background bitmap - */ - inline CFbsBitmap* BgBmp() const; - - /** - * Get mask bitmap - * - * @since S60 v3.2 - * @return The pointer to background mask bitmap - */ - inline CFbsBitmap* BgMaskBmp() const; - - /** - * Get dim bitmap - * - * @since S60 v3.2 - * @return The pointer to dim bitmap - */ - inline CFbsBitmap* DimBmp() const; - - /** - * Get dim mask bitmap - * - * @since S60 v3.2 - * @return The pointer to dim mask bitmap - */ - inline CFbsBitmap* DimMaskBmp() const; - - /** - * Get key info array - * - * @since S60 v3.2 - * @return Key info array - */ - inline RPointerArray KeyInfoList() const; - - /** - * Get high light bitmap array - * - * @since S60 v3.2 - * @return High light bitmap array - */ - inline RPointerArray HighlightBmps() const; - - /** - * Get high light mask bitmap array - * - * @since S60 v3.2 - * @return High light mask bitmap array - */ - inline RPointerArray HighlightMaskBmps() const; - - /** - * Move key to certain point - * - * @since S60 v3.2 - * @param aTopLeft Point to move - * @return None - */ - IMPORT_C void MoveKeys( const TPoint& aTopLeft ); - - /** - * Construct from resourcr file - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructFromResourceL( TResourceReader& aReader, - CPeninputVkbCtrlExt* aVkbCtrl = NULL, - TInt aVkbLayoutId = 0 ); - -protected: - - /** - * C++ default constructor - * - * @since S60 v3.2 - * @return None - */ - CPeninputVkbLayoutInfo(); - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - -public: - TBool iIrregular; - -private: // data - - /** - * Layout id - */ - TInt iLayoutID; - - /** - * Column count - */ - TInt iColumns; - - /** - * Row count - */ - TInt iRows; - - /** - * Unit width - */ - TInt iUnitWidth; - - /** - * Unit height - */ - TInt iUnitHeight; - - /** - * Unit char width - */ - TInt iUnitCharWidth; - - /** - * Unit char height - */ - TInt iUnitCharHeight; - - /** - * Char left top point - */ - TPoint iCharLeftTopPoint; - - /** - * Key font - */ - const CFont* iFont; - - /** - * Last point - */ - TPoint iLastTopLeft; - - /** - * Background bitmap - * Own - */ - CFbsBitmap* iBgBmp; - - /** - * Background mask bitmap - * Own - */ - CFbsBitmap* iBgMaskBmp; - - /** - * Dim bitmap - * Own - */ - CFbsBitmap* iDimBmp; - - /** - * Dim mask bitmap - * Own - */ - CFbsBitmap* iDimMaskBmp; - - /** - * Key info array - */ - RPointerArray iKeyInfoList; - - /** - * High light bitmap array - */ - RPointerArray iHighlightBmps; - - /** - * High light mask bitmap array - */ - RPointerArray iHighlightMaskBmps; - - }; - -#include "peninputvkbctrllayout.inl" - -#endif // C_CAKNFEPCTRLVKBLAYOUT_H - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrllayout.inl --- a/textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrllayout.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: vkb layout inline function -* -*/ - - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::Unicode -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline HBufC* CPeninputVkbKeyInfo::Unicode() const - { - return iUnicode; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::ScanCode -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::ScanCode() const - { - return iScanCode; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::BeginRow -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::BeginRow() const - { - return iBeginRow; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::BeginColumn -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::BeginColumn() const - { - return iBeginColumn; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::EndRow -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::EndRow() const - { - return iEndRow; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::EndColumn -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::EndColumn() const - { - return iEndColumn; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::HighlightBmpIndex -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::HighlightBmpIndex() const - { - return iHighlightBmpIndex; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::HighlightMaskBmpIndex -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbKeyInfo::HighlightMaskBmpIndex() const - { - return iHighlightMaskBmpIndex; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbKeyInfo::Key -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline CVirtualKey* CPeninputVkbKeyInfo::Key() const - { - return iKey; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::LayoutID -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::LayoutID() const - { - return iLayoutID; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::Columns -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::Columns() const - { - return iColumns; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::Rows -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::Rows() const - { - return iRows; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::UnitWidth -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::UnitWidth() const - { - return iUnitWidth; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::UnitHeight -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::UnitHeight() const - { - return iUnitHeight; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::UnitCharWidth -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::UnitCharWidth() const - { - return iUnitCharWidth; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::UnitCharHeight -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputVkbLayoutInfo::UnitCharHeight() const - { - return iUnitCharHeight; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::CharLeftTopPoint -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TPoint CPeninputVkbLayoutInfo::CharLeftTopPoint() const - { - return iCharLeftTopPoint; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::CharFont -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const CFont* CPeninputVkbLayoutInfo::CharFont() const - { - return iFont; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::BgBmp -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline CFbsBitmap* CPeninputVkbLayoutInfo::BgBmp() const - { - return iBgBmp; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::BgMaskBmp -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline CFbsBitmap* CPeninputVkbLayoutInfo::BgMaskBmp() const - { - return iBgMaskBmp; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::DimBmp -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline CFbsBitmap* CPeninputVkbLayoutInfo::DimBmp() const - { - return iDimBmp; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::DimMaskBmp -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline CFbsBitmap* CPeninputVkbLayoutInfo::DimMaskBmp() const - { - return iDimMaskBmp; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::KeyInfoList -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray - CPeninputVkbLayoutInfo::KeyInfoList() const - { - return iKeyInfoList; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::HighlightBmps -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray - CPeninputVkbLayoutInfo::HighlightBmps() const - { - return iHighlightBmps; - } - -// ----------------------------------------------------------------------------- -// CPeninputVkbLayoutInfo::HighlightMaskBmps -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray - CPeninputVkbLayoutInfo::HighlightMaskBmps() const - { - return iHighlightMaskBmps; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/loc/peninputcommonctrls.loc --- a/textinput/peninputcommonctrls/loc/peninputcommonctrls.loc Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Localization strings for touch input common contrls -* -*/ - - -// LOCALISATION STRINGS - -//d:Text in touch input mode swither list -//d:virtual ITUT touch input method -//l:list_single_pane_t1_cp2 -//r: 5.0 -#define qtn_input_switcher_itu_t "Virtual ITU-T" - -//d:Text in touch input mode swither list -//d:full sreen qwerty touch input method -//l:list_single_pane_t1_cp2 -//r: 5.0 -#define qtn_input_switcher_fs_qwerty "Full Screen Qwerty" - -//d:Text in touch input mode swither list -//d:small virtual key board touch input method -//l:list_single_pane_t1_cp2 -//r: 5.0 -#define qtn_input_switcher_vkb "VKB" - -//d:Text in touch input mode swither list -//d:Handwritting Recognition touch input method -//l:list_single_pane_t1_cp2 -//r: 5.0 -#define qtn_input_switcher_hwr "HWR" - -//d:Text in touch input mode swither list -//d:full screen HWR touch input method -//l:list_single_pane_t1_cp2 -//r: 5.0 -#define qtn_input_switcher_fs_hwr "Full Screen HWR" - - -//d:Text in candidate match selection list -//d:The last item meaning to enger the spell mode -//l:list_vitu2_match_list_item_pane_t1 -//r: 5.0 -#define qtn_t9_match_selection_list "Spell" - - -//d:column for ICF prompt text -//l:field_vitu2_entry_pane_t1 -//r: 5.0 -#define qtn_colon_in_prompt ":" - - - -//d:Text in candidate listt -//d:current page /total pages information -//l:vitu2_page_scroll_pane_t1 -//r: 5.0 -#define qtn_paging_number_match_selection "%0N/%1N" - - -//d:Text for T9 spelling prompt text -//l:popup_vitu2_query_window_t1 -//r: 5.0 -#define qtn_t9_spell_query "Word" diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/rom/peninputcommonctrls.iby --- a/textinput/peninputcommonctrls/rom/peninputcommonctrls.iby Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2002 - 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project peninputcommonctrls -* -*/ - - -#ifndef PENINPUTCOMMONCTRLS_IBY -#define PENINPUTCOMMONCTRLS_IBY - -#include -#include - -#ifdef __PEN_SUPPORT -#ifdef RD_SCALABLE_UI_V2 - -file=ABI_DIR\BUILD_DIR\peninputcommonctrls.dll SHARED_LIB_DIR\peninputcommonctrls.dll - -// switchutils -data=DATAZ_\RESOURCE_FILES_DIR\apps\peninputmodeswitcher.mif RESOURCE_FILES_DIR\apps\peninputmodeswitcher.mif - -#endif // RD_SCALABLE_UI_V2 -#endif // __PEN_SUPPORT - -#endif // PENINPUTCOMMONCTRLS_IBY diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/rom/peninputcommonctrlsresources.iby --- a/textinput/peninputcommonctrls/rom/peninputcommonctrlsresources.iby Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2002 - 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project peninputcommonctrls -* -*/ - - -#ifndef PENINPUTCOMMONCTRLS_IBY -#define PENINPUTCOMMONCTRLS_IBY - -#include -#include - -#ifdef __PEN_SUPPORT -#ifdef RD_SCALABLE_UI_V2 -// switchutils -data=DATAZ_\RESOURCE_FILES_DIR\peninputmodeswitchutilsnew.rsc RESOURCE_FILES_DIR\peninputmodeswitchutilsnew.rsc - -#endif // RD_SCALABLE_UI_V2 -#endif // __PEN_SUPPORT - -#endif // PENINPUTCOMMONCTRLS_IBY diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindow.cpp --- a/textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindow.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CAknFepCtrlBaseWindow -* -*/ - - -// INCLUDES -#include -#include -#include -#include -#include -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlBaseWindow::CAknFepCtrlBaseWindow(CFepUiLayout* aFepUiLayout, - TInt aControlId) - :CControlGroup(aFepUiLayout,aControlId) - { - } - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindow::BaseConstructL() - { - CControlGroup::ConstructL(); - - iTitleBar = CControlGroup::NewL(UiLayout(), 0, EFalse); - iClientPane = CControlGroup::NewL(UiLayout(), 0, EFalse); - - iMoveButton = CAknFepCtrlDragButton::NewL(UiLayout(), 0); - - iMoveButton->SetImageFrameId(KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive); - - iCloseButton = CAknFepCtrlCommonButton::NewL(UiLayout(), 0, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive); - iHeaderPane = CControlGroup::NewL(UiLayout(), 0, EFalse); - - iTitleBar->AddControlL(iMoveButton); - iTitleBar->AddControlL(iHeaderPane); - iTitleBar->AddControlL(iCloseButton); - iCloseButton->AddEventObserver(this); - iMoveButton->AddPositionObserver(this); - - AddControlL(iTitleBar); - AddControlL(iClientPane); - } - -// --------------------------------------------------------- -// Destructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlBaseWindow::~CAknFepCtrlBaseWindow() - { - } - -// --------------------------------------------------------- -// Draw window frame and sub controls -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindow::Draw() - { - if(!AbleToDraw()) - return; - - //Clear(); - DrawOpaqueMaskBackground( Rect() ); - CFbsBitGc* gc= static_cast ( BitGc()); -/* - gc->Activate( MaskBitmapDevice() ); - gc->SetBrushStyle( CGraphicsContext::ENullBrush ); - gc->SetBrushColor( MaskBkCol() ); - gc->SetPenSize( PenSize()); - gc->SetPenColor( PenColor() ); - - gc->DrawRect( Rect()); - TRect rect = iTitleBar->Rect(); - gc->DrawRect(rect); -*/ - // ----- draw bitmaps ----- - gc->Activate( BitmapDevice() ); - gc->SetBrushColor( TRgb(KOpaqueColor) ); - gc->SetPenColor( TRgb(KOpaqueColor) ); - gc->DrawRect( Rect()); - if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) - AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); - - DrawBackground(); - CControlGroup::Draw(); - } - -// --------------------------------------------------------- -// Close window -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindow::Close() - { - if (DoClose()) - { - Hide(ETrue); - } - } - -// --------------------------------------------------------- -// Enable or disable drag window -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindow::SetDragEnable(TBool aEnable) - { - if (iMoveButton) - { - iMoveButton->EnableDragging(aEnable); - } - } - -// --------------------------------------------------------- -// Handle close event -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindow::HandleControlEvent(TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& /*aEventData*/) - { - if (aEventType == EEventButtonUp) - { - if (aCtrl == iCloseButton) - { - Close(); - } - } - } - -EXPORT_C TBool CAknFepCtrlBaseWindow::DoClose() - { - return ETrue; - } - -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlBaseWindow::Control(TInt aCtrlId) - { - CFepUiBaseCtrl* ctrl = NULL; - RPointerArray todo; - TInt current = 0; - TBool notFound = ETrue; - - todo.Append(this); - - while (current < todo.Count() && notFound) - { - ctrl = todo[current]; - if(ctrl->ControlId() == aCtrlId) - { - notFound = EFalse; - } - else - { - if(ctrl->IsKindOfControl(ECtrlControlGroup)) - { - CControlGroup* temp = static_cast(ctrl); - for (int i = 0; i < temp->NumOfControls(); i++) - { - todo.Append(temp->At(i)); - } - } - current++; - } - } - - todo.Close(); - - return notFound ? NULL : ctrl; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindowext.cpp --- a/textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindowext.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,691 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CAknFepCtrlBaseWindowExt -* -*/ - - -// INCLUDES -#include -#include -#include -#include -#include -#include - #include - -#include -#include -#include -#include -#include - -#include -#include - -const TInt32 KInvalidResId = -1; -const TInt KNotSupportSkin = -1; -const TInt KInvalidImg = -1 ; -const TUint32 KDefaultTextColor = 0x000000; - - - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlBaseWindowExt::CAknFepCtrlBaseWindowExt(CFepUiLayout* aFepUiLayout, - TInt aControlId) - :CControlGroup(aFepUiLayout,aControlId), - iCloseButton(NULL), - iFirstTimeConstruct(ETrue), - iCoeEnv(CCoeEnv::Static()) - { - } - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindowExt::BaseConstructL() - { - CControlGroup::ConstructL(); - } - -// --------------------------------------------------------- -// Destructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlBaseWindowExt::~CAknFepCtrlBaseWindowExt() - { - } - -// --------------------------------------------------------- -// Draw window frame and sub controls -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindowExt::Draw() - { - if(Hiden() || !Ready()) - { - return; - } - - //Clear(); - - DrawOpaqueMaskBackground( Rect() ); - CFbsBitGc* gc= static_cast ( BitGc()); - /* - gc->Activate( MaskBitmapDevice() ); - gc->SetBrushStyle( CGraphicsContext::ENullBrush ); - gc->SetBrushColor( MaskBkCol() ); - gc->SetPenSize( PenSize()); - gc->SetPenColor( PenColor() ); - gc->DrawRect( Rect()); - */ - // ----- draw bitmaps ----- - - gc->Activate( BitmapDevice() ); - gc->SetBrushColor( TRgb(KOpaqueColor) ); - gc->SetPenColor( TRgb(KOpaqueColor) ); - gc->DrawRect( Rect()); - if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) - AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); - - DrawBackground(); - CControlGroup::Draw(); - /* - for(TInt i=0; i< NumOfControls(); i++) - { - CFepUiBaseCtrl* ctrl = At(i); - if(!ctrl->Hiden()) - { - ctrl->Draw(); - } - }*/ - } - -// --------------------------------------------------------- -// Close window -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindowExt::Close() - { - if (DoClose()) - { - Hide(ETrue); - } - } - -// --------------------------------------------------------- -// Enable or disable drag window -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindowExt::SetDragEnable(TBool /*aEnable*/) - { - /*if (iMoveButton) - { - iMoveButton->EnableDragging(aEnable); - }*/ - } - -// --------------------------------------------------------- -// Handle close event -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlBaseWindowExt::HandleControlEvent(TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& /*aEventData*/) - { - if (aEventType == EEventButtonUp) - { - if (aCtrl->ControlId() == EPeninutWindowCtrlIdCloseBtn) - { - Close(); - } - } - } - -EXPORT_C TBool CAknFepCtrlBaseWindowExt::DoClose() - { - return ETrue; - } - -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlBaseWindowExt::Control(TInt aCtrlId) - { - CFepUiBaseCtrl* ctrl = NULL; - RPointerArray todo; - TInt current = 0; - TBool notFound = ETrue; - - todo.Append(this); - - while (current < todo.Count() && notFound) - { - ctrl = todo[current]; - if(ctrl->ControlId() == aCtrlId) - { - notFound = EFalse; - } - else - { - if(ctrl->IsKindOfControl(ECtrlControlGroup)) - { - CControlGroup* temp = static_cast(ctrl); - for (int i = 0; i < temp->NumOfControls(); i++) - { - todo.Append(temp->At(i)); - } - } - current++; - } - } - - todo.Close(); - - return notFound ? NULL : ctrl; - } - -EXPORT_C void CAknFepCtrlBaseWindowExt::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - TResourceReader reader; - iCoeEnv->CreateResourceReaderLC(reader, iResourceId); - - TInt supportskin = reader.ReadInt16(); - - if (iFirstTimeConstruct&& (supportskin != KNotSupportSkin)) - { - UiLayout()->AddControlL(this); - } - - // Read information of shadow - const TInt32 shadowResId = reader.ReadInt32(); - ReadShadowInfoL( shadowResId ); - - // Read information of background - const TInt32 backgroundResId = reader.ReadInt32(); - ReadBackgroundInfoL( backgroundResId ); - - // Read resource information to create base window controls - const TInt count = reader.ReadInt16(); - - if( iFirstTimeConstruct ) - { - for( TInt i = 0; i < count && iFirstTimeConstruct; i++ ) - { - const TInt16 id = reader.ReadInt16(); - const TInt32 image = reader.ReadInt32(); - CreateBaseWindowControlsL( id, image ); - } - } - else - { - CControlGroup::ConstructFromResourceL(); - // ReConstruct ICF when resource changed - CFepLayoutMultiLineIcf* multiIcf = - static_cast( Control(EPeninputWindowCtrlIdMultiLineICF)); - if( multiIcf ) - { - TResourceReader reader; - iCoeEnv->CreateResourceReaderLC( reader, multiIcf->ResourceId() ); - ReadMultiLineIcfInforL( reader, multiIcf ); - CleanupStack::PopAndDestroy( 1 ); - } - } - CleanupStack::PopAndDestroy(); // reader - - iFirstTimeConstruct = EFalse; - } - -TBool CAknFepCtrlBaseWindowExt::CreateCustomControlL( TInt16 /*aControlId*/, TInt32 /*aImageId*/ ) - { - return EFalse; - } - -void CAknFepCtrlBaseWindowExt::AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl) - { - AddControlL(aCtrl); - } - -EXPORT_C void CAknFepCtrlBaseWindowExt::CreateBaseWindowControlsL( TInt16 aControlId, - TInt32 aImageId ) - { - if (CreateCustomControlL(aControlId, aImageId)) - { - return; - } - - switch ( aControlId ) - { - case EPeninutWindowCtrlIdCloseBtn: - { - CAknFepCtrlCommonButton* closeButton = - CAknFepCtrlCommonButton::NewL(UiLayout(), aControlId, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive); - - AddCustomControlGroupL( closeButton ); - - closeButton->AddEventObserver(this); - closeButton->SetResourceId( aImageId ); - closeButton->ConstructFromResourceL(); - SetCloseButton(closeButton); - } - break; - case EPeninutWindowCtrlIdInputContextField: - { - CFepInputContextField* icf= CFepInputContextField::NewL( TRect(), - UiLayout(), aControlId ); - - AddCustomControlGroupL( icf ); - - icf->SetFocus(ETrue); - icf->AddEventObserver( UiLayout() ); - - TResourceReader reader; - iCoeEnv->CreateResourceReaderLC( reader, aImageId ); - ReadIcfInfoL( reader, icf); - CleanupStack::PopAndDestroy( 1 ); - } - break; - case EPeninputWindowCtrlIdMultiLineICF: - { - const CFont* icfFont = NULL; - TAknTextLineLayout textPaneTextLayout; - - textPaneTextLayout = - AknLayoutScalable_Avkon::fep_vkb_top_text_pane_t1().LayoutLine(); - - icfFont = AknLayoutUtils::FontFromId( textPaneTextLayout.iFont, NULL ); - CFepLayoutMultiLineIcf* multiLineIcf = NULL; - - if ( icfFont ) - { - multiLineIcf = CFepLayoutMultiLineIcf::NewL( TRect(), - UiLayout(), aControlId, icfFont->HeightInPixels(), - icfFont->FontMaxHeight(),icfFont ); - - AddCustomControlGroupL( multiLineIcf ); - - // Add layout as event observer - multiLineIcf->AddEventObserver( UiLayout() ); - multiLineIcf->SetResourceId( aImageId ); - multiLineIcf->SetFocus(ETrue); - - TResourceReader reader; - iCoeEnv->CreateResourceReaderLC( reader, aImageId ); - ReadMultiLineIcfInforL( reader,multiLineIcf ); - CleanupStack::PopAndDestroy( 1 ); - } - } - break; - case EPeninutWindowCtrlIdOptionBtn: - { - CAknFepCtrlEventButton* touchInputOptionButton = CAknFepCtrlEventButton::NewL( - UiLayout(), - aControlId, EPeninputLayoutEventOption, 0, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); - - AddCustomControlGroupL( touchInputOptionButton ); - - touchInputOptionButton->AddEventObserver( UiLayout() ); - touchInputOptionButton->SetResourceId( aImageId ); - touchInputOptionButton->ConstructFromResourceL(); - } - break; - case EPeninutWindowCtrlIdBackspaceBtn: - { - CAknFepCtrlRepeatButton* backspaceButton = CAknFepCtrlRepeatButton::NewL( - UiLayout(), aControlId, EPeninputLayoutEventBack, EKeyBackspace, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); - - AddCustomControlGroupL( backspaceButton ); - - backspaceButton->AddEventObserver( UiLayout() ); - backspaceButton->SetResourceId( aImageId ); - backspaceButton->ConstructFromResourceL(); - } - break; - case EPeninutWindowCtrlIdSpaceBtn: - { - CAknFepCtrlEventButton* spaceButton = CAknFepCtrlEventButton::NewL( - UiLayout(), aControlId, EPeninputLayoutEventSpace, EKeySpace, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); - AddCustomControlGroupL( spaceButton ); - spaceButton->AddEventObserver( UiLayout() ); - spaceButton->SetResourceId( aImageId ); - spaceButton->ConstructFromResourceL(); - } - break; - case EPeninutWindowCtrlIdEnterBtn: - { - CAknFepCtrlEventButton* enterButton = CAknFepCtrlEventButton::NewL( - UiLayout(), aControlId, EPeninputLayoutEventEnter, EKeyEnter, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); - - AddCustomControlGroupL( enterButton ); - enterButton->AddEventObserver(UiLayout()); - enterButton->SetResourceId( aImageId ); - enterButton->ConstructFromResourceL(); - } - break; - case EPeninutWindowCtrlIdSwitcherPopupWindow: - { - CPeninputLayoutInputmodelChoice* modeSwitchChoice = - CPeninputLayoutInputmodelChoice::NewL( UiLayout(), - EPeninutWindowCtrlIdSwitcherPopupWindow, - (TPluginInputMode)(UiLayout()->PenInputType())); - modeSwitchChoice->SetListSkinID( KAknsIIDQsnFrList, KAknsIIDQsnFrPopupSub ); - AddCustomControlGroupL( modeSwitchChoice ); - modeSwitchChoice->AddEventObserver( UiLayout() ); - } - break; - default: - { - } - break; - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlBaseWindowExt::ReadShadowInfoL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CAknFepCtrlBaseWindowExt::ReadShadowInfoL( TInt aResId ) - { - TResourceReader resReader; - iCoeEnv->CreateResourceReaderLC( resReader, aResId ); - - TPtrC bmpFileName = resReader.ReadTPtrC(); - TInt32 imgMajorSkinId = resReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - for ( TInt i = 0; i < KShadowBmpBr + 1; i++ ) - { - const TInt16 bmpId = resReader.ReadInt16(); - const TInt16 bmpMskId = resReader.ReadInt16(); - skinitemid = resReader.ReadInt16(); - - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidImg) - { - CFbsBitmap* shadowImg = NULL; - CFbsBitmap* shadowMaskImg = NULL; - - if (bmpMskId != KInvalidImg) - { - AknsUtils::CreateIconL(skininstance, - id, - shadowImg, - shadowMaskImg, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - shadowImg, - bmpFileName, - bmpId); - } - - UiLayout()->SetShadowBmp(shadowImg, shadowMaskImg, TShadowBitmapIndex(i)); - } - } - CleanupStack::PopAndDestroy( 1 ); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlBaseWindowExt::ReadBackgroundInfoL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CAknFepCtrlBaseWindowExt::ReadBackgroundInfoL( TInt aResId ) - { - if( aResId == 0 ) - return; - - if( BackgroundBmp() ) - { - CFbsBitmap* bkBmp = BackgroundBmp(); - delete bkBmp; - SetBackgroundBmp( NULL ); - } - if( BkMaskBmp() ) - { - CFbsBitmap* bkMaskBmp = BkMaskBmp(); - delete bkMaskBmp; - SetBackgroundMaskBmp( NULL ); - } - - TResourceReader resReader; - iCoeEnv->CreateResourceReaderLC( resReader, aResId ); - - TPtrC bmpFileName = resReader.ReadTPtrC(); - TInt32 imgMajorSkinId = resReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - const TInt16 bmpId = resReader.ReadInt16(); - const TInt16 bmpMskId = resReader.ReadInt16(); - skinitemid = resReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidImg) - { - CFbsBitmap* backgroundImg = NULL; - CFbsBitmap* backgroundMaskImg = NULL; - if (bmpMskId != KInvalidImg) - { - AknsUtils::CreateIconL(skininstance, - id, - backgroundImg, - backgroundMaskImg, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - backgroundImg, - bmpFileName, - bmpId); - } - - SetBackgroundBmp( backgroundImg ); - SetBackgroundMaskBmp( backgroundMaskImg ); - } - CleanupStack::PopAndDestroy( 1 ); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlBaseWindowExt::ReadIcfInfoL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CAknFepCtrlBaseWindowExt::ReadIcfInfoL(TResourceReader aResReader, - CFepInputContextField* icf ) - { - TPtrC bmpFileName = aResReader.ReadTPtrC(); - TInt32 imgMajorSkinId = aResReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - const TInt16 icfbgId = aResReader.ReadInt16(); - const TInt16 icfbgmaskId = aResReader.ReadInt16(); - skinitemid = aResReader.ReadInt16(); - - id.Set( TInt( imgMajorSkinId ), skinitemid ); - - if ( icfbgId != KInvalidImg ) - { - CFbsBitmap* icfImg = NULL; - - if (icfbgmaskId != KInvalidImg) - { - CFbsBitmap* icfmaskImg = NULL; - - AknsUtils::CreateIconL(skininstance, - id, - icfImg, - icfmaskImg, - bmpFileName, - icfbgId, - icfbgmaskId); - - AknIconUtils::SetSize(icfmaskImg, TSize(1,1), EAspectRatioNotPreserved); - icf->SetBackgroundMaskBitmapL(icfmaskImg); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - icfImg, - bmpFileName, - icfbgId); - } - - AknIconUtils::SetSize(icfImg, TSize(1,1), EAspectRatioNotPreserved); - icf->SetBackgroundBitmapL(icfImg); - } - - // read text color - TRgb textcolor; - TInt32 colorMajorSkinId = aResReader.ReadInt32(); - skinitemid = aResReader.ReadInt16(); - - id.Set(TInt(colorMajorSkinId), skinitemid); - - const TInt16 textcoloridx = aResReader.ReadInt16(); - - TInt error = AknsUtils::GetCachedColor(skininstance, - textcolor, - id, - textcoloridx); - - if (error == KErrNone) - { - icf->SetTextColor( textcolor ); - } - else - { - icf->SetTextColor( TRgb( KDefaultTextColor ) ); - } - } - -void CAknFepCtrlBaseWindowExt::ReadMultiLineIcfInforL( TResourceReader aResReader , - CFepLayoutMultiLineIcf* icf) - { - TPtrC bmpFileName = aResReader.ReadTPtrC(); - TInt32 imgMajorSkinId = aResReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - const TInt16 icfbgId = aResReader.ReadInt16(); - const TInt16 icfbgmaskId = aResReader.ReadInt16(); - skinitemid = aResReader.ReadInt16(); - - id.Set( TInt( imgMajorSkinId ), skinitemid ); - - if ( icfbgId != KInvalidImg ) - { - CFbsBitmap* icfImg = NULL; - - if (icfbgmaskId != KInvalidImg) - { - CFbsBitmap* icfmaskImg = NULL; - - AknsUtils::CreateIconL(skininstance, - id, - icfImg, - icfmaskImg, - bmpFileName, - icfbgId, - icfbgmaskId); - - AknIconUtils::SetSize(icfmaskImg, TSize(1,1), EAspectRatioNotPreserved); - icf->SetBackgroundMaskBitmapL(icfmaskImg); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - icfImg, - bmpFileName, - icfbgId); - } - - AknIconUtils::SetSize(icfImg, TSize(1,1), EAspectRatioNotPreserved); - icf->SetBackgroundBitmapL(icfImg); - } - - // read text color - TRgb textcolor; - TInt32 colorMajorSkinId = aResReader.ReadInt32(); - skinitemid = aResReader.ReadInt16(); - - id.Set(TInt(colorMajorSkinId), skinitemid); - - const TInt16 textcoloridx = aResReader.ReadInt16(); - - TInt error = AknsUtils::GetCachedColor(skininstance, - textcolor, - id, - textcoloridx); - - if (error == KErrNone) - { - icf->SetTextColorL( textcolor ); - } - else - { - icf->SetTextColorL( TRgb( KDefaultTextColor ) ); - } - } - - - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp --- a/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4098 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of button -* -*/ - - -// system includes -#include -#include -#include -#include -#include -#include -#include -// user includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -const TInt KInvalidBmp = -1 ; - -//default value for long press timer -const TInt KLongPressInterval = 600000; - -//default value for repeat timer -const TInt KRepeatInterval = 100000; - -//default text color and shadow text color -const TUint32 KDefaultTextColor = 0x000000; -const TUint32 KDefaultShadowTextColor = 0xffffff; -const TInt32 KInvalidResId = -1; -const TInt KInvalidEventId = 0xffff; -//const TInt KFadingParamBlack = 255; -//const TInt KFadingParamWhite = 0; - -const TInt KTransparency[256] = - { - 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, - 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, - 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19, - 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, - 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29, - 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35, - 35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 40, 40, 40, - 41, 41, 41, 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 46, - 46, 46, 47, 47, 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 50, 51, 51, - 51, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 55, 55, 55, 56, 56, 56, 56, - 57, 57, 57, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, - 62, 62, 63, 63, 63, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 67, 67, 67, - 68, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 71, 72, 72, 72, 73, - 73, 73, 74, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77 - }; -// Invalid function icon color group -const TInt KInvalidColorGroup = -1; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::CAknFepCtrlButton -// C++ default constructor can NOT contain any code, that -// might leave. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlButton::CAknFepCtrlButton(CFepUiLayout* aUiLayout, TInt aControlId) -: CButtonBase(TRect(), aUiLayout, aControlId), iFirstTimeConstruct(ETrue), iHighlight(EFalse) - { - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::NewL -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlButton* CAknFepCtrlButton::NewL(CFepUiLayout* aUiLayout, TInt aControlId) - { - CAknFepCtrlButton* self = NewLC(aUiLayout, aControlId); - CleanupStack::Pop(self); - - return self; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::NewLC -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlButton* CAknFepCtrlButton::NewLC(CFepUiLayout* aUiLayout, TInt aControlId) - { - CAknFepCtrlButton* self = new (ELeave) CAknFepCtrlButton(aUiLayout, aControlId); - CleanupStack::PushL(self); - self->BaseConstructL(); - - return self; - } - -// ----------------------------------------------------------------------------- -// Destructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlButton::~CAknFepCtrlButton() - { - iBmpList.Close(); - iMaskBmpList.Close(); - } -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::ConstructFromResourceL -// The order of the image ids in the CButtonBase class must not be changed -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlButton::ConstructFromResourceL(TResourceReader& aReader) - { - if (!iFirstTimeConstruct) - { - iBmpList.Close(); - iMaskBmpList.Close(); - ResetBmpPool(); - } - - TPtrC bmpFileName = aReader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = aReader.ReadInt32(); - TInt colorgroup = aReader.ReadInt16(); - TAknsItemID id; - - for (TInt ii = 0; ii < EBtnBmpLastType + 1; ++ii) - { - // Get the image ids and mask ids from resource - TInt bmpId = aReader.ReadInt16(); - TInt bmpMskId = aReader.ReadInt16(); - - // read skin item id - const TInt skinitemid = aReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpMskId != KInvalidBmp) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId); - - // set maskbmp and size - SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iMaskBmpList.Append(maskbmp); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpId); - } - - // set bmp and size - SetBitmapL(bmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iBmpList.Append(bmp); - } - } - - if (!iFirstTimeConstruct) - { - ResizeBitmaps(Rect().Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::ConstructFromResourceL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlButton::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - if (!iFirstTimeConstruct) - { - // need to remove original bmp and maskbmp - iBmpList.Close(); - iMaskBmpList.Close(); - ResetBmpPool(); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = reader.ReadInt32(); - TInt colorgroup = reader.ReadInt16(); - TAknsItemID id; - - for (TInt ii = 0; ii < EBtnBmpLastType + 1; ++ii) - { - // Get the image ids and mask ids from resource - TInt bmpId = reader.ReadInt16(); - TInt bmpMskId = reader.ReadInt16(); - - // read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpMskId != KInvalidBmp) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId); - - // set maskbmp and size - SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iMaskBmpList.Append(maskbmp); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpId); - } - - // set bmp and size - SetBitmapL(bmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iBmpList.Append(bmp); - } - } - - CleanupStack::PopAndDestroy(); // reader - - if (!iFirstTimeConstruct) - { - ResizeBitmaps(Rect().Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::Draw -// Draws UI -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlButton::Draw() - { - if(!AbleToDraw()) - return; - - if ( !BackgroundBmp() ) - { - CButtonBase::Draw(); - } - - CFbsBitGc* gc = static_cast(BitGc()); - - //mask bitmaps - gc->Activate( MaskBitmapDevice() ); - - gc->SetBrushStyle( CGraphicsContext::ESolidBrush ); - gc->SetBrushColor( TRgb(KOpaqueColor));//Non transparent at all - gc->SetPenStyle(CGraphicsContext::ESolidPen ); - gc->SetPenSize( PenSize()); - gc->SetPenColor( TRgb(KOpaqueColor) ); - gc->DrawRect(Rect()); - - // ----- draw bitmaps ----- - gc->Activate( BitmapDevice() ); - if ( BackgroundBmp() ) - { - TSize size=BackgroundBmp()->SizeInPixels(); - - gc->DrawBitmap(Rect(), BackgroundBmp(),size); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::SetActive -// Set active for the button -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlButton::SetActive(TBool aActiveFlag) - { - if( IsDimmed() ) - { - return; - } - - if(IsActive() != aActiveFlag) - { - CFepUiBaseCtrl::SetActive(aActiveFlag); - if(aActiveFlag || iHighlight) - { - SetBackgroundBmp(Bitmap(EBtnBmpActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpActive,ETrue)); - //Hide(EFalse); //active button won't be Hiden ??? - } - else - { - SetBackgroundBmp(Bitmap(EBtnBmpNonActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpNonActive,ETrue)); - } - if(BitGc()) - { - Draw(); - UpdateArea(Rect(),EFalse); - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::SetHighlight -// Set highlight for the button -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlButton::SetHighlight(TBool aIsHighlight) - { - iHighlight = aIsHighlight; - - if ( iHighlight ) - { - SetBackgroundBmp(Bitmap(EBtnBmpActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpActive,ETrue)); - } - else - { - SetBackgroundBmp(Bitmap(EBtnBmpNonActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpNonActive,ETrue)); - } - Draw(); - UpdateArea(Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::ResizeBitmaps -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlButton::ResizeBitmaps(TSize aSize) - { - if (iMaskBmpList.Count() >= 1 && - iMaskBmpList[0]->SizeInPixels() != aSize) - { - for( int ii = 0; ii < iMaskBmpList.Count(); ++ii ) - { - AknIconUtils::SetSize(iMaskBmpList[ii], aSize, EAspectRatioNotPreserved); - } - } - - if (iBmpList.Count() >= 1 && - iBmpList[0]->SizeInPixels() != aSize) - { - for( int ii = 0; ii < iBmpList.Count(); ++ii ) - { - AknIconUtils::SetSize(iBmpList[ii], aSize, EAspectRatioNotPreserved); - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::SizeChanged -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlButton::SizeChanged(TRect aNewRect, TBool aIsReloadImages) - { - if ((aNewRect.Size().iWidth == 0 || aNewRect.Size().iHeight == 0) && - (ControlId() != EPeninupWindowCtrlIdArrowLeftBtn && - ControlId() != EPeninupWindowCtrlIdArrowRightBtn)) - { - return; - } - - SetRect(aNewRect); - - //if (aIsReloadImages) - { - ResizeBitmaps(aNewRect.Size()); - } - - Draw(); - UpdateArea(Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlButton::HandlePointerLeave -// Handle pointer leave event -// --------------------------------------------------------------------------- -// -void CAknFepCtrlButton::HandlePointerLeave(const TPoint& aPt) - { - if( IsDimmed() ) - return; - if( iHighlight ) - { - SetBackgroundBmp(iActiveBmp); - SetBackgroundMaskBmp(iActiveMaskBmp); - } - - else - { - SetBackgroundBmp(iNonActiveBkBmp); - SetBackgroundMaskBmp(iNonActiveBkMaskBmp); - } - Draw(); - UpdateArea(Rect(), EFalse); - CFepUiBaseCtrl::HandlePointerLeave(aPt); - return ; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::CAknFepCtrlDragButton -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlDragButton::CAknFepCtrlDragButton(CFepUiLayout* aUiLayout, TInt aControlId) -: CDragBar(TRect(), aUiLayout, aControlId), iFirstTimeConstruct(ETrue) - { - } - -// ----------------------------------------------------------------------------- -// Destructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlDragButton::~CAknFepCtrlDragButton() - { - iBmpList.Close(); - iMaskBmpList.Close(); - - DeleteForgroundRes(); - delete iText; - } - - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlDragButton* CAknFepCtrlDragButton::NewL(CFepUiLayout* aUiLayout, - TInt aControlId) - { - CAknFepCtrlDragButton* self = NewLC(aUiLayout, aControlId); - CleanupStack::Pop(self); - - return self; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::NewLC -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlDragButton* CAknFepCtrlDragButton::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId) - { - CAknFepCtrlDragButton* self = new (ELeave) CAknFepCtrlDragButton(aUiLayout, aControlId); - CleanupStack::PushL(self); - self->ConstructL(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::ConstructFromResourceL -// The order of the image ids in the CButtonBase class must not be changed -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlDragButton::ConstructFromResourceL(TResourceReader& aReader) - { - /* - if (!iFirstTimeConstruct) - { - iBmpList.Close(); - iMaskBmpList.Close(); - ResetBmpPool(); - } - - TPtrC bmpFileName = aReader.ReadTPtrC(); - TInt32 imgMajorSkinId = aReader.ReadInt32(); - TAknsItemID id; - - for (TInt ii = 0; ii < EBtnBmpLastType + 1; ++ii) - { - const TInt16 bmpId = aReader.ReadInt16(); - const TInt16 bmpMskId = aReader.ReadInt16(); - - // read skin item id - const TInt skinitemid = aReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpMskId != KInvalidBmp) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId); - - SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iMaskBmpList.Append(maskbmp); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpId); - } - - SetBitmapL(bmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iBmpList.Append(bmp); - } - } - - if (!iFirstTimeConstruct) - { - ResizeBitmaps(Rect().Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse;*/ - if (!iFirstTimeConstruct) - { - DeleteForgroundRes(); - } - - TPtrC bmpFileName = aReader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = aReader.ReadInt32(); - TInt colorGroup = aReader.ReadInt16(); - TAknsItemID id; - - // Get the image ids and mask ids from resource - TInt bmpId = aReader.ReadInt16(); - TInt bmpMskId = aReader.ReadInt16(); - - // read skin item id - const TInt skinitemid = aReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForgroundBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForgroundDimBmpMask, - iForgroundBmpMask ); - AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - bmpFileName, - bmpId); - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - } - } - - if (!iFirstTimeConstruct) - { - //ResizeBitmaps(iForgroundBmpRect.Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::ConstructFromResourceL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlDragButton::ConstructFromResourceL() - { - /* - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - if (!iFirstTimeConstruct) - { - iBmpList.Close(); - iMaskBmpList.Close(); - ResetBmpPool(); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); - TInt32 imgMajorSkinId = reader.ReadInt32(); - TAknsItemID id; - - for (TInt ii = 0; ii < EBtnBmpLastType + 1; ++ii) - { - const TInt16 bmpId = reader.ReadInt16(); - const TInt16 bmpMskId = reader.ReadInt16(); - - // read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpMskId != KInvalidBmp) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId); - - SetMaskBitmapL(maskbmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iMaskBmpList.Append(maskbmp); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpId); - } - - SetBitmapL(bmp, TButtonBmpType(EBtnBmpNonActive + ii)); - iBmpList.Append(bmp); - } - } - - CleanupStack::PopAndDestroy(); // reader - - if (!iFirstTimeConstruct) - { - ResizeBitmaps(Rect().Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse;*/ - if (iResourceId == KInvalidResId) - { - return; - } - - if (!iFirstTimeConstruct) - { - // need to remove original bmp and maskbmp - DeleteForgroundRes(); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = reader.ReadInt32(); - TInt colorGroup = reader.ReadInt16(); - TAknsItemID id; - - // Get the image ids and mask ids from resource - TInt bmpId = reader.ReadInt16(); - TInt bmpMskId = reader.ReadInt16(); - - // Read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForgroundBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForgroundDimBmpMask, iForgroundBmpMask ); - AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - bmpFileName, - bmpId); - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - } - } - - CleanupStack::PopAndDestroy(); // reader - - if (!iFirstTimeConstruct) - { - //ResizeBitmaps(iForgroundBmpRect.Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - - } - - -// --------------------------------------------------------------------------- -// CAknFepCtrlDragButton::DeleteForgroundRes -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlDragButton::DeleteForgroundRes() - { - if( iForgroundBmp ) - { - delete iForgroundBmp; - iForgroundBmp = NULL; - } - if( iForgroundBmpMask ) - { - delete iForgroundBmpMask; - iForgroundBmpMask = NULL; - } - if( iForgroundDimBmpMask ) - { - delete iForgroundDimBmpMask; - iForgroundDimBmpMask = NULL; - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlDragButton::CreateDimmedMaskL -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlDragButton::CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ) - { - if (aMask && aMask->DisplayMode() == EGray256) - { - delete aDimmedMask; - aDimmedMask = NULL; - - aDimmedMask = new (ELeave) CFbsBitmap; - - User::LeaveIfError(aDimmedMask->Create(aMask->SizeInPixels(), EGray256)); - CleanupStack::PushL(aDimmedMask); - - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(aDimmedMask); - CleanupStack::PushL(bitmapDevice); - - CFbsBitGc* bitGc(NULL); - User::LeaveIfError(bitmapDevice->CreateContext(bitGc)); - CleanupStack::PushL(bitGc); - - bitGc->SetPenStyle(CGraphicsContext::ESolidPen); - bitGc->BitBlt(TPoint(0, 0), aMask); - - aDimmedMask->LockHeap(); - TInt w = aMask->SizeInPixels().iWidth; - TInt h = aMask->SizeInPixels().iHeight; - TInt dataStride = aMask->DataStride() - w; - unsigned char* address = (unsigned char *)aDimmedMask->DataAddress(); - - for ( TInt i = 0; i < h; ++i ) - { - for ( TInt j = 0; j < w; ++j ) - { - *address = KTransparency[*address]; - ++address; - } - address += dataStride; - } - - aDimmedMask->UnlockHeap(); - - //AknIconUtils::SetSize(aDimmedMask, aMask->SizeInPixels(), aScaleMode); - - CleanupStack::PopAndDestroy(2); // bitmapDevice, bitGc - CleanupStack::Pop(1); // aDimmedMask - } - - } - - -// --------------------------------------------------------------------------- -// CAknFepCtrlDragButton::SetForgroundBmpRect -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlDragButton::SetForgroundBmpRect(const TRect& aRect) - { - iForgroundBmpRect = aRect; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlDragButton::SetForegroundBmpL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlDragButton::SetForegroundBmpL(CFbsBitmap* aBmp, - CFbsBitmap* aMaskBmp) - { - DeleteForgroundRes(); - - iForgroundBmp = aBmp; - iForgroundBmpMask = aMaskBmp; - - ResizeBitmaps(iForgroundBmpRect.Size()); - } - -EXPORT_C void CAknFepCtrlDragButton::Move(const TPoint& aOffset) - { - CButtonBase::Move(aOffset); - iForgroundBmpRect.Move( aOffset ); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlDragButton::HandlePointerDownEventL -// Handle button down event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlDragButton::HandlePointerDownEventL(const TPoint& aPt) - { - if( IsDimmed() ) - return NULL; - - CDragBar::HandlePointerDownEventL(aPt); - - SetReady(ETrue); - Draw(); - UpdateArea(Rect(),EFalse); - ReportEvent(EEventButtonDown); - return this; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlDragButton::Draw -// Draws UI -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlDragButton::Draw() - { - if(!AbleToDraw()) - return; - - CFbsBitGc* gc = static_cast(BitGc()); - - //mask bitmaps - DrawOpaqueMaskBackground(); - TRect rect = Rect(); - TRect innerRect = rect; - innerRect.Shrink( 10, 10 ); - - // ----- draw bitmaps ----- - gc->Activate( BitmapDevice() ); - //gc->Clear(rect); - - CFbsBitmap* bmpMask = NULL; - - // Draw background - if( IsDimmed() ) // Dimmed state - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - iInactiveImgID, - KAknsIIDDefault ); - if( iForgroundDimBmpMask ) - { - delete iForgroundDimBmpMask; - iForgroundDimBmpMask = NULL; - } - TRAP_IGNORE(CreateDimmedMaskL( iForgroundDimBmpMask, - iForgroundBmpMask )); - AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - bmpMask = iForgroundDimBmpMask; - } - else - { - // Normal state or pressed state - TAknsItemID ImgID = (IsDragging() | PointerDown()) ? iPressedImgID : iNormalImgID; - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - ImgID, - KAknsIIDDefault ); - bmpMask = iForgroundBmpMask; - } - - // Draw forground - if( iForgroundBmp ) - { - TRect srcRect( TPoint( 0, 0 ), iForgroundBmp->SizeInPixels() ); - if( bmpMask ) - { - gc->BitBltMasked( iForgroundBmpRect.iTl, - iForgroundBmp, - srcRect, - bmpMask, - EFalse); - } - else - { - gc->BitBlt( iForgroundBmpRect.iTl, - iForgroundBmp, - srcRect ); - } - } - - if (iText) - { - TAknLayoutText textLayout; - textLayout.LayoutText(Rect(), iTextFormat); - textLayout.DrawText(*gc, *iText); - } - } - - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::ResizeBitmaps -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CAknFepCtrlDragButton::ResizeBitmaps(TSize aInnerSize) - { - /* - if (iMaskBmpList.Count() >= 1 && - iMaskBmpList[0]->SizeInPixels() != aSize) - { - for( TInt ii = 0; ii < iMaskBmpList.Count(); ++ii ) - { - AknIconUtils::SetSize(iMaskBmpList[ii], aSize, EAspectRatioNotPreserved); - } - } - - if (iBmpList.Count() >= 1 && - iBmpList[0]->SizeInPixels() != aSize) - { - for( TInt ii = 0; ii < iBmpList.Count(); ++ii ) - { - AknIconUtils::SetSize(iBmpList[ii], aSize, EAspectRatioNotPreserved); - } - }*/ - if( iForgroundBmp && ( iForgroundBmp->SizeInPixels() != aInnerSize ) ) - { - AknIconUtils::SetSize( iForgroundBmp, aInnerSize, EAspectRatioNotPreserved ); - } - if( iForgroundBmpMask && ( iForgroundBmpMask->SizeInPixels() != aInnerSize ) ) - { - AknIconUtils::SetSize( iForgroundBmpMask, aInnerSize, EAspectRatioNotPreserved ); - } - - /*TRAP_IGNORE(CreateDimmedMaskL(iForgroundDimBmpMask, - iForgroundBmpMask)); */ - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlDragButton::SizeChanged -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlDragButton::SizeChanged(TRect aNewRect, - TRect aInnerRect, - TBool aIsReloadImages) - { - // Reset the position and the extent of the button aera - /*if (aNewRect.Size().iWidth == 0 || aNewRect.Size().iHeight == 0) - { - return; - } - - SetRect(aNewRect); - - if (aIsReloadImages) - { - ResizeBitmaps(aNewRect.Size()); - } - - Draw(); - UpdateArea(Rect(), ETrue);*/ - - if (aNewRect.Size().iWidth == 0 || aNewRect.Size().iHeight == 0) - { - return; - } - - TRect oriRect = Rect(); - SetRect(aNewRect); - iForgroundBmpRect = aInnerRect; - - if (aIsReloadImages) - { - ResizeBitmaps(aInnerRect.Size() ); - } - RootControl()->ReDrawRect( oriRect ); - UpdateArea(oriRect, EFalse); - Draw(); - UpdateArea(Rect(), EFalse); - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::CAknFepCtrlMultiModeButton -// C++ default constructor can NOT contain any code, that -// might leave. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiModeButton::CAknFepCtrlMultiModeButton(CFepUiLayout* aUiLayout, - TInt aControlId,TAknsItemID aNormalID, - TAknsItemID aPressedID,TAknsItemID aInactiveID) - : CAknFepCtrlCommonButton(aUiLayout, aControlId, aNormalID, aPressedID, aInactiveID) - { - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::NewL -// Two-phased constructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiModeButton* CAknFepCtrlMultiModeButton::NewL(CFepUiLayout* aUiLayout, - TInt aControlId,TAknsItemID aNormalID, - TAknsItemID aPressedID,TAknsItemID aInactiveID) - { - CAknFepCtrlMultiModeButton* self = NewLC(aUiLayout, aControlId, - aNormalID, aPressedID, aInactiveID); - CleanupStack::Pop(self); - - return self; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::NewLC -// Two-phased constructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiModeButton* CAknFepCtrlMultiModeButton::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId,TAknsItemID aNormalID, - TAknsItemID aPressedID,TAknsItemID aInactiveID) - { - CAknFepCtrlMultiModeButton* self = new (ELeave) CAknFepCtrlMultiModeButton(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID); - CleanupStack::PushL(self); - self->BaseConstructL(); - - return self; - } - -// ----------------------------------------------------------------------------- -// Destructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiModeButton::~CAknFepCtrlMultiModeButton() - { - iImageResIdList.Close(); - iForegroundBmpList.ResetAndDestroy(); - iForegroundBmpList.Close(); - iForegroundMaskBmpList.ResetAndDestroy(); - iForegroundMaskBmpList.Close(); - - iModeTextList.ResetAndDestroy(); - iModeTextList.Close(); - - iModesList.ResetAndDestroy(); - iModesList.Close(); - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::ConstructFromResourceL -// The order of the image ids in the CButtonBase class must not be changed -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// - -EXPORT_C void CAknFepCtrlMultiModeButton::ConstructFromResourceL(TResourceReader& aReader) - { - if (!iFirstTimeConstruct) - { - iImageResIdList.Close(); - iForegroundBmpList.ResetAndDestroy(); - iForegroundBmpList.Close(); - iForegroundMaskBmpList.ResetAndDestroy(); - iForegroundMaskBmpList.Close(); - - iModeTextList.ResetAndDestroy(); - iModeTextList.Close(); - - - iModesList.ResetAndDestroy(); - iModesList.Close(); - - ResetBmpPool(); - } - - // read text color and shadow text color - TInt32 colorMajorSkinId = aReader.ReadInt32(); - const TInt skinitemid = aReader.ReadInt16(); - TInt textcoloridx = aReader.ReadInt16(); - TInt shadowtextcoloridx = aReader.ReadInt16(); - - TAknsItemID id; - - id.Set(TInt(colorMajorSkinId), skinitemid); - TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - iFontColor, - id, - textcoloridx); - - if (error != KErrNone) - { - iFontColor = TRgb(KDefaultTextColor); - } - - SetFontColor(iFontColor); - - error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - iShadowFontColor, - id, - shadowtextcoloridx); - - if (error != KErrNone) - { - iShadowFontColor = TRgb(KDefaultShadowTextColor); - } - - SetShadowFontColor(iShadowFontColor); - - const TInt16 countModes = aReader.ReadInt16(); // Read the count of different cases - - if (countModes <= 0) - { - User::Leave(KErrArgument); - } - - iNumberOfModes = 0; - - for (TInt ii = 0; ii < countModes; ii++) - { - AddModeL(aReader); - iNumberOfModes++; - } - - if (iFirstTimeConstruct) - { - if (iImageResIdList.Count() == 1) - { - // set background bimap for button - SetButtonBmpL(EBtnBmpNonActive, 0); - iCurrentBmpType = EBtnBmpNonActive; - } - - const TInt16 defaultModeIndex = aReader.ReadInt16(); - SetCurrentModeL(EBtnBmpNonActive, defaultModeIndex); - } - else - { - SetButtonBmpL(iCurrentBmpType, iCurrentMode); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::ConstructFromResourceL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// - -EXPORT_C void CAknFepCtrlMultiModeButton::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - return; - } - - if (!iFirstTimeConstruct) - { - iImageResIdList.Close(); - iForegroundBmpList.ResetAndDestroy(); - iForegroundBmpList.Close(); - iForegroundMaskBmpList.ResetAndDestroy(); - iForegroundMaskBmpList.Close(); - - iModeTextList.ResetAndDestroy(); - iModeTextList.Close(); - - - iModesList.ResetAndDestroy(); - iModesList.Close(); - - ResetBmpPool(); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - // read text color and shadow text color - TInt32 colorMajorSkinId = reader.ReadInt32(); - const TInt skinitemid = reader.ReadInt16(); - TInt textcoloridx = reader.ReadInt16(); - TInt shadowtextcoloridx = reader.ReadInt16(); - - TAknsItemID id; - - id.Set(TInt(colorMajorSkinId), skinitemid); - TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - iFontColor, - id, - textcoloridx); - - if (error != KErrNone) - { - iFontColor = TRgb(KDefaultTextColor); - } - - SetFontColor(iFontColor); - - error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - iShadowFontColor, - id, - shadowtextcoloridx); - - if (error != KErrNone) - { - iShadowFontColor = TRgb(KDefaultShadowTextColor); - } - - SetShadowFontColor(iShadowFontColor); - - const TInt16 countModes = reader.ReadInt16(); - - if (countModes <= 0) - { - User::Leave(KErrArgument); - } - - iNumberOfModes = 0; - - for (TInt ii = 0; ii < countModes; ii++) - { - AddModeL(reader); - iNumberOfModes++; - } - - - if (iFirstTimeConstruct) - { - if (iImageResIdList.Count() == 1) - { - // set background bimap for button - SetButtonBmpL(EBtnBmpNonActive, 0); - iCurrentBmpType = EBtnBmpNonActive; - } - - const TInt16 defaultModeIndex = reader.ReadInt16(); - SetCurrentModeL(EBtnBmpNonActive, defaultModeIndex); - } - else - { - ResizeBitmaps(iForgroundBmpRect.Size()); - SetButtonBmpL(iCurrentBmpType, iCurrentMode); - Draw(); - } - - CleanupStack::PopAndDestroy(); // reader - - iFirstTimeConstruct = EFalse; - - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::AddModeL -// Add new display mode from resource reader -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::AddModeL(TResourceReader& aReader) - { - const TInt32 imageResId = aReader.ReadInt32(); - iModeTextList.Append(aReader.ReadHBufCL()); - const TInt rangeId = aReader.ReadInt16(); - const TInt modeId = aReader.ReadInt16(); - - TAknFepModeIndicator* modeIndicator = new (ELeave) TAknFepModeIndicator; - CleanupStack::PushL(modeIndicator); - - modeIndicator->iRangeId = rangeId; - modeIndicator->iModeId = modeId; - modeIndicator->iPermitted = ETrue; - - iModesList.AppendL(modeIndicator); - CleanupStack::Pop(modeIndicator); // indicator - - if ( imageResId != KInvalidBmp ) - { - // switch mode means change image - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, imageResId); - - TPtrC bmpFileName = reader.ReadTPtrC(); - TInt32 imgMajorSkinId = reader.ReadInt32(); - TInt colorGroup = reader.ReadInt16(); - TAknsItemID id; - - for (TInt jj = 0; jj < /*EBtnBmpLastType +*/ 1; jj++) - { - const TInt16 bmpId = reader.ReadInt16(); - const TInt16 bmpMskId = reader.ReadInt16(); - const TInt16 skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - - } - CleanupStack::PushL(maskbmp); - AknIconUtils::SetSize(maskbmp, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - iForegroundMaskBmpList.AppendL(maskbmp); - CleanupStack::Pop(maskbmp); - - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpId); - - } - - CleanupStack::PushL(bmp); - AknIconUtils::SetSize(bmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - iForegroundBmpList.AppendL(bmp); - CleanupStack::Pop(bmp); - - } - } - - CleanupStack::PopAndDestroy(); //reader - - iImageResIdList.Append(imageResId); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetButtonBmp -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::SetButtonBmpL(const TButtonBmpType aType , - const TInt aMode) - { - if ( !ForgroundBmp() || - ForgroundBmp()->Handle() != iForegroundBmpList[aMode]->Handle() || - !ForgroundBmpMask() || - ForgroundBmpMask()->Handle() != iForegroundMaskBmpList[aMode]->Handle() ) - { - CFbsBitmap* bmp = new (ELeave) CFbsBitmap; - if(iForegroundMaskBmpList.Count() > 0 && iForegroundBmpList[aMode]) - { - CleanupStack::PushL( bmp ); - - User::LeaveIfError(bmp->Duplicate(iForegroundBmpList[aMode]->Handle())); - - CleanupStack::Pop( bmp ); - } - else - { - delete bmp; - bmp = NULL; - } - CFbsBitmap* maskbmp = new (ELeave) CFbsBitmap; - - if(iForegroundMaskBmpList.Count() > 0 && iForegroundMaskBmpList[aMode]) - { - CleanupStack::PushL( maskbmp ); - User::LeaveIfError(maskbmp->Duplicate(iForegroundMaskBmpList[aMode]->Handle())); - CleanupStack::Pop( maskbmp ); - } - else - { - delete maskbmp; - maskbmp = NULL; - } - SetForegroundBmpL(bmp,maskbmp); - } - else if ( ForgroundBmp()->SizeInPixels() != iForegroundBmpList[aMode]->SizeInPixels() || - ForgroundBmpMask()->SizeInPixels() != iForegroundMaskBmpList[aMode]->SizeInPixels()) - { - ResizeBitmaps(iForegroundBmpList[aMode]->SizeInPixels()); - } - - if(aType == EBtnBmpActivePressed - || aType == EBtnBmpNonActivePressed) - { - SetHighlight(ETrue); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetCurrentModeL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::SetCurrentModeL(const TButtonBmpType aType, - const TInt aModeIndex) - { - if ((aModeIndex >= 0) && - (aModeIndex <= NumberOfModes()-1) && - (iModesList[aModeIndex]->iPermitted)) - { - iCurrentMode = aModeIndex; - - if (iImageResIdList.Count() > 1) - { - // change mode means change image - SetButtonBmpL(aType, iCurrentMode); - iCurrentBmpType = aType; - } - - Draw(); - UpdateArea(Rect()); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::NextMode -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::NextMode() const - { - TInt startIndex = 0; - - if (iCurrentMode < (NumberOfModes() -1)) - { - startIndex = iCurrentMode + 1; - } - - TBool find = EFalse; - - while (!find && (startIndex != iCurrentMode)) - { - if (iModesList[startIndex]->iPermitted) - { - find = ETrue; - } - else - { - startIndex++; - - if (startIndex > (NumberOfModes()-1)) - { - startIndex = 0; - } - } - } - - if (find) - { - return startIndex; - } - else - { - return iCurrentMode; - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::ImageAlreadyExist -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CAknFepCtrlMultiModeButton::ImageAlreadyExist(const TInt32 aResId) - { - TBool findResId = EFalse; - - for (TInt i=0; iUseFont(iShadowFont); - - BitGc()->SetBrushStyle( CGraphicsContext::ENullBrush ); - BitGc()->SetBrushColor( KRgbBlack);//Non transparent at all - BitGc()->SetPenColor(iShadowFontColor); - BitGc()->SetPenStyle(CGraphicsContext::ESolidPen); - BitGc()->SetPenSize( PenSize()); - - TPoint pointText; - TPoint pointShadowText; - - TInt leftMarginOfText = - (Rect().Width() - iFont->TextWidthInPixels(*(iModeTextList[iCurrentMode])))/2; - - pointText.iX = Rect().iTl.iX + leftMarginOfText; - pointText.iY = Rect().iTl.iY + Rect().Height()*3/4; - - pointShadowText.iX = pointText.iX + 1; - pointShadowText.iY = pointText.iY + 1; - - //BitGc()->DrawText(*(iModeTextList[iCurrentMode]), Rect(), Rect().Height()*3/4, CGraphicsContext::ECenter, Rect().Width()/2 - iFont->TextWidthInPixels(*(iModeTextList[iCurrentMode]))/2); - BitGc()->DrawText(*(iModeTextList[iCurrentMode]), pointShadowText); - - BitGc()->DiscardFont(); - - // draw text - BitGc()->UseFont(iFont); - - BitGc()->SetBrushStyle( CGraphicsContext::ENullBrush ); - BitGc()->SetBrushColor( KRgbBlack);//Non transparent at all - BitGc()->SetPenColor(iFontColor); - BitGc()->SetPenStyle(CGraphicsContext::ESolidPen); - BitGc()->SetPenSize( PenSize()); - - //BitGc()->DrawText(*(iModeTextList[iCurrentMode]), Rect(), Rect().Height()*3/4+1, CGraphicsContext::ECenter, Rect().Width()/2 - iFont->TextWidthInPixels(*(iModeTextList[iCurrentMode]))/2-1); - BitGc()->DrawText(*(iModeTextList[iCurrentMode]), pointText); - - BitGc()->DiscardFont(); - - //BitGc()->SetPenStyle(CGraphicsContext::ENullPen); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::Draw -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::Draw() - { - if(!AbleToDraw()) - return; - - CAknFepCtrlCommonButton::Draw(); - //CButtonBase::Draw(); - if ( iModeTextList.Count() ) - { - if ((iModeTextList[iCurrentMode]) && (iModeTextList[iCurrentMode]->Length() > 0)) - { - DisplayText(); - } - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetFontColor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::SetFontColor(const TRgb aFontColor) - { - iFontColor = aFontColor; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetShadowFontColor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::SetShadowFontColor(const TRgb aShadowFontColor) - { - iShadowFontColor = aShadowFontColor; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetPermittedModes -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::SetPermittedModes(const TInt aRangeId, - const TInt aRealCaseId, - TBool aPermit) - { - for (TInt i = 0; i < iModesList.Count(); i++) - { - if ((iModesList[i]->iRangeId == aRangeId) && (iModesList[i]->iModeId == aRealCaseId)) - { - iModesList[i]->iPermitted = aPermit; - - return KErrNone; - } - } - - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetPermittedRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::SetPermittedRange(const TInt aRangeId, TBool aPermit) - { - TBool findRangeId = EFalse; - - for (TInt i = 0; i < iModesList.Count(); i++) - { - if ((iModesList[i]->iRangeId == aRangeId) && (iModesList[i]->iPermitted != aPermit)) - { - iModesList[i]->iPermitted = aPermit; - findRangeId = ETrue; - } - } - - if (!findRangeId) - { - return KErrNotSupported; - } - else - { - return KErrNone; - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::EnableAllModes -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::EnableAllModes() - { - for (TInt i = 0; i < iModesList.Count(); i++) - { - iModesList[i]->iPermitted = ETrue; - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::DisableAllModes -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::DisableAllModes() - { - for (TInt i = 0; i < iModesList.Count(); i++) - { - iModesList[i]->iPermitted = EFalse; - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::DisableAllModes -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiModeButton::DisableOneModes(const TInt aRangeId) - { - for (TInt i = 0; i < iModesList.Count(); i++) - { - if(iModesList[i]->iRangeId == aRangeId) - { - iModesList[i]->iPermitted = EFalse; - TRAP_IGNORE(SetCurrentModeL(EBtnBmpNonActive, NextMode())); - } - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::IsGivenRangeSupported -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CAknFepCtrlMultiModeButton::IsGivenRangeSupported(const TInt aRange) - { - for (TInt i = 0; i < iModesList.Count(); i++) - { - // judge if aRange is supported by at least 1 mode - if ((iModesList[i]->iRangeId == aRange) && (iModesList[i]->iPermitted)) - { - return ETrue; - } - } - - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::SetRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::SetRange(const TInt aRange) - { - if (CurrentRange() != aRange) - { - for (TInt i = 0; i < iModesList.Count(); i++) - { - if ((iModesList[i]->iRangeId == aRange) && - (iModesList[i]->iPermitted)) - { - TRAP_IGNORE(SetCurrentModeL(EBtnBmpActive, i)); - return KErrNone; - } - } - } - - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::CurrentRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::CurrentRange() const - { - if ((iCurrentMode >= 0) && (iCurrentMode <= (NumberOfModes()-1))) - { - return iModesList[iCurrentMode]->iRangeId; - } - else - { - return KErrNotFound; - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::RangeOfGivenMode() -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::RangeOfGivenMode(TInt aModeIndex) const - { - if ((aModeIndex >= 0) && (aModeIndex <= NumberOfModes()-1)) - { - return iModesList[aModeIndex]->iRangeId; - } - - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::GetRealCaseByMode() -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlMultiModeButton::GetRealCaseByMode(TInt aModeIndex) const - { - if ((aModeIndex >= 0) && (aModeIndex <= NumberOfModes() -1)) - { - return iModesList[aModeIndex]->iModeId; - } - - return KErrNotFound; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::GetRangeListL() -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CAknFepCtrlMultiModeButton::GetRangeListL(RArray& aList) - { - for (TInt i = 0; i < NumberOfModes(); i++) - { - if (aList.Find(iModesList[i]->iRangeId) == KErrNotFound) - { - aList.AppendL(iModesList[i]->iRangeId); - } - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::DuplicateBitmapL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CFbsBitmap* CAknFepCtrlMultiModeButton::DuplicateBitmapL(CFbsBitmap* aSourceBmp) - { - CFbsBitmap* bmp = new (ELeave) CFbsBitmap; - CleanupStack::PushL( bmp ); - - User::LeaveIfError(bmp->Duplicate(aSourceBmp->Handle())); - - CleanupStack::Pop( bmp ); - //iOwnedBitmaps.InsertInAddressOrder(bmp); - return bmp; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlMultiModeButton::ResizeBitmaps -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CAknFepCtrlMultiModeButton::ResizeBitmaps(TSize aSize) - { - if(iForegroundBmpList.Count() >= 1 && iForegroundBmpList[0]->SizeInPixels() != aSize - || iForegroundMaskBmpList.Count() >= 1 && iForegroundMaskBmpList[0]->SizeInPixels() != aSize) - { - for (TInt i=0; iBaseConstructL(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::CAknFepCtrlEventButton -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlEventButton::CAknFepCtrlEventButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aEvent, - TInt aUnicode, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - : CAknFepCtrlCommonButton(aUiLayout, aControlId, aNormalID, aPressedID, aInactiveID), - iEvent(aEvent),iUnicode(aUnicode),iText(NULL) - { - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::~CAknFepCtrlEventButton -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlEventButton::~CAknFepCtrlEventButton() - { - delete iText; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::HandlePointerUpEventL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlEventButton::HandlePointerUpEventL(const TPoint& aPoint) - { - if (iEvent == 0xFFFF) - { - return CAknFepCtrlCommonButton::HandlePointerUpEventL(aPoint); - } - else - { - CAknFepCtrlCommonButton::HandlePointerUpEventL(aPoint); - if(IsDimmed()) - { - return NULL; - } - - if(IsActive()) - { - SetBackgroundBmp(Bitmap(EBtnBmpActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpActive,ETrue)); - } - else - { - SetBackgroundBmp(Bitmap(EBtnBmpNonActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpNonActive,ETrue)); - } - - SetActive(ETrue); - Draw(); - UpdateArea(Rect(),EFalse); - - TPtrC ptr = (TUint16*)(&iUnicode); - ReportEvent(iEvent,ptr); - - return this; - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::DisplayText -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::DisplayText() - { - if ((iFont) && (iShadowFont)) - { - CFbsBitGc* gc = static_cast(BitGc()); - - gc->Activate(BitmapDevice()); - - // draw shadow text - gc->UseFont(iShadowFont); - - gc->SetBrushStyle( CGraphicsContext::ENullBrush ); - gc->SetBrushColor( KRgbBlack);//Non transparent at all - gc->SetPenColor(iShadowFontColor); - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize( PenSize()); - - TPoint pointText; - TPoint pointShadowText; - - TInt leftMarginOfText = (Rect().Width() - iFont->TextWidthInPixels(*iText))/2; - - pointText.iX = Rect().iTl.iX + leftMarginOfText; - pointText.iY = Rect().iTl.iY + Rect().Height()*3/4; - - pointShadowText.iX = pointText.iX + 1; - pointShadowText.iY = pointText.iY + 1; - - gc->DrawText(*iText, pointShadowText); - - gc->DiscardFont(); - - // draw text - gc->UseFont(iFont); - - gc->SetBrushStyle( CGraphicsContext::ENullBrush ); - gc->SetBrushColor( KRgbBlack);//Non transparent at all - gc->SetPenColor(iFontColor); - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize( PenSize()); - - gc->DrawText(*iText, pointText); - - gc->DiscardFont(); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetFontColor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetFontColor(const TRgb aColor) - { - iFontColor = aColor; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetShadowFontColor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetShadowFontColor(const TRgb aColor) - { - iShadowFontColor = aColor; - } - - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::Draw -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::Draw() - { - if(!AbleToDraw()) - return; - - CAknFepCtrlCommonButton::Draw(); - - if ( iText && (iText->Length() > 0 ) ) - { - DisplayText(); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetText -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetText(const TDesC& aText) - { - if ( iText ) - { - delete iText; - iText = NULL; - } - TRAPD(err, iText = aText.AllocL()); - if (err != KErrNone) - { - iText = NULL; - } - Draw(); - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetFont -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetFont(const CFont* aFont) - { - iFont = aFont; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetShadowFont -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetShadowFont(const CFont* aFont) - { - iShadowFont = aFont; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::Event -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlEventButton::Event() const - { - return iEvent; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::Unicode -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlEventButton::Unicode() const - { - return iUnicode; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetEvent -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetEvent(TInt aEvent) - { - iEvent = aEvent; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetUnicode -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlEventButton::SetUnicode(TInt aUnicode) - { - iUnicode = aUnicode; - } - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRepeatButton* CAknFepCtrlRepeatButton::NewLC(CFepUiLayout* aUiLayout, - TInt aCtrlId, - TInt aEvent, - TInt aUnicode, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - { - //PRINTF((_L("CAknFepCtrlRepeatButton::NewLC(), aCtrlId = %d\n"), aCtrlId)); - CAknFepCtrlRepeatButton *self = new(ELeave) CAknFepCtrlRepeatButton(aUiLayout, - aCtrlId, - aEvent, - aUnicode, - aNormalID, - aPressedID, - aInactiveID); - - CleanupStack::PushL(self); - self->ConstructL(); - - return self; - } - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRepeatButton* CAknFepCtrlRepeatButton::NewL(CFepUiLayout* aUiLayout, - TInt aCtrlId, - TInt aEvent, - TInt aUnicode, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - { - //PRINTF((_L("CAknFepCtrlRepeatButton::NewL(), aCtrlId = %d\n"), aCtrlId)); - CAknFepCtrlRepeatButton *self = NewLC(aUiLayout, aCtrlId, aEvent, aUnicode, - aNormalID, aPressedID, aInactiveID); - CleanupStack::Pop(self); - - return self; - } - -// --------------------------------------------------------- -// Destructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRepeatButton::~CAknFepCtrlRepeatButton() - { - //PRINTF((_L("CAknFepCtrlRepeatButton::~CAknFepCtrlRepeatButton()\n"))); - CancelRepeat(); - - delete iLongPressTimer; - delete iRepeatTimer; - } - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRepeatButton::CAknFepCtrlRepeatButton(CFepUiLayout* aUiLayout, - TInt aCtrlId, - TInt aEvent, - TInt aUnicode, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - :CAknFepCtrlEventButton(aUiLayout, aCtrlId, aEvent, aUnicode, - aNormalID, - aPressedID, - aInactiveID) - { - iLongPressInterval = KLongPressInterval; - iRepeatInterval = KRepeatInterval; - } - -// --------------------------------------------------------- -// Constructor -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRepeatButton::ConstructL() - { - //PRINTF((_L("CAknFepCtrlRepeatButton::ConstructL()\n"))); - BaseConstructL(); - - iLongPressTimer = CAknFepTimer::NewL(this); - iRepeatTimer = CAknFepTimer::NewL(this); - } - -// --------------------------------------------------------- -// Time out event handler of both long press timer & repeat timer -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRepeatButton::HandleTimerOut(const CAknFepTimer* aTimer) - { - //PRINTF((_L("CAknFepCtrlRepeatButton::HandleTimerOut()--"))); - if (aTimer == iLongPressTimer) - { - //PRINTF((_L("long press timer timeout\n"))); - iRepeatTimer->SetTimer(iRepeatInterval); - } - else - { - if (aTimer == iRepeatTimer) - { - //PRINTF((_L("repeat timer timeout: EEventButtonUp reported\n"))); - if ( Unicode() ) - { - TInt unicode = Unicode(); - TPtrC ptr = (TUint16*)(&unicode ) ; - ReportEvent(Event(),ptr); -#ifdef RD_TACTILE_FEEDBACK - if (UiLayout()->SupportTactileFeedback()) - { - UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad); - } -#endif //RD_TACTILE_FEEDBACK - } - else - { - ReportEvent(EEventButtonUp); - } - iRepeatTimer->SetTimer(iRepeatInterval); - } - } - } - -// --------------------------------------------------------- -// Handle button down start long press timer -// --------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlRepeatButton::HandlePointerDownEventL(const TPoint& aPt) - { - //PRINTF((_L("CAknFepCtrlRepeatButton::HandleButtonDown()\n"))); - - //PRINTF((_L("Set long press Timer\n"))); - iLongPressTimer->SetTimer(iLongPressInterval); - - return CAknFepCtrlCommonButton::HandlePointerDownEventL(aPt); - } - -// --------------------------------------------------------- -// Handle button up cancel timers -// --------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlRepeatButton::HandlePointerUpEventL(const TPoint& aPt) - { - //PRINTF((_L("CAknFepCtrlRepeatButton::HandleButtonUp()\n"))); - - CancelRepeat(); - - return CAknFepCtrlEventButton::HandlePointerUpEventL(aPt); - } - -// --------------------------------------------------------- -// Handle pointer levae event cancel timers -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRepeatButton::HandlePointerLeave(const TPoint& aPoint) - { - CAknFepCtrlCommonButton::HandlePointerLeave(aPoint); - - CancelRepeat(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRepeatButton::CancelPointerDownL -// Cancel pointer down event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRepeatButton::CancelPointerDownL() - { - CAknFepCtrlCommonButton::CancelPointerDownL(); - - CancelRepeat(); - } - -// --------------------------------------------------------- -// Set the repeat interval of repeat timer -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRepeatButton::SetRepeatInterval(const TTimeIntervalMicroSeconds32& aTime) - { - iRepeatInterval = aTime; - } - -// --------------------------------------------------------- -// Cancel timers -// --------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRepeatButton::CancelRepeat() - { - //PRINTF((_L("CAknFepCtrlRepeatButton::CancelRepeat()\n"))); - iLongPressTimer->Cancel(); - iRepeatTimer->Cancel(); - } - -EXPORT_C CAknFepCtrlRawKeyButton* CAknFepCtrlRawKeyButton::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode) - { - CAknFepCtrlRawKeyButton* self = NewLC(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID, - aDownEvent, - aUpEvent, - aScanCode); - CleanupStack::Pop(self); - - return self; - } - -EXPORT_C CAknFepCtrlRawKeyButton* CAknFepCtrlRawKeyButton::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode) - { - CAknFepCtrlRawKeyButton* self = new (ELeave) CAknFepCtrlRawKeyButton(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID, - aDownEvent, - aUpEvent, - aScanCode); - CleanupStack::PushL(self); - self->BaseConstructL(); - return self; - } - -EXPORT_C CAknFepCtrlRawKeyButton::CAknFepCtrlRawKeyButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode) - : CAknFepCtrlCommonButton(aUiLayout, aControlId, aNormalID, aPressedID, aInactiveID), - iDownEvent(aDownEvent), - iUpEvent(aUpEvent), - iScanCode(aScanCode), - iLastPntDownEvent(EFalse) - { - } - -EXPORT_C CAknFepCtrlRawKeyButton::~CAknFepCtrlRawKeyButton() - { - } - -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlRawKeyButton::HandlePointerDownEventL(const TPoint& aPoint) - { -/* if (iDownEvent == KInvalidEventId) - { - return CButtonBase::HandlePointerDownEventL(aPoint); - } - - if(IsDimmed()) - { - return NULL; - } - - CAknFepCtrlButton::HandlePointerDownEventL(aPoint); - if(IsActive()) - { - SetBackgroundBmp(iActiveBmpPressed); - SetBackgroundMaskBmp(iActiveMaskBmpPressed); - } - else - { - SetBackgroundBmp(iNonActiveBkBmpPressed); - SetBackgroundMaskBmp(iNonActiveBkMaskBmpPressed); - } - - Draw(); - UpdateArea(Rect(),ETrue); -*/ - if(IsDimmed()) - { - return NULL; - } - - CAknFepCtrlCommonButton::HandlePointerDownEventL(aPoint); - TKeyEvent event= {0,0,0,0}; - TPtrC eventDataPtr; - event.iScanCode = iScanCode; - eventDataPtr.Set(reinterpret_cast(&event),sizeof(event)); - - ReportEvent(iDownEvent,eventDataPtr); - - iLastPntDownEvent = ETrue; - - return this; - } - -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlRawKeyButton::HandlePointerUpEventL(const TPoint& aPoint) - { - if (iUpEvent == KInvalidEventId) - { - return CButtonBase::HandlePointerUpEventL(aPoint); - } - -/* if(IsDimmed()) - { - return NULL; - } - - if(IsActive()) - { - SetBackgroundBmp(Bitmap(EBtnBmpActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpActive,ETrue)); - } - else - { - SetBackgroundBmp(Bitmap(EBtnBmpNonActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpNonActive,ETrue)); - } - - SetActive(ETrue); - Draw(); - UpdateArea(Rect(),ETrue); -*/ - if(IsDimmed()) - { - return NULL; - } - - CAknFepCtrlCommonButton::HandlePointerUpEventL(aPoint); - if (iLastPntDownEvent) - { - // only when last event is pointer down event, there is need to simulate - // pointer up event - TKeyEvent event= {0,0,0,0}; - TPtrC eventDataPtr; - event.iScanCode = iScanCode; - eventDataPtr.Set(reinterpret_cast(&event),sizeof(event)); - - ReportEvent(iUpEvent,eventDataPtr); - - iLastPntDownEvent = EFalse; - } - - return this; - } - -EXPORT_C void CAknFepCtrlRawKeyButton::ConstructFromResourceL(TResourceReader& aReader) - { - TInt scancode = aReader.ReadInt16(); - SetScanCode(scancode); - - TInt32 btnimgResId = aReader.ReadInt32(); - TResourceReader imgreader; - CCoeEnv::Static()->CreateResourceReaderLC(imgreader, btnimgResId); - CAknFepCtrlCommonButton::ConstructFromResourceL(imgreader); - CleanupStack::PopAndDestroy(); // imgreader - - //ResizeBitmaps(Rect().Size()); - iFirstTimeConstruct = EFalse; - } - -EXPORT_C void CAknFepCtrlRawKeyButton::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - return; - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TInt scancode = reader.ReadInt16(); - SetScanCode(scancode); - - TInt32 btnimgResId = reader.ReadInt32(); - TResourceReader imgreader; - CCoeEnv::Static()->CreateResourceReaderLC(imgreader, btnimgResId); - CAknFepCtrlCommonButton::ConstructFromResourceL(imgreader); - CleanupStack::PopAndDestroy(2); // reader, imgreader - - //ResizeBitmaps(Rect().Size()); - iFirstTimeConstruct = EFalse; - } - -EXPORT_C void CAknFepCtrlRawKeyButton::HandlePointerLeave(const TPoint& aPoint) - { - if (!Rect().Contains(aPoint)) - { - TRAP_IGNORE(HandlePointerUpEventL(Rect().Center())); - } - } - -EXPORT_C void CAknFepCtrlRawKeyButton::OnDeActivate() - { - CButtonBase::OnDeActivate(); - - if (iLastPntDownEvent) - { - TRAP_IGNORE(HandlePointerUpEventL(Rect().Center())); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::CAknFepCtrlCommonButton -// C++ default constructor can NOT contain any code, that -// might leave. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlCommonButton::CAknFepCtrlCommonButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) -: CButtonBase(TRect(), aUiLayout, aControlId), - iFirstTimeConstruct(ETrue), - iHighlight(EFalse), - iPressed(EFalse), - iTextColorIndex( KInvalidColorGroup ) - { - iNormalImgID = aNormalID; - iPressedImgID = aPressedID; - iInactiveImgID = aInactiveID; - CFepUiBaseCtrl::SetActive( ETrue ); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::NewL -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlCommonButton* CAknFepCtrlCommonButton::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - { - CAknFepCtrlCommonButton* self = NewLC(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID); - CleanupStack::Pop(self); - - return self; - } -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::NewLC -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlCommonButton* CAknFepCtrlCommonButton::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - { - CAknFepCtrlCommonButton* self = new (ELeave) CAknFepCtrlCommonButton(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID); - CleanupStack::PushL(self); - self->BaseConstructL(); - - return self; - } - -// ----------------------------------------------------------------------------- -// Destructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlCommonButton::~CAknFepCtrlCommonButton() - { - DeleteForgroundRes(); - delete iColorIcons; - delete iText; - } -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::ConstructFromResourceL -// The order of the image ids in the CButtonBase class must not be changed -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::ConstructFromResourceL(TResourceReader& aReader) - { - if (!iFirstTimeConstruct) - { - DeleteForgroundRes(); - if( iColorIcons ) - iColorIcons->ReConstructL(); - } - - TPtrC bmpFileName = aReader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = aReader.ReadInt32(); - TInt colorGroup = aReader.ReadInt16(); - TAknsItemID id; - - // Get the image ids and mask ids from resource - TInt bmpId = aReader.ReadInt16(); - TInt bmpMskId = aReader.ReadInt16(); - - // read skin item id - const TInt skinitemid = aReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForgroundBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForgroundDimBmpMask, iForgroundBmpMask ); - AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - bmpFileName, - bmpId); - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - } - } - - if (!iFirstTimeConstruct) - { - //ResizeBitmaps(iForgroundBmpRect.Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::ConstructFromResourceL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - return; - } - - if (!iFirstTimeConstruct) - { - // need to remove original bmp and maskbmp - DeleteForgroundRes(); - if( iColorIcons ) - iColorIcons->ReConstructL(); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = reader.ReadInt32(); - TInt colorGroup = reader.ReadInt16(); - TAknsItemID id; - - // Get the image ids and mask ids from resource - TInt bmpId = reader.ReadInt16(); - TInt bmpMskId = reader.ReadInt16(); - - // Read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForgroundBmp, - iForgroundBmpMask, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForgroundBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForgroundDimBmpMask, - iForgroundBmpMask ); - AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForgroundBmp, - bmpFileName, - bmpId); - AknIconUtils::SetSize(iForgroundBmp, iForgroundBmpRect.Size(), EAspectRatioNotPreserved); - } - } - - CleanupStack::PopAndDestroy(); // reader - - if (!iFirstTimeConstruct) - { - //ResizeBitmaps(iForgroundBmpRect.Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::Draw -// Draws UI -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::Draw() - { - if(!AbleToDraw()) - return; - - CFbsBitGc* gc = static_cast(BitGc()); - - //mask bitmaps - DrawOpaqueMaskBackground(); - TRect rect = Rect(); - TRect innerRect = rect; - innerRect.Shrink( 10, 10 ); - - // ----- draw bitmaps ----- - gc->Activate( BitmapDevice() ); - // gc->SetClippingRegion( &ValidClipRegion() ); - //gc->Clear(rect); - - CFbsBitmap* bmpMask = NULL; - - // Draw background - if( IsDimmed() ) // Dimmed state - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - iInactiveImgID, - KAknsIIDDefault ); - if( iForgroundDimBmpMask ) - { - delete iForgroundDimBmpMask; - iForgroundDimBmpMask = NULL; - } - TRAP_IGNORE(CreateDimmedMaskL( iForgroundDimBmpMask, - iForgroundBmpMask )); - AknIconUtils::SetSize(iForgroundDimBmpMask, iForgroundBmpRect.Size(), - EAspectRatioNotPreserved); - - bmpMask = iForgroundDimBmpMask; - } - else - { - // Normal state or pressed state - TAknsItemID ImgID; - if (iHighlight) - { - ImgID = iPressedImgID; - } - else - { - ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID; - } - - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - ImgID, - KAknsIIDDefault ); - bmpMask = iForgroundBmpMask; - } - - // Draw forground - if ( iColorIcons ) // 3-pieces color icon - { - AknPenInputDrawUtils::Draw3PiecesColorIcon( iColorIcons, - *gc, - iForgroundBmpRect, - iDraw3PiecesInfo.iInnerRect ); - } - else if( iForgroundBmp ) - { - TRect srcRect( TPoint( 0, 0 ), iForgroundBmp->SizeInPixels() ); - if( bmpMask ) - { - gc->BitBltMasked( iForgroundBmpRect.iTl, - iForgroundBmp, - srcRect, - bmpMask, - EFalse); - } - else - { - gc->BitBlt( iForgroundBmpRect.iTl, - iForgroundBmp, - srcRect ); - } - } - - if (iText) - { - //if( IsDimmed() ) - // { - // gc->SetFadingParameters( KFadingParamBlack, KFadingParamWhite ); - // gc->SetFaded( ETrue ); - // } - - TAknLayoutText textLayout; - textLayout.LayoutText(Rect(), iTextFormat); - if( iTextColorIndex == KInvalidColorGroup ) - textLayout.DrawText(*gc, *iText); - else - { - TRgb color( KRgbBlack ); // sane default for nonskinned case - if ( AknsUtils::AvkonSkinEnabled() ) - { - AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), - color, KAknsIIDQsnTextColors, iTextColorIndex ); - } - if( IsDimmed() ) - { - color = KRgbGray; - } - textLayout.DrawText(*gc, *iText, ETrue, color); - } - //if( IsDimmed() ) - // gc->SetFaded( EFalse ); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::SetActive -// Set active for the button -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::SetActive(TBool aActiveFlag) - { - if( IsDimmed() ) - { - return; - } - - if(IsActive() != aActiveFlag) - { - CFepUiBaseCtrl::SetActive(aActiveFlag); -/* if(BitGc()) - { - Draw(); - UpdateArea(Rect(),EFalse); - }*/ - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::SetHighlight -// Set highlight for the button -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::SetHighlight(TBool aIsHighlight) - { - iHighlight = aIsHighlight; - - Draw(); - UpdateArea(Rect(),EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::ResizeBitmaps -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlCommonButton::ResizeBitmaps(TSize aInnerSize) - { - if( iForgroundBmp && ( iForgroundBmp->SizeInPixels() != aInnerSize ) ) - { - AknIconUtils::SetSize( iForgroundBmp, aInnerSize, EAspectRatioNotPreserved ); - } - if( iForgroundBmpMask && ( iForgroundBmpMask->SizeInPixels() != aInnerSize ) ) - { - AknIconUtils::SetSize( iForgroundBmpMask, aInnerSize, EAspectRatioNotPreserved ); - } - - /*TRAP_IGNORE(CreateDimmedMaskL(iForgroundDimBmpMask, - iForgroundBmpMask));*/ - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::SizeChanged -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::SizeChanged(TRect aNewRect, - TRect aInnerRect, - TBool aIsReloadImages) - { - if (aNewRect.Size().iWidth == 0 || aNewRect.Size().iHeight == 0) - { - return; - } - - TRect oriRect = Rect(); - - if( oriRect == aNewRect && iForgroundBmpRect == aInnerRect ) - { - return; - } - - SetRect(aNewRect); - - if (aIsReloadImages) - { - iForgroundBmpRect = aInnerRect; - ResizeBitmaps(aInnerRect.Size() ); - } - RootControl()->ReDrawRect( Rect() ); - UpdateArea(Rect(), EFalse); - Draw(); - UpdateArea(Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::SetForgroundBmpRect -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::SetForgroundBmpRect(const TRect& aRect) - { - iForgroundBmpRect = aRect; - } - -EXPORT_C void CAknFepCtrlCommonButton::SetDraw3PieceFrameInfo(TDraw3PiecesFrame a3PiecesFrameInfo) - { - iDraw3PiecesInfo = a3PiecesFrameInfo; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::DeleteForgroundRes -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlCommonButton::DeleteForgroundRes() - { - if( iForgroundBmp ) - { - delete iForgroundBmp; - iForgroundBmp = NULL; - } - if( iForgroundBmpMask ) - { - delete iForgroundBmpMask; - iForgroundBmpMask = NULL; - } - if( iForgroundDimBmpMask ) - { - delete iForgroundDimBmpMask; - iForgroundDimBmpMask = NULL; - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::CreateDimmedMaskL -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlCommonButton::CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ) - { - if (aMask && aMask->DisplayMode() == EGray256) - { - delete aDimmedMask; - aDimmedMask = NULL; - - aDimmedMask = new (ELeave) CFbsBitmap; - - User::LeaveIfError(aDimmedMask->Create(aMask->SizeInPixels(), EGray256)); - CleanupStack::PushL(aDimmedMask); - - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(aDimmedMask); - CleanupStack::PushL(bitmapDevice); - - CFbsBitGc* bitGc(NULL); - User::LeaveIfError(bitmapDevice->CreateContext(bitGc)); - CleanupStack::PushL(bitGc); - - bitGc->SetPenStyle(CGraphicsContext::ESolidPen); - bitGc->BitBlt(TPoint(0, 0), aMask); - - aDimmedMask->LockHeap(); - TInt w = aMask->SizeInPixels().iWidth; - TInt h = aMask->SizeInPixels().iHeight; - TInt dataStride = aMask->DataStride() - w; - unsigned char* address = (unsigned char *)aDimmedMask->DataAddress(); - - for ( TInt i = 0; i < h; ++i ) - { - for ( TInt j = 0; j < w; ++j ) - { - *address = KTransparency[*address]; - ++address; - } - address += dataStride; - } - - aDimmedMask->UnlockHeap(); - - //AknIconUtils::SetSize(aDimmedMask, aMask->SizeInPixels(), aScaleMode); - - CleanupStack::PopAndDestroy(2); // bitmapDevice, bitGc - CleanupStack::Pop(1); // aDimmedMask - } - - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::HandlePointerDownEventL -// Handle button down event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlCommonButton::HandlePointerDownEventL(const TPoint& aPt) - { - if( IsDimmed() ) - return NULL; - - CFepUiBaseCtrl::HandlePointerDownEventL(aPt); - iPressed = ETrue; - - Draw(); - UpdateArea(Rect(),EFalse); - ReportEvent(EEventButtonDown); - return this; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::HandlePointerLeave -// Handle pointer leave event -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::HandlePointerLeave(const TPoint& aPt) - { - if( IsDimmed() ) - return; - - CFepUiBaseCtrl::HandlePointerLeave(aPt); - iPressed = EFalse; - - RootControl()->ReDrawRect( Rect() ); - UpdateArea(Rect(),EFalse); - - return ; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::HandleButtonUpEventL -// Handle button up event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CAknFepCtrlCommonButton::HandlePointerUpEventL(const TPoint& aPt) - { - CFepUiBaseCtrl::HandlePointerUpEventL(aPt); - if( IsDimmed() ) - return NULL; - - iPressed = EFalse; - SetActive(ETrue); - RootControl()->ReDrawRect( Rect() ); - //Draw(); - UpdateArea(Rect(),EFalse); - - ReportEvent(EEventButtonUp); - -#ifdef RD_TACTILE_FEEDBACK - { - UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse); - } -#endif // RD_TACTILE_FEEDBACK - - return this; - } - -EXPORT_C void CAknFepCtrlCommonButton::HandlePointerEnter(const TPoint& aPt) - { - if( IsDimmed() ) - return; - - CFepUiBaseCtrl::HandlePointerEnter(aPt); - iPressed = ETrue; - Draw(); - UpdateArea(Rect(),EFalse); - - return ; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::CancelPointerDownL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::CancelPointerDownL() - { - CFepUiBaseCtrl::CancelPointerDownL(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlCommonButton::SetForegroundBmpL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlCommonButton::SetForegroundBmpL(CFbsBitmap* aBmp, - CFbsBitmap* aMaskBmp) - { - DeleteForgroundRes(); - - iForgroundBmp = aBmp; - iForgroundBmpMask = aMaskBmp; - - ResizeBitmaps(iForgroundBmpRect.Size()); - } - -EXPORT_C void CAknFepCtrlCommonButton::Move(const TPoint& aOffset) - { - CButtonBase::Move(aOffset); - iForgroundBmpRect.Move( aOffset ); - - if ( iColorIcons ) - { - iDraw3PiecesInfo.iInnerRect.Move( aOffset ); - } - } - - - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::CAknFepCtrlMultiImageButton -// C++ default constructor can NOT contain any code, that -// might leave. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiImageButton::CAknFepCtrlMultiImageButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - : CAknFepCtrlCommonButton(aUiLayout, aControlId, aNormalID, aPressedID, aInactiveID) - { - iNormalImgID = aNormalID; - iPressedImgID = aPressedID; - iInactiveImgID = aInactiveID; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::NewL -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiImageButton* CAknFepCtrlMultiImageButton::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - { - CAknFepCtrlMultiImageButton* self = NewLC(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID); - CleanupStack::Pop(self); - - return self; - } -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::NewLC -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiImageButton* CAknFepCtrlMultiImageButton::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aNormalID, - TAknsItemID aPressedID, - TAknsItemID aInactiveID) - { - CAknFepCtrlMultiImageButton* self = new (ELeave) CAknFepCtrlMultiImageButton(aUiLayout, - aControlId, - aNormalID, - aPressedID, - aInactiveID); - CleanupStack::PushL(self); - self->BaseConstructL(); - - return self; - } - -// ----------------------------------------------------------------------------- -// Destructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlMultiImageButton::~CAknFepCtrlMultiImageButton() - { - DeleteForgroundRes(); - delete iText; - } -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::ConstructFromResourceL -// The order of the image ids in the CButtonBase class must not be changed -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiImageButton::ConstructFromResourceL(TResourceReader& aReader) - { - if (!iFirstTimeConstruct) - { - DeleteForgroundRes(); - } - - TPtrC bmpFileName = aReader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = aReader.ReadInt32(); - TInt colorGroup = aReader.ReadInt16(); - TAknsItemID id; - - // Get the image ids and mask ids from resource - TInt bmpId = aReader.ReadInt16(); - TInt bmpMskId = aReader.ReadInt16(); - - // read skin item id - const TInt skinitemid = aReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForground1Bmp, - iForground1BmpMask, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForground1Bmp, - iForground1BmpMask, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForground1BmpMask, iForground1BmpRect.Size(), - EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForground1DimBmpMask, iForground1BmpMask ); - AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), - EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForground1Bmp, - bmpFileName, - bmpId); - AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); - } - } - - - - TAknsItemID id2; - - // Get the image ids and mask ids from resource - TInt bmp2Id = aReader.ReadInt16(); - TInt bmp2MskId = aReader.ReadInt16(); - - // read skin item id - const TInt skinitem2id = aReader.ReadInt16(); - id2.Set(TInt(imgMajorSkinId), skinitem2id); - - if (bmp2Id != KInvalidBmp) - { - if (bmp2MskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id2, - iForground2Bmp, - iForground2BmpMask, - bmpFileName, - bmp2Id, - bmp2MskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id2, - KAknsIIDQsnIconColors, - colorGroup, - iForground2Bmp, - iForground2BmpMask, - bmpFileName, - bmp2Id, - bmp2MskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForground2BmpMask, iForground2BmpRect.Size(), - EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForground2DimBmpMask, iForground2BmpMask ); - AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), - EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id2, - iForground2Bmp, - bmpFileName, - bmp2Id); - AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioNotPreserved); - } - } - - if (!iFirstTimeConstruct) - { - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::ConstructFromResourceL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiImageButton::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - if (!iFirstTimeConstruct) - { - // need to remove original bmp and maskbmp - DeleteForgroundRes(); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); // Read the file name of the bmps - TInt32 imgMajorSkinId = reader.ReadInt32(); - TInt colorGroup = reader.ReadInt16(); - TAknsItemID id; - - // Get the image ids and mask ids from resource - TInt bmpId = reader.ReadInt16(); - TInt bmpMskId = reader.ReadInt16(); - - // Read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForground1Bmp, - iForground1BmpMask, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForground1Bmp, - iForground1BmpMask, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); - AknIconUtils::SetSize(iForground1BmpMask, iForground1BmpRect.Size(), EAspectRatioNotPreserved); - - /*CreateDimmedMaskL( iForground1DimBmpMask, - iForground1BmpMask ); - AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForground1Bmp, - bmpFileName, - bmpId); - AknIconUtils::SetSize(iForground1Bmp, iForground1BmpRect.Size(), EAspectRatioNotPreserved); - } - } - - - - - - - - - - - - - TAknsItemID id2; - - // Get the image ids and mask ids from resource - TInt bmp2Id = reader.ReadInt16(); - TInt bmp2MskId = reader.ReadInt16(); - - // Read skin item id - const TInt skinitem2id = reader.ReadInt16(); - id2.Set(TInt(imgMajorSkinId), skinitem2id); - - if (bmp2Id != KInvalidBmp) - { - if (bmp2MskId != KInvalidBmp) - { - if( colorGroup == KInvalidColorGroup ) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id2, - iForground2Bmp, - iForground2BmpMask, - bmpFileName, - bmp2Id, - bmp2MskId); - } - else - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - colorGroup, - iForground2Bmp, - iForground2BmpMask, - bmpFileName, - bmp2Id, - bmp2MskId, - AKN_LAF_COLOR( 0 ) ); - } - - AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioPreserved); - AknIconUtils::SetSize(iForground2BmpMask, iForground2BmpRect.Size(), EAspectRatioPreserved); - - /*CreateDimmedMaskL( iForground2DimBmpMask, iForground2BmpMask ); - AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), - EAspectRatioNotPreserved);*/ - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iForground2Bmp, - bmpFileName, - bmp2Id); - AknIconUtils::SetSize(iForground2Bmp, iForground2BmpRect.Size(), EAspectRatioPreserved); - } - } - - - - - - - CleanupStack::PopAndDestroy(); // reader - - if (!iFirstTimeConstruct) - { - //ResizeBitmaps(iForgroundBmpRect.Size()); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::Draw -// Draws UI -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiImageButton::Draw() - { - if(!AbleToDraw()) - return; - - CFbsBitGc* gc = static_cast(BitGc()); - - //mask bitmaps - DrawOpaqueMaskBackground(); - TRect rect = Rect(); - TRect innerRect = rect; - innerRect.Shrink( 10, 10 ); - - // ----- draw bitmaps ----- - gc->Activate( BitmapDevice() ); - // gc->SetClippingRegion( &ValidClipRegion() ); - //gc->Clear(rect); - - CFbsBitmap* bmpMask1 = NULL; - CFbsBitmap* bmpMask2 = NULL; - - // Draw background - if( IsDimmed() ) // Dimmed state - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - iInactiveImgID, - KAknsIIDDefault ); - if( iForground1DimBmpMask ) - { - delete iForground1DimBmpMask; - iForground1DimBmpMask = NULL; - } - TRAP_IGNORE(CreateDimmedMaskL( iForground1DimBmpMask, - iForground1BmpMask )); - AknIconUtils::SetSize(iForground1DimBmpMask, iForground1BmpRect.Size(), - EAspectRatioNotPreserved); - bmpMask1 = iForground1DimBmpMask; - - if( iForground2DimBmpMask ) - { - delete iForground2DimBmpMask; - iForground2DimBmpMask = NULL; - } - TRAP_IGNORE(CreateDimmedMaskL( iForground2DimBmpMask, - iForground2BmpMask )); - AknIconUtils::SetSize(iForground2DimBmpMask, iForground2BmpRect.Size(), - EAspectRatioNotPreserved); - bmpMask2 = iForground2DimBmpMask; - } - else - { - // Normal state or pressed state - TAknsItemID ImgID; - if (iHighlight) - { - ImgID = iPressedImgID; - } - else - { - ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID; - } - - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - ImgID, - KAknsIIDDefault ); - bmpMask1 = iForground1BmpMask; - bmpMask2 = iForground2BmpMask; - } - - // Draw forground - if( iForground1Bmp && iForground2Bmp) - { - TRect srcRect( TPoint( 0, 0 ), iForground1Bmp->SizeInPixels() ); - if( bmpMask1 ) - { - gc->BitBltMasked( iForground1BmpRect.iTl, - iForground1Bmp, - srcRect, - bmpMask1, - EFalse); - } - else - { - gc->BitBlt( iForground1BmpRect.iTl, - iForground1Bmp, - srcRect ); - } - - TRect src2Rect( TPoint( 0, 0 ), iForground2Bmp->SizeInPixels() ); - if( bmpMask2 ) - { - gc->BitBltMasked( rect.iTl, //fix EVWG-7PKC6J. layout of 2nd foreground is determined by image itself, but not hard code. - iForground2Bmp, - src2Rect, - bmpMask2, - EFalse); - } - else - { - gc->BitBlt( rect.iTl, //fix EVWG-7PKC6J. - iForground2Bmp, - src2Rect ); - } - } - - if (iText) - { - TAknLayoutText textLayout; - textLayout.LayoutText(Rect(), iTextFormat); - textLayout.DrawText(*gc, *iText); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::ResizeBitmaps -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlMultiImageButton::ResizeBitmaps(TSize aInnerSize) - { - if( iForground1Bmp && ( iForground1Bmp->SizeInPixels() != aInnerSize ) ) - { - AknIconUtils::SetSize( iForground1Bmp, aInnerSize, EAspectRatioNotPreserved ); - } - if( iForground1BmpMask && ( iForground1BmpMask->SizeInPixels() != aInnerSize ) ) - { - AknIconUtils::SetSize( iForground1BmpMask, aInnerSize, EAspectRatioNotPreserved ); - } - - //TRAP_IGNORE(CreateDimmedMaskL(iForground1DimBmpMask, iForground1BmpMask)); - - - - - if( iForground2Bmp && ( iForground2Bmp->SizeInPixels() != Rect().Size() ) ) - { - AknIconUtils::SetSize( iForground2Bmp, Rect().Size(), EAspectRatioNotPreserved ); - } - if( iForground2BmpMask && ( iForground2BmpMask->SizeInPixels() != Rect().Size() ) ) - { - AknIconUtils::SetSize( iForground2BmpMask, Rect().Size(), EAspectRatioNotPreserved ); - } - - //TRAP_IGNORE(CreateDimmedMaskL(iForground2DimBmpMask, iForground2BmpMask)); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::SizeChanged -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlMultiImageButton::SizeChanged(TRect aNewRect, - TRect aInnerRect, - TBool aIsReloadImages) - { - if (aNewRect.Size().iWidth == 0 || aNewRect.Size().iHeight == 0) - { - return; - } - - TRect oriRect = Rect(); - SetRect(aNewRect); - iForground1BmpRect = aInnerRect; - iForground2BmpRect = aInnerRect; - - if (aIsReloadImages) - { - ResizeBitmaps(aInnerRect.Size() ); - } - RootControl()->ReDrawRect( oriRect ); - UpdateArea(oriRect, EFalse); - Draw(); - UpdateArea(Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::DeleteForgroundRes -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlMultiImageButton::DeleteForgroundRes() - { - if( iForground1Bmp ) - { - delete iForground1Bmp; - iForground1Bmp = NULL; - } - if( iForground1BmpMask ) - { - delete iForground1BmpMask; - iForground1BmpMask = NULL; - } - if( iForground1DimBmpMask ) - { - delete iForground1DimBmpMask; - iForground1DimBmpMask = NULL; - } - - - if( iForground2Bmp ) - { - delete iForground2Bmp; - iForground2Bmp = NULL; - } - if( iForground2BmpMask ) - { - delete iForground2BmpMask; - iForground2BmpMask = NULL; - } - if( iForground2DimBmpMask ) - { - delete iForground2DimBmpMask; - iForground2DimBmpMask = NULL; - } - - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlMultiImageButton::CreateDimmedMaskL -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlMultiImageButton::CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ) - { - if (aMask && aMask->DisplayMode() == EGray256) - { - delete aDimmedMask; - aDimmedMask = NULL; - - aDimmedMask = new (ELeave) CFbsBitmap; - - User::LeaveIfError(aDimmedMask->Create(aMask->SizeInPixels(), EGray256)); - CleanupStack::PushL(aDimmedMask); - - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(aDimmedMask); - CleanupStack::PushL(bitmapDevice); - - CFbsBitGc* bitGc(NULL); - User::LeaveIfError(bitmapDevice->CreateContext(bitGc)); - CleanupStack::PushL(bitGc); - - bitGc->SetPenStyle(CGraphicsContext::ESolidPen); - bitGc->BitBlt(TPoint(0, 0), aMask); - - aDimmedMask->LockHeap(); - TInt w = aMask->SizeInPixels().iWidth; - TInt h = aMask->SizeInPixels().iHeight; - TInt dataStride = aMask->DataStride() - w; - unsigned char* address = (unsigned char *)aDimmedMask->DataAddress(); - - for ( TInt i = 0; i < h; ++i ) - { - for ( TInt j = 0; j < w; ++j ) - { - *address = KTransparency[*address]; - ++address; - } - address += dataStride; - } - - aDimmedMask->UnlockHeap(); - - //AknIconUtils::SetSize(aDimmedMask, aMask->SizeInPixels(), aScaleMode); - - CleanupStack::PopAndDestroy(2); // bitmapDevice, bitGc - CleanupStack::Pop(1); // aDimmedMask - } - - } - -EXPORT_C void CAknFepCtrlMultiImageButton::Move(const TPoint& aOffset) - { - CButtonBase::Move(aOffset); - iForground1BmpRect.Move( aOffset ); - iForground2BmpRect.Move( aOffset ); - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputbuttons/peninputrawkeybutton.cpp --- a/textinput/peninputcommonctrls/src/peninputbuttons/peninputrawkeybutton.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// system includes -#include -#include -#include -#include -#include -// user includes -#include -#include - -const TInt KInvalidEventId = 0xffff; -// ======== MEMBER FUNCTIONS ======== - -CAknFepCtrlRawKeyButton* CAknFepCtrlRawKeyButton::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode) - { - CAknFepCtrlRawKeyButton* self = NewLC(aUiLayout, - aControlId, - aDownEvent, - aUpEvent, - aScanCode); - CleanupStack::Pop(self); - - return self; - } - -CAknFepCtrlRawKeyButton* CAknFepCtrlRawKeyButton::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode) - { - CAknFepCtrlRawKeyButton* self = new (ELeave) CAknFepCtrlRawKeyButton(aUiLayout, - aControlId, - aDownEvent, - aUpEvent, - aScanCode); - CleanupStack::PushL(self); - self->BaseConstructL(); - return self; - } - -CAknFepCtrlRawKeyButton::CAknFepCtrlRawKeyButton(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aDownEvent, - TInt aUpEvent, - TInt aScanCode) - : CAknFepCtrlButton(aUiLayout, aControlId), - iDownEvent(aDownEvent), - iUpEvent(aUpEvent), - iScanCode(aScanCode) - { - } - -CAknFepCtrlRawKeyButton::~CAknFepCtrlRawKeyButton() - { - } - -CFepUiBaseCtrl* CAknFepCtrlRawKeyButton::HandlePointerDownEventL(const TPoint& aPoint) - { - if (iDownEvent == KInvalidEventId) - { - return return CButtonBase::HandlePointerDownEventL(aPoint); - } - - if(iDimmed) - { - return NULL; - } - - CFepUiBaseCtrl::HandlePointerDownEventL(aPoint); - if(IsActive()) - { - SetBackgroundBmp(iActiveBmpPressed); - SetBackgroundMaskBmp(iActiveMaskBmpPressed); - } - else - { - SetBackgroundBmp(iNonActiveBkBmpPressed); - SetBackgroundMaskBmp(iNonActiveBkMaskBmpPressed); - } - - Draw(); - UpdateArea(Rect(),EFalse); - - TKeyEvent event= {0,0,0,0}; - TPtrC eventDataPtr; - event.iScanCode = iScanCode; - eventDataPtr.Set(reinterpret_cast(&event),sizeof(event)); - - ReportEvent(iDownEvent,eventDataPtr); - - return this; - } - -CFepUiBaseCtrl* CAknFepCtrlRawKeyButton::HandlePointerUpEventL(const TPoint& aPoint) - { - if (iUpEvent == KInvalidEventId) - { - return CButtonBase::HandlePointerUpEventL(aPoint); - } - - if(iDimmed) - { - return NULL; - } - - if(IsActive()) - { - SetBackgroundBmp(Bitmap(EBtnBmpActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpActive,ETrue)); - } - else - { - SetBackgroundBmp(Bitmap(EBtnBmpNonActive,EFalse)); - SetBackgroundMaskBmp(Bitmap(EBtnBmpNonActive,ETrue)); - } - - SetActive(ETrue); - Draw(); - UpdateArea(Rect(),EFalse); - - TKeyEvent event= {0,0,0,0}; - TPtrC eventDataPtr; - event.iScanCode = iScanCode; - eventDataPtr.Set(reinterpret_cast(&event),sizeof(event)); - - ReportEvent(iUpEvent,eventDataPtr); - - return this; - } - -TInt CAknFepCtrlRawKeyButton::DownEvent() const - { - return iDownEvent; - } - -TInt CAknFepCtrlRawKeyButton::UpEvent() const - { - return iUpEvent; - } - -TInt CAknFepCtrlRawKeyButton::ScanCode() const - { - return iScanCode; - } - -void CAknFepCtrlRawKeyButton::SetDownEvent(TInt aEvent) - { - iDownEvent = aEvent; - } - -void CAknFepCtrlRawKeyButton::SetUpEvent(TInt aEvent) - { - iUpEvent = aEvent; - } - -void CAknFepCtrlRawKeyButton::SetScanCode(TInt aScanCode) - { - iScanCode = aScanCode; - } - -void CAknFepCtrlRawKeyButton::Draw() - { - CAknFepCtrlButton::Draw(); - } - - -// End Of File \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputbitmapdb.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputbitmapdb.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,370 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: bitmap db manager,which is used by drop down list -* -*/ - - -#include -#include -#include -#include -#include -#include -#include "peninputbitmapdb.h" - -const TUint32 KDefaultTextColor = 0x000000; -const TUint32 KDefaultFrameColor = 0x000000; - -const TInt KInvalidBmp = -1; - -const TInt KTransparency[256] = - { - 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, - 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, - 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19, - 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, - 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29, - 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35, - 35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 40, 40, 40, - 41, 41, 41, 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 46, - 46, 46, 47, 47, 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 50, 51, 51, - 51, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 55, 55, 55, 56, 56, 56, 56, - 57, 57, 57, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, - 62, 62, 63, 63, 63, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 67, 67, 67, - 68, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 71, 72, 72, 72, 73, - 73, 73, 74, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77 - }; - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CBitmapDb - -// ----------------------------------------------------------------------------- -// CBitmapDb::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CBitmapDb* CBitmapDb::NewL(TResourceReader& aReader, - TSize aBitmapSize, - TSize aExpandSize, - TSize aSpinBtnSize) - { - CBitmapDb* self = new (ELeave) CBitmapDb(); - CleanupStack::PushL(self); - self->ConstructL(aReader, - aBitmapSize, - aExpandSize, - aSpinBtnSize); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CBitmapDb::~CBitmapDb -// destructor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CBitmapDb::~CBitmapDb() - { - // Delete all bitmap - iBmpList.ResetAndDestroy(); - iBmpList.Close(); - } - -// ----------------------------------------------------------------------------- -// CBitmapDb::GetBitMap -// get bitmap according to the assigned type -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const CFbsBitmap* CBitmapDb::GetBitMap(const TBitmapType aType) - { - // Return corresponding bitmap according aType - return iBmpList[aType]; - } - -// ----------------------------------------------------------------------------- -// CBitmapDb::CreateIconL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CBitmapDb::CreateIconL(const TDesC& aBmpFileName, - TAknsItemID aId, - CFbsBitmap** aBmp, - CFbsBitmap** aMaskBmp, - TInt aBmpId, - TInt aMaskBmpId, - TSize aSize, - TBool aColorIcon) - { - if (aBmpId != KInvalidBmp) - { - if (aMaskBmpId != KInvalidBmp) - { - if (aColorIcon) - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - aId, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG30, - *aBmp, - *aMaskBmp, - aBmpFileName, - aBmpId, - aMaskBmpId, - AKN_LAF_COLOR( 0 ) ); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - aId, - *aBmp, - *aMaskBmp, - aBmpFileName, - aBmpId, - aMaskBmpId); - } - - AknIconUtils::SetSize(*aMaskBmp, aSize, EAspectRatioNotPreserved); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - aId, - *aBmp, - aBmpFileName, - aBmpId); - } - - AknIconUtils::SetSize(*aBmp, aSize, EAspectRatioNotPreserved); - } - } - -void CBitmapDb::ConstructFromResourceL(TResourceReader& aReader, - TSize aBitmapSize, - TSize aExpandSize, - TSize aSpinBtnSize) - { - for (TInt i = 0; i < EBitmapLastType + 1; ++i) - { - delete iBmpList[i]; - iBmpList[i] = NULL; - } - - // Read mbm file name from the aReader - TPtrC bmpFile = aReader.ReadTPtrC(); - TInt imgMajorSkinId = aReader.ReadInt32(); - - TAknsItemID id; - - for (TInt i = 0; i < EBitmapLastType + 1; i+=2) - { - TInt bmpId = aReader.ReadInt16(); - TInt maskId = aReader.ReadInt16(); - TInt minorSkinId = aReader.ReadInt16(); - - TSize bmpsize = aBitmapSize; - - if ((i >= EBitmapNextDisable && i < EBitmapNextPressMask) || - (i >= EBitmapPrevious && i < EBitmapPreviousPressMask)) - { - bmpsize = aSpinBtnSize; - } - else if (i >= EBitmapExpand && i < EBitmapExpandPressMask) - { - bmpsize = aExpandSize; - } - - id.Set(imgMajorSkinId, minorSkinId); - - TBool colorIcon; - if ( i == EBitmapNext || i == EBitmapNextMask || - i == EBitmapClose || i == EBitmapCloseMask || - i == EBitmapPrevious || i == EBitmapPreviousMask || - i == EBitmapExpand || i == EBitmapExpandMask) - { - colorIcon = ETrue; - } - else - { - colorIcon = EFalse; - } - - CreateIconL(bmpFile, - id, - &(iBmpList[i]), - &(iBmpList[i+1]), - bmpId, - maskId, - bmpsize, - colorIcon); - - if( i == EBitmapNextDisable ) - { - CFbsBitmap* newMask = NULL; - CreateDimmedMaskL( newMask, iBmpList[i+1]); - delete iBmpList[i+1]; - iBmpList[i+1] = newMask; - } - } - - TInt colorMajorSkinId = aReader.ReadInt32(); - TInt skinitemid = aReader.ReadInt16(); - TInt textcoloridx = aReader.ReadInt16(); - - id.Set(colorMajorSkinId, skinitemid); - TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - iTextColor, - id, - textcoloridx); - - if (error != KErrNone) - { - iTextColor = TRgb(KDefaultTextColor); - } - - TInt frameMajorSkinId = aReader.ReadInt32(); - skinitemid = aReader.ReadInt16(); - TInt framecoloridx = aReader.ReadInt16(); - - id.Set(frameMajorSkinId, skinitemid); - error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - iFrameColor, - id, - framecoloridx); - - if (error != KErrNone) - { - iFrameColor = TRgb(KDefaultFrameColor); - } - } - -// ----------------------------------------------------------------------------- -// CBitmapDb::ConstructL -// 2nd construct function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CBitmapDb::ConstructL(TResourceReader& aReader, - TSize aBitmapSize, - TSize aExpandSize, - TSize aSpinBtnSize) - { - for (TInt i = 0; i < EBitmapLastType + 1; ++i) - { - iBmpList.AppendL(NULL); - } - - ConstructFromResourceL(aReader, - aBitmapSize, - aExpandSize, - aSpinBtnSize); - } - -// ----------------------------------------------------------------------------- -// CBitmapDb::TextColor -// Get text color of drop down list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TRgb CBitmapDb::TextColor() - { - return iTextColor; - } - -// ----------------------------------------------------------------------------- -// CBitmapDb::FrameColor -// Get frame color of drop down list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TRgb CBitmapDb::FrameColor() - { - return iFrameColor; - } -// --------------------------------------------------------------------------- -// CBitmapDb::CreateDimmedMaskL -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CBitmapDb::CreateDimmedMaskL( CFbsBitmap*& aDimmedMask, - const CFbsBitmap* aMask - /*TScaleMode aScaleMode*/ ) - { - if (aMask && aMask->DisplayMode() == EGray256) - { - delete aDimmedMask; - aDimmedMask = NULL; - - aDimmedMask = new (ELeave) CFbsBitmap; - - User::LeaveIfError(aDimmedMask->Create(aMask->SizeInPixels(), EGray256)); - CleanupStack::PushL(aDimmedMask); - - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(aDimmedMask); - CleanupStack::PushL(bitmapDevice); - - CFbsBitGc* bitGc(NULL); - User::LeaveIfError(bitmapDevice->CreateContext(bitGc)); - CleanupStack::PushL(bitGc); - - bitGc->SetPenStyle(CGraphicsContext::ESolidPen); - bitGc->BitBlt(TPoint(0, 0), aMask); - - aDimmedMask->LockHeap(); - TInt w = aMask->SizeInPixels().iWidth; - TInt h = aMask->SizeInPixels().iHeight; - TInt dataStride = aMask->DataStride() - w; - unsigned char* address = (unsigned char *)aDimmedMask->DataAddress(); - - for ( TInt i = 0; i < h; ++i ) - { - for ( TInt j = 0; j < w; ++j ) - { - *address = KTransparency[*address]; - ++address; - } - address += dataStride; - } - - aDimmedMask->UnlockHeap(); - - //AknIconUtils::SetSize(aDimmedMask, aMask->SizeInPixels(), aScaleMode); - - CleanupStack::PopAndDestroy(2); // bitmapDevice, bitGc - CleanupStack::Pop(1); // aDimmedMask - } - - } - -void CBitmapDb::SizeChanged(TSize aSize) - { - for (TInt i = 0; i < iBmpList.Count(); i++) - { - AknIconUtils::SetSize(iBmpList[i], aSize, EAspectRatioNotPreserved); - } - // dimmed mask can't use AknIconUtils::SetSize change its size. - if( iBmpList[EBitmapNextDisableMask] && iBmpList[EBitmapNextMask] ) - { - CFbsBitmap* newMask = NULL; - TRAP_IGNORE(CreateDimmedMaskL( newMask, iBmpList[EBitmapNextMask])); - delete iBmpList[EBitmapNextDisableMask]; - iBmpList[EBitmapNextDisableMask] = newMask; - } - } -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputcandidate.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputcandidate.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,334 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: candidate stands for every cell in drop down list -* -*/ - - -#include -#include -#include -#include - -#include "peninputcandidate.h" -#include "peninputdropdownlist.h" - -_LIT(KEllipsis, "\x2026"); - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CCandidate - -CCandidate* CCandidate::NewL(const TDesC& aString, - MFepCtrlDropdownListContext* aOwner) - { - CCandidate* self = new (ELeave) CCandidate(aString, aOwner); // Q: is here will call ctor of base class? - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -void CCandidate::ConstructL() - { - iDisplayText = iCandidate.AllocL(); - } - -// ----------------------------------------------------------------------------- -// CCandidate::CCandidate -// construct function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CCandidate::CCandidate(const TDesC& aString, MFepCtrlDropdownListContext* aOwner) -: iCandidate(aString),iBaselineOffset(0), iOwner(aOwner) - { - } - -// ----------------------------------------------------------------------------- -// CCandidate::~CCandidate -// destructor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CCandidate::~CCandidate() - { - delete iDisplayText; - } - -// ----------------------------------------------------------------------------- -// CCandidate::GetCandidate -// get candidate string -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TDesC& CCandidate::GetCandidate() - { - return iCandidate; - } - -// ----------------------------------------------------------------------------- -// CCandidate::GetRect -// get rect of the candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TRect& CCandidate::GetRect() const - { - return iRect; - } - -// ----------------------------------------------------------------------------- -// CCandidate::Move -// move rect of the candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CCandidate::Move(const TPoint& aOffsetPoint) - { - iRect.Move(aOffsetPoint); - } - -// ----------------------------------------------------------------------------- -// CCandidate::SetPosition -// set position for the candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CCandidate::SetPositionL(const TPoint& aLeftTopPosition, - TInt aWidthForOneUnit, - TInt aHeight, - const CFont* aTextFont, - TInt aCellHorizontalMargin) - { - iTextFont = aTextFont; - - // Calculate base line offset - iBaselineOffset = aHeight/2 + aTextFont->AscentInPixels()/2 ; - - // Calculate the cell for the candidate - //const TInt cellCount = CalculateCells(aWidthForOneUnit, aTextFont); - const TInt cellCount = CalculateDisplayTextL(aWidthForOneUnit, aTextFont, iOwner->GetColNum()); - - // modified by txin - // original: - /* - iRect.iBr = aLeftTopPosition; - - iRect.SetRect(aLeftTopPosition, - TSize(cellCount * aWidthForOneUnit + (cellCount - 1) * aCellHorizontalMargin, - aHeight)); - */ - // if owner's horizontal direction is RToL, then aLeftTopPosition actually mean RightTop pos - TInt candHDir = iOwner->CandHDirection(); - TSize candSize = TSize(cellCount * aWidthForOneUnit + (cellCount - 1) * aCellHorizontalMargin, - aHeight); - (candHDir == CFepCtrlDropdownList::ECandFromLToR) ? - iRect.SetRect(aLeftTopPosition, candSize) : - iRect.SetRect(TPoint(aLeftTopPosition.iX - candSize.iWidth, aLeftTopPosition.iY), candSize); - // end modify - - return cellCount; - } - -// ----------------------------------------------------------------------------- -// CCandidate::DrawText -// draw text of the candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CCandidate::DrawText(CFbsBitGc& aGc, const CGraphicsContext::TTextAlign aAlignment, - const TInt aTextMargin, TRgb aTextColor, - TRgb aSpecialTextColor, const TDesC& aFixedText) - { - - aGc.SetBrushStyle(CGraphicsContext::ENullBrush); - if ( aFixedText.Length() == 0 ) - { - // If fixed text has no any data - aGc.SetPenColor(aTextColor); - if(TBidiText::TextDirectionality( *iDisplayText ) == TBidiText:: ERightToLeft) - { - // If find the fixed text in the candidate and the index is equal to 0 - TInt posX = 0; - if(!iTextFont) - { - iTextFont = iOwner->GetFont(); - } - if ( aAlignment == CGraphicsContext::ECenter ) - { - posX = iRect.iTl.iX + - (iRect.Width() - iTextFont->TextWidthInPixels(*iDisplayText)) / 2; - } - else if ( aAlignment == CGraphicsContext::ELeft ) - { - posX = iRect.iTl.iX + aTextMargin; - } - else if ( aAlignment == CGraphicsContext::ERight ) - { - posX = iRect.iTl.iX + iRect.Width() - - iTextFont->TextWidthInPixels(*iDisplayText) - aTextMargin; - } - - CGraphicsContext::TDrawTextExtendedParam param; - param.iParRightToLeft = ETrue; - aGc.DrawTextExtended(*iDisplayText, TPoint(posX,iRect.iTl.iY + iBaselineOffset), param); - } - else - { - aGc.DrawText( *iDisplayText, iRect, iBaselineOffset, aAlignment); - } - } - else - { - if ( iCandidate.Find(aFixedText) == 0 ) - { - // If find the fixed text in the candidate and the index is equal to 0 - TInt posX = 0; - if(!iTextFont) - { - iTextFont = iOwner->GetFont(); - } - if ( aAlignment == CGraphicsContext::ECenter ) - { - posX = iRect.iTl.iX + - (iRect.Width() - iTextFont->TextWidthInPixels(iCandidate)) / 2; - } - else if ( aAlignment == CGraphicsContext::ELeft ) - { - posX = iRect.iTl.iX + aTextMargin; - } - else if ( aAlignment == CGraphicsContext::ERight ) - { - posX = iRect.iTl.iX + iRect.Width() - - iTextFont->TextWidthInPixels(iCandidate) - aTextMargin; - } - - - // Draw Fixed text - aGc.SetPenColor(aTextColor); - aGc.DrawText(aFixedText, TPoint(posX,iRect.iTl.iY + iBaselineOffset)); - - // Snatch the special text - TPtrC buf = iCandidate.Mid(aFixedText.Length()); - - // Set X position for the special text - posX = posX + iTextFont->TextWidthInPixels(aFixedText); - - // Draw special text - aGc.SetPenColor(aSpecialTextColor); - aGc.DrawText(buf, TPoint(posX, iRect.iTl.iY + iBaselineOffset)); - } - else - { - aGc.SetPenColor(aTextColor); - if(TBidiText::TextDirectionality( iCandidate ) == TBidiText:: ERightToLeft) - { - // If find the fixed text in the candidate and the index is equal to 0 - TInt posX = 0; - if(!iTextFont) - { - iTextFont = iOwner->GetFont(); - } - if ( aAlignment == CGraphicsContext::ECenter ) - { - posX = iRect.iTl.iX + - (iRect.Width() - iTextFont->TextWidthInPixels(iCandidate)) / 2; - } - else if ( aAlignment == CGraphicsContext::ELeft ) - { - posX = iRect.iTl.iX + aTextMargin; - } - else if ( aAlignment == CGraphicsContext::ERight ) - { - posX = iRect.iTl.iX + iRect.Width() - - iTextFont->TextWidthInPixels(iCandidate) - aTextMargin; - } - - CGraphicsContext::TDrawTextExtendedParam param; - param.iParRightToLeft = ETrue; - aGc.DrawTextExtended(iCandidate, TPoint(posX,iRect.iTl.iY + iBaselineOffset), param); - } - else - { - aGc.DrawText( iCandidate, iRect, iBaselineOffset, CGraphicsContext::ECenter); - } - } - } - } - -// ----------------------------------------------------------------------------- -// CCandidate::CalculateCells -// calculate the cell for the candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CCandidate::CalculateCells(const TInt aWidthForOneUnit, - const CFont* aTextFont, - const TDesC& aText) - { - const TInt width = aTextFont->TextWidthInPixels(aText) + 2 * iOwner->GetTextMargin(); - - if (width <= aWidthForOneUnit) - { - return 1; - } - - return (width + aWidthForOneUnit + - iOwner->GetCellHorizontalMargin() - 1)/(aWidthForOneUnit + iOwner->GetCellHorizontalMargin()); - } - -TInt CCandidate::CalculateDisplayTextL(const TInt aWidthForOneUnit, - const CFont* aTextFont, - TInt aColNum) - { - TInt cellcnt = CalculateCells(aWidthForOneUnit, aTextFont, *iDisplayText); - - if (cellcnt <= aColNum) - { - return cellcnt; - } - - TPtr ptr = iDisplayText->Des(); - - if (iOwner->CandTruncateType() == CFepCtrlDropdownList::ECandTruncateFromBeginning) - { - while (cellcnt > aColNum && ptr.Length() > 0) - { - ptr.Delete(0, 1); - cellcnt = CalculateCells(aWidthForOneUnit, aTextFont, ptr); - } - } - else if (iOwner->CandTruncateType() == CFepCtrlDropdownList::ECandTruncateAsEllipsis) - { - while (cellcnt > aColNum && ptr.Length() > 1) - { - ptr.Delete(ptr.Length()-2, 2); - ptr.Append(KEllipsis); - cellcnt = CalculateCells(aWidthForOneUnit, aTextFont, ptr); - } - } - else if (iOwner->CandTruncateType() == CFepCtrlDropdownList::ECandTruncateFromEnd) - { - while (cellcnt > aColNum && ptr.Length() > 0) - { - ptr.Delete(ptr.Length()-1, 1); - cellcnt = CalculateCells(aWidthForOneUnit, aTextFont, ptr); - } - } - - return cellcnt; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputdropdownlist.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputdropdownlist.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2292 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: drop-down list control -* -*/ - - -// INCLUDE FILES - - -#include "peninputlistmanager.h" -#include "peninputbitmapdb.h" -#include "peninputcandidate.h" -#include "peninputpages.h" -#include "peninputlayoutbubblectrl.h" - -// added by txin -//#include "peninputlistmultirowrollwithicon.h" -// end -#include "peninputlist.h" -#include -#include -#include -#include -#include -#include - -// constant definition -const TInt32 KInvalidResId = -1; - -// added by txin -const TInt KInvalidCandIndex = -1; -// end adding - -const TInt KPreviewBubbleOffset = 20; - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CFepCtrlDropdownList - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CFepCtrlDropdownList* CFepCtrlDropdownList::NewL( const TPoint& aTopLeftPoint, - CFepUiLayout* aUiLayout, - TInt aControlId, - TResourceReader& aReader, - const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TInt aColNum, - const TInt aRowNum, - const CFont* aFont, - MListEventHandler* aHandler, - const CGraphicsContext::TTextAlign aAlignment, - const TInt aTextMargin, - const TRgb aBorderColor, - const TRgb aBgColor, - const TRgb aNavigationBgColor, - const TRgb aTextColor, - const TRgb aSpecialTextColor, - const TRgb aHighLightTextColor, - const TRgb aHighLightBgColor, - const TRgb aButtonDownBgColor ) - { - CFepCtrlDropdownList* self = NewLC(aTopLeftPoint, - aUiLayout, - aControlId, - aReader, - aCellWidth, - aCellHeight, - aNaviWidth, - aColNum, - aRowNum, - aFont, - aHandler, - aAlignment, - aTextMargin, - aBorderColor, - aBgColor, - aNavigationBgColor, - aTextColor, - aSpecialTextColor, - aHighLightTextColor, - aHighLightBgColor, - aButtonDownBgColor); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::NewLC -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// - -EXPORT_C CFepCtrlDropdownList* CFepCtrlDropdownList::NewLC(const TPoint& aTopLeftPoint, - CFepUiLayout* aUiLayout, - TInt aControlId, - TResourceReader& aReader, - const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TInt aColNum, - const TInt aRowNum, - const CFont* aFont, - MListEventHandler* aHandler, - const CGraphicsContext::TTextAlign aAlignment, - const TInt aTextMargin, - const TRgb aBorderColor, - const TRgb aBgColor, - const TRgb aNavigationBgColor, - const TRgb aTextColor, - const TRgb aSpecialTextColor, - const TRgb aHighLightTextColor, - const TRgb aHighLightBgColor, - const TRgb aButtonDownBgColor) - { - CFepCtrlDropdownList* self = new (ELeave) CFepCtrlDropdownList(aTopLeftPoint, - aUiLayout, - aControlId, - aCellWidth, - aCellHeight, - aNaviWidth, - aColNum, - aRowNum, - aFont, - aHandler, - aAlignment, - aTextMargin, - aBorderColor, - aBgColor, - aNavigationBgColor, - aTextColor, - aSpecialTextColor, - aHighLightTextColor, - aHighLightBgColor, - aButtonDownBgColor); - CleanupStack::PushL(self); - self->ConstructL(aTopLeftPoint,aReader); - return self; - } - -// txin -EXPORT_C CFepCtrlDropdownList* CFepCtrlDropdownList::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aResId, - TPoint aTopLeftPoint, - TSize aCellSize, - TInt aColNum, - TInt aRowNum) - { - CFepCtrlDropdownList* self = new (ELeave) CFepCtrlDropdownList(aUiLayout, - aControlId, - aTopLeftPoint, - aCellSize, - aColNum, - aRowNum); - CleanupStack::PushL(self); - self->ConstructL(aTopLeftPoint, aResId); - CleanupStack::Pop(self); - return self; - } - -EXPORT_C CFepCtrlDropdownList* CFepCtrlDropdownList::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt aResId, - TPoint aTopLeftPoint, - const CFont* aFont, - TSize aCellSize, - TInt aNaviWidth, - TInt aColNum, - TInt aRowNum, - TInt aSpinBtnHeight, - TInt aHorizontalCellMargin, - TInt aVerticalCellMargin, - THDirection aDirection, - TBool aPageShown) - { - CFepCtrlDropdownList* self = new (ELeave) CFepCtrlDropdownList(aUiLayout, - aControlId, - aResId, - aTopLeftPoint, - aFont, - aCellSize, - aNaviWidth, - aColNum, - aRowNum, - aSpinBtnHeight, - aHorizontalCellMargin, - aVerticalCellMargin, - aDirection, - aPageShown); - CleanupStack::PushL(self); - self->ConstructL(aTopLeftPoint, aResId); - CleanupStack::Pop(self); - return self; - } - - -// end - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::CFepCtrlDropdownList -// construtor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CFepCtrlDropdownList::CFepCtrlDropdownList(const TPoint& aTopLeftPoint, - CFepUiLayout* aUiLayout, - TInt aControlId, - const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TInt aColNum, - const TInt aRowNum, - const CFont* aFont, - MListEventHandler* aHandler, - const CGraphicsContext::TTextAlign aAlignment, - const TInt aTextMargin, - const TRgb aBorderColor, - const TRgb aBgColor, - const TRgb aNavigationBgColor, - const TRgb aTextColor, - const TRgb aSpecialTextColor, - const TRgb aHighLightTextColor, - const TRgb aHighLightBgColor, - const TRgb aButtonDownBgColor) - : CFepUiBaseCtrl(TRect(), aUiLayout, aControlId), - iEnableSecondary(EFalse), - iFirstCandidateIndex(0), - iLastCandidateIndex(0), - iFont(aFont), iCellWidth(aCellWidth), iCellHeight(aCellHeight), iNaviWidth(aNaviWidth), - iSpinBtnHeight(aCellHeight), - iCellHorizontalMargin(0), - iCellVerticalMargin(0), - iOriginalCandIdx(KInvalidCandIndex), - iOriginalFirstCandIdx(KInvalidCandIndex), - iUpdateListReDraw(ETrue), - iAlignment(aAlignment), iTextMargin(aTextMargin), iColNum(aColNum), iRowNum(aRowNum), - iBorderColor(aBorderColor), iBgColor(aBgColor), iNavigationBgColor(aNavigationBgColor), - iTextColor(aTextColor), iSpecialTextColor(aSpecialTextColor), - iHighLightTextColor(aHighLightTextColor), - iHighLightBgColor(aHighLightBgColor), iButtonDownBgColor(aButtonDownBgColor), - iTopLeftPoint(aTopLeftPoint), - iEventIdForCandidateSelected(-1), - iEventIdForNextPageCandidate(-1), - iEventIdForPreviousPageCandidate(-1), - iEventIdForCandidateExisted(-1), - iListEventHandler(aHandler), iFirstTimeConstruct(ETrue), iListType(EListNoExpandable), - iFuzzyBoundry(0), - iCandExpandType(ECandExpandDownward), - iCandHDirection(ECandFromLToR), - iPageCtrlShown(ETrue) - { - SetControlType(KDropDownListCtrlType); - } - -// txin -CFepCtrlDropdownList::CFepCtrlDropdownList(CFepUiLayout* aUiLayout, - TInt aControlId, - TPoint aTopLeftPoint, - TSize aCellSize, - TInt aColNum, - TInt aRowNum) - : CFepUiBaseCtrl(TRect(), aUiLayout, aControlId), - iEnableSecondary(EFalse), - iFirstCandidateIndex(0), - iLastCandidateIndex(0), - iCellWidth(aCellSize.iWidth), iCellHeight(aCellSize.iHeight), iNaviWidth(iCellWidth), - iSpinBtnHeight(iCellHeight), - iCellHorizontalMargin(0), - iCellVerticalMargin(0), - iOriginalCandIdx(KInvalidCandIndex), - iOriginalFirstCandIdx(KInvalidCandIndex), - iUpdateListReDraw(ETrue), - iAlignment(CGraphicsContext::ECenter), iTextMargin(3), iColNum(aColNum), iRowNum(aRowNum), - iBorderColor(KRgbBlack), iBgColor(TRgb(0xeeeeee)), iNavigationBgColor(TRgb(0xeeeeee)), - iTextColor(KRgbBlack), iSpecialTextColor(KRgbBlack), iHighLightTextColor(KRgbBlack), - iHighLightBgColor(TRgb(0xcccccc)), iButtonDownBgColor(KRgbGray), iTopLeftPoint(aTopLeftPoint), - iEventIdForCandidateSelected(-1), - iEventIdForNextPageCandidate(-1), - iEventIdForPreviousPageCandidate(-1), - iEventIdForCandidateExisted(-1), - iFirstTimeConstruct(ETrue), iListType(EListNoExpandable), - iFuzzyBoundry(0), - iCandExpandType(ECandExpandDownward), - iCandHDirection(ECandFromLToR), - iPageCtrlShown(ETrue) - { - SetControlType(KDropDownListCtrlType); - } - -CFepCtrlDropdownList::CFepCtrlDropdownList(CFepUiLayout* aUiLayout, - TInt aControlId, - TInt /*aResId*/, - TPoint aTopLeftPoint, - const CFont* /*aFont*/, - TSize aCellSize, - TInt aNaviWidth, - TInt aColNum, - TInt aRowNum, - TInt aSpinBtnHeight, - TInt aHorizontalCellMargin, - TInt aVerticalCellMargin, - THDirection aDirection, - TBool aPageShown) - : CFepUiBaseCtrl(TRect(), aUiLayout, aControlId), - iEnableSecondary(EFalse), - iFirstCandidateIndex(0), - iLastCandidateIndex(0), - iCellWidth(aCellSize.iWidth), iCellHeight(aCellSize.iHeight), iNaviWidth(aNaviWidth), - iSpinBtnHeight(aSpinBtnHeight), - iCellHorizontalMargin(aHorizontalCellMargin), - iCellVerticalMargin(aVerticalCellMargin), - iOriginalCandIdx(KInvalidCandIndex), - iOriginalFirstCandIdx(KInvalidCandIndex), - iUpdateListReDraw(ETrue), - iAlignment(CGraphicsContext::ECenter), iTextMargin(3), iColNum(aColNum), iRowNum(aRowNum), - iBorderColor(KRgbBlack), iBgColor(TRgb(0xeeeeee)), iNavigationBgColor(TRgb(0xeeeeee)), - iTextColor(KRgbBlack), iSpecialTextColor(KRgbBlack), iHighLightTextColor(KRgbBlack), - iHighLightBgColor(TRgb(0xcccccc)), iButtonDownBgColor(KRgbGray), iTopLeftPoint(aTopLeftPoint), - iEventIdForCandidateSelected(-1), - iEventIdForNextPageCandidate(-1), - iEventIdForPreviousPageCandidate(-1), - iEventIdForCandidateExisted(-1), - iFirstTimeConstruct(ETrue), iListType(EListNoExpandable), - iFuzzyBoundry(0), - iCandExpandType(ECandExpandDownward), - iCandHDirection(aDirection), - iPageCtrlShown(aPageShown) - { - SetControlType(KDropDownListCtrlType); - } - -// end - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ConstructL -// 2nd construct function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::ConstructL(const TPoint& aTopLeftPoint, TResourceReader& aReader) - { - BaseConstructL(); - - iBitmapDb = CBitmapDb::NewL(aReader, - TSize(iCellWidth, iCellHeight), - TSize(iNaviWidth, iCellHeight), - TSize(iNaviWidth, iSpinBtnHeight)); - - SetTextColor(iBitmapDb->TextColor()); - SetBorderColor(iBitmapDb->FrameColor()); - iFirstTimeConstruct = EFalse; - - iPages = CPages::NewL(); - - iListManager = CListManager::NewL(this); - - iListManager->SetActiveList(iListManager->ListOneRowWithoutIcon()); - - SetRect( iListManager->ActiveList()->Rect() ); - - const TSize& size = Rect().Size(); - TRect rect(aTopLeftPoint,size); - SetRect(rect); - } - -// txin -void CFepCtrlDropdownList::ConstructL(TPoint aTopLeftPoint, TInt aResId) - { - SetResourceId(aResId); - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, aResId); - ConstructL(aTopLeftPoint, reader); - CleanupStack::PopAndDestroy(); // reader - } -// end - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::~CFepCtrlDropdownList -// destructor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CFepCtrlDropdownList::~CFepCtrlDropdownList() - { - delete iBubbleCtrl; - - // destroy list objects - delete iListManager; - - // Delete bitmapDb - delete iBitmapDb; - - // Delete pages - delete iPages; - - // Delete all candidate - iCandidatelist.ResetAndDestroy(); - - // Clear and close iSecondaryList - iSecondaryList.Close(); - - // Clear and close iHighlightList - iHighlightList.Close(); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SizeChanged -// size change function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SizeChanged(const TInt aCellWidth, - const TInt aCellHeight, - const TInt aNaviWidth, - const TPoint aTopLeftPoint, - const TInt aColNum, - const TInt aRowNum) - { - iCellWidth = aCellWidth; - iCellHeight = aCellHeight; - iNaviWidth = aNaviWidth; - iSpinBtnHeight = aCellHeight; - - iBitmapDb->SizeChanged(TSize(aNaviWidth, aCellHeight)); - - if ( aTopLeftPoint != TPoint(0,0) ) - { - iTopLeftPoint = aTopLeftPoint; - } - - if ( aColNum ) - iColNum = aColNum; - if ( aRowNum ) - iRowNum = aRowNum; - - iListManager->SizeChanged(); - - switch ( iListType ) - { - case EListNoExpandable: - ChangeActiveList( iListManager->ListOneRowWithoutIcon() ); - break; - case EListNoExpandableWithBubble: - { - ChangeActiveList(iListManager->ListOneRowWithoutIconWithBubble()); - } - break; - case EListExpandable: - case EListExpandableWithoutIcon: - { - ChangeActiveList(iListManager->ListOneRowWithIcon()); - } - break; - case EListExpandableWithBubble: - { - ChangeActiveList(iListManager->ListOneRowWithIconWithBubble()); - } - break; - // txin - case EListExpandableRollWithIcon: - { - TInt onerowCandIdx = OneRowStartCandIdx(); - - if (onerowCandIdx != KInvalidCandIndex) - { - ChangeActiveList(iListManager->ListOneRowRollWithIcon(), onerowCandIdx); - return; - } - - ChangeActiveList(iListManager->ListOneRowRollWithIcon()); - } - break; - case EListExpandableRollWithIconWithBubble: - { - TInt onerowCandIdx = OneRowStartCandIdx(); - - if (onerowCandIdx != KInvalidCandIndex) - { - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble(), onerowCandIdx); - return; - } - - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble()); - } - break; - - case EListExpandableMultiRowWithoutIcon: - { - ChangeActiveList(iListManager->ListExpandableMultiRowWithoutIcon()); - } - break; - default: - __ASSERT_DEBUG( EFalse, - User::Panic( _L("TListType Error::SizeChanged()"), 0 ) ); - break; - } - } - -// --------------------------------------------------------------------------- -// CFepUiBaseCtrl::HandlePointerDownEventL -// Handle pointer down event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CFepCtrlDropdownList::HandlePointerDownEventL(const TPoint& aPoint) - { - CFepUiBaseCtrl::HandlePointerDownEventL(aPoint); - - iListManager->ActiveList()->HandlePointerDownL(aPoint); - - return this; - } - -// --------------------------------------------------------------------------- -// CFepUiBaseCtrl::HandlePointerUpEventL -// Handle pointer up event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CFepCtrlDropdownList::HandlePointerUpEventL(const TPoint& aPoint) - { - CFepUiBaseCtrl::HandlePointerUpEventL(aPoint); - - iListManager->ActiveList()->HandlePointerUpL(aPoint); - - return this; - } - -// --------------------------------------------------------------------------- -// CFepUiBaseCtrl::HandlePointerMoveEventL -// Handle pointer move event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CFepUiBaseCtrl* CFepCtrlDropdownList::HandlePointerMoveEventL(const TPoint& aPoint) - { - - if(!PointerDown()) - { - return NULL; - } - - iListManager->ActiveList()->HandlePointerDragL(aPoint); - - return this; - } - -EXPORT_C void CFepCtrlDropdownList::HandlePointerLeave(const TPoint& aPoint) - { - CFepUiBaseCtrl::HandlePointerLeave(aPoint); - if(!Hiden()) - iListManager->ActiveList()->HandlePointerLeave(aPoint); - ClearBubble(); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::AddCandidatesL -// Add candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::AddCandidatesL(const RPointerArray& aCandidates, - const TListType /*aListType*/) - { - // add new candidates - for (TInt i = iCandidatelist.Count(); i < aCandidates.Count(); i++) - { - CCandidate* candidate = CCandidate::NewL(*aCandidates[i], this); - - if (iCandidatelist.Append(candidate) != KErrNone) - { - delete candidate; - } - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetCandidatesL -// Set candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetCandidatesL(const RPointerArray& aCandidates, - const TListType aListType, - const TDesC& aFixedText) - { - //clear last candidates which had been set - iCandidatelist.ResetAndDestroy(); - - iListManager->ResetStatus(); - - iHighlightList.Reset(); - - iFixedText.Zero(); - iFixedText.Append(aFixedText); - - iFirstCandidateIndex = 0; - iLastCandidateIndex = 0; - // create or add new ones - for( TInt i=0; i < aCandidates.Count(); i++ ) - { - // CCandidate is s.c. self-containing class - CCandidate* candidate = CCandidate::NewL(*aCandidates[i], this); - // referring to memory object - iCandidatelist.Append(candidate); - } - - iListType = aListType; - - switch ( aListType ) - { - case EListNoExpandable: - { - ChangeActiveList( iListManager->ListOneRowWithoutIcon() ); - } - break; - case EListNoExpandableWithBubble: - { - ChangeActiveList( iListManager->ListOneRowWithoutIconWithBubble() ); - } - break; - case EListExpandable: - case EListExpandableWithoutIcon: - { - ChangeActiveList(iListManager->ListOneRowWithIcon()); - } - break; - case EListExpandableWithBubble: - { - ChangeActiveList(iListManager->ListOneRowWithIconWithBubble()); - } - break; - - // txin - case EListExpandableRollWithIcon: - { - SetOneRowStartCandIdx(KInvalidCandIndex); - SetOriginalFirstCandIdx(KInvalidCandIndex); - - ChangeActiveList(iListManager->ListOneRowRollWithIcon()); - } - break; - case EListExpandableRollWithIconWithBubble: - { - SetOneRowStartCandIdx(KInvalidCandIndex); - SetOriginalFirstCandIdx(KInvalidCandIndex); - - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble()); - } - break; - - case EListExpandableMultiRowWithoutIcon: - { - ChangeActiveList( iListManager->ListExpandableMultiRowWithoutIcon() ); - } - break; - default: - __ASSERT_DEBUG( EFalse, - User::Panic( _L("TListType Error::SetCandidatesL()"), 0 ) ); - break; - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::Move -// when the control is moved, the function will be called -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::Move(const TPoint& aOffset) - { - ClearRect(Rect()); - Invalidate(Rect(),ETrue); - iListManager->Move(aOffset); - SetRect(iListManager->ActiveList()->Rect()); - iListManager->ActiveList()->Draw(); - Invalidate(iListManager->ActiveList()->Rect()); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::OnDeActivate -// when the control is hide, the function will be called -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::OnDeActivate() - { - iListManager->ResetStatus(); - } - -// --------------------------------------------------------------------------- -// Hide or show dropdown list. -// --------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::Hide( TBool aFlag ) - { - ClearBubble(); - CFepUiBaseCtrl::Hide( aFlag ); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::FoldList -// fold the drop down list control -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::FoldList() - { - if ((iListManager->ActiveList() == iListManager->ListMultiRowWithIcon()) - || (iListManager->ActiveList() == iListManager->ListMultiRowWithoutIcon())) - { - ChangeActiveList(iListManager->ListOneRowWithIcon(), iFirstCandidateIndex); - } - // added by txin - else if (iListManager->ActiveList() == iListManager->ListMultiRowRollWithIcon()) - { - TInt onerowCandIdx = OneRowStartCandIdx(); - - if (onerowCandIdx != KInvalidCandIndex) - { - ChangeActiveList(iListManager->ListOneRowRollWithIcon(), onerowCandIdx); - return; - } - - ChangeActiveList(iListManager->ListOneRowRollWithIcon(), iFirstCandidateIndex); - } - else if (iListManager->ActiveList() == iListManager->ListMultiRowRollWithIconWithBubble()) - { - TInt onerowCandIdx = OneRowStartCandIdx(); - - if (onerowCandIdx != KInvalidCandIndex) - { - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble(), onerowCandIdx); - return; - } - - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble(), iFirstCandidateIndex); - } - else if(iListManager->ActiveList() == iListManager->ListMultiRowWithIconWithBubble()) - { - ChangeActiveList(iListManager->ListOneRowWithIconWithBubble(), iFirstCandidateIndex); - } - // end - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ResetAndClear -// reset and clear and redraw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::ResetAndClear(const TListType aListType) - { - //clear last candidates which had been set - iCandidatelist.ResetAndDestroy(); - - iFixedText.Zero(); - - iFirstCandidateIndex = 0; - iLastCandidateIndex = 0; - - switch ( aListType ) - { - case EListNoExpandable: - ChangeActiveList( iListManager->ListOneRowWithoutIcon() ); - break; - case EListNoExpandableWithBubble: - ChangeActiveList( iListManager->ListOneRowWithoutIconWithBubble() ); - break; - - case EListExpandable: - case EListExpandableWithoutIcon: - { - ChangeActiveList(iListManager->ListOneRowWithIcon()); - NotifyClosePage(); - } - break; - case EListExpandableWithBubble: - { - ChangeActiveList(iListManager->ListOneRowWithIconWithBubble()); - NotifyClosePage(); - } - break; - - // txin - case EListExpandableRollWithIcon: - { - ChangeActiveList(iListManager->ListOneRowRollWithIcon()); - NotifyClosePage(); - } - break; - // end - case EListExpandableRollWithIconWithBubble: - { - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble()); - NotifyClosePage(); - } - break; - case EListExpandableMultiRowWithoutIcon: - { - ChangeActiveList(iListManager->ListExpandableMultiRowWithoutIcon()); - NotifyClosePage(); - } - break; - default: - __ASSERT_DEBUG( EFalse, - User::Panic( _L("TListType Error::ResetAndClear()"), 0 ) ); - break; - } - } - - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::HandleEvent -// when there is out event coming, the function will be called -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::HandleControlEvent(TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData) - { - if ( iListEventHandler ) - { - iListEventHandler->HandleListOuterEvent(aEventType, aCtrl, aEventData); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::Draw() - { - if(!AbleToDraw()) - return; - - if (!iFirstTimeConstruct) - { - // if construct is not finished, then no need to draw -///DrawOpaqueMaskBackground(); - - //ActivateBitmapContext(); - - iListManager->ActiveList()->Draw(); - Invalidate(iListManager->ActiveList()->Rect()); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetHighlightCell -// set or unset the high light effect for the cell -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetHighlightCell(const TInt aCellIndex, - TBool aHighlight, - const TBool aIsDraw) - { - if (aHighlight) - { - - iHighlightList.Reset(); - - iHighlightList.Append(aCellIndex); - - if ((iListType == EListExpandableRollWithIcon || - iListType == EListExpandableRollWithIconWithBubble) && - (aCellIndex == GetFirstCandidateIndex())) - { - SetOneRowStartCandIdx(GetFirstCandidateIndex()); - } - } - else - { - TInt index = iHighlightList.Find(aCellIndex); - - if ( index != KErrNotFound ) - { - iHighlightList.Remove(index); - } - } - - if( aIsDraw ) - { - iListManager->ActiveList()->SetHighlightCell(aCellIndex, aHighlight, EFalse); - - Draw(); - } - } - - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::Rect -// get the rect of the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C const TRect& CFepCtrlDropdownList::Rect() - { - return iListManager->ActiveList()->Rect(); - } - - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetEventIdForCandidateSelected -// set event id when candidate is selected -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetEventIdForCandidateSelected(TInt aEventId) - { - iEventIdForCandidateSelected = aEventId; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetEventIdForNextPageCandidate -// set event id when need get next page candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetEventIdForNextPageCandidate(TInt aEventId) - { - iEventIdForNextPageCandidate = aEventId; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetEventIdForPreviousPageCandidate -// set event id when need get previous page candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetEventIdForPreviousPageCandidate(TInt aEventId) - { - iEventIdForPreviousPageCandidate = aEventId; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetEventIdForCandidateExisted -// set event id when need judge if candidate exist -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetEventIdForCandidateExisted(TInt aEventId) - { - iEventIdForCandidateExisted = aEventId; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetTopLeftPoint -// set top left point of the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetTopLeftPoint(const TPoint aTopLeftPoint) - { - SizeChanged(iCellWidth, iCellHeight, iNaviWidth, aTopLeftPoint); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetCellWidth -// set cell width -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetCellWidth(const TInt aCellWidth) - { - SizeChanged(aCellWidth, iCellHeight, iNaviWidth); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetCellHeight -// set cell height -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetCellHeight(const TInt aCellHeight) - { - SizeChanged(iCellWidth, aCellHeight, iNaviWidth); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetNaviWidth -// set navigation width -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetNaviWidth(const TInt aNaviWidth) - { - SizeChanged(iCellWidth, iCellHeight, aNaviWidth); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetColNum -// set columns number -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetColNum(const TInt aColNum) - { - SizeChanged(iCellWidth, iCellHeight, iNaviWidth, iTopLeftPoint, aColNum); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetRowNum -// Set rows number -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetRowNum(const TInt aRowNum) - { - SizeChanged(iCellWidth, iCellHeight, iNaviWidth, iTopLeftPoint, iColNum, aRowNum); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetBorderColor -// Set border color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetBorderColor(TRgb aBorderColor, TBool aReDraw) - { - iBorderColor = aBorderColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetBgColor -// Set background color for the whole DDl (drop down list) -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetBgColor(TRgb aBgColor, TBool aReDraw) - { - iBgColor = aBgColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetNavigationBgColor -// set background color for navigation area -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetNavigationBgColor(TRgb aNavigationBgColor, TBool aReDraw) - { - iNavigationBgColor = aNavigationBgColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetTextColor -// set text color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetTextColor(TRgb aTextColor, TBool aReDraw) - { - iTextColor = aTextColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetSpecialTextColor -// set special text color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetSpecialTextColor(TRgb aSpecialTextColor, TBool aReDraw) - { - iSpecialTextColor = aSpecialTextColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetHighLightTextColor -// set text color for highlight -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetHighLightTextColor(TRgb aHighLightTextColor, TBool aReDraw) - { - iHighLightTextColor = aHighLightTextColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetHighLightBgColor -// set background color for highlight -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetHighLightBgColor(TRgb aHighLightBgColor, TBool aReDraw) - { - iHighLightBgColor = aHighLightBgColor; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetTextAlighment -// set text alignment -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetTextAlighment(const CGraphicsContext::TTextAlign aAlignment, - TBool aReDraw) - { - iAlignment = aAlignment; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetTextAlighment -// set text alignment -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetTextMargin(const TInt aTextMargin, TBool aReDraw) - { - iTextMargin = aTextMargin; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetCellColor -// set cell color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetSecondaryList(RArray& aIndexList, TBool aReDraw) - { - iSecondaryList.Reset(); - for (TInt i=0; i < aIndexList.Count(); i++) - { - iSecondaryList.Append(aIndexList[i]); - } - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetFont -// set text font -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetFont(const CFont* aFont, TBool aReDraw) - { - iFont = aFont; - - if ( aReDraw ) - { - switch ( iListType ) - { - case EListNoExpandable: - ChangeActiveList( iListManager->ListOneRowWithoutIcon() ); - break; - case EListExpandable: - case EListExpandableWithoutIcon: - ChangeActiveList(iListManager->ListOneRowWithIcon()); - break; - // txin - case EListExpandableRollWithIcon: - ChangeActiveList(iListManager->ListOneRowRollWithIcon()); - break; - case EListExpandableRollWithIconWithBubble: - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble()); - break; - case EListExpandableMultiRowWithoutIcon: - { - ChangeActiveList( iListManager->ListExpandableMultiRowWithoutIcon() ); - } - break; - default: - __ASSERT_DEBUG( EFalse, - User::Panic( _L("TListType Error::SetFont()"), 0 ) ); - break; - } - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetListEventHandler -// set list event handler -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetListEventHandler(MListEventHandler* aHandler) - { - iListEventHandler = aHandler; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::CandidateCount -// get candidate count -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CFepCtrlDropdownList::CandidateCount() const - { - return iCandidatelist.Count(); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetCellColorList -// get multi color list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const RArray& CFepCtrlDropdownList::GetSecondaryList() const - { - return iSecondaryList; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::EnableMultiColor -// enable multi color or not -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::EnableSecondary(TBool aEnable, TBool aReDraw) - { - iEnableSecondary = aEnable; - - if ( aReDraw ) - { - Draw(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::IsEnableSecondary -// get multi color is enable or disable -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CFepCtrlDropdownList::IsEnableSecondary() const - { - return iEnableSecondary; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::DrawMask -// draw mask -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::DrawMask(TRect aRect) - { - Gc()->Activate( MaskBitmapDevice() ); - Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - Gc()->SetBrushColor( TRgb(KOpaqueColor) ); - Gc()->SetPenSize(PenSize()); - Gc()->SetPenColor( TRgb(KOpaqueColor) ); - Gc()->DrawRect(aRect); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ActivateBitmapContext -// active bitmap context -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::ActivateBitmapContext() - { - Gc()->Activate(BitmapDevice()); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::Gc -// return the graphics context -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CFbsBitGc* CFepCtrlDropdownList::Gc() - { - return static_cast(BitGc()); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetFirstCandidateIndex -// get FirstCandidateIndex -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetFirstCandidateIndex() - { - return iFirstCandidateIndex; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetLastCandidateIndex -// get LastCandidateIndex -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetLastCandidateIndex() - { - return iLastCandidateIndex; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetFirstCandidateIndex -// set FirstCandidateIndex -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::SetFirstCandidateIndex(TInt aFirstIndex) - { - iFirstCandidateIndex = aFirstIndex; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetLastCandidateIndex -// Set LastCandidateIndex -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::SetLastCandidateIndex(TInt aLastIndex) - { - iLastCandidateIndex = aLastIndex; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetCandidate -// get candidate -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CCandidate* CFepCtrlDropdownList::GetCandidate(TInt aIndex) - { - if ( ( aIndex >= 0 ) && ( aIndex < iCandidatelist.Count() ) ) - { - return iCandidatelist[aIndex]; - } - - return NULL; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetTopLeftPoint -// get Top Left Point -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TPoint CFepCtrlDropdownList::GetTopLeftPoint() - { - return iTopLeftPoint; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetCellWidth -// get width -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetCellWidth() - { - return iCellWidth; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetCellHeight -// get cell height -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetCellHeight() - { - return iCellHeight; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetNaviWidth -// get navigation width -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetNaviWidth() - { - return iNaviWidth; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetColNum -// get columns number -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetColNum() - { - return iColNum; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetRowNum -// get rows number -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetRowNum() - { - return iRowNum; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetFont -// get text font -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const CFont* CFepCtrlDropdownList::GetFont() - { - return iFont; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetAlignment -// get alignment -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CGraphicsContext::TTextAlign CFepCtrlDropdownList::GetAlignment() - { - return iAlignment; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetAlignment -// get alignment -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CFepCtrlDropdownList::GetTextMargin() - { - return iTextMargin; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetBgColor -// get background color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetBgColor() - { - return iBgColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetButtonDownBgColor -// get button down color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetButtonDownBgColor() - { - return iButtonDownBgColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetBorderColor -// get border color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetBorderColor() - { - return iBorderColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetTextColor -// get text color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetTextColor() - { - return iTextColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetHighLightBgColor -// get highlight background color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetHighLightBgColor() - { - return iHighLightBgColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetHighLightTextColor -// get highlignt text color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetHighLightTextColor() - { - return iHighLightTextColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetSpecialTextColor -// get special text color -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TRgb CFepCtrlDropdownList::GetSpecialTextColor() - { - return iSpecialTextColor; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetFixedText -// get fixed text -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TDesC CFepCtrlDropdownList::GetFixedText() - { - return iFixedText; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetHighlightList -// get bitmap manager -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const RArray& CFepCtrlDropdownList::GetHighlightList() const - { - return iHighlightList; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetPages -// get page manager -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CPages* CFepCtrlDropdownList::GetPages() - { - return iPages; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetBitmapDb -// get bitmap manager -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CBitmapDb* CFepCtrlDropdownList::GetBitmapDb() - { - return iBitmapDb; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ReportCandidateSelectEvent -// report candidate selected event -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::ReportCandidateSelectEventL(const TDesC& aCandidate, - const TInt aSelectedIndex) - { - HBufC* bufc = HBufC::NewL( aCandidate.Length() + 1 ); - TPtr ptr = bufc->Des(); - ptr.Copy( aCandidate ); - ptr.Append( (TUint16*)&aSelectedIndex, 1 ); - ReportEvent(iEventIdForCandidateSelected, *bufc); - delete bufc; - bufc = NULL; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::Invalidate -// update the animation -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::Invalidate(const TRect& aRect, TBool aUpdateAll) - { - RootControl()->UpdateArea(aRect,aUpdateAll); - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ChangeActiveList -// change active list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::ChangeActiveList(CList* aList, TInt aLastIndex) - { - TRect rect = Rect(); - - CList* beforeList = iListManager->ActiveList(); - - if( RootControl()->CtrlCapPointer() == this) - { - SetCapture(EFalse); - } - - switch ( iListType ) - { - case EListNoExpandable: - case EListNoExpandableWithBubble: - EnableSecondary(ETrue); - break; - case EListExpandable: - case EListExpandableWithBubble: - case EListExpandableWithoutIcon: - // txin - case EListExpandableRollWithIcon: - case EListExpandableRollWithIconWithBubble: - // end - EnableSecondary(EFalse); - break; - case EListExpandableMultiRowWithoutIcon: - break; - default: - __ASSERT_DEBUG( EFalse, - User::Panic( _L("TListType Error::ChangeActiveList()"), 0 ) ); - break; - } - - iListManager->SetActiveList(aList); - SetRect(iListManager->ActiveList()->Rect()); - - if ( aLastIndex ) - { - SetLastCandidateIndex(aLastIndex); - } - else - { - GetPages()->Reset(); - SetFirstCandidateIndex(0); - SetLastCandidateIndex(0); - } - - if(!Hiden() && Ready()) - { - TRAP_IGNORE(iListManager->ActiveList()->UpdateListL()); - } - - // If the list is shrink, then redraw - // txin - if ( ( ( beforeList == iListManager->ListMultiRowWithIcon() ) - && ( aList != iListManager->ListMultiRowWithIcon() ) ) - || ( ( ( beforeList == iListManager->ListMultiRowWithoutIcon() ) - && ( aList != iListManager->ListMultiRowWithoutIcon() ) ) ) - || ( ( ( beforeList == iListManager->ListMultiRowRollWithIcon()) - && ( aList != iListManager->ListMultiRowRollWithIcon() ) ) ) - || ( ( ( beforeList == iListManager->ListExpandableMultiRowWithoutIcon() ) - && ( aList != iListManager->ListExpandableMultiRowWithoutIcon() ) ) ) - || ( ( ( beforeList == iListManager->ListMultiRowWithIconWithBubble() )) - && (aList != iListManager->ListMultiRowWithIconWithBubble() ) ) - || ( ( ( beforeList == iListManager->ListMultiRowRollWithIconWithBubble() )) - && (aList != iListManager->ListMultiRowRollWithIconWithBubble() ) ) ) - { - rect.Shrink(TSize(0,-1)); - RootControl()->ReDrawRect(rect); - Invalidate(rect,ETrue); - } - // end - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::GetPenSize -// get pen size -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TSize CFepCtrlDropdownList::GetPenSize() - { - return PenSize(); - } - -void CFepCtrlDropdownList::SetCapture(TBool aFlag) - { - CapturePointer(aFlag); - } - -// --------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetActive -// Set active for the button -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetActive(TBool aActiveFlag) - { - if(IsActive() != aActiveFlag) - { - CFepUiBaseCtrl::SetActive(aActiveFlag); - /*Draw(); - UpdateArea(Rect(),EFalse);*/ - } - } - -// --------------------------------------------------------------------------- -// CFepCtrlDropdownList::ConstructFromResourceL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - // first time construct will not go this way - // only useful for skin change - if (!iFirstTimeConstruct) - { - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - iBitmapDb->ConstructFromResourceL(reader, - TSize(iCellWidth, iCellHeight), - TSize(iNaviWidth, iCellHeight), - TSize(iNaviWidth, iSpinBtnHeight)); - CleanupStack::PopAndDestroy(); // reader - SetTextColor(iBitmapDb->TextColor()); - SetBorderColor(iBitmapDb->FrameColor()); - iListManager->ActiveList()->UpdateListL(AbleToDraw(),EFalse); - Draw(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CFepCtrlDropdownList::NotifyGetNextPage -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::NotifyGetNextPage() - { - ReportEvent(iEventIdForNextPageCandidate); - } - -// --------------------------------------------------------------------------- -// CFepCtrlDropdownList::NotifyGetPreviousPage -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::NotifyGetPreviousPage() - { - ReportEvent(iEventIdForPreviousPageCandidate); - } - -// --------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetFlagCandidateExist -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetFlagCandidateExist(TBool aFlag) - { - iCandidateExisted = aFlag; - } - -// --------------------------------------------------------------------------- -// CFepCtrlDropdownList::NextCandidateExist -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -TBool CFepCtrlDropdownList::NextCandidateExist() - { - ReportEvent(iEventIdForCandidateExisted); - - return iCandidateExisted; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::AutoChangeActiveList -// change active list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::AutoChangeActiveList( TInt aLastIndex ) - { - switch ( iListType ) - { - case EListExpandable: - if ( iListManager->ActiveList() - == iListManager->ListOneRowWithIcon() ) - { - ChangeActiveList( iListManager->ListMultiRowWithIcon(), aLastIndex ); - BringToTop(); - } - else - { - BringToBack(); - ChangeActiveList( iListManager->ListOneRowWithIcon(), aLastIndex ); - NotifyClosePage(); - } - break; - case EListExpandableWithoutIcon: - if ( iListManager->ActiveList() - == iListManager->ListOneRowWithIcon() ) - { - ChangeActiveList( iListManager->ListMultiRowWithoutIcon(), aLastIndex ); - BringToTop(); - } - else - { - BringToBack(); - ChangeActiveList( iListManager->ListOneRowWithIcon(), aLastIndex ); - } - break; - // txin - case EListExpandableRollWithIcon: - { - if (iListManager->ActiveList() == iListManager->ListOneRowRollWithIcon()) - { - ChangeActiveList(iListManager->ListMultiRowRollWithIcon(), aLastIndex); - BringToTop(); - } - else - { - BringToBack(); - ChangeActiveList(iListManager->ListOneRowRollWithIcon(), aLastIndex); - NotifyClosePage(); - } - } - break; - case EListExpandableRollWithIconWithBubble: - { - if (iListManager->ActiveList() == iListManager->ListOneRowRollWithIconWithBubble()) - { - ChangeActiveList(iListManager->ListMultiRowRollWithIconWithBubble(), aLastIndex); - BringToTop(); - } - else - { - BringToBack(); - ChangeActiveList(iListManager->ListOneRowRollWithIconWithBubble(), aLastIndex); - NotifyClosePage(); - } - } - break; - - case EListExpandableWithBubble: - { - if ( iListManager->ActiveList() - == iListManager->ListOneRowWithIconWithBubble() ) - { - ChangeActiveList( iListManager->ListMultiRowWithIconWithBubble(), aLastIndex ); - BringToTop(); - } - else - { - BringToBack(); - ChangeActiveList( iListManager->ListOneRowWithIconWithBubble(), aLastIndex ); - NotifyClosePage(); - } - } - break; - case EListExpandableMultiRowWithoutIcon: - break; - case EListNoExpandable: - case EListNoExpandableWithBubble: - break; - default: - __ASSERT_DEBUG( EFalse, - User::Panic( _L("TListType Error::AutoChangeActiveList()"), 0 ) ); - break; - } - - } - -// added by txin in 2007.06.07 -EXPORT_C void CFepCtrlDropdownList::SetSpinBtnHeight(const TInt aHeight) - { - // make sure navi next, navi previous plus close, do not beyond row count - TInt minExpandHeight = 2 * aHeight + GetCellHeight() + 4 * GetCellVerticalMargin(); - TInt realExpandHeight = GetCellHeight() * GetRowNum() + - (GetRowNum() + 1) * GetCellVerticalMargin(); - - if ((aHeight > 0) && (minExpandHeight <= realExpandHeight)) - { - iSpinBtnHeight = aHeight; - SizeChanged(iCellWidth, iCellHeight, iNaviWidth); - } - } - -EXPORT_C void CFepCtrlDropdownList::SetCellMargin(const TInt aHorizontalMargin, - const TInt aVerticalMargin) - { - if (((aHorizontalMargin > 0) && (aHorizontalMargin != iCellHorizontalMargin)) || - ((aVerticalMargin > 0) && (aVerticalMargin != iCellVerticalMargin))) - { - iCellHorizontalMargin = aHorizontalMargin; - iCellVerticalMargin = aVerticalMargin; - - SizeChanged(iCellWidth, iCellHeight, iNaviWidth); - } - } - -TInt CFepCtrlDropdownList::GetSpinBtnHeight() - { - return iSpinBtnHeight; - } - -TInt CFepCtrlDropdownList::GetCellHorizontalMargin() - { - return iCellHorizontalMargin; - } - -TInt CFepCtrlDropdownList::GetCellVerticalMargin() - { - return iCellVerticalMargin; - } - -TInt CFepCtrlDropdownList::ListType() - { - return iListType; - } - -TInt CFepCtrlDropdownList::OneRowStartCandIdx() - { - return iOriginalCandIdx; - } - -void CFepCtrlDropdownList::SetOneRowStartCandIdx(TInt aOriginalCandIdx) - { - iOriginalCandIdx = aOriginalCandIdx; - } - -TInt CFepCtrlDropdownList::GetOriginalFirstCandIdx() - { - return iOriginalFirstCandIdx; - } - -void CFepCtrlDropdownList::SetOriginalFirstCandIdx(TInt aOriginalFirstCandIdx) - { - iOriginalFirstCandIdx = aOriginalFirstCandIdx; - } - -EXPORT_C void CFepCtrlDropdownList::SetCandTruncateType(const TCandTruncateType aTruncateType) - { - iCandTruncateType = aTruncateType; - } - -TInt CFepCtrlDropdownList::CandTruncateType() - { - return iCandTruncateType; - } - -CList* CFepCtrlDropdownList::ActiveList() - { - return iListManager->ActiveList(); - } - -void CFepCtrlDropdownList::SetUpdateListReDrawFlag(TBool aReDraw) - { - iUpdateListReDraw = aReDraw; - } - -TBool CFepCtrlDropdownList::GetUpdateListRedrawFlag() - { - return iUpdateListReDraw; - } - -EXPORT_C void CFepCtrlDropdownList::SetFuzzyBoundry(TInt aFuzzyBoundry) - { - if (aFuzzyBoundry != iFuzzyBoundry && aFuzzyBoundry >= 0) - { - iFuzzyBoundry = aFuzzyBoundry; - } - } - -TInt CFepCtrlDropdownList::FuzzyBoundry() - { - return iFuzzyBoundry; - } - -EXPORT_C void CFepCtrlDropdownList::SetCandExpandType(const TExpandType aType) - { - if (aType != iCandExpandType) - { - iCandExpandType = aType; - } - } - -TInt CFepCtrlDropdownList::CandExpandType() - { - return iCandExpandType; - } - -void CFepCtrlDropdownList::NotifyClosePage() - { - UiLayout()->RootControl()->Draw(); - } - -EXPORT_C void CFepCtrlDropdownList::SetDropdownListImgID( - TDropdownListDrawInfo aDropdownListDrawInfo) - { - iListManager->ListOneRowWithIcon()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListOneRowWithIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListMultiRowWithIcon()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListMultiRowWithIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListOneRowWithoutIcon()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListOneRowWithoutIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListOneRowRollWithIcon()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListOneRowRollWithIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListMultiRowRollWithIcon()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListMultiRowRollWithIconWithBubble()->SetDropdownListImgID(aDropdownListDrawInfo); - - iListManager->ListExpandableMultiRowWithoutIcon()->SetDropdownListImgID(aDropdownListDrawInfo); - } - -CFepUiLayout* CFepCtrlDropdownList::UiLayout() - { - return CFepUiBaseCtrl::UiLayout(); - } - -TInt CFepCtrlDropdownList::CandHDirection() - { - return iCandHDirection; - } - -TBool CFepCtrlDropdownList::PageCtrlShown() - { - return iPageCtrlShown; - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ShowBubble -// Set show preview bubble on/off -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::ShowBubble(TBool aFlag) - { - TBool flag = iBubbleCtrl ? ETrue : EFalse; - iIsShowBubble = aFlag; - if ( flag != aFlag ) - { - if(!flag) - { - TRAP_IGNORE(iBubbleCtrl = CBubbleCtrl::NewL(TRect(0,0,0,0),UiLayout(),-0xFFFF)); - } - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetBubbleBitmapParam -// Set preview bubble bitmap -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetBubbleBitmapParam(CFbsBitmap* aBmpId, - CFbsBitmap* aMaskBmpId , - TAknsItemID aBgSkinId ) - { - if ( iBubbleCtrl ) - { - iBubbleCtrl->SetBitmapParam(aBmpId,aMaskBmpId,aBgSkinId); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetBubbleTextFont -// Set preview bubble text font -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetBubbleTextFont(const CFont* aFont) - { - if ( iBubbleCtrl ) - { - iBubbleFont = aFont; - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetTextFormat -// Set preview bubble text format -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetTextFormat(TAknTextLineLayout aTextFormat) - { - if ( iBubbleCtrl ) - { - iBubbleCtrl->SetTextFormat(aTextFormat); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetBubbleSize -// Set preview bubble size -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetFrameDiff(TInt aLeftDiff, TInt aTopDiff, - TInt aRightDiff,TInt aBottomDiff) - { - if ( iBubbleCtrl ) - { - iBubbleCtrl->SetFrameDiff(aLeftDiff,aTopDiff,aRightDiff,aBottomDiff); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::SetBubbleSize -// Set preview bubble size -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::SetBubbleSize(const TSize& aSize) - { - iBubbleSize = aSize; - } - - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::DrawBubble -// Show preview bubble -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::DrawBubble(const TRect aRect, const TDesC& aText) - { - if ( iBubbleCtrl && iIsShowBubble && !(iBubbleCtrl->IsShowing())) - { - if(iBubbleFont) - { - iBubbleSize.iWidth = iBubbleFont->TextWidthInPixels(aText) + KPreviewBubbleOffset; - } - - if(iBubbleSize.iWidth < aRect.Width() + KPreviewBubbleOffset ) - { - iBubbleSize.iWidth = aRect.Width() + KPreviewBubbleOffset; - } - - - TRect rect = iBubbleCtrl->Rect(); - TRect parentWndRect = Rect(); - TInt x1 = aRect.iTl.iX - ( iBubbleSize.iWidth - aRect.Width() ) / 2; - TInt x2 = aRect.iBr.iX + ( iBubbleSize.iWidth - aRect.Width() ) / 2; - - TRect screenRect; - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, screenRect); - if ( x1 < 0 ) - { - rect.iTl.iX = screenRect.iTl.iX; - rect.iBr.iX = screenRect.iTl.iX + iBubbleSize.iWidth; - } - else if ( x2 > screenRect.iBr.iX ) - { - rect.iTl.iX = screenRect.iBr.iX - iBubbleSize.iWidth; - rect.iBr.iX = screenRect.iBr.iX; - } - else - { - rect.iTl.iX = x1; - rect.iBr.iX = x2; - } - - rect.iTl.iY = iBubbleVerticalMargin + aRect.iTl.iY - - iBubbleSize.iHeight; - rect.iBr.iY = iBubbleVerticalMargin + aRect.iTl.iY; - - TRAP_IGNORE(iBubbleCtrl->SetTextL(aText)); - - iBubbleCtrl->Popup(rect); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ClearBubble -// Hide preview bubble -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::ClearBubble() - { - if ( iBubbleCtrl && iBubbleCtrl->IsShowing()) - { - iBubbleCtrl->Close(); - } - } - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ReDrawBubble -// ReDraw preview bubble -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CFepCtrlDropdownList::ReDrawBubble() - { - if(iBubbleCtrl && iBubbleCtrl->IsShowing()) - { - iBubbleCtrl->Draw(); - } - } - - -// ----------------------------------------------------------------------------- -// CFepCtrlDropdownList::ReDrawRect -// ReDraw Dropdown list rect -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFepCtrlDropdownList::ReDrawRect(const TRect& /*aRect*/) - { - if(!AbleToDraw()) - return; - - if (!iFirstTimeConstruct) - { - iListManager->ActiveList()->Draw(); - } - } - -// end adding - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlist.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlist.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,984 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Abstract base class for drop-down list objects -* -*/ - -#include - -#include "peninputlist.h" -#include "peninputcandidate.h" -#include "peninputpluginutils.h" -#include -#include "peninputdropdownlist.h" -#include "peninputlayout.h" - -const TInt KInvalidCandIndex = -1; - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CList - -// ----------------------------------------------------------------------------- -// CList::CList -// construtor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList::CList(CListManager* aManager, MFepCtrlDropdownListContext *aOwner) -: iOwner(aOwner), iManager(aManager), iNextButtonDisable(ETrue), - iPreviousButtonDisable(ETrue) - { - } - -// ----------------------------------------------------------------------------- -// CList::~CList -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList::~CList() - { - } - -// ----------------------------------------------------------------------------- -// CList::ConstructL -// 2nd construtor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::ConstructL() - { - // Pre calculate all areas - CalculateAreas(); - } - -// ----------------------------------------------------------------------------- -// CList::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::HandlePointerDownL(const TPoint& aPoint) - { - // position where the tap occurred - - // set clicked rect as empty rect - iClickedRect = KEmptyRect; - - // Check if content rect tapped - if ( iContentRect.Contains(aPoint) ) - { - CCandidate* candidate = FindCandidate(aPoint, iClickedCandidateIndex); - - if ( candidate ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - TRect rect = candidate->GetRect(); - iClickedRect.SetRect(rect.iTl,rect.iBr); - - // Set the flag to indicate that candidate button has been pressed down - // so that we know to draw correctly - iIndicateButtonClicked = ETrue ; - DrawSelection(iClickedRect,ETrue); - DrawHighightCell(iClickedRect,EFalse); - } - else - { - iClickedRect = KDummyRect; - // This is a dummy value so that we know - // in HandlePointerUpL that iClickedRect is - // is not empty but the pointer down event did - // not occure inside any valid rect such as - // candidate rect or any of the navigation rects - } - } - } - -// ----------------------------------------------------------------------------- -// CList::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::HandlePointerDragL(const TPoint& /*aPoint*/) - { - } - -// ----------------------------------------------------------------------------- -// CList::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::HandlePointerUpL( const TPoint& /*aPoint*/) - { - } - -// ----------------------------------------------------------------------------- -// CList::HandlePointerLeave -// handle pointer leave function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::HandlePointerLeave(const TPoint& /*aPoint*/) - { - DrawSelection( iClickedRect, EFalse ); - DrawHighightCell(iClickedRect, ETrue); - } - -// ----------------------------------------------------------------------------- -// CList::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::Draw() - { - // Draw mask - iOwner->DrawMask(iRect); - - // Active bitmap context - iOwner->ActivateBitmapContext(); - - iOwner->Gc()->SetBrushStyle(CGraphicsContext::ESolidBrush); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor( iOwner->GetBorderColor() ); - iOwner->Gc()->DrawRect(iRect); - - } - -// ----------------------------------------------------------------------------- -// CList::Rect -// get the rect of list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TRect& CList::Rect() - { - return iRect; - } - -// ----------------------------------------------------------------------------- -// CList::UpdateList -// update the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::UpdateListL(TBool /*aDrawFlag*/, TBool /*aRecalculate*/) - { - // Do nothing, every derived class will have its action - } - - -// ----------------------------------------------------------------------------- -// CList::ResetStatus -// update the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::ResetStatus() - { - iPenDownInCandidate = EFalse; - iClickedRect = KEmptyRect; - } - -// ----------------------------------------------------------------------------- -// CList::FindCandidate -// find candidate according to the assigned position -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CCandidate* CList::FindCandidate(const TPoint& aPosition, TInt& aIndex) - { - CCandidate* candidate = NULL; - - aIndex = KErrNotFound; - - if ( iOwner->CandidateCount() > 0 ) - { - // Loop through the candidates and find the one that contains - // the TPoint aPosition - for (TInt i = iOwner->GetFirstCandidateIndex(); i < iOwner->GetLastCandidateIndex(); i++) - { - candidate = iOwner->GetCandidate(i); - - if ( !candidate ) - { - continue; - } - - TRect rect = candidate->GetRect(); - - if ( rect.Contains(aPosition) ) - { - // We found the candidate - aIndex = i; - return candidate; - } - } - } - - return NULL; - } - -// ----------------------------------------------------------------------------- -// CList::CalculatePositionsL -// calculate the position of all visible cells in the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CList::CalculatePositionsL() - { - return 0; - } - -// ----------------------------------------------------------------------------- -// CList::SetHighlightCell -// Set cell to highlight or not -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::SetHighlightCell(const TInt aCellIndex, TBool aHighlight, TBool aForceDraw) - { - if ( !aForceDraw && iPenDownInCandidate ) - { - return; - } - - if ( ( aCellIndex<0 ) || ( aCellIndex > iOwner->CandidateCount() ) ) - { - return; - } - - CCandidate* candidate = iOwner->GetCandidate(aCellIndex); - - if ( ! candidate ) - { - return; - } - - TRect rect = candidate->GetRect(); - - iOwner->DrawMask(rect); - iOwner->ActivateBitmapContext(); - - if (!iDropdownListDrawInfo.iSupportSkin) - { - iOwner->Gc()->SetBrushStyle(CGraphicsContext::ENullBrush); - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - - // Draw the bottom and right line - iOwner->Gc()->DrawLine( TPoint(rect.iTl.iX, rect.iBr.iY),rect.iBr); - iOwner->Gc()->DrawLine( TPoint(rect.iBr.iX, rect.iTl.iY),rect.iBr); - - // also draw left and top line - if (iOwner->GetCellHorizontalMargin() != 0) - { - iOwner->Gc()->DrawLine(rect.iTl, TPoint(rect.iTl.iX, rect.iBr.iY)); - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - iOwner->Gc()->DrawLine(rect.iTl, TPoint(rect.iBr.iX, rect.iTl.iY)); - } - - rect.Shrink(TSize(1,1)); - - if ((iIsMultiRows) && (iOwner->GetCellVerticalMargin() == 0)) - { - if ( ( rect.iTl.iY - 1 - Rect().iTl.iY ) != ( iOwner->GetRowNum() - 1 ) * - iOwner->GetCellHeight() ) - { - //If it isn't the last row - rect.iBr.iY = rect.iBr.iY + 1; - } - } - } - - const CFbsBitmap* bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapHighlight); - if ( bmp ) - { - if (aHighlight) - { - CFbsBitmap* bmpTemp = const_cast(bmp); - AknIconUtils::SetSize(bmpTemp, rect.Size(), EAspectRatioNotPreserved); - - if (iDropdownListDrawInfo.iSupportSkin) - { - CBitmapDb::TBitmapType bmpID = CBitmapDb::EBitmapHighlight; - CBitmapDb::TBitmapType maskBmpID = CBitmapDb::EBitmapHighlightMask; - bmp = iOwner->GetBitmapDb()->GetBitMap(bmpID); - bmpTemp = const_cast(bmp); - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap(maskBmpID), - ETrue); - } - else - { - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapHighlightMask), - ETrue); - } - } - else - { - // Draw bitmap - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect innerRect = rect; - innerRect.Shrink( 4, 0 ); - - AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iCandidateLeftImgID, - iDropdownListDrawInfo.iCandidateMiddleImgID, - iDropdownListDrawInfo.iCandidateRightImgID); - } - else - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrimary); - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapPrimaryMask), - ETrue); - } - } - } - else - { - if (aHighlight) - { - iOwner->Gc()->SetBrushColor(iOwner->GetHighLightBgColor()); - } - else - { - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - } - - iOwner->Gc()->SetPenStyle(CGraphicsContext::ENullPen); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - - rect.Shrink(TSize(1,1)); - - iOwner->Gc()->DrawRect(rect); - - rect.Shrink(TSize(-1,-1)); - } - - // draw canditate's text - iOwner->Gc()->UseFont(iOwner->GetFont()); - - candidate->DrawText(*iOwner->Gc(),iOwner->GetAlignment(), - iOwner->GetTextMargin(), - iOwner->GetTextColor(), - iOwner->GetSpecialTextColor(), - iOwner->GetFixedText()); - - iOwner->Gc()->DiscardFont(); - iOwner->Invalidate(candidate->GetRect()); - } - -// ----------------------------------------------------------------------------- -// CList::DrawSelection -// Draw selection cell just selected -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::DrawSelection(const TRect& aRect, TBool aIndicate) - { - // Check whether the rect that should be redrawn is in content rect - TRect tmpRect = iContentRect; - tmpRect.Intersection(aRect); - - if ( tmpRect == aRect ) - { - // rect is inside content rect thus we - // should be drawing candidate press - DrawCandidatePress(aRect, aIndicate); - } - else - { - // rect is inside navigation rect thus we - // should be drawing navigation press - DrawNavigationPress(aRect, aIndicate); - } - } - -// ----------------------------------------------------------------------------- -// CList::DrawCandidatePress -// draw candidate when pressed or un-pressed -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::DrawCandidatePress(const TRect& aRect, TBool aIndicate) - { - // We are dealing with the candidates - TInt index = 0; - // Get the candidate - CCandidate* candidate = FindCandidate(aRect.Center(), index); - - if (!candidate) - { - return; - } - - iOwner->DrawMask(aRect); - - iOwner->ActivateBitmapContext(); - - iPenDownInCandidate = EFalse; - - TBool isDrawBmp = ETrue; - CBitmapDb::TBitmapType bmpID = CBitmapDb::EBitmapPrimary; - CBitmapDb::TBitmapType maskBmpID = CBitmapDb::EBitmapPrimaryMask; - const CFbsBitmap* bmp = NULL; - // set bg color - if ( aIndicate ) - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPenDown); - if ( bmp ) - { - // Draw bitmap - bmpID = CBitmapDb::EBitmapPenDown; - maskBmpID = CBitmapDb::EBitmapPenDownMask; - isDrawBmp = ETrue; - iPenDownInCandidate = ETrue; - } - else - { - iOwner->Gc()->SetBrushColor(iOwner->GetButtonDownBgColor()); - } - } - else - { - const RArray& secondaryList = iOwner->GetSecondaryList(); - - if ( iOwner->IsEnableSecondary() && (secondaryList.Find(index) != KErrNotFound) ) - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapSecondary); - if ( bmp ) - { - // Draw bitmap - bmpID = CBitmapDb::EBitmapSecondary; - maskBmpID = CBitmapDb::EBitmapSecondaryMask; - isDrawBmp = ETrue; - } - else - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrimary); - if ( bmp ) - { - // Draw bitmap - bmpID = CBitmapDb::EBitmapPrimary; - maskBmpID = CBitmapDb::EBitmapPrimaryMask; - isDrawBmp = ETrue; - } - else - { - // If enable multi color and the color has been set, then use the color - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - } - } - } - else - { - // Else use background color - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrimary); - if ( bmp ) - { - bmpID = CBitmapDb::EBitmapPrimary; - maskBmpID = CBitmapDb::EBitmapPrimaryMask; - isDrawBmp = ETrue; - } - else - { - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - } - } - } - - // Get the candidate rect - TRect rect = candidate->GetRect(); - - if (!iDropdownListDrawInfo.iSupportSkin) - { - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ENullBrush ); - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - - // Draw the bottom line - iOwner->Gc()->DrawLine( TPoint(rect.iTl.iX, rect.iBr.iY),rect.iBr ); - iOwner->Gc()->DrawLine( TPoint(rect.iBr.iX, rect.iTl.iY),rect.iBr ); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - iOwner->Gc()->DrawLine(rect.iTl, TPoint(rect.iTl.iX, rect.iBr.iY)); - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - iOwner->Gc()->DrawLine(rect.iTl, TPoint(rect.iBr.iX, rect.iTl.iY)); - } - - rect.Shrink(TSize(1,1)); - - if ((iIsMultiRows) && (iOwner->GetCellVerticalMargin() == 0)) - { - if ( ( rect.iTl.iY - 1 - Rect().iTl.iY ) != ( iOwner->GetRowNum() - 1 ) * - iOwner->GetCellHeight() ) - { - //If it isn't the last row - rect.iBr.iY = rect.iBr.iY + 1; - } - } - } - - if ( isDrawBmp ) - { - if (iDropdownListDrawInfo.iSupportSkin) - { - if ( aIndicate ) - { -/* - iOwner->Gc()->SetPenStyle(CGraphicsContext::ENullPen); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->SetBrushColor(iDropdownListDrawInfo.iCandidatesHighlightColor); - - // Draw the whole rect without border - iOwner->Gc()->DrawRect( rect ); */ - - /*bmpID = CBitmapDb::EBitmapHighlight; - maskBmpID = CBitmapDb::EBitmapHighlightMask; - bmp = iOwner->GetBitmapDb()->GetBitMap(bmpID); - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap(maskBmpID), - ETrue); */ - TRect innerRect = rect; - innerRect.Shrink( 4, 0 ); - - // ----- draw bitmaps ----- - iOwner->ActivateBitmapContext(); - iOwner->Gc()->Clear(rect); - - - - AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iCandidatePressedLeftImgID, - iDropdownListDrawInfo.iCandidatePressedMiddleImgID, - iDropdownListDrawInfo.iCandidatePressedRightImgID); - } - else - { - TRect innerRect = rect; - innerRect.Shrink( 4, 0 ); - - // ----- draw bitmaps ----- - iOwner->ActivateBitmapContext(); - iOwner->Gc()->Clear(rect); - - - - AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iCandidateLeftImgID, - iDropdownListDrawInfo.iCandidateMiddleImgID, - iDropdownListDrawInfo.iCandidateRightImgID); - } - } - else - { - bmp = iOwner->GetBitmapDb()->GetBitMap(bmpID); - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap(maskBmpID), - ETrue); - } - } - else - { - iOwner->Gc()->SetPenStyle(CGraphicsContext::ENullPen); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - // Draw the whole rect without border - iOwner->Gc()->DrawRect( rect ); - } - - // draw canditate's text - iOwner->Gc()->UseFont(iOwner->GetFont()); - TRgb textColor; - if (aIndicate) - { - textColor = iOwner->GetHighLightTextColor(); - } - else - { - textColor = iOwner->GetTextColor(); - } - - candidate->DrawText(*iOwner->Gc(),iOwner->GetAlignment(), - iOwner->GetTextMargin(), - textColor, - iOwner->GetSpecialTextColor(), - iOwner->GetFixedText()); - - iOwner->Gc()->DiscardFont(); - - // Invalidate the rect - iOwner->Invalidate(aRect); - } - -// ----------------------------------------------------------------------------- -// CList::DrawNavigationPress -// draw navigation button when pressed or un-pressed -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CList::DrawNavigationPress(const TRect& /*aRect*/, TBool /*aIndicate*/) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CList::CalculateAreas -// Calculate all kinds of rectangles -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::CalculateAreas() - { - // - } - -// ----------------------------------------------------------------------------- -// CList::SizeChanged -// size changed function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::SizeChanged() - { - CalculateAreas(); - } - -// ----------------------------------------------------------------------------- -// CList::DrawCandidates -// draw all visible candidates to the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::DrawCandidates() - { - const RArray& secondaryList = iOwner->GetSecondaryList(); - - TBool isDrawBmp = EFalse; - CBitmapDb::TBitmapType bmpID = CBitmapDb::EBitmapPrimary; - CBitmapDb::TBitmapType maskBmpID = CBitmapDb::EBitmapPrimaryMask; - const CFbsBitmap* bmp = NULL; - for(TInt i = iOwner->GetFirstCandidateIndex(); i < iOwner->GetLastCandidateIndex(); i++) - { - CCandidate* candidate = iOwner->GetCandidate(i); - if ( !candidate ) - { - continue; - } - - TRect rect = candidate->GetRect(); - - if (iDropdownListDrawInfo.iSupportSkin) - { - - if (iOwner->GetHighlightList().Find(i) != KErrNotFound) - { - /*iOwner->Gc()->SetPenStyle(CGraphicsContext::ENullPen); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->SetBrushColor(iDropdownListDrawInfo.iCandidatesHighlightColor); - // Draw the whole rect without border - iOwner->Gc()->DrawRect( rect );*/ - bmpID = CBitmapDb::EBitmapHighlight; - maskBmpID = CBitmapDb::EBitmapHighlightMask; - bmp = iOwner->GetBitmapDb()->GetBitMap(bmpID); - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap(maskBmpID), - ETrue); - } - else - { - TRect innerRect = rect; - innerRect.Shrink( 4, 0 ); - - // ----- draw bitmaps ----- - iOwner->ActivateBitmapContext(); - - - AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iCandidateLeftImgID, - iDropdownListDrawInfo.iCandidateMiddleImgID, - iDropdownListDrawInfo.iCandidateRightImgID); - } - } - else - { - if ( iOwner->IsEnableSecondary() && ( secondaryList.Find(i) != KErrNotFound) ) - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapSecondary); - if ( bmp ) - { - // Draw bitmap - bmpID = CBitmapDb::EBitmapSecondary; - maskBmpID = CBitmapDb::EBitmapSecondaryMask; - isDrawBmp = ETrue; - } - else - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrimary); - if ( bmp ) - { - // Draw bitmap - bmpID = CBitmapDb::EBitmapPrimary; - maskBmpID = CBitmapDb::EBitmapPrimaryMask; - isDrawBmp = ETrue; - } - else - { - // If enable multi color and the color has been set, then use the color - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - } - } - } - else if (iOwner->GetHighlightList().Find(i) != KErrNotFound) - { - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapHighlight); - if ( bmp ) - { - // Draw bitmap - bmpID = CBitmapDb::EBitmapHighlight; - maskBmpID = CBitmapDb::EBitmapHighlightMask; - isDrawBmp = ETrue; - } - else - { - // If the cell is set to highlight, use high light color - iOwner->Gc()->SetBrushColor(iOwner->GetHighLightBgColor()); - } - } - else - { - // Else use background color - bmp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrimary); - if ( bmp ) - { - bmpID = CBitmapDb::EBitmapPrimary; - maskBmpID = CBitmapDb::EBitmapPrimaryMask; - isDrawBmp = ETrue; - } - else - { - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - } - } - - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ENullBrush ); - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - // Draw the bottom line - iOwner->Gc()->DrawLine( rect.iTl, TPoint(rect.iBr.iX, rect.iTl.iY) ); - iOwner->Gc()->DrawLine( TPoint(rect.iTl.iX, rect.iBr.iY),rect.iBr ); - iOwner->Gc()->DrawLine( TPoint(rect.iBr.iX, rect.iTl.iY),rect.iBr ); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - iOwner->Gc()->DrawLine(rect.iTl, TPoint(rect.iTl.iX, rect.iBr.iY)); - } - - rect.Shrink(TSize(1,1)); - - if ( isDrawBmp ) - { - bmpID = CBitmapDb::EBitmapSecondary; - maskBmpID = CBitmapDb::EBitmapSecondaryMask; - bmp = iOwner->GetBitmapDb()->GetBitMap(bmpID); - iOwner->Gc()->DrawBitmapMasked(rect, - bmp, - bmp->SizeInPixels(), - iOwner->GetBitmapDb()->GetBitMap(maskBmpID), - ETrue); - } - else - { - iOwner->Gc()->SetPenStyle(CGraphicsContext::ENullPen); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->DrawRect(rect); - } - } - - // Draw the text of the candidate - iOwner->Gc()->UseFont(iOwner->GetFont()); - candidate->DrawText(*iOwner->Gc(),iOwner->GetAlignment(), - iOwner->GetTextMargin(), - iOwner->GetTextColor(), - iOwner->GetSpecialTextColor(), - iOwner->GetFixedText()); - } - iOwner->Gc()->DiscardFont(); - } - -// ----------------------------------------------------------------------------- -// CList::CompareRect -// Compare two rect is equal or not -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CList::CompareRect(const TRect& aSrcRect, const TRect& aDesRect) - { - - if (aSrcRect == aDesRect) - { - DrawSelection(iClickedRect, ETrue); - DrawHighightCell(iClickedRect, EFalse); - return ETrue; - } - else - { - TBool hasDraw = EFalse; - const RArray& highLightList = iOwner->GetHighlightList(); - for (TInt i=0; i < highLightList.Count(); i++ ) - { - CCandidate* candidate = iOwner->GetCandidate(i); - if ( candidate ) - { - if ( iClickedRect == candidate->GetRect() ) - { - DrawHighightCell(iClickedRect, ETrue); - hasDraw = ETrue; - break; - } - } - } - - if ( !hasDraw ) - { - DrawSelection(iClickedRect, EFalse); - DrawHighightCell(iClickedRect, ETrue); - } - - return EFalse; - } - } - -// ----------------------------------------------------------------------------- -// CList::Move -// when the drop down list is moved, the function will be called. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CList::Move(const TPoint& aOffsetPoint) - { - // Move the iRect - iRect.Move(aOffsetPoint); - - // Move the content rect - iContentRect.Move(aOffsetPoint); - - // Move the navigation rect - iNavigationRect.Move(aOffsetPoint); - - // Move the close button rect - iNavigationCloseRect.Move(aOffsetPoint); - - // Move the up button rect - iNavigationPreviousRect.Move(aOffsetPoint); - - // Move the down button rect - iNavigationNextRect.Move(aOffsetPoint); - - } - -void CList::DrawHighightCell(const TRect& aSrcRect, const TBool aIndidate) - { - const RArray& highLightList = iOwner->GetHighlightList(); - - TInt candIdx; - for (TInt i = 0; i < highLightList.Count(); i++) - { - candIdx = highLightList[i]; - - // if highlight candidate are not in current page, then do not draw it - if ((candIdx >= iOwner->GetFirstCandidateIndex()) && - (candIdx <= iOwner->GetLastCandidateIndex())) - { - CCandidate* candidate = iOwner->GetCandidate(candIdx); - - if (candidate) - { - if (aSrcRect == candidate->GetRect()) - { - if (aIndidate) - { - SetHighlightCell(candIdx, ETrue); - } - - continue; - } - } - } - } - } - -TInt CList::StartCandIdxOfLine(TInt /*aCandIndex*/) - { - return KInvalidCandIndex; - } - -void CList::SetNextPageHighlightCellAfterOnePageL(const TInt /*aCellIndex*/) - { - } - -void CList::SetDropdownListImgID(TDropdownListDrawInfo aDropdownListDrawInfo) - { - iDropdownListDrawInfo = aDropdownListDrawInfo; - } - - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistexpandablemultirowwithouticon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistexpandablemultirowwithouticon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Multi rows list without icon for drop-down list objects -* -*/ - - - -// Include -#include -#include - -#include "peninputlist.h" -#include "peninputlistexpandablemultirowwithouticon.h" - - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListExpandableMultiRowWithoutIcon - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::CListExpandableMultiRowWithoutIcon -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListExpandableMultiRowWithoutIcon::CListExpandableMultiRowWithoutIcon( CListManager* aManager, - MFepCtrlDropdownListContext *aOwner ) - :CList( aManager, aOwner ) - { - iIsMultiRows = ETrue; - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListExpandableMultiRowWithoutIcon* CListExpandableMultiRowWithoutIcon::NewL( - CListManager* aManager, - MFepCtrlDropdownListContext *aOwner ) - { - CListExpandableMultiRowWithoutIcon* self - = new (ELeave) CListExpandableMultiRowWithoutIcon( aManager, aOwner ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::~CListExpandableMultiRowWithoutIcon -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListExpandableMultiRowWithoutIcon::~CListExpandableMultiRowWithoutIcon() - { - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListExpandableMultiRowWithoutIcon::HandlePointerDragL( const TPoint& aPoint ) - { - // Pass the event first to the base - CList::HandlePointerDragL( aPoint ); - - if ( !iClickedRect.IsEmpty() ) - { - // clicked rect is not outside the whole DDL - TInt index = -1; - - CCandidate* candidate = FindCandidate( aPoint, index ); - iMoveLatestRect = KEmptyRect; - - if ( candidate ) - { - // candidate exist - iMoveLatestRect.SetRect( candidate->GetRect().iTl, - candidate->GetRect().Size() ); - } - - // Compare the two rect, then decide draw it or not - CompareRect( iMoveLatestRect, iClickedRect ); - } - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListExpandableMultiRowWithoutIcon::HandlePointerUpL( const TPoint& aPoint ) - { - // clicked rect is outside the whole DDL - if ( iClickedRect.IsEmpty() ) - { - iOwner->SetCapture( EFalse ); - // Change active list object ie. close the DDL - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - } - else - { - if ( ( iContentRect.Contains( aPoint ) ) - && ( iClickedRect.Contains( aPoint ) ) ) - { - // Redraw the selected aread - DrawSelection( iClickedRect, EFalse ); - - iOwner->SetCapture( EFalse ); - - // We have selected a candidate and iClickedCandidateIndex is - // the selected Index. - // Send the candidate to others - if (iClickedCandidateIndex != KErrNotFound) - { - iOwner->AutoChangeActiveList( - iOwner->GetFirstCandidateIndex() ); - CCandidate* candidate = iOwner->GetCandidate( - iClickedCandidateIndex ); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL( - candidate->GetCandidate(), - iClickedCandidateIndex ); - } - } - } - - iClickedRect = KEmptyRect; - } - - iIndicateButtonClicked = EFalse; - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListExpandableMultiRowWithoutIcon::Draw() - { - // Call draw in base class; - CList::Draw(); - - // Draw all visible candidates - DrawCandidates(); - iOwner->Invalidate(iRect); - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::CalculateAreas -// Calculate all kinds of rectangles -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListExpandableMultiRowWithoutIcon::CalculateAreas() - { - // Calculate the rect of the list - iRect.iTl = iOwner->GetTopLeftPoint(); - TInt width = iOwner->GetCellWidth() * iOwner->GetColNum() + - iOwner->GetNaviWidth() + - (iOwner->GetColNum() + 2) * iOwner->GetCellHorizontalMargin(); - - TInt height = iOwner->GetCellHeight() * iOwner->GetRowNum() + - (iOwner->GetRowNum() + 1) * iOwner->GetCellVerticalMargin(); - - iRect.SetSize(TSize( width,height)); - - if (iOwner->CandExpandType() == CFepCtrlDropdownList::ECandExpandUpward) - { - // expand upward - TInt onerowheight = iOwner->GetCellHeight() + 2 * iOwner->GetCellVerticalMargin(); - iRect.Move(0, -(height - onerowheight)); - } - - // Calculate the rect of the content - iContentRect.iTl.SetXY(iRect.iTl.iX + iOwner->GetCellHorizontalMargin(), - iRect.iTl.iY + iOwner->GetCellVerticalMargin()); - - iContentRect.SetSize(TSize (width - 2 * iOwner->GetCellHorizontalMargin(), - height - 2 * iOwner->GetCellVerticalMargin())); - - // Initialized the rect of the navigation area and the down and up button - iNavigationRect = KEmptyRect; - iNavigationNextRect = KEmptyRect; - iNavigationPreviousRect = KEmptyRect; - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::CalculatePositionsL -// calculate the position of all visible cells in the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CListExpandableMultiRowWithoutIcon::CalculatePositionsL() - { - TInt lastCandidateIndex = iOwner->GetLastCandidateIndex(); - TInt count = iOwner->CandidateCount(); - - if ( count > 0 ) - { - TPoint setpoints; - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - candHLToR ? setpoints.SetXY(iContentRect.iTl.iX, iContentRect.iTl.iY) : - setpoints.SetXY(iContentRect.iBr.iX, iContentRect.iTl.iY); - - count = Min( count, lastCandidateIndex - + ( iOwner->GetColNum() + 1 ) * iOwner->GetRowNum() ); - - for ( TInt currentCellIndex = 0, - lastUsedCellCount = 0, - lastusedRow = 0; - lastCandidateIndex <= count; - lastCandidateIndex++ ) - { - // setting a position for this candidate - CCandidate* candidate = iOwner->GetCandidate( lastCandidateIndex ); - - if ( candidate ) - { - // each candidate exist - TInt leftUsedCellCount = candidate->CalculateDisplayTextL(iOwner->GetCellWidth(), iOwner->GetFont(), iOwner->GetColNum()); - if (( currentCellIndex > iOwner->GetColNum() ) || - ((!candHLToR) && ((setpoints.iX < leftUsedCellCount*(iOwner->GetCellWidth() + (lastUsedCellCount-1)*iOwner->GetCellHorizontalMargin()))))) - { - // The cell index moved the edge of right - lastusedRow++; - if ( lastusedRow >= iOwner->GetRowNum() ) - { - // The row index moved bottom - break; - } - - currentCellIndex = 0; - - setpoints.iY = setpoints.iY + - iOwner->GetCellHeight() + - iOwner->GetCellVerticalMargin(); - - candHLToR ? (setpoints.iX = iContentRect.iTl.iX) : (setpoints.iX = iContentRect.iBr.iX); - } - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - - currentCellIndex += lastUsedCellCount; - candHLToR? (setpoints.iX += lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())); - } // if each candidate exist - } // for-loop - } // if candidate exist - - return lastCandidateIndex; // as lastCandidateIndex - } - -// ----------------------------------------------------------------------------- -// CListExpandableMultiRowWithoutIcon::UpdateList -// update the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListExpandableMultiRowWithoutIcon::UpdateListL(TBool aDrawFlag, TBool aRecalculate ) - { - if ( aRecalculate ) - { - // Recalculate the position of all candidates - iOwner->SetLastCandidateIndex( CalculatePositionsL() ); - } - if(aDrawFlag) - { - Draw(); - iOwner->Invalidate(iRect); - } - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmanager.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmanager.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: List manager,which is used by drop down list -* -*/ - - -#include "peninputlistmanager.h" -#include "peninputlistonerowwithouticon.h" -#include "peninputlistonerowwithouticonwithbubble.h" -#include "peninputlistmultirowwithicon.h" -#include "peninputlistmultirowwithiconwithbubble.h" -#include "peninputlistonerowwithicon.h" -#include "peninputlistonerowwithiconwithbubble.h" -#include "peninputlistmultirowwithouticon.h" - -#include "peninputlistmultirowrollwithiconwithbubble.h" -#include "peninputlistonerowrollwithiconwithbubble.h" - -#include "peninputlistmultirowrollwithicon.h" -#include "peninputlistonerowrollwithicon.h" -#include "peninputlistexpandablemultirowwithouticon.h" -#include - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListManager - -// ----------------------------------------------------------------------------- -// CListManager::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListManager* CListManager::NewL(MFepCtrlDropdownListContext* aContext) - { - CListManager* self = new (ELeave) CListManager(); - CleanupStack::PushL(self); - self->ConstructL(aContext); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListManager::~CListManager -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListManager::~CListManager() - { - delete iListOneRowWithoutIcon; - delete iListOneRowWithoutIconWithBubble; - delete iListOneRowWithIcon; - delete iListOneRowWithIconWithBubble; - delete iListMultiRowWithIcon; - delete iListMultiRowWithIconWithBubble; - delete iListMultiRowWithoutIcon; - delete iListMultiRowRollWithIcon; - delete iListOneRowRollWithIcon; - delete iListExpandableMultiRowWithoutIcon; - delete iListMultiRowRollWithIconWithBubble; - delete iListOneRowRollWithIconWithBubble; - } - -// ----------------------------------------------------------------------------- -// CListManager::NewL -// 2nd construct function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListManager::ConstructL(MFepCtrlDropdownListContext* aContext) - { - iContext = aContext; - iListOneRowWithoutIcon = CListOneRowWithoutIcon::NewL(this, aContext); - iListOneRowWithoutIconWithBubble = CListOneRowWithoutIconWithBubble::NewL(this, aContext); - iListOneRowWithIcon = CListOneRowWithIcon::NewL(this, aContext); - iListOneRowWithIconWithBubble = CListOneRowWithIconWithBubble::NewL(this, aContext); - iListMultiRowWithIcon = CListMultiRowWithIcon::NewL(this, aContext); - iListMultiRowWithIconWithBubble = CListMultiRowWithIconWithBubble::NewL(this, aContext); - iListMultiRowWithoutIcon = CListMultiRowWithoutIcon::NewL(this, aContext); - iListMultiRowRollWithIcon = CListMultiRowRollWithIcon::NewL(this, aContext); - iListOneRowRollWithIcon = CListOneRowRollWithIcon::NewL(this, aContext); - iListExpandableMultiRowWithoutIcon = CListExpandableMultiRowWithoutIcon::NewL(this, aContext); - iListMultiRowRollWithIconWithBubble = CListMultiRowRollWithIconWithBubble::NewL(this, aContext); - iListOneRowRollWithIconWithBubble = CListOneRowRollWithIconWithBubble::NewL(this, aContext); - } - -// ----------------------------------------------------------------------------- -// CListManager::SizeChanged -// size change -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListManager::SizeChanged() - { - iListOneRowWithoutIcon->SizeChanged(); - iListOneRowWithoutIconWithBubble->SizeChanged(); - iListOneRowWithIcon->SizeChanged(); - iListOneRowWithIconWithBubble->SizeChanged(); - iListMultiRowWithIcon->SizeChanged(); - iListMultiRowWithIconWithBubble->SizeChanged(); - iListMultiRowWithoutIcon->SizeChanged(); - iListMultiRowRollWithIcon->SizeChanged(); - iListOneRowRollWithIcon->SizeChanged(); - iListExpandableMultiRowWithoutIcon->SizeChanged(); - iListMultiRowRollWithIconWithBubble->SizeChanged(); - iListOneRowRollWithIconWithBubble->SizeChanged(); - } - -// ----------------------------------------------------------------------------- -// CListManager::Move -// move the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListManager::Move(const TPoint& aOffset) - { - iListOneRowWithoutIcon->Move(aOffset); - iListOneRowWithoutIconWithBubble->Move(aOffset); - iListOneRowWithIcon->Move(aOffset); - iListOneRowWithIconWithBubble->Move(aOffset); - iListMultiRowWithIcon->Move(aOffset); - iListMultiRowWithIconWithBubble->Move(aOffset); - iListMultiRowWithoutIcon->Move(aOffset); - iListMultiRowRollWithIcon->Move(aOffset); - iListOneRowRollWithIcon->Move(aOffset); - iListExpandableMultiRowWithoutIcon->Move(aOffset); - iListMultiRowRollWithIconWithBubble->Move(aOffset); - iListOneRowRollWithIconWithBubble->Move(aOffset); - - // Move all candidates - for ( TInt i=0; iCandidateCount(); i++ ) - { - CCandidate* candidate = iContext->GetCandidate(i); - if ( candidate ) - { - candidate->Move(aOffset); - } - } - } - -// ----------------------------------------------------------------------------- -// CListManager::ActiveList -// get active list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ActiveList() const - { - return iActiveList; - } -// ----------------------------------------------------------------------------- -// CListManager::SetActiveList -// set active list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListManager::SetActiveList(CList* aList) - { - iActiveList = aList; - } - -// ----------------------------------------------------------------------------- -// CListManager::ListOneRowWithoutIcon -// get one row without icon -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListOneRowWithoutIcon() const - { - return iListOneRowWithoutIcon; - } - -// ----------------------------------------------------------------------------- -// CListManager::ListOneRowWithoutIcon -// get one row without icon -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListOneRowWithoutIconWithBubble() const - { - return iListOneRowWithoutIconWithBubble; - } - - -// ----------------------------------------------------------------------------- -// CListManager::ListOneRowWithIcon -// get one row with icon -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListOneRowWithIcon() const - { - return iListOneRowWithIcon; - } - -// ----------------------------------------------------------------------------- -// CListManager::ListOneRowWithIcon -// get one row with icon -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListOneRowWithIconWithBubble() const - { - return iListOneRowWithIconWithBubble; - } - -// ----------------------------------------------------------------------------- -// CListManager::ListMultiRowWithIcon -// get multi row with icon -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListMultiRowWithIcon() const - { - return iListMultiRowWithIcon; - } - -CList* CListManager::ListMultiRowWithIconWithBubble() const - { - return iListMultiRowWithIconWithBubble; - } - - -// ----------------------------------------------------------------------------- -// CListManager::ListMultiRowWithoutIcon -// get multi row without icon -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListMultiRowWithoutIcon() const - { - return iListMultiRowWithoutIcon; - } - -CList* CListManager::ListMultiRowRollWithIcon() const - { - return iListMultiRowRollWithIcon; - } - -CList* CListManager::ListOneRowRollWithIcon() const - { - return iListOneRowRollWithIcon; - } - -CList* CListManager::ListExpandableMultiRowWithoutIcon() const - { - return iListExpandableMultiRowWithoutIcon; - } - -// ----------------------------------------------------------------------------- -// CListManager::ListMultiRowRollWithIconWithBubble -// get one row roll with icon with bubble -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListOneRowRollWithIconWithBubble() const - { - return iListOneRowRollWithIconWithBubble; - } - -// ----------------------------------------------------------------------------- -// CListManager::ListMultiRowRollWithIconWithBubble -// get multi row roll with icon with bubble -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CList* CListManager::ListMultiRowRollWithIconWithBubble() const - { - return iListMultiRowRollWithIconWithBubble; - } - -void CListManager::ResetStatus() - { - ListOneRowWithoutIcon()->ResetStatus(); - ListOneRowWithoutIconWithBubble()->ResetStatus(); - ListMultiRowWithIcon()->ResetStatus(); - ListMultiRowWithIconWithBubble()->ResetStatus(); - ListOneRowWithIcon()->ResetStatus(); - ListOneRowWithIconWithBubble()->ResetStatus(); - ListMultiRowRollWithIcon()->ResetStatus(); - ListOneRowRollWithIcon()->ResetStatus(); - ListOneRowRollWithIconWithBubble()->ResetStatus(); - ListMultiRowRollWithIconWithBubble()->ResetStatus(); - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowrollwithicon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowrollwithicon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,393 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include -#include -#include -#include - -#include "peninputdropdownlist.h" -#include "peninputlayout.h" -#include "peninputlistmultirowrollwithicon.h" - -// added by txin -const TInt KInvalidCandIndex = -1; -// end adding - -CListMultiRowRollWithIcon* CListMultiRowRollWithIcon::NewL(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) - { - CListMultiRowRollWithIcon* self = new (ELeave) CListMultiRowRollWithIcon(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CListMultiRowRollWithIcon::~CListMultiRowRollWithIcon() - { - iLines.Reset(); - iLines.Close(); - } - -void CListMultiRowRollWithIcon::HandlePointerDownL(const TPoint& aPoint) - { - CList::HandlePointerDownL(aPoint); - - // if press outside of expanded list, close it - // also consider fuzzy boundary - TRect fuzzyrect = iRect; - fuzzyrect.Grow(iOwner->FuzzyBoundry(), iOwner->FuzzyBoundry()); - - if (!fuzzyrect.Contains(aPoint)) - { - iOwner->SetCapture(EFalse); - - if (iOwner->OneRowStartCandIdx() != KInvalidCandIndex) - { - iOwner->AutoChangeActiveList(iOwner->OneRowStartCandIdx()); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - - return; - } - - // If click in navigation rect and NextButton is not disable, then do - if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - iClickedRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KDummyRect; - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else - { - iClickedRect = KDummyRect; - } - } - } - -void CListMultiRowRollWithIcon::HandlePointerUpL(const TPoint& aPoint) - { - // Reset the button clicked flag to EFalse - iIndicateButtonClicked = EFalse; - -#ifdef __WINS__ - // in emulator, double click will be treated as: - // 1 pointer down and 2 pointer up, which will cause error - if (iClickedRect.IsEmpty() && ((CFepUiBaseCtrl*)iOwner)->PointerDown()) -#else - if (iClickedRect.IsEmpty()) -#endif // __WINS__ - { - iOwner->SetCapture(EFalse); - // Change active list object ie. close the dd-list - - // txin modify - //iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - if (iOwner->OneRowStartCandIdx() != KInvalidCandIndex) - { - iOwner->AutoChangeActiveList(iOwner->OneRowStartCandIdx()); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - // end - } - else - { - if ( iContentRect.Contains(aPoint) ) - { - if ( iClickedRect.Contains(aPoint) ) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - iOwner->SetCapture(EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Send the candidate to others - if (iClickedCandidateIndex != KErrNotFound) - { - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - - if (candidate) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - - TInt lastIdxOfLine = StartCandIdxOfLine(iClickedCandidateIndex); - - TInt originalFirstCandIdx = iOwner->GetFirstCandidateIndex(); - TInt originalLastCandIdx = iOwner->GetLastCandidateIndex(); - - if (lastIdxOfLine == KInvalidCandIndex) - { - lastIdxOfLine = iOwner->GetFirstCandidateIndex(); - } - - iOwner->SetOneRowStartCandIdx(lastIdxOfLine); - - iOwner->AutoChangeActiveList(lastIdxOfLine); - - iOwner->SetOriginalFirstCandIdx(originalFirstCandIdx); - } - } - } - else if ( iNavigationCloseRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect == iClickedRect ) - { - iOwner->SetCapture(EFalse); - - if (iOwner->OneRowStartCandIdx() != KInvalidCandIndex) - { - iOwner->AutoChangeActiveList(iOwner->OneRowStartCandIdx()); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - } - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KEmptyRect; - return; - } - else if ( iNavigationNextRect.Contains(aPoint) ) - { - if ( iNavigationNextRect == iClickedRect ) - { - iOwner->NotifyGetNextPage(); - UpdateListL(); - } - } - else if ( iNavigationPreviousRect.Contains(aPoint) ) - { - if ( iNavigationPreviousRect == iClickedRect ) - { - // Change page to previous - iOwner->NotifyGetPreviousPage(); // do nothing, just to avoid clear candidate - - TInt firstIndex = 0; - TInt lastIndex = 0; - - if (iOwner->GetPages()->GetPreviousIndex(iOwner->GetLastCandidateIndex(), - firstIndex,lastIndex)) - { - iOwner->SetFirstCandidateIndex(firstIndex); - iOwner->SetLastCandidateIndex(lastIndex); - } - - UpdateListL(ETrue, EFalse); - } - } - - iClickedRect = KEmptyRect; - } - } - -void CListMultiRowRollWithIcon::SetNextPageHighlightCellAfterOnePageL(const TInt aCellIndex) - { - while (aCellIndex >= iOwner->GetLastCandidateIndex()) - { - UpdateListL(); - } - - TInt lastIdxOfLine = StartCandIdxOfLine(aCellIndex); - - TInt originalFirstCandIdx = iOwner->GetFirstCandidateIndex(); - TInt originalLastCandIdx = iOwner->GetLastCandidateIndex(); - - if (lastIdxOfLine == KInvalidCandIndex) - { - lastIdxOfLine = iOwner->GetFirstCandidateIndex(); - } - - iOwner->SetOneRowStartCandIdx(lastIdxOfLine); - - iOwner->AutoChangeActiveList(lastIdxOfLine); - - iOwner->SetOriginalFirstCandIdx(originalFirstCandIdx); - } - -CListMultiRowRollWithIcon::CListMultiRowRollWithIcon(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner): - CListMultiRowWithIcon(aManager, aOwner) - { - iIsMultiRows = ETrue; - } - -TInt CListMultiRowRollWithIcon::StartCandIdxOfLine(TInt aCandIndex) - { - TInt lineCnt = iLines.Count(); - - for (TInt i = 0; i < lineCnt; i++) - { - if ((aCandIndex >= iLines[i].iStartIdx) && (aCandIndex <= iLines[i].iEndIdx)) - { - return iLines[i].iStartIdx; - } - } - - return KInvalidCandIndex; - } - -void CListMultiRowRollWithIcon::ResetStatus() - { - CList::ResetStatus(); - iLines.Reset(); - } - -TInt CListMultiRowRollWithIcon::CalculatePositionsL() - { - TLineCandidate lineCand; - - TInt t = 0; - TPoint setpoints; - TInt count = iOwner->CandidateCount(); - CCandidate* candidate = NULL; - - if ( count > 0 ) - { - // modified by txin - // original - /* - setpoints.iX = iContentRect.iTl.iX; - setpoints.iY = iContentRect.iTl.iY; - */ - - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); // horizontal direction - candHLToR ? setpoints.SetXY(iContentRect.iTl.iX, iContentRect.iTl.iY) : - setpoints.SetXY(iContentRect.iBr.iX, iContentRect.iTl.iY); - // end modify - - TInt currentCellIndex = 0; - TInt lastUsedCellCount = 0; - TInt lastusedRow = 0; - iOwner->SetFirstCandidateIndex (iOwner->GetLastCandidateIndex()); - count = Min(count, iOwner->GetLastCandidateIndex() + - iOwner->GetColNum() * iOwner->GetRowNum() ); - - lineCand.iStartIdx = iOwner->GetLastCandidateIndex(); - - for(t = iOwner->GetLastCandidateIndex(); t < count ; t++) - { - candidate = iOwner->GetCandidate(t); - - if (!candidate) - { - continue; - } - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - currentCellIndex += lastUsedCellCount; - if ( currentCellIndex > iOwner->GetColNum() ) - { - lastusedRow++; - if ( lastusedRow >= iOwner->GetRowNum() ) - { - break; - } - - currentCellIndex = 0; - setpoints.iY = setpoints.iY + - iOwner->GetCellHeight() + - iOwner->GetCellVerticalMargin(); - - candHLToR ? (setpoints.iX = iContentRect.iTl.iX) : (setpoints.iX = iContentRect.iBr.iX); - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - currentCellIndex += lastUsedCellCount; - - lineCand.iEndIdx = t - 1; - iLines.Append(lineCand); - - lineCand.iStartIdx = t; - - candHLToR ? (setpoints.iX += lastUsedCellCount * (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount * (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())); - } - else - { - candHLToR ? (setpoints.iX += lastUsedCellCount * (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount * (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())); - } - } // for-loop - } // if candidate exist - - lineCand.iEndIdx = t-1; - iLines.Append(lineCand); - - return t; // as lastCandidateIndex - } - -void CListMultiRowRollWithIcon::UpdateListL(TBool aDrawFlag, TBool aRecalculate) - { - RefreshListL(aRecalculate); - - if (iOwner->GetUpdateListRedrawFlag() && aDrawFlag ) - { - Draw(); - iOwner->Invalidate(iRect); - } - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowrollwithiconwithbubble.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowrollwithiconwithbubble.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,402 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include -#include -#include - -#include "peninputdropdownlist.h" -#include "peninputlayout.h" -#include "peninputlistmultirowrollwithiconwithbubble.h" - - -const TInt KInvalidCandIndex = -1; - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListMultiRowRollWithIconWithBubble - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowRollWithIconWithBubble* CListMultiRowRollWithIconWithBubble::NewL(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) - { - CListMultiRowRollWithIconWithBubble* self = new (ELeave) CListMultiRowRollWithIconWithBubble(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::CListMultiRowRollWithIconWithBubble -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowRollWithIconWithBubble::CListMultiRowRollWithIconWithBubble(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner): - CListMultiRowRollWithIcon(aManager, aOwner) - { - } - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::~CListMultiRowRollWithIconWithBubble -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowRollWithIconWithBubble::~CListMultiRowRollWithIconWithBubble() - { - - } - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowRollWithIconWithBubble::HandlePointerDownL(const TPoint& aPoint) - { - CList::HandlePointerDownL(aPoint); - - // if press outside of expanded list, close it - // also consider fuzzy boundary - TRect fuzzyrect = iRect; - fuzzyrect.Grow(iOwner->FuzzyBoundry(), iOwner->FuzzyBoundry()); - - if (!fuzzyrect.Contains(aPoint)) - { - iOwner->SetCapture(EFalse); - - if (iOwner->OneRowStartCandIdx() != KInvalidCandIndex) - { - iOwner->AutoChangeActiveList(iOwner->OneRowStartCandIdx()); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - iOwner->ClearBubble(); - return; - } - - // If click in navigation rect and NextButton is not disable, then do - if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - iClickedRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KDummyRect; - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else - { - iClickedRect = KDummyRect; - } - } - else - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - if(candidate) - { - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - } - - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowRollWithIconWithBubble::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - CCandidate* candidate = FindCandidate(aPoint, iClickedCandidateIndex); - - TBool isUpdateBubble = EFalse; - if ( candidate ) - { - if (iClickedRect != candidate->GetRect()) - {// move to the other candidate - // set update prview bubble flag - isUpdateBubble = ETrue; - // remenber the previous cell rect - iMoveLatestRect = iClickedRect; - // get the new cell rect - iClickedRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - } - } - else if ( iNavigationRect.Contains(aPoint) ) - { - iOwner->ClearBubble(); - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable && - iClickedRect != iNavigationCloseRect) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - CompareRect(iMoveLatestRect, iClickedRect); - } - else if (!iOwner->PageCtrlShown()) - { - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable && - iClickedRect != iNavigationPreviousRect ) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - CompareRect(iMoveLatestRect, iClickedRect); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable && - iClickedRect != iNavigationNextRect ) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - CompareRect(iMoveLatestRect, iClickedRect); - } - else if(!((iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable) || - (iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable) || - (iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable))) - { - // Move to navigation area but not valid navigation button - TRect dummyrect = KDummyRect; - if(iClickedRect != dummyrect) - { - iMoveLatestRect = iClickedRect; - iClickedRect = KDummyRect; - CompareRect(iMoveLatestRect, iClickedRect); - } - } - } - else - {// outside the list - // remember the previous cell - iMoveLatestRect = iClickedRect; - // set the new cell to empty - iClickedRect = KDummyRect; - // redraw the cell only when drag outside at the first time - if(iMoveLatestRect != iClickedRect) - { - iOwner->ClearBubble(); - DrawSelection(iMoveLatestRect, EFalse); - DrawHighightCell(iMoveLatestRect, ETrue); - } - } - - if(candidate && isUpdateBubble) - { - iOwner->ClearBubble(); - CompareRect(iMoveLatestRect, iClickedRect); - // Show preview bubble when drag into a candidate cell - // Make sure show the bubble after redraw clicked cell - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::HandlePointerUpL -// handle pointer up -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowRollWithIconWithBubble::HandlePointerUpL(const TPoint& aPoint) - { - // Reset the button clicked flag to EFalse - iIndicateButtonClicked = EFalse; - - iOwner->ClearBubble(); -#ifdef __WINS__ - // in emulator, double click will be treated as: - // 1 pointer down and 2 pointer up, which will cause error - if (iClickedRect.IsEmpty() && ((CFepUiBaseCtrl*)iOwner)->PointerDown()) -#else - if (iClickedRect.IsEmpty()) -#endif // __WINS__ - { - iOwner->SetCapture(EFalse); - // Change active list object ie. close the dd-list - - // txin modify - //iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - if (iOwner->OneRowStartCandIdx() != KInvalidCandIndex) - { - iOwner->AutoChangeActiveList(iOwner->OneRowStartCandIdx()); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - // end - } - else - { - if ( iContentRect.Contains(aPoint) ) - { - if ( iClickedRect.Contains(aPoint) ) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - iOwner->SetCapture(EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Send the candidate to others - if (iClickedCandidateIndex != KErrNotFound) - { - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - - if (candidate) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - - TInt lastIdxOfLine = StartCandIdxOfLine(iClickedCandidateIndex); - - TInt originalFirstCandIdx = iOwner->GetFirstCandidateIndex(); - TInt originalLastCandIdx = iOwner->GetLastCandidateIndex(); - - if (lastIdxOfLine == KInvalidCandIndex) - { - lastIdxOfLine = iOwner->GetFirstCandidateIndex(); - } - - iOwner->SetOneRowStartCandIdx(lastIdxOfLine); - - iOwner->AutoChangeActiveList(lastIdxOfLine); - - iOwner->SetOriginalFirstCandIdx(originalFirstCandIdx); - } - } - } - else if ( iNavigationCloseRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect == iClickedRect ) - { - iOwner->SetCapture(EFalse); - - if (iOwner->OneRowStartCandIdx() != KInvalidCandIndex) - { - iOwner->AutoChangeActiveList(iOwner->OneRowStartCandIdx()); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - } - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KEmptyRect; - return; - } - else if ( iNavigationNextRect.Contains(aPoint) ) - { - if ( iNavigationNextRect == iClickedRect ) - { - iOwner->NotifyGetNextPage(); - UpdateListL(); - } - } - else if ( iNavigationPreviousRect.Contains(aPoint) ) - { - if ( iNavigationPreviousRect == iClickedRect ) - { - // Change page to previous - iOwner->NotifyGetPreviousPage(); // do nothing, just to avoid clear candidate - - TInt firstIndex = 0; - TInt lastIndex = 0; - - if (iOwner->GetPages()->GetPreviousIndex(iOwner->GetLastCandidateIndex(), - firstIndex,lastIndex)) - { - iOwner->SetFirstCandidateIndex(firstIndex); - iOwner->SetLastCandidateIndex(lastIndex); - } - - UpdateListL(ETrue, EFalse); - } - } - - iClickedRect = KEmptyRect; - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowRollWithIconWithBubble::CompareRect -// Compare src and des rect -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListMultiRowRollWithIconWithBubble::CompareRect(const TRect& aSrcRect, const TRect& aDesRect) - { - if(aSrcRect != aDesRect) - { - DrawSelection(aDesRect, ETrue); - DrawSelection(aSrcRect, EFalse); - DrawHighightCell(aSrcRect, ETrue); - } - - return EFalse; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowwithicon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowwithicon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1038 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Multi rows list with icon for drop-down list objects -* -*/ - - -// Include -#include -#include -#include -#include -#include -#include -#include "peninputlistmultirowwithicon.h" -#include "peninputlayout.h" - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListMultiRowWithIcon - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::CListMultiRowWithIcon -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithIcon::CListMultiRowWithIcon(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) -: CList(aManager, aOwner) - { - iIsMultiRows = ETrue; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithIcon* CListMultiRowWithIcon::NewL(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) - { - CListMultiRowWithIcon* self = new (ELeave) CListMultiRowWithIcon(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::~CListMultiRowWithIcon -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithIcon::~CListMultiRowWithIcon() - { - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIcon::HandlePointerDownL(const TPoint& aPoint) - { - CList::HandlePointerDownL(aPoint); - - // also consider fuzzy boundry of drop down list - TRect fuzzyrect = iRect; - fuzzyrect.Grow(iOwner->FuzzyBoundry(), iOwner->FuzzyBoundry()); - - if (!fuzzyrect.Contains(aPoint)) - { - iOwner->SetCapture(EFalse); - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - return; - } - - // If click in navigation rect and NextButton is not disable, then do - if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - - iClickedRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KDummyRect; - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - - - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else - { - iClickedRect = KDummyRect; - } - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIcon::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - if ( !iClickedRect.IsEmpty() ) // clicked rect is not outside the whole DDL - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - - iMoveLatestRect = KEmptyRect; - - if ( candidate ) - { - iMoveLatestRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - } - else if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable ) - { - iMoveLatestRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - } - else if (!iOwner->PageCtrlShown()) - { - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - iMoveLatestRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - iMoveLatestRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - } - } - - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIcon::HandlePointerUpL(const TPoint& aPoint) - { - // Reset the button clicked flag to EFalse - iIndicateButtonClicked = EFalse; - -#ifdef __WINS__ - // in emulator, double click will be treated as: - // 1 pointer down and 2 pointer up, which will cause error - if (iClickedRect.IsEmpty() && ((CFepUiBaseCtrl*)iOwner)->PointerDown()) -#else - if (iClickedRect.IsEmpty()) -#endif // __WINS__ - { - iOwner->SetCapture(EFalse); - // Change active list object ie. close the dd-list - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - } - else - { - if ( iContentRect.Contains(aPoint) ) - { - if ( iClickedRect.Contains(aPoint) ) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - iOwner->SetCapture(EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Send the candidate to others - if (iClickedCandidateIndex != KErrNotFound) - { - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - } - } - } - else if ( iNavigationCloseRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect == iClickedRect ) - { - iOwner->SetCapture(EFalse); - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KEmptyRect; - return; - } - else if ( iNavigationNextRect.Contains(aPoint) ) - { - if ( iNavigationNextRect == iClickedRect ) - { - iOwner->NotifyGetNextPage(); - UpdateListL(); - } - } - else if ( iNavigationPreviousRect.Contains(aPoint) ) - { - if ( iNavigationPreviousRect == iClickedRect ) - { - // Change page to previous - iOwner->NotifyGetPreviousPage(); // do nothing, just to avoid clear candidate - - TInt firstIndex = 0; - TInt lastIndex = 0; - - if (iOwner->GetPages()->GetPreviousIndex(iOwner->GetLastCandidateIndex(), - firstIndex,lastIndex)) - { - iOwner->SetFirstCandidateIndex(firstIndex); - iOwner->SetLastCandidateIndex(lastIndex); - } - - UpdateListL(ETrue, EFalse); - } - } - - iClickedRect = KEmptyRect; - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIcon::Draw() - { - // Call draw in base class; - CList::Draw(); - - DrawCandidates(); - - const CFbsBitmap* bitmapBg = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapListBg); - const CFbsBitmap* bitmapBgMask = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapListBgMask); - - if (!bitmapBg || !bitmapBgMask) - { - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - if ((iOwner->GetCellHorizontalMargin() == 0) && (iOwner->GetCellVerticalMargin() == 0)) - { - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - } - else - { - iOwner->Gc()->SetPenStyle(CGraphicsContext::ENullPen); - } - - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - - // Draw the rect for navi - iOwner->Gc()->DrawRect(iNavigationRect); - } - else - { - iOwner->Gc()->DrawBitmapMasked(iNavigationRect, bitmapBg, - bitmapBg->SizeInPixels(), bitmapBgMask, ETrue); - - } - - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - - // First draw down button - if ( iBButtonClose ) - { - //mask bitmaps - TRect rect = iNavigationCloseRect; - - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - // ----- draw bitmaps ----- - - - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iNormalBtnImgID, - KAknsIIDDefault ); - - - iBButtonMaskClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapCloseMask); - - TRect srcRect( TPoint( 0, 0 ), iBButtonClose->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationCloseRect.iTl, - iBButtonClose, - srcRect, - iBButtonMaskClose, - EFalse); - } - else - { - // Draw the rect for navi next - iOwner->Gc()->DrawLine(TPoint(iNavigationCloseRect.iTl.iX, iNavigationCloseRect.iBr.iY), - iNavigationCloseRect.iBr); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - iOwner->Gc()->DrawLine(iNavigationCloseRect.iTl, - TPoint(iNavigationCloseRect.iTl.iX, - iNavigationCloseRect.iBr.iY)); - iOwner->Gc()->DrawLine(TPoint(iNavigationCloseRect.iBr.iX, - iNavigationCloseRect.iTl.iY), - iNavigationCloseRect.iBr); - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - iOwner->Gc()->DrawLine(iNavigationCloseRect.iTl, - TPoint(iNavigationCloseRect.iBr.iX, - iNavigationCloseRect.iTl.iY)); - } - - - rect.Shrink(TSize(1,1)); - rect.iBr.iY = rect.iBr.iY + 1; - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonClose, - iBButtonClose->SizeInPixels(), iBButtonMaskClose, ETrue); - } - } - - if (!iOwner->PageCtrlShown()) - { - iOwner->Invalidate(iRect); - return; - } - - // First draw down button - if ( iBButtonDown ) - { - //mask bitmaps - TRect rect = iNavigationNextRect; - - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - // ----- draw bitmaps ----- - - - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iNormalBtnImgID, - KAknsIIDDefault ); - - - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - - TRect srcRect( TPoint( 0, 0 ), iBButtonDown->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationNextRect.iTl, - iBButtonDown, - srcRect, - iBButtonMaskDown, - EFalse); - } - else - { - // Draw the rect for navi next - iOwner->Gc()->DrawLine(iNavigationNextRect.iTl, - TPoint(iNavigationNextRect.iBr.iX, iNavigationNextRect.iTl.iY)); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - iOwner->Gc()->DrawLine(iNavigationNextRect.iTl, - TPoint(iNavigationNextRect.iTl.iX, iNavigationNextRect.iBr.iY)); - iOwner->Gc()->DrawLine(TPoint(iNavigationNextRect.iBr.iX, iNavigationNextRect.iTl.iY), - iNavigationNextRect.iBr); - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - iOwner->Gc()->DrawLine(TPoint(iNavigationNextRect.iTl.iX, iNavigationNextRect.iBr.iY), - iNavigationNextRect.iBr); - } - - rect.Shrink(TSize(1,1)); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - rect.iBr.iY = rect.iBr.iY + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonDown, - iBButtonDown->SizeInPixels(), iBButtonMaskDown, ETrue); - } - } - - // Second draw up button - if ( iBButtonUp ) - { - //mask bitmaps - TRect rect = iNavigationPreviousRect; - - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - // ----- draw bitmaps ----- - - - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iNormalBtnImgID, - KAknsIIDDefault ); - - - iBButtonMaskUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPreviousMask); - - TRect srcRect( TPoint( 0, 0 ), iBButtonMaskUp->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationPreviousRect.iTl, - iBButtonUp, - srcRect, - iBButtonMaskUp, - EFalse); - } - - else - { - // Draw the rect for navi next - iOwner->Gc()->DrawLine(TPoint(iNavigationPreviousRect.iTl.iX, - iNavigationPreviousRect.iBr.iY), - iNavigationPreviousRect.iBr ); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - iOwner->Gc()->DrawLine(iNavigationPreviousRect.iTl, - TPoint(iNavigationPreviousRect.iTl.iX, iNavigationPreviousRect.iBr.iY)); - iOwner->Gc()->DrawLine( - TPoint(iNavigationPreviousRect.iBr.iX, iNavigationPreviousRect.iTl.iY), - iNavigationPreviousRect.iBr); - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - iOwner->Gc()->DrawLine(iNavigationPreviousRect.iTl, - TPoint(iNavigationPreviousRect.iBr.iX, iNavigationPreviousRect.iTl.iY)); - } - - rect.Shrink(TSize(1,1)); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - rect.iBr.iY = rect.iBr.iY + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonUp, - iBButtonUp->SizeInPixels(), iBButtonMaskUp, ETrue); - } - } - - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::UpdateList -// update the liset -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIcon::UpdateListL(TBool aDrawFlag,TBool aRecalculate) - { - RefreshListL(aRecalculate); - if(aDrawFlag) - { - Draw(); - iOwner->Invalidate(iRect); - } - } - -void CListMultiRowWithIcon::RefreshListL(TBool aRecalculate) - { - // Recalculate the pos for the candidates - if ( aRecalculate ) - { - iOwner->SetLastCandidateIndex(CalculatePositionsL()); - } - - iOwner->GetPages()->AddPage(iOwner->GetFirstCandidateIndex(), iOwner->GetLastCandidateIndex()); - - iCloseButtonDisable = EFalse; - iBButtonClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapClose); - iBButtonMaskClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapCloseMask); - - if (iOwner->GetFirstCandidateIndex() == 0) // First page, previous button can't be seen - { - iPreviousButtonDisable = ETrue; - iBButtonUp = NULL; - iBButtonMaskUp = NULL; - } - else - { - iPreviousButtonDisable = EFalse; - iBButtonUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrevious); - iBButtonMaskUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPreviousMask); - } - - if ((iOwner->GetLastCandidateIndex() < iOwner->CandidateCount()) || - iOwner->NextCandidateExist()) - { - iNextButtonDisable = EFalse; - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNext); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - } - else - { - iNextButtonDisable = ETrue; - iBButtonDown = NULL; - iBButtonMaskDown = NULL; - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::CalculateAreas -// Calculate all kinds of rectangles -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIcon::CalculateAreas() - { - iRect.iTl = iOwner->GetTopLeftPoint(); - TInt width = iOwner->GetCellWidth() * iOwner->GetColNum() + - iOwner->GetNaviWidth() + - (iOwner->GetColNum() + 2) * iOwner->GetCellHorizontalMargin(); - - TInt height = iOwner->GetCellHeight() * iOwner->GetRowNum() + - (iOwner->GetRowNum() + 1) * iOwner->GetCellVerticalMargin(); - - iRect.SetSize(TSize(width, height)); - - if (iOwner->CandExpandType() == CFepCtrlDropdownList::ECandExpandUpward) - { - TInt onerowheight = iOwner->GetCellHeight() + 2 * iOwner->GetCellVerticalMargin(); - iRect.Move(0, -(height - onerowheight)); - } - - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - TInt xPos = iRect.iTl.iX + iOwner->GetCellHorizontalMargin(); - TInt yPos = iRect.iTl.iY + iOwner->GetCellVerticalMargin(); - - // width of content rect - TInt widthC = iOwner->GetCellWidth() * iOwner->GetColNum() + - (iOwner->GetColNum() - 1) * iOwner->GetCellHorizontalMargin(); - height = iOwner->GetCellHeight() * iOwner->GetRowNum() + - (iOwner->GetRowNum() - 1) * iOwner->GetCellVerticalMargin(); - // width of navi rect - TInt widthN = iOwner->GetNaviWidth(); - - if (candHLToR) - { - iContentRect.iTl.SetXY(xPos, yPos); - iNavigationRect.iTl.SetXY(xPos + widthC + iOwner->GetCellHorizontalMargin(), - yPos); - } - else - { - iNavigationRect.iTl.SetXY(xPos, yPos); - iContentRect.iTl.SetXY(xPos + widthN + iOwner->GetCellHorizontalMargin(), - yPos); - } - - iContentRect.SetSize(TSize(widthC, height)); - iNavigationRect.SetSize(TSize(widthN, height)); - - iNavigationCloseRect.iTl = iNavigationRect.iTl; - iNavigationCloseRect.SetSize(TSize(iOwner->GetNaviWidth(), iOwner->GetCellHeight())); - - if (!iOwner->PageCtrlShown()) - { - iNavigationPreviousRect = TRect(0, 0, 0, 0); - iNavigationNextRect = TRect(0, 0, 0, 0); - return; - } - else - { - iNavigationPreviousRect.iTl.SetXY(iNavigationCloseRect.iTl.iX, - iNavigationCloseRect.iBr.iY + iOwner->GetCellVerticalMargin()); - iNavigationPreviousRect.SetSize(TSize(iOwner->GetNaviWidth(), iOwner->GetSpinBtnHeight())); - iNavigationNextRect.iTl.SetXY(iNavigationRect.iTl.iX, - iNavigationRect.iBr.iY - iOwner->GetSpinBtnHeight()); - iNavigationNextRect.SetSize(TSize(iOwner->GetNaviWidth(), iOwner->GetSpinBtnHeight())); - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::CalculatePositionsL -// calculate the position of all visible cells in the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CListMultiRowWithIcon::CalculatePositionsL() - { - TInt t = 0; - TPoint setpoints; - TInt count = iOwner->CandidateCount(); - CCandidate* candidate = NULL; - if ( count > 0 ) - { - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - candHLToR ? setpoints.SetXY(iContentRect.iTl.iX, iContentRect.iTl.iY) : - setpoints.SetXY(iContentRect.iBr.iX, iContentRect.iTl.iY); - - TInt currentCellIndex = 0; - TInt lastUsedCellCount = 0; - TInt lastusedRow = 0; - iOwner->SetFirstCandidateIndex (iOwner->GetLastCandidateIndex()); - count = Min(count, iOwner->GetLastCandidateIndex() + iOwner->GetColNum() * iOwner->GetRowNum() ); - - for(t = iOwner->GetLastCandidateIndex(); t < count ; t++) - { - candidate = iOwner->GetCandidate(t); - - if (!candidate) - { - continue; - } - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - currentCellIndex += lastUsedCellCount; - if ( currentCellIndex > iOwner->GetColNum() ) - { - lastusedRow++; - if ( lastusedRow >= iOwner->GetRowNum() ) - { - break; - } - - currentCellIndex = 0; - - setpoints.iY = setpoints.iY + - iOwner->GetCellHeight() + - iOwner->GetCellVerticalMargin(); - candHLToR ? (setpoints.iX = iContentRect.iTl.iX) : (setpoints.iX = iContentRect.iBr.iX); - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - currentCellIndex += lastUsedCellCount; - - candHLToR ? (setpoints.iX += lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())); - } - else - { - candHLToR ? (setpoints.iX += lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())); - } - } // for-loop - } // if candidate exist - - return t; // as lastCandidateIndex - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIcon::DrawNavigationPress -// draw navigation button when pressed or un-pressed -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListMultiRowWithIcon::DrawNavigationPress(const TRect& aRect,TBool aIndicate) - { - TBool retval = EFalse; - - if ( aRect == iNavigationCloseRect ) - { - retval = ETrue; - - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect rect = iNavigationCloseRect; - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - if ( aIndicate ) - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iPressedBtnImgID, - KAknsIIDDefault ); - } - else - { - - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iNormalBtnImgID, - KAknsIIDDefault ); - - } - - iBButtonMaskClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapCloseMask); - - TRect srcRect( TPoint( 0, 0 ), iBButtonClose->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationCloseRect.iTl, - iBButtonClose, - srcRect, - iBButtonMaskClose, - EFalse); - } - else - { - if ( aIndicate ) // Pressed the button - { - iBButtonClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapClosePress); - iBButtonMaskClose = iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapClosePressMask); - } - else // Release the button - { - iBButtonClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapClose); - iBButtonMaskClose = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapCloseMask); - } - - // Begin draw navigation next button - iOwner->DrawMask(iNavigationCloseRect); - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - // Draw bitmap - TRect rect = iNavigationCloseRect; - rect.Shrink(TSize(1,1)); - rect.iBr.iY += 1; - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonClose, - iBButtonClose->SizeInPixels(), iBButtonMaskClose, ETrue); - } - iOwner->Invalidate(aRect); - } - else if (!iOwner->PageCtrlShown()) - { - return retval; - } - else if ( aRect == iNavigationPreviousRect ) - { - retval = ETrue; - - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect rect = iNavigationPreviousRect; - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - if ( aIndicate ) - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iPressedBtnImgID, - KAknsIIDDefault ); - } - else - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iNormalBtnImgID, - KAknsIIDDefault ); - } - - iBButtonMaskUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPreviousMask); - - TRect srcRect( TPoint( 0, 0 ), iBButtonUp->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationPreviousRect.iTl, - iBButtonUp, - srcRect, - iBButtonMaskUp, - EFalse); - } - else - { - if ( aIndicate ) // Pressed the button - { - if ( iBButtonUp ) - { - iBButtonUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPreviousPress); - iBButtonMaskUp = iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapPreviousPressMask); - } - } - else // Release the button - { - if ( iBButtonUp ) - { - iBButtonUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPrevious); - iBButtonMaskUp = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapPreviousMask); - } - } - - // Begin draw navigation next button - iOwner->DrawMask(iNavigationPreviousRect); - - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - - // Clear rect - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->DrawRect( iNavigationPreviousRect ); - - // Draw bitmap - TRect rect = iNavigationPreviousRect; - rect.Shrink(TSize(1,1)); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - rect.iBr.iY = rect.iBr.iY + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonUp, - iBButtonUp->SizeInPixels(), iBButtonMaskUp, ETrue); - } - - iOwner->Invalidate(aRect); - - } - else if ( aRect == iNavigationNextRect ) - { - retval = ETrue; - - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - - - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect rect = iNavigationNextRect; - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - if ( aIndicate ) - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iPressedBtnImgID, - KAknsIIDDefault ); - } - else - { - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - iDropdownListDrawInfo.iNormalBtnImgID, - KAknsIIDDefault ); - } - - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - - TRect srcRect( TPoint( 0, 0 ), iBButtonDown->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationNextRect.iTl, - iBButtonDown, - srcRect, - iBButtonMaskDown, - EFalse); - } - else - { - if ( aIndicate ) // Pressed the button - { - if ( iBButtonDown ) - { - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextPress); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapNextPressMask); - } - } - else // Release the button - { - if ( iBButtonDown ) - { - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNext); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - } - } - - // Begin draw navigation next button - iOwner->DrawMask(iNavigationNextRect); - - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - - // Clear rect - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->DrawRect( iNavigationNextRect ); - - // Draw bitmap - TRect rect = iNavigationNextRect; - rect.Shrink(TSize(1,1)); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - rect.iBr.iY = rect.iBr.iY + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonDown, - iBButtonDown->SizeInPixels(), iBButtonMaskDown, ETrue); - } - - iOwner->Invalidate(aRect); - } - - return retval; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowwithiconwithbubble.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowwithiconwithbubble.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,361 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// Include -#include -#include -#include -#include -#include -#include -#include "peninputlistmultirowwithicon.h" -#include "peninputlistmultirowwithiconwithbubble.h" -#include "peninputlayout.h" - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListMultiRowWithIconWithBubble - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::CListMultiRowWithIconWithBubble -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithIconWithBubble::CListMultiRowWithIconWithBubble(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) -: CListMultiRowWithIcon(aManager, aOwner) - { - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithIconWithBubble* CListMultiRowWithIconWithBubble::NewL(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) - { - CListMultiRowWithIconWithBubble* self = new (ELeave) CListMultiRowWithIconWithBubble(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::~CListMultiRowWithIconWithBubble -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithIconWithBubble::~CListMultiRowWithIconWithBubble() - { - } - - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIconWithBubble::HandlePointerDownL(const TPoint& aPoint) - { - CList::HandlePointerDownL(aPoint); - - // also consider fuzzy boundry of drop down list - TRect fuzzyrect = iRect; - fuzzyrect.Grow(iOwner->FuzzyBoundry(), iOwner->FuzzyBoundry()); - - if (!fuzzyrect.Contains(aPoint)) - { - iOwner->SetCapture(EFalse); - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - iOwner->ClearBubble(); - return; - } - - // If click in navigation rect and NextButton is not disable, then do - if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - - iClickedRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KDummyRect; - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else - { - iClickedRect = KDummyRect; - } - } - else - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - if(candidate) - { - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - } - - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIconWithBubble::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - CCandidate* candidate = FindCandidate(aPoint, iClickedCandidateIndex); - - TBool isUpdateBubble = EFalse; - if ( candidate ) - { - if (iClickedRect != candidate->GetRect()) - {// move to the other candidate - // set update prview bubble flag - isUpdateBubble = ETrue; - // remenber the previous cell rect - iMoveLatestRect = iClickedRect; - // get the new cell rect - iClickedRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - } - } - else if ( iNavigationRect.Contains(aPoint) ) - { - iOwner->ClearBubble(); - if ( iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable && - iClickedRect != iNavigationCloseRect) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationCloseRect.iTl, iNavigationCloseRect.iBr); - CompareRect(iMoveLatestRect, iClickedRect); - } - else if (!iOwner->PageCtrlShown()) - { - return; - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable && - iClickedRect != iNavigationPreviousRect ) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - CompareRect(iMoveLatestRect, iClickedRect); - } - else if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable && - iClickedRect != iNavigationNextRect ) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - CompareRect(iMoveLatestRect, iClickedRect); - } - else if(!((iNavigationCloseRect.Contains(aPoint) && !iCloseButtonDisable) || - (iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable) || - (iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable))) - { - // Move to navigation area but not valid navigation button - TRect dummyrect = KDummyRect; - if(iClickedRect != dummyrect) - { - iMoveLatestRect = iClickedRect; - iClickedRect = KDummyRect; - CompareRect(iMoveLatestRect, iClickedRect); - } - } - } - else - {// move to the aperture - // remember the previous cell - iMoveLatestRect = iClickedRect; - // set the new cell to empty - iClickedRect = KDummyRect; - // redraw the cell only when drag outside at the first time - if(iMoveLatestRect != iClickedRect) - { - iOwner->ClearBubble(); - DrawSelection(iMoveLatestRect, EFalse); - DrawHighightCell(iMoveLatestRect, ETrue); - } - } - - if(candidate && isUpdateBubble) - { - iOwner->ClearBubble(); - CompareRect(iMoveLatestRect, iClickedRect); - // Show preview bubble when drag into a candidate cell - // Make sure show the bubble after redraw clicked cell - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithIconWithBubble::HandlePointerUpL(const TPoint& aPoint) - { - // Reset the button clicked flag to EFalse - iIndicateButtonClicked = EFalse; - - iOwner->ClearBubble(); - -#ifdef __WINS__ - // in emulator, double click will be treated as: - // 1 pointer down and 2 pointer up, which will cause error - if (iClickedRect.IsEmpty() && ((CFepUiBaseCtrl*)iOwner)->PointerDown()) -#else - if (iClickedRect.IsEmpty()) -#endif // __WINS__ - { - iOwner->SetCapture(EFalse); - // Change active list object ie. close the dd-list - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - } - else - { - if ( iContentRect.Contains(aPoint) ) - { - if ( iClickedRect.Contains(aPoint) ) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - iOwner->SetCapture(EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Send the candidate to others - if (iClickedCandidateIndex != KErrNotFound) - { - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - } - } - } - else if ( iNavigationCloseRect.Contains(aPoint) ) - { - if ( iNavigationCloseRect == iClickedRect ) - { - iOwner->SetCapture(EFalse); - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - } - else if (!iOwner->PageCtrlShown()) - { - iClickedRect = KEmptyRect; - return; - } - else if ( iNavigationNextRect.Contains(aPoint) ) - { - if ( iNavigationNextRect == iClickedRect ) - { - iOwner->NotifyGetNextPage(); - UpdateListL(); - } - } - else if ( iNavigationPreviousRect.Contains(aPoint) ) - { - if ( iNavigationPreviousRect == iClickedRect ) - { - // Change page to previous - iOwner->NotifyGetPreviousPage(); // do nothing, just to avoid clear candidate - - TInt firstIndex = 0; - TInt lastIndex = 0; - - if (iOwner->GetPages()->GetPreviousIndex(iOwner->GetLastCandidateIndex(), - firstIndex,lastIndex)) - { - iOwner->SetFirstCandidateIndex(firstIndex); - iOwner->SetLastCandidateIndex(lastIndex); - } - - UpdateListL(ETrue, EFalse); - } - } - - iClickedRect = KEmptyRect; - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithIconWithBubble::CompareRect -// Compare src and des rect -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListMultiRowWithIconWithBubble::CompareRect(const TRect& aSrcRect, const TRect& aDesRect) - { - if(aSrcRect != aDesRect) - { - DrawSelection(aDesRect, ETrue); - DrawSelection(aSrcRect, EFalse); - DrawHighightCell(aSrcRect, ETrue); - } - - return EFalse; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowwithouticon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistmultirowwithouticon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,296 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Multi rows list without icon for drop-down list objects -* -*/ - - - -// Include -#include -#include - -#include "peninputlist.h" -#include "peninputlistmultirowwithouticon.h" - - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListMultiRowWithoutIcon - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::CListMultiRowWithoutIcon -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithoutIcon::CListMultiRowWithoutIcon( CListManager* aManager, - MFepCtrlDropdownListContext *aOwner ) - :CList( aManager, aOwner ) - { - iIsMultiRows = ETrue; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithoutIcon* CListMultiRowWithoutIcon::NewL( - CListManager* aManager, - MFepCtrlDropdownListContext *aOwner ) - { - CListMultiRowWithoutIcon* self - = new (ELeave) CListMultiRowWithoutIcon( aManager, aOwner ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::~CListMultiRowWithoutIcon -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListMultiRowWithoutIcon::~CListMultiRowWithoutIcon() - { - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithoutIcon::HandlePointerDragL( const TPoint& aPoint ) - { - // Pass the event first to the base - CList::HandlePointerDragL( aPoint ); - - if ( !iClickedRect.IsEmpty() ) - { - // clicked rect is not outside the whole DDL - TInt index = -1; - - CCandidate* candidate = FindCandidate( aPoint, index ); - iMoveLatestRect = KEmptyRect; - - if ( candidate ) - { - // candidate exist - iMoveLatestRect.SetRect( candidate->GetRect().iTl, - candidate->GetRect().Size() ); - } - - // Compare the two rect, then decide draw it or not - CompareRect( iMoveLatestRect, iClickedRect ); - } - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithoutIcon::HandlePointerUpL( const TPoint& aPoint ) - { - // clicked rect is outside the whole DDL - if ( iClickedRect.IsEmpty() ) - { - iOwner->SetCapture( EFalse ); - // Change active list object ie. close the DDL - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - } - else - { - if ( ( iContentRect.Contains( aPoint ) ) - && ( iClickedRect.Contains( aPoint ) ) ) - { - // Redraw the selected aread - DrawSelection( iClickedRect, EFalse ); - - iOwner->SetCapture( EFalse ); - - // We have selected a candidate and iClickedCandidateIndex is - // the selected Index. - // Send the candidate to others - if (iClickedCandidateIndex != KErrNotFound) - { - iOwner->AutoChangeActiveList( - iOwner->GetFirstCandidateIndex() ); - CCandidate* candidate = iOwner->GetCandidate( - iClickedCandidateIndex ); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL( - candidate->GetCandidate(), - iClickedCandidateIndex ); - } - } - } - - iClickedRect = KEmptyRect; - } - - iIndicateButtonClicked = EFalse; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithoutIcon::Draw() - { - // Call draw in base class; - CList::Draw(); - - // Draw all visible candidates - DrawCandidates(); - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::CalculateAreas -// Calculate all kinds of rectangles -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithoutIcon::CalculateAreas() - { - // Calculate the rect of the list - iRect.iTl = iOwner->GetTopLeftPoint(); - TInt width = iOwner->GetCellWidth() * iOwner->GetColNum() + - iOwner->GetNaviWidth() + - (iOwner->GetColNum() + 2) * iOwner->GetCellHorizontalMargin(); - - TInt height = iOwner->GetCellHeight() * iOwner->GetRowNum() + - (iOwner->GetRowNum() + 1) * iOwner->GetCellVerticalMargin(); - - iRect.SetSize(TSize( width,height)); - - if (iOwner->CandExpandType() == CFepCtrlDropdownList::ECandExpandUpward) - { - // expand upward - TInt onerowheight = iOwner->GetCellHeight() + 2 * iOwner->GetCellVerticalMargin(); - iRect.Move(0, -(height - onerowheight)); - } - - // Calculate the rect of the content - iContentRect.iTl.SetXY(iRect.iTl.iX + iOwner->GetCellHorizontalMargin(), - iRect.iTl.iY + iOwner->GetCellVerticalMargin()); - - iContentRect.SetSize(TSize (width - 2 * iOwner->GetCellHorizontalMargin(), - height - 2 * iOwner->GetCellVerticalMargin())); - - // Initialized the rect of the navigation area and the down and up button - iNavigationRect = KEmptyRect; - iNavigationNextRect = KEmptyRect; - iNavigationPreviousRect = KEmptyRect; - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::CalculatePositionsL -// calculate the position of all visible cells in the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CListMultiRowWithoutIcon::CalculatePositionsL() - { - TInt lastCandidateIndex = iOwner->GetLastCandidateIndex(); - TInt count = iOwner->CandidateCount(); - - if ( count > 0 ) - { - TPoint setpoints; - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - candHLToR ? setpoints.SetXY(iContentRect.iTl.iX, iContentRect.iTl.iY) : - setpoints.SetXY(iContentRect.iBr.iX, iContentRect.iTl.iY); - - count = Min( count, lastCandidateIndex - + ( iOwner->GetColNum() + 1 ) * iOwner->GetRowNum() ); - - for ( TInt currentCellIndex = 0, - lastUsedCellCount = 0, - lastusedRow = 0; - lastCandidateIndex <= count; - lastCandidateIndex++ ) - { - // setting a position for this candidate - CCandidate* candidate = iOwner->GetCandidate( lastCandidateIndex ); - - if ( candidate ) - { - // each candidate exist - if ( currentCellIndex > iOwner->GetColNum() ) - { - // The cell index moved the edge of right - lastusedRow++; - if ( lastusedRow >= iOwner->GetRowNum() ) - { - // The row index moved bottom - break; - } - - currentCellIndex = 0; - - setpoints.iY = setpoints.iY + - iOwner->GetCellHeight() + - iOwner->GetCellVerticalMargin(); - - candHLToR ? (setpoints.iX = iContentRect.iTl.iX) : (setpoints.iX = iContentRect.iBr.iX); - } - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - - currentCellIndex += lastUsedCellCount; - candHLToR? (setpoints.iX += lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount*(iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())); - } // if each candidate exist - } // for-loop - } // if candidate exist - - return lastCandidateIndex; // as lastCandidateIndex - } - -// ----------------------------------------------------------------------------- -// CListMultiRowWithoutIcon::UpdateList -// update the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListMultiRowWithoutIcon::UpdateListL( TBool aDrawFlag, TBool aRecalculate ) - { - if ( aRecalculate ) - { - // Recalculate the position of all candidates - iOwner->SetLastCandidateIndex( CalculatePositionsL() ); - } - if(aDrawFlag) - { - Draw(); - iOwner->Invalidate(iRect); - } - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowrollwithicon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowrollwithicon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include - -#include "peninputlistonerowrollwithicon.h" -#include "peninputcandidate.h" -#include "peninputdropdownlist.h" -#include "peninputlayout.h" - -const TInt KInvalidCandIndex = -1; - -CListOneRowRollWithIcon* CListOneRowRollWithIcon::NewL(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) - { - CListOneRowRollWithIcon* self = new (ELeave) CListOneRowRollWithIcon(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CListOneRowRollWithIcon::~CListOneRowRollWithIcon() - { - } - -CListOneRowRollWithIcon::CListOneRowRollWithIcon(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner): - CListOneRowWithIcon(aManager, aOwner) - { - } - -// not needed anymore -// if candidate not enough to fill one row, -// just dim next button, but not hide it -/* -void CListOneRowRollWithIcon::Draw() - { - CList::Draw(); - DrawCandidates(); - - if (!iNextButtonDisable) - { - //Clear bg for iNavigationNextRect - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->DrawRect( iNavigationNextRect ); - - TRect rect = iNavigationNextRect; - rect.Shrink(1, 1); - - iOwner->Gc()->DrawBitmapMasked(rect, - iBButtonDown, - iBButtonDown->SizeInPixels(), - iBButtonMaskDown, - ETrue); - } - - iOwner->Invalidate(iRect); - } -*/ - -void CListOneRowRollWithIcon::HandlePointerDownL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDownL(aPoint); - - // If click in NextButton, and it is not disable, then do - if (iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - // If click in down button and the down button is enabled - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - } - -void CListOneRowRollWithIcon::HandlePointerUpL(const TPoint& aPoint) - { - iIndicateButtonClicked = EFalse; - - if (!iClickedRect.IsEmpty()) - { - // Find out which rectangle was clicked and save it for - // later usage (HandlePointerUpL) - if (iContentRect.Contains(aPoint)) - { - // The point is inside the content rect - // Check whether the point is inside the same last clicked - // candidate rectangle - if (iClickedRect.Contains(aPoint)) - { - if (iClickedCandidateIndex != KErrNotFound) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Then send message to plugin - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - } - } - } - else if ((iNavigationNextRect == iClickedRect) && !iNextButtonDisable) - { - TInt originalFirstCandIndex = iOwner->GetOriginalFirstCandIdx(); - - if ((iOwner->ListType() == CFepCtrlDropdownList::EListExpandableRollWithIcon) && - (originalFirstCandIndex != KInvalidCandIndex)) - { - iOwner->AutoChangeActiveList(originalFirstCandIndex); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - - iOwner->SetCapture(ETrue); - } - - iClickedRect = KEmptyRect; - } - } - -void CListOneRowRollWithIcon::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - if (iIndicateButtonClicked) // clicked rect is not outside the whole DDL - { - iMoveLatestRect = KEmptyRect; - - if (iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable) - { - // If click in down button and the down button is enabled - iMoveLatestRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - } - else if (iContentRect.Contains(aPoint)) - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - - if ( candidate ) - { - // If click in candidates area - iMoveLatestRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - } - else - { - iMoveLatestRect = KEmptyRect; - } - } - - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -void CListOneRowRollWithIcon::SetHighlightCell(const TInt aCellIndex, - TBool aHighlight, - TBool aForceDraw) - { - if (aCellIndex < iOwner->GetLastCandidateIndex()) - { - CList::SetHighlightCell(aCellIndex, aHighlight, aForceDraw); - } - else if ((iOwner->GetLastCandidateIndex() > 0) && - aHighlight) - { - TInt originalFirstCandIndex = iOwner->GetOriginalFirstCandIdx(); - - iOwner->SetUpdateListReDrawFlag(EFalse); - - if ((iOwner->ListType() == CFepCtrlDropdownList::EListExpandableRollWithIcon) && - (originalFirstCandIndex != KInvalidCandIndex)) - { - iOwner->AutoChangeActiveList(originalFirstCandIndex); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - - TRAP_IGNORE(iOwner->ActiveList()->SetNextPageHighlightCellAfterOnePageL(aCellIndex)); - - iOwner->SetUpdateListReDrawFlag(ETrue); - } - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowrollwithiconwithbubble.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowrollwithiconwithbubble.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include - -#include "peninputlistonerowrollwithiconwithbubble.h" -#include "peninputcandidate.h" -#include "peninputdropdownlist.h" -#include "peninputlayout.h" - -const TInt KInvalidCandIndex = -1; - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListOneRowRollWithIconWithBubble - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowRollWithIconWithBubble* CListOneRowRollWithIconWithBubble::NewL(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) - { - CListOneRowRollWithIconWithBubble* self = new (ELeave) CListOneRowRollWithIconWithBubble(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::~CListOneRowRollWithIconWithBubble -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowRollWithIconWithBubble::~CListOneRowRollWithIconWithBubble() - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::CListOneRowRollWithIconWithBubble -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowRollWithIconWithBubble::CListOneRowRollWithIconWithBubble(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner): - CListOneRowRollWithIcon(aManager, aOwner) - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::HandlePointerDownL -// handle pointer down function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowRollWithIconWithBubble::HandlePointerDownL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDownL(aPoint); - - // If click in NextButton, and it is not disable, then do - if (iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - - // If click in down button and the down button is enabled - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - if(candidate) - { - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowRollWithIconWithBubble::HandlePointerUpL(const TPoint& aPoint) - { - iIndicateButtonClicked = EFalse; - - if (!iClickedRect.IsEmpty()) - { - // Find out which rectangle was clicked and save it for - // later usage (HandlePointerUpL) - if (iContentRect.Contains(aPoint)) - { - // The point is inside the content rect - // Check whether the point is inside the same last clicked - // candidate rectangle - if (iClickedRect.Contains(aPoint)) - { - if (iClickedCandidateIndex != KErrNotFound) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Then send message to plugin - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - } - } - } - else if ((iNavigationNextRect == iClickedRect) && !iNextButtonDisable) - { - TInt originalFirstCandIndex = iOwner->GetOriginalFirstCandIdx(); - - if ((iOwner->ListType() == CFepCtrlDropdownList::EListExpandableRollWithIconWithBubble) && - (originalFirstCandIndex != KInvalidCandIndex)) - { - iOwner->AutoChangeActiveList(originalFirstCandIndex); - } - else - { - iOwner->AutoChangeActiveList(iOwner->GetFirstCandidateIndex()); - } - - iOwner->SetCapture(ETrue); - } - - iClickedRect = KEmptyRect; - } - iOwner->ClearBubble(); - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowRollWithIconWithBubble::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - if (iIndicateButtonClicked) // clicked rect is not outside the whole DDL - { - if ( iNavigationRect.Contains(aPoint) ) - { - iOwner->ClearBubble(); - - if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable && - iNavigationNextRect != iClickedRect ) - { - // If click in down button and the down button is enabled - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - } - } - else if (iContentRect.Contains(aPoint)) - { - CCandidate* candidate = FindCandidate(aPoint, iClickedCandidateIndex); - - if ( candidate ) - { - // If click in candidates area - if(iClickedRect != candidate->GetRect()) - { - // Reset clicked rect when move to other candidate. - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - - iOwner->ClearBubble(); - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - else - { - iOwner->ClearBubble(); - iMoveLatestRect = iClickedRect; - - iClickedRect = KEmptyRect; - } - } - else - { - CompareRect(iClickedRect, iMoveLatestRect); - iOwner->ClearBubble(); - iClickedRect = KEmptyRect; - iMoveLatestRect = iClickedRect; - } - - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::HandlePointerLeave -// handle pointer leave function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowRollWithIconWithBubble::HandlePointerLeave(const TPoint& /*aPoint*/) - { - iMoveLatestRect = iClickedRect; - iClickedRect = KEmptyRect; - DrawSelection( iMoveLatestRect, EFalse ); - DrawHighightCell(iMoveLatestRect, ETrue); - } - -// ----------------------------------------------------------------------------- -// CListOneRowRollWithIconWithBubble::CompareRect -// Compare src and des rect -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListOneRowRollWithIconWithBubble::CompareRect(const TRect& aSrcRect, const TRect& aDesRect) - { - if(aSrcRect != aDesRect) - { - DrawSelection(aDesRect, ETrue); - DrawSelection(aSrcRect, EFalse); - DrawHighightCell(aSrcRect, ETrue); - } - - return EFalse; - - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithicon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithicon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,563 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: One rows list with icon for drop-down list objects -* -*/ - - -// Include -#include -#include -#include -#include - -#include - -#include "peninputlistonerowwithicon.h" -#include "peninputcandidate.h" -#include "peninputdropdownlist.h" -#include "peninputlayout.h" - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListOneRowWithIcon - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::CListOneRowWithIcon -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithIcon::CListOneRowWithIcon(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) -: CList(aManager, aOwner) - { - iIsMultiRows = EFalse ; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithIcon* CListOneRowWithIcon::NewL(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) - { - CListOneRowWithIcon* self = new (ELeave) CListOneRowWithIcon(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::~CListOneRowWithIcon -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithIcon::~CListOneRowWithIcon() - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIcon::HandlePointerDownL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDownL(aPoint); - - // If click in navigation rect and NextButton is not disable, then do - if ( iNavigationRect.Contains(aPoint) ) - { - if ( (iOwner->GetLastCandidateIndex() < iOwner->CandidateCount()) - || ( iOwner->GetPages()->PageCount() > 1 ) ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif //RD_TACTILE_FEEDBACK - } - - if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - // If click in down button and the down button is enabled - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - // If click in up button and the up button is enabled - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - } - } - - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIcon::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - if ( iIndicateButtonClicked ) // clicked rect is not outside the whole DDL - { - iMoveLatestRect = KEmptyRect; - - if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - // If click in down button and the down button is enabled - iMoveLatestRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - // If click in up button and the up button is enabled - iMoveLatestRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - } - } - else if ( iContentRect.Contains(aPoint) ) - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - - if ( candidate ) - { - // If click in candidates area - iMoveLatestRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - } - else - { - iMoveLatestRect = KEmptyRect; - } - } - - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIcon::HandlePointerUpL(const TPoint& aPoint) - { - // Reset the button clicked flag to EFalse - iIndicateButtonClicked = EFalse; - - if ( !iClickedRect.IsEmpty() ) - { - // Find out which rectangle was clicked and save it for - // later usage (HandlePointerUpL) - if ( iContentRect.Contains(aPoint) ) - { - // The point is inside the content rect - // Check whether the point is inside the same last clicked - // candidate rectangle - if ( iClickedRect.Contains(aPoint) ) - { - if ( iClickedCandidateIndex != KErrNotFound ) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Then send message to plugin - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - } - } - } - else if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationRect == iClickedRect ) - { - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - iOwner->SetCapture(ETrue); - } - } - - iClickedRect = KEmptyRect; - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIcon::Draw() - { - CList::Draw(); - - DrawCandidates(); - - DrawSelection(iClickedRect, ETrue); - - if (iDropdownListDrawInfo.iSupportSkin) - { - //mask bitmaps - TRect rect = iNavigationNextRect; - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - // ----- draw bitmaps ----- - - - TAknsItemID expandBtnImgID; - CBitmapDb::TBitmapType bitmapType; - - if ( (iOwner->GetLastCandidateIndex() >= iOwner->CandidateCount()) - && ( iOwner->GetPages()->PageCount() < 1 ) ) - { - expandBtnImgID = iDropdownListDrawInfo.iInactiveBtnImgID; - bitmapType = CBitmapDb::EBitmapNextDisableMask; - } - else - { - expandBtnImgID = iDropdownListDrawInfo.iNormalBtnImgID; - bitmapType = CBitmapDb::EBitmapNextMask; - } - - // Draw background - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - expandBtnImgID, - KAknsIIDDefault ); - - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(bitmapType); - TRect srcRect( TPoint( 0, 0 ), iBButtonDown->SizeInPixels() ); - iOwner->Gc()->BitBltMasked( iNavigationNextRect.iTl, - iBButtonDown, - srcRect, - iBButtonMaskDown, - EFalse); - - } - else - { - //Clear bg for iNavigationNextRect - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->DrawRect( iNavigationNextRect ); - - //Draw navigation bitmap - TRect rect = iNavigationNextRect; - rect.Shrink(1, 1); - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonDown, - iBButtonDown->SizeInPixels(), iBButtonMaskDown, ETrue); - } - - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::UpdateList -// update the liset -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIcon::UpdateListL(TBool aDrawFlag, TBool aRecalculate) - { - if (aRecalculate) - { - iOwner->SetLastCandidateIndex(CalculatePositionsL()); - } - - if ( (iOwner->GetLastCandidateIndex() >= iOwner->CandidateCount()) - && ( iOwner->GetPages()->PageCount() < 1 ) ) - { - iNextButtonDisable = ETrue; - - //Set disable bitmap for button down and buttondown mask - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextDisable); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextDisableMask); - } - else - { - iNextButtonDisable = EFalse; - - //Set enable bitmap for button down and buttondown mask - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpand); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpandMask); - - if (!iBButtonDown) - { - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNext); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - } - } - if(aDrawFlag) - { - Draw(); - iOwner->Invalidate(iRect); - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::CalculateAreas -// Calculate all kinds of rectangles -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIcon::CalculateAreas() - { - // Calculate the rect of the list - iRect.iTl = iOwner->GetTopLeftPoint(); - TInt width = iOwner->GetCellWidth() * iOwner->GetColNum() + iOwner->GetNaviWidth() + - (iOwner->GetColNum() + 2) * iOwner->GetCellHorizontalMargin(); - - TInt height = iOwner->GetCellHeight() + 2 * iOwner->GetCellVerticalMargin(); - - iRect.SetSize(TSize(width, height)); - - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - TInt posX = iRect.iTl.iX + iOwner->GetCellHorizontalMargin(); - TInt posY = iRect.iTl.iY + iOwner->GetCellVerticalMargin(); - // width of content rect - TInt widthC = iOwner->GetCellWidth() * iOwner->GetColNum() + (iOwner->GetColNum() - 1) * iOwner->GetCellHorizontalMargin(); - height = iOwner->GetCellHeight(); - // width of navi rect - TInt widthN = iOwner->GetNaviWidth(); - - if (candHLToR) - { - iContentRect.iTl.SetXY(posX, posY); - iNavigationRect.iTl.SetXY(posX + widthC + iOwner->GetCellHorizontalMargin(), - posY); - } - else - { - iNavigationRect.iTl.SetXY(posX, posY); - iContentRect.iTl.SetXY(posX + widthN + iOwner->GetCellHorizontalMargin(), - posY); - } - - // Calculate the rect of the content - iContentRect.SetSize(TSize(widthC, height)); - - // Calculate the rect of the navigation area - iNavigationRect.SetSize(TSize(widthN, height)); - // Calculate the rect of the down button - iNavigationNextRect = iNavigationRect; - // Calculate the rect of the up button - iNavigationPreviousRect = TRect(0,0,0,0); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::CalculatePositionsL -// calculate the position of all visible cells in the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CListOneRowWithIcon::CalculatePositionsL() - { - TInt t = 0; - TPoint setpoints; - - //RArray& candidates = iOwner->GetCandidatelist; - TInt count = iOwner->CandidateCount(); - - iOwner->SetFirstCandidateIndex(iOwner->GetLastCandidateIndex()); - - if ( count > 0 ) - { - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - candHLToR ? setpoints.SetXY(iContentRect.iTl.iX, iContentRect.iTl.iY) : - setpoints.SetXY(iContentRect.iBr.iX, iContentRect.iTl.iY); - - TInt lastUsedCellCount = 0; - TInt currentCellIndex = 0; - count = Min(count,iOwner->GetLastCandidateIndex() + iOwner->GetColNum()); - - for(t = iOwner->GetLastCandidateIndex(); t < count ; t++) - { - // setting a position for this candidate - CCandidate* candidate = iOwner->GetCandidate(t); - - if ( !candidate ) - { - continue; - } - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - currentCellIndex += lastUsedCellCount; - - if (currentCellIndex > iOwner->GetColNum()) - { - break; - } - - candHLToR ? (setpoints.iX += lastUsedCellCount * (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) : - (setpoints.iX -= lastUsedCellCount * (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin())) ; - } // for-loop - } // if candidate exist - - return t; // as lastCandidateIndex - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIcon::DrawNavigationPress -// draw navigation button when pressed or un-pressed -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListOneRowWithIcon::DrawNavigationPress(const TRect& aRect,TBool aIndicate) - { - TBool retval = EFalse; - - if ( aRect == iNavigationNextRect ) - { - retval = ETrue; - if (iDropdownListDrawInfo.iSupportSkin) - { - TRect rect = iNavigationNextRect; - TRect innerRect = rect; - innerRect.Shrink( 4, 4 ); - - - TAknsItemID expandBtnImgID; - if ( aIndicate ) - { - expandBtnImgID = iDropdownListDrawInfo.iPressedBtnImgID; - } - else - { - expandBtnImgID = iDropdownListDrawInfo.iNormalBtnImgID; - } - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *iOwner->Gc(), - rect, - innerRect, - expandBtnImgID, - KAknsIIDDefault ); - - - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpand); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpandMask); - - if (!iBButtonDown) - { - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNext); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - } - - TRect srcRect( TPoint( 0, 0 ), iBButtonDown->SizeInPixels() ); - - iOwner->Gc()->BitBltMasked( iNavigationNextRect.iTl, - iBButtonDown, - srcRect, - iBButtonMaskDown, - EFalse); - } - else - { - if ( aIndicate ) - { - // NEXT PRESSED DOWN - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpandPress); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapExpandPressMask); - - if (!iBButtonDown) - { - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextPress); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap( - CBitmapDb::EBitmapNextPressMask); - } - } - else - { - // NEXT ORIGINAL - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpand); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapExpandMask); - - if (!iBButtonDown) - { - iBButtonDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNext); - iBButtonMaskDown = iOwner->GetBitmapDb()->GetBitMap(CBitmapDb::EBitmapNextMask); - } - } - - // Begin draw navigation next button - iOwner->DrawMask(iNavigationNextRect); - - // Activeate bitmap context - iOwner->ActivateBitmapContext(); - - // Clear rect - iOwner->Gc()->SetPenSize(iOwner->GetPenSize()); - iOwner->Gc()->SetPenStyle(CGraphicsContext::ESolidPen); - iOwner->Gc()->SetPenColor(iOwner->GetBorderColor()); - iOwner->Gc()->SetBrushColor(iOwner->GetBgColor()); - iOwner->Gc()->SetBrushStyle( CGraphicsContext::ESolidBrush ); - iOwner->Gc()->DrawRect( iNavigationNextRect ); - - // Draw bitmap - TRect rect = iNavigationNextRect; - rect.Shrink(TSize(1,1)); - - if (iOwner->GetCellHorizontalMargin() != 0) - { - rect.iBr.iX = rect.iBr.iX + 1; - } - - if (iOwner->GetCellVerticalMargin() != 0) - { - rect.iBr.iY = rect.iBr.iY + 1; - } - - iOwner->Gc()->DrawBitmapMasked(rect, iBButtonDown, - iBButtonDown->SizeInPixels(), iBButtonMaskDown, ETrue); - } - - iOwner->Invalidate(aRect); - } - - - return retval; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithiconwithbubble.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithiconwithbubble.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,276 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// Include -#include -#include -#include -#include - -#include - -#include "peninputlistonerowwithiconwithbubble.h" -#include "peninputcandidate.h" -#include "peninputdropdownlist.h" -#include "peninputlayout.h" - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListOneRowWithIconWithBubble - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::CListOneRowWithIconWithBubble -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithIconWithBubble::CListOneRowWithIconWithBubble(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) -: CListOneRowWithIcon(aManager, aOwner) - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithIconWithBubble* CListOneRowWithIconWithBubble::NewL(CListManager* aManager, - MFepCtrlDropdownListContext *aOwner) - { - CListOneRowWithIconWithBubble* self = new (ELeave) CListOneRowWithIconWithBubble(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::~CListOneRowWithIconWithBubble -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithIconWithBubble::~CListOneRowWithIconWithBubble() - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIconWithBubble::HandlePointerDownL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDownL(aPoint); - - // If click in navigation rect and NextButton is not disable, then do - if ( iNavigationRect.Contains(aPoint) ) - { - if ( (iOwner->GetLastCandidateIndex() < iOwner->CandidateCount()) - || ( iOwner->GetPages()->PageCount() > 1 ) ) - { - #ifdef RD_TACTILE_FEEDBACK - static_cast(iOwner)->UiLayout()-> - DoTactileFeedback(ETouchFeedbackBasic); - #endif - } - - if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable ) - { - // If click in down button and the down button is enabled - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable ) - { - // If click in up button and the up button is enabled - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - iIndicateButtonClicked = ETrue; - DrawSelection(iClickedRect, ETrue); - } - } - else - { - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - if(candidate) - { - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIconWithBubble::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - if ( iIndicateButtonClicked ) // clicked rect is not outside the whole DDL - { - if ( iNavigationRect.Contains(aPoint) ) - { - iOwner->ClearBubble(); - - if ( iNavigationNextRect.Contains(aPoint) && !iNextButtonDisable && - iNavigationNextRect != iClickedRect ) - { - // If click in down button and the down button is enabled - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationNextRect.iTl, iNavigationNextRect.iBr); - } - else if ( iNavigationPreviousRect.Contains(aPoint) && !iPreviousButtonDisable && - iNavigationPreviousRect != iClickedRect ) - { - // If click in up button and the up button is enabled - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(iNavigationPreviousRect.iTl, iNavigationPreviousRect.iBr); - } - } - else if ( iContentRect.Contains(aPoint) ) - { - CCandidate* candidate = FindCandidate(aPoint, iClickedCandidateIndex); - - if ( candidate ) - { - // If click in candidates area - if(iClickedRect != candidate->GetRect()) - { - // Reset clicked rect when move to other candidate. - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - - iOwner->ClearBubble(); - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - else - { - iOwner->ClearBubble(); - iMoveLatestRect = iClickedRect; - - iClickedRect = KEmptyRect; - } - } - else - { - CompareRect(iClickedRect, iMoveLatestRect); - iOwner->ClearBubble(); - iClickedRect = KEmptyRect; - iMoveLatestRect = iClickedRect; - } - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIconWithBubble::HandlePointerUpL(const TPoint& aPoint) - { - // Reset the button clicked flag to EFalse - iIndicateButtonClicked = EFalse; - - if ( !iClickedRect.IsEmpty() ) - { - // Find out which rectangle was clicked and save it for - // later usage (HandlePointerUpL) - if ( iContentRect.Contains(aPoint) ) - { - // The point is inside the content rect - // Check whether the point is inside the same last clicked - // candidate rectangle - - if ( iClickedRect.Contains(aPoint) ) - { - if ( iClickedCandidateIndex != KErrNotFound ) - { - // Redraw the selected aread - DrawSelection(iClickedRect, EFalse); - - // We have selected a candidate and iClickedCandidateIndex is the selected Index. - // Then send message to plugin - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - } - } - } - else if ( iNavigationRect.Contains(aPoint) ) - { - if ( iNavigationRect == iClickedRect ) - { - iOwner->AutoChangeActiveList( iOwner->GetFirstCandidateIndex() ); - iOwner->SetCapture(ETrue); - } - } - - iClickedRect = KEmptyRect; - } - iOwner->ClearBubble(); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::HandlePointerLeave -// handle pointer leave function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithIconWithBubble::HandlePointerLeave(const TPoint& /*aPoint*/) - { - iMoveLatestRect = iClickedRect; - iClickedRect = KEmptyRect; - DrawSelection( iMoveLatestRect, EFalse ); - DrawHighightCell(iMoveLatestRect, ETrue); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithIconWithBubble::CompareRect -// Compare src and des rect -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListOneRowWithIconWithBubble::CompareRect(const TRect& aSrcRect, const TRect& aDesRect) - { - if(aSrcRect != aDesRect) - { - DrawSelection(aDesRect, ETrue); - DrawSelection(aSrcRect, EFalse); - DrawHighightCell(aSrcRect, ETrue); - } - - return EFalse; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithouticon.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithouticon.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,284 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: One rows list with icon for drop-down list objects -* -*/ - - -// Include -#include "peninputlistonerowwithouticon.h" -#include "peninputcandidate.h" - -#include -#include - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListOneRowWithoutIcon - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::CListOneRowWithoutIcon -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithoutIcon::CListOneRowWithoutIcon(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) -:CList(aManager, aOwner) - { - iIsMultiRows = EFalse; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithoutIcon* CListOneRowWithoutIcon::NewL(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) - { - CListOneRowWithoutIcon* self = new (ELeave) CListOneRowWithoutIcon(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::~CListOneRowWithoutIcon -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithoutIcon::~CListOneRowWithoutIcon() - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIcon::HandlePointerDownL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDownL(aPoint); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIcon::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - // If the mouse have click in the area of DDL - if ( iIndicateButtonClicked ) - { - TInt index = -1; - - CCandidate* candidate = FindCandidate(aPoint, index); - iMoveLatestRect = KEmptyRect; - - if ( candidate ) - { - iMoveLatestRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - } - - // Compare the two rect, then decide draw it or not - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIcon::HandlePointerUpL(const TPoint& aPoint) - { - if ( !iClickedRect.IsEmpty() ) - { - // Find out which rectangle was clicked and save it for - // later usage (HandlePointerUpL) - if ( iContentRect.Contains( aPoint ) ) - { - if ( iClickedRect.Contains( aPoint ) ) - { - if ( iClickedCandidateIndex != KErrNotFound ) - { - // Redraw the selection rect - DrawSelection( iClickedRect, EFalse ); - - // We have selected a candidate - // Send message to plugin - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - - } - } - - iIndicateButtonClicked = EFalse; - } - - iClickedRect = KEmptyRect; - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::Draw -// draw the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIcon::Draw() - { - CList::Draw(); - - // Draw all visible candidates - DrawCandidates(); - DrawSelection(iClickedRect, ETrue); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::CalculateAreas -// Calculate all kinds of rectangles -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIcon::CalculateAreas() - { - // Calculate the rect of the list - iRect.iTl = iOwner->GetTopLeftPoint(); - TInt width = iOwner->GetCellWidth() * iOwner->GetColNum() + iOwner->GetNaviWidth() + - (iOwner->GetColNum() + 2) * iOwner->GetCellHorizontalMargin(); - TInt height = iOwner->GetCellHeight() + 2 * iOwner->GetCellVerticalMargin(); - - iRect.SetSize(TSize(width,height)); - - // Calculate the rect of the content - iContentRect.iTl = TPoint(iRect.iTl.iX + iOwner->GetCellHorizontalMargin(), - iRect.iTl.iY + iOwner->GetCellVerticalMargin()); - iContentRect.SetSize(TSize(width - 2 * iOwner->GetCellHorizontalMargin(), - iOwner->GetCellHeight())); - - // Calculate the rect of the navigation area - iNavigationRect = TRect(0,0,0,0); - - // Calculate the rect of the down button - iNavigationNextRect = TRect(0,0,0,0); - - // Calculate the rect of the up button - iNavigationPreviousRect = TRect(0,0,0,0); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::CalculatePositionsL -// calculate the position of all visible cells in the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CListOneRowWithoutIcon::CalculatePositionsL() - { - TInt t = 0; - TPoint setpoints; - - const TInt count = iOwner->CandidateCount(); - - // First store the last index - iOwner->SetFirstCandidateIndex ( iOwner->GetLastCandidateIndex() ); - - if ( count > 0 ) - { - // Initial the position to iContentRect - /* - setpoints.iX = iContentRect.iTl.iX; - setpoints.iY = iContentRect.iTl.iY; - */ - TBool candHLToR = (iOwner->CandHDirection() == CFepCtrlDropdownList::ECandFromLToR); - candHLToR ? setpoints.SetXY(iContentRect.iTl.iX, iContentRect.iTl.iY) : - setpoints.SetXY(iContentRect.iBr.iX, iContentRect.iTl.iY); - - TInt cellNumberInOneRow = iOwner->GetColNum() + 1; - TInt lastUsedCellCount = 0; - TInt currentCellIndex = 0; - TInt newCount = 0; - - newCount = Min(count,iOwner->GetLastCandidateIndex() + cellNumberInOneRow); - - for( t = iOwner->GetLastCandidateIndex(); t < newCount ; t++ ) - { - // setting a position for this candidate - CCandidate* candidate = iOwner->GetCandidate(t); - - if ( !candidate ) - { - continue; - } - - lastUsedCellCount = candidate->SetPositionL(setpoints, - iOwner->GetCellWidth(), - iOwner->GetCellHeight(), - iOwner->GetFont(), - iOwner->GetCellHorizontalMargin()); - currentCellIndex += lastUsedCellCount; - - if ( currentCellIndex > ( iOwner->GetColNum() + 1 ) ) - { - // If no space to contain other cells - break; - } - - // Recalcuate the x position - candHLToR? (setpoints.iX += (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin()) * lastUsedCellCount) : - (setpoints.iX -= (iOwner->GetCellWidth() + iOwner->GetCellHorizontalMargin()) * lastUsedCellCount); - } // for-loop - } // if candidate exist - - return t; // as lastCandidateIndex - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIcon::UpdateList -// update the list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIcon::UpdateListL(TBool aDrawFlag, TBool aRecalculate) - { - if ( aRecalculate ) - { - // Recalculate the position of all candidates - iOwner->SetLastCandidateIndex(CalculatePositionsL()); - } - if(aDrawFlag) - { - Draw(); - iOwner->Invalidate(iRect); - } - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithouticonwithbubble.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputlistonerowwithouticonwithbubble.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,199 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -// Include -#include "peninputlistonerowwithouticonwithbubble.h" -#include "peninputcandidate.h" - -#include -#include - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CListOneRowWithoutIconWithBubble - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::CListOneRowWithoutIconWithBubble -// C++ default constructor can NOT contain any code, that -// might leave -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithoutIconWithBubble::CListOneRowWithoutIconWithBubble(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) -:CListOneRowWithoutIcon(aManager, aOwner) - { - iIsMultiRows = EFalse; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithoutIconWithBubble* CListOneRowWithoutIconWithBubble::NewL(CListManager* aManager, - MFepCtrlDropdownListContext* aOwner) - { - CListOneRowWithoutIconWithBubble* self = new (ELeave) CListOneRowWithoutIconWithBubble(aManager, aOwner); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::~CListOneRowWithoutIconWithBubble -// desstrutor function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CListOneRowWithoutIconWithBubble::~CListOneRowWithoutIconWithBubble() - { - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::HandlePointerDownL -// handle pointer down -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIconWithBubble::HandlePointerDownL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDownL(aPoint); - - TInt index = -1; - CCandidate* candidate = FindCandidate(aPoint, index); - if(candidate) - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::HandlePointerDragL -// handle pointer drag function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIconWithBubble::HandlePointerDragL(const TPoint& aPoint) - { - // Pass the event first to the base - CList::HandlePointerDragL(aPoint); - - // If the mouse have click in the area of DDL - if ( iIndicateButtonClicked ) - { - CCandidate* candidate = FindCandidate(aPoint, iClickedCandidateIndex); - - if ( candidate ) - { - if(iClickedRect != candidate->GetRect()) - { - iMoveLatestRect = iClickedRect; - iClickedRect.SetRect(candidate->GetRect().iTl, candidate->GetRect().Size()); - iOwner->ClearBubble(); - iOwner->DrawBubble(iClickedRect, candidate->GetCandidate()); - } - } - else - { - iOwner->ClearBubble(); - - iMoveLatestRect = iClickedRect; - iClickedRect = KEmptyRect; - } - - // Compare the two rect, then decide draw it or not - CompareRect(iMoveLatestRect, iClickedRect); - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::HandlePointerUpL -// handle pointer up function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIconWithBubble::HandlePointerUpL(const TPoint& aPoint) - { - if ( !iClickedRect.IsEmpty() ) - { - iOwner->ClearBubble(); - // Find out which rectangle was clicked and save it for - // later usage (HandlePointerUpL) - if ( iContentRect.Contains( aPoint ) ) - { - if ( iClickedRect.Contains( aPoint ) ) - { - if ( iClickedCandidateIndex != KErrNotFound ) - { - // Redraw the selection rect - DrawSelection( iClickedRect, EFalse ); - - // We have selected a candidate - // Send message to plugin - CCandidate* candidate = iOwner->GetCandidate(iClickedCandidateIndex); - if ( candidate ) - { - iOwner->ReportCandidateSelectEventL(candidate->GetCandidate(), - iClickedCandidateIndex); - } - - } - } - - iIndicateButtonClicked = EFalse; - } - - iClickedRect = KEmptyRect; - } - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::HandlePointerLeave -// handle pointer leave function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CListOneRowWithoutIconWithBubble::HandlePointerLeave(const TPoint& /*aPoint*/) - { - iMoveLatestRect = iClickedRect; - iClickedRect = KEmptyRect; - DrawSelection( iMoveLatestRect, EFalse ); - DrawHighightCell(iMoveLatestRect, ETrue); - } - -// ----------------------------------------------------------------------------- -// CListOneRowWithoutIconWithBubble::CompareRect -// Compare src and des rect -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CListOneRowWithoutIconWithBubble::CompareRect(const TRect& aSrcRect, const TRect& aDesRect) - { - if(aSrcRect != aDesRect) - { - DrawSelection(aDesRect, ETrue); - DrawSelection(aSrcRect, EFalse); - DrawHighightCell(aSrcRect, ETrue); - } - - return EFalse; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputdropdownlist/peninputpages.cpp --- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputpages.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: page manager,which is used by drop down list -* -*/ - - -#include "peninputpages.h" - -// ======== MEMBER FUNCTIONS ======== - -// Implementation of Class CPages - -// ----------------------------------------------------------------------------- -// CPages::NewL -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CPages* CPages::NewL() - { - CPages* self = new (ELeave) CPages(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CPages::~CPages -// factory function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -CPages::~CPages() - { - iFirstIndexList.Close(); - iLastIndexList.Close(); - } - -// ----------------------------------------------------------------------------- -// CPages::NewL -// 2nd construct function -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CPages::ConstructL() - { - Reset(); - } - -// ----------------------------------------------------------------------------- -// CPages::Reset -// reset page in the page list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CPages::Reset() - { - iFirstIndexList.Reset(); - iLastIndexList.Reset(); - } - -// ----------------------------------------------------------------------------- -// CPages::PageCount -// get page count -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CPages::PageCount() const - { - return iLastIndexList.Count(); - } - -// ----------------------------------------------------------------------------- -// CPages::AddPage -// add one page into the page list -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CPages::AddPage(const TInt aFirstIndex, const TInt aLastIndex) - { - if ( aFirstIndex == aLastIndex ) - { - return; - } - - const TInt index = iLastIndexList.Find(aLastIndex); - - if ( index == KErrNotFound) - { - iLastIndexList.Append(aLastIndex); - iFirstIndexList.Append(aFirstIndex); - } - } - -// ----------------------------------------------------------------------------- -// CPages::GetPreviousIndex -// get the previous page -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CPages::GetPreviousIndex(const TInt aLastIndex, - TInt& aFirstIndexOfPrevious, - TInt& aLastIndexOfPrevious) const - { - const TInt index = iLastIndexList.Find( aLastIndex ); - - if ( index != KErrNotFound ) // If found it - { - if ( index > 0 ) // If not the first page - { - aFirstIndexOfPrevious = iFirstIndexList[index-1]; - aLastIndexOfPrevious = iLastIndexList[index-1]; - } - else // If is the first page - { - aFirstIndexOfPrevious = iFirstIndexList[0]; - aLastIndexOfPrevious = iLastIndexList[0]; - } - return ETrue; - } - else - { - return EFalse; - } - } - -// ----------------------------------------------------------------------------- -// CPages::GetPageIndexByPos -// get the page of assigned position -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CPages::GetPageIndexByPos(const TInt aPos, - TInt& aFirstIndex, - TInt& aLastIndex) const - { - if ( ( aPos < 0 ) || ( aPos >= iLastIndexList.Count() ) ) - { - return EFalse; - } - - aLastIndex = iLastIndexList[aPos]; - aFirstIndex = iFirstIndexList[aPos]; - - return ETrue; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputlabel/peninputlabel.cpp --- a/textinput/peninputcommonctrls/src/peninputlabel/peninputlabel.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,312 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation for button base and dragbar -* -*/ - - -#include - -#include "peninputlabel.h" -#include "peninputlayout.h" - - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::NewL -// factory function -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlLabel* CAknFepCtrlLabel::NewL(CFepUiLayout* aUiLayout, TInt aCtrlId) - { - CAknFepCtrlLabel* lable=new (ELeave) CAknFepCtrlLabel(aUiLayout,aCtrlId); - - CleanupStack::PushL(lable); - lable->BaseConstructL(); - CleanupStack::Pop(lable); - - return lable; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::CAknFepCtrlLabel -// C++ default constructor -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -CAknFepCtrlLabel::CAknFepCtrlLabel(CFepUiLayout* aUiLayout, TInt aCtrlId) - :CFepUiBaseCtrl(TRect(0,0,0,0),aUiLayout,aCtrlId), - iBaseline(-1), - iFontColor(KRgbWhite), - iAlignment(CGraphicsContext::ECenter) - { - SetControlType(EUserCtrlBase | ECtrlBaseCtrl); - -#ifdef __ALPHA_TRANCEPARENCY__ - const TRgb KDefaultButtonBackCol = TRgb(30,30,30); -#else - const TRgb KDefaultButtonBackCol = TRgb(230,230,230); -#endif - - SetBkColor(KDefaultButtonBackCol); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::~CAknFepCtrlLabel -// Destructor -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlLabel::~CAknFepCtrlLabel() - { - delete iText; - - //font - if(iFontOwnership && iFont) - { - BitmapDevice()->ReleaseFont(iFont); - iFont = NULL; - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::Draw -// Draw the control -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::Draw() - { - if(!AbleToDraw()) - return; - - TRect rect = Rect(); - CFbsBitGc* gc = static_cast(BitGc()); - gc->Activate(MaskBitmapDevice()); - - //clear the rect - gc->SetBrushStyle( CGraphicsContext::ESolidBrush ); - gc->SetBrushColor(TRgb(KOpaqueColor));//non transparency - gc->SetPenStyle(CGraphicsContext::ENullPen); - gc->DrawRect(rect); - - gc->Activate(BitmapDevice()); - - if (BackgroundBmp()) - { - if (BkMaskBmp()) - { - gc->DrawBitmapMasked(rect, BackgroundBmp(), BackgroundBmp()->SizeInPixels(), - BkMaskBmp(), ETrue); - } - else - { - gc->DrawBitmap(rect, BackgroundBmp(), BackgroundBmp()->SizeInPixels()); - } - } - - //draw caption if there is - if(iText && iFont) - { - CFbsBitGc* gc = static_cast(BitGc()); - - //use font - gc->UseFont(iFont); - gc->SetBrushStyle(CGraphicsContext::ENullBrush); - gc->SetPenStyle(CGraphicsContext::ESolidPen); - - TRect rect(iRect); - - //draw text shadow first - rect.Move(1,1); - - TInt baseLine = iFont->AscentInPixels()/2 + iRect.Height()/2; - gc->SetPenColor(iFontColor); - gc->DrawText(*iText, iRect, baseLine, iAlignment); - - gc->DiscardFont(); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::SetBitmapL -// Set bitmap for given status -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetBitmapL(CFbsBitmap* aBitmap) - { - if(!aBitmap) - { - return; - } - - SetBackgroundBitmapL(aBitmap); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::SetMaskBitmapL -// Set mask bitmap for given status -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetMaskBitmapL(CFbsBitmap* aBmp) - { - if(!aBmp) - { - return; - } - - SetBackgroundMaskBitmapL(aBmp); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::SetFont -// Set caption font -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetFont(const TFontSpec& aFontSpec) - { - iFontSpec = aFontSpec; - //release old font - if(iFontOwnership && iFont) - { - BitmapDevice()->ReleaseFont(iFont); - iFont = NULL; - } - - iFontOwnership = ETrue; - if(BitmapDevice()) - { - if (KErrNone != BitmapDevice()->GetNearestFontInPixels(iFont,iFontSpec)) - iFont = NULL; - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::SetFont -// Set caption font -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetFont(const CFont* aFont) - { - if(iFontOwnership && iFont) - { - BitmapDevice()->ReleaseFont(iFont); - } - - iFontOwnership = EFalse; - iFont = const_cast(aFont); - - if(iFont) - { - iFontSpec = iFont->FontSpecInTwips(); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetFontColor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetFontColor(const TRgb aColor) - { - iFontColor = aColor; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlEventButton::SetText -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetText(const TDesC& aText) - { - - delete iText; - iText = NULL; - - TRAP_IGNORE( iText = aText.AllocL()); - - Draw(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::SizeChanged -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SizeChanged(TRect aNewRect, TBool aIsReloadImages) - { - if (aNewRect.Size().iWidth == 0 || aNewRect.Size().iHeight == 0) - { - return; - } - - SetRect(aNewRect); - - if (aIsReloadImages) - { - ResizeBitmaps(aNewRect.Size()); - } - - Draw(); - UpdateArea(Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::ResizeBitmaps -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlLabel::ResizeBitmaps(TSize aSize) - { - if (BkMaskBmp() && - BkMaskBmp()->SizeInPixels() != aSize) - { - AknIconUtils::SetSize(BkMaskBmp(), aSize, EAspectRatioNotPreserved); - } - - if (BackgroundBmp() && - BackgroundBmp()->SizeInPixels() != aSize) - { - AknIconUtils::SetSize(BackgroundBmp(), aSize, EAspectRatioNotPreserved); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::SetTextAlignment -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlLabel::SetTextAlignment(CGraphicsContext::TTextAlign aAlignment) - { - iAlignment = aAlignment; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlLabel::TextAlignment -// This methods shall be called by the container's SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CGraphicsContext::TTextAlign CAknFepCtrlLabel::TextAlignment() - { - return iAlignment; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputrangebar/peninputrangebar.cpp --- a/textinput/peninputcommonctrls/src/peninputrangebar/peninputrangebar.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1349 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of range bar -* -*/ - - -// system includes -//#include -#include -#include -#include -#include -#include - -// user includes -#include -#include -#include -#include -#include -#include - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::CAknFepCtrlRangeBar -// C++ constructor -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRangeBar::CAknFepCtrlRangeBar(CFepUiLayout* aUiLayout, TInt aControlId, - TButtonGroupStyle aStyle) -: CControlGroup(aUiLayout, aControlId, EFalse), iFirstTimeConstruct(ETrue) - { - iStyle = aStyle; - //iActionStyle = ERangeBarActionStyleHide; - iActionStyle = ERangeBarUsingIndicatorStyle; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::~CAknFepCtrlRangeBar -// C++ destructor -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRangeBar::~CAknFepCtrlRangeBar() - { - iIndicators.ResetAndDestroy(); - iIndicators.Close(); - iCellRects.Close(); - iCellInnerRects.Close(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::NewL -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRangeBar* CAknFepCtrlRangeBar::NewL(CFepUiLayout* aUiLayout, TInt aControlId, - TButtonGroupStyle aStyle) - { - CAknFepCtrlRangeBar* self = new (ELeave) CAknFepCtrlRangeBar (aUiLayout, aControlId, aStyle); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::NewLC -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlRangeBar* CAknFepCtrlRangeBar::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TButtonGroupStyle aStyle) - { - CAknFepCtrlRangeBar* self = new (ELeave) CAknFepCtrlRangeBar (aUiLayout, aControlId, aStyle); - CleanupStack::PushL(self); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ConstructL -// Construct the instance -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::ConstructL() - { - // Construct the base control first - CControlGroup::ConstructL(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::HandlePointerDownEventL -// Implement the pointer down handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -CFepUiBaseCtrl* CAknFepCtrlRangeBar::HandlePointerDownEventL(const TPoint& aPoint) - { - CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerDownEventL( aPoint ); - return ctrl; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SizeChanged -// Implement the SizeChanged handler -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SizeChanged(const TRect aRect) - { - SetCellRect(aRect); - - if( iCellChanged ) - { - SetRect(aRect); - - iActionStyle == ERangeBarUsingIndicatorStyle ? - UpdateIndicatorRectForUsingIndicatorStyle(EFalse) : - UpdateIndicatorRect(EFalse); - } - else - { - iIsReloadImages = ETrue; - SetWholeRect(); - //Draw(); - SetIndicatorRect(); - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ConstructFromResourceL -// Construct the range bar from the resource -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::ConstructFromResourceL(TResourceReader& aReader) - { - //destroy all previous range buttons - - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - CAknFepCtrlCommonButton* button = iIndicators[ ii ]->iIndicator; - if (button) - { - RemoveControl(button); - } - } - - iIndicators.ResetAndDestroy(); - - const TInt countRanges = aReader.ReadInt16(); - - if (countRanges <= 0) - { - User::Leave(KErrArgument); - } - - // Create range indicator buttons - for (TInt ii = 0; ii < countRanges; ++ii) - { - AddRangeL(aReader); - } - - const TInt defaultRangeIndex = aReader.ReadInt16(); - - if (defaultRangeIndex >= 0 && defaultRangeIndex < iIndicators.Count()) - { - SetRange(iIndicators[defaultRangeIndex]->iInputRange); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetIndicatorRect() -// Re-calculate the position and layout -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlRangeBar::SetIndicatorRect() - { - TRect rect(iIndicatorRect); - TInt count = iIndicators.Count(); - TInt lastPos = -1; - - for (TInt ii = 0; ii < count; ++ii) - { - if ( ii != 0 && - (iActionStyle != ERangeBarUsingIndicatorStyle || - lastPos != iIndicators[ii]->iPosIdx ) ) - { - if (iStyle == EBtnGroupVertical) - { - rect.Move(0, iIndicatorRect.Height()); - } - else - { - rect.Move(iIndicatorRect.Width(), 0); - } - } - lastPos = iIndicators[ii]->iPosIdx; - - TRect innerRect; - AknPenImageUtils::CalculateGraphicRect( rect, innerRect ); - - if (iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) - { - static_cast(iIndicators[ii]->iIndicator)-> - SizeChanged(rect, innerRect, iIsReloadImages); - } - else - { - static_cast(iIndicators[ii]->iIndicator)-> - SizeChanged(rect, innerRect, iIsReloadImages); - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::Draw() -// Re-calculate the position and layout -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::Draw() - { - if(!AbleToDraw()) - return; - - CControlGroup::Draw(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::RefreshUI -// Refresh the component -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::RefreshUI() - { - // this function not called anymore - SetIndicatorRect(); - - // Flush the gc memory to the LCD device - UpdateArea(iEraseRect, EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::HandleControlEvent -// responding on button up event -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, - const TDesC& /*aEventData*/) - { - if (aEventType == EEventButtonUp) - { - // get aCtrl's index - TBool ctrlExist = EFalse; - TInt ctrlIndex = 0; - - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if ((iIndicators[ii]->iIndicator == aCtrl) - && (!(iIndicators[ii]->iIndicator->IsDimmed()))) - { - ctrlExist = ETrue; - ctrlIndex = ii; - break; - } - } - - if (!ctrlExist) - { - return; - } - - TBool needSendEvent = EFalse; - - // aCtrl's index is ctrlIndex - if ( (ActiveControl() != aCtrl) - || (iIndicators[ctrlIndex]->iCtrlType == EButtonTypePopupMode) ) - { - needSendEvent = ETrue; - } - else // press active button again - { - // only meaningful when it is multimode button - if (iIndicators[ctrlIndex]->iCtrlType == EButtonTypeMultiMode) - { - CAknFepCtrlMultiModeButton* button = static_cast(iIndicators[ctrlIndex]->iIndicator); - - // change range: user press mixed range multimode button, and range is changed - if (iIndicators[ctrlIndex]->iRangeType == ERangeTypeMixed) - { - if ((button->NextMode() != KErrNotFound) && - (button->RangeOfGivenMode(button->CurrentMode()) != - button->RangeOfGivenMode(button->NextMode()))) - { - // change range - ReportEventToObserver(iEventIdForRange, - button->RangeOfGivenMode(button->NextMode())); - } - else if (button->RangeOfGivenMode(button->CurrentMode()) == - button->RangeOfGivenMode(button->NextMode())) - { - // mixed range multimode button: change case - ReportEventToObserver(iEventIdForCase, button->NextMode()); - } - } - else - { - // single range multimode button: change case - ReportEventToObserver(iEventIdForCase, button->NextMode()); - } - } - else - { - if ( iIndicators[ctrlIndex]->iInputRange != iInputRange ) - { - needSendEvent = ETrue; - } - } - } - - if ( needSendEvent ) - { - // press another button instead of active button, it will send range event - if ((iIndicators[ctrlIndex]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[ctrlIndex]->iRangeType == ERangeTypeMixed)) - { - CAknFepCtrlMultiModeButton* button = - static_cast(aCtrl); - - if ((button) && - (button->IsGivenRangeSupported( - button->RangeOfGivenMode(button->CurrentMode())))) - { - ReportEventToObserver(iEventIdForRange, - button->RangeOfGivenMode(button->CurrentMode())); - } - } - else - { - // for single range multimode button and normal button - ReportEventToObserver(iEventIdForRange, iIndicators[ctrlIndex]->iInputRange); - } - } - - // make sure the normal button press effect for : - // using indicator style, and EIndicatorActionStyleNormal - if (iActionStyle == ERangeBarUsingIndicatorStyle && - iIndicators[ctrlIndex]->iActionStyle == EIndicatorActionStyleNormal && - iIndicators[ctrlIndex]->iIndicator->IsActive()) - { - iIndicators[ctrlIndex]->iIndicator->SetHighlight(EFalse); - } - - if ( iActionStyle == ERangeBarUsingIndicatorStyle && - iIndicators[ctrlIndex]->iActionStyle != EIndicatorActionStyleHighLight ) - { - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if(iIndicators[ ii ]->iActionStyle == EIndicatorActionStyleHighLight - && ii != ctrlIndex) - { - iIndicators[ ii ]->iIndicator->SetHighlight( - iIndicators[ ii ]->iIndicator->IsActive() ); - } - } - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetRange -// set current input range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CAknFepCtrlRangeBar::SetRange(const TInt aRange) - { - // if set range in a mixed range multimode button, - // should use detailed range, but not mixed range - TBool ret = EFalse; - - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - CAknFepCtrlCommonButton* button = iIndicators[ ii ]->iIndicator; - - if ((button) && (!(button->IsDimmed()))) - { - if ((iIndicators[ii]->iInputRange == aRange) || - ((iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[ii]->iRangeType == ERangeTypeMixed) && - (static_cast(button)->IsGivenRangeSupported(aRange)))) - { - // 1st condition: normal button or single range multimode button - // 2nd condition: mixed range multimode button - if (!(iIndicators[ii]->iInputRange == aRange)) - { - // mixed range multimode button - static_cast(button)->SetRange(aRange); - } - - iInputRange = aRange; - - SetActiveCtrl(button); - - ret = ETrue; - } - else - { - button->SetActive(EFalse); - } - } - } - - if ( iActionStyle == ERangeBarActionStyleHighLight ) - { - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - iIndicators[ ii ]->iIndicator->SetHighlight( iIndicators[ ii ]->iIndicator->IsActive() ); - } - } - else - { - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if(iIndicators[ ii ]->iActionStyle == EIndicatorActionStyleHighLight) - { - iIndicators[ ii ]->iIndicator->SetHighlight( iIndicators[ ii ]->iIndicator->IsActive() ); - } - } - } - return ret; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetCaseL -// set mode of given range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetCaseL(const TInt aRange, const TInt aModeIndex) - { - // aRange is detailed range, it only meaningful for multimodebutton - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - CAknFepCtrlMultiModeButton* button = static_cast - (iIndicators[ii]->iIndicator); - if ((iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) && - ((iIndicators[ii]->iInputRange == aRange) || - ((iIndicators[ii]->iRangeType == ERangeTypeMixed) && - (button->IsGivenRangeSupported(aRange))))) - { - if (iIndicators[ii]->iRangeType == ERangeTypeMixed) - { - button->SetRange(aRange); - } - - if (button->IsActive()) - { - button->SetCurrentModeL(EBtnBmpActive, aModeIndex); - } - else - { - button->SetCurrentModeL(EBtnBmpNonActive, aModeIndex); - } - - break; - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetPermittedRanges -// set permitted ranges -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetPermittedRanges(const TInt aPermitted) - { - // aPermitted only include detailed range, not mixed - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - TBool needDimButton = EFalse; - CAknFepCtrlCommonButton* button= iIndicators[ii]->iIndicator; - - if ((iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[ii]->iRangeType == ERangeTypeMixed)) - { - // mixed multi button - RArray rangeList; - TRAP_IGNORE(static_cast - (button)->GetRangeListL(rangeList)); - - needDimButton = ETrue; - TInt disableIdx = -1; - - for (TInt ii = 0; ii < rangeList.Count(); ii++) - { - if (aPermitted & rangeList[ii]) - { - static_cast(button)->SetPermittedRange( - rangeList[ii], ETrue); - needDimButton = EFalse; - } - else - { - static_cast(button)->SetPermittedRange( - rangeList[ii], EFalse); - disableIdx = ii; - } - } - - // disable mode can only after permitted modes are all setted. - if ( disableIdx >= 0 ) - { - static_cast(button)->DisableOneModes( - rangeList[disableIdx]); - } - - rangeList.Reset(); - rangeList.Close(); - } - else if (!(aPermitted & iIndicators[ii]->iInputRange)) - { - // disable a normal or single range multi button - needDimButton = ETrue; - - if (iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) - { - TRAP_IGNORE(static_cast(button)->SetCurrentModeL( - EBtnBmpNonActive , 0)); - } - } - - if (needDimButton) - { - button->SetDimmed(ETrue); - button->SetActive(EFalse); - } - else - { - button->SetDimmed(EFalse); - } - } - - if ( iActionStyle == ERangeBarUsingIndicatorStyle ) - { - for(TInt n = 0; n < iIndicators.Count(); n++) - { - for( TInt m = n+1; m < iIndicators.Count(); m++ ) - { - if( iIndicators[n]->iPosIdx == iIndicators[m]->iPosIdx ) - { - TBool nDimmed = iIndicators[n]->iIndicator->IsDimmed(); - TBool mDimmed = iIndicators[m]->iIndicator->IsDimmed(); - - if ( nDimmed != mDimmed ) - { - iIndicators[n]->iIndicator->Hide(nDimmed); - iIndicators[m]->iIndicator->Hide(mDimmed); - } - } - } - } - } - //RefreshUI(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetPermittedRange -// set permitted ranges -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetPermittedRange(const TInt aRangeId, TBool aPermit) - { - // this function has take consideration of mixed range multimodebutton - // aRangeId is detailed range here - TBool needDimButton = EFalse; - TBool findButton = EFalse; - TInt buttonIdx = 0; - - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - CAknFepCtrlCommonButton* button = iIndicators[ii]->iIndicator; - - if ((iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[ii]->iRangeType == ERangeTypeMixed)) - { - // mixed multi button - if (static_cast(button)->IsGivenRangeSupported(aRangeId)) - { - findButton = ETrue; - buttonIdx = ii; - - static_cast(button)->SetPermittedRange(aRangeId, - aPermit); - - RArray rangeList; - - TRAP_IGNORE(static_cast(button)->GetRangeListL( - rangeList)); - - if ( (!aPermit) && (rangeList.Count() == 1) ) - { - needDimButton = ETrue; - } - - rangeList.Reset(); - rangeList.Close(); - - break; - } - } - else - { - // normal or single range multi button - if (iIndicators[ii]->iInputRange == aRangeId) - { - findButton = ETrue; - buttonIdx = ii; - - if (!aPermit) - { - needDimButton = ETrue; - - if (iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) - { - TRAP_IGNORE( - static_cast(button)->SetCurrentModeL( - EBtnBmpNonActive , 0)); - } - } - break; - } - } - } - - if (findButton) - { - CAknFepCtrlCommonButton* button = iIndicators[buttonIdx]->iIndicator; - - if (!needDimButton) - { - button->SetDimmed(EFalse); - } - else - { - button->SetDimmed(ETrue); - button->SetActive(EFalse); - } - } - - //RefreshUI(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetPermittedCase -// set permitted ranges -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetPermittedCase(const TInt aRangeId, - const TInt aRealCaseId, - TBool aPermit) - { - // aRangeId is detailed range here - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if (((iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[ii]->iInputRange == aRangeId)) || - ((iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[ii]->iRangeType == ERangeTypeMixed) && - (static_cast(iIndicators[ii]->iIndicator)->IsGivenRangeSupported(aRangeId)))) - { - // single range multimode button OR mixed range multimode button - static_cast(iIndicators[ii]->iIndicator)->SetPermittedModes(aRangeId, aRealCaseId, aPermit); - break; - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::HideRange -// hide given range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::HideRange(const TInt aRange) - { - // mixed range multimode button is not considerred here - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - if ( ( iIndicators[ ii ] ) && - ( iIndicators[ ii ]->iInputRange == aRange ) && - ( !iIndicators[ ii ]->iIsHide)) - { - iIndicators[ii]->iIndicator->Hide(ETrue); - - iIndicators[ ii ]->iIsHide = ETrue; - - if( iCellChanged ) - { - UpdateIndicatorRect(EFalse); - } - else - { - SetWholeRect(); - iIsReloadImages = EFalse; - //Draw(); - SetIndicatorRect(); - } - - break; - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::HideRangeUsingIndicatorStyle -// hide given range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::HideRangeUsingIndicatorStyle(const TInt aRange) - { - // mixed range multimode button is not considerred here - TInt indiIdx = IndicatorIdxByRange(aRange); - - if (indiIdx == KErrNotFound) - return; - - HideRangeForHidingIndicatorStyle(indiIdx, ETrue); - - UpdateIndicatorRectForUsingIndicatorStyle(EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ShowRange -// show given range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::ShowRange(const TInt aRange) - { - // mixed range multimode button is not considerred here - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - if ( ( iIndicators[ ii ] ) && - ( iIndicators[ ii ]->iInputRange == aRange ) && - ( iIndicators[ ii ]->iIsHide)) - { - iIndicators[ii]->iIndicator->Hide(EFalse); - iIndicators[ ii ]->iIsHide = EFalse; - - if( iCellChanged ) - { - UpdateIndicatorRect(ETrue); - } - else - { - SetWholeRect(); - iIsReloadImages = EFalse; - - //Draw(); - SetIndicatorRect(); - } - - break; - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ShowRangeUsingIndicatorStyle -// show given range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::ShowRangeUsingIndicatorStyle(const TInt aRange) - { - // mixed range multimode button is not considerred here - TInt indiIdx = IndicatorIdxByRange(aRange); - - if (indiIdx == KErrNotFound) - return; - - HideRangeForHidingIndicatorStyle(indiIdx, EFalse); - - UpdateIndicatorRectForUsingIndicatorStyle(EFalse); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::AddRangeL -// add range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::AddRangeL(TResourceReader& aReader) - { - const TInt16 rangeId = aReader.ReadInt16(); - const TInt16 rangeType = aReader.ReadInt16(); - const TInt16 ctrlId = aReader.ReadInt16(); - const TInt16 ctrlType = aReader.ReadInt16(); - const TInt32 resId = aReader.ReadInt32(); - const TInt actionStyle = aReader.ReadInt16(); - TBool hide = aReader.ReadInt16(); - TInt posidx = aReader.ReadInt16(); - - CAknFepCtrlCommonButton* button = NULL; - - if (ctrlType != EButtonTypeMultiMode) - { - // normal button - button = CAknFepCtrlCommonButton::NewLC(UiLayout(), ctrlId, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); - button->SetResourceId(resId); - button->ConstructFromResourceL(); - } - else - { - // Multiple display type button - button = CAknFepCtrlMultiModeButton::NewLC(UiLayout(), ctrlId, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive); - - button->SetResourceId(resId); - button->ConstructFromResourceL(); - } - - button->AddEventObserver( this ); - - AddControlL( button ); - CleanupStack::Pop(button); // button - - TAknFepRangeIndicator* indicator = new (ELeave) TAknFepRangeIndicator; - CleanupStack::PushL( indicator ); - - indicator->iCtrlType = ctrlType; - indicator->iInputRange = rangeId; - indicator->iRangeType = rangeType; - indicator->iCtrlId = ctrlId; - //indicator->iIsHide = EFalse; - indicator->iIsHide = hide; - if (hide) - button->Hide(ETrue); - indicator->iIndicator = button; - indicator->iActionStyle = actionStyle; - indicator->iPosIdx = posidx; - - User::LeaveIfError( iIndicators.Append(indicator) ); - CleanupStack::Pop(indicator); // indicator - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::GetCase -// get mode of given range -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CAknFepCtrlRangeBar::GetCase(TInt aRange) const - { - // get current real case of aRange - // aRange is detailed range here, for mixed range multimode button, it contained in one range of it - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - if (iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) - { - CAknFepCtrlMultiModeButton* button = static_cast - (iIndicators[ii]->iIndicator); - - if ( ( (iIndicators[ii]->iRangeType == ERangeTypeMixed) && - (button->IsGivenRangeSupported(aRange)) && - ((button->RangeOfGivenMode(button->CurrentMode()) == aRange)) ) - || (iIndicators[ii]->iInputRange == aRange)) - { - return button->GetRealCaseByMode(button->CurrentMode()); - } - } - } - - return KErrNotFound; - } - -// ----------------------------------------------------------------------------- -// Implementation of CAknFepCtrlRangeBar::SetFont -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetFont(const CFont* aFont) - { - iFont = aFont; - - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if (iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) - { - static_cast(iIndicators[ii]->iIndicator)->SetFont(iFont); - - break; - } - } - } - -// ----------------------------------------------------------------------------- -// Implementation of CAknFepCtrlRangeBar::Move -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::Move(const TPoint& aOffset) - { - CControlGroup::Move(aOffset); - - iIndicatorRect.Move(aOffset); - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetEventIdForRange -// set event id when range is clicked -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetEventIdForRange(TInt aEventId) - { - iEventIdForRange = aEventId; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetEventIdForCase -// set event id when case is clicked -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetEventIdForCase(TInt aEventId) - { - iEventIdForCase = aEventId; - } - - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ShowAllRanges -// Display all ranges whether it is IsHide -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::ShowAllRanges() - { - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - iIndicators[ii]->iIsHide = EFalse; - iIndicators[ii]->iIndicator->Hide(EFalse); - } - - if( iCellChanged ) - { - iActionStyle == ERangeBarUsingIndicatorStyle ? - UpdateIndicatorRectForUsingIndicatorStyle(EFalse) : - UpdateIndicatorRect(EFalse); - } - else - { - SetWholeRect(); - iIsReloadImages = EFalse; - //Draw(); - SetIndicatorRect(); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetWholeRect -// Set rect of whole range bar -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CAknFepCtrlRangeBar::SetWholeRect() - { - if (iStyle == EBtnGroupVertical) - { - SetRect(TRect(iIndicatorRect.iTl, - TPoint(iIndicatorRect.iTl.iX + iIndicatorRect.Width(), - iIndicatorRect.iTl.iY + - iIndicatorRect.Height() * (NumOfControls() - NumOfHidedRange())))); - } - else - { - SetRect(TRect(iIndicatorRect.iTl, - TPoint(iIndicatorRect.iTl.iX + - iIndicatorRect.Width() * (NumOfControls() - NumOfHidedRange()), - iIndicatorRect.iTl.iY + iIndicatorRect.Height()))); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::NumOfHidedRange -// Get number of hided input ranges -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CAknFepCtrlRangeBar::NumOfHidedRange() - { - TInt numOfHidedRange = 0; - - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - if (iIndicators[ ii ]->iIsHide) - { - numOfHidedRange++; - } - } - - return numOfHidedRange; - } - - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::SetActionStyle -// set action style -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::SetActionStyle(TRangeBarActionStyle aActionStyle) - { - iActionStyle = aActionStyle; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::IndicatorIdxByRange -// get indicator index by range -// ----------------------------------------------------------------------------- -// -TInt CAknFepCtrlRangeBar::IndicatorIdxByRange(TInt aRange) - { - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - if ( IsMixedRange(ii) ) - { - CAknFepCtrlMultiModeButton* button = static_cast - (iIndicators[ii]->iIndicator); - if ( button->RangeOfGivenMode(button->NextMode()) == aRange || - button->RangeOfGivenMode(button->CurrentMode()) == aRange ) - { - return ii; - } - } - else if (iIndicators[ii]->iInputRange == aRange) - { - return ii; - } - } - - return KErrNotFound; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ActiveRange -// active range -// ----------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlRangeBar::ActiveRange(TInt aRange) - { - TInt indiIdx = IndicatorIdxByRange(aRange); - - if (indiIdx == KErrNotFound) - return; - - if (iActionStyle == ERangeBarActionStyleHide || - (iActionStyle == ERangeBarUsingIndicatorStyle && - iIndicators[indiIdx]->iActionStyle == EIndicatorActionStyleHide)) - { - TBool needChange = EFalse; - - if (!iIndicators[indiIdx]->iIndicator->IsDimmed() && iIndicators[indiIdx]->iIndicator) - { - needChange = ETrue; - iInputRange = iIndicators[indiIdx]->iInputRange; - SetActiveCtrl(iIndicators[indiIdx]->iIndicator); - } - - if (needChange) - { - if (iActionStyle == ERangeBarActionStyleHide) - { - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - if (ii == indiIdx) - { - iIndicators[ii]->iIndicator->Hide(ETrue); - iIndicators[ii]->iIsHide = ETrue; - } - else if (iIndicators[ii]->iIsHide) - { - iIndicators[ii]->iIsHide = EFalse; - iIndicators[ii]->iIndicator->Hide(EFalse); - } - } - if (iCellChanged ) - { - UpdateIndicatorRect( EFalse ); - } - else - { - SetWholeRect(); - iIsReloadImages = EFalse; - //Draw(); - SetIndicatorRect(); - } - } - else - { - HideRangeForHidingIndicatorStyle(indiIdx, ETrue); - UpdateIndicatorRectForUsingIndicatorStyle(EFalse); - } - } - } - else - { - // whole range bar's action style is highlight, or it depends on each indicator's - // action style, which is highlight or just visible - SetRange(aRange); - } - - for (TInt ii = 0; ii < iIndicators.Count(); ++ii) - { - TBool highlight = - iIndicators[ii]->iIndicator->IsActive() && !iIndicators[ii]->iIndicator->Hiden(); - iIndicators[ii]->iIndicator->SetHighlight(highlight); - } - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::IsMixedRange -// Judge if button in given index has mixed range -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CAknFepCtrlRangeBar::IsMixedRange(const TInt aIndex) - { - if ((aIndex >= 0) && - (aIndex <= iIndicators.Count()-1) && - (iIndicators[aIndex]->iCtrlType == EButtonTypeMultiMode) && - (iIndicators[aIndex]->iRangeType == ERangeTypeMixed)) - { - return ETrue; - } - - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CAknFepCtrlRangeBar::ReportEventToObserver -// Report range or case event to observer -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CAknFepCtrlRangeBar::ReportEventToObserver(const TInt aEventId, const TInt aEventData) - { - TPtrC ptr; - TInt sendData = aEventData; - ptr.Set(reinterpret_cast(&sendData),sizeof(aEventData)); - - ReportEvent(aEventId, ptr); - } - -EXPORT_C void CAknFepCtrlRangeBar::SetDispalyCellRectsL( const RArray& aRects, - const RArray& aInnerRects ) - { - iCellChanged = ETrue; - iCellRects.Close(); - iCellInnerRects.Close(); - for( TInt i = 0; i < aRects.Count(); i++ ) - { - iCellRects.AppendL( aRects[i] ); - } - - for( TInt i = 0; i < aInnerRects.Count(); i++ ) - { - iCellInnerRects.AppendL( aInnerRects[i] ); - } - - iActionStyle == ERangeBarUsingIndicatorStyle ? - UpdateIndicatorRectForUsingIndicatorStyle(ETrue) : - UpdateIndicatorRect(ETrue); - } - -void CAknFepCtrlRangeBar::UpdateIndicatorRect( TBool aUpdateImage) - { - TInt index = 0; - for (TInt ii = 0; ii < iIndicators.Count() && iCellRects.Count() > 0; ++ii) - { - TPoint offset( iIndicatorRect.iTl.iX, iIndicatorRect.iTl.iY ); - if (!iIndicators[ii]->iIsHide ) - { - CAknFepCtrlCommonButton* button = iIndicators[ii]->iIndicator; - if( button ) - { - TInt n = index++; - TRect btnRect( iCellRects[n] ); - TRect btnInnerRect( iCellInnerRects[n] ); - //btnRect.Move( offset ); - if (iIndicators[ii]->iCtrlType == EButtonTypeMultiMode) - { - static_cast(iIndicators[ii]->iIndicator)-> - SizeChanged(btnRect, btnInnerRect, aUpdateImage); - } - else - { - static_cast(iIndicators[ii]->iIndicator)-> - SizeChanged(btnRect, btnInnerRect, aUpdateImage); - } - } - if( index == iCellRects.Count() ) - break; - } - } - } - -void CAknFepCtrlRangeBar::UpdateIndicatorRectForUsingIndicatorStyle(TBool aUpdateImage) - { - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if (/*!iIndicators[ii]->iIsHide && */ - iIndicators[ii]->iIndicator && - iIndicators[ii]->iPosIdx >= 0 && - iIndicators[ii]->iPosIdx < iCellRects.Count()) - { - iIndicators[ii]->iIndicator->SizeChanged(iCellRects[iIndicators[ii]->iPosIdx], - iCellInnerRects[iIndicators[ii]->iPosIdx], - aUpdateImage); - } - } - } - -void CAknFepCtrlRangeBar::HideRangeForHidingIndicatorStyle(TInt aIdx, - TBool aHide) - { - RArray permitRangeInxArray; - TInt maxPos = 0; - - // Get all the permitted range index array - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - maxPos = iIndicators[ii]->iPosIdx > maxPos ? iIndicators[ii]->iPosIdx : maxPos; - - if( !(iIndicators[ii]->iIndicator->IsDimmed() ) && iIndicators[ii]->iPosIdx >=0 ) - { - permitRangeInxArray.Append(ii); - } - } - - TBool showAllPermittedRange = ETrue; - - // compare the position for every permitted range - if( permitRangeInxArray.Count() == maxPos + 1 ) - { - for(TInt n = 0; n < permitRangeInxArray.Count(); n++) - { - for( TInt m = n+1; m < permitRangeInxArray.Count(); m++ ) - { - if( iIndicators[permitRangeInxArray[n]]->iPosIdx == - iIndicators[permitRangeInxArray[m]]->iPosIdx ) - { - showAllPermittedRange = EFalse; - break; - } - } - } - } - else - { - showAllPermittedRange = EFalse; - } - - permitRangeInxArray.Reset(); - permitRangeInxArray.Close(); - - if( !showAllPermittedRange ) // hide style - { - if (iIndicators[aIdx]->iIsHide != aHide && - iIndicators[aIdx]->iIndicator) - { - TBool canShowNext = ETrue; - - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if (ii != aIdx && iIndicators[ii]->iPosIdx == iIndicators[aIdx]->iPosIdx) - { - if ( iIndicators[ii]->iIndicator->IsDimmed() ) - { - canShowNext = EFalse; - } - else - { - iIndicators[ii]->iIndicator->Hide(!aHide); - iIndicators[ii]->iIsHide = !aHide; - } - - if (aHide) - break; - } - } - - iIndicators[aIdx]->iIndicator->Hide( canShowNext && aHide); - iIndicators[aIdx]->iIsHide = canShowNext && aHide; - } - } - else - { - // Set the range for special state - for (TInt ii = 0; ii < iIndicators.Count(); ii++) - { - if( iIndicators[ii]->iIndicator->IsDimmed() ) - { - iIndicators[ii]->iIndicator->Hide(ETrue); - iIndicators[ii]->iIsHide = ETrue; - } - else - { - iIndicators[ii]->iIndicator->Hide(EFalse); - iIndicators[ii]->iIsHide = EFalse; - } - } - - } - } -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputselectionlist/peninputcommonchoicelist.cpp --- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputcommonchoicelist.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,324 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of touch input mode switch -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MIN_WORD_LENGTH 200 //temperarily added. -const TInt KExtraMargine = 10; -// --------------------------------------------------------------------------- -// C++ constructor. -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonChoiceList:: - CPeninputCommonChoiceList( CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aItemSkinID, - TAknsItemID aBackgroundSkinID, - ECommonChoiceListStyle aListStyle ) -: CFepLayoutChoiceList( aUiLayout, aControlId ) - { - iItemSkinID = aItemSkinID; - iBackgroundSkinID = aBackgroundSkinID; - iListStyle = aListStyle; -#ifdef RD_TACTILE_FEEDBACK - //Advanced Tactile feedback REQ417-47932 - if(aUiLayout) - { - if (aUiLayout->PenInputType() == EPluginInputModeFSQ|| - aUiLayout->PenInputType() == EPluginInputModeVkb) - { - SetTactileFeedbackType(ETouchFeedbackBasicButton); - aUiLayout->ChangeFeedbackType(reinterpret_cast(this),ETouchFeedbackBasicButton); - } - else - { - SetTactileFeedbackType(ETouchFeedbackSensitiveKeypad); - aUiLayout->ChangeFeedbackType(reinterpret_cast(this),ETouchFeedbackSensitiveKeypad); - } - } -#endif //RD_TACTILE_FEEDBACK - } - -// --------------------------------------------------------------------------- -// Symbian Constructor -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonChoiceList* CPeninputCommonChoiceList:: - NewL( CFepUiLayout* aUiLayout, - TInt aControlId, - TAknsItemID aItemSkinID, - TAknsItemID aBackgroundSkinID, - ECommonChoiceListStyle aListStyle ) - { - CPeninputCommonChoiceList *self = new (ELeave) - CPeninputCommonChoiceList( aUiLayout, - aControlId, - aItemSkinID, - aBackgroundSkinID, - aListStyle ); - - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonChoiceList::~CPeninputCommonChoiceList() - { - iItemRects.Close(); - } - -EXPORT_C void CPeninputCommonChoiceList::AddItemRectL( const TRect& aRect ) - { - iItemRects.AppendL( aRect ); - } - -EXPORT_C void CPeninputCommonChoiceList::RemoveAllItemsRect() - { - iItemRects.Reset(); - } - -EXPORT_C void CPeninputCommonChoiceList:: - SetTextLayout( const TAknTextLineLayout& aTextLayout ) - { - iTextLayout = aTextLayout; - } - -TInt CPeninputCommonChoiceList::MaxWidthOfListItem() - { - if( iTextLayout.FontId() == 0 ) - return 0; - - TInt maxLength = 0; - const CFont* font = AknLayoutUtils::FontFromId(iTextLayout.FontId(), NULL); - ASSERT( font ); - - for( TInt i = 0; i < ItemsCount(); i++ ) - { - TInt length = font->TextWidthInPixels( ItemByIndex(i)->iText ); - maxLength = length > maxLength ? length : maxLength; - } - maxLength = maxLength > MIN_WORD_LENGTH ? maxLength : MIN_WORD_LENGTH; - return maxLength; - } - -EXPORT_C void CPeninputCommonChoiceList::ReCalcLayout() - { - if( iItemRects.Count() == 0 ) - { - return; - } - - if( iListStyle == EAutoFitLength ) - { - TInt itemLength = MaxWidthOfListItem() + iTextLayout.il + iTextLayout.ir; - TInt offsetLength = 0; - offsetLength = Rect().Width() - iItemRects[0].Width(); - - if( itemLength + offsetLength + KExtraMargine > UiLayout()->Rect().Width() ) - { - itemLength = UiLayout()->Rect().Width() - KExtraMargine - offsetLength; - } - TRect rect; - for( TInt i = 0; i < iItemRects.Count(); i++ ) - { - rect = iItemRects[i]; - offsetLength = itemLength - rect.Width(); - rect.SetRect(rect.iTl, TSize( itemLength, rect.Height() ) ); - iItemRects[i] = rect; - } - rect = Rect(); - rect.Resize( offsetLength, 0 ); - SetRect( rect ); - } - } - -EXPORT_C void CPeninputCommonChoiceList::Draw() - { - if(!AbleToDraw()) - return; - - DrawBackground(); - - //draw Item - for(int ii = 0; ii < ItemsCount(); ++ii) - { - DrawItem(ii, CurrentFocusedIndex() == ii); - } - } - -void CPeninputCommonChoiceList::DrawBackground() - { - DrawOpaqueMaskBackground( Rect() ); - if( iBackgroundSkinID.iMajor != EAknsMajorNone && - iBackgroundSkinID.iMinor != EAknsMinorNone ) - { - TRect rtInnerRect( Rect() ); - rtInnerRect.Shrink( 1, 1 ); - CFbsBitGc* gc = static_cast(BitGc()); - - gc->Activate( BitmapDevice() ); - gc->SetBrushColor( KRgbWhite ); - gc->Clear( Rect() ); - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - Rect(), - rtInnerRect, - iBackgroundSkinID, - KAknsIIDDefault ); - } - } - -void CPeninputCommonChoiceList::DrawItem( TInt aIndex, TBool aIsFocus ) - { - TRect rtFocusRect(iItemRects[aIndex]); - rtFocusRect.Move( Rect().iTl ); - - if( aIsFocus ) - { - //draw focus bitmap - TRect rtInnerRect( rtFocusRect ); - rtInnerRect.Shrink( 7, 7 ); - - if( iItemSkinID.iMajor != EAknsMajorNone && - iItemSkinID.iMinor != EAknsMinorNone) - { - CFbsBitGc* gc = static_cast(BitGc()); - gc->Activate( BitmapDevice() ); - AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), - *gc, - rtFocusRect, - rtInnerRect, - iItemSkinID, - KAknsIIDDefault ); - } - - } - - // draw text - TAknLayoutText textLayout; - textLayout.LayoutText(rtFocusRect, iTextLayout); - TRgb color( KRgbBlack ); // sane default for nonskinned case - TAknsQsnTextColorsIndex clrIndex; - clrIndex = aIsFocus ? EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG20; - - if ( AknsUtils::AvkonSkinEnabled() ) - { - AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), - color, KAknsIIDQsnTextColors, clrIndex ); - } - - textLayout.DrawText(*BitGc(), ItemByIndex(aIndex)->iText, ETrue, color); - } - -EXPORT_C void CPeninputCommonChoiceList::SetListColumnNumWithLafL( TInt aMaxCount) - { - if( iLastColumnNum == aMaxCount ) - return; - - iLastColumnNum = aMaxCount; - RemoveAllItemsRect(); - - TAknWindowLineLayout appWnd = AknLayoutScalable_Avkon::application_window(0).LayoutLine(); - TAknWindowLineLayout mainPane = AknLayoutScalable_Avkon::main_pane(4).LayoutLine(); - TAknLayoutRect mainPaneRect; - mainPaneRect.LayoutRect(appWnd.Rect(), mainPane); - - TAknWindowLineLayout menuWnd = AknLayoutScalable_Avkon:: - popup_menu_window(13).LayoutLine(); - TAknWindowLineLayout choiceWnd = AknLayoutScalable_Avkon:: - popup_submenu_window(aMaxCount - 1).LayoutLine(); - TAknLayoutRect choiceRect; - choiceRect.LayoutRect(mainPaneRect.Rect(), choiceWnd); - - TRect rectChoiseList( 0, 0 , - choiceRect.Rect().Width(), - choiceRect.Rect().Height()); - // set list window rect - SetRect( rectChoiseList ); - - TAknWindowLineLayout listPopupPane = AknLayoutScalable_Avkon:: - listscroll_popup_sub_pane(0).LayoutLine(); - TAknLayoutRect listPopupPaneRect; - listPopupPaneRect.LayoutRect(rectChoiseList, listPopupPane); - TAknWindowLineLayout listSubMenuPane = AknLayoutScalable_Avkon:: - list_submenu_pane(1).LayoutLine(); - TAknLayoutRect listSubMenuPaneRect; - listSubMenuPaneRect.LayoutRect(listPopupPaneRect.Rect(), listSubMenuPane); - - TAknWindowLineLayout listSinglePane; - TAknLayoutRect listSinglePaneRect; - - // set list item rect - for( TInt i = 0; i < aMaxCount; i++ ) - { - listSinglePane = AknLayoutScalable_Avkon:: - list_single_popup_submenu_pane(i, 0, 0).LayoutLine(); - listSinglePaneRect.LayoutRect( listSubMenuPaneRect.Rect(), listSinglePane ); - iItemRects.AppendL(listSinglePaneRect.Rect()); - } - - // set list text layout - SetTextLayout(AknLayoutScalable_Avkon::list_single_popup_submenu_pane_t1(0).LayoutLine()); - } - -EXPORT_C void CPeninputCommonChoiceList::SetListSkinID( TAknsItemID aItemSkinID, - TAknsItemID aBackgroundSkinID ) - { - iItemSkinID = aItemSkinID; - iBackgroundSkinID = aBackgroundSkinID; - } -EXPORT_C TInt CPeninputCommonChoiceList::HitTest(const TPoint& aPoint) - { - TPoint pPoint(aPoint.iX - Rect().iTl.iX,aPoint.iY - Rect().iTl.iY); - TInt arrayCount = iItemRects.Count(); - TInt index = arrayCount; - for(TInt i = 0; i < arrayCount; i++) - { - if(iItemRects[i].Contains(pPoint)) - { - index = i; - } - } - if( index >= arrayCount ) - { - return EListOutside; - } - else - { - return index; - } - } -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputselectionlist/peninputlayoutinputmodechoice.cpp --- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputlayoutinputmodechoice.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,392 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of touch input mode switch -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// CONSTANT -const TInt KInvalidImg = -1 ; -_LIT(KAknUtilsResourceFileName, "z:\\resource\\peninputmodeswitchutilsnew.rsc"); -const TInt KCCMask(0x00000fff); - - -// --------------------------------------------------------------------------- -// C++ constructor. -// --------------------------------------------------------------------------- -// -CPeninputLayoutInputmodelChoice::CPeninputLayoutInputmodelChoice(CFepUiLayout* aUiLayout, - TInt aControlId,TPluginInputMode aInputMode) -: CPeninputCommonChoiceList( aUiLayout, aControlId, KAknsIIDNone, KAknsIIDNone, EAutoFitLength ) - { - iConstructed = EFalse; - iUiLayout = aUiLayout; - iCurPluginInputMode = aInputMode; - iInputLanguage = ELangTest; - iSecretEditor = EFalse; - } - -// --------------------------------------------------------------------------- -// Symbian Constructor -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutInputmodelChoice* CPeninputLayoutInputmodelChoice::NewL( - CFepUiLayout* aUiLayout, - TInt aControlId, TPluginInputMode aInputMode) - { - CPeninputLayoutInputmodelChoice *self = new (ELeave) - CPeninputLayoutInputmodelChoice(aUiLayout, aControlId, aInputMode); - - CleanupStack::PushL(self); - self->CustomConstructL(); - CleanupStack::Pop(); - - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutInputmodelChoice::~CPeninputLayoutInputmodelChoice() - { - iInputModeItems.Close(); - delete iAknFepRepository; - } - -// --------------------------------------------------------------------------- -// Pop up touch input switch list -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutInputmodelChoice::PopUpSwitchListL( const TRect& aRtControl ) - { - ResetListItemL(); - - if (ItemsCount() > 0 && ItemByIndex(0)) - { - Display(aRtControl); - } - } - -// --------------------------------------------------------------------------- -// Initialize internal control -// --------------------------------------------------------------------------- -// -void CPeninputLayoutInputmodelChoice::DoInitializeControlL() - { - if (iConstructed) - { - return; - } - iAknFepRepository = CRepository::NewL(KCRUidAknFep); - - SizeChanged(); - - RFs fsSession; - - User::LeaveIfError(fsSession.Connect()); - CleanupClosePushL(fsSession); - - RResourceFile rsFile; - - TFileName resourceName(KAknUtilsResourceFileName); - CCoeEnv* coeEnv = CCoeEnv::Static(); - BaflUtils::NearestLanguageFile(fsSession, resourceName); - - rsFile.OpenL(fsSession, resourceName); - CleanupClosePushL(rsFile); - - // Create choice list - TResourceReader reader; - - HBufC8* rBuffer = rsFile.AllocReadLC(PENINPUTMODE_SWITCH_CHOICELIST & KCCMask); - reader.SetBuffer(rBuffer); - - TPtrC bmpFileName = reader.ReadTPtrC(); - TInt32 imgMajorSkinId = reader.ReadInt32(); - - if (CreateItemIconL(reader, &iPopupWndBgImg, bmpFileName, imgMajorSkinId)) - { - SetBackgroundBitmapL(iPopupWndBgImg); - } - - if (CreateItemIconL(reader, &iPopupWndFocusImg, bmpFileName, imgMajorSkinId)) - { - SetFocusBmp(iPopupWndFocusImg); - } - - CleanupStack::PopAndDestroy(1); - - // read name to list - - CreateChoiceItemL( reader, rsFile ); -/* CreateChoiceItemL(iInputModeItem[EPenInputHwr], EPluginInputModeHwr, - R_PENINPUTMODE_NAMES, reader, rsFile); - - CreateChoiceItemL(iInputModeItem[EPenInputVkb], EPluginInputModeVkb, - R_PENINPUTMODE_VKB, reader, rsFile); - - CreateChoiceItemL(iInputModeItem[EPenInputItut], EPluginInputModeItut, - R_PENINPUTMODE_FINGERITUT, reader, rsFile); - - CreateChoiceItemL(iInputModeItem[EPenInputFSc], EPluginInputModeFSc, - R_PENINPUTMODE_FULLHWR, reader, rsFile); - -*/ - CleanupStack::PopAndDestroy(2); - - iConstructed = ETrue; - } - -// --------------------------------------------------------------------------- -// Application size Changed -// --------------------------------------------------------------------------- -// -void CPeninputLayoutInputmodelChoice::SizeChanged() - { - /* - if ( Hiden() ) - { - iChoiceList->CloseWindow(); - } - */ - TRect mainPaneRect = MainPaneRect(); - - TAknWindowLineLayout choiceWnd = - AknLayoutScalable_Avkon::popup_choice_list_window(1).LayoutLine(); - - TAknLayoutRect choiceRect; - choiceRect.LayoutRect(mainPaneRect, choiceWnd); - - iItemRect = TRect( - 0, 0, choiceRect.Rect().Width(), - AknLayoutScalable_Avkon::list_single_choice_list_pane(0).LayoutLine().iH); - - TAknTextLineLayout choiceTextLayout = - AknLayoutScalable_Avkon::list_single_choice_list_pane_t1(1).LayoutLine(); - - const CFont* font = AknLayoutUtils::FontFromId(choiceTextLayout.iFont, NULL); - - SetFont(font); - SetItemRect(iItemRect, iItemRect); - - const TInt leftMargin = choiceTextLayout.il; - - SetMarginAndBaseline(leftMargin,font->HeightInPixels()); - SetFontColor(AKN_LAF_COLOR_STATIC(choiceTextLayout.iC)); - - if (iPopupWndBgImg) - { - AknIconUtils::SetSize(iPopupWndBgImg, - TSize(iItemRect.Width(), iItemRect.Height() * 3), - EAspectRatioNotPreserved); - } - - if (iPopupWndFocusImg) - { - AknIconUtils::SetSize(iPopupWndFocusImg, - TSize(iItemRect.Width(), iItemRect.Height() * 3), - EAspectRatioNotPreserved); - } - - iPopupItemSize = iItemRect.Size(); - } - -// --------------------------------------------------------------------------- -// Symbian second-phase constructor -// --------------------------------------------------------------------------- -// -void CPeninputLayoutInputmodelChoice::CustomConstructL( ) - { - //CFepLayoutChoiceList::NewL(iUiLayout, aControlId); - // call base class construction - this->ConstructL(); - - DoInitializeControlL(); - } - -// --------------------------------------------------------------------------- -// Insert choice item to input mode switch list -// --------------------------------------------------------------------------- -// -void CPeninputLayoutInputmodelChoice::CreateChoiceItemL( TResourceReader &aReader, - RResourceFile& aRsFile ) - { - HBufC8* rBuffer = aRsFile.AllocReadLC( R_PENINPUTMODE_NAMES & KCCMask ); - aReader.SetBuffer(rBuffer); - - TInt index; - TInt number; - number = aReader.ReadInt16(); - - CFepLayoutChoiceList::SItem item; - for (index = 0; index < number ; index++) - { - item.iCommand = aReader.ReadInt32(); - //TPtrC ptr = aReader.ReadTPtrC(); - HBufC* buf = aReader.ReadHBufCL(); - item.iText.Copy( buf->Des() ); - delete buf; - iInputModeItems.AppendL( item ); - } - - CleanupStack::PopAndDestroy(1); - } - -// --------------------------------------------------------------------------- -// Create choice item icon -// --------------------------------------------------------------------------- -// -TBool CPeninputLayoutInputmodelChoice::CreateItemIconL(TResourceReader &aReader, - CFbsBitmap** aImg, TPtrC& aBmpFileName, TInt32 aMajorSkinId) - { - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - const TInt bmpId = aReader.ReadInt16(); - const TInt bmpMaskId = aReader.ReadInt16(); - const TInt bmpSkinId = aReader.ReadInt16(); - - TAknsItemID id; - id.Set(TInt(aMajorSkinId), bmpSkinId); - - if (bmpId != KInvalidImg) - { - AknsUtils::CreateIconL(skinInstance, - id, - *aImg, - aBmpFileName, - bmpId); - - AknIconUtils::SetSize(*aImg, iPopupItemSize, EAspectRatioNotPreserved); - - return ETrue; - } - - return EFalse; - } - - -// --------------------------------------------------------------------------- -// Get main pane rect -// --------------------------------------------------------------------------- -// -TRect CPeninputLayoutInputmodelChoice::MainPaneRect() - { - TAknWindowLineLayout appWnd; - TAknWindowLineLayout mainPane; - TAknLayoutRect mainPaneLayout; - - appWnd = AknLayoutScalable_Avkon::application_window( 0 ).LayoutLine(); - - TInt id = appWnd.iW > appWnd.iH ? 4 : 1; - - mainPane = AknLayoutScalable_Avkon::main_pane(id).LayoutLine(); - mainPaneLayout.LayoutRect(appWnd.Rect(), mainPane); - - return mainPaneLayout.Rect(); - } - - -// --------------------------------------------------------------------------- -// Reset choice list item -// --------------------------------------------------------------------------- -// -void CPeninputLayoutInputmodelChoice::ResetListItemL() - { - TInt layouts = iUiLayout->GetEnabledPluginMode(); - - ClearItemsL(); - - for ( int i = 0; i < iInputModeItems.Count(); i++ ) - { - if ( layouts & iInputModeItems[i].iCommand ) - { - InsertListItemL( iInputModeItems[i], iInputModeItems[i].iCommand ); - } - } - - SetListColumnNumWithLafL( ItemsCount() ); - } - -// --------------------------------------------------------------------------- -// Insert list item -// --------------------------------------------------------------------------- -// -void CPeninputLayoutInputmodelChoice::InsertListItemL( const CFepLayoutChoiceList::SItem& item, - TInt aInputMode) - { - TInt value = 0; - if (iAknFepRepository) - { - iAknFepRepository->Get(KAknFepInputTxtLang, value); - - iInputLanguage = TLanguage(value); - } - - if (iSecretEditor && (aInputMode == EPluginInputModeHwr || - aInputMode == EPluginInputModeFSc || aInputMode == EPluginInputModeFingerHwr)) - { - return; - } - - // Added for . Do not insert current input mode to the list - if (iUiLayout && (iUiLayout->PenInputType() == aInputMode)) - { - return; - } - - // if current input mode is in choice list, add item to it - // (!ItemByCommand(aInputMode)) - if(FindCommand(aInputMode) < 0) - { - AddItemL( item ); - } - } - -// --------------------------------------------------------------------------- -// Set current editor is secure -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutInputmodelChoice::SetSecretEditor(TBool aSecret) - { - iSecretEditor = aSecret; - } - - -// --------------------------------------------------------------------------- -// Get switch list rect -// --------------------------------------------------------------------------- -// -EXPORT_C TRect CPeninputLayoutInputmodelChoice::SwitchListRect() - { - return TRect(0,0,iItemRect.Width(), iItemRect.Height() * ItemsCount()); - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp --- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,727 +0,0 @@ -/* -* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation for button base and dragbar -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "peninputscrollablelist.h" - -const TInt KCtrlIdPageUp = 1; -const TInt KCtrlIdPageDown = 2; - -const TInt KInvalidResId = -1; -const TInt KInvalidBmp = -1; - - -const TInt KDisplayTextLen = KMaxItemTextLength + KAknBidiExtraSpacePerLine; - -EXPORT_C CFepLayoutScrollableList* CFepLayoutScrollableList::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize) - { - CFepLayoutScrollableList* self = NewLC(aUiLayout, - aControlId, - aItemSize, - aHorizontalMargin, - aVerticalMargin, - aNaviSize, - aNaviInnerSize); - CleanupStack::Pop(self); - return self; - } - -EXPORT_C CFepLayoutScrollableList* CFepLayoutScrollableList::NewLC(CFepUiLayout* aUiLayout, - TInt aControlId, - TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize) - { - CFepLayoutScrollableList* self = new(ELeave) CFepLayoutScrollableList(aUiLayout, - aControlId, - aItemSize, - aHorizontalMargin, - aVerticalMargin, - aNaviSize, - aNaviInnerSize); - CleanupStack::PushL(self); - self->ConstructL(); - return self; - } - -EXPORT_C CFepLayoutScrollableList::~CFepLayoutScrollableList() - { - //iBmpList.ResetAndDestroy(); - //iBmpList.Close(); - - //delete iPageInfoFormat; - delete iPageInfo; - iItemRects.Close(); - delete iSeperationBmp; - delete iSeperationMaskBmp; - } - -EXPORT_C void CFepLayoutScrollableList::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - //delete the old bmp res - delete iSeperationBmp; - delete iSeperationMaskBmp; - iSeperationBmp = NULL; - iSeperationMaskBmp = NULL; - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); - TInt imgMajorSkinId = reader.ReadInt32(); - - TInt32 pageUpId = reader.ReadInt32(); - TInt32 pageDownId = reader.ReadInt32(); - TAknsItemID id; - - //read seperation line res - const TInt16 bmpId = reader.ReadInt16(); - const TInt16 bmpMskId = reader.ReadInt16(); - // read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - if (bmpMskId != KInvalidBmp) - { - AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), - id, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG30, - iSeperationBmp, - iSeperationMaskBmp, - bmpFileName, - bmpId, - bmpMskId, - AKN_LAF_COLOR( 0 ) ); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - iSeperationBmp, - bmpFileName, - bmpId); - } - } - CleanupStack::PopAndDestroy(1); // reader - - TResourceReader pageUpReader; - CCoeEnv::Static()->CreateResourceReaderLC(pageUpReader, pageUpId); - iPageUp->ConstructFromResourceL(pageUpReader); - CleanupStack::PopAndDestroy(1); // pageUpReader, imgreader - - TResourceReader pageDownReader; - CCoeEnv::Static()->CreateResourceReaderLC(pageDownReader, pageDownId); - iPageDown->ConstructFromResourceL(pageDownReader); - CleanupStack::PopAndDestroy(1); // pageDownReader, imgreader - } - -EXPORT_C void CFepLayoutScrollableList::SizeChanged(TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize) - { - iItemSize = aItemSize; - iHorizontalMargin = aHorizontalMargin; - iVerticalMargin = aVerticalMargin; - iNaviSize = aNaviSize; - iNaviInnerSize = aNaviInnerSize; - - } - -EXPORT_C void CFepLayoutScrollableList::SetTextProperty(const CFont* aFont, - TRgb aFontColor) - { - iFont = aFont; - iFontColor = aFontColor; - - iBaselineOffset = iItemSize.iHeight/2 + aFont->AscentInPixels()/2; - } - -EXPORT_C void CFepLayoutScrollableList::Draw() - { - if (Hiden() || !Ready() || Rect().Size() == TSize(0,0)) - { - return; - } - - // draw background of whole control - CFbsBitGc* gc = static_cast(BitGc()); - - //mask bitmaps - TRect rect = Rect(); - - DrawOpaqueMaskBackground(); - - TRect innerRect = rect; - innerRect.Shrink(4, 4); - - // ----- draw bitmaps ----- - gc->Activate(BitmapDevice()); - gc->Clear(rect); - - AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), - *gc, - rect, - innerRect, - iBgFrId, - KAknsIIDDefault); - - // draw item - for (TInt i = iCurrentPage * iOnePageItemCnt; - i < (iCurrentPage + 1) * iOnePageItemCnt && i < ItemArray().Count(); - i++) - { - DrawItem(i); - } - - // draw scroll area - if (iNaviBtnShown) - { - iPageUp->Draw(); - iPageDown->Draw(); - DrawPageInfo(); - } - } - -EXPORT_C void CFepLayoutScrollableList::DrawPageInfo() - { - CFbsBitGc* gc = static_cast(BitGc()); - //TPtr ptr = iPageInfo->Des(); - //FORMATPAGEINFO(ptr, *iPageInfoFormat, iCurrentPage + 1, iTotalPages); - TRAP_IGNORE(UpdatePageInfoL( iCurrentPage + 1, iTotalPages )); - - if( iPageInfoLineSet ) - { - TRgb color( KRgbBlack ); // sane default for nonskinned case - - TAknLayoutText textLayout; - textLayout.LayoutText(iScrollRect, iPageInfoTextLine ); - TAknsQsnTextColorsIndex clrIndex; - clrIndex = EAknsCIQsnTextColorsCG20; - - if ( AknsUtils::AvkonSkinEnabled() ) - { - AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), - color, KAknsIIDQsnTextColors, clrIndex ); - } - - textLayout.DrawText(*gc, iPageInfo->Des(), EFalse, color); - } - else - { - gc->UseFont(iFont); - - gc->SetBrushStyle(CGraphicsContext::ENullBrush); - gc->SetBrushColor(KRgbBlack); - gc->SetPenColor(iFontColor); - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize(PenSize()); - - - gc->DrawText(iPageInfo->Des(), - iPageInfoRect, - iBaselineOffset, - CGraphicsContext::ECenter); - - gc->DiscardFont(); - } - } - -EXPORT_C TInt CFepLayoutScrollableList::HitTest(const TPoint& aPoint) - { - if( !Contains( aPoint ) ) - { - return EListOutside; - } - for (TInt i = 0; i < iItemRects.Count(); i++) - { - if (iItemRects[i].Contains(aPoint)) - { - if ((iCurrentPage * iOnePageItemCnt + i) < ItemArray().Count()) - return (iCurrentPage * iOnePageItemCnt + i); - else - break; - } - } - - return EListInsideNoneListItem; - } - -void CFepLayoutScrollableList::ScrollPageUp() - { - if (iCurrentPage >= 0 && iCurrentPage <= (iTotalPages - 1)) - { - if (iCurrentPage == 0) - { - iCurrentPage = iTotalPages - 1; - } - else - { - iCurrentPage--; - } - UpdateNaviButtonStates(); - Draw(); - UpdateArea( Rect(), EFalse); - } - -#ifdef RD_TACTILE_FEEDBACK - UpdateFeedbackArea(); -#endif // RD_TACTILE_FEEDBACK - } - -void CFepLayoutScrollableList::ScrollPageDown() - { - if (iCurrentPage >= 0 && iCurrentPage <= (iTotalPages - 1)) - { - if (iCurrentPage == iTotalPages - 1) - { - iCurrentPage = 0; - } - else - { - iCurrentPage++; - } - UpdateNaviButtonStates(); - Draw(); - UpdateArea( Rect(), EFalse); - } - -#ifdef RD_TACTILE_FEEDBACK - UpdateFeedbackArea(); -#endif // RD_TACTILE_FEEDBACK - } - -EXPORT_C void CFepLayoutScrollableList::UpdateNaviButtonStates() - { - iPageUp->SetDimmed( iTotalPages == 1 ); - iPageDown->SetDimmed(iTotalPages == 1 ); - } - -EXPORT_C void CFepLayoutScrollableList::CalcPageInfo() - { - iCurrentPage = 0; - iTotalPages = (ItemArray().Count() + iOnePageItemCnt - 1) / iOnePageItemCnt; - UpdateNaviButtonStates(); - } - -EXPORT_C void CFepLayoutScrollableList::CalculateItemWidth() - { - iItemSize.iWidth = iInitItemWidth; - const RPointerArray& allItems = ItemArray(); - for( TInt i = 0; i < allItems.Count() ; ++i ) - { - TInt itemWidth = iFont->TextWidthInPixels( allItems[i]->iText ); - if( itemWidth > iItemSize.iWidth ) - { - iItemSize.iWidth = itemWidth; - } - } - - TPixelsTwipsAndRotation ptScreenSize; - CCoeEnv::Static()->ScreenDevice()-> - GetDefaultScreenSizeAndRotation(ptScreenSize); - // calculate the length exclude the item - TInt naviWidth = iNaviBtnShown? iNaviSize.iWidth : 0; - TInt len = 4*iHorizontalMargin + naviWidth; - if( iItemSize.iWidth + len > ptScreenSize.iPixelSize.iWidth) - { - iItemSize.iWidth = ptScreenSize.iPixelSize.iWidth - len; - } - } - -EXPORT_C void CFepLayoutScrollableList::DrawItem(TInt aItemIndex, TBool aItemActive) - { - // aItemIndex is relative to whole item array - TBool isSpecial = ((aItemIndex == ItemArray().Count() - 1) && iSpecialItemOn); - CFbsBitGc* gc = static_cast(BitGc()); - TRect itemRect = iItemRects[aItemIndex % iOnePageItemCnt]; - TBool isFocus = aItemIndex == iCurFocusItem; - - if ( isSpecial ) - { - //mask bitmaps - gc->Activate(MaskBitmapDevice()); - gc->SetBrushStyle(CGraphicsContext::ESolidBrush); - gc->SetBrushColor(TRgb(KOpaqueColor));//Non transparent at all - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize(PenSize()); - gc->SetPenColor(TRgb(KOpaqueColor)); - gc->DrawRect(itemRect); - // ----- draw bitmaps ----- - gc->Activate(BitmapDevice()); - - TRect sepRect = itemRect; - sepRect.iBr.iY = sepRect.iTl.iY + 2; - sepRect.Move( 0, -4 ); - SetListSeperationRect( sepRect ); - // draw background frame of special item - if( iSeperationBmp ) - { - TRect srcRect( TPoint( 0, 0 ), iSeperationBmp->SizeInPixels() ); - - if( iSeperationMaskBmp ) - { - gc->BitBltMasked( iSeperationRect.iTl, - iSeperationBmp, - srcRect, - iSeperationMaskBmp, - ETrue); - - } - else - { - gc->BitBlt( iSeperationRect.iTl, - iSeperationBmp, - srcRect ); - } - } - } - if( isFocus ) - { - //mask bitmaps - gc->Activate(MaskBitmapDevice()); - gc->SetBrushStyle(CGraphicsContext::ESolidBrush); - gc->SetBrushColor(TRgb(KOpaqueColor));//Non transparent at all - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize(PenSize()); - gc->SetPenColor(TRgb(KOpaqueColor)); - gc->DrawRect(itemRect); - - // ----- draw bitmaps ----- - gc->Activate(BitmapDevice()); - - // draw frame - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - TRect innerRect = itemRect; - innerRect.Shrink(7, 7); - AknsDrawUtils::DrawFrame(skin, - *gc, - itemRect, - innerRect, - aItemActive ? iItemActiveFrId : iItemFrId, - KAknsIIDDefault); - } - - // draw text - if (iTextLineSet) - { - gc->SetBrushStyle(CGraphicsContext::ENullBrush); - gc->SetBrushColor(KRgbBlack); - TRgb color( KRgbBlack ); // sane default for nonskinned case - - TAknLayoutText textLayout; - textLayout.LayoutText(itemRect, - iTextLine); - TAknsQsnTextColorsIndex clrIndex; - clrIndex = isFocus ? EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG20; - - if ( AknsUtils::AvkonSkinEnabled() ) - { - AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), - color, KAknsIIDQsnTextColors, clrIndex ); - } - - textLayout.DrawText(*gc, ItemArray()[aItemIndex]->iText, ETrue, color); - } - else if (iFont) - { - gc->UseFont(iFont); - - gc->SetBrushStyle(CGraphicsContext::ENullBrush); - gc->SetBrushColor(KRgbBlack); - gc->SetPenColor(iFontColor); - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize(PenSize()); - - if (iFont->TextWidthInPixels(ItemArray()[aItemIndex]->iText) > itemRect.Width()) - { - TBuf buf; - AknBidiTextUtils::ConvertToVisualAndClip(ItemArray()[aItemIndex]->iText, - buf, - *iFont, - itemRect.Width(), - itemRect.Width()); - gc->DrawText(buf, - itemRect, - iBaselineOffset, - CGraphicsContext::ELeft); - } - else - { - gc->DrawText(ItemArray()[aItemIndex]->iText, - itemRect, - iBaselineOffset, - CGraphicsContext::ELeft); - } - - gc->DiscardFont(); - } - } - -EXPORT_C void CFepLayoutScrollableList::ConstructL() - { - CFepLayoutPopupWnd::ConstructL(); - - //create page up/down buttons - iPageUp = CAknFepCtrlCommonButton::NewL( - UiLayout(), - KCtrlIdPageUp, - KAknsIIDQsnFrButtonNormal, - KAknsIIDQsnFrButtonPressed, - KAknsIIDQsnFrButtonInactive); - iPageUp->AddEventObserver( this ); - iPageDown = CAknFepCtrlCommonButton::NewL( - UiLayout(), - KCtrlIdPageDown, - KAknsIIDQsnFrButtonNormal, - KAknsIIDQsnFrButtonPressed, - KAknsIIDQsnFrButtonInactive); - iPageDown->AddEventObserver( this ); - AddControlL( iPageUp ); - AddControlL( iPageDown ); - } - -EXPORT_C CFepLayoutScrollableList::CFepLayoutScrollableList(CFepUiLayout* aUiLayout, - TInt aControlId, - TSize aItemSize, - TInt aHorizontalMargin, - TInt aVerticalMargin, - TSize aNaviSize, - TSize aNaviInnerSize) - :CFepLayoutChoiceList(aUiLayout, aControlId), - iItemSize(aItemSize), - iNaviSize(aNaviSize), - iNaviInnerSize(aNaviInnerSize), - iHorizontalMargin(aHorizontalMargin), - iVerticalMargin(aVerticalMargin), - iSpecialItemOn(ETrue), - iNaviBtnShown( ETrue ), - iOnePageItemCnt(4) - { - iCurFocusItem = -1; - iInitItemWidth = aItemSize.iWidth; - } - -EXPORT_C void CFepLayoutScrollableList::ReCalcLayout() - { - CalculateItemWidth(); - CalcPageInfo(); - iContentRect = TRect(TPoint(), TSize(2*iHorizontalMargin + iItemSize.iWidth, - (iOnePageItemCnt + 1)*iVerticalMargin + iOnePageItemCnt*iItemSize.iHeight)); - TRect ctrlRect = iContentRect; - - iItemRects.Reset(); - for (TInt i = 0; i < iOnePageItemCnt; i++) - { - iItemRects.Append(TRect(TPoint(iContentRect.iTl.iX + iHorizontalMargin, - iContentRect.iTl.iY + (i+1)* iVerticalMargin + - i * iItemSize.iHeight) , - iItemSize)); - } - - if (iNaviBtnShown) - { - iScrollRect = TRect(TPoint(iContentRect.Width(), 0), - TSize(2*iHorizontalMargin + iNaviSize.iWidth, iContentRect.Height())); - iPageUpRect = TRect(TPoint(iScrollRect.iTl.iX + iHorizontalMargin, - iScrollRect.iTl.iY + iVerticalMargin), - iNaviSize); - - TPoint innerTl ( iPageUpRect.iTl.iX + ( iNaviSize.iWidth - iNaviInnerSize.iWidth ) /2, - iPageUpRect.iTl.iY + ( iNaviSize.iHeight - iNaviInnerSize.iHeight ) /2 ); - iPageUp->SizeChanged( iPageUpRect, TRect( innerTl, iNaviInnerSize), ETrue ); - - iPageDownRect = TRect(TPoint(iPageUpRect.iTl.iX, - iScrollRect.iBr.iY - iVerticalMargin - iNaviSize.iHeight), - iNaviSize); - - innerTl = TPoint(iPageDownRect.iTl.iX + ( iNaviSize.iWidth - iNaviInnerSize.iWidth ) /2, - iPageDownRect.iTl.iY + ( iNaviSize.iHeight - iNaviInnerSize.iHeight ) /2 ); - iPageDown->SizeChanged( iPageDownRect, TRect(innerTl, iNaviInnerSize), ETrue ); - - iPageInfoRect = TRect(TPoint(iScrollRect.iTl.iX, - iScrollRect.iTl.iY + iScrollRect.Height()/2 - iNaviSize.iHeight/2), - iNaviSize); - - ctrlRect.BoundingRect(iScrollRect); - } - - SetRect(ctrlRect); - UpdateNaviButtonStates(); - } - -EXPORT_C void CFepLayoutScrollableList::HandleControlEvent(TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData) - { - if( aEventType == EEventButtonUp ) - { - if( aCtrl == iPageUp ) - { - ScrollPageUp(); - } - else if( aCtrl == iPageDown ) - { - ScrollPageDown(); - } - } - } - -EXPORT_C void CFepLayoutScrollableList::UpdatePageInfoL( TInt aCurrentPage, TInt aTotalPage ) - { - if( iPageInfoResID == 0 ) - return; - - if (iPageInfo) - { - delete iPageInfo; - iPageInfo = NULL; - } - CArrayFix< TInt >* aInts = new( ELeave ) CArrayFixFlat< TInt >(2); - CleanupStack::PushL(aInts); - - aInts->AppendL( aCurrentPage ); - aInts->AppendL( aTotalPage ); - iPageInfo = StringLoader::LoadL( iPageInfoResID, *aInts ); - - CleanupStack::PopAndDestroy(aInts); - } - -EXPORT_C void CFepLayoutScrollableList::SetImgFrId(TAknsItemID aBgFrId, - TAknsItemID aNaviFrId, - TAknsItemID aNaviActiveFrId, - TAknsItemID aNaviDimFrId, - TAknsItemID aItemFrId, - TAknsItemID aItemActiveFrId) - { - iBgFrId = aBgFrId; - iItemFrId = aItemFrId; - iItemActiveFrId = aItemActiveFrId; - iPageUp->SetImageFrameId( aNaviFrId, aNaviActiveFrId, aNaviDimFrId ); - iPageDown->SetImageFrameId( aNaviFrId, aNaviActiveFrId, aNaviDimFrId ); - } - -EXPORT_C void CFepLayoutScrollableList::Move(const TPoint& aOffset) - { - CFepLayoutChoiceList::Move(aOffset); - iContentRect.Move( aOffset ); - for (TInt i = 0; i < iOnePageItemCnt && i < iItemRects.Count(); i++) - { - iItemRects[i].Move( aOffset ); - } - iScrollRect.Move( aOffset ); - iPageInfoRect.Move( aOffset ); - iSeperationRect.Move( aOffset ); - } -EXPORT_C void CFepLayoutScrollableList::SetListSeperationRect( const TRect& aRect ) - { - iSeperationRect = aRect; - if( iSeperationBmp ) - { - AknIconUtils::SetSize(iSeperationBmp, aRect.Size(), EAspectRatioNotPreserved ); - } - if( iSeperationMaskBmp ) - { - AknIconUtils::SetSize(iSeperationMaskBmp, aRect.Size(), EAspectRatioNotPreserved ); - } - } - - - -EXPORT_C void CFepLayoutScrollableList::Hide(TBool aFlag) - { - CFepLayoutPopupWnd::Hide(aFlag); - -#ifdef RD_TACTILE_FEEDBACK - if (!aFlag) - { - iLastPageItemRect = iRect; - - UpdateFeedbackArea(); - - if (!iPageUp->IsDimmed()) - { - UiLayout()->RegisterFeedbackArea(reinterpret_cast(iPageUp),iPageUp->Rect(),iPageUp->TactileFeedbackType()); - } - - if (!iPageDown->IsDimmed()) - { - UiLayout()->RegisterFeedbackArea(reinterpret_cast(iPageDown),iPageDown->Rect(),iPageDown->TactileFeedbackType()); - } - } - else - { - if (!iPageUp->IsDimmed()) - { - UiLayout()->DeRegisterFeedbackArea(reinterpret_cast(iPageUp),iPageUp->Rect()); - } - - if (!iPageDown->IsDimmed()) - { - UiLayout()->DeRegisterFeedbackArea(reinterpret_cast(iPageDown), - iPageDown->Rect()); - } - } -#endif // RD_TACTILE_FEEDBACK - } - -#ifdef RD_TACTILE_FEEDBACK -void CFepLayoutScrollableList::UpdateFeedbackArea() - { - // calculate total height of all aviliable items in current page - TInt curPageItemCount = 0; - for (TInt i = iCurrentPage * iOnePageItemCnt; - i < (iCurrentPage + 1) * iOnePageItemCnt && i < ItemArray().Count(); - i++) - { - curPageItemCount++; - } - - TRect itemRect(TPoint(iItemRects[0].iTl), - TSize(iItemRects[0].Width(), iItemRects[0].Height() * curPageItemCount)); - - UiLayout()->ChangeFeedbackArea(reinterpret_cast(this),itemRect,iLastPageItemRect); - iLastPageItemRect = itemRect; - } -#endif // RD_TACTILE_FEEDBACK -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputselectionlist/peninputselectionlist.cpp --- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputselectionlist.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,426 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "peninputselectionlist.h" - -// constant definition -const TInt KInvalidResId = -1; -const TInt KInvalidBmp = -1; -const TInt KInvalidItemIndex = -1; - -EXPORT_C CPenInputSelectionList* CPenInputSelectionList::NewL(CFepUiLayout* aUiLayout, - TInt aControlId, - TPoint aTopLeftPoint, - TSize aItemSize, - TInt aItemHorizontalMargin) - { - CPenInputSelectionList* self = new (ELeave) CPenInputSelectionList(aUiLayout, - aControlId, - aTopLeftPoint, - aItemSize, - aItemHorizontalMargin); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -EXPORT_C CPenInputSelectionList::~CPenInputSelectionList() - { - iItemList.Reset(); - iItemList.Close(); - - iBmpList.ResetAndDestroy(); - iBmpList.Close(); - } - -void CPenInputSelectionList::RecalculateCtrlRect() - { - if (iItemList.Count() == 0) - { - SetRect(TRect(0, 0, 0, 0)); - } - else - { - SetRect(TRect(iItemList[0].iRect.iTl, - iItemList[iItemList.Count() - 1].iRect.iBr)); - } - } - -EXPORT_C void CPenInputSelectionList::SizeChanged(TPoint aTopLeftPoint, - TSize aItemSize, - TInt aItemHorizontalMargin) - { - iTopLeftPoint = aTopLeftPoint; - iItemSize = aItemSize; - iItemHorizontalMargin = aItemHorizontalMargin; - - for (TInt i = 0; i < iItemList.Count(); i++) - { - iItemList[i].iRect = TRect(TPoint(aTopLeftPoint.iX, - aTopLeftPoint.iY + - i * (aItemHorizontalMargin + iItemSize.iHeight)), - aItemSize); - } - - RecalculateCtrlRect(); - } - -EXPORT_C void CPenInputSelectionList::SetItemsL(const RPointerArray& aItemList) - { - Hide(ETrue); - - iItemList.Reset(); - - for (TInt i = 0; i < aItemList.Count(); i++) - { - SItem item(TRect(TPoint(iTopLeftPoint.iX, - iTopLeftPoint.iY + i * (iItemHorizontalMargin + iItemSize.iHeight)), - iItemSize), - *aItemList[i]); - iItemList.AppendL(item); - } - - RecalculateCtrlRect(); - } - -EXPORT_C void CPenInputSelectionList::AddItemL(const TDesC& aItem) - { - SItem item(TRect(TPoint(iTopLeftPoint.iX, - iTopLeftPoint.iY + iItemList.Count() * (iItemHorizontalMargin + - iItemSize.iHeight)),iItemSize), aItem); - iItemList.AppendL(item); - - RecalculateCtrlRect(); - } - -EXPORT_C void CPenInputSelectionList::RemoveItem(TInt aItemIndex) - { - if (aItemIndex < 0 || aItemIndex >= iItemList.Count()) - { - return; - } - - iItemList.Remove(aItemIndex); - - for (TInt i = aItemIndex; i < iItemList.Count(); i++) - { - iItemList[i].iRect.Move(-iItemHorizontalMargin, 0); - } - - RecalculateCtrlRect(); - } - -EXPORT_C void CPenInputSelectionList::RemoveAllItems() - { - iItemList.Reset(); - RecalculateCtrlRect(); - } - -EXPORT_C void CPenInputSelectionList::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - iBmpList.ResetAndDestroy(); - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TPtrC bmpFileName = reader.ReadTPtrC(); - TInt imgMajorSkinId = reader.ReadInt32(); - - TAknsItemID id; - - for (TInt i = 0; i < EBmpLastType + 1; i+=2) - { - TInt bmpid = reader.ReadInt16(); - TInt maskid = reader.ReadInt16(); - TInt minorskinid = reader.ReadInt16(); - - id.Set(imgMajorSkinId, minorskinid); - - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpid != KInvalidBmp) - { - if (maskid != KInvalidBmp) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpid, - maskid); - - AknIconUtils::SetSize(maskbmp, iItemSize, EAspectRatioNotPreserved); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpid); - } - - AknIconUtils::SetSize(bmp, iItemSize, EAspectRatioNotPreserved); - } - - iBmpList.AppendL(bmp); - iBmpList.AppendL(maskbmp); - } - - CleanupStack::PopAndDestroy(); // reader - } - -EXPORT_C void CPenInputSelectionList::SetTextProperty(const CFont* aFont, - TRgb aFontColor) - { - iFont = aFont; - iFontColor = aFontColor; - - iBaselineOffset = iItemSize.iHeight/2 + aFont->AscentInPixels()/2; - } - -TInt CPenInputSelectionList::HitTest(const TPoint& aPoint) - { - if (!Rect().Contains(aPoint)) - { - return KErrGeneral; - } - - for (TInt i = 0; i < iItemList.Count(); i++) - { - if (iItemList[i].iRect.Contains(aPoint)) - { - return i; - } - } - - return KErrNotFound; - } - -EXPORT_C CFepUiBaseCtrl* CPenInputSelectionList::HandlePointerDownEventL(const TPoint& aPoint) - { - CFepUiBaseCtrl::HandlePointerDownEventL(aPoint); - - TInt index = HitTest(aPoint); - - if (index >= 0) - { - if (index != iFocusItemIndex) - { - TInt prev = iFocusItemIndex; - iFocusItemIndex = index; - - if (prev != KInvalidItemIndex) - { - DrawItem(prev); - } - - DrawItem(iFocusItemIndex); - } - } - else if (index == KErrGeneral) - { - SetPointerDown(EFalse); - CloseWindow(); - } - - return this; - } - -EXPORT_C CFepUiBaseCtrl* CPenInputSelectionList::HandlePointerUpEventL(const TPoint& aPoint) - { - CFepUiBaseCtrl::HandlePointerUpEventL(aPoint); - - TInt index = HitTest(aPoint); - - if (index >= 0) - { - CloseWindow(); - - if (iFocusItemIndex != KInvalidItemIndex) - { - TPtrC ptr; - ptr.Set(reinterpret_cast(&iFocusItemIndex), sizeof(TInt)/sizeof(TText)); - ReportEvent(iEventId, ptr); - } - } - - iFocusItemIndex = KInvalidItemIndex; - - return this; - } - -EXPORT_C CFepUiBaseCtrl* CPenInputSelectionList::HandlePointerMoveEventL(const TPoint& aPoint) - { - CFepUiBaseCtrl::HandlePointerMoveEventL(aPoint); - - if (PointerDown()) - { - TInt index = HitTest(aPoint); - - if (index != iFocusItemIndex && index != KInvalidItemIndex) - { - TInt prev = iFocusItemIndex; - iFocusItemIndex = index; - - if( prev != -1 ) - { - DrawItem(prev); - } - - DrawItem(iFocusItemIndex); - } - } - - return this; - } - -EXPORT_C void CPenInputSelectionList::Display() - { - //Hide(EFalse); - BringToTop(); - Draw(); - } - -EXPORT_C void CPenInputSelectionList::CloseWindow() - { - Hide(ETrue); - RemoveAllItems(); - } - -CPenInputSelectionList::CPenInputSelectionList(CFepUiLayout* aUiLayout, - TInt aControlId, - TPoint aTopLeftPoint, - TSize aItemSize, - TInt aItemHorizontalMargin) - :CFepUiBaseCtrl(TRect(0, 0, 0, 0), aUiLayout, aControlId), - iTopLeftPoint(aTopLeftPoint), - iItemSize(aItemSize), - iItemHorizontalMargin(aItemHorizontalMargin), - iFocusItemIndex(KInvalidItemIndex), - iFrId(KAknsIIDQsnFrPopupSub), - iCenterFrId(KAknsIIDQsnFrPopupCenterSubmenu) - { - SetControlType(EUserCtrlBase | ECtrlBaseCtrl); - } - -void CPenInputSelectionList::ConstructL() - { - BaseConstructL(); - Hide(ETrue); - } - -void CPenInputSelectionList::Draw() - { - if(!AbleToDraw()) - return; - - for (TInt i = 0; i < iItemList.Count(); i++) - { - DrawItem(i); - } - - UiLayout()->UpdateArea(this, this->Rect(), EFalse); - } - -void CPenInputSelectionList::DrawItem(TInt aItemIndex) - { - CFbsBitGc* gc = static_cast(BitGc()); - - //mask bitmaps - gc->Activate( MaskBitmapDevice() ); - - gc->SetBrushStyle( CGraphicsContext::ESolidBrush ); - gc->SetBrushColor(TRgb(KOpaqueColor));//Non transparent at all - gc->SetPenStyle(CGraphicsContext::ESolidPen ); - gc->SetPenSize(PenSize()); - gc->SetPenColor(TRgb(KOpaqueColor) ); - gc->DrawRect(iItemList[aItemIndex].iRect); - - // ----- draw bitmaps ----- - gc->Activate(BitmapDevice()); - - // draw frame - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - - TRect outerRect; - TRect innerRect; - CalculateFrameRects( iItemList[aItemIndex].iRect, outerRect, innerRect); - - AknsDrawUtils::DrawFrame( - skin, *gc, - outerRect, innerRect, - iFrId, iCenterFrId); - - // draw text - if (iTextLineSet) - { - TAknLayoutText textLayout; - textLayout.LayoutText(iItemList[aItemIndex].iRect, - iTextLine); - textLayout.DrawText(*gc, iItemList[aItemIndex].iText); - } - else if (iFont) - { - gc->UseFont(iFont); - - gc->SetBrushStyle(CGraphicsContext::ENullBrush); - gc->SetBrushColor(KRgbBlack); - gc->SetPenColor(iFontColor); - gc->SetPenStyle(CGraphicsContext::ESolidPen); - gc->SetPenSize(PenSize()); - - gc->DrawText(iItemList[aItemIndex].iText, - iItemList[aItemIndex].iRect, - iBaselineOffset, - CGraphicsContext::ECenter); - - gc->DiscardFont(); - } - } -void CPenInputSelectionList::CalculateFrameRects( const TRect aRect, - TRect& aOuterRect, - TRect& aInnerRect ) const - { - TRect windowRect = aRect; - - TAknLayoutRect topLeft; - topLeft.LayoutRect(windowRect, SkinLayout::Submenu_skin_placing_Line_2()); - - TAknLayoutRect bottomRight; - bottomRight.LayoutRect(windowRect, SkinLayout::Submenu_skin_placing_Line_5()); - - aOuterRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr); - aInnerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl); - } -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp --- a/textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,393 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: vkb control extension -* -*/ - - -// System includes -#include -#include -#include -#include -#include - -// User includes -#include "peninputvkbctrlext.h" -#include "peninputvkbctrllayout.h" - -// Constants -const TUint32 KDefaultTextColor = 0x000000; -const TInt32 KInvalidResId = -1; -const TInt KInvalidImg = -1 ; -// ======== MEMBER FUNCTIONS ======== - - - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::CPeninputVkbCtrlExt -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputVkbCtrlExt::CPeninputVkbCtrlExt( const TRect& aRect, - CFepUiLayout* aUiLayout, TInt aControlId, const TFontSpec& aFontSpec,TBool aIrregular ) - : CVirtualKeyboard( aRect, aUiLayout, aControlId, aFontSpec, aIrregular ) - { - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::NewL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputVkbCtrlExt* CPeninputVkbCtrlExt::NewL( const TRect& aRect, - CFepUiLayout* aUiLayout, TInt aControlId, const CFont* aFont,TBool aIrregular) - { - TFontSpec fontSpec; - - CPeninputVkbCtrlExt* vkb = new (ELeave) - CPeninputVkbCtrlExt( aRect, aUiLayout, aControlId, fontSpec,aIrregular ); - CleanupStack::PushL( vkb ); - vkb->ConstructL(); - vkb->SetFont( aFont ); - CleanupStack::Pop( vkb ); - - return vkb; - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::~CPeninputVkbCtrlExt -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputVkbCtrlExt::~CPeninputVkbCtrlExt() - { - Reset(); - if( iResourceId == KInvalidImg ) - { - SetBackgroundBmp( NULL ); - SetBackgroundMaskBmp( NULL ); - } - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::SizeChanged -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::SizeChanged( const TInt aUnitWidth, - const TInt aUnitHeight, - const TPoint& aLeftTopPoint ) - { - iUnitWidth = aUnitWidth; - iUnitHeight = aUnitHeight; - iLeftTopPoint = aLeftTopPoint; - - if ( iVkbLayoutInfo ) - { - // 1.Reset the size and position of Vkb ctrl and keys - TRect rect = TRect( iLeftTopPoint, TSize( iUnitWidth * iVkbLayoutInfo->Columns(), - iUnitHeight * iVkbLayoutInfo->Rows() ) ); - SetRect( rect ); - - // 2.Move all keys(Needn't change size, because it has been - } - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::SizeChanged -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::SizeChanged( const TRect& aRect ) - { - SetRect( aRect ); - } - - -// CPeninputVkbCtrlExt::ReorganizeVkbKeys -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::ReorganizeVkbKeys( - CPeninputVkbLayoutInfo* aVkbLayoutInfo ) - { - Reset(); - - iVkbLayoutInfo = aVkbLayoutInfo; - - TRect rect = TRect( iLeftTopPoint, TSize( iUnitWidth * iVkbLayoutInfo->Columns(), - iUnitHeight * iVkbLayoutInfo->Rows() ) ); - if( iResourceId != KInvalidImg ) - { - if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) - AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); - if( BkMaskBmp() && BkMaskBmp()->SizeInPixels() != Rect().Size() ) - AknIconUtils::SetSize(BkMaskBmp(), Rect().Size(), EAspectRatioNotPreserved); - } - else - { - if ( iVkbLayoutInfo->BgBmp() ) - { - SetBackgroundBmp( iVkbLayoutInfo->BgBmp() ) ; - } - - if ( iVkbLayoutInfo->BgMaskBmp() ) - { - SetBackgroundMaskBmp( iVkbLayoutInfo->BgMaskBmp() ); - } - } -// SetRect( rect ); - - // According the information in vkbLayout to construct all keys and - // then add into the keys. -/* - if ( iVkbLayoutInfo->BgBmp() ) - { - TRAP_IGNORE( SetBackgroundBitmapL( iVkbLayoutInfo->BgBmp() ) ); - } - - if ( iVkbLayoutInfo->BgMaskBmp() ) - { - TRAP_IGNORE( SetBackgroundMaskBitmapL( iVkbLayoutInfo->BgMaskBmp() ) ); - } -*/ - if ( iVkbLayoutInfo->DimBmp() ) - { - SetDimKeyBmp( iVkbLayoutInfo->DimBmp() ); - } - - if ( iVkbLayoutInfo->DimMaskBmp() ) - { - SetDimKeyMaskBmp( iVkbLayoutInfo->DimMaskBmp() ); - } - - TInt count = iVkbLayoutInfo->HighlightBmps().Count(); - - TRAP_IGNORE( - for ( TInt i = 0; i < count; i++ ) - { - AddKeyHighLightBitmapL(iVkbLayoutInfo->HighlightBmps()[i]); - } - ); - - count = iVkbLayoutInfo->HighlightMaskBmps().Count(); - - TRAP_IGNORE( - for ( TInt i = 0; i < count; i++ ) - { - AddKeyHighLightMaskBitmapL(iVkbLayoutInfo->HighlightMaskBmps()[i]); - } - ); - - count = iVkbLayoutInfo->KeyInfoList().Count(); - TRAP_IGNORE( - for ( TInt i = 0; i < count; i++ ) - { - iVkbLayoutInfo->KeyInfoList()[i]->Key()->SetDimmed( EFalse ); - AddKeyL( iVkbLayoutInfo->KeyInfoList()[i]->Key() ); - } - ); - - TRgb textColor; - TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - textColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG59); - if (error != KErrNone) - { - textColor = TRgb( KDefaultTextColor ); - } - SetFontColor( textColor ); - - Draw(); - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::Reset -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::Reset() - { - const RPointerArray& keys = KeyArray(); - for(TInt i = keys.Count() - 1 ; i >= 0 ; --i) - { - RemoveKey(keys[i]); - } - - const RPointerArray& bmps = KeyHighlightBmpList(); - for(TInt i = bmps.Count() - 1 ; i >= 0 ; --i) - { - RemoveKeyHighLightBitmap(i); - } - - const RPointerArray& maskbmps = KeyHighlightMaskBmpList(); - for(TInt i = maskbmps.Count() - 1 ; i >= 0 ; --i) - { - RemoveKeyHighLightMaskBitmap(i); - } - - SetDimKeyBmp( NULL ); - SetDimKeyMaskBmp( NULL ); - - iVkbLayoutInfo = NULL; - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::Move -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::Move( const TPoint& aOffset ) - { - TRect rect = Rect(); - rect.Move( aOffset ); - SetRect( rect ); - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::DimKeys -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::DimKeys( const HBufC* aPermitted ) - { - TInt count = iVkbLayoutInfo->KeyInfoList().Count(); - - for ( TInt i = 0; i < count ; i++ ) - { - TChar ch = TChar( (TUint)( KeyArray()[i]->KeyCode() ) ); - TInt index = aPermitted->Locate( ch ) ; - - if ( index == KErrNotFound ) - { - DimKey( KeyArray()[i], ETrue ); - } - } - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::DimKeySet -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::DimKeySet( const HBufC* aSet, TBool aDim ) - { - TInt keyCount = iVkbLayoutInfo->KeyInfoList().Count(); - TInt setCount = const_cast(aSet)->Des().Length(); - TInt findNum = 0; - - for ( TInt i = 0; i < keyCount ; i++ ) - { - TChar ch = TChar( (TUint)( KeyArray()[i]->KeyCode() ) ); - TInt index = aSet->Locate( ch ) ; - - if ( index != KErrNotFound ) - { - findNum++; - DimKey( KeyArray()[i], aDim ); - } - - if ( findNum == setCount ) - { - break; - } - } - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::CancelDims -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::CancelDims() - { - TInt count = iVkbLayoutInfo->KeyInfoList().Count(); - - for ( TInt i = 0; i < count ; i++ ) - { - DimKey( KeyArray()[i], EFalse ); - } - } - -// -------------------------------------------------------------------------- -// CPeninputVkbCtrlExt::ConstructFromResourceL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputVkbCtrlExt::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - return; - } - - // Release original resource - if( BackgroundBmp() ) - { - CFbsBitmap* bkBmp = BackgroundBmp(); - delete bkBmp; - SetBackgroundBmp( NULL ); - } - if( BkMaskBmp() ) - { - CFbsBitmap* bkMaskBmp = BkMaskBmp(); - delete bkMaskBmp; - SetBackgroundMaskBmp( NULL ); - } - - TResourceReader resReader; - CCoeEnv::Static()->CreateResourceReaderLC( resReader, iResourceId ); - - TPtrC bmpFileName = resReader.ReadTPtrC(); - TInt32 imgMajorSkinId = resReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - const TInt16 bmpId = resReader.ReadInt16(); - const TInt16 bmpMskId = resReader.ReadInt16(); - skinitemid = resReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidImg) - { - CFbsBitmap* backgroundImg = NULL; - CFbsBitmap* backgroundMaskImg = NULL; - if (bmpMskId != KInvalidImg) - { - AknsUtils::CreateIconL(skininstance, - id, - backgroundImg, - backgroundMaskImg, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - backgroundImg, - bmpFileName, - bmpId); - } - - SetBackgroundBmp( backgroundImg ); - SetBackgroundMaskBmp( backgroundMaskImg ); - } - CleanupStack::PopAndDestroy( 1 ); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrllayout.cpp --- a/textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrllayout.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,902 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of button -* -*/ - - -// system includes -#include -#include -#include -#include - -// user includes -#include "peninputvkbctrllayout.h" -#include "peninputvkbctrlext.h" - -// constants -const TInt KInvalidBmp = -1 ; - - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::CAknFepCtrlVkbLayout -// C++ default constructor can NOT contain any code, that -// might leave. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// - - -CAknFepCtrlVkbLayout::CAknFepCtrlVkbLayout() - : iFirstTimeConstruct(ETrue), iResourceId( -1 ), iVkbLayoutId( -1 ) - { - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::NewL -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlVkbLayout* CAknFepCtrlVkbLayout::NewL() - { - CAknFepCtrlVkbLayout* self = NewLC(); - CleanupStack::Pop(self); - - return self; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::NewLC -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlVkbLayout* CAknFepCtrlVkbLayout::NewLC() - { - CAknFepCtrlVkbLayout* self = new (ELeave) CAknFepCtrlVkbLayout(); - CleanupStack::PushL(self); - self->ConstructL(); - - return self; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::Reset -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlVkbLayout::Reset() - { - iVkbLayoutId = -1; - iFirstTimeConstruct = ETrue; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::ConstructL -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CAknFepCtrlVkbLayout::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// Destructor. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C CAknFepCtrlVkbLayout::~CAknFepCtrlVkbLayout() - { - iVkbLayoutInfoList.ResetAndDestroy(); - iVkbLayoutInfoList.Close(); - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::SetVkbKeyboard -// Two-phased constructor. -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlVkbLayout::SetVkbKeyboard( - CPeninputVkbCtrlExt* aVkbCtrl ) - { - iVkbCtrl = aVkbCtrl; - } - -EXPORT_C void CAknFepCtrlVkbLayout::SetIrregularResourceId(TInt32 aResId) - { - iIrregularResId = aResId; - } - -EXPORT_C void CAknFepCtrlVkbLayout::SetNonIrregularResourceId(TInt32 aResId) - { - iNonIrregularResId = aResId; - } - - -EXPORT_C void CAknFepCtrlVkbLayout::ConstructFromIrregularResourceL() - { - if ( iIrregularResId < 0 ) - { - return; - } - - TResourceReader reader; - - CCoeEnv::Static()->CreateResourceReaderLC( reader, iIrregularResId ); - - TPtrC bmpFileName = reader.ReadTPtrC(); - - for (TInt index = 0; index <= EKeyRightUp; index ++) - { - CreateIrregularKeyBitmapsL(reader, bmpFileName, (TVirtualKeyIrregularKeyType) index); - } - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - for( TInt i = 0; i < iVkbLayoutInfoList.Count(); i++ ) - { - iVkbLayoutInfoList[i]->iIrregular = ETrue; - } - - } - -EXPORT_C void CAknFepCtrlVkbLayout::ConstructFromNonIrregularResourceL() - { - if ( iNonIrregularResId < 0 ) - { - return; - } - - TResourceReader reader; - - CCoeEnv::Static()->CreateResourceReaderLC( reader, iNonIrregularResId ); - - TPtrC bmpFileName = reader.ReadTPtrC(); - TInt32 imgMajorSkinId = reader.ReadInt32(); - TAknsItemID id; - - for (TInt index = 0; index <= EKeyBmpLastType ; index += 2) - { - // Get the image ids and mask ids from resource - TInt bmpId = reader.ReadInt16(); - TInt bmpMskId = reader.ReadInt16(); - - // read skin item id - const TInt skinitemid = reader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidBmp) - { - CFbsBitmap* bmp = NULL; - CFbsBitmap* maskbmp = NULL; - - if (bmpMskId != KInvalidBmp) - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - maskbmp, - bmpFileName, - bmpId, - bmpMskId); - - // set maskbmp and size - iVkbCtrl->SetNonIrregularKeyBitmapL(TVirtualKeyBmpType(EKeyBmpNormal + index + 1), - maskbmp ); - } - else - { - AknsUtils::CreateIconL(AknsUtils::SkinInstance(), - id, - bmp, - bmpFileName, - bmpId); - } - - // set bmp and size - iVkbCtrl->SetNonIrregularKeyBitmapL( TVirtualKeyBmpType(EKeyBmpNormal + index), bmp ); - } - } - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - for( TInt i = 0; i < iVkbLayoutInfoList.Count(); i++ ) - { - iVkbLayoutInfoList[i]->iIrregular = EFalse; - } - - } -void CAknFepCtrlVkbLayout::CreateIrregularKeyBitmapsL(TResourceReader& reader, TPtrC& bmpFileName, - TVirtualKeyIrregularKeyType aKeyType) - { - int maskid = 0; - for(TInt index = 0; index <= EKeyStateDimmedMask; index += 2) - { - maskid = index + 1; - CreateIrregularKeyBitmapL(reader, bmpFileName, aKeyType , - (TVirtualKeyIrregularKeyState)index, - (TVirtualKeyIrregularKeyState)maskid); - } - } - -void CAknFepCtrlVkbLayout::CreateIrregularKeyBitmapL(TResourceReader& reader, TPtrC& bmpFileName, - TVirtualKeyIrregularKeyType aKeyType , - TVirtualKeyIrregularKeyState aKeyState, - TVirtualKeyIrregularKeyState aKeyStateMask) - { - CFbsBitmap* bitmap = NULL; - CFbsBitmap* bitmapmaks = NULL; - TAknsItemID id; - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - TInt bmpID = reader.ReadInt16(); - TInt bmpmaskID = reader.ReadInt16(); - TInt minorskinID = reader.ReadInt16(); - id.Set(TInt(EAknsMajorGeneric), minorskinID); - - if (bmpID > 0) - { - - AknsUtils::CreateIconL( skininstance, - id, - bitmap, - bitmapmaks, - bmpFileName, - bmpID, - bmpmaskID ); - - if (bitmapmaks) - { - AknIconUtils::DisableCompression(bitmapmaks); - } - - if (bitmap && iVkbCtrl) - { - iVkbCtrl->AddIrregularKeyBitmapL(aKeyType, aKeyState, bitmap); - } - - if (bitmapmaks && iVkbCtrl) - { - iVkbCtrl->AddIrregularKeyBitmapL(aKeyType, aKeyStateMask, bitmapmaks); - } - } - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::SetResourceId -// Set resurce Id -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlVkbLayout::SetResourceId(TInt32 aResId) - { - iResourceId = aResId; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::ConstructFromResourceL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlVkbLayout::ConstructFromResourceL() - { - if ( iResourceId < 0 ) - { - return; - } - - TResourceReader reader; - - CCoeEnv::Static()->CreateResourceReaderLC( reader, iResourceId ); - - TInt count = reader.ReadInt16(); - - if( iFirstTimeConstruct ) - { - iVkbLayoutInfoList.ResetAndDestroy(); - for ( TInt i = 0; i < count; i++ ) - { - CPeninputVkbLayoutInfo* vkbLayoutInfo = - CPeninputVkbLayoutInfo::NewL( reader ); - - if (iVkbCtrl) - { - vkbLayoutInfo->iIrregular = iVkbCtrl->IsIrregularKeyBoard(); - } - iVkbLayoutInfoList.Append( vkbLayoutInfo ); - } - } - else - { - // vkb keyboard must reset first, because iKeyInfoList will reset and destroy later - - if( iVkbCtrl != NULL ) - { - iVkbCtrl->Reset(); - } - - for ( TInt i = 0; i < count; i++ ) - { - iVkbLayoutInfoList[i]->ConstructFromResourceL( reader, iVkbCtrl, iVkbLayoutId ); - iVkbLayoutInfoList[i]->ResetSize( - iVkbLayoutInfoList[i]->UnitWidth(), - iVkbLayoutInfoList[i]->UnitHeight(), - iVkbLayoutInfoList[i]->UnitCharWidth(), - iVkbLayoutInfoList[i]->UnitCharHeight(), - iVkbLayoutInfoList[i]->CharLeftTopPoint(), - iVkbLayoutInfoList[i]->CharFont() ); - - if (iVkbCtrl) - { - iVkbLayoutInfoList[i]->iIrregular = iVkbCtrl->IsIrregularKeyBoard(); - } - } - } - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::VkbLayoutInfoList -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C RPointerArray CAknFepCtrlVkbLayout::VkbLayoutInfoList() - { - return iVkbLayoutInfoList; - } - -// --------------------------------------------------------------------------- -// CAknFepCtrlVkbLayout::ChangeVkbLayout -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CAknFepCtrlVkbLayout::ChangeVkbLayout( TInt aVkbLayoutId ) - { - if( iVkbLayoutId == aVkbLayoutId ) - { - return; - } - iVkbLayoutId = aVkbLayoutId; - for( TInt i = 0; i < iVkbLayoutInfoList.Count(); i++ ) - { - if( aVkbLayoutId == iVkbLayoutInfoList[i]->LayoutID() ) - { - iVkbCtrl->ReorganizeVkbKeys( iVkbLayoutInfoList[i] ); - - return; - } - } - } - -// ------------------------------------------------------------------------ -// CPeninputVkbKeyInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputVkbKeyInfo* CPeninputVkbKeyInfo::NewL( - TResourceReader& aReader ) - { - CPeninputVkbKeyInfo* self = new ( ELeave ) CPeninputVkbKeyInfo(); - - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputVkbKeyInfo::~CPeninputVkbKeyInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputVkbKeyInfo::~CPeninputVkbKeyInfo() - { - delete iKey; - iKey = NULL; - delete iUnicode; - iUnicode = NULL; - } - -// ------------------------------------------------------------------------ -// CPeninputVkbKeyInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputVkbKeyInfo::ConstructL( TResourceReader& aReader ) - { - ConstructFromResourceL( aReader ); - } - -// ------------------------------------------------------------------------ -// CPeninputVkbKeyInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputVkbKeyInfo::ConstructFromResourceL( TResourceReader& aReader ) - { - iUnicode = aReader.ReadHBufCL(); - iScanCode = aReader.ReadInt16(); - iBeginRow = aReader.ReadInt16(); - iBeginColumn = aReader.ReadInt16(); - iEndRow = aReader.ReadInt16(); - iEndColumn = aReader.ReadInt16(); - iHighlightBmpIndex = aReader.ReadInt16(); - iHighlightMaskBmpIndex = aReader.ReadInt16(); - TPtrC displayUnicode = aReader.ReadTPtrC(); - - TInt baseLine = 0; - iKey = CVirtualKey::NewL( *iUnicode, iScanCode, TRect(), - TRect(), baseLine, iHighlightBmpIndex, iHighlightMaskBmpIndex ); - if( displayUnicode.Length() != 0 ) - { - iKey->SetDisplayUnicodeL( displayUnicode ); - } - } - -TVirtualKeyIrregularKeyType CPeninputVkbKeyInfo::KeyTypeFromColumn(TInt aColumns) - { - if (iBeginColumn == 0) - { - return EKeyLeftDown; - } - - if ((iBeginColumn == aColumns - 1) && (aColumns % 2 == 0)) - { - return EKeyRightUp; - } - - if ((iBeginColumn == aColumns - 1) && (aColumns % 2 == 1)) - { - return EKeyRightDown; - } - - if (iBeginColumn % 2 == 0) - { - return EKeyMiddleDown; - } - - return EKeyMiddleUp; - } - -void CPeninputVkbKeyInfo::SetIrregularKeyType(TInt aColumns) - { - if (iKey) - { - iKey->SetIrregualrKeyType(KeyTypeFromColumn(aColumns)); - } - } -// ------------------------------------------------------------------------ -// CPeninputVkbKeyInfo::CreateKeyL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputVkbKeyInfo::CreateKeyL() - { - TInt baseLine = 0; - iKey = CVirtualKey::NewL( *iUnicode, iScanCode, TRect(), - TRect(), baseLine, iHighlightBmpIndex, iHighlightMaskBmpIndex ); - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputVkbLayoutInfo* CPeninputVkbLayoutInfo::NewL( - TResourceReader& aReader ) - { - CPeninputVkbLayoutInfo* self = NewLC( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputVkbLayoutInfo* CPeninputVkbLayoutInfo::NewLC( - TResourceReader& aReader ) - { - CPeninputVkbLayoutInfo* self = new ( ELeave ) CPeninputVkbLayoutInfo(); - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::GetRealSize -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C const TSize CPeninputVkbLayoutInfo::GetRealSize( - const TInt aUnitWidth, const TInt aUnitHeight ) const - { - return TSize( aUnitWidth * iColumns, aUnitHeight * iRows ); - } - -EXPORT_C void CPeninputVkbLayoutInfo::ResetLayoutInfo(const TSize& aSize) - { - AknIconUtils::SetSize( iBgBmp, aSize, EAspectRatioNotPreserved ); - AknIconUtils::SetSize( iBgMaskBmp, aSize, EAspectRatioNotPreserved ); - - } - -EXPORT_C void CPeninputVkbLayoutInfo::SetKeyInfo(const TInt aRow, - const TInt aColumn, - const TRect& aKeyRect, - const TRect& aCharRect, - const CFont* aFont) - { - RPointerArray keyInfoList = KeyInfoList(); - TInt count = keyInfoList.Count(); - - for (TInt i = 0; i < count; i++ ) - { - if (keyInfoList[i] && - keyInfoList[i]->BeginColumn() == aColumn && - keyInfoList[i]->BeginRow() == aRow) - { - keyInfoList[i]->Key()->SetRect( aKeyRect ); - - return; - } - } - } - - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::ResetSize -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputVkbLayoutInfo::ResetSize( - const TInt aUnitWidth, - const TInt aUnitHeight, - const TInt aUnitCharWidth, - const TInt aUnitCharHeight, - const TPoint& aCharLeftTopPoint, - const CFont* aFont ) - { - iUnitWidth = aUnitWidth; - iUnitHeight = aUnitHeight; - iUnitCharWidth = aUnitCharWidth; - iUnitCharHeight = aUnitCharHeight; - iCharLeftTopPoint = aCharLeftTopPoint; - iFont = aFont; - - iLastTopLeft = TPoint( 0, 0 ); - - // 1.Resize bk bmp and mask bmp - AknIconUtils::SetSize( iBgBmp, - TSize( aUnitWidth * iColumns, aUnitHeight * iRows ), - EAspectRatioNotPreserved ); - AknIconUtils::SetSize( iBgMaskBmp, - TSize( aUnitWidth * iColumns, aUnitHeight * iRows ), - EAspectRatioNotPreserved ); - - // 2.Resize dim bmp and mask bmp - AknIconUtils::SetSize( iDimBmp, TSize( aUnitWidth, aUnitHeight ), - EAspectRatioNotPreserved ); - AknIconUtils::SetSize( iDimMaskBmp, TSize( aUnitWidth, aUnitHeight ), - EAspectRatioNotPreserved ); - - // 3.Resize all highlight bmp and mask bmp - TInt count = iHighlightBmps.Count(); - TInt i = 0; - - for ( i = 0; i < count; i++ ) - { - AknIconUtils::SetSize( iHighlightBmps[i], - TSize( aUnitWidth, aUnitHeight ), EAspectRatioNotPreserved ); - } - - count = iHighlightMaskBmps.Count(); - for ( i = 0; i < count; i++ ) - { - AknIconUtils::SetSize( iHighlightMaskBmps[i], - TSize( aUnitWidth, aUnitHeight ), EAspectRatioNotPreserved ); - } - - // 4.For every key, reset the key rect and char rect - RPointerArray keyInfoList = KeyInfoList(); - count = keyInfoList.Count(); - TPoint keyLeftTop; - TInt rows; - TInt columns; - TRect rect; - - for ( i = 0; i < count; i++ ) - { - if ( keyInfoList[i]->Key() ) - { - if (keyInfoList[i]->BeginColumn() == 0) - { - keyLeftTop = TPoint( keyInfoList[i]->BeginColumn() * aUnitWidth, - keyInfoList[i]->BeginRow() * aUnitHeight ); - } - else - { - keyLeftTop = TPoint( keyInfoList[i]->BeginColumn() * aUnitWidth - - 6 * keyInfoList[i]->BeginColumn(), - keyInfoList[i]->BeginRow() * aUnitHeight ); - } - - if (!iIrregular) - { - keyLeftTop = TPoint( keyInfoList[i]->BeginColumn() * aUnitWidth, - keyInfoList[i]->BeginRow() * aUnitHeight ); - } - - - rows = keyInfoList[i]->EndRow() - keyInfoList[i]->BeginRow(); - columns = keyInfoList[i]->EndColumn() - - keyInfoList[i]->BeginColumn(); - - //Set key rect - rect = TRect( keyLeftTop, TSize( columns * aUnitWidth, - rows * aUnitHeight ) ); - keyInfoList[i]->Key()->SetRect( rect ); - } - } - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::~CPeninputVkbLayoutInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputVkbLayoutInfo::~CPeninputVkbLayoutInfo() - { - delete iBgBmp; - iBgBmp = NULL; - delete iBgMaskBmp; - iBgMaskBmp = NULL; - delete iDimBmp; - iDimBmp = NULL; - delete iDimMaskBmp; - iDimMaskBmp = NULL; - - iHighlightBmps.ResetAndDestroy(); - iHighlightBmps.Close(); - - iHighlightMaskBmps.ResetAndDestroy(); - iHighlightMaskBmps.Close(); - - iKeyInfoList.ResetAndDestroy(); - iKeyInfoList.Close(); - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::FindKey -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputVkbKeyInfo* CPeninputVkbLayoutInfo::FindKey( - const TInt aUnicode ) const - { - const TInt count = iKeyInfoList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( (*iKeyInfoList[i]->Unicode())[0] == aUnicode ) - { - return iKeyInfoList[i]; - } - } - - return NULL; - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::MoveKeys -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputVkbLayoutInfo::MoveKeys( const TPoint& aTopLeft ) - { - RPointerArray keyInfoList = KeyInfoList(); - const TInt count = keyInfoList.Count(); - const TPoint difference = aTopLeft - iLastTopLeft; - TRect rect; - - for ( TInt i = 0; i < count; i++ ) - { - if ( keyInfoList[i]->Key() ) - { - //Set key rect - rect = keyInfoList[i]->Key()->Rect(); - rect.SetRect( rect.iTl + difference, rect.Size() ); - keyInfoList[i]->Key()->SetRect( rect ); - } - } - - iLastTopLeft = aTopLeft; - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::CPeninputVkbLayoutInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -CPeninputVkbLayoutInfo::CPeninputVkbLayoutInfo() - : iCharLeftTopPoint( TPoint(0,0) ) - { - iLastTopLeft = TPoint( 0, 0 ); - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputVkbLayoutInfo::ConstructL( TResourceReader& aReader ) - { - - ConstructFromResourceL( aReader ); - } - -// ------------------------------------------------------------------------ -// CPeninputVkbLayoutInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputVkbLayoutInfo::ConstructFromResourceL( TResourceReader& aReader, - CPeninputVkbCtrlExt* aVkbCtrl, - TInt aVkbLayoutId ) - { - delete iBgBmp; - iBgBmp = NULL; - delete iBgMaskBmp; - iBgMaskBmp = NULL; - delete iDimBmp; - iDimBmp = NULL; - delete iDimMaskBmp; - iDimMaskBmp = NULL; - - iHighlightBmps.ResetAndDestroy(); - iHighlightBmps.Close(); - - iHighlightMaskBmps.ResetAndDestroy(); - iHighlightMaskBmps.Close(); - - iKeyInfoList.ResetAndDestroy(); - iKeyInfoList.Close(); - - iLayoutID = aReader.ReadInt16(); - - // Read the file name of the bmps - TPtrC bmpFileName = aReader.ReadTPtrC(); - TInt32 imgMajorSkinId = aReader.ReadInt32(); - - TInt layoutBmpId = aReader.ReadInt16(); - TInt layoutBmpMaskId = aReader.ReadInt16(); - TInt layoutBmpSkinId = aReader.ReadInt16(); - - TAknsItemID id; - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - id.Set(TInt( imgMajorSkinId ), layoutBmpSkinId); - - if ( layoutBmpId != KInvalidBmp) - { - if ( layoutBmpMaskId != KInvalidBmp) - { - AknsUtils::CreateIconL( skininstance, - id, - iBgBmp, - iBgMaskBmp, - bmpFileName, - layoutBmpId, - layoutBmpMaskId ); - } - else - { - AknsUtils::CreateIconL( skininstance, - id, - iBgBmp, - bmpFileName, - layoutBmpId ); - } - } - - TInt dimBmpId = aReader.ReadInt16(); - TInt dimMaskBmpId = aReader.ReadInt16(); - TInt dimBmpSkinId = aReader.ReadInt16(); - - id.Set( TInt( imgMajorSkinId ), dimBmpSkinId ); - - if ( dimBmpId != KInvalidBmp ) - { - if ( dimMaskBmpId != KInvalidBmp ) - { - AknsUtils::CreateIconL( skininstance, - id, - iDimBmp, - iDimMaskBmp, - bmpFileName, - dimBmpId, - dimMaskBmpId ); - } - else - { - AknsUtils::CreateIconL( skininstance, - id, - iDimBmp, - bmpFileName, - dimBmpId ); - } - } - - iColumns = aReader.ReadInt16(); - iRows = aReader.ReadInt16(); - - TInt i; - TInt count = aReader.ReadInt16(); - TInt bmpId; - - for ( i = 0; i < count; i++ ) - { - bmpId = aReader.ReadInt16(); - if ( bmpId != KInvalidBmp ) - { - CFbsBitmap* bmp = AknIconUtils::CreateIconL( bmpFileName, - bmpId ); - CleanupStack::PushL( bmp ); - iHighlightBmps.Append( bmp ); - CleanupStack::Pop( bmp ); - } - } - - count = aReader.ReadInt16(); - for ( i = 0; i < count; i++ ) - { - bmpId = aReader.ReadInt16(); - if ( bmpId != KInvalidBmp ) - { - CFbsBitmap* bmp = AknIconUtils::CreateIconL( bmpFileName, bmpId ); - CleanupStack::PushL( bmp ); - iHighlightMaskBmps.Append( bmp ); - CleanupStack::Pop( bmp ); - } - } - - count = aReader.ReadInt16(); - - for ( i = 0; i < count; i++ ) - { - CPeninputVkbKeyInfo* keyInfo = CPeninputVkbKeyInfo::NewL( aReader ); - keyInfo->SetIrregularKeyType(iColumns); - iKeyInfoList.Append( keyInfo ); - } - - if ( ( iLayoutID == aVkbLayoutId ) && ( aVkbCtrl ) ) - { - aVkbCtrl->ReorganizeVkbKeys( this ); - } - } -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/srcdata/peninputmodeswitchutils.rss --- a/textinput/peninputcommonctrls/srcdata/peninputmodeswitchutils.rss Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource definitions for project peninputgenericitut -* -*/ - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonctrls/srcdata/peninputmodeswitchutilsnew.rss --- a/textinput/peninputcommonctrls/srcdata/peninputmodeswitchutilsnew.rss Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource definitions for project peninputgenericitut -* -*/ - -// RESOURCE IDENTIFIER -NAME PIMS - -#include -#include -#include -#include - -#include -#include -#include -#include - -STRUCT AKN_FEP_POPUP_WINDOW - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - WORD bgbmp=0xffff; - WORD bgmaskbmp=0xffff; - WORD bgbmpskinid=0xffff; - - WORD focusbmp=0xffff; - WORD focusmaskbmp=0xffff; - WORD focusbmpskinid=0xffff; - } - - -//////////////////////////////////////////loc begin///////////////////////////////// -// LOCALISATION STRINGS - -//d:Text in touch input mode swither list -//d:virtual ITUT touch input method -//l:list_single_choice_list_pane_t1 -//r: 5.0 -//#define qtn_input_switcher_itu_t "Virtual ITU-T" - -//d:Text in touch input mode swither list -//d:full sreen qwerty touch input method -//l:list_single_choice_list_pane_t1 -//r: 5.0 -//#define qtn_input_switcher_fs_qwerty "Full Screen Qwerty" - -//d:Text in touch input mode swither list -//d:small virtual key board touch input method -//l:list_single_choice_list_pane_t1 -//r: 5.0 -//#define qtn_input_switcher_vkb "VKB" - -//d:Text in touch input mode swither list -//d:Handwritting Recognition touch input method -//l:list_single_choice_list_pane_t1 -//r: 5.0 -//#define qtn_input_switcher_hwr "HWR" - -//d:Text in touch input mode swither list -//d:full screen HWR touch input method -//l:list_single_choice_list_pane_t1 -//r: 5.0 -//#define qtn_input_switcher_fs_hwr "Full Screen HWR" - - -//d:Text in candidate match selection list -//d:The last item meaning to enger the spell mode -//l:list_vitu2_match_list_item_pane_t1 -//r: 5.0 -//#define qtn_t9_match_selection_list "Spell" - - -//d:column for ICF prompt text -//l:field_vitu2_entry_pane_t1 -//r: 5.0 -//#define qtn_colon_in_prompt ":" - - - -//d:Text in candidate listt -//d:current page /total pages information -//l:vitu2_page_scroll_pane_t1 -//r: 5.0 -//#define qtn_paging_number_match_selection "%0N/%1N" - - -//d:Text for T9 spelling prompt text -//l:popup_vitu2_query_window_t1 -//r: 5.0 -//#define qtn_t9_spell_query "Word" - - -// End of File -//////////////////////////////////////////loc end///////////////////////////////// - -#define AKN_FEP_VKB_BMP "z:\\resource\\apps\\peninputmodeswitcher.mbm" - -RESOURCE LBUF r_peninputmode_hwr - { - txt=qtn_input_switcher_hwr; - } - -RESOURCE LBUF r_peninputmode_fullhwr - { - txt=qtn_input_switcher_fs_hwr; - } - -RESOURCE LBUF r_peninputmode_vkb - { - txt=qtn_input_switcher_vkb; - } - -RESOURCE LBUF r_peninputmode_fingeritut - { - txt=qtn_input_switcher_itu_t; - } - -RESOURCE LBUF r_peninputmode_fullqwerty - { - txt=qtn_input_switcher_fs_qwerty; - } - -RESOURCE LBUF r_peninput_selection_list_page_num - { - txt=qtn_paging_number_match_selection; - } - -RESOURCE LBUF r_peninput_selection_list_spell - { - txt=qtn_t9_match_selection_list; - } - -RESOURCE LBUF r_peninput_spelling_prompt - { - txt=qtn_t9_spell_query; - } - -RESOURCE LBUF r_peninput_prompt_colon - { - txt=qtn_colon_in_prompt; - } - -RESOURCE AKN_FEP_INPUTMODE_NAMEARRAY r_peninputmode_names - { - names= - { - AKN_FEP_INPUTMODE_NAME - { - modeid = EPluginInputModeHwr; - txt = qtn_input_switcher_hwr; - }, - AKN_FEP_INPUTMODE_NAME - { - modeid = EPluginInputModeVkb; - txt = qtn_input_switcher_vkb; - }, - AKN_FEP_INPUTMODE_NAME - { - modeid = EPluginInputModeFSQ; - txt = qtn_input_switcher_fs_qwerty; - }, - AKN_FEP_INPUTMODE_NAME - { - modeid = EPluginInputModeItut; - txt = qtn_input_switcher_itu_t; - }, - AKN_FEP_INPUTMODE_NAME - { - modeid = EPluginInputModeFSc; - txt = qtn_input_switcher_fs_hwr; - }, - AKN_FEP_INPUTMODE_NAME - { - modeid = EPluginInputModeFingerHwr; - txt = qtn_input_switcher_hwr; - } - }; - } - -RESOURCE AKN_FEP_POPUP_WINDOW peninputmode_switch_choicelist - { - bmpfile=AKN_FEP_VKB_BMP; - imgmajorskinid=EAknsMajorGeneric; - bgbmp=EMbmPeninputmodeswitcherQgn_graf_fep_candi_list_sec; - bgmaskbmp=EMbmPeninputmodeswitcherQgn_graf_fep_candi_list_sec_mask; - bgbmpskinid=EAknsMinorGenericQgnGrafFepCandiListSec; - - focusbmp=EMbmPeninputmodeswitcherQgn_graf_fep_candi_list_sel; - focusmaskbmp=EMbmPeninputmodeswitcherQgn_graf_fep_candi_list_sel_mask; - focusbmpskinid=EAknsMinorGenericQgnGrafFepCandiListSel; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF --- a/textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -EXPORTS - ??0CPeninputCommonLayout@@IAE@PAVMLayoutOwner@@@Z @ 1 NONAME ; CPeninputCommonLayout::CPeninputCommonLayout(class MLayoutOwner *) - ??0CPeninputDataConverter@@IAE@XZ @ 2 NONAME ; CPeninputDataConverter::CPeninputDataConverter(void) - ??0CPeninputDataMgr@@IAE@PAVMPeninputLayoutContext@@@Z @ 3 NONAME ; CPeninputDataMgr::CPeninputDataMgr(class MPeninputLayoutContext *) - ??0CPeninputLayoutWindow@@IAE@PAVCFepUiLayout@@PAVMPeninputLayoutContext@@@Z @ 4 NONAME ; CPeninputLayoutWindow::CPeninputLayoutWindow(class CFepUiLayout *, class MPeninputLayoutContext *) - ??0CPeninputUiStateBase@@IAE@PAVMPeninputUiStateMgr@@PAVMPeninputLayoutContext@@@Z @ 5 NONAME ; CPeninputUiStateBase::CPeninputUiStateBase(class MPeninputUiStateMgr *, class MPeninputLayoutContext *) - ??1CPeninputClientLayoutInfo@@UAE@XZ @ 6 NONAME ; CPeninputClientLayoutInfo::~CPeninputClientLayoutInfo(void) - ??1CPeninputCommonLayout@@UAE@XZ @ 7 NONAME ; CPeninputCommonLayout::~CPeninputCommonLayout(void) - ??1CPeninputControlInfo@@UAE@XZ @ 8 NONAME ; CPeninputControlInfo::~CPeninputControlInfo(void) - ??1CPeninputCtrlPool@@UAE@XZ @ 9 NONAME ; CPeninputCtrlPool::~CPeninputCtrlPool(void) - ??1CPeninputDataConverter@@UAE@XZ @ 10 NONAME ; CPeninputDataConverter::~CPeninputDataConverter(void) - ??1CPeninputDataMgr@@UAE@XZ @ 11 NONAME ; CPeninputDataMgr::~CPeninputDataMgr(void) - ??1CPeninputLayoutConfig@@UAE@XZ @ 12 NONAME ; CPeninputLayoutConfig::~CPeninputLayoutConfig(void) - ??1CPeninputLayoutWindow@@UAE@XZ @ 13 NONAME ; CPeninputLayoutWindow::~CPeninputLayoutWindow(void) - ??1CPeninputNumericKepMappingMgr@@UAE@XZ @ 14 NONAME ; CPeninputNumericKepMappingMgr::~CPeninputNumericKepMappingMgr(void) - ??1CPeninputRangeBarInfo@@UAE@XZ @ 15 NONAME ; CPeninputRangeBarInfo::~CPeninputRangeBarInfo(void) - ??1CPeninputRangeInfo@@UAE@XZ @ 16 NONAME ; CPeninputRangeInfo::~CPeninputRangeInfo(void) - ??1CPeninputShiftCapsInfo@@UAE@XZ @ 17 NONAME ; CPeninputShiftCapsInfo::~CPeninputShiftCapsInfo(void) - ??1CPeninputUiStateBase@@UAE@XZ @ 18 NONAME ; CPeninputUiStateBase::~CPeninputUiStateBase(void) - ??1CPeninputUiStateMgr@@UAE@XZ @ 19 NONAME ; CPeninputUiStateMgr::~CPeninputUiStateMgr(void) - ?AddControl@CPeninputCtrlPool@@QAEXPAVCFepUiBaseCtrl@@@Z @ 20 NONAME ; void CPeninputCtrlPool::AddControl(class CFepUiBaseCtrl *) - ?AddControlInfo@CPeninputClientLayoutInfo@@QAEXPAVCPeninputControlInfo@@@Z @ 21 NONAME ; void CPeninputClientLayoutInfo::AddControlInfo(class CPeninputControlInfo *) - ?AddNotOwnedControl@CPeninputLayoutWindow@@IAEXPAVCFepUiBaseCtrl@@@Z @ 22 NONAME ; void CPeninputLayoutWindow::AddNotOwnedControl(class CFepUiBaseCtrl *) - ?AddUiState@CPeninputUiStateMgr@@UAEXPAVCPeninputUiStateBase@@H@Z @ 23 NONAME ; void CPeninputUiStateMgr::AddUiState(class CPeninputUiStateBase *, int) - ?AnyToInt@CPeninputDataConverter@@SAHPAX@Z @ 24 NONAME ; int CPeninputDataConverter::AnyToInt(void *) - ?CaseByShiftCapslockStatus@CPeninputLayoutWindow@@AAEHXZ @ 25 NONAME ; int CPeninputLayoutWindow::CaseByShiftCapslockStatus(void) - ?ChangeButtonStatus@CPeninputLayoutWindow@@IAEXHH@Z @ 26 NONAME ; void CPeninputLayoutWindow::ChangeButtonStatus(int, int) - ?ChangeClientLayout@CPeninputLayoutWindow@@QAEXH@Z @ 27 NONAME ; void CPeninputLayoutWindow::ChangeClientLayout(int) - ?ChangeInputLanguageL@CPeninputLayoutWindow@@QAEXH@Z @ 28 NONAME ; void CPeninputLayoutWindow::ChangeInputLanguageL(int) - ?ChangeLayoutPosition@CPeninputLayoutWindow@@IAEXH@Z @ 29 NONAME ; void CPeninputLayoutWindow::ChangeLayoutPosition(int) - ?ChangeRange@CPeninputLayoutWindow@@QAEXHHH@Z @ 30 NONAME ; void CPeninputLayoutWindow::ChangeRange(int, int, int) - ?ChangeVkbLayout@CPeninputLayoutWindow@@QAEXH@Z @ 31 NONAME ; void CPeninputLayoutWindow::ChangeVkbLayout(int) - ?CombinationToDesc@CPeninputDataConverter@@SAXHIAAVTDes16@@@Z @ 32 NONAME ; void CPeninputDataConverter::CombinationToDesc(int, unsigned int, class TDes16 &) - ?ConfigInfo@CPeninputLayoutWindow@@QBEPAVCPeninputLayoutConfig@@XZ @ 33 NONAME ; class CPeninputLayoutConfig * CPeninputLayoutWindow::ConfigInfo(void) const - ?Construct@CPeninputCtrlPool@@IAEXXZ @ 34 NONAME ; void CPeninputCtrlPool::Construct(void) - ?Construct@CPeninputUiStateBase@@IAEXXZ @ 35 NONAME ; void CPeninputUiStateBase::Construct(void) - ?ConstructFromResourceL@CPeninputClientLayoutInfo@@QAEXAAVTResourceReader@@@Z @ 36 NONAME ; void CPeninputClientLayoutInfo::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CPeninputLayoutWindow@@MAEXAAVTResourceReader@@@Z @ 37 NONAME ; void CPeninputLayoutWindow::ConstructFromResourceL(class TResourceReader &) - ?ConstructFromResourceL@CPeninputLayoutWindow@@MAEXXZ @ 38 NONAME ; void CPeninputLayoutWindow::ConstructFromResourceL(void) - ?ConstructL@CPeninputCommonLayout@@IAEXPBX@Z @ 39 NONAME ; void CPeninputCommonLayout::ConstructL(void const *) - ?ConstructL@CPeninputDataMgr@@IAEXXZ @ 40 NONAME ; void CPeninputDataMgr::ConstructL(void) - ?ConstructL@CPeninputLayoutWindow@@IAEXXZ @ 41 NONAME ; void CPeninputLayoutWindow::ConstructL(void) - ?Control@CPeninputCtrlPool@@QBEPAVCFepUiBaseCtrl@@H@Z @ 42 NONAME ; class CFepUiBaseCtrl * CPeninputCtrlPool::Control(int) const - ?ControlByIndex@CPeninputCtrlPool@@QBEPAVCFepUiBaseCtrl@@H@Z @ 43 NONAME ; class CFepUiBaseCtrl * CPeninputCtrlPool::ControlByIndex(int) const - ?ControlCount@CPeninputCtrlPool@@QBEHXZ @ 44 NONAME ; int CPeninputCtrlPool::ControlCount(void) const - ?Count@CPeninputNumericKepMappingMgr@@QBEHXZ @ 45 NONAME ; int CPeninputNumericKepMappingMgr::Count(void) const - ?CurrentUiState@CPeninputUiStateMgr@@UAEPAVCPeninputUiStateBase@@XZ @ 46 NONAME ; class CPeninputUiStateBase * CPeninputUiStateMgr::CurrentUiState(void) - ?DoClose@CPeninputLayoutWindow@@MAEHXZ @ 47 NONAME ; int CPeninputLayoutWindow::DoClose(void) - ?Draw@CPeninputLayoutWindow@@UAEXXZ @ 48 NONAME ; void CPeninputLayoutWindow::Draw(void) - ?FepCaseByCaseId@CPeninputDataConverter@@SAHH@Z @ 49 NONAME ; int CPeninputDataConverter::FepCaseByCaseId(int) - ?FindClientLayoutInfo@CPeninputLayoutConfig@@QAEPAVCPeninputClientLayoutInfo@@H@Z @ 50 NONAME ; class CPeninputClientLayoutInfo * CPeninputLayoutConfig::FindClientLayoutInfo(int) - ?FindControlInfo@CPeninputClientLayoutInfo@@QAEPAVCPeninputControlInfo@@H@Z @ 51 NONAME ; class CPeninputControlInfo * CPeninputClientLayoutInfo::FindControlInfo(int) - ?FindRange@CPeninputRangeBarInfo@@QAEPAVCPeninputRangeInfo@@H@Z @ 52 NONAME ; class CPeninputRangeInfo * CPeninputRangeBarInfo::FindRange(int) - ?FindShiftCapsInfo@CPeninputLayoutConfig@@QAEPAVCPeninputShiftCapsInfo@@H@Z @ 53 NONAME ; class CPeninputShiftCapsInfo * CPeninputLayoutConfig::FindShiftCapsInfo(int) - ?FindShiftCapsSingleByCase@CPeninputShiftCapsInfo@@QAEPAUTPeninputShiftCapsSingle@1@H@Z @ 54 NONAME ; struct CPeninputShiftCapsInfo::TPeninputShiftCapsSingle * CPeninputShiftCapsInfo::FindShiftCapsSingleByCase(int) - ?FindShiftCapsSingleById@CPeninputShiftCapsInfo@@QAEPAUTPeninputShiftCapsSingle@1@H@Z @ 55 NONAME ; struct CPeninputShiftCapsInfo::TPeninputShiftCapsSingle * CPeninputShiftCapsInfo::FindShiftCapsSingleById(int) - ?FindVkbLayoutInfo@CPeninputLayoutConfig@@QAEPAVCPeninputVkbLayoutInfo@@H@Z @ 56 NONAME ; class CPeninputVkbLayoutInfo * CPeninputLayoutConfig::FindVkbLayoutInfo(int) - ?GetUiState@CPeninputUiStateMgr@@UAEPAVCPeninputUiStateBase@@H@Z @ 57 NONAME ; class CPeninputUiStateBase * CPeninputUiStateMgr::GetUiState(int) - ?HandleCapslockBtnClicked@CPeninputLayoutWindow@@UAEXXZ @ 58 NONAME ; void CPeninputLayoutWindow::HandleCapslockBtnClicked(void) - ?HandleCommand@CPeninputCommonLayout@@UAEHHPAE@Z @ 59 NONAME ; int CPeninputCommonLayout::HandleCommand(int, unsigned char *) - ?HandleControlEvent@CPeninputCommonLayout@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 60 NONAME ; void CPeninputCommonLayout::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandleControlEvent@CPeninputLayoutWindow@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 61 NONAME ; void CPeninputLayoutWindow::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandleControlEvent@CPeninputUiStateBase@@UAEHHABVTDesC16@@@Z @ 62 NONAME ; int CPeninputUiStateBase::HandleControlEvent(int, class TDesC16 const &) - ?HandleGSRepositoryCallBack@CPeninputDataMgr@@KAHPAX@Z @ 63 NONAME ; int CPeninputDataMgr::HandleGSRepositoryCallBack(void *) - ?HandleGSRepositoryChange@CPeninputDataMgr@@UAEXH@Z @ 64 NONAME ; void CPeninputDataMgr::HandleGSRepositoryChange(int) - ?HandleKeyEventL@CPeninputUiStateBase@@UAEHABVTRawEvent@@@Z @ 65 NONAME ; int CPeninputUiStateBase::HandleKeyEventL(class TRawEvent const &) - ?HandleRangeEvent@CPeninputLayoutWindow@@UAEXH@Z @ 66 NONAME ; void CPeninputLayoutWindow::HandleRangeEvent(int) - ?HandleRangeLoopEvent@CPeninputLayoutWindow@@UAEXH@Z @ 67 NONAME ; void CPeninputLayoutWindow::HandleRangeLoopEvent(int) - ?HandleRawKeyEventL@CPeninputCommonLayout@@UAEHABVTRawEvent@@@Z @ 68 NONAME ; int CPeninputCommonLayout::HandleRawKeyEventL(class TRawEvent const &) - ?HandleShiftBtnClicked@CPeninputLayoutWindow@@UAEXXZ @ 69 NONAME ; void CPeninputLayoutWindow::HandleShiftBtnClicked(void) - ?Init@CPeninputCommonLayout@@MAE?AVTRect@@XZ @ 70 NONAME ; class TRect CPeninputCommonLayout::Init(void) - ?InitMore@CPeninputDataMgr@@UAEXXZ @ 71 NONAME ; void CPeninputDataMgr::InitMore(void) - ?IntToDesc@CPeninputDataConverter@@SAXIAAVTDes16@@@Z @ 72 NONAME ; void CPeninputDataConverter::IntToDesc(unsigned int, class TDes16 &) - ?IsCapsLockPermitted@CPeninputCommonLayout@@UAEHXZ @ 73 NONAME ; int CPeninputCommonLayout::IsCapsLockPermitted(void) - ?IsCapsLockPermitted@CPeninputDataMgr@@QAEHXZ @ 74 NONAME ; int CPeninputDataMgr::IsCapsLockPermitted(void) - ?IsShiftPermitted@CPeninputCommonLayout@@UAEHXZ @ 75 NONAME ; int CPeninputCommonLayout::IsShiftPermitted(void) - ?IsShiftPermitted@CPeninputDataMgr@@QAEHXZ @ 76 NONAME ; int CPeninputDataMgr::IsShiftPermitted(void) - ?IsValidDestination@CPeninputCommonLayout@@MAEHABVTRect@@PAVCDragBar@@AAH2H@Z @ 77 NONAME ; int CPeninputCommonLayout::IsValidDestination(class TRect const &, class CDragBar *, int &, int &, int) - ?KeyMappingStringL@CPeninputNumericKepMappingMgr@@QBEPAVHBufC16@@H@Z @ 78 NONAME ; class HBufC16 * CPeninputNumericKepMappingMgr::KeyMappingStringL(int) const - ?LayoutWindow@CPeninputCommonLayout@@QBEPAVCPeninputLayoutWindow@@XZ @ 79 NONAME ; class CPeninputLayoutWindow * CPeninputCommonLayout::LayoutWindow(void) const - ?NewL@CPeninputClientLayoutInfo@@SAPAV1@AAVTResourceReader@@@Z @ 80 NONAME ; class CPeninputClientLayoutInfo * CPeninputClientLayoutInfo::NewL(class TResourceReader &) - ?NewL@CPeninputControlInfo@@SAPAV1@AAVTResourceReader@@@Z @ 81 NONAME ; class CPeninputControlInfo * CPeninputControlInfo::NewL(class TResourceReader &) - ?NewL@CPeninputCtrlPool@@SAPAV1@XZ @ 82 NONAME ; class CPeninputCtrlPool * CPeninputCtrlPool::NewL(void) - ?NewL@CPeninputDataMgr@@SAPAV1@PAVMPeninputLayoutContext@@@Z @ 83 NONAME ; class CPeninputDataMgr * CPeninputDataMgr::NewL(class MPeninputLayoutContext *) - ?NewL@CPeninputLayoutConfig@@SAPAV1@AAVCAknFepCtrlVkbLayout@@AAVTResourceReader@@@Z @ 84 NONAME ; class CPeninputLayoutConfig * CPeninputLayoutConfig::NewL(class CAknFepCtrlVkbLayout &, class TResourceReader &) - ?NewL@CPeninputNumericKepMappingMgr@@SAPAV1@VTResourceReader@@@Z @ 85 NONAME ; class CPeninputNumericKepMappingMgr * CPeninputNumericKepMappingMgr::NewL(class TResourceReader) - ?NewL@CPeninputRangeBarInfo@@SAPAV1@AAVTResourceReader@@@Z @ 86 NONAME ; class CPeninputRangeBarInfo * CPeninputRangeBarInfo::NewL(class TResourceReader &) - ?NewL@CPeninputRangeInfo@@SAPAV1@AAVTResourceReader@@@Z @ 87 NONAME ; class CPeninputRangeInfo * CPeninputRangeInfo::NewL(class TResourceReader &) - ?NewL@CPeninputShiftCapsInfo@@SAPAV1@AAVTResourceReader@@@Z @ 88 NONAME ; class CPeninputShiftCapsInfo * CPeninputShiftCapsInfo::NewL(class TResourceReader &) - ?NewL@CPeninputUiStateBase@@SAPAV1@PAVMPeninputUiStateMgr@@PAVMPeninputLayoutContext@@@Z @ 89 NONAME ; class CPeninputUiStateBase * CPeninputUiStateBase::NewL(class MPeninputUiStateMgr *, class MPeninputLayoutContext *) - ?NewL@CPeninputUiStateMgr@@SAPAV1@PAVMPeninputLayoutContext@@@Z @ 90 NONAME ; class CPeninputUiStateMgr * CPeninputUiStateMgr::NewL(class MPeninputLayoutContext *) - ?NewLC@CPeninputClientLayoutInfo@@SAPAV1@AAVTResourceReader@@@Z @ 91 NONAME ; class CPeninputClientLayoutInfo * CPeninputClientLayoutInfo::NewLC(class TResourceReader &) - ?NewLC@CPeninputCtrlPool@@SAPAV1@XZ @ 92 NONAME ; class CPeninputCtrlPool * CPeninputCtrlPool::NewLC(void) - ?NewLC@CPeninputDataMgr@@SAPAV1@PAVMPeninputLayoutContext@@@Z @ 93 NONAME ; class CPeninputDataMgr * CPeninputDataMgr::NewLC(class MPeninputLayoutContext *) - ?NewLC@CPeninputNumericKepMappingMgr@@SAPAV1@VTResourceReader@@@Z @ 94 NONAME ; class CPeninputNumericKepMappingMgr * CPeninputNumericKepMappingMgr::NewLC(class TResourceReader) - ?NewLC@CPeninputRangeBarInfo@@SAPAV1@AAVTResourceReader@@@Z @ 95 NONAME ; class CPeninputRangeBarInfo * CPeninputRangeBarInfo::NewLC(class TResourceReader &) - ?NewLC@CPeninputRangeInfo@@SAPAV1@AAVTResourceReader@@@Z @ 96 NONAME ; class CPeninputRangeInfo * CPeninputRangeInfo::NewLC(class TResourceReader &) - ?NewLC@CPeninputShiftCapsInfo@@SAPAV1@AAVTResourceReader@@@Z @ 97 NONAME ; class CPeninputShiftCapsInfo * CPeninputShiftCapsInfo::NewLC(class TResourceReader &) - ?NewLC@CPeninputUiStateMgr@@SAPAV1@PAVMPeninputLayoutContext@@@Z @ 98 NONAME ; class CPeninputUiStateMgr * CPeninputUiStateMgr::NewLC(class MPeninputLayoutContext *) - ?NotifyEngine@CPeninputDataMgr@@UAEXW4TPeninputDataType@@PAX@Z @ 99 NONAME ; void CPeninputDataMgr::NotifyEngine(enum TPeninputDataType, void *) - ?OnAppEditorTextComing@CPeninputCommonLayout@@UAEHABUTFepInputContextFieldData@@@Z @ 100 NONAME ; int CPeninputCommonLayout::OnAppEditorTextComing(struct TFepInputContextFieldData const &) - ?ReadIcfInfo@CPeninputLayoutWindow@@IAEXVTResourceReader@@@Z @ 101 NONAME ; void CPeninputLayoutWindow::ReadIcfInfo(class TResourceReader) - ?ReconfigUnitSize@CPeninputLayoutWindow@@UAEHH@Z @ 102 NONAME ; int CPeninputLayoutWindow::ReconfigUnitSize(int) - ?RemoveControl@CPeninputCtrlPool@@QAEXH@Z @ 103 NONAME ; void CPeninputCtrlPool::RemoveControl(int) - ?RemoveControlInfo@CPeninputClientLayoutInfo@@QAEXH@Z @ 104 NONAME ; void CPeninputClientLayoutInfo::RemoveControlInfo(int) - ?RemoveControlInfo@CPeninputClientLayoutInfo@@QAEXPAVCPeninputControlInfo@@@Z @ 105 NONAME ; void CPeninputClientLayoutInfo::RemoveControlInfo(class CPeninputControlInfo *) - ?RequestData@CPeninputCommonLayout@@UAEPAXW4TPeninputDataType@@@Z @ 106 NONAME ; void * CPeninputCommonLayout::RequestData(enum TPeninputDataType) - ?RequestData@CPeninputDataMgr@@UAEPAXW4TPeninputDataType@@@Z @ 107 NONAME ; void * CPeninputDataMgr::RequestData(enum TPeninputDataType) - ?Reset@CPeninputCtrlPool@@QAEXXZ @ 108 NONAME ; void CPeninputCtrlPool::Reset(void) - ?Reset@CPeninputDataMgr@@UAEXXZ @ 109 NONAME ; void CPeninputDataMgr::Reset(void) - ?Reset@CPeninputNumericKepMappingMgr@@QAEXXZ @ 110 NONAME ; void CPeninputNumericKepMappingMgr::Reset(void) - ?SaveKey@CPeninputCommonLayout@@MAEXHH@Z @ 111 NONAME ; void CPeninputCommonLayout::SaveKey(int, int) - ?SaveKey@CPeninputDataMgr@@UAEXHH@Z @ 112 NONAME ; void CPeninputDataMgr::SaveKey(int, int) - ?SendEventToLayout@CPeninputCommonLayout@@QAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 113 NONAME ; void CPeninputCommonLayout::SendEventToLayout(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?SendEventToWindow@CPeninputCommonLayout@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 114 NONAME ; void CPeninputCommonLayout::SendEventToWindow(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?SendKey@CPeninputUiStateBase@@IAEHABVTDesC16@@@Z @ 115 NONAME ; int CPeninputUiStateBase::SendKey(class TDesC16 const &) - ?Sendkey@CPeninputCommonLayout@@UAEXHABVTDesC16@@@Z @ 116 NONAME ; void CPeninputCommonLayout::Sendkey(int, class TDesC16 const &) - ?SetCurrentUiState@CPeninputUiStateMgr@@UAEXH@Z @ 117 NONAME ; void CPeninputUiStateMgr::SetCurrentUiState(int) - ?SetCurrentUiState@CPeninputUiStateMgr@@UAEXPAVCPeninputUiStateBase@@@Z @ 118 NONAME ; void CPeninputUiStateMgr::SetCurrentUiState(class CPeninputUiStateBase *) - ?SetData@CPeninputCommonLayout@@UAEXW4TPeninputDataType@@PAX@Z @ 119 NONAME ; void CPeninputCommonLayout::SetData(enum TPeninputDataType, void *) - ?SetData@CPeninputDataMgr@@UAEXW4TPeninputDataType@@PAX@Z @ 120 NONAME ; void CPeninputDataMgr::SetData(enum TPeninputDataType, void *) - ?SetEditorTextL@CPeninputLayoutWindow@@QAEXABUTFepInputContextFieldData@@@Z @ 121 NONAME ; void CPeninputLayoutWindow::SetEditorTextL(struct TFepInputContextFieldData const &) - ?SetEnableSettingBtn@CPeninputLayoutWindow@@QAEXH@Z @ 122 NONAME ; void CPeninputLayoutWindow::SetEnableSettingBtn(int) - ?SetEnableSwitchToHwr@CPeninputLayoutWindow@@QAEXH@Z @ 123 NONAME ; void CPeninputLayoutWindow::SetEnableSwitchToHwr(int) - ?SetSwitchBtnFont@CPeninputLayoutWindow@@IAEXAAVCAknFepCtrlEventButton@@@Z @ 124 NONAME ; void CPeninputLayoutWindow::SetSwitchBtnFont(class CAknFepCtrlEventButton &) - ?SetSwitchBtnTextColor@CPeninputLayoutWindow@@IAEXAAVCAknFepCtrlEventButton@@@Z @ 125 NONAME ; void CPeninputLayoutWindow::SetSwitchBtnTextColor(class CAknFepCtrlEventButton &) - ?SetWindowRect@CPeninputLayoutWindow@@IAEXABVTRect@@@Z @ 126 NONAME ; void CPeninputLayoutWindow::SetWindowRect(class TRect const &) - ?ShiftCapsSingleVkbLayoutByCase@CPeninputLayoutConfig@@QAEHHH@Z @ 127 NONAME ; int CPeninputLayoutConfig::ShiftCapsSingleVkbLayoutByCase(int, int) - ?ShiftCapsSingleVkbLayoutId@CPeninputLayoutConfig@@QAEHHH@Z @ 128 NONAME ; int CPeninputLayoutConfig::ShiftCapsSingleVkbLayoutId(int, int) - ?ShiftCapslockByCase@CPeninputDataConverter@@SAXHAAH0@Z @ 129 NONAME ; void CPeninputDataConverter::ShiftCapslockByCase(int, int &, int &) - ?SizeChanged@CPeninputCommonLayout@@UAEHPBX@Z @ 130 NONAME ; int CPeninputCommonLayout::SizeChanged(void const *) - ?SizeChanged@CPeninputLayoutWindow@@UAEXH@Z @ 131 NONAME ; void CPeninputLayoutWindow::SizeChanged(int) - ?UiStateMgr@CPeninputCommonLayout@@QBEPAVMPeninputUiStateMgr@@XZ @ 132 NONAME ; class MPeninputUiStateMgr * CPeninputCommonLayout::UiStateMgr(void) const - ?PenInputType@CPeninputCommonLayout@@UAE?AW4TPenUiTypeTag@@XZ @ 133 NONAME ABSENT ; int CPeninputCommonLayout::PenInputType(void) - ?SetTextIsSecret@CPeninputLayoutWindow@@QAEXH@Z @ 134 NONAME ; void CPeninputLayoutWindow::SetTextIsSecret(int) - ?OnInputLanguageChange@CPeninputLayoutWindow@@UAEXXZ @ 135 NONAME ABSENT ; void CPeninputLayoutWindow::OnInputLanguageChange(void) - ?SetLafLayOut@CPeninputLayoutWindow@@MAEXHH@Z @ 136 NONAME ABSENT ; void CPeninputLayoutWindow::SetLafLayOut(int, int) - ?SetVkbLayoutSize@CPeninputLayoutWindow@@MAEXXZ @ 137 NONAME ABSENT ; void CPeninputLayoutWindow::SetVkbLayoutSize(void) - ?SizeChangedForBaseWindow@CPeninputLayoutWindow@@MAEXH@Z @ 138 NONAME ABSENT ; void CPeninputLayoutWindow::SizeChangedForBaseWindow(int) - ??0CPeninputCommonLayoutExt@@IAE@PAVMLayoutOwner@@@Z @ 139 NONAME ; CPeninputCommonLayoutExt::CPeninputCommonLayoutExt(class MLayoutOwner *) - ??0CPeninputLayoutWindowExt@@IAE@PAVCFepUiLayout@@PAVMPeninputLayoutContext@@@Z @ 140 NONAME ; CPeninputLayoutWindowExt::CPeninputLayoutWindowExt(class CFepUiLayout *, class MPeninputLayoutContext *) - ??1CPeninputCommonLayoutExt@@UAE@XZ @ 141 NONAME ; CPeninputCommonLayoutExt::~CPeninputCommonLayoutExt(void) - ??1CPeninputLayoutWindowExt@@UAE@XZ @ 142 NONAME ; CPeninputLayoutWindowExt::~CPeninputLayoutWindowExt(void) - ?AddNotOwnedControl@CPeninputLayoutWindowExt@@IAEXPAVCFepUiBaseCtrl@@@Z @ 143 NONAME ; void CPeninputLayoutWindowExt::AddNotOwnedControl(class CFepUiBaseCtrl *) - ?CaseByShiftCapslockStatus@CPeninputLayoutWindowExt@@AAEHXZ @ 144 NONAME ; int CPeninputLayoutWindowExt::CaseByShiftCapslockStatus(void) - ?ChangeButtonStatus@CPeninputLayoutWindowExt@@IAEXHH@Z @ 145 NONAME ; void CPeninputLayoutWindowExt::ChangeButtonStatus(int, int) - ?ChangeClientLayout@CPeninputLayoutWindowExt@@QAEXH@Z @ 146 NONAME ; void CPeninputLayoutWindowExt::ChangeClientLayout(int) - ?ChangeInputLanguageL@CPeninputLayoutWindowExt@@QAEXH@Z @ 147 NONAME ; void CPeninputLayoutWindowExt::ChangeInputLanguageL(int) - ?ChangeLayoutPosition@CPeninputLayoutWindowExt@@IAEXH@Z @ 148 NONAME ; void CPeninputLayoutWindowExt::ChangeLayoutPosition(int) - ?ChangeRange@CPeninputLayoutWindowExt@@QAEXHHH@Z @ 149 NONAME ; void CPeninputLayoutWindowExt::ChangeRange(int, int, int) - ?ChangeVkbLayout@CPeninputLayoutWindowExt@@QAEXH@Z @ 150 NONAME ; void CPeninputLayoutWindowExt::ChangeVkbLayout(int) - ?ConfigInfo@CPeninputLayoutWindowExt@@QBEPAVCPeninputLayoutConfig@@XZ @ 151 NONAME ; class CPeninputLayoutConfig * CPeninputLayoutWindowExt::ConfigInfo(void) const - ?ConstructL@CPeninputCommonLayoutExt@@IAEXPBX@Z @ 152 NONAME ; void CPeninputCommonLayoutExt::ConstructL(void const *) - ?ConstructL@CPeninputLayoutWindowExt@@IAEXXZ @ 153 NONAME ; void CPeninputLayoutWindowExt::ConstructL(void) - ?DoClose@CPeninputLayoutWindowExt@@MAEHXZ @ 154 NONAME ; int CPeninputLayoutWindowExt::DoClose(void) - ?Draw@CPeninputLayoutWindowExt@@UAEXXZ @ 155 NONAME ; void CPeninputLayoutWindowExt::Draw(void) - ?HandleCapslockBtnClicked@CPeninputLayoutWindowExt@@UAEXXZ @ 156 NONAME ; void CPeninputLayoutWindowExt::HandleCapslockBtnClicked(void) - ?HandleCommand@CPeninputCommonLayoutExt@@UAEHHPAE@Z @ 157 NONAME ; int CPeninputCommonLayoutExt::HandleCommand(int, unsigned char *) - ?HandleControlEvent@CPeninputCommonLayoutExt@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 158 NONAME ; void CPeninputCommonLayoutExt::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandleControlEvent@CPeninputLayoutWindowExt@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 159 NONAME ; void CPeninputLayoutWindowExt::HandleControlEvent(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?HandleRangeEvent@CPeninputLayoutWindowExt@@UAEXH@Z @ 160 NONAME ; void CPeninputLayoutWindowExt::HandleRangeEvent(int) - ?HandleRangeLoopEvent@CPeninputLayoutWindowExt@@UAEXH@Z @ 161 NONAME ; void CPeninputLayoutWindowExt::HandleRangeLoopEvent(int) - ?HandleRawKeyEventL@CPeninputCommonLayoutExt@@UAEHABVTRawEvent@@@Z @ 162 NONAME ; int CPeninputCommonLayoutExt::HandleRawKeyEventL(class TRawEvent const &) - ?HandleShiftBtnClicked@CPeninputLayoutWindowExt@@UAEXXZ @ 163 NONAME ; void CPeninputLayoutWindowExt::HandleShiftBtnClicked(void) - ?Init@CPeninputCommonLayoutExt@@MAE?AVTRect@@XZ @ 164 NONAME ; class TRect CPeninputCommonLayoutExt::Init(void) - ?IsCapsLockPermitted@CPeninputCommonLayoutExt@@UAEHXZ @ 165 NONAME ; int CPeninputCommonLayoutExt::IsCapsLockPermitted(void) - ?IsShiftPermitted@CPeninputCommonLayoutExt@@UAEHXZ @ 166 NONAME ; int CPeninputCommonLayoutExt::IsShiftPermitted(void) - ?IsValidDestination@CPeninputCommonLayoutExt@@MAEHABVTRect@@PAVCDragBar@@AAH2H@Z @ 167 NONAME ; int CPeninputCommonLayoutExt::IsValidDestination(class TRect const &, class CDragBar *, int &, int &, int) - ?LayoutWindow@CPeninputCommonLayoutExt@@QBEPAVCPeninputLayoutWindowExt@@XZ @ 168 NONAME ; class CPeninputLayoutWindowExt * CPeninputCommonLayoutExt::LayoutWindow(void) const - ?OnAppEditorTextComing@CPeninputCommonLayoutExt@@UAEHABUTFepInputContextFieldData@@@Z @ 169 NONAME ; int CPeninputCommonLayoutExt::OnAppEditorTextComing(struct TFepInputContextFieldData const &) - ?OnInputLanguageChange@CPeninputLayoutWindowExt@@UAEXXZ @ 170 NONAME ; void CPeninputLayoutWindowExt::OnInputLanguageChange(void) - ?PenInputType@CPeninputCommonLayoutExt@@UAE?AW4TPenUiTypeTag@@XZ @ 171 NONAME ABSENT ; int CPeninputCommonLayoutExt::PenInputType(void) - ?ReconfigUnitSize@CPeninputLayoutWindowExt@@UAEHH@Z @ 172 NONAME ; int CPeninputLayoutWindowExt::ReconfigUnitSize(int) - ?RequestData@CPeninputCommonLayoutExt@@UAEPAXW4TPeninputDataType@@@Z @ 173 NONAME ; void * CPeninputCommonLayoutExt::RequestData(enum TPeninputDataType) - ?SaveKey@CPeninputCommonLayoutExt@@MAEXHH@Z @ 174 NONAME ; void CPeninputCommonLayoutExt::SaveKey(int, int) - ?SendEventToLayout@CPeninputCommonLayoutExt@@QAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 175 NONAME ; void CPeninputCommonLayoutExt::SendEventToLayout(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?SendEventToWindow@CPeninputCommonLayoutExt@@UAEXHPAVCFepUiBaseCtrl@@ABVTDesC16@@@Z @ 176 NONAME ; void CPeninputCommonLayoutExt::SendEventToWindow(int, class CFepUiBaseCtrl *, class TDesC16 const &) - ?Sendkey@CPeninputCommonLayoutExt@@UAEXHABVTDesC16@@@Z @ 177 NONAME ; void CPeninputCommonLayoutExt::Sendkey(int, class TDesC16 const &) - ?SetData@CPeninputCommonLayoutExt@@UAEXW4TPeninputDataType@@PAX@Z @ 178 NONAME ; void CPeninputCommonLayoutExt::SetData(enum TPeninputDataType, void *) - ?SetEditorTextL@CPeninputLayoutWindowExt@@QAEXABUTFepInputContextFieldData@@@Z @ 179 NONAME ; void CPeninputLayoutWindowExt::SetEditorTextL(struct TFepInputContextFieldData const &) - ?SetEnableSettingBtn@CPeninputLayoutWindowExt@@QAEXH@Z @ 180 NONAME ; void CPeninputLayoutWindowExt::SetEnableSettingBtn(int) - ?SetEnableSwitchToHwr@CPeninputLayoutWindowExt@@QAEXH@Z @ 181 NONAME ; void CPeninputLayoutWindowExt::SetEnableSwitchToHwr(int) - ?SetLafLayOut@CPeninputLayoutWindowExt@@MAEXHH@Z @ 182 NONAME ; void CPeninputLayoutWindowExt::SetLafLayOut(int, int) - ?SetSwitchBtnFont@CPeninputLayoutWindowExt@@IAEXAAVCAknFepCtrlEventButton@@@Z @ 183 NONAME ; void CPeninputLayoutWindowExt::SetSwitchBtnFont(class CAknFepCtrlEventButton &) - ?SetSwitchBtnTextColor@CPeninputLayoutWindowExt@@IAEXAAVCAknFepCtrlEventButton@@@Z @ 184 NONAME ; void CPeninputLayoutWindowExt::SetSwitchBtnTextColor(class CAknFepCtrlEventButton &) - ?SetTextIsSecret@CPeninputLayoutWindowExt@@QAEXH@Z @ 185 NONAME ; void CPeninputLayoutWindowExt::SetTextIsSecret(int) - ?SetVkbLayoutSize@CPeninputLayoutWindowExt@@MAEXXZ @ 186 NONAME ; void CPeninputLayoutWindowExt::SetVkbLayoutSize(void) - ?SetWindowRect@CPeninputLayoutWindowExt@@IAEXABVTRect@@@Z @ 187 NONAME ; void CPeninputLayoutWindowExt::SetWindowRect(class TRect const &) - ?SizeChanged@CPeninputCommonLayoutExt@@UAEHPBX@Z @ 188 NONAME ; int CPeninputCommonLayoutExt::SizeChanged(void const *) - ?SizeChanged@CPeninputLayoutWindowExt@@UAEXH@Z @ 189 NONAME ; void CPeninputLayoutWindowExt::SizeChanged(int) - ?SizeChangedForBaseWindow@CPeninputLayoutWindowExt@@MAEXH@Z @ 190 NONAME ; void CPeninputLayoutWindowExt::SizeChangedForBaseWindow(int) - ?UiStateMgr@CPeninputCommonLayoutExt@@QBEPAVMPeninputUiStateMgr@@XZ @ 191 NONAME ; class MPeninputUiStateMgr * CPeninputCommonLayoutExt::UiStateMgr(void) const - ?PenInputType@CPeninputCommonLayout@@UAEHXZ @ 192 NONAME ; int CPeninputCommonLayout::PenInputType(void) - ?PenInputType@CPeninputCommonLayoutExt@@UAEHXZ @ 193 NONAME ; int CPeninputCommonLayoutExt::PenInputType(void) - ?ChangeMergedButtonStatus@CPeninputLayoutWindowExt@@IAEXHH@Z @ 194 NONAME ; void CPeninputLayoutWindowExt::ChangeMergedButtonStatus(int, int) - ?HandleMergedBtnClicked@CPeninputLayoutWindowExt@@UAEXH@Z @ 195 NONAME ; void CPeninputLayoutWindowExt::HandleMergedBtnClicked(int) - ?ChangeToPreviousRange@CPeninputLayoutWindow@@MAEXH@Z @ 196 NONAME ; void CPeninputLayoutWindow::ChangeToPreviousRange(int) - ?IsCanChangeRange@CPeninputLayoutWindow@@MAEHH@Z @ 197 NONAME ; int CPeninputLayoutWindow::IsCanChangeRange(int) - ?IsMultiLineIcf@CPeninputLayoutWindow@@MAEHXZ @ 198 NONAME ; int CPeninputLayoutWindow::IsMultiLineIcf(void) - ?SetTextAlignmentL@CPeninputLayoutWindow@@QAEXH@Z @ 199 NONAME ; void CPeninputLayoutWindow::SetTextAlignmentL(int) - ?SetTextAlignmentL@CPeninputLayoutWindowExt@@QAEXH@Z @ 200 NONAME ; void CPeninputLayoutWindowExt::SetTextAlignmentL(int) - ?KeyMappingStringL@CPeninputNumericKepMappingMgr@@QBEPAVHBufC16@@HH@Z @ 201 NONAME ; class HBufC16 * CPeninputNumericKepMappingMgr::KeyMappingStringL(int, int) const - ?SetPositionFromOutside@CPeninputCommonLayout@@UAEXABVTPoint@@@Z @ 202 NONAME ; void CPeninputCommonLayout::SetPositionFromOutside(class TPoint const &) - ?SetPositionFromOutside@CPeninputCommonLayoutExt@@UAEXABVTPoint@@@Z @ 203 NONAME ; void CPeninputCommonLayoutExt::SetPositionFromOutside(class TPoint const &) - ?HandleShiftAndCapslockBtnClicked@CPeninputLayoutWindowExt@@UAEXXZ @ 204 NONAME ; void CPeninputLayoutWindowExt::HandleShiftAndCapslockBtnClicked(void) - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF --- a/textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,319 +0,0 @@ -EXPORTS - _ZN16CPeninputDataMgr10ConstructLEv @ 1 NONAME - _ZN16CPeninputDataMgr11RequestDataE17TPeninputDataType @ 2 NONAME - _ZN16CPeninputDataMgr12NotifyEngineE17TPeninputDataTypePv @ 3 NONAME - _ZN16CPeninputDataMgr16IsShiftPermittedEv @ 4 NONAME - _ZN16CPeninputDataMgr19IsCapsLockPermittedEv @ 5 NONAME - _ZN16CPeninputDataMgr24HandleGSRepositoryChangeEi @ 6 NONAME - _ZN16CPeninputDataMgr26HandleGSRepositoryCallBackEPv @ 7 NONAME - _ZN16CPeninputDataMgr4NewLEP22MPeninputLayoutContext @ 8 NONAME - _ZN16CPeninputDataMgr5NewLCEP22MPeninputLayoutContext @ 9 NONAME - _ZN16CPeninputDataMgr5ResetEv @ 10 NONAME - _ZN16CPeninputDataMgr7SaveKeyEii @ 11 NONAME - _ZN16CPeninputDataMgr7SetDataE17TPeninputDataTypePv @ 12 NONAME - _ZN16CPeninputDataMgr8InitMoreEv @ 13 NONAME - _ZN16CPeninputDataMgrC1EP22MPeninputLayoutContext @ 14 NONAME - _ZN16CPeninputDataMgrC2EP22MPeninputLayoutContext @ 15 NONAME - _ZN16CPeninputDataMgrD0Ev @ 16 NONAME - _ZN16CPeninputDataMgrD1Ev @ 17 NONAME - _ZN16CPeninputDataMgrD2Ev @ 18 NONAME - _ZN17CPeninputCtrlPool10AddControlEP14CFepUiBaseCtrl @ 19 NONAME - _ZN17CPeninputCtrlPool13RemoveControlEi @ 20 NONAME - _ZN17CPeninputCtrlPool4NewLEv @ 21 NONAME - _ZN17CPeninputCtrlPool5NewLCEv @ 22 NONAME - _ZN17CPeninputCtrlPool5ResetEv @ 23 NONAME - _ZN17CPeninputCtrlPool9ConstructEv @ 24 NONAME - _ZN17CPeninputCtrlPoolD0Ev @ 25 NONAME - _ZN17CPeninputCtrlPoolD1Ev @ 26 NONAME - _ZN17CPeninputCtrlPoolD2Ev @ 27 NONAME - _ZN18CPeninputRangeInfo4NewLER15TResourceReader @ 28 NONAME - _ZN18CPeninputRangeInfo5NewLCER15TResourceReader @ 29 NONAME - _ZN18CPeninputRangeInfoD0Ev @ 30 NONAME - _ZN18CPeninputRangeInfoD1Ev @ 31 NONAME - _ZN18CPeninputRangeInfoD2Ev @ 32 NONAME - _ZN19CPeninputUiStateMgr10AddUiStateEP20CPeninputUiStateBasei @ 33 NONAME - _ZN19CPeninputUiStateMgr10GetUiStateEi @ 34 NONAME - _ZN19CPeninputUiStateMgr14CurrentUiStateEv @ 35 NONAME - _ZN19CPeninputUiStateMgr17SetCurrentUiStateEP20CPeninputUiStateBase @ 36 NONAME - _ZN19CPeninputUiStateMgr17SetCurrentUiStateEi @ 37 NONAME - _ZN19CPeninputUiStateMgr4NewLEP22MPeninputLayoutContext @ 38 NONAME - _ZN19CPeninputUiStateMgr5NewLCEP22MPeninputLayoutContext @ 39 NONAME - _ZN19CPeninputUiStateMgrD0Ev @ 40 NONAME - _ZN19CPeninputUiStateMgrD1Ev @ 41 NONAME - _ZN19CPeninputUiStateMgrD2Ev @ 42 NONAME - _ZN20CPeninputControlInfo4NewLER15TResourceReader @ 43 NONAME - _ZN20CPeninputControlInfoD0Ev @ 44 NONAME - _ZN20CPeninputControlInfoD1Ev @ 45 NONAME - _ZN20CPeninputControlInfoD2Ev @ 46 NONAME - _ZN20CPeninputUiStateBase15HandleKeyEventLERK9TRawEvent @ 47 NONAME - _ZN20CPeninputUiStateBase18HandleControlEventEiRK7TDesC16 @ 48 NONAME - _ZN20CPeninputUiStateBase4NewLEP19MPeninputUiStateMgrP22MPeninputLayoutContext @ 49 NONAME - _ZN20CPeninputUiStateBase7SendKeyERK7TDesC16 @ 50 NONAME - _ZN20CPeninputUiStateBase9ConstructEv @ 51 NONAME - _ZN20CPeninputUiStateBaseC1EP19MPeninputUiStateMgrP22MPeninputLayoutContext @ 52 NONAME - _ZN20CPeninputUiStateBaseC2EP19MPeninputUiStateMgrP22MPeninputLayoutContext @ 53 NONAME - _ZN20CPeninputUiStateBaseD0Ev @ 54 NONAME - _ZN20CPeninputUiStateBaseD1Ev @ 55 NONAME - _ZN20CPeninputUiStateBaseD2Ev @ 56 NONAME - _ZN21CPeninputCommonLayout10ConstructLEPKv @ 57 NONAME - _ZN21CPeninputCommonLayout11RequestDataE17TPeninputDataType @ 58 NONAME - _ZN21CPeninputCommonLayout11SizeChangedEPKv @ 59 NONAME - _ZN21CPeninputCommonLayout13HandleCommandEiPh @ 60 NONAME - _ZN21CPeninputCommonLayout16IsShiftPermittedEv @ 61 NONAME - _ZN21CPeninputCommonLayout17SendEventToLayoutEiP14CFepUiBaseCtrlRK7TDesC16 @ 62 NONAME - _ZN21CPeninputCommonLayout17SendEventToWindowEiP14CFepUiBaseCtrlRK7TDesC16 @ 63 NONAME - _ZN21CPeninputCommonLayout18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 64 NONAME - _ZN21CPeninputCommonLayout18HandleRawKeyEventLERK9TRawEvent @ 65 NONAME - _ZN21CPeninputCommonLayout18IsValidDestinationERK5TRectP8CDragBarRiS5_i @ 66 NONAME - _ZN21CPeninputCommonLayout19IsCapsLockPermittedEv @ 67 NONAME - _ZN21CPeninputCommonLayout21OnAppEditorTextComingERK25TFepInputContextFieldData @ 68 NONAME - _ZN21CPeninputCommonLayout4InitEv @ 69 NONAME - _ZN21CPeninputCommonLayout7SaveKeyEii @ 70 NONAME - _ZN21CPeninputCommonLayout7SendkeyEiRK7TDesC16 @ 71 NONAME - _ZN21CPeninputCommonLayout7SetDataE17TPeninputDataTypePv @ 72 NONAME - _ZN21CPeninputCommonLayoutC2EP12MLayoutOwner @ 73 NONAME - _ZN21CPeninputCommonLayoutD0Ev @ 74 NONAME - _ZN21CPeninputCommonLayoutD1Ev @ 75 NONAME - _ZN21CPeninputCommonLayoutD2Ev @ 76 NONAME - _ZN21CPeninputLayoutConfig17FindShiftCapsInfoEi @ 77 NONAME - _ZN21CPeninputLayoutConfig17FindVkbLayoutInfoEi @ 78 NONAME - _ZN21CPeninputLayoutConfig20FindClientLayoutInfoEi @ 79 NONAME - _ZN21CPeninputLayoutConfig26ShiftCapsSingleVkbLayoutIdEii @ 80 NONAME - _ZN21CPeninputLayoutConfig30ShiftCapsSingleVkbLayoutByCaseEii @ 81 NONAME - _ZN21CPeninputLayoutConfig4NewLER20CAknFepCtrlVkbLayoutR15TResourceReader @ 82 NONAME - _ZN21CPeninputLayoutConfigD0Ev @ 83 NONAME - _ZN21CPeninputLayoutConfigD1Ev @ 84 NONAME - _ZN21CPeninputLayoutConfigD2Ev @ 85 NONAME - _ZN21CPeninputLayoutWindow10ConstructLEv @ 86 NONAME - _ZN21CPeninputLayoutWindow11ChangeRangeEiii @ 87 NONAME - _ZN21CPeninputLayoutWindow11ReadIcfInfoE15TResourceReader @ 88 NONAME - _ZN21CPeninputLayoutWindow11SizeChangedEi @ 89 NONAME - _ZN21CPeninputLayoutWindow13SetWindowRectERK5TRect @ 90 NONAME - _ZN21CPeninputLayoutWindow14SetEditorTextLERK25TFepInputContextFieldData @ 91 NONAME - _ZN21CPeninputLayoutWindow15ChangeVkbLayoutEi @ 92 NONAME - _ZN21CPeninputLayoutWindow16HandleRangeEventEi @ 93 NONAME - _ZN21CPeninputLayoutWindow16ReconfigUnitSizeEi @ 94 NONAME - _ZN21CPeninputLayoutWindow16SetSwitchBtnFontER22CAknFepCtrlEventButton @ 95 NONAME - _ZN21CPeninputLayoutWindow18AddNotOwnedControlEP14CFepUiBaseCtrl @ 96 NONAME - _ZN21CPeninputLayoutWindow18ChangeButtonStatusEii @ 97 NONAME - _ZN21CPeninputLayoutWindow18ChangeClientLayoutEi @ 98 NONAME - _ZN21CPeninputLayoutWindow18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 99 NONAME - _ZN21CPeninputLayoutWindow19SetEnableSettingBtnEi @ 100 NONAME - _ZN21CPeninputLayoutWindow20ChangeInputLanguageLEi @ 101 NONAME - _ZN21CPeninputLayoutWindow20ChangeLayoutPositionEi @ 102 NONAME - _ZN21CPeninputLayoutWindow20HandleRangeLoopEventEi @ 103 NONAME - _ZN21CPeninputLayoutWindow20SetEnableSwitchToHwrEi @ 104 NONAME - _ZN21CPeninputLayoutWindow21HandleShiftBtnClickedEv @ 105 NONAME - _ZN21CPeninputLayoutWindow21SetSwitchBtnTextColorER22CAknFepCtrlEventButton @ 106 NONAME - _ZN21CPeninputLayoutWindow22ConstructFromResourceLER15TResourceReader @ 107 NONAME - _ZN21CPeninputLayoutWindow22ConstructFromResourceLEv @ 108 NONAME - _ZN21CPeninputLayoutWindow24HandleCapslockBtnClickedEv @ 109 NONAME - _ZN21CPeninputLayoutWindow25CaseByShiftCapslockStatusEv @ 110 NONAME - _ZN21CPeninputLayoutWindow4DrawEv @ 111 NONAME - _ZN21CPeninputLayoutWindow7DoCloseEv @ 112 NONAME - _ZN21CPeninputLayoutWindowC2EP12CFepUiLayoutP22MPeninputLayoutContext @ 113 NONAME - _ZN21CPeninputLayoutWindowD0Ev @ 114 NONAME - _ZN21CPeninputLayoutWindowD1Ev @ 115 NONAME - _ZN21CPeninputLayoutWindowD2Ev @ 116 NONAME - _ZN21CPeninputRangeBarInfo4NewLER15TResourceReader @ 117 NONAME - _ZN21CPeninputRangeBarInfo5NewLCER15TResourceReader @ 118 NONAME - _ZN21CPeninputRangeBarInfo9FindRangeEi @ 119 NONAME - _ZN21CPeninputRangeBarInfoD0Ev @ 120 NONAME - _ZN21CPeninputRangeBarInfoD1Ev @ 121 NONAME - _ZN21CPeninputRangeBarInfoD2Ev @ 122 NONAME - _ZN22CPeninputDataConverter15FepCaseByCaseIdEi @ 123 NONAME - _ZN22CPeninputDataConverter17CombinationToDescEijR6TDes16 @ 124 NONAME - _ZN22CPeninputDataConverter19ShiftCapslockByCaseEiRiS0_ @ 125 NONAME - _ZN22CPeninputDataConverter8AnyToIntEPv @ 126 NONAME - _ZN22CPeninputDataConverter9IntToDescEjR6TDes16 @ 127 NONAME - _ZN22CPeninputDataConverterC1Ev @ 128 NONAME - _ZN22CPeninputDataConverterC2Ev @ 129 NONAME - _ZN22CPeninputDataConverterD0Ev @ 130 NONAME - _ZN22CPeninputDataConverterD1Ev @ 131 NONAME - _ZN22CPeninputDataConverterD2Ev @ 132 NONAME - _ZN22CPeninputShiftCapsInfo23FindShiftCapsSingleByIdEi @ 133 NONAME - _ZN22CPeninputShiftCapsInfo25FindShiftCapsSingleByCaseEi @ 134 NONAME - _ZN22CPeninputShiftCapsInfo4NewLER15TResourceReader @ 135 NONAME - _ZN22CPeninputShiftCapsInfo5NewLCER15TResourceReader @ 136 NONAME - _ZN22CPeninputShiftCapsInfoD0Ev @ 137 NONAME - _ZN22CPeninputShiftCapsInfoD1Ev @ 138 NONAME - _ZN22CPeninputShiftCapsInfoD2Ev @ 139 NONAME - _ZN25CPeninputClientLayoutInfo14AddControlInfoEP20CPeninputControlInfo @ 140 NONAME - _ZN25CPeninputClientLayoutInfo15FindControlInfoEi @ 141 NONAME - _ZN25CPeninputClientLayoutInfo17RemoveControlInfoEP20CPeninputControlInfo @ 142 NONAME - _ZN25CPeninputClientLayoutInfo17RemoveControlInfoEi @ 143 NONAME - _ZN25CPeninputClientLayoutInfo22ConstructFromResourceLER15TResourceReader @ 144 NONAME - _ZN25CPeninputClientLayoutInfo4NewLER15TResourceReader @ 145 NONAME - _ZN25CPeninputClientLayoutInfo5NewLCER15TResourceReader @ 146 NONAME - _ZN25CPeninputClientLayoutInfoD0Ev @ 147 NONAME - _ZN25CPeninputClientLayoutInfoD1Ev @ 148 NONAME - _ZN25CPeninputClientLayoutInfoD2Ev @ 149 NONAME - _ZN29CPeninputNumericKepMappingMgr4NewLE15TResourceReader @ 150 NONAME - _ZN29CPeninputNumericKepMappingMgr5NewLCE15TResourceReader @ 151 NONAME - _ZN29CPeninputNumericKepMappingMgr5ResetEv @ 152 NONAME - _ZN29CPeninputNumericKepMappingMgrD0Ev @ 153 NONAME - _ZN29CPeninputNumericKepMappingMgrD1Ev @ 154 NONAME - _ZN29CPeninputNumericKepMappingMgrD2Ev @ 155 NONAME - _ZNK17CPeninputCtrlPool12ControlCountEv @ 156 NONAME - _ZNK17CPeninputCtrlPool14ControlByIndexEi @ 157 NONAME - _ZNK17CPeninputCtrlPool7ControlEi @ 158 NONAME - _ZNK21CPeninputCommonLayout10UiStateMgrEv @ 159 NONAME - _ZNK21CPeninputCommonLayout12LayoutWindowEv @ 160 NONAME - _ZNK21CPeninputLayoutWindow10ConfigInfoEv @ 161 NONAME - _ZNK29CPeninputNumericKepMappingMgr17KeyMappingStringLEi @ 162 NONAME - _ZNK29CPeninputNumericKepMappingMgr5CountEv @ 163 NONAME - _ZTI16CPeninputDataMgr @ 164 NONAME ; ## - _ZTI17CPeninputCtrlPool @ 165 NONAME ; ## - _ZTI18CPeninputRangeInfo @ 166 NONAME ; ## - _ZTI19CPeninputUiStateMgr @ 167 NONAME ; ## - _ZTI20CPeninputControlInfo @ 168 NONAME ; ## - _ZTI20CPeninputUiStateBase @ 169 NONAME ; ## - _ZTI21CPeninputCommonLayout @ 170 NONAME ; ## - _ZTI21CPeninputLayoutConfig @ 171 NONAME ; ## - _ZTI21CPeninputLayoutWindow @ 172 NONAME ; ## - _ZTI21CPeninputRangeBarInfo @ 173 NONAME ; ## - _ZTI22CPeninputDataConverter @ 174 NONAME ; ## - _ZTI22CPeninputShiftCapsInfo @ 175 NONAME ; ## - _ZTI25CPeninputClientLayoutInfo @ 176 NONAME ; ## - _ZTI29CPeninputNumericKepMappingMgr @ 177 NONAME ; ## - _ZTV16CPeninputDataMgr @ 178 NONAME ; ## - _ZTV17CPeninputCtrlPool @ 179 NONAME ; ## - _ZTV18CPeninputRangeInfo @ 180 NONAME ; ## - _ZTV19CPeninputUiStateMgr @ 181 NONAME ; ## - _ZTV20CPeninputControlInfo @ 182 NONAME ; ## - _ZTV20CPeninputUiStateBase @ 183 NONAME ; ## - _ZTV21CPeninputCommonLayout @ 184 NONAME ; ## - _ZTV21CPeninputLayoutConfig @ 185 NONAME ; ## - _ZTV21CPeninputLayoutWindow @ 186 NONAME ; ## - _ZTV21CPeninputRangeBarInfo @ 187 NONAME ; ## - _ZTV22CPeninputDataConverter @ 188 NONAME ; ## - _ZTV22CPeninputShiftCapsInfo @ 189 NONAME ; ## - _ZTV25CPeninputClientLayoutInfo @ 190 NONAME ; ## - _ZTV29CPeninputNumericKepMappingMgr @ 191 NONAME ; ## - _ZThn448_N21CPeninputLayoutWindow18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 192 NONAME ABSENT ; ## - _ZThn4_N16CPeninputDataMgr11RequestDataE17TPeninputDataType @ 193 NONAME ; ## - _ZThn4_N16CPeninputDataMgr5ResetEv @ 194 NONAME ; ## - _ZThn4_N16CPeninputDataMgr7SaveKeyEii @ 195 NONAME ; ## - _ZThn4_N16CPeninputDataMgr7SetDataE17TPeninputDataTypePv @ 196 NONAME ; ## - _ZThn4_N19CPeninputUiStateMgr10AddUiStateEP20CPeninputUiStateBasei @ 197 NONAME ; ## - _ZThn4_N19CPeninputUiStateMgr10GetUiStateEi @ 198 NONAME ; ## - _ZThn4_N19CPeninputUiStateMgr14CurrentUiStateEv @ 199 NONAME ; ## - _ZThn4_N19CPeninputUiStateMgr17SetCurrentUiStateEP20CPeninputUiStateBase @ 200 NONAME ; ## - _ZThn4_N19CPeninputUiStateMgr17SetCurrentUiStateEi @ 201 NONAME ; ## - _ZThn4_N21CPeninputCommonLayout13HandleCommandEiPh @ 202 NONAME ; ## - _ZThn4_N21CPeninputCommonLayout21OnAppEditorTextComingERK25TFepInputContextFieldData @ 203 NONAME ABSENT ; ## - _ZThn4_N21CPeninputCommonLayout4InitEv @ 204 NONAME ; ## - _ZThn92_N21CPeninputCommonLayout11RequestDataE17TPeninputDataType @ 205 NONAME ABSENT ; ## - _ZThn92_N21CPeninputCommonLayout16IsShiftPermittedEv @ 206 NONAME ABSENT ; ## - _ZThn92_N21CPeninputCommonLayout17SendEventToWindowEiP14CFepUiBaseCtrlRK7TDesC16 @ 207 NONAME ABSENT ; ## - _ZThn92_N21CPeninputCommonLayout19IsCapsLockPermittedEv @ 208 NONAME ABSENT ; ## - _ZThn92_N21CPeninputCommonLayout7SaveKeyEii @ 209 NONAME ABSENT ; ## - _ZThn92_N21CPeninputCommonLayout7SendkeyEiRK7TDesC16 @ 210 NONAME ABSENT ; ## - _ZThn92_N21CPeninputCommonLayout7SetDataE17TPeninputDataTypePv @ 211 NONAME ABSENT ; ## - _ZThn8_N21CPeninputCommonLayout18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 212 NONAME ; ## - _ZThn8_N21CPeninputLayoutWindow22ConstructFromResourceLEv @ 213 NONAME ; ## - _ZN21CPeninputCommonLayout12PenInputTypeEv @ 214 NONAME - _ZThn4_N21CPeninputCommonLayout12PenInputTypeEv @ 215 NONAME ; ## - _ZThn616_N21CPeninputLayoutWindow18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 216 NONAME ; ## - _ZN21CPeninputLayoutWindow15SetTextIsSecretEi @ 217 NONAME - _ZN24CPeninputCommonLayoutExt10ConstructLEPKv @ 218 NONAME - _ZN24CPeninputCommonLayoutExt11RequestDataE17TPeninputDataType @ 219 NONAME - _ZN24CPeninputCommonLayoutExt11SizeChangedEPKv @ 220 NONAME - _ZN24CPeninputCommonLayoutExt13HandleCommandEiPh @ 221 NONAME - _ZN24CPeninputCommonLayoutExt12PenInputTypeEv @ 222 NONAME - _ZN24CPeninputCommonLayoutExt16IsShiftPermittedEv @ 223 NONAME - _ZN24CPeninputCommonLayoutExt17SendEventToLayoutEiP14CFepUiBaseCtrlRK7TDesC16 @ 224 NONAME - _ZN24CPeninputCommonLayoutExt17SendEventToWindowEiP14CFepUiBaseCtrlRK7TDesC16 @ 225 NONAME - _ZN24CPeninputCommonLayoutExt18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 226 NONAME - _ZN24CPeninputCommonLayoutExt18HandleRawKeyEventLERK9TRawEvent @ 227 NONAME - _ZN24CPeninputCommonLayoutExt18IsValidDestinationERK5TRectP8CDragBarRiS5_i @ 228 NONAME - _ZN24CPeninputCommonLayoutExt19IsCapsLockPermittedEv @ 229 NONAME - _ZN24CPeninputCommonLayoutExt21OnAppEditorTextComingERK25TFepInputContextFieldData @ 230 NONAME - _ZN24CPeninputCommonLayoutExt4InitEv @ 231 NONAME - _ZN24CPeninputCommonLayoutExt7SaveKeyEii @ 232 NONAME - _ZN24CPeninputCommonLayoutExt7SendkeyEiRK7TDesC16 @ 233 NONAME - _ZN24CPeninputCommonLayoutExt7SetDataE17TPeninputDataTypePv @ 234 NONAME - _ZN24CPeninputCommonLayoutExtC2EP12MLayoutOwner @ 235 NONAME - _ZN24CPeninputCommonLayoutExtD0Ev @ 236 NONAME - _ZN24CPeninputCommonLayoutExtD1Ev @ 237 NONAME - _ZN24CPeninputCommonLayoutExtD2Ev @ 238 NONAME - _ZN24CPeninputLayoutWindowExt10ConstructLEv @ 239 NONAME - _ZN24CPeninputLayoutWindowExt11ChangeRangeEiii @ 240 NONAME - _ZN24CPeninputLayoutWindowExt11SizeChangedEi @ 241 NONAME - _ZN24CPeninputLayoutWindowExt12SetLafLayOutEii @ 242 NONAME - _ZN24CPeninputLayoutWindowExt13SetWindowRectERK5TRect @ 243 NONAME - _ZN24CPeninputLayoutWindowExt14SetEditorTextLERK25TFepInputContextFieldData @ 244 NONAME - _ZN24CPeninputLayoutWindowExt15ChangeVkbLayoutEi @ 245 NONAME - _ZN24CPeninputLayoutWindowExt15SetTextIsSecretEi @ 246 NONAME - _ZN24CPeninputLayoutWindowExt16HandleRangeEventEi @ 247 NONAME - _ZN24CPeninputLayoutWindowExt16ReconfigUnitSizeEi @ 248 NONAME - _ZN24CPeninputLayoutWindowExt16SetSwitchBtnFontER22CAknFepCtrlEventButton @ 249 NONAME - _ZN24CPeninputLayoutWindowExt16SetVkbLayoutSizeEv @ 250 NONAME - _ZN24CPeninputLayoutWindowExt18AddNotOwnedControlEP14CFepUiBaseCtrl @ 251 NONAME - _ZN24CPeninputLayoutWindowExt18ChangeButtonStatusEii @ 252 NONAME - _ZN24CPeninputLayoutWindowExt18ChangeClientLayoutEi @ 253 NONAME - _ZN24CPeninputLayoutWindowExt18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 254 NONAME - _ZN24CPeninputLayoutWindowExt19SetEnableSettingBtnEi @ 255 NONAME - _ZN24CPeninputLayoutWindowExt20ChangeInputLanguageLEi @ 256 NONAME - _ZN24CPeninputLayoutWindowExt20ChangeLayoutPositionEi @ 257 NONAME - _ZN24CPeninputLayoutWindowExt20HandleRangeLoopEventEi @ 258 NONAME - _ZN24CPeninputLayoutWindowExt20SetEnableSwitchToHwrEi @ 259 NONAME - _ZN24CPeninputLayoutWindowExt21HandleShiftBtnClickedEv @ 260 NONAME - _ZN24CPeninputLayoutWindowExt21OnInputLanguageChangeEv @ 261 NONAME - _ZN24CPeninputLayoutWindowExt21SetSwitchBtnTextColorER22CAknFepCtrlEventButton @ 262 NONAME - _ZN24CPeninputLayoutWindowExt24HandleCapslockBtnClickedEv @ 263 NONAME - _ZN24CPeninputLayoutWindowExt24SizeChangedForBaseWindowEi @ 264 NONAME - _ZN24CPeninputLayoutWindowExt25CaseByShiftCapslockStatusEv @ 265 NONAME - _ZN24CPeninputLayoutWindowExt4DrawEv @ 266 NONAME - _ZN24CPeninputLayoutWindowExt7DoCloseEv @ 267 NONAME - _ZN24CPeninputLayoutWindowExtC2EP12CFepUiLayoutP22MPeninputLayoutContext @ 268 NONAME - _ZN24CPeninputLayoutWindowExtD0Ev @ 269 NONAME - _ZN24CPeninputLayoutWindowExtD1Ev @ 270 NONAME - _ZN24CPeninputLayoutWindowExtD2Ev @ 271 NONAME - _ZNK24CPeninputCommonLayoutExt10UiStateMgrEv @ 272 NONAME - _ZNK24CPeninputCommonLayoutExt12LayoutWindowEv @ 273 NONAME - _ZNK24CPeninputLayoutWindowExt10ConfigInfoEv @ 274 NONAME - _ZTI24CPeninputCommonLayoutExt @ 275 NONAME ; ## - _ZTI24CPeninputLayoutWindowExt @ 276 NONAME ; ## - _ZTV24CPeninputCommonLayoutExt @ 277 NONAME ; ## - _ZTV24CPeninputLayoutWindowExt @ 278 NONAME ; ## - _ZThn4_N24CPeninputCommonLayoutExt13HandleCommandEiPh @ 279 NONAME ; ## - _ZThn4_N24CPeninputCommonLayoutExt12PenInputTypeEv @ 280 NONAME ; ## - _ZThn4_N24CPeninputCommonLayoutExt4InitEv @ 281 NONAME ; ## - _ZThn616_N24CPeninputLayoutWindowExt18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 282 NONAME ; ## - _ZThn92_N24CPeninputCommonLayoutExt11RequestDataE17TPeninputDataType @ 283 NONAME ABSENT ; ## - _ZThn92_N24CPeninputCommonLayoutExt16IsShiftPermittedEv @ 284 NONAME ABSENT ; ## - _ZThn92_N24CPeninputCommonLayoutExt17SendEventToWindowEiP14CFepUiBaseCtrlRK7TDesC16 @ 285 NONAME ABSENT ; ## - _ZThn92_N24CPeninputCommonLayoutExt19IsCapsLockPermittedEv @ 286 NONAME ABSENT ; ## - _ZThn92_N24CPeninputCommonLayoutExt7SaveKeyEii @ 287 NONAME ABSENT ; ## - _ZThn92_N24CPeninputCommonLayoutExt7SendkeyEiRK7TDesC16 @ 288 NONAME ABSENT ; ## - _ZThn92_N24CPeninputCommonLayoutExt7SetDataE17TPeninputDataTypePv @ 289 NONAME ABSENT ; ## - _ZThn8_N24CPeninputCommonLayoutExt18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 290 NONAME ; ## - _ZN24CPeninputLayoutWindowExt22HandleMergedBtnClickedEi @ 291 NONAME - _ZN24CPeninputLayoutWindowExt24ChangeMergedButtonStatusEii @ 292 NONAME - _ZN21CPeninputLayoutWindow14IsMultiLineIcfEv @ 293 NONAME - _ZN21CPeninputLayoutWindow16IsCanChangeRangeEi @ 294 NONAME - _ZN21CPeninputLayoutWindow21ChangeToPreviousRangeEi @ 295 NONAME - _ZN21CPeninputLayoutWindow17SetTextAlignmentLEi @ 296 NONAME - _ZN24CPeninputLayoutWindowExt17SetTextAlignmentLEi @ 297 NONAME - _ZThn88_N21CPeninputCommonLayout11RequestDataE17TPeninputDataType @ 298 NONAME ; ## - _ZThn88_N21CPeninputCommonLayout16IsShiftPermittedEv @ 299 NONAME ; ## - _ZThn88_N21CPeninputCommonLayout17SendEventToWindowEiP14CFepUiBaseCtrlRK7TDesC16 @ 300 NONAME ; ## - _ZThn88_N21CPeninputCommonLayout19IsCapsLockPermittedEv @ 301 NONAME ; ## - _ZThn88_N21CPeninputCommonLayout7SaveKeyEii @ 302 NONAME ; ## - _ZThn88_N21CPeninputCommonLayout7SendkeyEiRK7TDesC16 @ 303 NONAME ; ## - _ZThn88_N21CPeninputCommonLayout7SetDataE17TPeninputDataTypePv @ 304 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt11RequestDataE17TPeninputDataType @ 305 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt16IsShiftPermittedEv @ 306 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt17SendEventToWindowEiP14CFepUiBaseCtrlRK7TDesC16 @ 307 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt19IsCapsLockPermittedEv @ 308 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt7SaveKeyEii @ 309 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt7SendkeyEiRK7TDesC16 @ 310 NONAME ; ## - _ZThn88_N24CPeninputCommonLayoutExt7SetDataE17TPeninputDataTypePv @ 311 NONAME ; ## - _ZNK29CPeninputNumericKepMappingMgr17KeyMappingStringLEii @ 312 NONAME - _ZN21CPeninputCommonLayout22SetPositionFromOutsideERK6TPoint @ 313 NONAME - _ZN24CPeninputCommonLayoutExt22SetPositionFromOutsideERK6TPoint @ 314 NONAME - _ZThn4_N21CPeninputCommonLayout22SetPositionFromOutsideERK6TPoint @ 315 NONAME ; ## - _ZThn4_N24CPeninputCommonLayoutExt22SetPositionFromOutsideERK6TPoint @ 316 NONAME ; ## - _ZN24CPeninputLayoutWindowExt32HandleShiftAndCapslockBtnClickedEv @ 317 NONAME - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/group/bld.inf --- a/textinput/peninputcommonlayout/group/bld.inf Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project peninputcommonlayout -* -*/ - -#include - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../rom/peninputcommonlayout.iby CORE_MW_LAYER_IBY_EXPORT_PATH( peninputcommonlayout.iby ) - -../inc/peninputclientlayoutinfo.h |../../../inc/peninputclientlayoutinfo.h -../inc/peninputclientlayoutinfo.inl |../../../inc/peninputclientlayoutinfo.inl -../inc/peninputcommonlayout.h |../../../inc/peninputcommonlayout.h -../inc/peninputcommonlayoutext.h |../../../inc/peninputcommonlayoutext.h -../inc/peninputcommonlayout.rh |../../../inc/peninputcommonlayout.rh -../inc/peninputcommonlayoutglobalenum.h |../../../inc/peninputcommonlayoutglobalenum.h -../inc/peninputctrlpool.h |../../../inc/peninputctrlpool.h -../inc/peninputdataconverter.h |../../../inc/peninputdataconverter.h -../inc/peninputdatamgr.h |../../../inc/peninputdatamgr.h -../inc/peninputdataprovider.h |../../../inc/peninputdataprovider.h -../inc/peninputlayoutconfig.h |../../../inc/peninputlayoutconfig.h -../inc/peninputlayoutconfig.inl |../../../inc/peninputlayoutconfig.inl -../inc/peninputlayoutcontext.h |../../../inc/peninputlayoutcontext.h -../inc/peninputlayoutwindow.h |../../../inc/peninputlayoutwindow.h -../inc/peninputlayoutwindowext.h |../../../inc/peninputlayoutwindowext.h -../inc/peninputrangebarinfo.h |../../../inc/peninputrangebarinfo.h -../inc/peninputrangebarinfo.inl |../../../inc/peninputrangebarinfo.inl -../inc/peninputshiftcapsInfo.h |../../../inc/peninputshiftcapsinfo.h -../inc/peninputshiftcapsinfo.inl |../../../inc/peninputshiftcapsinfo.inl -../inc/peninputuistatebase.h |../../../inc/peninputuistatebase.h -../inc/peninputuistatemgr.h |../../../inc/peninputuistatemgr.h -../inc/peninputuistatemgrinterface.h |../../../inc/peninputuistatemgrinterface.h - -PRJ_MMPFILES -../group/peninputcommonlayout.mmp diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/group/peninputcommonlayout.mmp --- a/textinput/peninputcommonlayout/group/peninputcommonlayout.mmp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for project peninputcommonlayout -* -*/ - - -#include -#include - -TARGET peninputcommonlayout.dll -TARGETTYPE DLL -UID 0x1000008D 0x10282357 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE peninputclientlayoutinfo.cpp -SOURCE peninputcommonlayout.cpp -SOURCE peninputcommonlayoutext.cpp -SOURCE peninputctrlpool.cpp -SOURCE peninputdatamgr.cpp -SOURCE peninputlayoutconfig.cpp -SOURCE peninputlayoutwindow.cpp -SOURCE peninputlayoutwindowext.cpp -SOURCE peninputrangebarinfo.cpp -SOURCE peninputshiftcapsInfo.cpp -SOURCE peninputdataconverter.cpp -SOURCE peninputuistatemgr.cpp -SOURCE peninputuistatebase.cpp -SOURCE peninputnumerickeymappingmgr.cpp - -USERINCLUDE ../inc - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -MW_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE /epoc32/include/ecom -SYSTEMINCLUDE ../../../inc -SYSTEMINCLUDE ../../inc - -LIBRARY euser.lib -LIBRARY ws32.lib -LIBRARY ecom.lib -LIBRARY efsrv.lib -LIBRARY gdi.lib -LIBRARY bafl.lib -LIBRARY avkon.lib -LIBRARY aknlayout.lib -LIBRARY aknlayout2scalable.lib -LIBRARY aknicon.lib -LIBRARY centralrepository.lib -LIBRARY cone.lib -LIBRARY peninputlayouteng.lib -LIBRARY peninputlayoutcontrol.lib -LIBRARY peninputpluginutils.lib -LIBRARY peninputcommonctrls.lib -LIBRARY aknskins.lib diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputclientayoutinfo.inl --- a/textinput/peninputcommonlayout/inc/peninputclientayoutinfo.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: image layout inline function -* -*/ - - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::ControlID -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::ControlID() const - { - return iControlID; - } - -inline const TInt CPeninputControlInfo::ControlType() const - { - return iControlType; - } - -inline const TInt CPeninputControlInfo::BeginRow() const - { - return iBeginRow; - } - -inline const TInt CPeninputControlInfo::EndRow() const - { - return iEndRow; - } - -inline const TInt CPeninputControlInfo::BeginColumn() const - { - return iBeginColumn; - } - -inline const TInt CPeninputControlInfo::EndColumn() const - { - return iEndColumn; - } - -inline TInt CPeninputClientLayoutInfo::LayoutID() const - { - return iLayoutID; - } - -inline TInt CPeninputClientLayoutInfo::Columns() const - { - return iColumns; - } - -inline TInt CPeninputClientLayoutInfo::Rows() const - { - return iRows; - } - -inline RPointerArray& CPeninputClientLayoutInfo::ControlInfoList() - { - return iControlInfoList; - } - -// End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputclientlayoutinfo.h --- a/textinput/peninputcommonlayout/inc/peninputclientlayoutinfo.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,317 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: client layout information -* -*/ - - -#ifndef C_PENINPUTCLIENTLAYOUTINFO_H -#define C_PENINPUTCLIENTLAYOUTINFO_H - -// System includes -#include -#include -#include - -/** - * Control info class - * - * This class is to define control info. Application can create it from - * resource file. Control info includes control id, begin row, end row, - * bgin column and end column. - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputControlInfo : public CBase - { - -public: - - /** - * Symbian constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputControlInfo object - */ - IMPORT_C static CPeninputControlInfo* NewL( TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputControlInfo(); - - /** - * Get control id - * - * @since S60 v3.2 - * @return Control id - */ - inline const TInt ControlID() const; - - /** - * Get control type - * - * @since S60 v3.2 - * @return Control type - */ - inline const TInt ControlType() const; - - /** - * Get begin row - * - * @since S60 v3.2 - * @return Begin row - */ - inline const TInt BeginRow() const; - - /** - * Get end row - * - * @since S60 v3.2 - * @return End row - */ - inline const TInt EndRow() const; - - /** - * Get begine column - * - * @since S60 v3.2 - * @return Begine column - */ - inline const TInt BeginColumn() const; - - /** - * Get end column - * - * @since S60 v3.2 - * @return End column - */ - inline const TInt EndColumn() const; - -protected: - - /** - * Second phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - - /** - * Construct from resource - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructFromResourceL( TResourceReader& aReader ); - -private: // Data - - /** - * Control id - */ - TInt iControlID; - - /** - * Control Type - */ - TInt iControlType; - - /** - * Begin row - */ - TInt iBeginRow; - - /** - * End row - */ - TInt iEndRow; - - /** - * Begin column - */ - TInt iBeginColumn; - - /** - * End column - */ - TInt iEndColumn; - - }; - -/** - * Client layout class - * - * This class is to implement image layout. Application can create it from - * resource file. Control info includes control id, row and column. - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputClientLayoutInfo : public CBase - { - -public: - - /** - * Symbian constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputClientLayoutInfo object - */ - IMPORT_C static CPeninputClientLayoutInfo* NewL( - TResourceReader& aReader ); - - /** - * Symbian constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputClientLayoutInfo object - */ - IMPORT_C static CPeninputClientLayoutInfo* NewLC( - TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputClientLayoutInfo(); - - /** - * Contruct from resource file - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - IMPORT_C void ConstructFromResourceL( TResourceReader& aReader ); - - /** - * Get control info - * - * @since S60 v3.2 - * @param aControlID control id - * @return The pointer to CPeninputControlInfo object - */ - IMPORT_C CPeninputControlInfo* FindControlInfo( const TInt aControlID ); - - /** - * Add control info - * - * @since S60 v3.2 - * @param aControlInfo Pointer to control info - * @return None - */ - IMPORT_C void AddControlInfo( CPeninputControlInfo* aControlInfo ); - - /** - * Remove control info - * - * @since S60 v3.2 - * @param aControlInfo Pointer to control info - * @return None - */ - IMPORT_C void RemoveControlInfo( CPeninputControlInfo* aControlInfo ); - - /** - * Remove control info based on control id - * - * @since S60 v3.2 - * @param aControlID Control id - * @return None - */ - IMPORT_C void RemoveControlInfo( const TInt aControlID ); - - /** - * Get layout id - * - * @since S60 v3.2 - * @return Layout id - */ - inline TInt LayoutID() const; - - /** - * Get column - * - * @since S60 v3.2 - * @return Column - */ - inline TInt Columns() const; - - /** - * Get row - * - * @since S60 v3.2 - * @return Row - */ - inline TInt Rows() const; - - /** - * Get control array - * - * @since S60 v3.2 - * @return Control array - */ - inline RPointerArray& ControlInfoList(); - -protected: - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - -private: // Data - - /** - * Layout id - */ - TInt iLayoutID; - - /** - * Column count - */ - TInt iColumns; - - /** - * Row count - */ - TInt iRows; - - /** - * Control info array - */ - RPointerArray iControlInfoList; - - }; - -#include "peninputclientlayoutinfo.inl" - -#endif // C_PENINPUTCLIENTLAYOUTINFO_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputclientlayoutinfo.inl --- a/textinput/peninputcommonlayout/inc/peninputclientlayoutinfo.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: image layout inline function -* -*/ - - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::ControlID -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::ControlID() const - { - return iControlID; - } - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::ControlType -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::ControlType() const - { - return iControlType; - } - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::BeginRow -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::BeginRow() const - { - return iBeginRow; - } - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::EndRow -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::EndRow() const - { - return iEndRow; - } - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::BeginColumn -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::BeginColumn() const - { - return iBeginColumn; - } - -// ----------------------------------------------------------------------------- -// CPeninputControlInfo::EndColumn -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline const TInt CPeninputControlInfo::EndColumn() const - { - return iEndColumn; - } - -// ----------------------------------------------------------------------------- -// CPeninputClientLayoutInfo::LayoutID -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputClientLayoutInfo::LayoutID() const - { - return iLayoutID; - } - -// ----------------------------------------------------------------------------- -// CPeninputClientLayoutInfo::Columns -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputClientLayoutInfo::Columns() const - { - return iColumns; - } - -// ----------------------------------------------------------------------------- -// CPeninputClientLayoutInfo::Rows -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputClientLayoutInfo::Rows() const - { - return iRows; - } - -// ----------------------------------------------------------------------------- -// CPeninputClientLayoutInfo::ControlInfoList -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray& - CPeninputClientLayoutInfo::ControlInfoList() - { - return iControlInfoList; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputcommonlayout.h --- a/textinput/peninputcommonlayout/inc/peninputcommonlayout.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,379 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: peninput common layout framework -* -*/ - - -#ifndef C_CPENINPUTCOMMONLAYOUT_H -#define C_CPENINPUTCOMMONLAYOUT_H - -// System includes -#include -#include -#include - -// User includes -#include "peninputlayoutcontext.h" - -// Forward decalaration -class CPeninputDataMgr; -class CPeninputUiStateMgr; -class MPeninputUiStateMgr; -class CPeninputLayoutWindow; - -/** - * Peninput common layout - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputCommonLayout : public CFepUiLayout, - public MPeninputLayoutContext - { - -public: - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputCommonLayout(); - - /** - * Get data manager - * - * @since S60 v3.2 - * @return The pointer to MPeninputDataProvider - */ - IMPORT_C MPeninputDataProvider* DataMgr() const; - - /** - * Get layout window - * - * @since S60 v3.2 - * @return The pointer to CPeninputLayoutWindow object - */ - IMPORT_C CPeninputLayoutWindow* LayoutWindow() const; - - /** - * Get ui state manager - * - * @since S60 v3.2 - * @return The pointer to MPeninputUiStateMgr - */ - IMPORT_C MPeninputUiStateMgr* UiStateMgr() const; - -// From CFepUiLayout - - /** - * From CFepUiLayout - * Handle layout command event - * - * @since S60 v3.2 - * @param aCmd Command Id - * @param aData Data for command - * @return Errors when return value smaller than 0 - */ - IMPORT_C TInt HandleCommand( TInt aCmd, TUint8* aData ); - - /** - * From CFepUiLayout - * Inform layout the size changing event - * - * @since S60 v3.2 - * @param aData The event data - * @return KErrNone if successfully size changing - */ - IMPORT_C TInt SizeChanged( const TAny* aData ); - - /** - * From CFepUiLayout - * Handle the event from control - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender - * @param aEventData The event data - * @return None - */ - IMPORT_C virtual void HandleControlEvent( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData ); - - /** - * From CFepUiLayout - * Handle editor text coming - * Called by animation dll when app editor text is coming - * If a ui layout has a editor area, it must implements - * this function to get the text - * - * @since S60 v3.2 - * @param aData Editor Text Coming data - * @return KErrNone is operation succeeded - */ - IMPORT_C TInt OnAppEditorTextComing( - const TFepInputContextFieldData& aData ); - - /** - * From CFepUiLayout - * Get the layout type, vkb or hwr. It's now similar to LayoutType which defines in - * another interface. - * - * @since S60 v3.2 - * @return The layout type - */ - IMPORT_C virtual TInt PenInputType(); - - -// From MKeyRawEventHandler - - /** - * From CFepUiLayout - * Handle raw event key - * - * @since S60 v3.2 - * @param aKeyEvent The key raw event data - * @return ETrue if the key was handled, otherwise EFalse - */ - IMPORT_C TBool HandleRawKeyEventL( const TRawEvent& aKeyEvent ); - -// From MPeninputLayoutContext - - /** - * Send event to window - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender - * @param aEventData The event data - * @return None - */ - IMPORT_C void SendEventToWindow( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData = KNullDesC ); - - /** - * Send event to layout - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender - * @param aEventData The event data - * @return None - */ - IMPORT_C void SendEventToLayout( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData = KNullDesC ); - - - IMPORT_C TBool IsShiftPermitted(); - - IMPORT_C TBool IsCapsLockPermitted(); - /** - * Request data from data provider - * - * @since S60 v3.2 - * @param aDataType The data request - * @return The data you request - */ - IMPORT_C TAny* RequestData( TPeninputDataType aDataType ); - - /** - * Set resource utils - * - * @since S60 v3.2 - * @param aDataType Data type - * @param aData Data value - * @return None - */ - IMPORT_C void SetData( TPeninputDataType aDataType, TAny* aData ); - - /** - * Sendkey to fep - * - * @since S60 v3.2 - * @param aEventType Event type - * @param aEventData Event data - * @return None - */ - IMPORT_C void Sendkey( TInt aEventType, - const TDesC& aEventData = KNullDesC ); - - IMPORT_C void SetPositionFromOutside(const TPoint& aNewPos); - -protected: - - /** - * 2nd phase construction - constructor - * - * @since S60 v3.2 - * @param aLafEnv The LAF enviroment - * @param aLayoutOwner The owner of layout - * @return None - */ - IMPORT_C CPeninputCommonLayout( MLayoutOwner* aLayoutOwner ); - - /** - * 2nd phase construction - second constructor - * - * @since S60 v3.2 - * @param aInitData Init data of layout - * @return None - */ - IMPORT_C void ConstructL( const TAny* aInitData ); - - /** - * From CFepUiLayout - * Test whether the position is valid - * This is used to test the target position when draging controls - * to some place - * - * @since S60 v4.0 - * @param aRect The rect to be checked - * @param aDragbar The dragbar being dragged - * @param aVInfo The valid information in vertial dirtection. ETrue is - * vertical moving is valid.It's only used when aRect is not - * valid but moving in vertical direction is valid - * @param aHInfo The valid information in horizontal dirtection - * ETrue is horizontal moving is valid.It's only used when aRect - * is not valid but moving in vertical direction is valid - * @param aFlag ETrue if whole layout is moving, otherwise, only - * components moving - * @return ETrue if aRect is a valid position. Otherwise, EFalse - */ - IMPORT_C TBool IsValidDestination( const TRect& aRect, - CDragBar* aDragBar, - TBool& aVInfo, - TBool& aHInfo, - TBool aFlag ); - - /** - * Init layout owner - * - * @since S60 v3.2 - * @return The rect of the layout - */ - IMPORT_C virtual TRect Init(); - - /** - * Save a virtual keybroad key to the repository - * - * @since S60 v3.2 - * @param aKey The key name in repository - * @param aValue The unicode of key - * @return None - */ - IMPORT_C virtual void SaveKey( TInt aKey, TInt aValue ); - - /** - * Factory method for creation of layout window. The decision which - * layout window(VKB or HWR) is created will be postboned in subclasses - * of this class. - * - * @since S60 v3.2 - * @return None - */ - virtual void CreateLayoutWindowL() = 0; - - /** - * Factory method for creation resource config. It is enough at present - * to create and initialize resource config. Any necessary extension - * will be implemented in subclasses. - * - * @since S60 v3.2 - * @return None - */ - virtual void CreateDataMgrL( const TAny* aInitData ) = 0; - - /** - * Get the layout type, vkb or hwr, child class must rewrite the function. - * - * @since S60 v3.2 - * @return The layout type - */ - virtual TInt LayoutType() = 0; - -private: // New method - - /** - * Change input language - * - * @since S60 v3.2 - * @param aLangID The language id you want to change to - * @return None - */ - void ChangeInputLanguage( TInt aLangID ); - - /** - * Change current range - * - * @since S60 v3.2 - * @param aRange The range need to set - * @return None - */ - void ChangeRange( TInt aRange ); - - /** - * Translate range for some languages - * - * @since S60 v3.2 - * @param aRange The range need to set - * @return New range - */ - TInt TranslateRange(TInt aRange); - - /** - * Set if enable switch to hwr - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - void SetEnableSwitchToHwr(TBool aEnable); - - /** - * Set if enable option button and language switch button - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - void SetEnableSettingBtn(TBool aEnable); - -protected: - - /** - * The data manager - * Own - */ - CPeninputDataMgr* iDataMgr; - - /** - * The ui state manager - * Own - */ - CPeninputUiStateMgr* iUiStateMgr; - - /** - * The layout window - * Own - */ - CPeninputLayoutWindow* iLayoutWindow; - - }; - -#endif // C_CPENINPUTCOMMONLAYOUT_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputcommonlayout.rh --- a/textinput/peninputcommonlayout/inc/peninputcommonlayout.rh Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,442 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project peninputcommonlayout -* -*/ - - -#ifndef PENINPUTCOMMONLAYOUT_RH -#define PENINPUTCOMMONLAYOUT_RH - -// system includes -#include -#include - -// --------------------------------------------------------------------------- -// Layout base window -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_BASE_WINDOW - { - WORD supportskin = 0xffff; - LLINK moveimage = 0; - LLINK closeimage; - LLINK icfimage; - LLINK optionimage; - LLINK keymapping = 0; - LLINK shadow; - LLINK arrowleftimage = 0; - LLINK arrowrightimage = 0; - LLINK bgimage = 0; - } -// --------------------------------------------------------------------------- -// Layout base window -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_BASE_WINDOW_INFO - { - WORD supportskin = 0xffff; - LLINK shadow; - LLINK bgimage = 0; - STRUCT controls[]; - } -// --------------------------------------------------------------------------- -// Window input context field -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_ICF - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - WORD icfbgimg=0xffff; - WORD icfbgimgmask=0xffff; - WORD icfbgimgskinid=0xffff; - - LONG colormajorskinid = 0xffff; - WORD textcolorgrp = 0xffff; - WORD textcoloridx = 0xffff; - } - - -STRUCT PENINPUT_LAYOUT_MULTILINE_ICF - { - LONG colormajorskinid = 0xffff; - WORD textcolorgrp = 0xffff; - WORD textcoloridx = 0xffff; - WORD bordercolorgrp = 0xffff; - WORD bordercoloridx = 0xffff; - } - -// --------------------------------------------------------------------------- -// Window shadow -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_WINDOW_SHADOW - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - WORD shadowimgtl=0xffff; - WORD shadowimgtlmask=0xffff; - WORD shadowimgtlskinid=0xffff; - - WORD shadowimgt=0xffff; - WORD shadowimgtmask=0xffff; - WORD shadowimgtskinid=0xffff; - - WORD shadowimgtr=0xffff; - WORD shadowimgtrmask=0xffff; - WORD shadowimgtrskinid=0xffff; - - WORD shadowimgl=0xffff; - WORD shadowimglmask=0xffff; - WORD shadowimglskinid=0xffff; - - WORD shadowimgr=0xffff; - WORD shadowimgrmask=0xffff; - WORD shadowimgrskinid=0xffff; - - WORD shadowimgbl=0xffff; - WORD shadowimgblmask=0xffff; - WORD shadowimgblskinid=0xffff; - - WORD shadowimgb=0xffff; - WORD shadowimgbmask=0xffff; - WORD shadowimgbskinid=0xffff; - - WORD shadowimgbr=0xffff; - WORD shadowimgbrmask=0xffff; - WORD shadowimgbrskinid=0xffff; - } - -// --------------------------------------------------------------------------- -// Layout numeric key mapping string list -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_NUMERIC_KEY_MAPPING_STRING_LIST - { - STRUCT items[]; - } - -// --------------------------------------------------------------------------- -// Layout numeric key mapping string -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_NUMERIC_KEY_MAPPING_STRING - { - WORD numerickeymapping=0; - - LTEXT PermittedString=""; - } - -// --------------------------------------------------------------------------- -// Layout config information -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_CONFIG_INFO - { - WORD language=0; // TLanguage in symbian - - LTEXT languagestring=""; // such as "En", - - WORD casesensitive=0; // 0:case not sensitive 1:case sensitive - - WORD guideline=0; // TPeninputGuideLineStyle - - WORD positiontopline=0; // The position percent of bottom line - - WORD positionbottomline=0; // The position percent of bottom line - - LLINK clientlayoutlist; // PENINPUT_LAYOUT_CLIENT_LAYOUT_LIST - - LLINK vkblayoutlist; // PENINPUT_LAYOUT_VKB _LAYOUT_LIST - - LLINK rangebarinfo; // PENINPUT_LAYOUT_RANGE_BAR_INFO - - LLINK shiftcapsinfo; // PENINPUT_LAYOUT_SHIFT_CAPS_INFO - - LLINK rangebarresource; // Range bar resource - } - -// --------------------------------------------------------------------------- -// Client layout list -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_CLIENT_LAYOUT_LIST - { - STRUCT items[]; - } - -// --------------------------------------------------------------------------- -// Client layout -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_CLIENT_LAYOUT - { - // Client layout id - WORD id=0; - - // column counts - WORD colcount=0; - - // row counts - WORD rowcount=0; - - // the bg mask bmp of the layout - STRUCT controls[]; - } - -// --------------------------------------------------------------------------- -// Layout control -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_CONTROL - { - // Control ID - WORD id=0; - - // the control type - WORD controltype=0; - - // the begin row of the control - WORD beginrow=0; - - // the begin column of the control - WORD begincolumn=0; - - // the end row of the control - WORD endrow=0; - - // the end column of the control - WORD endcolumn=0; - } - -// start by vv -STRUCT PENINPUT_LAYOUT_CONTROL_INFO - { - // Control ID TPeninputCommonCtrlID - WORD id=0; - - //the control type, new define TResourceCtrlType - //WORD controltype=-1; - - // the control event id TPeninputLayoutEvent - //WORD controleventid=-1; - - // TKeyCode - //WORD controleventkeycode = -1; - - // the begin column of the control - LLINK image; - } -// end by vv - -// --------------------------------------------------------------------------- -// Vkb layout list -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_VKB_LAYOUT_LIST - { - STRUCT items[]; - } - -// --------------------------------------------------------------------------- -// Vkb layout -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_VKB_LAYOUT - { - // Vkb layout type id - WORD id=0; - - // Mbm file name which store the bg bmp of the layout and all controls - LTEXT mbmfile=""; - LONG imgmajorskinid=0xffff; - - // the bg, bg mask and bg skin bmp of the layout - WORD bgbmp=0xffff; - WORD bgbmpmask=0xffff; - WORD bgbmpskinid=0xffff; - - // the bg, bg mask and bg skin bmp for dimmed key - WORD dimbmp=0xffff; - WORD dimmask=0xffff; - WORD dimbmpskinid=0xffff; - - // column counts - WORD colcount=0; - - // row counts - WORD rowcount=0; - - STRUCT highlightbmps[]; // list of PENINPUT_LAYOUT_BITMAP_ID - - STRUCT highlightmaskbmps[]; // list of PENINPUT_LAYOUT_BITMAP_ID - - // keys - STRUCT keys[]; - } - -// --------------------------------------------------------------------------- -// Bitmap id -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_BITMAP_ID - { - // id of bitmap - WORD bmpid=0; - } - -// --------------------------------------------------------------------------- -// Unit key -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_UNIT_KEY - { - LTEXT unicode=""; - - WORD scancode=0; - - WORD beginrow=0; - - WORD begincolumn=0; - - WORD endrow=0; - - WORD endcolumn=0; - - WORD highlightbmpindex=-1; - - WORD highlightmaskbmpindex=-1; - - // add this item because some special characters need additional unicode to display - LTEXT displayunicode=""; - } - -// --------------------------------------------------------------------------- -// Popup window -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_POPUP_WINDOW - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - WORD bgbmp=0xffff; - WORD bgmaskbmp=0xffff; - WORD bgbmpskinid=0xffff; - - WORD focusbmp=0xffff; - WORD focusmaskbmp=0xffff; - WORD focusbmpskinid=0xffff; - } - -// --------------------------------------------------------------------------- -// Shift&caps info list -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_SHIFT_CAPS_INFO_LIST - { - STRUCT items[]; - } - -// --------------------------------------------------------------------------- -// Shift&caps info -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_SHIFT_CAPS_INFO - { - WORD range = 0; - STRUCT items[]; - } - -// --------------------------------------------------------------------------- -// Shift&caps info single -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_SHIFT_CAPS_INFO_SINGLE - { - WORD id=0; - WORD vkblayoutid=0; - WORD caseused=0; - } - -// --------------------------------------------------------------------------- -// Range bar info -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_RANGE_BAR_INFO - { - WORD style=0; // 0:hide-style 1:highlight-style - - STRUCT ranges[]; // PENINPUT_LAYOUT_RANGE_INFO - } - -// --------------------------------------------------------------------------- -// Range info -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_RANGE_INFO - { - WORD rangeid=0; - - WORD responsestyle=0; // 0:No action 1: change range directory 2: pop choice item - - WORD clientlayoutid=0; - - WORD vkblayoutid=0; - - } - -// --------------------------------------------------------------------------- -// Switch text info -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_SWITCH_TEXT - { - LONG colormajorskinid=0xffff; - WORD textcolorgrp=0xffff; - WORD textcoloridx=0xffff; - WORD shadowtextcoloridx=0xffff; - } - -// --------------------------------------------------------------------------- -// Base window background -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_WINDOW_BG - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - WORD bgimg=0xffff; - WORD bgimgmask=0xffff; - WORD bgimgskinid=0xffff; - } - -// --------------------------------------------------------------------------- -// Vkb keyboard -// --------------------------------------------------------------------------- -// -STRUCT PENINPUT_LAYOUT_VKB_KEYBOARD - { - LTEXT bmpfile=""; - LONG imgmajorskinid=0xffff; - - WORD bgimg=0xffff; - WORD bgimgmask=0xffff; - WORD bgimgskinid=0xffff; - } -#endif // PENINPUTCOMMONLAYOUT_RH diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputcommonlayoutext.h --- a/textinput/peninputcommonlayout/inc/peninputcommonlayoutext.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,378 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: peninput common layout framework -* -*/ - - -#ifndef C_CPENINPUTCOMMONLAYOUTEXT_H -#define C_CPENINPUTCOMMONLAYOUTEXT_H - -// System includes -#include -#include -#include - -// User includes -#include "peninputlayoutcontext.h" - -// Forward decalaration -class CPeninputDataMgr; -class CPeninputUiStateMgr; -class MPeninputUiStateMgr; -class CPeninputLayoutWindowExt; - -/** - * Peninput common layout - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputCommonLayoutExt : public CFepUiLayout, - public MPeninputLayoutContext - { - -public: - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputCommonLayoutExt(); - - /** - * Get data manager - * - * @since S60 v3.2 - * @return The pointer to MPeninputDataProvider - */ - IMPORT_C MPeninputDataProvider* DataMgr() const; - - /** - * Get layout window - * - * @since S60 v3.2 - * @return The pointer to CPeninputLayoutWindow object - */ - IMPORT_C CPeninputLayoutWindowExt* LayoutWindow() const; - - /** - * Get ui state manager - * - * @since S60 v3.2 - * @return The pointer to MPeninputUiStateMgr - */ - IMPORT_C MPeninputUiStateMgr* UiStateMgr() const; - -// From CFepUiLayout - - /** - * From CFepUiLayout - * Handle layout command event - * - * @since S60 v3.2 - * @param aCmd Command Id - * @param aData Data for command - * @return Errors when return value smaller than 0 - */ - IMPORT_C TInt HandleCommand( TInt aCmd, TUint8* aData ); - - /** - * From CFepUiLayout - * Inform layout the size changing event - * - * @since S60 v3.2 - * @param aData The event data - * @return KErrNone if successfully size changing - */ - IMPORT_C TInt SizeChanged( const TAny* aData ); - - /** - * From CFepUiLayout - * Handle the event from control - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender - * @param aEventData The event data - * @return None - */ - IMPORT_C virtual void HandleControlEvent( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData ); - - /** - * From CFepUiLayout - * Handle editor text coming - * Called by animation dll when app editor text is coming - * If a ui layout has a editor area, it must implements - * this function to get the text - * - * @since S60 v3.2 - * @param aData Editor Text Coming data - * @return KErrNone is operation succeeded - */ - IMPORT_C TInt OnAppEditorTextComing( - const TFepInputContextFieldData& aData ); - - /** - * From CFepUiLayout - * Get the layout type, vkb or hwr. It's now similar to LayoutType which defines in - * another interface. - * - * @since S60 v3.2 - * @return The layout type - */ - IMPORT_C virtual TInt PenInputType(); - - IMPORT_C void SetPositionFromOutside(const TPoint& aNewPos); - -// From MKeyRawEventHandler - - /** - * From CFepUiLayout - * Handle raw event key - * - * @since S60 v3.2 - * @param aKeyEvent The key raw event data - * @return ETrue if the key was handled, otherwise EFalse - */ - IMPORT_C TBool HandleRawKeyEventL( const TRawEvent& aKeyEvent ); - -// From MPeninputLayoutContext - - /** - * Send event to window - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender - * @param aEventData The event data - * @return None - */ - IMPORT_C void SendEventToWindow( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData = KNullDesC ); - - /** - * Send event to layout - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender - * @param aEventData The event data - * @return None - */ - IMPORT_C void SendEventToLayout( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData = KNullDesC ); - - - IMPORT_C TBool IsShiftPermitted(); - - IMPORT_C TBool IsCapsLockPermitted(); - /** - * Request data from data provider - * - * @since S60 v3.2 - * @param aDataType The data request - * @return The data you request - */ - IMPORT_C TAny* RequestData( TPeninputDataType aDataType ); - - /** - * Set resource utils - * - * @since S60 v3.2 - * @param aDataType Data type - * @param aData Data value - * @return None - */ - IMPORT_C void SetData( TPeninputDataType aDataType, TAny* aData ); - - /** - * Sendkey to fep - * - * @since S60 v3.2 - * @param aEventType Event type - * @param aEventData Event data - * @return None - */ - IMPORT_C void Sendkey( TInt aEventType, - const TDesC& aEventData = KNullDesC ); - -protected: - - /** - * 2nd phase construction - constructor - * - * @since S60 v3.2 - * @param aLafEnv The LAF enviroment - * @param aLayoutOwner The owner of layout - * @return None - */ - IMPORT_C CPeninputCommonLayoutExt( MLayoutOwner* aLayoutOwner ); - - /** - * 2nd phase construction - second constructor - * - * @since S60 v3.2 - * @param aInitData Init data of layout - * @return None - */ - IMPORT_C void ConstructL( const TAny* aInitData ); - - /** - * From CFepUiLayout - * Test whether the position is valid - * This is used to test the target position when draging controls - * to some place - * - * @since S60 v4.0 - * @param aRect The rect to be checked - * @param aDragbar The dragbar being dragged - * @param aVInfo The valid information in vertial dirtection. ETrue is - * vertical moving is valid.It's only used when aRect is not - * valid but moving in vertical direction is valid - * @param aHInfo The valid information in horizontal dirtection - * ETrue is horizontal moving is valid.It's only used when aRect - * is not valid but moving in vertical direction is valid - * @param aFlag ETrue if whole layout is moving, otherwise, only - * components moving - * @return ETrue if aRect is a valid position. Otherwise, EFalse - */ - IMPORT_C TBool IsValidDestination( const TRect& aRect, - CDragBar* aDragBar, - TBool& aVInfo, - TBool& aHInfo, - TBool aFlag ); - - /** - * Init layout owner - * - * @since S60 v3.2 - * @return The rect of the layout - */ - IMPORT_C virtual TRect Init(); - - /** - * Save a virtual keybroad key to the repository - * - * @since S60 v3.2 - * @param aKey The key name in repository - * @param aValue The unicode of key - * @return None - */ - IMPORT_C virtual void SaveKey( TInt aKey, TInt aValue ); - - /** - * Factory method for creation of layout window. The decision which - * layout window(VKB or HWR) is created will be postboned in subclasses - * of this class. - * - * @since S60 v3.2 - * @return None - */ - virtual void CreateLayoutWindowL() = 0; - - /** - * Factory method for creation resource config. It is enough at present - * to create and initialize resource config. Any necessary extension - * will be implemented in subclasses. - * - * @since S60 v3.2 - * @return None - */ - virtual void CreateDataMgrL( const TAny* aInitData ) = 0; - - /** - * Get the layout type, vkb or hwr, child class must rewrite the function. - * - * @since S60 v3.2 - * @return The layout type - */ - virtual TInt LayoutType() = 0; - -private: // New method - - /** - * Change input language - * - * @since S60 v3.2 - * @param aLangID The language id you want to change to - * @return None - */ - void ChangeInputLanguage( TInt aLangID ); - - /** - * Change current range - * - * @since S60 v3.2 - * @param aRange The range need to set - * @return None - */ - void ChangeRange( TInt aRange ); - - /** - * Translate range for some languages - * - * @since S60 v3.2 - * @param aRange The range need to set - * @return New range - */ - TInt TranslateRange(TInt aRange); - - /** - * Set if enable switch to hwr - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - void SetEnableSwitchToHwr(TBool aEnable); - - /** - * Set if enable option button and language switch button - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - void SetEnableSettingBtn(TBool aEnable); - -protected: - - /** - * The data manager - * Own - */ - CPeninputDataMgr* iDataMgr; - - /** - * The ui state manager - * Own - */ - CPeninputUiStateMgr* iUiStateMgr; - - /** - * The layout window - * Own - */ - CPeninputLayoutWindowExt* iLayoutWindow; - - }; - -#endif // C_CPeninputCommonLayoutExt_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h --- a/textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: the enumeration of peninputcommonlayout -* -*/ - - -#ifndef PENINPUTCOMMONLAYOUTGLOBALENUM_H -#define PENINPUTCOMMONLAYOUTGLOBALENUM_H - -/** - * Pen input range button response style - */ -enum TPeninputRangeResponseStyle - { - EPeninputRangeResponseNoAction = 0, - EPeninputRangeResponseSwitchRange = 1, - EPeninputRangeResponsePopupChoiceItem = 2 - }; - -/** - * Pen input range extention - */ -enum TPeninputLayoutExtRange - { - ERangeNativeNumber = 0x0020, - ERangeMixedText = 0x0040, // e.g. arabic native text mixed with latin text - ERangeMixedNumber = 0x0080 // e.g. arabic native number mixed with latin number - }; - -/** - * Pen input layout event - */ -enum TPeninputLayoutEvent - { - EPeninputLayoutEventClose = 1001, //starts from control event extended base - EPeninputLayoutEventOpen, - EPeninputLayoutEventOption, - EPeninputLayoutEventEnter, - EPeninputLayoutEventBack, - EPeninputLayoutEventSwitchLanguage, - EPeninputLayoutEventToHwr, - EPeninputLayoutEventToVkb, - EPeninputLayoutEventDataQueryPosition, - EPeninputLayoutEventMovePosition, - EPeninputLayoutEventRange, - EPeninputLayoutEventRangeLoop, - EPeninputLayoutEventShift, - EPeninputLayoutEventCapslock, - EPeninputLayoutEventSpace, - EPeninputLayoutEventTab, - - EPeninputLayoutEventSetPermittedRange, - EPeninputLayoutEventSetPermittedCase, - EPeninputLayoutEventSetCase, - EPeninputLayoutEventCloseWindow, - EPeninputLayoutEventChangeInputMode, - - EPeninputLayoutEventLeftArrow, - EPeninputLayoutEventRightArrow, - - EPeninputLayoutEventLast = 2000 // user event starts from here, same as base control - }; - -/** - * Pen input common control id - */ -enum TPeninputCommonCtrlID - { - EPeninutWindowCtrlIdBaseWindow = 0, - - // Controls in the titlepane - EPeninutWindowCtrlIdMoveBtn, - EPeninupWindowCtrlIdArrowLeftBtn,// new added by vv - EPeninupWindowCtrlIdArrowRightBtn,// new added by vv - EPeninutWindowCtrlIdCloseBtn, - EPeninutWindowCtrlIdOptionBtn, - EPeninutWindowCtrlIdInputContextField, - - EPeninutWindowCtrlIdVkbCtrl, - EPeninutWindowCtrlIdBackspaceBtn, - EPeninutWindowCtrlIdEnterBtn, - EPeninutWindowCtrlIdInputLangSwitcherBtn, - - // Controls in the next line - EPeninutWindowCtrlIdTabBtn, - EPeninutWindowCtrlIdCapslockBtn, - EPeninutWindowCtrlIdShiftBtn, - EPeninutWindowCtrlIdSpaceBtn, - EPeninutWindowCtrlIdSwitchToHwrBtn, - EPeninutWindowCtrlIdSwitchToVkbBtn, - - EPeninutWindowCtrlIdRangeBar, - - // Button Id in range bar - EPeninutWindowCtrlIdNativeCharBtn, - EPeninutWindowCtrlIdNativeNumberBtn, - EPeninutWindowCtrlIdLatinCharBtn, - EPeninutWindowCtrlIdLatinNumberBtn, - EPeninutWindowCtrlIdSymbolBtn, - EPeninutWindowCtrlIdAccentedBtn, - - // Hwr box - EPeninutWindowCtrlIdHwrBox, - - // Pop up window - EPeninutWindowCtrlIdAccentPopupWindow, - EPeninutWindowCtrlIdSwitcherPopupWindow, - EPeninputWindowCtrlIdMultiLineICF, - //candidate list - EPentinputHwrCandidateList, - EPeninputWindowCtrlIdLastOne, - - EPeninutWindowCtrlIdRangeBtn //todo split view - }; - -/** - * Pen input postion change style - */ -enum TPeninputPositionChangeStyle - { - EPeninputPositionChangeNone = 0, - EPeninputPositionChangeTlJustify = 1, - EPeninputPositionChangeBrJustify = 2, - EPeninputPositionChangeDataQuery = 3 - }; - -enum TPeninputGuideLineStyle - { - EPeninputGuideLineNone = 0, - EPeninputGuideLineTop = 1, - EPeninputGuideLineBottom = 2, - EPeninputGuideLineBoth = 3 - }; - -#endif // PENINPUTCOMMONLAYOUTGLOBALENUM_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputctrlpool.h --- a/textinput/peninputcommonlayout/inc/peninputctrlpool.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: controls management utility -* -*/ - - -#ifndef C_CPENINPUTCTRLPOOL_H -#define C_CPENINPUTCTRLPOOL_H - -// System includes -#include -#include - -// Forward declaration -class CFepUiBaseCtrl; - -/** - * Peninput control pool class - * - * This class is control pool. Application can use this class to - * manage their controls. Control creates out side and add itself to this - * pool. Application can get and remove one control based on control - * id. - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputCtrlPool : public CBase - { - -public: - - /** - * Symbian constructor - * - * @since S60 v3.2 - * @return Pointer to created CPeninputCtrlPool object - */ - IMPORT_C static CPeninputCtrlPool* NewL(); - - /** - * Symbian constructor - * - * @since S60 v3.2 - * @return Pointer to created CPeninputCtrlPool object - */ - IMPORT_C static CPeninputCtrlPool* NewLC(); - - /** - * Destructor, it need to destroy all controls - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputCtrlPool(); - - /** - * Add one control to the pooling, the control should have - * one control id - * - * @since S60 v3.2 - * @param aControl Pointer to control - * @return None - */ - IMPORT_C void AddControl( CFepUiBaseCtrl* aControl ); - - /** - * Remove one control from the pooling - * - * @since S60 v3.2 - * @param aControlID Control id - * @return None - */ - IMPORT_C void RemoveControl( const TInt aControlID ); - - /** - * Get one control from the pooling according to the control id - * - * @since S60 v3.2 - * @param aControlID Control id - * @return Pointer to control - */ - IMPORT_C CFepUiBaseCtrl* Control( const TInt aControlID ) const; - - /** - * Remove all controls and delete them - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Reset(); - - /** - * Get current control count in this pool - * - * @since S60 v3.2 - * @return The count of controls - */ - IMPORT_C TInt ControlCount() const; - - /** - * Get the control from the pool according to the index - * - * @since S60 v3.2 - * @param aIndex Index in array - * @return Pointer to control - */ - IMPORT_C CFepUiBaseCtrl* ControlByIndex( const TInt aIndex ) const; - -protected: - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Construct(); - -private: // Data - - /** - * Control pointer array - */ - RPointerArray iControlList; - - }; - -#endif // C_CPENINPUTCTRLPOOL_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputdataconverter.h --- a/textinput/peninputcommonlayout/inc/peninputdataconverter.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: data converter utility -* -*/ - - -#ifndef C_CPENINPUTDATACONVERTER_H -#define C_CPENINPUTDATACONVERTER_H - -// System includes -#include -#include -#include -#include - -/** - * Peninput data converter utility - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputDataConverter : public CBase - { - -public: - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputDataConverter(); - - /** - * From integer to descriptor - * - * @since S60 v3.2 - * @param aNum Integer number to be converted - * @param aBuf Buffer to store converted number - * @return None - */ - IMPORT_C static void IntToDesc( TUint aNum, - TDes16& aBuf ); - - /** - * From combination to descriptor - * - * @since S60 v3.2 - * @param aBool Bool value to be converted - * @param aNum Number to append to a Bool value - * @param aBuf Buffer to store converted number - * @return None - */ - IMPORT_C static void CombinationToDesc( TBool aBool, - TUint aNum, - TDes16& aBuf ); - - /** - * From TAny* to TInt - * - * @since S60 v3.2 - * @param aOrginal Orginal data - * @return Converted descriptor - */ - IMPORT_C static TInt AnyToInt( TAny* aOrginal ); - - /** - * Get shift and caps status by case - * - * @since S60 v3.2 - * @param aCase The case - * @param aShiftStatus The shift status - * @param aCapsStatus The capslock status - * @return None - */ - IMPORT_C static void ShiftCapslockByCase( TInt aCase, - TInt& aShiftStatus, - TInt& aCapsStatus ); - - /** - * Get fep case by case id internal - * - * @since S60 v3.2 - * @param aCaseId The internal case - * @return The fep case - */ - IMPORT_C static TInt FepCaseByCaseId( TInt aCaseId ); - -protected: - - /** - * 1st phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C CPeninputDataConverter(); - - }; - -#endif // C_CPENINPUTDATACONVERTER_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputdatamgr.h --- a/textinput/peninputcommonlayout/inc/peninputdatamgr.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,360 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the common layout data manager -* -*/ - - -#ifndef C_CPENINPUTDATAMGR_H -#define C_CPENINPUTDATAMGR_H - -// System includes -#include -#include -#include -#include - -// User includes -#include "peninputdataprovider.h" - -// Forward decalaration -class MPeninputLayoutContext; -class CRepository; - -/** - * Data manager implementation - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputDataMgr : public CBase, - public MPeninputDataProvider - { - -public: - - /** - * Create one CPeninputDataMgr object - * - * @since S60 v3.2 - * @param aContext The layout context - * @return The pointer to CPeninputDataMgr object - */ - IMPORT_C static CPeninputDataMgr* NewL( - MPeninputLayoutContext* aContext ); - - /** - * Create one CPeninputDataMgr object - * - * @since S60 v3.2 - * @param aContext The layout context - * @return The pointer to CPeninputDataMgr object - */ - IMPORT_C static CPeninputDataMgr* NewLC( - MPeninputLayoutContext* aContext ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputDataMgr(); - - /** - * Other initialization - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void InitMore(); - - /** - * Call back function, which is called when some key changed - * - * @since S60 v3.2 - * @param aChangedKey The key whose value is changed - * @return None - */ - IMPORT_C virtual void HandleGSRepositoryChange( TInt aChangedKey ); - - /** - * Notify engine that some data changed - * - * @since S60 v3.2 - * @param aType The type of the data to be notified - * @param aData The pointer to the notified data - * @return None - */ - IMPORT_C virtual void NotifyEngine( TPeninputDataType aType, - TAny* aData ); - - IMPORT_C TBool IsShiftPermitted(); - IMPORT_C TBool IsCapsLockPermitted(); - -// From base class MPeninputDataProvider - - /** - * From MPeninputDataProvider - * Request data according to the data type - * - * @since S60 v3.2 - * @param aDataType The data type need to get - * @return The pointer to TAny type required data - */ - IMPORT_C TAny* RequestData( TPeninputDataType aDataType ); - - /** - * From MPeninputDataProvider - * Set data according to the data type - * - * @since S60 v3.2 - * @param aDataType The data type need to set - * @param aData The pointer to the new setting data - * @return None - */ - IMPORT_C void SetData( TPeninputDataType aDataType, TAny* aData ); - - /** - * From MPeninputDataProvider - * Reset data contained in data manager - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void Reset(); - - /** - * From MPeninputDataProvider - * Save data into AknFepRepository - * - * @since S60 v3.2 - * @param aKey The key name - * @param aValue The key value - * @return None - */ - IMPORT_C virtual void SaveKey( TInt aKey, TInt aValue ); - -protected: - - /** - * Constructor - * - * @since S60 v3.2 - * @param aContext The layout context - * @return None. - */ - IMPORT_C CPeninputDataMgr( MPeninputLayoutContext* aContext ); - - /** - * 2nd constructor function - * - * @since S60 v3.2 - * @return None. - */ - IMPORT_C void ConstructL(); - - /** - * Handle notification from CenRep monitor - * - * @since S60 v3.2 - * @param aPtr The pointer to callback data - * @return The result value. - */ - IMPORT_C static TInt HandleGSRepositoryCallBack( TAny* aPtr ); - -private: - - /** - * Set Screen Mode - * - * @since S60 v3.2 - * @param aScreenMode The reference of the screen mode data - * @return None - */ - void SetScreenMode( const TPixelsTwipsAndRotation& aScreenMode ); - -protected: // Data - - /** - * The case - */ - TInt iCase; - - /** - * The peninput language - */ - TInt iInputLanguage; - - /** - * The permitted range - */ - TInt iPermittedRange; - - /** - * The permitted case - */ - TInt iPermittedCase; - - /** - * The current range - */ - TInt iCurrentRange; - - /** - * The client layout - */ - TInt iClientLayout; - - /** - * The vkb layout - */ - TInt iVkbLayoutId; - - /** - * The editor numeric key map - */ - TInt iEditorNumericKeymap; - - /** - * The editor numeric key map - */ - TBool iEnableSwitchBtn; - - /** - * The flag of shift down - */ - TBool iShiftDown; - - /** - * The flag of capslock down - */ - TBool iCapslockDown; - - /** - * The current accent - */ - TInt iCurrentAccent; - - /** - * The window position - */ - TInt iWindowPosition; - - /** - * The screen mode - */ - TPixelsTwipsAndRotation iScreenMode; - - /** - * The screen size - */ - TSize iScreenSize; - - /** - * The unit width - */ - TInt iUnitWidth; - - /** - * The unit height - */ - TInt iUnitHeight; - - /** - * The setting id for window postion - */ - TInt iPositionSettingId; - - /** - * The rectangle of data query dialog - */ - TRect iDataQueryDlgRect; - - /** - * The layout context - * Not own - */ - MPeninputLayoutContext* iContext; - - /** - * The global setttings repository - * Own - */ - CRepository* iGSRepository; - - /** - * The aknfep repository - * Own - */ - CRepository* iAknFepRepository; - - /** - * The repository watcher, - * which will monitor change of the language and guide line - * Own - */ - CAknFepRepositoryWatcher* iGSRepositoryWatcher; - - /** - * The user defined resource for number - * Own - */ - HBufC* iUserDefinedResource; - - /** - * The reserve data - * not Own - */ - TAny* iReserve_1; - - /** - * The position of the top guide line - */ - TInt iGuideLineTop; - - /** - * The position of the bottom guide line - */ - TInt iGuideLineBottom; - - /** - * Layout size changing flag - */ - TBool iLayoutSizeChanging; - - /** - * Indicate whether unit width has been set - */ - TBool iUnitWidthSet; - - /** - * Indicate whether unit height has been set - */ - TBool iUnitHeightSet; - - /** - * Indicate whether DeadKey has been latched - */ - TBool iLatched; - - /** - * Indicate whether unitsize has been changed - */ - TBool iUnitSizeSet; - - TBool iAllowCaseChange; - }; - -#endif // C_CPENINPUTDATAMGR_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputdataprovider.h --- a/textinput/peninputcommonlayout/inc/peninputdataprovider.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: interface of data provider -* -*/ - - -#ifndef M_MPENINPUTDATAPROVIDER_H -#define M_MPENINPUTDATAPROVIDER_H - -// System includes -#include - -/** - * Pen input data type -*/ -enum TPeninputDataType - { - EPeninputDataTypeCase = 0x00000001, - EPeninputDataTypeInputLanguage = 0x00000002, - EPeninputDataTypePermittedRange = 0x00000004, - EPeninputDataTypeCurrentRange = 0x00000008, - EPeninputDataTypeClientLayout = 0x00000010, - EPeninputDataTypeVkbLayout = 0x00000020, - EPeninputDataTypeNumericKeymap = 0x00000040, - EPeninputDataTypeShiftDown = 0x00000080, - EPeninputDataTypeCapslockDown = 0x00000100, - EPeninputDataTypeCurrentAccent = 0x00000200, - EPeninputDataTypeScreenMode = 0x00000400, - EPeninputDataTypeScreenSize = 0x00000800, - EPeninputDataTypeWindowPosition = 0x00001000, - EPeninputDataTypePositionSettingId = 0x00002000, - EPeninputDataTypeUnitWidth = 0x00004000, - EPeninputDataTypeUnitHeight = 0x00008000, - EPeninputDataTypeDataQueryDlgRect = 0x00010000, - EPeninputDataTypePenTailColor = 0x00020000, - EPeninputDataTypeReserve_1 = 0x00040000, - EPeninputDataTypePermittedCase = 0x00080000, - EAknFepDataTypeUseDefinedResource = 0x00100000, - EAkninputDataTypeGuideLineTop = 0x00200000, - EAkninputDataTypeGuideLineBottom = 0x00400000, - EAkninputDataTypeSizeChanging = 0x00800000, - EAkninputDataTypeUnitSizeSet = 0x01000000, - EAkninputDataTypeLatchedSet = 0x02000000, - EAkninputDataTypeInputArea = 0x04000000, - EAkninputDataTypeAllowCaseChange = 0x08000000 - }; - -/** - * Data provider interface - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class MPeninputDataProvider - { - -public: - - /** - * Request data from data provider - * - * @since S60 v3.2 - * @param aDataType The data request - * @return The data you request - */ - virtual TAny* RequestData( TPeninputDataType aDataType ) = 0; - - /** - * Set data according to the data type - * - * @since S60 v3.2 - * @param aDataType The data type need to set - * @param aData The new data - * @return None - */ - virtual void SetData( TPeninputDataType aDataType, - TAny* aData ) = 0; - - /** - * Reset some data in data manager - * - * @since S60 v3.2 - * @return None - */ - virtual void Reset() = 0; - - /** - * Save key into CenRep(AknFep) - * - * @since S60 v3.2 - * @param aKey The key name - * @param aValue The new value - * @return None - */ - virtual void SaveKey( TInt aKey, TInt aValue ) = 0; - - }; - -#endif //M_MPENINPUTDATAPROVIDER_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputlayoutconfig.h --- a/textinput/peninputcommonlayout/inc/peninputlayoutconfig.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,282 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout config -* -*/ - - -#ifndef C_CPENINPUTLAYOUTCONFIG_H -#define C_CPENINPUTLAYOUTCONFIG_H - - -// System includes -#include -#include - -// Forward decalaration -class CPeninputClientLayoutInfo; -class CPeninputVkbLayoutInfo; -class CPeninputRangeBarInfo; -class CPeninputShiftCapsInfo; -class CPeninputCtrlPool; -/** - * Peninput commonlayout layout config - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputLayoutConfig : public CBase - { - -public: - - /** - * Symbian constructor - * - * @since S60 v3.2 - * @param aResUtils Resource Utils - * @param aReader Resource reader - * @return Pointer to created CPeninputLayoutConfig object - */ - IMPORT_C static CPeninputLayoutConfig* NewL( CAknFepCtrlVkbLayout& aVkblayout, - TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputLayoutConfig(); - - /** - * Get language id - * - * @since S60 v3.2 - * @return Language id - */ - inline TInt Language(); - - /** - * Get language name - * - * @since S60 v3.2 - * @return Language name - */ - inline HBufC* LanguageString(); - - /** - * Get case sensitive flag - * - * @since S60 v3.2 - * @return Case sensitive flag - */ - inline TBool CaseSensitive(); - - /** - * Get guide line - * - * @since S60 v3.2 - * @return The guide line style - */ - inline TInt GuideLine(); - - /** - * The position percent of top guide line - * - * @since S60 v3.2 - * @return The position percent of top guide line - */ - inline TInt PositionTopLine(); - - /** - * The position percent of bottom guide line - * - * @since S60 v3.2 - * @return The position percent of bottom guide line - */ - inline TInt PositionBottomLine(); - - /** - * Get client layout info list - * - * @since S60 v3.2 - * @return The reference of pointer array containing client layout list - */ - inline RPointerArray& ClientLayoutInfoList(); - - /** - * Get vkb layout info list - * - * @since S60 v3.2 - * @return The reference of pointer array containing vkb layout list - */ - inline RPointerArray& VkbLayoutInfoList(); - - /** - * Get shift&caps info - * - * @since S60 v3.2 - * @return The reference of pointer array containing shift&caps info - */ - inline RPointerArray& ShiftCapsInfoList(); - - /** - * Get client layout info - * - * @since S60 v3.2 - * @param aLayoutId Client layout id - * @return The pointer to CPeninputClientLayoutInfo object - */ - IMPORT_C CPeninputClientLayoutInfo* FindClientLayoutInfo( - TInt aLayoutId ); - - /** - * Get vkb layout info - * - * @since S60 v3.2 - * @param aLayoutId Vkb layout id - * @return The pointer to CPeninputVkbLayoutInfo object - */ - IMPORT_C CPeninputVkbLayoutInfo* FindVkbLayoutInfo( TInt aLayoutId ); - - /** - * Get shift&caps info - * - * @since S60 v3.2 - * @param aRangeId Range id - * @return The pointer to CPeninputShiftCapsInfo object - */ - IMPORT_C CPeninputShiftCapsInfo* FindShiftCapsInfo( TInt aRangeId ); - - /** - * Get vkb layout id - * - * @since S60 v3.2 - * @param aRangeId Range id - * @param aShiftCapsSingleId Shift&caps single id - * @return The vkb layout id - */ - IMPORT_C TInt ShiftCapsSingleVkbLayoutId( TInt aRangeId, - TInt aShiftCapsSingleId ); - - /** - * Get vkb layout id - * - * @since S60 v3.2 - * @param aRangeId Range id - * @param aCase The case - * @return The vkb layout id - */ - IMPORT_C TInt ShiftCapsSingleVkbLayoutByCase( TInt aRangeId, - TInt aCase ); - /** - * Get range bar info - * - * @since S60 v3.2 - * @return The pointer to CPeninputRangeBarInfo object - */ - inline CPeninputRangeBarInfo* RangeBarInfo(); - - /** - * Get range bar resource id - * - * @since S60 v3.2 - * @return The resource id - */ - inline TInt RangebarResId(); - -protected: - - /** - * Constructor - * - * @since S60 v3.2 - * @return None - */ - CPeninputLayoutConfig(); - - /** - * Second phase constructor - * - * @since S60 v3.2 - * @param aResUtils Resource Utils - * @param aReader Resource reader - * @return None - */ - void ConstructL( CAknFepCtrlVkbLayout& aVkblayout, TResourceReader& aReader ); - -private: // Data - - /** - * Language id - */ - TInt iLanguage; - - /** - * Language string - * Own - */ - HBufC* iLanguageString; - - /** - * Case sensitive flag - */ - TBool iCaseSensitive; - - /** - * Guide line style - */ - TInt iGuideLine; - - /** - * The position percent of top guide line - */ - TInt iPositionTopLine; - - /** - * The position percent of bottom guide line - */ - TInt iPositionBottomLine; - - /** - * Client layout info list - */ - RPointerArray iClientLayoutInfoList; - - /** - * Vkb layout info list - */ - RPointerArray iVkbLayoutInfoList; - - /** - * Range bar info - * Own - */ - CPeninputRangeBarInfo* iRangeBarInfo; - - /** - * Shift&caps info list - */ - RPointerArray iShiftCapsInfoList; - - /** - * Resource Id for range bar - */ - TInt iRangeBarResId; - }; - -#include "peninputlayoutconfig.inl" - -#endif // C_CPENINPUTLAYOUTCONFIG_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputlayoutconfig.inl --- a/textinput/peninputcommonlayout/inc/peninputlayoutconfig.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout config inline functions -* -*/ - - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::Language -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputLayoutConfig::Language() - { - return iLanguage; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::LanguageString -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline HBufC* CPeninputLayoutConfig::LanguageString() - { - return iLanguageString; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::CaseSensitive -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TBool CPeninputLayoutConfig::CaseSensitive() - { - return iCaseSensitive; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::GuideLine -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputLayoutConfig::GuideLine() - { - return iGuideLine; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::PositionTopLine -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputLayoutConfig::PositionTopLine() - { - return iPositionTopLine; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::PositionBottomLine -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputLayoutConfig::PositionBottomLine() - { - return iPositionBottomLine; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::ClientLayoutInfoList -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray& - CPeninputLayoutConfig::ClientLayoutInfoList() - { - return iClientLayoutInfoList; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::VkbLayoutInfoList -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray& - CPeninputLayoutConfig::VkbLayoutInfoList() - { - return iVkbLayoutInfoList; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::ShiftCapsInfoList -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray& - CPeninputLayoutConfig::ShiftCapsInfoList() - { - return iShiftCapsInfoList; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutConfig::RangeBarInfo -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline CPeninputRangeBarInfo* - CPeninputLayoutConfig::RangeBarInfo() - { - return iRangeBarInfo; - } - -inline TInt CPeninputLayoutConfig::RangebarResId() - { - return iRangeBarResId; - } - \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputlayoutcontext.h --- a/textinput/peninputcommonlayout/inc/peninputlayoutcontext.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: interface of layout context -* -*/ - - -#ifndef M_MPENINPUTLAYOUTCONTEXT_H -#define M_MPENINPUTLAYOUTCONTEXT_H - -// System includes -#include - -// User includes -#include "peninputdataprovider.h" - -// Class forward decalaration -class CFepUiBaseCtrl; - -/** - * Peninput common layout interface - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class MPeninputLayoutContext - { - -public: - - /** - * Send event to window - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The sender control - * @param aEventData The event data - * @return None - */ - virtual void SendEventToWindow( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData = KNullDesC ) = 0; - - virtual TBool IsShiftPermitted() = 0; - virtual TBool IsCapsLockPermitted() = 0; - - /** - * Send key to fep - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aEventData The event data - * @return None - */ - virtual void Sendkey( TInt aEventType, - const TDesC& aEventData = KNullDesC ) = 0; - - /** - * Request data from data provider - * - * @since S60 v3.2 - * @param aDataType The data type request - * @return The pointer to TAny type data requested - */ - virtual TAny* RequestData( TPeninputDataType aDataType ) = 0; - - /** - * Set data for data provider - * - * @since S60 v3.2 - * @param aDataType The data type to set value - * @param aData The pointer to TAny type data - * @return None - */ - virtual void SetData( TPeninputDataType aDataType, TAny* aData ) = 0; - - /** - * Save key into CenRep(AknFep) - * - * @since S60 v3.2 - * @param aKey The key name - * @param aValue The new value - * @return None - */ - virtual void SaveKey( TInt aKey, TInt aValue ) = 0; - - /** - * Get the layout type, vkb or hwr. - * - * @since S60 v3.2 - * @return The layout type - */ - virtual TInt LayoutType() = 0; - - }; - -#endif // End of M_PENINPUTLAYOUTCONTEXT_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputlayoutwindow.h --- a/textinput/peninputcommonlayout/inc/peninputlayoutwindow.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,675 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout window class -* -*/ - - -#ifndef C_CPENINPUTLAYOUTWINDOW_H -#define C_CPENINPUTLAYOUTWINDOW_H - -// System includes -#include - -// User includes -#include "peninputctrlpool.h" -#include "peninputlayoutconfig.h" -#include "peninputcommonlayoutglobalenum.h" - -// Forward declarations -class CFepUiLayout; -class CFepInputContextField; -class CAknFepCtrlEventButton; -class MPeninputLayoutContext; -class CPeninputLayoutConfig; -class CPeninputNumericKepMappingMgr; -class CFepLayoutMultiLineIcf; -class CAknFepCtrlRepeatButton; - -/** - * Common pen input layout window class. - * This class define the common behaviors of VKB layout window and - * HWR layout window. - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputLayoutWindow : public CAknFepCtrlBaseWindow - { - -public: - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputLayoutWindow(); - - /** - * Get layout config - * - * @since S60 v3.2 - * @return The pointer to CPeninputLayoutConfig object - */ - IMPORT_C CPeninputLayoutConfig* ConfigInfo() const; - - /** - * Change input language - * - * @since S60 v3.2 - * @param aLangID The new language id - * @return None - */ - IMPORT_C void ChangeInputLanguageL( TInt aLangID ); - - /** - * Change range - * - * @since S60 v3.2 - * @param aRange The destination range - * @return None - */ - IMPORT_C void ChangeRange( TInt aRange, TInt aVkbLayoutId = 0, TBool aNotify = ETrue ); - - /** - * Set the input context field text - * - * @since S60 v3.2 - * @param aData The data of type TFepInputContextFieldData to be set - * @return None - */ - IMPORT_C void SetEditorTextL( const TFepInputContextFieldData& aData ); - - /** - * Set if the input context field text is secret - * - * @since S60 v3.2 - * @param aData The flag - * @return None - */ - IMPORT_C void SetTextIsSecret( TBool aData ); - - void SetNumberGrouping( TBool aData ); - - /** - * Method for size changing of the window - * - * @since S60 v3.2 - * @param aLandscapeStyle The flag that specify the window style is - * landscape or portrait - * @return None - */ - IMPORT_C virtual void SizeChanged( TBool aLanscapeStyle ); - - /** - * Handle control event - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The control who sends the event - * @param aEventData The event data - * @return None - */ - IMPORT_C virtual void HandleControlEvent( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData ); - - /** - * Change client area layout - * - * @since S60 v3.2 - * @param aClientLayoutId The id of client area layout - * @return None - */ - IMPORT_C void ChangeClientLayout( TInt aClientLayoutId ); - - /** - * Change vkb area layout - * - * @since S60 v3.2 - * @param aVkbLayoutId The id of vkb area layout - * @return None - */ - IMPORT_C void ChangeVkbLayout( TInt aVkbLayoutId ); - - /** - * Get id of window config resource - * - * @since S60 v3.2 - * @return The id of window config resource - */ - virtual TInt GetWindowConfigResId() = 0; - - /** - * Get id of window resource - * - * @since S60 v3.2 - * @return The id of window resource - */ - virtual TInt GetWindowResId() = 0; - - /** - * Get file name of window config resource - * - * @since S60 v3.2 - * @param aLangID The id of language - * @return The file name of window config resource - */ - virtual const TDesC& - GetWindowConfigResFileName( TInt aLangID ) = 0; - - /** - * Get file name of window resource - * - * @since S60 v3.2 - * @return The file name of window resource - */ - virtual const TDesC& GetWindowResFileName() = 0; - - /** - * Change unit size - * - * @since S60 v3.2 - * @return The rect of whole window - */ - virtual const TRect ChangeUnitSize() = 0; - - /** - * Change size of client area - * - * @since S60 v3.2 - * @param aLeftTopPoint The left top point of client area - * @return None - */ - virtual void ChangeClientSize() = 0; - - /** - * Construct all controls specified in resource(implementation will be - * postponed in subclass) - * - * @since S60 v3.2 - * @return None - */ - virtual void CreateAllControlsL() = 0; - - /** - * Set control fonts. Fonts info comes from resource - * - * @since S60 v3.2 - * @return None - */ - virtual void SetControlsFont() = 0; - - /** - * Pop up choice list - * - * @since S60 v3.2 - * @return None - */ - virtual void PopupChoiceList() = 0; - - /** - * Re-organize all controls in the assigned client area layout - * - * @since S60 v3.2 - * @param aClientLayoutId The id of client area layout - * @return None - */ - virtual void ReorganizeControls( TInt aClientLayoutId, TBool aNeedReset ) = 0; - - /** - * Do when case changed - * - * @since S60 v3.2 - * @param aNewCase The new case - * @return None - */ - virtual void DoCaseChange( TInt aNewCase ) = 0; - - /** - * Handler for range button clicked - * - * @since S60 v3.2 - * @param aRange The range id - * @return None - */ - IMPORT_C virtual void HandleRangeEvent( TInt aRange ); - - /** - * Handler for range loop event - * - * @since S60 v3.2 - * @param aLoop The loop id - * @return None - */ - IMPORT_C virtual void HandleRangeLoopEvent( TInt aLoop ); - - /** - * Handler for shift button clicked - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void HandleShiftBtnClicked(); - - /** - * Handler for capslock button clicked - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void HandleCapslockBtnClicked(); - - /** - * Draw window and shadow - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void Draw(); - - /** - * Set if enable switch to hwr - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - IMPORT_C void SetEnableSwitchToHwr(TBool aEnable); - - /** - * Set if enable option button and language switch button - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - IMPORT_C void SetEnableSettingBtn(TBool aEnable); - - /** - * config unit size, reason may due to client layout id changed, - * or screen resolution changed - * - * @since S60 v3.2 - * @param aClientLayoutId New client layout id - * @return ETrue means unit size changed, otherwise EFalse - */ - IMPORT_C virtual TBool ReconfigUnitSize(TInt aClientLayoutId); - - IMPORT_C void CPeninputLayoutWindow::SetTextAlignmentL( TInt aAlignment ); - -protected: - - /** - * constructor - * - * @since S60 v3.2 - * @param aUiLayout The pointer to CFepUiLayout object - * @param aLayoutContext The pointer to MPeninputLayoutContext - * @return None - */ - IMPORT_C CPeninputLayoutWindow( CFepUiLayout* aUiLayout, - MPeninputLayoutContext* aLayoutContext ); - - /** - * Second-phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructL(); - /** - * From CAknFepCtrlBaseWindow - * Close window - * - * @since S60 v3.2 - * @return The TBool indicating the result of close operation - */ - IMPORT_C TBool DoClose(); - - /** - * Construct from resource file - * - * @since S60 v3.2 - * @param aResReader The resource reader - * @param aResUtils The resource utils - * @return None - */ - IMPORT_C virtual void ConstructFromResourceL( - TResourceReader& aResReader ); - - /** - * ConstructFromResourceL load settings from resource. - * Before calling this function, the resource id should be set - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructFromResourceL(); - - /** - * Add not owned control into the window - * - * @since S60 v3.2 - * @param aControl The control to be added - * @return None - */ - IMPORT_C void AddNotOwnedControl( CFepUiBaseCtrl* aControl ); - - /** - * Change button status - * - * @since S60 v3.2 - * @param aIsDown The button is down or not - * @param aControlId The destination button id - * @return None - */ - - IMPORT_C void ChangeButtonStatus(const TInt aIsDown, const TInt aControlId); - - /** - * Change layout position - * - * @since S60 v3.2 - * @return The new rectangle of layout - */ - IMPORT_C void ChangeLayoutPosition( TInt aJustifyStyle ); - - /** - * Set the window rect - * - * @since S60 v3.2 - * @param aRect The new rect of the window - * @return None - */ - IMPORT_C void SetWindowRect(const TRect& aRect); - - /** - * Read icf bitmap from resource - * - * @since S60 v3.2 - * @param aResReader The reource reader - * @return None - */ - IMPORT_C void ReadIcfInfo( TResourceReader aResReader ); - - /** - * Set text font for language switch button. - * - * @since S60 v3.2 - * @param aSwitchBtn Pointer to language switch button - * @return None - */ - IMPORT_C void SetSwitchBtnFont(CAknFepCtrlEventButton& aSwitchBtn); - - /** - * Set text color for language switch button. - * - * @since S60 v3.2 - * @param aSwitchBtn Pointer to language switch button - * @return None - */ - IMPORT_C void SetSwitchBtnTextColor(CAknFepCtrlEventButton& aSwitchBtn); - - - IMPORT_C virtual TBool IsMultiLineIcf(); - - IMPORT_C virtual TBool IsCanChangeRange(TInt aRange); - - IMPORT_C virtual void ChangeToPreviousRange(TInt aRange); - -private: - /** - * Read shadow bitmap from resource - * - * @since S60 v3.2 - * @param aResReader The reource reader - * @return None - */ - void ReadShadowInfoL( TResourceReader aResReader ); - - /** - * Read background bitmap from resource - * - * @since S60 v3.2 - * @param aResId resource ID - * @return None - */ - void CPeninputLayoutWindow::ReadBackgroundInfoL( TInt aResId ); - - /** - * Read laf of shadow - * - * @since S60 v3.2 - * @param aRect the parent window - * @return None - */ - void ReadLafForShadow(); - - /** - * Add context field into the window - * - * @since S60 v3.2 - * @return None - */ - void AddContextFieldL(); - - /** - * Add touch input button into the window - * - * @since S60 v3.2 - * @param aResID The reource id for touch input button - * @return None - */ - void AddTouchInputButtonL( TInt aResId ); - - - /** - * Check whether or not the resource file exists - * - * @since S60 v3.2 - * @param aFileName The name of resource file - * @return The TBool indicating existance of resource file - */ - TBool CheckResourceExist( const TDesC& aFileName ); - - /** - * Get case decided by shift&caps status - * - * @since S60 v3.2 - * @return The case value - */ - TInt CaseByShiftCapslockStatus(); - - /** - * Dim keys - * - * @since S60 v3.2 - * @return None - */ - void DimKeys(); - - /** - * Change size for base window, such as move button,drag button etc. - * - * @since S60 v3.2 - * @return None - */ - void SizeChangedForBaseWindow( TInt aTotalColumns ); - - /** - * Change range bar - * - * @since S60 v3.2 - * @return None - */ - void ChangeRangeBarL(); - - /** - * Change window position - * - * @since S60 v3.2 - * @return None. - */ - void TopLeftJustify(); - - /** - * Change window position - * - * @since S60 v3.2 - * @return None. - */ - void BottomRightJustify(); - - /** - * Change window position - * - * @since S60 v3.2 - * @return None. - */ - void DataQueryJustify(); - - /** - * Get key mapping string from resource or user defined mappings - * - * @since S60 v3.2 - * @param aKeyMapping The key mapping enum - * @return None. - */ - HBufC* GetKeyMappingStringL(TInt aKeyMapping); - - void ReadMultiLineIcfInforL(TInt aResID = 0); - - void AddMultiContextFieldL(); - -protected: // data - - /** - * The input context field - * Own - */ - CFepInputContextField* iInputContextField; - - - CFepLayoutMultiLineIcf* iMultiLineIcf; - - /** - * The touch input options button - * Own - */ - CAknFepCtrlEventButton* iTouchInputOptionButton; - - /** - * Control pool maintainer - * Own - */ - CPeninputCtrlPool* iCtrlPool; - - /** - * The layout config - * Own - */ - CPeninputLayoutConfig* iConfigInfo; - - /** - * The layout context - * Not own - */ - MPeninputLayoutContext* iLayoutContext; - - /** - * The numeric kep mapping manager - * Own - */ - CPeninputNumericKepMappingMgr* iKeyMappingMgr; - - /** - * Vkb layout - * Own - */ - CAknFepCtrlVkbLayout* iVkbLayout; - - /** - * Language is changed - */ - TBool iLangOrSizeChanged; - - /** - * The total column for the window - */ - TInt iLastUsedTotalColumns; - - /** - * The resource id of window - */ - TInt iWinResId; - - /** - * The resource id of config - */ - TInt iConfigResId; - - /** - * Width of top left shadow rect - */ - TInt iShadowTlWidth; - - /** - * Height of top left shadow rect - */ - TInt iShadowTlHeight; - - /** - * Width of bottom right shadow rect - */ - TInt iShadowBrWidth; - - /** - * Height of bottom right shadow rect - */ - TInt iShadowBrHeight; - - /** - * First time construct flag - */ - TBool iFirstTimeConstruct; - - /** - * Switch button font id - */ - TInt32 iSwitchFont; - - /** - * Switch button shadow font id - */ - TInt32 iSwitchShadowFont; - - /** - * Indicate whether switch(shadow) font has been set - */ - TBool iSwitchFontSet; - - /** - * Indicate whether need size change when change unit size - */ - TBool iUnitSizeChange; - /** - * The backspace button - * Own - */ - CAknFepCtrlRepeatButton* iBackspaceButton; - }; -#endif // C_CPENINPUTLAYOUTWINDOW_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h --- a/textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,662 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout window class -* -*/ - - -#ifndef C_CPENINPUTLAYOUTWINDOWEXT_H -#define C_CPENINPUTLAYOUTWINDOWEXT_H - -// System includes -#include - -// User includes -#include "peninputctrlpool.h" -#include "peninputlayoutconfig.h" -#include "peninputcommonlayoutglobalenum.h" - -// Forward declarations -class CFepUiLayout; -class CFepInputContextField; -class CAknFepCtrlEventButton; -class MPeninputLayoutContext; -class CPeninputLayoutConfig; -class CPeninputNumericKepMappingMgr; - -/** - * Common pen input layout window class. - * This class define the common behaviors of VKB layout window and - * HWR layout window. - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputLayoutWindowExt : public CAknFepCtrlBaseWindowExt - { - -public: - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputLayoutWindowExt(); - - /** - * Get layout config - * - * @since S60 v3.2 - * @return The pointer to CPeninputLayoutConfig object - */ - IMPORT_C CPeninputLayoutConfig* ConfigInfo() const; - - /** - * Change input language - * - * @since S60 v3.2 - * @param aLangID The new language id - * @return None - */ - IMPORT_C void ChangeInputLanguageL( TInt aLangID ); - - /** - * Change range - * - * @since S60 v3.2 - * @param aRange The destination range - * @return None - */ - IMPORT_C void ChangeRange( TInt aRange, TInt aVkbLayoutId = 0, TBool aNotify = ETrue ); - - /** - * Set the input context field text - * - * @since S60 v3.2 - * @param aData The data of type TFepInputContextFieldData to be set - * @return None - */ - IMPORT_C void SetEditorTextL( const TFepInputContextFieldData& aData ); - - /** - * Set if the input context field text is secret - * - * @since S60 v3.2 - * @param aData The flag - * @return None - */ - IMPORT_C void SetTextIsSecret( TBool aData ); - - void SetNumberGrouping(TBool aData); - - /** - * Method for size changing of the window - * - * @since S60 v3.2 - * @param aLandscapeStyle The flag that specify the window style is - * landscape or portrait - * @return None - */ - IMPORT_C virtual void SizeChanged( TBool aLanscapeStyle ); - - /** - * Handle control event - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aCtrl The control who sends the event - * @param aEventData The event data - * @return None - */ - IMPORT_C virtual void HandleControlEvent( TInt aEventType, - CFepUiBaseCtrl* aCtrl, - const TDesC& aEventData ); - - /** - * Change client area layout - * - * @since S60 v3.2 - * @param aClientLayoutId The id of client area layout - * @return None - */ - IMPORT_C void ChangeClientLayout( TInt aClientLayoutId ); - - /** - * Change vkb area layout - * - * @since S60 v3.2 - * @param aVkbLayoutId The id of vkb area layout - * @return None - */ - IMPORT_C void ChangeVkbLayout( TInt aVkbLayoutId ); - - /** - * Get id of window config resource - * - * @since S60 v3.2 - * @return The id of window config resource - */ - virtual TInt GetWindowConfigResId() = 0; - - /** - * Get id of window resource - * - * @since S60 v3.2 - * @return The id of window resource - */ - virtual TInt GetWindowResId() = 0; - - /** - * Get file name of window config resource - * - * @since S60 v3.2 - * @param aLangID The id of language - * @return The file name of window config resource - */ - virtual const TDesC& - GetWindowConfigResFileName( TInt aLangID ) = 0; - - /** - * Get file name of window resource - * - * @since S60 v3.2 - * @return The file name of window resource - */ - virtual const TDesC& GetWindowResFileName() = 0; - - /** - * Change unit size - * - * @since S60 v3.2 - * @return The rect of whole window - */ - virtual const TRect ChangeUnitSize() = 0; - - /** - * Change size of client area - * - * @since S60 v3.2 - * @param aLeftTopPoint The left top point of client area - * @return None - */ - virtual void ChangeClientSize() = 0; - - /** - * Construct all controls specified in resource(implementation will be - * postponed in subclass) - * - * @since S60 v3.2 - * @return None - */ - virtual void CreateAllControlsL() = 0; - - /** - * Set control fonts. Fonts info comes from resource - * - * @since S60 v3.2 - * @return None - */ - virtual void SetControlsFont() = 0; - - /** - * Pop up choice list - * - * @since S60 v3.2 - * @return None - */ - virtual void PopupChoiceList() = 0; - - /** - * Re-organize all controls in the assigned client area layout - * - * @since S60 v3.2 - * @param aClientLayoutId The id of client area layout - * @return None - */ - virtual void ReorganizeControls( TInt aClientLayoutId, TBool aNeedReset ) = 0; - - /** - * Do when case changed - * - * @since S60 v3.2 - * @param aNewCase The new case - * @return None - */ - virtual void DoCaseChange( TInt aNewCase ) = 0; - IMPORT_C virtual void OnInputLanguageChange(); - - /** - * Handler for range button clicked - * - * @since S60 v3.2 - * @param aRange The range id - * @return None - */ - IMPORT_C virtual void HandleRangeEvent( TInt aRange ); - - /** - * Handler for range loop event - * - * @since S60 v3.2 - * @param aLoop The loop id - * @return None - */ - IMPORT_C virtual void HandleRangeLoopEvent( TInt aLoop ); - - /** - * Handler for shift and capslock merged button clicked - * - * @since S60 v3.2 - * @param aMode The mode of the mutimode button - * @return None - */ - IMPORT_C virtual void HandleMergedBtnClicked( TInt aCase ); - - /** - * Handler for shift button clicked - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void HandleShiftBtnClicked(); - - /** - * Handler for capslock button clicked - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void HandleCapslockBtnClicked(); - - /** - * Handler for shif and capslock button clicked - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void HandleShiftAndCapslockBtnClicked(); - - /** - * Draw window and shadow - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void Draw(); - - /** - * Set if enable switch to hwr - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - IMPORT_C void SetEnableSwitchToHwr(TBool aEnable); - - /** - * Set if enable option button and language switch button - * - * @since S60 v3.2 - * @param aEnable The enable flag - * @return None - */ - IMPORT_C void SetEnableSettingBtn(TBool aEnable); - - /** - * config unit size, reason may due to client layout id changed, - * or screen resolution changed - * - * @since S60 v3.2 - * @param aClientLayoutId New client layout id - * @return ETrue means unit size changed, otherwise EFalse - */ - IMPORT_C virtual TBool ReconfigUnitSize(TInt aClientLayoutId); - - /** - * Get numeric keymapping resource id - * - * @since S60 v3.2 - * @return The id of numeric keymapping - */ - virtual TInt GetNumKeymappingResId() = 0; - - IMPORT_C void CPeninputLayoutWindowExt::SetTextAlignmentL( TInt aAlignment ); - -protected: - - /** - * constructor - * - * @since S60 v3.2 - * @param aUiLayout The pointer to CFepUiLayout object - * @param aLayoutContext The pointer to MPeninputLayoutContext - * @return None - */ - IMPORT_C CPeninputLayoutWindowExt( CFepUiLayout* aUiLayout, - MPeninputLayoutContext* aLayoutContext ); - - /** - * Second-phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void ConstructL(); - /** - * From CAknFepCtrlBaseWindow - * Close window - * - * @since S60 v3.2 - * @return The TBool indicating the result of close operation - */ - IMPORT_C TBool DoClose(); - - /** - * Construct from resource file - * - * @since S60 v3.2 - * @param aResReader The resource reader - * @param aResUtils The resource utils - * @return None - */ - //IMPORT_C virtual void ConstructFromResourceL( - //TResourceReader& aResReader ); - - /** - * ConstructFromResourceL load settings from resource. - * Before calling this function, the resource id should be set - * - * @since S60 v3.2 - * @return None - */ - //IMPORT_C void ConstructFromResourceL(); - - /** - * Add not owned control into the window - * - * @since S60 v3.2 - * @param aControl The control to be added - * @return None - */ - IMPORT_C void AddNotOwnedControl( CFepUiBaseCtrl* aControl ); - - /** - * Change button status - * - * @since S60 v3.2 - * @param aIsDown The button is down or not - * @param aControlId The destination button id - * @return None - */ - - IMPORT_C void ChangeButtonStatus(const TInt aIsDown, const TInt aControlId); - - /** - * Change Merged shift and capslock button status - * - * @since S60 v3.2 - * @param aIsShiftCase when shift case - * @param aIsCapslockCase when capslock case - * @return None - */ - - IMPORT_C void ChangeMergedButtonStatus( const TInt aIsShiftCase, - const TInt aIsCapslockCase ); - - /** - * Change layout position - * - * @since S60 v3.2 - * @return The new rectangle of layout - */ - IMPORT_C void ChangeLayoutPosition( TInt aJustifyStyle ); - - /** - * Set the window rect - * - * @since S60 v3.2 - * @param aRect The new rect of the window - * @return None - */ - IMPORT_C void SetWindowRect(const TRect& aRect); - - /** - * Read icf bitmap from resource - * - * @since S60 v3.2 - * @param aResReader The reource reader - * @return None - */ - //IMPORT_C void ReadIcfInfo( TResourceReader aResReader ); - - /** - * Set text font for language switch button. - * - * @since S60 v3.2 - * @param aSwitchBtn Pointer to language switch button - * @return None - */ - IMPORT_C void SetSwitchBtnFont(CAknFepCtrlEventButton& aSwitchBtn); - - /** - * Set text color for language switch button. - * - * @since S60 v3.2 - * @param aSwitchBtn Pointer to language switch button - * @return None - */ - IMPORT_C void SetSwitchBtnTextColor(CAknFepCtrlEventButton& aSwitchBtn); - - - /** - * Change size for base window, such as move button,drag button etc. - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual void SizeChangedForBaseWindow( TInt aTotalColumns ); - - IMPORT_C virtual void SetLafLayOut(TInt aRows, TInt aColumns); - - IMPORT_C virtual void SetVkbLayoutSize(); - - virtual TBool CreateCustomControlL( TInt16 aControlId, TInt32 aImageId ); - - virtual void AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl); - -private: - - /** - * Read laf of shadow - * - * @since S60 v3.2 - * @param aRect the parent window - * @return None - */ - void ReadLafForShadow(); - - /** - * Check whether or not the resource file exists - * - * @since S60 v3.2 - * @param aFileName The name of resource file - * @return The TBool indicating existance of resource file - */ - TBool CheckResourceExist( const TDesC& aFileName ); - - /** - * Get case decided by shift&caps status - * - * @since S60 v3.2 - * @return The case value - */ - TInt CaseByShiftCapslockStatus(); - - /** - * Dim keys - * - * @since S60 v3.2 - * @return None - */ - void DimKeys(); - void DimKeysL(); - - /** - * Change range bar - * - * @since S60 v3.2 - * @return None - */ - void ChangeRangeBarL(); - - /** - * Change window position - * - * @since S60 v3.2 - * @return None. - */ - void TopLeftJustify(); - - /** - * Change window position - * - * @since S60 v3.2 - * @return None. - */ - void BottomRightJustify(); - - /** - * Change window position - * - * @since S60 v3.2 - * @return None. - */ - void DataQueryJustify(); - - /** - * Get key mapping string from resource or user defined mappings - * - * @since S60 v3.2 - * @param aKeyMapping The key mapping enum - * @return None. - */ - HBufC* GetKeyMappingStringL( TInt aKeyMapping, const TInt aLang ); - - void ResetLastColRow(); -protected: // data - - /** - * The layout config - * Own - */ - CPeninputLayoutConfig* iConfigInfo; - - /** - * The layout context - * Not own - */ - MPeninputLayoutContext* iLayoutContext; - - /** - * The numeric kep mapping manager - * Own - */ - CPeninputNumericKepMappingMgr* iKeyMappingMgr; - - /** - * Vkb layout - * Own - */ - CAknFepCtrlVkbLayout* iVkbLayout; - - /** - * Language is changed - */ - TBool iLangOrSizeChanged; - - /** - * The total column for the window - */ - TInt iLastUsedTotalColumns; - - TInt iLastUsedTotalRows; - - /** - * The resource id of window - */ - TInt iWinResId; - - /** - * The resource id of config - */ - TInt iConfigResId; - - /** - * Width of top left shadow rect - */ - TInt iShadowTlWidth; - - /** - * Height of top left shadow rect - */ - TInt iShadowTlHeight; - - /** - * Width of bottom right shadow rect - */ - TInt iShadowBrWidth; - - /** - * Height of bottom right shadow rect - */ - TInt iShadowBrHeight; - - /** - * First time construct flag - */ - TBool iFirstTimeConstruct; - - /** - * Switch button font id - */ - TInt32 iSwitchFont; - - /** - * Switch button shadow font id - */ - TInt32 iSwitchShadowFont; - - /** - * Indicate whether switch(shadow) font has been set - */ - TBool iSwitchFontSet; - - /** - * Indicate whether need size change when change unit size - */ - TBool iUnitSizeChange; - - /** - * Tone mark set for Viet - */ - HBufC* iToneSet; - - /** - * Vowel char flag for Viet - */ - TBool iVowelChar; - }; -#endif // C_CPeninputLayoutWindowExt_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputnumerickeymappingmgr.h --- a/textinput/peninputcommonlayout/inc/peninputnumerickeymappingmgr.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: vkb number keymapping manager header file -* -*/ - - -#ifndef C_CPENINPUTNUMERICKEYMAPPINGMGR_H -#define C_CPENINPUTNUMERICKEYMAPPINGMGR_H - -// System includes -#include -#include - -/** - * vkb number keymapping manager class - * - * This class is to manage number keymapping. When this class contructs, keymapping - * manager loads all mapping number key string from resource file. User can get - * mapping key string according to keymapping id and delete all internal value when - * destructing or calling reset. - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputNumericKepMappingMgr : public CBase - { - -public: - - /** - * Two-phased constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputNumericKepMappingMgr object - */ - IMPORT_C static CPeninputNumericKepMappingMgr* NewL( - TResourceReader aReader ); - - /** - * Two-phased constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputNumericKepMappingMgr object - */ - IMPORT_C static CPeninputNumericKepMappingMgr* NewLC( - TResourceReader aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputNumericKepMappingMgr(); - - /** - * Remove all keymapping ids and strings in array - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Reset(); - - /** - * Get count of items in keymapping id array - * - * @since S60 v3.2 - * @return The count of items in keymapping id array - */ - IMPORT_C TInt Count() const; - - /** - * Get keymapping string by keymapping id - * - * @since S60 v3.2 - * @param aKeyMappingId Keymapping id - * @return The pointer to HBufC data containing keymapping string - */ - IMPORT_C HBufC* KeyMappingStringL( const TInt aKeyMappingId ) const; - - /** - * Get Arabic keymapping string by keymapping id - * - * @since S60 v3.2 - * @param aKeyMappingId Keymapping id - * @return The pointer to HBufC data containing Arabic keymapping string - */ - IMPORT_C HBufC* KeyMappingStringL( const TInt aKeyMappingID, - const TInt aLang ) const; - -protected: - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader aReader ); - -private: // Data - - /** - * Keymapping id array - */ - RArray iKeyMappingIdList; - - /** - * Keymapping string array - */ - RPointerArray iKeyMappingStringList; - - }; - -#endif // C_CPENINPUTNUMERICKEYMAPPINGMGR_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputrangebarinfo.h --- a/textinput/peninputcommonlayout/inc/peninputrangebarinfo.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,242 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: range bar layout implementation -* -*/ - - -#ifndef C_CPENINPUTRANGEBARINFO_H -#define C_CPENINPUTRANGEBARINFO_H - -// System includes -#include -#include -#include - -// User includes -#include "peninputcommonlayoutglobalenum.h" - -/** - * Peninput range bar definition - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputRangeInfo : public CBase - { - -public: - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputRangeInfo object - */ - IMPORT_C static CPeninputRangeInfo* NewL( TResourceReader& aReader ); - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputRangeInfo object - */ - IMPORT_C static CPeninputRangeInfo* NewLC( TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputRangeInfo(); - - /** - * Get range id - * - * @since S60 v3.2 - * @return Range id - */ - inline TInt RangeId(); - - - /** - * Get response style - * - * @since S60 v3.2 - * @return Response style - */ - inline TPeninputRangeResponseStyle ResponseStyle(); - - /** - * Get client layout id - * - * @since S60 v3.2 - * @return Client layout id - */ - inline TInt ClientLayoutId(); - - /** - * Get vkb layout id - * - * @since S60 v3.2 - * @return Vkb layout id - */ - inline TInt VkbLayoutId(); - - -protected: - - /** - * Second phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - - /** - * Construct from resource - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructFromResourceL( TResourceReader& aReader ); - -private: // data - - /** - * Range id - */ - TInt iRangeId; - - /** - * Response style - */ - TPeninputRangeResponseStyle iResponseStyle; - - /** - * Client layout id - */ - TInt iClientLayoutId; - - /** - * Vkb layout id - */ - TInt iVkbLayoutId; - - }; - -/** - * Peninput range bar definition - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputRangeBarInfo : public CBase - { - -public: - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputRangeBarInfo object - */ - IMPORT_C static CPeninputRangeBarInfo* NewL( TResourceReader& aReader ); - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputRangeBarInfo object - */ - IMPORT_C static CPeninputRangeBarInfo* NewLC( TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputRangeBarInfo(); - - /** - * Get range style - * - * @since S60 v3.2 - * @return Range style - */ - inline TInt RangeStyle(); - - /** - * Get range info by range id - * - * @since S60 v3.2 - * @param aRangeId Range id - * @return The pointer to CPeninputRangeInfo object - */ - IMPORT_C CPeninputRangeInfo* FindRange( TInt aRangeId ); - - /** - * Get reference of pointer array of ranges - * - * @since S60 v3.2 - * @return The reference of pointer array of ranges - */ - inline RPointerArray& Ranges(); - -protected: - - /** - * Second phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - - /** - * Construct from resource - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructFromResourceL( TResourceReader& aReader ); - -private: // data - - /** - * Range bar style - */ - TInt iRangeStyle; - - /** - * Array of ranges on rangebar - */ - RPointerArray iRanges; - - }; - -#include "peninputrangebarinfo.inl" - -#endif // C_CPENINPUTRANGEBARINFO_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputrangebarinfo.inl --- a/textinput/peninputcommonlayout/inc/peninputrangebarinfo.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: range bar layout inline function -* -*/ - - -// ----------------------------------------------------------------------------- -// CPeninputRangeInfo::RangeId -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputRangeInfo::RangeId() - { - return iRangeId; - } - -// ----------------------------------------------------------------------------- -// CPeninputRangeInfo::ResponseStyle -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TPeninputRangeResponseStyle CPeninputRangeInfo::ResponseStyle() - { - return iResponseStyle; - } - -// ----------------------------------------------------------------------------- -// CPeninputRangeInfo::ClientLayoutId -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputRangeInfo::ClientLayoutId() - { - return iClientLayoutId; - } - -// ----------------------------------------------------------------------------- -// CPeninputRangeInfo::VkbLayoutId -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputRangeInfo::VkbLayoutId() - { - return iVkbLayoutId; - } - -// ----------------------------------------------------------------------------- -// CPeninputRangeBarInfo::RangeStyle -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputRangeBarInfo::RangeStyle() - { - return iRangeStyle; - } - - -// ----------------------------------------------------------------------------- -// CPeninputRangeBarInfo::Ranges -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray& CPeninputRangeBarInfo::Ranges() - { - return iRanges; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputshiftcapsInfo.h --- a/textinput/peninputcommonlayout/inc/peninputshiftcapsInfo.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: shift and capslock information -* -*/ - - -#ifndef C_CPENINPUTSHIFTCAPSINFO_H -#define C_CPENINPUTSHIFTCAPSINFO_H - -// System includes -#include -#include -#include - -/** - * Peninput shift and capslock info definition - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputShiftCapsInfo : public CBase - { - -public: - - /** - * shift&caps single info - */ - struct TPeninputShiftCapsSingle - { - TInt iId; - TInt iVkbLayoutId; - TInt iCaseUsed; - }; - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputShiftCapsInfo object - */ - IMPORT_C static CPeninputShiftCapsInfo* NewL( TResourceReader& aReader ); - - /** - * Two-phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return The pointer to CPeninputShiftCapsInfo object - */ - IMPORT_C static CPeninputShiftCapsInfo* NewLC( TResourceReader& aReader ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputShiftCapsInfo(); - - /** - * Get shift caps single info by id - * - * @since S60 v3.2 - * @param aId Shift caps id - * @return The pointer to TPeninputShiftCapsSingle object - */ - IMPORT_C TPeninputShiftCapsSingle* FindShiftCapsSingleById( TInt aId ); - - /** - * Get shift caps single info by case - * - * @since S60 v3.2 - * @param aCase Range id - * @return The pointer to TPeninputShiftCapsSingle object - */ - IMPORT_C TPeninputShiftCapsSingle* FindShiftCapsSingleByCase( TInt aCase ); - - /** - * Get range id - * - * @since S60 v3.2 - * @return Range id - */ - inline TInt RangeId(); - - /** - * Get array of shift caps single info - * - * @since S60 v3.2 - * @return The reference of pointer array of shift - * caps single info - */ - inline RPointerArray& ShiftCapsSingleList(); - -protected: - - /** - * Second phase constructor - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructL( TResourceReader& aReader ); - - /** - * Construct from resource - * - * @since S60 v3.2 - * @param aReader Resource reader - * @return None - */ - void ConstructFromResourceL( TResourceReader& aReader ); - -private: // Data - - /** - * Range id - */ - TInt iRangeId; - - /** - * Array of shift caps single info - */ - RPointerArray iShiftCapsSingleList; - - }; - -#include "peninputshiftcapsinfo.inl" - -#endif // C_CPENINPUTSHIFTCAPSINFO_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputshiftcapsinfo.inl --- a/textinput/peninputcommonlayout/inc/peninputshiftcapsinfo.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: shift caps info inline function -* -*/ - - -// ----------------------------------------------------------------------------- -// CPeninputShiftCapsInfo::RangeId -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline TInt CPeninputShiftCapsInfo::RangeId() - { - return iRangeId; - } - -// ----------------------------------------------------------------------------- -// CPeninputShiftCapsInfo::ShiftCapsSingleList -// (other items were commented in a header) -// ----------------------------------------------------------------------------- -// -inline RPointerArray& - CPeninputShiftCapsInfo::ShiftCapsSingleList() - { - return iShiftCapsSingleList; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputuistatebase.h --- a/textinput/peninputcommonlayout/inc/peninputuistatebase.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of ui state -* -*/ - - -#ifndef C_CPENINPUTUISTATEBASE_H -#define C_CPENINPUTUISTATEBASE_H - -// System includes -#include -#include -#include - -// Forward declarations -class MPeninputUiStateMgr; -class MPeninputLayoutContext; - -/** - * Basic class of ui state - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputUiStateBase : public CBase - { - -public: - - /** - * Two-phased constructor - * - * @since S60 v3.2 - * @param aUiStateMgr The ui state manager - * @param aContext The layout context - * @return The pointer to CPeninputUiStateBase object - */ - IMPORT_C static CPeninputUiStateBase* NewL( - MPeninputUiStateMgr* aUiStateMgr, - MPeninputLayoutContext* aContext ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputUiStateBase(); - - /** - * Handle key event - * - * @since S60 v3.2 - * @param aData Carry information of key pressed - * @return ETrue means event was consumed, otherwise EFalse - */ - IMPORT_C virtual TBool HandleKeyEventL( const TRawEvent& aData ); - - /** - * Handle control event - * - * @since S60 v3.2 - * @param aEventType The event type - * @param aEventData The event data - * @return ETrue means event was consumed, otherwise EFalse - */ - IMPORT_C virtual TBool HandleControlEvent( TInt aEventType, - const TDesC& aEventData ); - -protected: - - /** - * Constructor - * - * @since S60 v3.2 - * @param aUiStateMgr The ui state manager - * @param aContext The layout context - * @return None - */ - IMPORT_C CPeninputUiStateBase( MPeninputUiStateMgr* aUiStateMgr, - MPeninputLayoutContext* aContext ); - - /** - * Symbian second-phase constructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C void Construct(); - - /** - * Send key event through layout context - * - * @since S60 v3.2 - * @param aEventData Event data, the left most is unicode - * @return ETrue if key event was consumed, otherwise EFalse - */ - IMPORT_C TBool SendKey( const TDesC& aEventData ); - -protected: - - /** - * Ui state manager - * Not own - */ - MPeninputUiStateMgr* iUiStateMgr; - - /** - * Layout context - * Not own - */ - MPeninputLayoutContext* iContext; - - }; - -#endif // C_CPENINPUTUISTATEBASE_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputuistatemgr.h --- a/textinput/peninputcommonlayout/inc/peninputuistatemgr.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of ui state manager -* -*/ - - -#ifndef C_CPENINPUTUISTATEMGR_H -#define C_CPENINPUTUISTATEMGR_H - -// System includes -#include -#include - -// User includes -#include "peninputuistatemgrinterface.h" - -// Forward declarations -class CPeninputUiStateBase; -class MPeninputLayoutContext; - -/** - * The ui state manager - * It provides get method of all ui state and current ui state - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class CPeninputUiStateMgr : public CBase, - public MPeninputUiStateMgr - { - -public: - - /** - * Two-phased constructor - * - * @since S60 v3.2 - * @param aContext The layout context - * @return The pointer to CPeninputUiStateMgr object - */ - IMPORT_C static CPeninputUiStateMgr* NewL( - MPeninputLayoutContext* aContext ); - - /** - * Two-phased constructor - * - * @since S60 v3.2 - * @param aContext The layout context - * @return The pointer to CPeninputUiStateMgr object - */ - IMPORT_C static CPeninputUiStateMgr* NewLC( - MPeninputLayoutContext* aContext ); - - /** - * Destructor - * - * @since S60 v3.2 - * @return None - */ - IMPORT_C virtual ~CPeninputUiStateMgr(); - -// from base class MPeninputUiStateMgr - - /** - * From MPeninputUiStateMgr - * Get current ui state - * - * @since S60 v3.2 - * @return The pointer to CPeninputUiStateBase object - */ - IMPORT_C CPeninputUiStateBase* CurrentUiState(); - - /** - * From MPeninputUiStateMgr - * Get ui state object according to the input state type - * - * @since S60 v3.2 - * @param aUiStateType The type of ui state - * @return The pointer to CPeninputUiStateBase object - */ - IMPORT_C CPeninputUiStateBase* GetUiState( TInt aUiStateType ); - - /** - * From MPeninputUiStateMgr - * Set current ui state by state object - * - * @since S60 v3.2 - * @param aUiState The state to be set as current ui state - * @return None - */ - IMPORT_C void SetCurrentUiState( CPeninputUiStateBase* aUiState ); - - /** - * From MPeninputUiStateMgr - * Set current ui state by state type - * - * @since S60 v3.2 - * @param aUiStateType The type of ui state - * @return None - */ - IMPORT_C void SetCurrentUiState( TInt aUiStateType ); - - /** - * From MPeninputUiStateMgr - * Add ui state to list - * - * @since S60 v3.2 - * @param aUiState The ui state object to be added to list - * @param aUiStateType The ui state type to be added to list - * @return None - */ - IMPORT_C void AddUiState( CPeninputUiStateBase* aUiState, - TInt aUiStateType ); - -protected: //method - - /** - * Symbian second phase constructor - * - * @since S60 v3.2 - * @return None - */ - virtual void Construct(); - - /** - * Constructor - * - * @since S60 v3.2 - * @param aContext The layout context - * @return None - */ - CPeninputUiStateMgr( MPeninputLayoutContext* aContext ); - -private: // Data - - /** - * The pointer points to current ui state - * Own - */ - CPeninputUiStateBase* iCurrentState; - - /** - * The pointer points to layout context - * Not own - */ - MPeninputLayoutContext* iContext; - - /** - * Ui state list - */ - RPointerArray iUiStateList; - - /** - * Ui type list - */ - RArray iUiStateTypeList; - - }; - -#endif // C_CPENINPUTUISTATEMGR_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/inc/peninputuistatemgrinterface.h --- a/textinput/peninputcommonlayout/inc/peninputuistatemgrinterface.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface of ui state manager -* -*/ - - -#ifndef M_MPENINPUTUISTATEMGR_H -#define M_MPENINPUTUISTATEMGR_H - -// Forward declarations -class CPeninputUiStateBase; - -/** - * The ui state manager interfaces - * It provides intefaces to access ui state manager - * - * @lib peninputcommonlayout.lib - * @since S60 v3.2 - */ -class MPeninputUiStateMgr - { - -public: - - /** - * Get current ui state - * - * @since S60 v3.2 - * @return The pointer to CPeninputUiStateBase object - */ - virtual CPeninputUiStateBase* CurrentUiState() = 0; - - /** - * Get ui state object according to the ui state type - * - * @since S60 v3.2 - * @param aUiStateType The type of ui state - * @return The pointer to CPeninputUiStateBase object - */ - virtual CPeninputUiStateBase* GetUiState( TInt aUiStateType ) = 0; - - /** - * Set current ui state by state object - * - * @since S60 v3.2 - * @param aUiState The state to be set as current ui state - * @return None - */ - virtual void SetCurrentUiState( CPeninputUiStateBase* aUiState ) = 0; - - /** - * Set current ui state by state type - * - * @since S60 v3.2 - * @param aUiStateType The type of ui state - * @return None - */ - virtual void SetCurrentUiState( TInt aUiStateType ) = 0; - - /** - * Add ui state to list - * - * @since S60 v3.2 - * @param aUiState The ui state object to be added to list - * @param aUiStateType The ui state type to be added to list - * @return None - */ - virtual void AddUiState( CPeninputUiStateBase* aUiState, - TInt aUiStateType ) = 0; - - }; - -#endif // M_MPENINPUTUISTATEMGR_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/rom/peninputcommonlayout.iby --- a/textinput/peninputcommonlayout/rom/peninputcommonlayout.iby Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2002 - 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project peninputcommonlayout -* -*/ - - -#ifndef PENINPUTCOMMONLAYOUT_IBY -#define PENINPUTCOMMONLAYOUT_IBY - -#include -#include - -#ifdef __PEN_SUPPORT -#ifdef RD_SCALABLE_UI_V2 - -file=ABI_DIR\BUILD_DIR\peninputcommonlayout.dll SHARED_LIB_DIR\peninputcommonlayout.dll - -#endif // RD_SCALABLE_UI_V2 -#endif // __PEN_SUPPORT - -#endif // PENINPUTCOMMONLAYOUT_IBY diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputclientlayoutinfo.cpp --- a/textinput/peninputcommonlayout/src/peninputclientlayoutinfo.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: client layout implementation -* -*/ - - -// User includes -#include "peninputclientlayoutinfo.h" - - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputControlInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputControlInfo* CPeninputControlInfo::NewL( - TResourceReader& aReader ) - { - CPeninputControlInfo* self = new ( ELeave ) CPeninputControlInfo(); - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputControlInfo::~CPeninputControlInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputControlInfo::~CPeninputControlInfo() - { - } - -// ------------------------------------------------------------------------ -// CPeninputControlInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputControlInfo::ConstructL( TResourceReader& aReader ) - { - ConstructFromResourceL( aReader ); - } - -// ------------------------------------------------------------------------ -// CPeninputControlInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputControlInfo::ConstructFromResourceL( TResourceReader& aReader ) - { - iControlID = aReader.ReadInt16(); - iControlType = aReader.ReadInt16(); - iBeginRow = aReader.ReadInt16(); - iBeginColumn = aReader.ReadInt16(); - iEndRow = aReader.ReadInt16(); - iEndColumn = aReader.ReadInt16(); - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputClientLayoutInfo* CPeninputClientLayoutInfo::NewL( - TResourceReader& aReader ) - { - CPeninputClientLayoutInfo* self = NewLC( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputClientLayoutInfo* CPeninputClientLayoutInfo::NewLC( - TResourceReader& aReader ) - { - CPeninputClientLayoutInfo* self = - new ( ELeave ) CPeninputClientLayoutInfo(); - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::~CPeninputClientLayoutInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputClientLayoutInfo::~CPeninputClientLayoutInfo() - { - iControlInfoList.ResetAndDestroy(); - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputClientLayoutInfo::ConstructFromResourceL( - TResourceReader& aReader ) - { - iLayoutID = aReader.ReadInt16(); - iColumns = aReader.ReadInt16(); - iRows = aReader.ReadInt16(); - - const TInt count = aReader.ReadInt16(); - for ( TInt i = 0; i < count; i++ ) - { - CPeninputControlInfo* controlInfo = - CPeninputControlInfo::NewL( aReader ); - AddControlInfo( controlInfo ); - } - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::FindControlInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputControlInfo* CPeninputClientLayoutInfo::FindControlInfo( - const TInt aControlID ) - { - const TInt count = iControlInfoList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iControlInfoList[i]->ControlID() == aControlID ) - { - return iControlInfoList[i]; - } - } - - return NULL; - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::AddControlInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputClientLayoutInfo::AddControlInfo( - CPeninputControlInfo* aControlInfo ) - { - iControlInfoList.Append( aControlInfo ); - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::RemoveControlInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputClientLayoutInfo::RemoveControlInfo( - CPeninputControlInfo* aControlInfo ) - { - CPeninputControlInfo* controlInfo = - FindControlInfo( aControlInfo->ControlID() ); - if ( controlInfo ) - { - RemoveControlInfo( controlInfo->ControlID() ); - } - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::RemoveControlInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputClientLayoutInfo::RemoveControlInfo( - const TInt aControlID ) - { - const TInt count = iControlInfoList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iControlInfoList[i]->ControlID() == aControlID ) - { - CPeninputControlInfo* controlInfo = iControlInfoList[i]; - delete controlInfo; - iControlInfoList.Remove( i ); - break; - } - } - } - -// ------------------------------------------------------------------------ -// CPeninputClientLayoutInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputClientLayoutInfo::ConstructL( TResourceReader& aReader ) - { - ConstructFromResourceL( aReader ); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputcommonlayout.cpp --- a/textinput/peninputcommonlayout/src/peninputcommonlayout.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,653 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout framework -* -*/ - - -// System includes -#include // Command from fep or IME to plugin -#include // Define EPluginInputModeHwr -#include // Use global signal -#include -#include -#include -#include - -// User includes -#include "peninputuistatebase.h" -#include "peninputdataconverter.h" -#include "peninputcommonlayout.h" -#include "peninputlayoutwindow.h" -#include "peninputdatamgr.h" -#include "peninputuistatemgr.h" -#include "peninputrangebarinfo.h" - -// Constants -const TInt KPeninputCommonLayoutBufLen = 8; -const TInt KIntSizeToInt16 = 2; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::CPeninputCommonLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonLayout::CPeninputCommonLayout( MLayoutOwner* aLayoutOwner ) - : CFepUiLayout( aLayoutOwner ) - { - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::ConstructL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::ConstructL( const TAny* aInitData ) - { - BaseConstructL(); - - TPixelsTwipsAndRotation ptSize; - - CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation( ptSize ); - - SetScreenSize(ptSize.iPixelSize); - - // This method must be called first, because it will initialize - // language from CenRep - CreateDataMgrL(aInitData); - - TBool sizeChanging = ETrue; - if ( iDataMgr ) - { - // Store screen mode, and get new window position - iDataMgr->SetData( EPeninputDataTypeScreenMode, ( TAny* ) &ptSize ); - - // Store justify style - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - } - - iUiStateMgr = CPeninputUiStateMgr::NewL( this ); - - CreateLayoutWindowL(); - - if ( iLayoutWindow ) - { - iLayoutWindow->Hide(ETrue); - AddControlL( iLayoutWindow ); - - // Config layout self using the whole screen - //SetRect(TRect(TPoint(0, 0), ptSize.iPixelSize )); - - // Call the function in window to read config info - //ChangeInputLanguage( *( (TInt*)iDataMgr->RequestData(EPeninputDataTypeInputLanguage))); - - iLayoutWindow->SizeChanged( ETrue ); - EnableLayoutMoving( static_cast( iLayoutWindow->MoveButton() ) ); - } - - if (iDataMgr) - { - sizeChanging = EFalse; - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - } - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::~CPeninputCommonLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonLayout::~CPeninputCommonLayout() - { - delete iUiStateMgr; - delete iDataMgr; - - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::UiStateMgr -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C MPeninputUiStateMgr* CPeninputCommonLayout::UiStateMgr() const - { - return iUiStateMgr; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::LayoutWindow -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutWindow* CPeninputCommonLayout::LayoutWindow() const - { - return NULL; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::HandleCommand -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputCommonLayout::HandleCommand( TInt aCmd, - TUint8* aData ) - { - // Handle command from fep or IME to this layout - TUint* data = ( TUint* ) aData; - TBuf buf; - TBuf bufStyle; - TInt style; - TInt ret = KErrNone; - - switch ( aCmd ) - { - case ECmdPenInputPermittedRange: - CPeninputDataConverter::IntToDesc( *data, buf ); - SendEventToWindow( EPeninputLayoutEventSetPermittedRange, NULL, - buf ); - break; - case ECmdPenInputPermittedCase: - { - CPeninputDataConverter::IntToDesc( *data, buf ); - SendEventToWindow( EPeninputLayoutEventSetPermittedCase, NULL, - buf ); - } - break; - case ECmdPenInputEditorNumericKeyMap: - { - iDataMgr->SetData( EPeninputDataTypeNumericKeymap, data ); - } - break; - case ECmdPenInputCase: - { - CPeninputDataConverter::IntToDesc( *data, buf ); - SendEventToWindow( EPeninputLayoutEventSetCase, NULL, - buf ); - } - break; - case ECmdPenInputLanguage: - { - ChangeInputLanguage(*data); - } - break; - case ECmdPenInputRange: - { - ChangeRange( TranslateRange(*data) ); - } - break; - case ECmdPenInputEnableSettingBtn: - { - SetEnableSettingBtn(*data); - } - break; - case ECmdPenInputIsSecretText: - { - iLayoutWindow->SetTextIsSecret( *aData ); - } - break; - case ECmdPenInputIsNumberGrouping: - { - iLayoutWindow->SetNumberGrouping( *aData ); - } - break; - case ECmdPenInputWindowOpen: - { - if ( *data == EPenInputOpenManually ) - { - style = EPeninputPositionChangeBrJustify; - bufStyle = ( TUint16* )&style; - SendEventToWindow(EPeninputLayoutEventMovePosition, NULL, bufStyle ); - } - iLayoutWindow->Hide(EFalse); - LayoutOwner()->Hide( EFalse ); - } - break; - case ECmdPenInputWindowClose: - { - iLayoutWindow->Hide(ETrue); - LayoutOwner()->Hide( ETrue ); - - SendEventToWindow( EPeninputLayoutEventCloseWindow, NULL ); - } - break; - case ECmdPenInputSetWindowPos: - { - // Only VKB need to move position automatically - if ( LayoutType() == EPluginInputModeVkb ) - { - // Data is a TRect - iDataMgr->SetData( EPeninputDataTypeDataQueryDlgRect, - (TRect*) aData ); - - // Store justify style - style = EPeninputPositionChangeDataQuery; - bufStyle = ( TUint16* )&style; - SendEventToWindow(EPeninputLayoutEventMovePosition, NULL, bufStyle); - } - } - break; - case ECmdPenInputEditorCustomNumericKeyMap: - { - iDataMgr->SetData(EAknFepDataTypeUseDefinedResource, aData); - } - break; - case ECmdPenInputSetTextAlignment: - { - TRAP_IGNORE(iLayoutWindow->SetTextAlignmentL( *data )); - } - break; - default: - { - ret = CFepUiLayout::HandleCommand( aCmd, aData ); - } - break; - } - - return ret; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SizeChanged -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputCommonLayout::SizeChanged( const TAny* /*aData*/ ) - { - TBool sizeChanging = ETrue; - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - - // Handle size changed event - TPixelsTwipsAndRotation ptSize; - - CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation( ptSize ); - //SetScreenSize(ptSize.iPixelSize); - - // Store screen mode, and get new window position - iDataMgr->SetData( EPeninputDataTypeScreenMode, ( TAny* )&ptSize ); - - // The following need to implement - iLayoutWindow->SizeChanged( ETrue ); - - sizeChanging = EFalse; - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::HandleControlEvent -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::HandleControlEvent( - TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - // Handle event from control - TInt* data = ( TInt* ) aEventData.Ptr(); - - // Buffer for data conversion - TBuf buf; - - switch ( aEventType ) - { - case EPeninputLayoutEventClose: - { - SignalOwner( ESignalLayoutClosed ); - } - break; - case EPeninputLayoutEventOption: - { - SignalOwner( ESignalLaunchOptionMenu ); - } - break; - case EPeninputLayoutEventSwitchLanguage: - { - SignalOwner( ESignalLaunchLanguageMenu ); - } - break; - // When drag end, store the position data - case EEventDraggingEnd: - { - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & ( Position().iX + Rect().Width() ); - y = 0xFFFF0000 & ( ( Position().iY + Rect().Height() ) << 16 ); - TInt position = x | y; - if ( position ) - { - iDataMgr->SetData( EPeninputDataTypeWindowPosition, &position ); - } - } - break; - default: - { - if ( iUiStateMgr->CurrentUiState() ) - { - if ( !iUiStateMgr->CurrentUiState()->HandleControlEvent - ( aEventType, aEventData ) ) - { - SendEventToWindow( aEventType, aCtrl, aEventData ); - } - } - } - break; - } - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::OnAppEditorTextComing -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputCommonLayout::OnAppEditorTextComing( - const TFepInputContextFieldData& aData ) - { - // Handle edit text coming - if ( iLayoutWindow ) - { - TRAPD( err, iLayoutWindow->SetEditorTextL( aData ) ); - return err; - } - - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::HandleRawKeyEventL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayout::HandleRawKeyEventL( - const TRawEvent& aKeyEvent ) - { - return iUiStateMgr->CurrentUiState()->HandleKeyEventL( aKeyEvent ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SendEventToWindow -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::SendEventToWindow( - TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - iLayoutWindow->HandleControlEvent( aEventType, aCtrl, aEventData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SendEventToLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::SendEventToLayout( - TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - HandleControlEvent( aEventType, aCtrl, aEventData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::Sendkey -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::Sendkey( TInt aEventType, - const TDesC& aEventData ) - { - SignalOwner( aEventType, aEventData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::IsShiftPermitted -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayout::IsShiftPermitted() - { - return iDataMgr->IsShiftPermitted(); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::IsCapsLockPermitted -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayout::IsCapsLockPermitted() - { - return iDataMgr->IsCapsLockPermitted(); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::RequestData -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TAny* CPeninputCommonLayout::RequestData( - TPeninputDataType aDataType ) - { - return iDataMgr->RequestData( aDataType ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SetData -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::SetData( TPeninputDataType aDataType, - TAny* aData ) - { - iDataMgr->SetData( aDataType, aData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SetData -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayout::IsValidDestination( const TRect& aRect, - CDragBar* aDragBar, - TBool& aVInfo, - TBool& aHInfo, - TBool aFlag ) - { - // Validate move button destination - if ( !aDragBar ) - { - return EFalse; - } - - TRect rect = aRect; - - if ( aFlag ) - { - // Layout is moving - aHInfo = aVInfo = EFalse; - TRect dragbarRect( aRect.iTl, aDragBar->Rect().Size() ); - - if ( dragbarRect.iTl.iX >= 0 - && dragbarRect.iBr.iX < ScreenSize().iWidth ) - { - aHInfo = ETrue; - } - - if ( dragbarRect.iTl.iY >= 0 - && dragbarRect.iBr.iY < ScreenSize().iHeight ) - { - aVInfo = ETrue; - } - - return ( aHInfo && aVInfo ); - } - else - { - if ( aDragBar ) - { - rect.SetSize( aDragBar->Rect().Size() ); - } - - TBool tlInvalid = !Rect().Contains( rect.iTl ); - TBool brInvalid = !Rect().Contains( rect.iBr ); - - if ( tlInvalid && !brInvalid ) - { - if ( rect.iTl.iX >= Rect().iTl.iX - && rect.iTl.iX <= Rect().iBr.iX ) - { - aHInfo = ETrue; - } - else if ( rect.iTl.iY >= Rect().iTl.iY - && rect.iTl.iY <= Rect().iBr.iY ) - { - aVInfo = ETrue; - } - } - else if ( !tlInvalid && brInvalid ) - { - if ( rect.iBr.iX >= Rect().iTl.iX - && rect.iBr.iX <= Rect().iBr.iX ) - { - aHInfo = ETrue; - } - else if ( rect.iBr.iY >= Rect().iTl.iY - && rect.iBr.iY <= Rect().iBr.iY ) - { - aVInfo = ETrue; - } - } - - return !( tlInvalid || brInvalid ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::TranslateRange -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -TInt CPeninputCommonLayout::TranslateRange(TInt aRange) - { - TInt newRange = aRange; - - if ( aRange == ERangeNative) - { - if ( iLayoutWindow - && iLayoutWindow->ConfigInfo() - && iLayoutWindow->ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) - { - newRange = ERangeNative; - } - else - { - newRange = ERangeEnglish; - } - } - else if ( aRange == ERangeEnglish) - { - if ( iLayoutWindow - && iLayoutWindow->ConfigInfo() - && iLayoutWindow->ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) - { - newRange = ERangeEnglish; - } - else - { - newRange = ERangeNative; - } - } - - return newRange; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::Init -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TRect CPeninputCommonLayout::Init() - { - TRect r = CFepUiLayout::Init(); - //wxy -- No need to set position here - //LayoutOwner()->SetPosition( Rect().iTl ); - //r = TRect( Position(), r.Size() ); - - return r; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SaveKey -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayout::SaveKey( TInt aKey, TInt aValue ) - { - iDataMgr->SaveKey( aKey, aValue ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::ChangeInputLanguage -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayout::ChangeInputLanguage( TInt aLangID ) - { - // Call ChangeInputLanguage function in iLayoutWindow - TRAP_IGNORE( iLayoutWindow->ChangeInputLanguageL( aLangID ) ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::ChangeLanguage -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayout::ChangeRange( TInt aRange ) - { - iLayoutWindow->ChangeRange( aRange, 0 , EFalse); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SetEnableSwitchToHwr -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayout::SetEnableSwitchToHwr( TBool aEnable ) - { - iLayoutWindow->SetEnableSwitchToHwr( aEnable ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayout::SetEnableSettingBtn -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayout::SetEnableSettingBtn( TBool aEnable ) - { - iLayoutWindow->SetEnableSettingBtn( aEnable ); - } - -EXPORT_C TInt CPeninputCommonLayout::PenInputType() - { - return LayoutType(); - } - -EXPORT_C void CPeninputCommonLayout::SetPositionFromOutside(const TPoint& aNewPos) - { - LayoutOwner()->SetPosition(aNewPos); - TInt x = 0x0000FFFF & aNewPos.iX; - TInt y = 0xFFFF0000 & ( aNewPos.iY << 16 ); - TInt position = x | y; - - SetData( EPeninputDataTypeWindowPosition, (TAny*)&position ); - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputcommonlayoutext.cpp --- a/textinput/peninputcommonlayout/src/peninputcommonlayoutext.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,675 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout framework -* -*/ - - -// System includes -#include // Command from fep or IME to plugin -#include // Define EPluginInputModeHwr -#include // Use global signal -#include -#include -#include -#include - -// User includes -#include "peninputuistatebase.h" -#include "peninputdataconverter.h" -#include "peninputcommonlayoutext.h" -#include "peninputlayoutwindowext.h" -#include "peninputdatamgr.h" -#include "peninputuistatemgr.h" -#include "peninputrangebarinfo.h" - -// Constants -const TInt KPeninputCommonLayoutBufLen = 8; -const TInt KIntSizeToInt16 = 2; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::CPeninputCommonLayoutExt -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonLayoutExt::CPeninputCommonLayoutExt( MLayoutOwner* aLayoutOwner ) - : CFepUiLayout( aLayoutOwner ) - { - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::ConstructL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::ConstructL( const TAny* aInitData ) - { - BaseConstructL(); - - TPixelsTwipsAndRotation ptSize; - - CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation( ptSize ); - - SetScreenSize(ptSize.iPixelSize); - - // This method must be called first, because it will initialize - // language from CenRep - CreateDataMgrL(aInitData); - - TBool sizeChanging = ETrue; - if ( iDataMgr ) - { - // Store screen mode, and get new window position - iDataMgr->SetData( EPeninputDataTypeScreenMode, ( TAny* ) &ptSize ); - - // Store justify style - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - } - - iUiStateMgr = CPeninputUiStateMgr::NewL( this ); - - CreateLayoutWindowL(); - - if ( iLayoutWindow ) - { - iLayoutWindow->Hide(ETrue); - AddControlL( iLayoutWindow ); - - // Config layout self using the whole screen - //SetRect(TRect(TPoint(0, 0), ptSize.iPixelSize )); - - // Call the function in window to read config info - //ChangeInputLanguage( *( (TInt*)iDataMgr->RequestData(EPeninputDataTypeInputLanguage))); - - iLayoutWindow->SizeChanged( ETrue ); -// EnableLayoutMoving( static_cast( iLayoutWindow->MoveButton() ) ); - } - - if (iDataMgr) - { - sizeChanging = EFalse; - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - } - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::~CPeninputCommonLayoutExt -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputCommonLayoutExt::~CPeninputCommonLayoutExt() - { - delete iUiStateMgr; - delete iDataMgr; - - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::UiStateMgr -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C MPeninputUiStateMgr* CPeninputCommonLayoutExt::UiStateMgr() const - { - return iUiStateMgr; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::LayoutWindow -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutWindowExt* CPeninputCommonLayoutExt::LayoutWindow() const - { - return iLayoutWindow; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::HandleCommand -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputCommonLayoutExt::HandleCommand( TInt aCmd, - TUint8* aData ) - { - // Handle command from fep or IME to this layout - TUint* data = ( TUint* ) aData; - TBuf buf; - TBuf bufStyle; - TInt style; - TInt ret = KErrNone; - - switch ( aCmd ) - { - case ECmdPenInputPermittedRange: - CPeninputDataConverter::IntToDesc( *data, buf ); - SendEventToWindow( EPeninputLayoutEventSetPermittedRange, NULL, - buf ); - break; - case ECmdPenInputAllowChangeCase: - { - iDataMgr->SetData( EAkninputDataTypeAllowCaseChange, data ); - } - break; - case ECmdPenInputPermittedCase: - { - CPeninputDataConverter::IntToDesc( *data, buf ); - SendEventToWindow( EPeninputLayoutEventSetPermittedCase, NULL, - buf ); - } - break; - case ECmdPenInputEditorNumericKeyMap: - { - iDataMgr->SetData( EPeninputDataTypeNumericKeymap, data ); - } - break; - case ECmdPenInputCase: - { - CPeninputDataConverter::IntToDesc( *data, buf ); - SendEventToWindow( EPeninputLayoutEventSetCase, NULL, - buf ); - } - break; - case ECmdPenInputLanguage: - { - ChangeInputLanguage(*data); - } - break; - case ECmdPenInputRange: - { - ChangeRange( TranslateRange(*data) ); - } - break; - /*case ECmdPenInputEnableSwitchBtn: - { - if ( LayoutType() == EPluginInputModeVkb ) - { - SetEnableSwitchToHwr(*data); - } - } - break;*/ - case ECmdPenInputEnableSettingBtn: - { - SetEnableSettingBtn(*data); - } - break; - case ECmdPenInputIsSecretText: - { - iLayoutWindow->SetTextIsSecret( *aData ); - } - break; - case ECmdPenInputIsNumberGrouping: - { - iLayoutWindow->SetNumberGrouping( *aData ); - } - break; - case ECmdPenInputWindowOpen: - { - if ( *data == EPenInputOpenManually ) - { - style = EPeninputPositionChangeBrJustify; - bufStyle = ( TUint16* )&style; - SendEventToWindow(EPeninputLayoutEventMovePosition, NULL, bufStyle ); - } - iLayoutWindow->Hide(EFalse); - LayoutOwner()->Hide( EFalse ); - } - break; - case ECmdPenInputWindowClose: - { - iLayoutWindow->Hide(ETrue); - LayoutOwner()->Hide( ETrue ); - - SendEventToWindow( EPeninputLayoutEventCloseWindow, NULL ); - } - break; - case ECmdPenInputSetWindowPos: - { - // Only VKB need to move position automatically - if ( LayoutType() == EPluginInputModeVkb ) - { - // Data is a TRect - iDataMgr->SetData( EPeninputDataTypeDataQueryDlgRect, - (TRect*) aData ); - - // Store justify style - style = EPeninputPositionChangeDataQuery; - bufStyle = ( TUint16* )&style; - SendEventToWindow(EPeninputLayoutEventMovePosition, NULL, bufStyle); - } - } - break; - case ECmdPenInputEditorCustomNumericKeyMap: - { - iDataMgr->SetData(EAknFepDataTypeUseDefinedResource, aData); - } - break; - case ECmdPenInputSetTextAlignment: - { - TRAP_IGNORE(iLayoutWindow->SetTextAlignmentL( *data )); - } - break; - default: - { - ret = CFepUiLayout::HandleCommand( aCmd, aData ); - } - break; - } - - return ret; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SizeChanged -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputCommonLayoutExt::SizeChanged( const TAny* /*aData*/ ) - { - TBool sizeChanging = ETrue; - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - - // Handle size changed event - TPixelsTwipsAndRotation ptSize; - - CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation( ptSize ); - //SetScreenSize(ptSize.iPixelSize); - - // Store screen mode, and get new window position - iDataMgr->SetData( EPeninputDataTypeScreenMode, ( TAny* )&ptSize ); - - // The following need to implement - iLayoutWindow->SizeChanged( ETrue ); - - sizeChanging = EFalse; - iDataMgr->SetData(EAkninputDataTypeSizeChanging, &sizeChanging); - - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::HandleControlEvent -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::HandleControlEvent( - TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - // Handle event from control - TInt* data = ( TInt* ) aEventData.Ptr(); - - // Buffer for data conversion - TBuf buf; - - switch ( aEventType ) - { - case EPeninputLayoutEventClose: - { - SignalOwner( ESignalLayoutClosed ); - } - break; - case EPeninputLayoutEventOption: - { - SignalOwner( ESignalLaunchOptionMenu ); - } - break; - case EPeninputLayoutEventSwitchLanguage: - { - SignalOwner( ESignalLaunchLanguageMenu ); - } - break; - // When drag end, store the position data - case EEventDraggingEnd: - { - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & ( Position().iX + Rect().Width() ); - y = 0xFFFF0000 & ( ( Position().iY + Rect().Height() ) << 16 ); - TInt position = x | y; - if ( position ) - { - iDataMgr->SetData( EPeninputDataTypeWindowPosition, &position ); - } - } - break; - case EPeninputLayoutEventToVkb: - { - TBool switchByMode = ETrue; - TInt mode = EPluginInputModeVkb; - CPeninputDataConverter::CombinationToDesc( switchByMode, - mode, buf ); - SignalOwner( ESignalLayoutUIChanged, buf ); - } - break; - default: - { - if ( iUiStateMgr->CurrentUiState() ) - { - if ( !iUiStateMgr->CurrentUiState()->HandleControlEvent - ( aEventType, aEventData ) ) - { - SendEventToWindow( aEventType, aCtrl, aEventData ); - } - } - } - break; - } - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::OnAppEditorTextComing -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputCommonLayoutExt::OnAppEditorTextComing( - const TFepInputContextFieldData& aData ) - { - // Handle edit text coming - if ( iLayoutWindow ) - { - TRAPD( err, iLayoutWindow->SetEditorTextL( aData ) ); - return err; - } - - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::HandleRawKeyEventL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayoutExt::HandleRawKeyEventL( - const TRawEvent& aKeyEvent ) - { - return iUiStateMgr->CurrentUiState()->HandleKeyEventL( aKeyEvent ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SendEventToWindow -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::SendEventToWindow( - TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - iLayoutWindow->HandleControlEvent( aEventType, aCtrl, aEventData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SendEventToLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::SendEventToLayout( - TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - HandleControlEvent( aEventType, aCtrl, aEventData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::Sendkey -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::Sendkey( TInt aEventType, - const TDesC& aEventData ) - { - SignalOwner( aEventType, aEventData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::IsShiftPermitted -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayoutExt::IsShiftPermitted() - { - return iDataMgr->IsShiftPermitted(); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::IsCapsLockPermitted -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayoutExt::IsCapsLockPermitted() - { - return iDataMgr->IsCapsLockPermitted(); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::RequestData -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TAny* CPeninputCommonLayoutExt::RequestData( - TPeninputDataType aDataType ) - { - return iDataMgr->RequestData( aDataType ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SetData -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::SetData( TPeninputDataType aDataType, - TAny* aData ) - { - iDataMgr->SetData( aDataType, aData ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SetData -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputCommonLayoutExt::IsValidDestination( const TRect& aRect, - CDragBar* aDragBar, - TBool& aVInfo, - TBool& aHInfo, - TBool aFlag ) - { - // Validate move button destination - if ( !aDragBar ) - { - return EFalse; - } - - TRect rect = aRect; - - if ( aFlag ) - { - // Layout is moving - aHInfo = aVInfo = EFalse; - TRect dragbarRect( aRect.iTl, aDragBar->Rect().Size() ); - - if ( dragbarRect.iTl.iX >= 0 - && dragbarRect.iBr.iX < ScreenSize().iWidth ) - { - aHInfo = ETrue; - } - - if ( dragbarRect.iTl.iY >= 0 - && dragbarRect.iBr.iY < ScreenSize().iHeight ) - { - aVInfo = ETrue; - } - - return ( aHInfo && aVInfo ); - } - else - { - if ( aDragBar ) - { - rect.SetSize( aDragBar->Rect().Size() ); - } - - TBool tlInvalid = !Rect().Contains( rect.iTl ); - TBool brInvalid = !Rect().Contains( rect.iBr ); - - if ( tlInvalid && !brInvalid ) - { - if ( rect.iTl.iX >= Rect().iTl.iX - && rect.iTl.iX <= Rect().iBr.iX ) - { - aHInfo = ETrue; - } - else if ( rect.iTl.iY >= Rect().iTl.iY - && rect.iTl.iY <= Rect().iBr.iY ) - { - aVInfo = ETrue; - } - } - else if ( !tlInvalid && brInvalid ) - { - if ( rect.iBr.iX >= Rect().iTl.iX - && rect.iBr.iX <= Rect().iBr.iX ) - { - aHInfo = ETrue; - } - else if ( rect.iBr.iY >= Rect().iTl.iY - && rect.iBr.iY <= Rect().iBr.iY ) - { - aVInfo = ETrue; - } - } - - return !( tlInvalid || brInvalid ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::TranslateRange -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -TInt CPeninputCommonLayoutExt::TranslateRange(TInt aRange) - { - TInt newRange = aRange; - - if ( aRange == ERangeNative) - { - if ( iLayoutWindow - && iLayoutWindow->ConfigInfo() - && iLayoutWindow->ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) - { - newRange = ERangeNative; - } - else - { - newRange = ERangeEnglish; - } - } - else if ( aRange == ERangeEnglish) - { - if ( iLayoutWindow - && iLayoutWindow->ConfigInfo() - && iLayoutWindow->ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) - { - newRange = ERangeEnglish; - } - else - { - newRange = ERangeNative; - } - } - - return newRange; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::Init -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TRect CPeninputCommonLayoutExt::Init() - { - TRect r = CFepUiLayout::Init(); - //wxy -- No need to set position here - //LayoutOwner()->SetPosition( Rect().iTl ); - //r = TRect( Position(), r.Size() ); - - return r; - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SaveKey -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputCommonLayoutExt::SaveKey( TInt aKey, TInt aValue ) - { - iDataMgr->SaveKey( aKey, aValue ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::ChangeInputLanguage -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayoutExt::ChangeInputLanguage( TInt aLangID ) - { - // Call ChangeInputLanguage function in iLayoutWindow - TRAP_IGNORE( iLayoutWindow->ChangeInputLanguageL( aLangID ) ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::ChangeLanguage -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayoutExt::ChangeRange( TInt aRange ) - { - iLayoutWindow->ChangeRange( aRange, 0, EFalse ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SetEnableSwitchToHwr -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayoutExt::SetEnableSwitchToHwr( TBool aEnable ) - { - iLayoutWindow->SetEnableSwitchToHwr( aEnable ); - } - -// --------------------------------------------------------------------------- -// CPeninputCommonLayoutExt::SetEnableSettingBtn -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputCommonLayoutExt::SetEnableSettingBtn( TBool aEnable ) - { - iLayoutWindow->SetEnableSettingBtn( aEnable ); - } - -EXPORT_C TInt CPeninputCommonLayoutExt::PenInputType() - { - return LayoutType(); - } - -EXPORT_C void CPeninputCommonLayoutExt::SetPositionFromOutside(const TPoint& aNewPos) - { - LayoutOwner()->SetPosition(aNewPos); - TInt x = 0x0000FFFF & aNewPos.iX; - TInt y = 0xFFFF0000 & ( aNewPos.iY << 16 ); - TInt position = x | y; - - SetData( EPeninputDataTypeWindowPosition, (TAny*)&position ); - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputctrlpool.cpp --- a/textinput/peninputcommonlayout/src/peninputctrlpool.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: control pool -* -*/ - - -// System includes -#include - -// User includes -#include "peninputctrlpool.h" - - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputCtrlPool* CPeninputCtrlPool::NewL() - { - CPeninputCtrlPool* self = NewLC(); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputCtrlPool* CPeninputCtrlPool::NewLC() - { - CPeninputCtrlPool* self = new ( ELeave ) CPeninputCtrlPool(); - CleanupStack::PushL( self ); - self->Construct(); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputCtrlPool::Construct() - { - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::~CPeninputCtrlPool -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputCtrlPool::~CPeninputCtrlPool() - { - iControlList.ResetAndDestroy(); - iControlList.Close(); - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::AddControl -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputCtrlPool::AddControl( CFepUiBaseCtrl* aControl ) - { - iControlList.Append( aControl ); - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::RemoveControl -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputCtrlPool::RemoveControl( const TInt aControlID ) - { - CFepUiBaseCtrl* ctrl = Control( aControlID ); - const TInt index = iControlList.Find( ctrl ); - delete ctrl; - iControlList.Remove( index ); - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::Control -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CFepUiBaseCtrl* CPeninputCtrlPool::Control( - const TInt aControlID ) const - { - const TInt count = iControlList.Count(); - CFepUiBaseCtrl* ctrl = NULL; - - for ( TInt i = 0; i < count; i++ ) - { - if ( iControlList[i]->ControlId() == aControlID ) - { - ctrl = iControlList[i]; - break; - } - } - - return ctrl; - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::ControlByIndex -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CFepUiBaseCtrl* CPeninputCtrlPool::ControlByIndex( - const TInt aIndex ) const - { - CFepUiBaseCtrl* ctrl = NULL; - const TInt count = iControlList.Count(); - - if ( ( aIndex < count ) && ( aIndex >= 0 ) ) - { - ctrl = iControlList[aIndex]; - } - - return ctrl; - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::ControlCount -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C TInt CPeninputCtrlPool::ControlCount() const - { - return iControlList.Count(); - } - -// ------------------------------------------------------------------------ -// CPeninputCtrlPool::Reset -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputCtrlPool::Reset() - { - iControlList.ResetAndDestroy(); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputdataconverter.cpp --- a/textinput/peninputcommonlayout/src/peninputdataconverter.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: the data converter of peninput -* -*/ - - -// System includes -#include - -// User includes -#include "peninputdataconverter.h" - -// Const -const TUint KNumToBuffer = sizeof( TUint )/sizeof( TUint16); -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CPeninputDataConverter::CPeninputDataConverter -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputDataConverter::CPeninputDataConverter() - { - } - -// --------------------------------------------------------------------------- -// CPeninputDataConverter::~CPeninputDataConverter -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputDataConverter::~CPeninputDataConverter() - { - } - -// --------------------------------------------------------------------------- -// CPeninputDataConverter::IntToDesc -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataConverter::IntToDesc( TUint aNum, - TDes16& aBuf ) - { - aBuf.Zero(); - // Convert integer number to be string - aBuf.Append( reinterpret_cast( &aNum ),KNumToBuffer ); - } - -// --------------------------------------------------------------------------- -// CPeninputDataConverter::CombinationToDesc -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataConverter::CombinationToDesc( - TBool aBool, TUint aNum, TDes16& aBuf ) - { - aBuf.Zero(); - // Convert integer number to be string - aBuf.Append( reinterpret_cast( &aBool ), KNumToBuffer ); - aBuf.Append( reinterpret_cast( &aNum ), KNumToBuffer ); - } - -// --------------------------------------------------------------------------- -// CPeninputDataConverter::AnyToInt -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputDataConverter::AnyToInt( TAny* aOrginal ) - { - return *( reinterpret_cast( aOrginal ) ); - } - -// --------------------------------------------------------------------------- -// CPeninputDataConverter::ShiftCapslockByCase -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataConverter::ShiftCapslockByCase( TInt aCase, - TInt& aShiftStatus, - TInt& aCapsStatus ) - { - switch ( aCase ) - { - case ECaseUpper: - aShiftStatus = 0; - aCapsStatus = 1; - break; - case ECaseText: - aShiftStatus = 1; - aCapsStatus = 0; - break; - case ECaseLower: - case ECaseInverseText: - case ECaseInvalide: - default: - aShiftStatus = 0; - aCapsStatus = 0; - break; - } - } - -EXPORT_C TInt CPeninputDataConverter::FepCaseByCaseId( TInt aCaseId ) - { - switch ( aCaseId ) - { - case 0: - return ECaseLower; - case 1: - return ECaseText; - case 2: - return ECaseUpper; - case 3: - return ECaseInverseText; - default: - return ECaseLower; - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputdatamgr.cpp --- a/textinput/peninputcommonlayout/src/peninputdatamgr.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,488 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the common layout data manager -* -*/ - - -// System includes -#include -#include -#include // Use resource utils,laf env,rep notifier -#include -#include -#include - -// User includes -#include "peninputdatamgr.h" -#include "peninputdataprovider.h" -#include "peninputlayoutcontext.h" - - -// ======== MEMBER FUNCTIONS ======== - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::NewL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputDataMgr* CPeninputDataMgr::NewL( - MPeninputLayoutContext* aContext ) - { - CPeninputDataMgr* self = NewLC( aContext ); - CleanupStack::Pop( self ); - - return self; - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::NewLC -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputDataMgr* CPeninputDataMgr::NewLC( - MPeninputLayoutContext* aContext ) - { - CPeninputDataMgr* self = new ( ELeave ) CPeninputDataMgr( aContext ); - CleanupStack::PushL( self ); - self->ConstructL(); - - return self; - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::~CPeninputDataMgr -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputDataMgr::~CPeninputDataMgr() - { - delete iGSRepositoryWatcher; - delete iGSRepository; - delete iAknFepRepository; - delete iUserDefinedResource; - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::CPeninputDataMgr -// (other items were commented in a header). -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputDataMgr::CPeninputDataMgr( - MPeninputLayoutContext* aContext ) - : iContext(aContext), - iUnitWidthSet(EFalse), - iUnitHeightSet(EFalse) - { - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::ConstructL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::ConstructL() - { - TInt ret = 0; - - // Construct aknfep CenRep - TRAP( ret, iAknFepRepository = CRepository::NewL( KCRUidAknFep ) ); - - // Construct GS CenRep - TRAP( ret, iGSRepository = - CRepository::NewL( KCRUidPersonalizationSettings ) ); - - if ( iGSRepository ) - { - // Read Language - iGSRepository->Get( KSettingsPenInputLang, iInputLanguage ); - } - - // Add GS Watcher - if ( ret == KErrNone ) - { - iGSRepositoryWatcher = CAknFepRepositoryWatcher::NewL( - KCRUidPersonalizationSettings, - TCallBack( HandleGSRepositoryCallBack, this ), - iGSRepository ); - } - - // Call init function, which is virutal function - InitMore(); - } - -// --------------------------------------------------------------------------- -// CPeninputDataMgr::IsShiftPermitted -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputDataMgr::IsShiftPermitted() - { - if( !iAllowCaseChange && iCurrentRange == ERangeNative ) - { - return EFalse; - } - - return (iPermittedCase & ECaseText) || - (iPermittedCase & ECaseInverseText); - } - -// --------------------------------------------------------------------------- -// CPeninputDataMgr::IsCapsLockPermitted -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputDataMgr::IsCapsLockPermitted() - { - if( !iAllowCaseChange && iCurrentRange == ERangeNative ) - { - return EFalse; - } - - return iPermittedCase & ECaseUpper; - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::SetData -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::SetData( TPeninputDataType aDataType, - TAny* aData ) - { - switch ( aDataType ) - { - case EPeninputDataTypeCase: - { - iCase = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeInputLanguage: - { - iInputLanguage = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypePermittedRange: - { - iPermittedRange = *( ( TInt* ) aData ); - } - break; - case EAkninputDataTypeAllowCaseChange: - { - iAllowCaseChange = *((TBool*)aData); - } - break; - case EPeninputDataTypePermittedCase: - { - iPermittedCase = *( (TInt* ) aData ); - } - break; - case EPeninputDataTypeCurrentRange: - { - iCurrentRange = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeClientLayout: - { - iClientLayout = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeVkbLayout: - { - iVkbLayoutId = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeNumericKeymap: - { - iEditorNumericKeymap = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeShiftDown: - { - iShiftDown = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeCapslockDown: - { - iCapslockDown = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeCurrentAccent: - { - iCurrentAccent = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeScreenMode: - { - SetScreenMode( *( ( TPixelsTwipsAndRotation* ) aData ) ); - } - break; - case EPeninputDataTypeScreenSize: - { - iScreenSize = *( ( TSize* ) aData ); - } - break; - case EPeninputDataTypeWindowPosition: - { - iWindowPosition = *( ( TInt* ) aData ); - } - break; - case EPeninputDataTypeUnitWidth: - { - iUnitWidth = *( ( TInt* ) aData ); - iUnitWidthSet = ETrue; - } - break; - case EPeninputDataTypeUnitHeight: - { - iUnitHeight = *( ( TInt* ) aData ); - iUnitHeightSet = ETrue; - } - break; - case EPeninputDataTypeDataQueryDlgRect: - { - iDataQueryDlgRect = *( ( TRect* ) aData ); - } - break; - case EAknFepDataTypeUseDefinedResource: - { - delete iUserDefinedResource; - TInt* len = (TInt*)((TUint8*)aData - 4); - TPtrC16 keymapRes((const TUint16*)aData, *len/2); - iUserDefinedResource = keymapRes.Alloc(); - } - break; - case EPeninputDataTypeReserve_1: - { - iReserve_1 = aData; - } - break; - case EAkninputDataTypeSizeChanging: - { - iLayoutSizeChanging = *((TBool*)aData); - } - break; - case EAkninputDataTypeLatchedSet: - { - iLatched = *((TBool*)aData); - } - break; - default: - break; - } - - NotifyEngine( aDataType, aData ) ; - } - - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::RequestData -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C TAny* CPeninputDataMgr::RequestData( TPeninputDataType aDataType ) - { - switch ( aDataType ) - { - case EPeninputDataTypeCase: - return &iCase; - case EPeninputDataTypeInputLanguage: - return &iInputLanguage; - case EPeninputDataTypePermittedRange: - return &iPermittedRange; - case EPeninputDataTypePermittedCase: - return &iPermittedCase; - case EPeninputDataTypeCurrentRange: - return &iCurrentRange; - case EPeninputDataTypeClientLayout: - return &iClientLayout; - case EPeninputDataTypeVkbLayout: - return &iVkbLayoutId; - case EPeninputDataTypeNumericKeymap: - return &iEditorNumericKeymap; - case EPeninputDataTypeShiftDown: - return &iShiftDown; - case EPeninputDataTypeCapslockDown: - return &iCapslockDown; - case EPeninputDataTypeCurrentAccent: - return &iCurrentAccent; - case EPeninputDataTypeScreenMode: - return &iScreenMode; - case EPeninputDataTypeScreenSize: - return &iScreenSize; - case EPeninputDataTypeWindowPosition: - return &iWindowPosition; - case EPeninputDataTypePositionSettingId: - return &iPositionSettingId; - case EPeninputDataTypeUnitWidth: - return &iUnitWidth; - case EPeninputDataTypeUnitHeight: - return &iUnitHeight; - case EPeninputDataTypeDataQueryDlgRect: - return &iDataQueryDlgRect; - case EAknFepDataTypeUseDefinedResource: - return iUserDefinedResource; - case EPeninputDataTypeReserve_1: - return iReserve_1; - case EAkninputDataTypeGuideLineTop: - return &iGuideLineTop; - case EAkninputDataTypeGuideLineBottom: - return &iGuideLineBottom; - case EAkninputDataTypeSizeChanging: - return &iLayoutSizeChanging; - case EAkninputDataTypeLatchedSet: - return &iLatched; - case EAkninputDataTypeUnitSizeSet: - { - iUnitSizeSet = (iUnitWidthSet & iUnitHeightSet); - return &iUnitSizeSet; - } - default: - break; - } - - return NULL; - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::Reset -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::Reset() - { - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::HandleGSRepositoryCallBack -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputDataMgr::HandleGSRepositoryCallBack( TAny* aPtr ) - { - CPeninputDataMgr* self = static_cast( aPtr ); - - CAknFepRepositoryWatcher* watcher = self->iGSRepositoryWatcher; - if ( watcher ) - { - self->HandleGSRepositoryChange( watcher->ChangedKey() ); - } - - return KErrNone; - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::SaveKey -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::SaveKey( TInt aKey, TInt aValue ) - { - if ( iAknFepRepository ) - { - iAknFepRepository->Set( aKey, aValue ); - } - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::SetScreenMode -// (other items were commented in a header). -// -------------------------------------------------------------------------- -// -void CPeninputDataMgr::SetScreenMode( - const TPixelsTwipsAndRotation& aScreenMode ) - { - switch ( aScreenMode.iRotation ) - { - case CFbsBitGc::EGraphicsOrientationNormal: - { - iPositionSettingId = KAknFepHwrWindowPosition0; - } - break; - case CFbsBitGc::EGraphicsOrientationRotated90: - { - iPositionSettingId = KAknFepHwrWindowPosition1; - } - break; - case CFbsBitGc::EGraphicsOrientationRotated180: - { - iPositionSettingId = KAknFepHwrWindowPosition2; - } - break; - case CFbsBitGc::EGraphicsOrientationRotated270: - { - iPositionSettingId = KAknFepHwrWindowPosition3; - } - break; - default: - break; - } - - iScreenSize = aScreenMode.iPixelSize; - iScreenMode = aScreenMode; - if ( iAknFepRepository ) - { - iAknFepRepository->Get( iPositionSettingId, iWindowPosition ); - } - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::InitMore -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::InitMore() - { - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::HandleGSRepositoryChange -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::HandleGSRepositoryChange( TInt /*aChangedKey*/ ) - { - } - -// -------------------------------------------------------------------------- -// CPeninputDataMgr::NotifyEngine -// (other items were commented in a header). -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputDataMgr::NotifyEngine( TPeninputDataType aType, - TAny* aData ) - { - TInt data = *( (TInt*) aData ); - switch ( aType ) - { - case EPeninputDataTypeCurrentRange: - if (iAknFepRepository) - { - if ( ( data == ERangeEnglish ) || ( data == ERangeNative ) ) - { - iAknFepRepository->Set(KAknFepLastUsedRange, data ); - } - } - break; - case EPeninputDataTypeWindowPosition: - if (iAknFepRepository) - { - iAknFepRepository->Set(iPositionSettingId, data ); - } - break; - default: - break; - } - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputlayoutconfig.cpp --- a/textinput/peninputcommonlayout/src/peninputlayoutconfig.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,281 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout config management -* -*/ - - -// System includes -#include -#include -#include - -// User includes -#include "peninputlayoutconfig.h" -#include "peninputrangebarinfo.h" -#include -#include "peninputclientlayoutinfo.h" -#include "peninputshiftcapsInfo.h" - - -// Constants -const TInt KPeninputLayoutConfigInvalidId = -1; - - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::NewL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutConfig* CPeninputLayoutConfig::NewL( - CAknFepCtrlVkbLayout& aVkblayout, TResourceReader& aReader ) - { - CPeninputLayoutConfig* self = new ( ELeave ) CPeninputLayoutConfig(); - CleanupStack::PushL( self ); - self->ConstructL( aVkblayout, aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::CPeninputLayoutConfig -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -CPeninputLayoutConfig::CPeninputLayoutConfig() - : iLanguageString( NULL ), iRangeBarInfo( NULL ) - { - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::ConstructL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutConfig::ConstructL( CAknFepCtrlVkbLayout& aVkblayout, - TResourceReader& aReader ) - { - TResourceReader reader; - TInt count = 0; - TInt i = 0; - - iLanguage = aReader.ReadInt16(); - iLanguageString = aReader.ReadHBufCL(); - - if ( aReader.ReadInt16() != 0 ) - { - iCaseSensitive = ETrue; - } - else - { - iCaseSensitive = EFalse; - } - - iGuideLine = aReader.ReadInt16(); - iPositionTopLine = aReader.ReadInt16(); - iPositionBottomLine = aReader.ReadInt16(); - - const TInt32 clientLayoutInfoListResId = aReader.ReadInt32(); - const TInt32 vkbLayoutInfoListResId = aReader.ReadInt32(); - const TInt32 rangeBarInfoResId = aReader.ReadInt32(); - const TInt32 shiftCapsInfoResId = aReader.ReadInt32(); - - iRangeBarResId = aReader.ReadInt32(); - - // Create client layout list - if ( clientLayoutInfoListResId > 0 ) - { - CCoeEnv::Static()->CreateResourceReaderLC( reader, clientLayoutInfoListResId ); - - count = reader.ReadInt16(); - for ( i = 0; i < count; i++ ) - { - CPeninputClientLayoutInfo* clientLayoutInfo = - CPeninputClientLayoutInfo::NewL( reader ); - iClientLayoutInfoList.Append( clientLayoutInfo ); - } - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - } - - // Create vkb layout list - if ( vkbLayoutInfoListResId > 0 ) - { - aVkblayout.SetResourceId( vkbLayoutInfoListResId ); - aVkblayout.ConstructFromResourceL(); - iVkbLayoutInfoList = aVkblayout.VkbLayoutInfoList(); - } - - // Create range bar - if ( rangeBarInfoResId > 0 ) - { - CCoeEnv::Static()->CreateResourceReaderLC( reader, rangeBarInfoResId ); - iRangeBarInfo = CPeninputRangeBarInfo::NewL( reader ); - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - } - - // Create shift & caps - if ( shiftCapsInfoResId > 0 ) - { - CCoeEnv::Static()->CreateResourceReaderLC( reader, shiftCapsInfoResId ); - count = reader.ReadInt16(); - for ( i = 0; i < count; i++ ) - { - CPeninputShiftCapsInfo* shiftCapsInfo = - CPeninputShiftCapsInfo::NewL( reader ); - iShiftCapsInfoList.Append( shiftCapsInfo ); - } - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::~CPeninputLayoutConfig -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutConfig::~CPeninputLayoutConfig() - { - delete iLanguageString; - delete iRangeBarInfo; - iClientLayoutInfoList.ResetAndDestroy(); - iShiftCapsInfoList.ResetAndDestroy(); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::FindClientLayoutInfo -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputClientLayoutInfo* - CPeninputLayoutConfig::FindClientLayoutInfo( TInt aLayoutId ) - { - const TInt count = iClientLayoutInfoList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iClientLayoutInfoList[i]->LayoutID() == aLayoutId ) - { - return iClientLayoutInfoList[i]; - } - } - - return NULL; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::FindVkbLayoutInfo -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputVkbLayoutInfo* - CPeninputLayoutConfig::FindVkbLayoutInfo( TInt aLayoutId ) - { - const TInt count = iVkbLayoutInfoList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iVkbLayoutInfoList[i]->LayoutID() == aLayoutId ) - { - return iVkbLayoutInfoList[i]; - } - } - - return NULL; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::FindShiftCapsInfo -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputShiftCapsInfo* - CPeninputLayoutConfig::FindShiftCapsInfo( TInt aRangeId ) - { - const TInt count = iShiftCapsInfoList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iShiftCapsInfoList[i]->RangeId() == aRangeId ) - { - return iShiftCapsInfoList[i]; - } - } - - return NULL; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::ShiftCapsSingleVkbLayoutId -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputLayoutConfig::ShiftCapsSingleVkbLayoutId( - TInt aRangeId, TInt aShiftCapsSingleId ) - { - CPeninputShiftCapsInfo* shiftCapsInfo = FindShiftCapsInfo( aRangeId ); - - if ( !shiftCapsInfo ) - { - return KPeninputLayoutConfigInvalidId; - } - else - { - CPeninputShiftCapsInfo::TPeninputShiftCapsSingle* shiftCapsSingle = - shiftCapsInfo->FindShiftCapsSingleById( aShiftCapsSingleId ); - if ( shiftCapsSingle ) - { - return shiftCapsSingle->iVkbLayoutId; - } - else - { - return KPeninputLayoutConfigInvalidId; - } - } - } - - -// --------------------------------------------------------------------------- -// CPeninputLayoutConfig::FindVkbLayoutIdByCase -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputLayoutConfig::ShiftCapsSingleVkbLayoutByCase( - TInt aRangeId, TInt aCase ) - { - CPeninputShiftCapsInfo* shiftCapsInfo = FindShiftCapsInfo( aRangeId ); - - if ( !shiftCapsInfo ) - { - return KPeninputLayoutConfigInvalidId; - } - else - { - CPeninputShiftCapsInfo::TPeninputShiftCapsSingle* shiftCapsSingle = - shiftCapsInfo->FindShiftCapsSingleByCase( aCase ); - if ( shiftCapsSingle ) - { - return shiftCapsSingle->iVkbLayoutId; - } - else - { - return KPeninputLayoutConfigInvalidId; - } - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp --- a/textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2259 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout window for UI interface of VKB and HWR -* -*/ - - -// System includes -#include - -#include -#include -#include -#include // Use global signal -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// User includes -#include "peninputdataconverter.h" -#include "peninputrangebarinfo.h" -#include "peninputlayoutwindow.h" -#include "peninputclientlayoutinfo.h" -#include "peninputdataprovider.h" -#include "peninputlayoutcontext.h" -#include "peninputvkbctrlext.h" -#include "peninputnumerickeymappingmgr.h" - -// Constants -const TInt KIntLengthForByte = 8; -const TInt KPeninputLayoutWindowRegionCount = 8; -const TInt KPeninputLayoutWindowUnitWidth = 12; -const TInt KInvalidIndex = -1; - -const TInt32 KInvalidResId = -1; -const TInt KInvalidImg = -1 ; -const TUint32 KDefaultTextColor = 0x000000; -const TUint32 KDefaultShadowTextColor = 0xffffff; -const TInt KNotSupportSkin = -1; - -const TInt KIntSizeToInt16 = 2; - - - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputLayoutWindow::CPeninputLayoutWindow -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputLayoutWindow::CPeninputLayoutWindow( - CFepUiLayout* aUiLayout, MPeninputLayoutContext* aLayoutContext ) - : CAknFepCtrlBaseWindow( aUiLayout, EPeninutWindowCtrlIdBaseWindow ), - iConfigInfo( NULL ), iLayoutContext( aLayoutContext ), - iLastUsedTotalColumns( KPeninputLayoutWindowUnitWidth ), - iFirstTimeConstruct( ETrue ), - iSwitchFontSet(EFalse), - iUnitSizeChange(EFalse) - { - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ConstructL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ConstructL() - { - BaseConstructL(); - - if( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - { - iVkbLayout = CAknFepCtrlVkbLayout::NewL(); - } - else - { - iVkbLayout = NULL; - } - - CCoeEnv* coeEnv = CCoeEnv::Static(); - - // Set up resources - TFileName resFileName = GetWindowResFileName(); - BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resFileName ); - iWinResId = coeEnv->AddResourceFileL( resFileName ); - - TResourceReader reader; - - coeEnv->CreateResourceReaderLC( reader, GetWindowResId() ); - SetResourceId( GetWindowResId() ); - ConstructFromResourceL(); - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - MoveButton()->AddEventObserver( UiLayout() ); - iCtrlPool = CPeninputCtrlPool::NewL(); - - CreateAllControlsL(); - SetControlsFont(); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::~CPeninputLayoutWindow -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutWindow::~CPeninputLayoutWindow() - { - delete iCtrlPool; - delete iConfigInfo; - delete iKeyMappingMgr; - delete iVkbLayout; - // Delete resource file from CoeEnv - CCoeEnv::Static()->DeleteResourceFile( iWinResId ); - - CCoeEnv::Static()->DeleteResourceFile( iConfigResId ); - - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ConstructFromResourceL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ConstructFromResourceL( - TResourceReader& aResReader ) - { - TInt supportskin = aResReader.ReadInt16(); - - if (iFirstTimeConstruct && (supportskin != KNotSupportSkin)) - { - UiLayout()->AddControlL(this); - } - - const TInt32 moveBtnResId = aResReader.ReadInt32(); - const TInt32 closeBtnResId = aResReader.ReadInt32(); - const TInt32 icfResId = aResReader.ReadInt32(); - const TInt32 optionBtnResId = aResReader.ReadInt32(); - const TInt32 keymappingResId = aResReader.ReadInt32(); - const TInt32 shadowResId = aResReader.ReadInt32(); - const TInt32 arrowLeftResId = aResReader.ReadInt32(); - const TInt32 arrowRightResId = aResReader.ReadInt32(); - const TInt32 bgImageResId = aResReader.ReadInt32(); - - TResourceReader resReader; - - TBool multiLine = EFalse; - - if (iFirstTimeConstruct) - { - // Read bitmaps of close and move button - CCoeEnv::Static()->CreateResourceReaderLC( resReader, moveBtnResId ); - MoveButton()->SetResourceId( moveBtnResId ); - MoveButton()->ConstructFromResourceL(); - CleanupStack::PopAndDestroy( 1 ); - - CCoeEnv::Static()->CreateResourceReaderLC( resReader, closeBtnResId ); - CloseButton()->SetResourceId( closeBtnResId ); - CloseButton()->ConstructFromResourceL(); - CleanupStack::PopAndDestroy( 1 ); - - // Read information of key mapping - CCoeEnv::Static()->CreateResourceReaderLC( resReader, keymappingResId ); - iKeyMappingMgr = CPeninputNumericKepMappingMgr::NewL( resReader ); - CleanupStack::PopAndDestroy( 1 ); - - - multiLine = IsMultiLineIcf(); - - // Add input context field into the headpane - if (multiLine) - { - AddMultiContextFieldL(); - } - else - { - AddContextFieldL(); - } - - - // Add touch input button into the headpane - AddTouchInputButtonL( optionBtnResId ); - } - else - { - multiLine = IsMultiLineIcf(); - CControlGroup::ConstructFromResourceL(); - } - - // Read information of shadow - CCoeEnv::Static()->CreateResourceReaderLC( resReader, shadowResId ); - ReadShadowInfoL( resReader ); - CleanupStack::PopAndDestroy( 1 ); - - if (!multiLine) - { - //Read resource of icf - CCoeEnv::Static()->CreateResourceReaderLC( resReader, icfResId ); - ReadIcfInfo( resReader ); - CleanupStack::PopAndDestroy( 1 ); - } - else - { - ReadMultiLineIcfInforL(icfResId); - } - - // Read background image resource - ReadBackgroundInfoL( bgImageResId ); - iFirstTimeConstruct = EFalse; - } - -// ----------------------------------------------------------------------------- -// CPeninputLayoutWindow::ConstructFromResourceL -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ConstructFromResourceL() - { - if (iResourceId == KInvalidResId) - { - User::Leave(KErrArgument); - } - - TResourceReader reader; - CCoeEnv::Static()->CreateResourceReaderLC(reader, iResourceId); - - TInt supportskin = reader.ReadInt16(); - - if (iFirstTimeConstruct && (supportskin != KNotSupportSkin)) - { - UiLayout()->AddControlL(this); - } - - const TInt32 moveBtnResId = reader.ReadInt32(); - const TInt32 closeBtnResId = reader.ReadInt32(); - const TInt32 icfResId = reader.ReadInt32(); - const TInt32 optionBtnResId = reader.ReadInt32(); - const TInt32 keymappingResId = reader.ReadInt32(); - const TInt32 shadowResId = reader.ReadInt32(); - const TInt32 arrowLeftResId = reader.ReadInt32(); - const TInt32 arrowRightResId = reader.ReadInt32(); - const TInt32 bgImageResId = reader.ReadInt32(); - - - TResourceReader resReader; - TBool multiLine = EFalse; - - if (iFirstTimeConstruct) - { - // Read bitmaps of close and move button - CCoeEnv::Static()->CreateResourceReaderLC( resReader, moveBtnResId ); - MoveButton()->SetResourceId( moveBtnResId ); - MoveButton()->ConstructFromResourceL(); - CleanupStack::PopAndDestroy( 1 ); - - CCoeEnv::Static()->CreateResourceReaderLC( resReader, closeBtnResId ); - CloseButton()->SetResourceId( closeBtnResId ); - CloseButton()->ConstructFromResourceL(); - CleanupStack::PopAndDestroy( 1 ); - - // Read information of key mapping - CCoeEnv::Static()->CreateResourceReaderLC( resReader, keymappingResId ); - iKeyMappingMgr = CPeninputNumericKepMappingMgr::NewL( resReader ); - CleanupStack::PopAndDestroy( 1 ); - - multiLine = IsMultiLineIcf(); - - // Add input context field into the headpane - if (multiLine) - { - AddMultiContextFieldL(); - } - else - { - AddContextFieldL(); - } - - // Add touch input button into the headpane - AddTouchInputButtonL( optionBtnResId ); - } - else - { - multiLine = IsMultiLineIcf(); - CControlGroup::ConstructFromResourceL(); - } - - // Read information of shadow - CCoeEnv::Static()->CreateResourceReaderLC( resReader, shadowResId ); - ReadShadowInfoL( resReader ); - CleanupStack::PopAndDestroy( 1 ); - - if (!multiLine) - { - //Read resource of icf - CCoeEnv::Static()->CreateResourceReaderLC( resReader, icfResId ); - ReadIcfInfo( resReader ); - CleanupStack::PopAndDestroy( 1 ); - } - else - { - ReadMultiLineIcfInforL(icfResId); - } - - CleanupStack::PopAndDestroy(); // reader - - // Read background image resource - ReadBackgroundInfoL( bgImageResId ); - - if( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - { - iVkbLayout->ConstructFromResourceL(); - } - - iFirstTimeConstruct = EFalse; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SizeChanged -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SizeChanged( TBool /*aLandscapeStyle*/ ) - { - iLangOrSizeChanged = ETrue; - ChangeUnitSize(); - - ReadLafForShadow(); - - if ( iConfigInfo ) - { - ChangeClientSize(); - // Change the size of base window - SizeChangedForBaseWindow( iLastUsedTotalColumns ); - - } - - TInt style = EPeninputPositionChangeBrJustify; - TBuf bufStyle; - bufStyle = ( TUint16* )&style; - HandleControlEvent(EPeninputLayoutEventMovePosition, NULL, bufStyle); - - iLangOrSizeChanged = EFalse; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ReadLafForShadow -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::ReadLafForShadow() - { - if(!CPeninputDataConverter::AnyToInt - (iLayoutContext->RequestData(EAkninputDataTypeSizeChanging))) - { - return; - } - - TRect anyRect; - - TAknWindowLineLayout shadowPane; - TAknWindowLineLayout shadowTl; - TAknWindowLineLayout shadowBr; - TAknLayoutRect shadowRect; - TAknLayoutRect shadowTlRect; - TAknLayoutRect shadowBrRect; - - shadowPane = AknLayoutScalable_Avkon::bg_popup_fep_shadow_pane(1).LayoutLine(); - shadowRect.LayoutRect(anyRect, shadowPane); - - shadowTl = AknLayoutScalable_Avkon::bg_popup_fep_shadow_pane_g1().LayoutLine(); - shadowTlRect.LayoutRect(shadowRect.Rect(), shadowTl); - - shadowBr = AknLayoutScalable_Avkon::bg_popup_fep_shadow_pane_g8().LayoutLine(); - shadowBrRect.LayoutRect(shadowRect.Rect(), shadowBr); - - iShadowTlWidth = shadowTlRect.Rect().Size().iWidth; - iShadowTlHeight = shadowTlRect.Rect().Size().iHeight; - iShadowBrWidth = shadowBrRect.Rect().Size().iWidth; - iShadowBrHeight = shadowBrRect.Rect().Size().iHeight; - - //TRect newWinRect = Rect(); - //newWinRect.iTl = ShadowRect().iTl + TPoint(iShadowTlWidth, iShadowTlHeight); - //SetRect( newWinRect ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SizeChanged -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::SizeChangedForBaseWindow( TInt aTotalColumns ) - { - //only responsible for controls that layout window managed - //if ( ( aTotalColumns != iLastUsedTotalColumns ) || iLangOrSizeChanged ) - { - TRect wndRect = Rect(); - TRect rtTitleBar = TitleBar()->Rect(); - - TInt UnitWidth = *( static_cast( iLayoutContext->RequestData - ( EPeninputDataTypeUnitWidth ) ) ); - - TInt UnitHeight = *( static_cast( iLayoutContext->RequestData - ( EPeninputDataTypeUnitHeight ) ) ); - - TInt moveBtnColumns = 1; - TInt closeBtnColumns = 1; - TInt optionBtnColumns = 1; - TInt headerPaneColumns; - TInt icfColumns; - - //Call SetRect function of dragbutton - if( iLayoutContext->LayoutType() == EPluginInputModeVkb) - { - moveBtnColumns = 2; - closeBtnColumns = 2; - } - - TRect rectClose ( rtTitleBar.iTl, TSize( closeBtnColumns * UnitWidth, UnitHeight ) ); - TRect innerRect; - AknPenImageUtils::CalculateGraphicRect( rectClose, innerRect ); - CloseButton()->SizeChanged( rectClose, innerRect, ETrue ); - - //Call SetRect function of Head pane - headerPaneColumns = aTotalColumns - moveBtnColumns - closeBtnColumns; - TRect rectHeader ( TPoint(rectClose.iBr.iX, rectClose.iTl.iY ), - TSize( headerPaneColumns * UnitWidth, UnitHeight ) ); - HeaderPane()->SetRect( rectHeader ); - - //Call SetRect function of input context field - icfColumns = headerPaneColumns - optionBtnColumns; - TRect rectIcf( rectHeader.iTl, - TSize( icfColumns * UnitWidth, UnitHeight ) ); - if(ConfigInfo()->Language() == ELangArabic) - { - rectIcf.iTl.iX = rectIcf.iTl.iX + UnitWidth; - } - if(IsMultiLineIcf()) - { - iMultiLineIcf->SetRect( rectIcf ); - } - else - { - iInputContextField->SetRect( rectIcf ); - } - if(ConfigInfo()->Language() == ELangArabic) - { - TRect rectBackspace(rectHeader.iTl, TSize(UnitWidth, UnitHeight)); - AknPenImageUtils::CalculateGraphicRect( rectBackspace, innerRect ); - iBackspaceButton->SizeChanged(rectBackspace, innerRect, ETrue); - } - //set the rect of option button - TRect rectOption ( TPoint( rectIcf.iBr.iX, rectIcf.iTl.iY ), - TSize( optionBtnColumns * UnitWidth, UnitHeight ) ); - AknPenImageUtils::CalculateGraphicRect( rectOption, innerRect ); - iTouchInputOptionButton->SizeChanged( rectOption, innerRect, ETrue ); - - //Call SetRect function of close button - TRect rectMove ( TPoint( rectHeader.iBr.iX, rectHeader.iTl.iY), - TSize( closeBtnColumns * UnitWidth, UnitHeight ) ); - AknPenImageUtils::CalculateGraphicRect( rectMove, innerRect ); - MoveButton()->SizeChanged( rectMove, innerRect, ETrue ); - - SetControlsFont(); - iLastUsedTotalColumns = aTotalColumns; - } - } -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::HandleControlEvent -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::HandleControlEvent( TInt aEventType, - CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - // Call this function in base class - CAknFepCtrlBaseWindow::HandleControlEvent( aEventType, - aCtrl, aEventData ); - - TInt* data = ( TInt* ) aEventData.Ptr(); - - switch ( aEventType ) - { - case EPeninputLayoutEventSwitchLanguage: - { - TRAP_IGNORE( ChangeInputLanguageL( *data ) ); - } - break; - case EPeninputLayoutEventRange: - { - HandleRangeEvent( *data ); - } - break; - case EPeninputLayoutEventRangeLoop: - { - HandleRangeLoopEvent( *data ); - } - break; - case EPeninputLayoutEventShift: - { - HandleShiftBtnClicked(); - } - break; - case EPeninputLayoutEventCapslock: - { - HandleCapslockBtnClicked(); - } - break; - case EPeninputLayoutEventMovePosition: - { - TInt style = *( ( TUint16* ) aEventData.Ptr() ); - ChangeLayoutPosition( style ); - } - break; - case EPeninputLayoutEventSetPermittedRange: - { - if ( *data & ERangeNative ) - { - *data = *data | ERangeAccent | ERangeNativeNumber - | ERangeMixedText | ERangeMixedNumber; - } - else if(*data & ERangeEnglish) - { - *data = *data | ERangeAccent; - } - /* - if ( *data & ERangeNative ) - { - *data = *data | ERangeNativeNumber - | ERangeMixedText | ERangeMixedNumber; - } - */ - // Update data:range - iLayoutContext->SetData( EPeninputDataTypePermittedRange, data ); - - // Set range of range bar component - CFepUiBaseCtrl* bar = - iCtrlPool->Control( EPeninutWindowCtrlIdRangeBar ); - if ( bar ) - { - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - rangebar->SetPermittedRanges( *data ); - } - } - break; - case EPeninputLayoutEventSetPermittedCase: - { - // Update data:case - iLayoutContext->SetData( EPeninputDataTypePermittedCase, data ); - - // Set range of case - CFepUiBaseCtrl* bar = - iCtrlPool->Control( EPeninutWindowCtrlIdRangeBar ); - if ( bar ) - { - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - - rangebar->SetPermittedCase( ERangeEnglish, ECaseUpper, - ( *data & ECaseUpper) != 0 ); - rangebar->SetPermittedCase( ERangeEnglish, ECaseLower, - ( *data & ECaseLower) != 0 ); - rangebar->SetPermittedCase( ERangeEnglish, ECaseText, - ( *data & ECaseText) != 0 ); - } - } - break; - case EPeninputLayoutEventSetCase: - { - DoCaseChange( *data ); - } - break; - case EEventSizeChanged: - { - //if icf editor size changed, we need to inform owner - if(aCtrl == iInputContextField || - aCtrl == iMultiLineIcf ) - { - iLayoutContext->Sendkey( ESignalLayoutICFLengthChanged, KNullDesC ); - } - } - break; - default: - break; - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SetEditorTextL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetEditorTextL( - const TFepInputContextFieldData& aData ) - { - if(IsMultiLineIcf()) - { - if (iMultiLineIcf) - { - iMultiLineIcf->SetTextL( aData ); - } - } - else - { - if (iInputContextField) - { - iInputContextField->SetTextL( aData ); - } - - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SetEditorTextL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetTextIsSecret( TBool aData ) - { - if(IsMultiLineIcf()) - { - if (iMultiLineIcf) - { - iMultiLineIcf->SetTextIsSecret( aData ); - } - } - else - { - if (iInputContextField) - { - iInputContextField->SetTextIsSecret( aData ); - } - } - } - -void CPeninputLayoutWindow::SetNumberGrouping( TBool aData ) - { - if(IsMultiLineIcf()) - { - if (iMultiLineIcf) - { - iMultiLineIcf->SetNumberGrouping( aData ); - } - } - } - - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::DoClose -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputLayoutWindow::DoClose() - { - // Send EVkbEventWindowClose to layout - this->ReportEvent( EPeninputLayoutEventClose, KNullDesC ); - - // Return true which will permit the window close - return EFalse; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::AddContextFieldL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::AddContextFieldL() - { - // Get reference CControlGroup of headerPane - CControlGroup* headerPane = HeaderPane(); - - User::LeaveIfNull( headerPane ); - - // Input context field - iInputContextField = CFepInputContextField::NewL( TRect(), - UiLayout(), EPeninutWindowCtrlIdInputContextField ); - - // Transfer to headerPane - headerPane->AddControlL( iInputContextField ); - iInputContextField->SetFocus(ETrue); - - // Add layout as event observer - iInputContextField->AddEventObserver( UiLayout() ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::AddTouchInputButtonL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::AddTouchInputButtonL( TInt aResID ) - { - // Get reference CControlGroup of headerPane - CControlGroup* headerPane = HeaderPane(); - - User::LeaveIfNull( headerPane ); - - // Create Touch Input Option - iTouchInputOptionButton = CAknFepCtrlEventButton::NewL( UiLayout(), - EPeninutWindowCtrlIdOptionBtn, EPeninputLayoutEventOption, 0, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); - - // Read resource - TResourceReader reader; - - CCoeEnv::Static()->CreateResourceReaderLC( reader, aResID ); - iTouchInputOptionButton->SetResourceId( aResID ); - iTouchInputOptionButton->ConstructFromResourceL(); - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - - // Add into the group - headerPane->AddControlL( iTouchInputOptionButton ); - iTouchInputOptionButton->AddEventObserver( UiLayout() ); - } - -// --------------------------------------------------------------------------- -// Get layout config method. It does a lasy initialization for a instance of -// CPeninputLayoutWindow::ConfigInfo -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutConfig* CPeninputLayoutWindow::ConfigInfo() const - { - return iConfigInfo; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::CheckResourceExist -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -TBool CPeninputLayoutWindow::CheckResourceExist( const TDesC& aFileName ) - { - RFile file; - - if ( !aFileName.Length() ) - { - return EFalse; - } - - TInt rs = file.Open( CCoeEnv::Static()->FsSession(), aFileName, EFileRead ); - - if ( rs == KErrNotFound ) - { - return EFalse; - } - else - { - file.Close(); - - return ETrue; - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeInputLanguageL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ChangeInputLanguageL( TInt aLangID ) - { - // Determine whether a new language id is same as existing one, - if ( ConfigInfo() ) - { - // If language not changed, exit this function - if ( ConfigInfo()->Language() == aLangID ) - { - return; - } - } - - // First check file exist or not - TBool found = CheckResourceExist( GetWindowConfigResFileName( aLangID ) ); - if ( !found ) - { - aLangID = ELangEnglish; - found = CheckResourceExist( GetWindowConfigResFileName( aLangID ) ); - } - - if ( found ) - { - // Store language - iLayoutContext->SetData( EPeninputDataTypeInputLanguage, &aLangID ); - - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - { - CFepUiBaseCtrl* ctrl = - iCtrlPool->Control( EPeninutWindowCtrlIdVkbCtrl ); - if ( ctrl ) - { - ( static_cast( ctrl ) )->Reset(); - } - } - - ( const_cast&> - ( ClientPane()->ControlList() ) ).Reset(); - - // Re-construct config info - if ( iConfigInfo ) - { - delete iConfigInfo; - iConfigInfo = NULL; - } - - if (iConfigResId) - { - CCoeEnv::Static()->DeleteResourceFile( iConfigResId ); - } - - // construct resource utils - - CCoeEnv* coeEnv = CCoeEnv::Static(); - - // Set up resources - TFileName resFileName = GetWindowConfigResFileName( aLangID ); - BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resFileName ); - iConfigResId = coeEnv->AddResourceFileL( resFileName ); - - TResourceReader reader; - - coeEnv->CreateResourceReaderLC( reader, GetWindowConfigResId() ); - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - { - iVkbLayout->Reset(); - } - iConfigInfo = CPeninputLayoutConfig::NewL( *iVkbLayout, reader ); - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - - // Re-construct rangebar - ChangeRangeBarL(); - - iLangOrSizeChanged = ETrue; - //ChangeClientSize(); - - TBuf<10> iISOCode; - AknPenInputUtils::GetISOLanguageCode - ( static_cast(aLangID), iISOCode ); - CFepUiBaseCtrl* langBtn = - iCtrlPool->Control( EPeninutWindowCtrlIdInputLangSwitcherBtn ); - - if ( langBtn ) - { - ( static_cast( langBtn ) )->SetText - ( iISOCode ); - UpdateArea(( static_cast( langBtn ) )->Rect(), - ETrue ); - } - TInt range = -1; - iLayoutContext->SetData( EPeninputDataTypeCurrentRange, &range ); - iLayoutContext->SetData( EPeninputDataTypeClientLayout, &range ); - - iMultiLineIcf->SetLanguageId( aLangID ); - } - else - { - // Report error, do nothing - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeRangeBarL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::ChangeRangeBarL() - { - // Read range bar from config into and reconstruct range button - if ( iConfigInfo ) - { - TInt resid = iConfigInfo->RangebarResId(); - CFepUiBaseCtrl* bar = - iCtrlPool->Control( EPeninutWindowCtrlIdRangeBar ); - - if ( bar ) - { - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - - CAknFepCtrlRangeBar::TRangeBarActionStyle style = - ( CAknFepCtrlRangeBar::TRangeBarActionStyle ) - iConfigInfo->RangeBarInfo()->RangeStyle(); - - rangebar->SetActionStyle( style ); - - TResourceReader reader; - - CCoeEnv::Static()->CreateResourceReaderLC( reader, resid ); - - rangebar->ConstructFromResourceL( reader ); - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeRange -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ChangeRange( TInt aRange, TInt aVkbLayoutId, TBool aNotify ) - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - - CFepUiBaseCtrl* bar = - iCtrlPool->Control( EPeninutWindowCtrlIdRangeBar ); - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - - if ( rangebar ) - { - rangebar->ActiveRange( aRange ); - } - - if ( ( curRange != aRange ) || ( iLangOrSizeChanged ) ) - { - // Change client layout - //UiLayout()->LayoutOwner()->Hide(ETrue); - CPeninputRangeBarInfo* rangeBar = iConfigInfo->RangeBarInfo(); - CPeninputRangeInfo* rangeInfo = rangeBar->FindRange( aRange ); - - if ( !rangeInfo ) - { - aRange = ERangeNumber; - rangeInfo = rangeBar->FindRange( ERangeNumber ); - } - - // Get the whole columns - - iUnitSizeChange = ReconfigUnitSize(rangeInfo->ClientLayoutId()); - /*if (iUnitSizeChange) - { - UiLayout()->LayoutOwner()->Hide(ETrue); - } - */ - ChangeClientLayout( rangeInfo->ClientLayoutId() ); - - CPeninputClientLayoutInfo* clientLayout = - ConfigInfo()->FindClientLayoutInfo( rangeInfo->ClientLayoutId() ); - if ( clientLayout ) - { - SizeChangedForBaseWindow( clientLayout->Columns() ); - } - - // Update data:range - iLayoutContext->SetData( EPeninputDataTypeCurrentRange, &aRange ); - - // Notify fep the new range - if ( aNotify ) - { - TBuf buf; - CPeninputDataConverter::IntToDesc( aRange, buf ); - iLayoutContext->Sendkey( ESignalRange, buf ); - } - - // Change vkb layout - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - { - if ( ( aRange == ERangeEnglish ) || ( aRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() - && ( aRange == ERangeNative ) ) ) - { - // Change shift and capslock button status according to the current case - TInt curCase = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCase ) ); - TInt shfit; - TInt capslock; - - CPeninputDataConverter::ShiftCapslockByCase( curCase, - shfit, capslock ); - - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shfit ); - ChangeButtonStatus( shfit, EPeninutWindowCtrlIdShiftBtn ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &capslock ); - ChangeButtonStatus( capslock, EPeninutWindowCtrlIdCapslockBtn ); - - TInt caseid = CaseByShiftCapslockStatus(); - TInt vkblayoutid = - ConfigInfo()->ShiftCapsSingleVkbLayoutId( aRange, caseid ); - - if ( aRange == ERangeAccent ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkblayoutid = vkblayoutid + curAccentIndex * 2; - } - - // Change vkb layout - ChangeVkbLayout( vkblayoutid ); - } - else - { - TInt flag = 0; - - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &flag ); - ChangeButtonStatus( 0, EPeninutWindowCtrlIdShiftBtn ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &flag ); - ChangeButtonStatus( 0, EPeninutWindowCtrlIdCapslockBtn ); - - // Change vkb layout - if ( aVkbLayoutId ) - { - ChangeVkbLayout( aVkbLayoutId ); - } - else - { - ChangeVkbLayout( rangeInfo->VkbLayoutId() ); - } - } - - } - - /*if (iUnitSizeChange) - { - //SizeChanged(ETrue); - const TRect rect = ChangeUnitSize(); - ReadLafForShadow( rect ); - if ( iConfigInfo ) - { - // Change the size of base window - SizeChangedForBaseWindow( iLastUsedTotalColumns ); - ChangeClientSize(); - } - UiLayout()->LayoutOwner()->Hide(EFalse); - iUnitSizeChange = EFalse; - }*/ - - if ( ( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - && ( curRange == ERangeNumber ) && ( curRange == aRange ) ) - { - // Dimmed some keys if needed - DimKeys(); - } - - UiLayout()->Draw(); - } - - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeClientLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ChangeClientLayout( TInt aClientLayoutId ) - { - TInt curClientId = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeClientLayout ) ); - - if ( ( curClientId != aClientLayoutId ) || ( iLangOrSizeChanged ) ) - { - // Re-Orginize all controls according to the configuration - ReorganizeControls( aClientLayoutId, ETrue ); - - // Update data:client layout id - iLayoutContext->SetData( EPeninputDataTypeClientLayout, - &aClientLayoutId ); - - // Reset lang changed flag - if ( ( iLangOrSizeChanged ) - && ( iLayoutContext->LayoutType() != EPluginInputModeVkb ) ) - { - iLangOrSizeChanged = EFalse; - } - - //iUnitSizeChange = ReconfigUnitSize(aClientLayoutId); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeVkbLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ChangeVkbLayout( TInt aVkbLayoutId ) - { - TInt latchedFlag = CPeninputDataConverter::AnyToInt( - iLayoutContext->RequestData(EAkninputDataTypeLatchedSet)); - // If the DeadKey is latched, cancel it and then change the VKB layout - if(latchedFlag) - { - RPointerArray vkbListInfo; - RPointerArray keyInfoList; - - vkbListInfo = iVkbLayout->VkbLayoutInfoList(); - TInt vkbListNum = vkbListInfo.Count(); - - CVirtualKey* pKey; - TBool deadKeyChange = EFalse; - // Find the latched DeadKey in all the Vkb layout - for(TInt i = 0; i < vkbListNum; i++) - { - // Get key info list in one VKB layout - keyInfoList = vkbListInfo[i]->KeyInfoList(); - TInt keyListNum = keyInfoList.Count(); - for(TInt j = 0; j < keyListNum; j++) - { - pKey = keyInfoList[j]->Key(); - if(pKey->Latched()) - { - // Unlatch the DeadKey - pKey->SetLatched(EFalse); - - // Set the DeadKey state - iLayoutContext->SetData(EAkninputDataTypeLatchedSet, &deadKeyChange); - deadKeyChange = ETrue; - break; - } - } - if(deadKeyChange) - { - break; - } - } - } - - TInt curVkbId = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeVkbLayout ) ); - - if ( ( curVkbId != aVkbLayoutId ) || ( iLangOrSizeChanged ) ) - { - iVkbLayout->ChangeVkbLayout( aVkbLayoutId ); - - TInt curClientId = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeClientLayout ) ); - CPeninputControlInfo* vkbInfo = iConfigInfo->FindClientLayoutInfo - ( curClientId )->FindControlInfo( EPeninutWindowCtrlIdVkbCtrl ); - - TRect rect; - CPeninputVkbCtrlExt* vkbCtrl = static_cast - ( ClientPane()->ControlById( EPeninutWindowCtrlIdVkbCtrl ) ); - - if ( vkbInfo ) - { - TInt unitWidth = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeUnitWidth ) ); - - TInt unitHeight = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData - ( EPeninputDataTypeUnitHeight ) ); - - rect.iTl = vkbCtrl->Rect().iTl + TPoint( vkbInfo->BeginColumn() - * unitWidth, vkbInfo->BeginRow() * unitHeight ); - TInt cols = vkbInfo->EndColumn() - vkbInfo->BeginColumn(); - TInt rows = vkbInfo->EndRow() - vkbInfo->BeginRow(); - rect.SetSize( TSize( cols * unitWidth, rows * unitHeight ) ); - } - - CPeninputVkbLayoutInfo* vkblayout = - ConfigInfo()->FindVkbLayoutInfo( aVkbLayoutId ); - - if ( vkbCtrl && vkblayout ) - { - vkbCtrl->SetRect( rect ); - DimKeys(); - - // Make the true draw - UpdateArea( vkbCtrl->Rect(), EFalse ); - } - - // Update data : vkb layout id - iLayoutContext->SetData( EPeninputDataTypeVkbLayout, &aVkbLayoutId ); - - // Reset lang changed flag - if ( iLangOrSizeChanged ) - { - iLangOrSizeChanged = EFalse; - } - } - - } - -// -------------------------------------------------------------------------- -// CPeninputLayoutWindow::HandleRangeEvent -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::HandleRangeEvent( TInt aRange ) - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - if (!IsCanChangeRange(aRange)) - { - ChangeToPreviousRange(curRange); - return; - } - - CPeninputRangeBarInfo* rangeBar = iConfigInfo->RangeBarInfo(); - if ( !rangeBar ) - { - return; - } - - CPeninputRangeInfo* rangeInfo = rangeBar->FindRange( aRange ); - - if ( !rangeInfo ) - { - return; - } - - TInt responseStyle = rangeInfo->ResponseStyle(); - if ( responseStyle == EPeninputRangeResponseNoAction ) - { - return; - } - - if ( curRange != aRange ) - { - if ( responseStyle == EPeninputRangeResponseSwitchRange ) - { - TInt index = KInvalidIndex; - - if ( aRange == ERangeAccent ) - { - index = 0; - } - iLayoutContext->SetData( EPeninputDataTypeCurrentAccent, &index ); - - ChangeRange( aRange ); - - // When change range mannually, make the entire window visible - TInt style = EPeninputPositionChangeBrJustify; - TBuf bufStyle; - bufStyle = ( TUint16* )&style; - HandleControlEvent(EPeninputLayoutEventMovePosition, NULL, bufStyle); - } - else if ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) - { - PopupChoiceList(); - } - } - } - -// -------------------------------------------------------------------------- -// CPeninputLayoutWindow::HandleRangeLoopEvent -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::HandleRangeLoopEvent( TInt aLoop ) - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - CFepUiBaseCtrl* ctrl = iCtrlPool->Control( EPeninutWindowCtrlIdRangeBar ); - CAknFepCtrlRangeBar* rangebar = static_cast( ctrl ); - - if ( rangebar ) - { - TRAP_IGNORE( rangebar->SetCaseL( curRange, aLoop ) ); - - if ( ( curRange == ERangeEnglish ) || ( ConfigInfo()->CaseSensitive() - && ( curRange == ERangeNative ) ) ) - { - TInt curCase = rangebar->GetCase( curRange ); - - - - // Store case in the data manager, the engine will - // get notice at the same time - iLayoutContext->SetData( EPeninputDataTypeCase, &curCase ); - - // Notify fep the new case - TBuf buf; - CPeninputDataConverter::IntToDesc( curCase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - } - } - -// -------------------------------------------------------------------------- -// CPeninputLayoutWindow::CaseByShiftCapslockStatus -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputLayoutWindow::CaseByShiftCapslockStatus() - { - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - TInt capslockStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCapslockDown ) ); - - return ( capslockStatus * 2 + shiftStatus ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::HandleShiftBtnClicked -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::HandleShiftBtnClicked() - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - TBool flag = ( curRange == ERangeEnglish ) || ( curRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() && ( curRange == ERangeNative ) ); - - if ( flag && !( iLayoutContext->IsShiftPermitted() ) ) - { - ChangeButtonStatus( 0, EPeninutWindowCtrlIdShiftBtn ); - return; - } - - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - - if ( shiftStatus ) - { - shiftStatus = 0; - } - else - { - shiftStatus = 1; - } - - // Update data - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shiftStatus ); - ChangeButtonStatus( shiftStatus, EPeninutWindowCtrlIdShiftBtn ); - - // Update vkb layout - TInt caseid = CaseByShiftCapslockStatus(); - - TInt vkbLayout = iConfigInfo->ShiftCapsSingleVkbLayoutId( curRange, - caseid ); - - TInt responseStyle = - iConfigInfo->RangeBarInfo()->FindRange( curRange )->ResponseStyle(); - if ( ( curRange == ERangeAccent ) - && ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkbLayout = vkbLayout + curAccentIndex * 2; - } - - ChangeVkbLayout( vkbLayout ); - - // Synchronize case if needed - if ( flag ) - { - // Notify fep the new case - TBuf buf; - TInt fepcase = CPeninputDataConverter::FepCaseByCaseId( caseid ); - iLayoutContext->SetData( EPeninputDataTypeCase, &fepcase ); - CPeninputDataConverter::IntToDesc( fepcase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::HandleCapslockBtnClicked -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::HandleCapslockBtnClicked() - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - TBool flag = ( curRange == ERangeEnglish ) || ( curRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() && ( curRange == ERangeNative ) ); - - if ( flag && !( iLayoutContext->IsCapsLockPermitted() ) ) - { - ChangeButtonStatus( 0, EPeninutWindowCtrlIdCapslockBtn ); - return; - } - - TInt capslockStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCapslockDown ) ); - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - - if ( capslockStatus ) - { - capslockStatus = 0; - } - else - { - capslockStatus = 1; - } - - if( shiftStatus ) - { - shiftStatus = 0; - iLayoutContext->SetData( EPeninputDataTypeShiftDown, - &shiftStatus ); - ChangeButtonStatus( shiftStatus, EPeninutWindowCtrlIdShiftBtn ); - } - - // Update data - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, - &capslockStatus ); - ChangeButtonStatus( capslockStatus, EPeninutWindowCtrlIdCapslockBtn ); - - // Update vkb layout - TInt caseid = CaseByShiftCapslockStatus(); - TInt vkbLayout = iConfigInfo->ShiftCapsSingleVkbLayoutId( curRange, - caseid ); - - TInt responseStyle = - iConfigInfo->RangeBarInfo()->FindRange( curRange )->ResponseStyle(); - if ( ( curRange == ERangeAccent ) - && ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkbLayout = vkbLayout + curAccentIndex * 2; - } - - ChangeVkbLayout( vkbLayout ); - - // Synchronize case if needed - if ( flag ) - { - // Notify fep the new case - TBuf buf; - TInt fepcase = CPeninputDataConverter::FepCaseByCaseId( caseid ); - iLayoutContext->SetData( EPeninputDataTypeCase, &fepcase ); - CPeninputDataConverter::IntToDesc( fepcase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::DimKeys -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::DimKeys() - { - CPeninputVkbCtrlExt* vkbCtrl = static_cast - ( ClientPane()->ControlById( EPeninutWindowCtrlIdVkbCtrl ) ); - vkbCtrl->CancelDims(); - TInt currentRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - TInt permitRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypePermittedRange ) ); - TInt keyMapping = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeNumericKeymap ) ); - - if ( ( currentRange == ERangeNumber ) - && ( permitRange == ERangeNumber ) ) - { - HBufC* rs = NULL; - TRAP_IGNORE(rs = GetKeyMappingStringL(keyMapping)); - if( rs ) - { - vkbCtrl->DimKeys( rs ); - delete rs; - } - } - vkbCtrl->Draw(); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::AddControlL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::AddNotOwnedControl( - CFepUiBaseCtrl* aControl ) - { - //do nothing if we already has the control. - if ( KErrNotFound != ClientPane()->ControlList().Find( aControl ) ) - { - return; - } - - if ( aControl ) - { - ( const_cast&> - ( ClientPane()->ControlList() ) ).Append( aControl ); - aControl->SetParent( ClientPane() ); - RRegion region( KPeninputLayoutWindowRegionCount ); - region.Copy( ClientPane()->Region() ); - - region.AddRect( aControl->Rect() ); - ClientPane()->SetRegion( region ); - } - } -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeButtonStatus -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ChangeButtonStatus( const TInt aIsDown, - const TInt aControlId ) - { - CAknFepCtrlEventButton* button = - static_cast - ( ClientPane()->ControlById( aControlId ) ); - - if ( button ) - { - button->SetHighlight( aIsDown == 0 ? EFalse : ETrue ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeLayoutPosition -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ChangeLayoutPosition( TInt aJustifyStyle ) - { - switch ( aJustifyStyle ) - { - case EPeninputPositionChangeBrJustify: - { - BottomRightJustify(); - } - break; - case EPeninputPositionChangeDataQuery: - { - BottomRightJustify(); - DataQueryJustify(); - } - break; - /*case EPeninputPositionChangeNone: - break;*/ - default: - { - TopLeftJustify(); - } - break; - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SetWindowRect -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetWindowRect( const TRect& aRect ) - { - TRect rect = aRect; - - - TRect shadowRect = TRect( TPoint(), - TSize( aRect.Width() + iShadowBrWidth + iShadowTlWidth, - aRect.Height() + iShadowTlHeight + iShadowBrHeight) - ); - - rect.Move( TPoint(iShadowTlWidth, iShadowTlHeight) - rect.iTl ); - - SetRect( rect ); - RootControl()->SetRect( rect ); - UiLayout()->SetShadowRect( shadowRect ); - } - - -// ----------------------------------------------------------------------------- -// CPeninputLayoutWindow::SetSwitchBtnFont -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetSwitchBtnFont(CAknFepCtrlEventButton& aSwitchBtn) - { - // read switch font laf info only when need - if (CPeninputDataConverter::AnyToInt( - iLayoutContext->RequestData(EAkninputDataTypeSizeChanging)) || (!iSwitchFontSet)) - { - TAknTextLineLayout langSwitch; - TAknTextLineLayout langSwitchShadow; - - switch( iLayoutContext->LayoutType() ) - { - case EPluginInputModeVkb: - { - langSwitch = - AknLayoutScalable_Avkon::cell_vkb_side_pane_t1().LayoutLine(); - langSwitchShadow = - AknLayoutScalable_Avkon::cell_vkb_side_pane_t1_copy1().LayoutLine(); - } - break; - case EPluginInputModeHwr: - { - langSwitch = - AknLayoutScalable_Avkon::cell_hwr_side_pane_t1().LayoutLine(); - langSwitchShadow = - AknLayoutScalable_Avkon::cell_hwr_side_pane_t1_copy1().LayoutLine(); - } - break; - default: - { - return; - } - } - - iSwitchFont = langSwitch.iFont; - iSwitchShadowFont = langSwitchShadow.iFont; - } - - aSwitchBtn.SetFont(AknLayoutUtils::FontFromId(iSwitchFont, NULL)); - aSwitchBtn.SetShadowFont(AknLayoutUtils::FontFromId(iSwitchShadowFont, NULL)); - iSwitchFontSet = ETrue; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::TopLeftJustify -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetSwitchBtnTextColor(CAknFepCtrlEventButton& aSwitchBtn) - { - TRgb textColor; - TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - textColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG59); - - if (error != KErrNone) - { - textColor = TRgb(KDefaultTextColor); - } - - aSwitchBtn.SetFontColor( textColor ); - - TRgb shadowTextColor; - error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - shadowTextColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG62); - - if (error != KErrNone) - { - shadowTextColor = TRgb(KDefaultShadowTextColor); - } - - aSwitchBtn.SetShadowFontColor( shadowTextColor ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::TopLeftJustify -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::TopLeftJustify() - { - // Read position from datamgr - TSize layoutSize = UiLayout()->Rect().Size(); - - TPoint tl = UiLayout()->Position(); - - TPoint oldBr = tl + layoutSize; - - if ( tl.iX < 0 ) - { - tl.iX = 0; - } - - if ( tl.iY < 0 ) - { - tl.iY = 0; - } - - TPoint br = tl + layoutSize; - - if ( br != oldBr ) - { - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & br.iX; - y = 0xFFFF0000 & ( br.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - } - - //Set the layout position - //UiLayout()->SetRect( newRect ); - UiLayout()->LayoutOwner()->SetPosition( tl ); - //UiLayout()->LayoutOwner()->LayoutSizeChanged( newRect.Size() ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::BottomRightJustify -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::BottomRightJustify() - { - // Read position from datamgr - TSize layoutSize( UiLayout()->Rect().Size() ); - TPoint oldbr; - TPoint br; - TPoint tl; - TSize screenSize = *( ( TSize* ) iLayoutContext->RequestData - ( EPeninputDataTypeScreenSize ) ); - - TRect screenRect = TRect( TPoint( 0, 0 ), screenSize ); - - TInt windowPosition = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeWindowPosition ) ); - - oldbr.iX = windowPosition & 0x0000FFFF; - oldbr.iY = ( windowPosition & 0xFFFF0000 ) >> 16; - - br = oldbr; - - if ( !screenRect.Contains( br ) ) - { - if ( screenSize.iWidth < br.iX ) - { - br.iX = screenSize.iWidth; - } - if ( screenSize.iHeight < br.iY ) - { - br.iY = screenSize.iHeight; - } - } - - // Check the top left point is in screen - tl.iX = br.iX - layoutSize.iWidth; - if ( tl.iX < 0 ) - { - tl.iX = 0; - br.iX = layoutSize.iWidth; - } - - tl.iY = br.iY - layoutSize.iHeight; - if ( tl.iY < 0 ) - { - tl.iY = 0; - br.iY = layoutSize.iHeight; - } - - - if ( oldbr != br ) - { - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & br.iX; - y = 0xFFFF0000 & ( br.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - } - - //Set the layout position - //UiLayout()->SetRect( newRect ); - //UiLayout()->LayoutOwner()->LayoutSizeChanged( newRect.Size() ); - UiLayout()->LayoutOwner()->SetPosition( tl ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::DataQueryJustify -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::DataQueryJustify() - { - TRect* dataQueryRect = ( TRect* )( iLayoutContext->RequestData - ( EPeninputDataTypeDataQueryDlgRect) ); - - TRect rect = TRect( UiLayout()->Position(), UiLayout()->Rect().Size() ); - - //move the VKB to the bottom-right corner - TSize scrsz = UiLayout()->ScreenSize(); - - if( scrsz.iWidth < scrsz.iHeight ) - { - return; - } - rect = TRect( TPoint( scrsz.iWidth - rect.Width(), scrsz.iHeight - rect.Height() ), - rect.Size() ); - - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & rect.iBr.iX; - y = 0xFFFF0000 & ( rect.iBr.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - - /*if ( rect.Intersects( *dataQueryRect ) ) - { - TInt Y = dataQueryRect->iTl.iY; - TInt height = rect.iBr.iY - rect.iTl.iY; - rect.iTl.iY = Y - height; - rect.iBr.iY = Y; - - if( rect.iTl.iY <0 ) - { - rect.iTl.iY = 0; - rect.iBr.iY = height; - } - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & rect.iBr.iX; - y = 0xFFFF0000 & ( rect.iBr.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - } - */ - //Set the layout position - UiLayout()->SetRect( rect ); - UiLayout()->LayoutOwner()->SetPosition( rect.iTl ); - UiLayout()->LayoutOwner()->LayoutSizeChanged( rect.Size() ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ReadShadowInfoL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::ReadShadowInfoL( TResourceReader aResReader ) - { - TPtrC bmpFileName = aResReader.ReadTPtrC(); - TInt32 imgMajorSkinId = aResReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - for ( TInt i = 0; i < KShadowBmpBr + 1; i++ ) - { - const TInt16 bmpId = aResReader.ReadInt16(); - const TInt16 bmpMskId = aResReader.ReadInt16(); - skinitemid = aResReader.ReadInt16(); - - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidImg) - { - CFbsBitmap* shadowImg = NULL; - CFbsBitmap* shadowMaskImg = NULL; - - if (bmpMskId != KInvalidImg) - { - AknsUtils::CreateIconL(skininstance, - id, - shadowImg, - shadowMaskImg, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - shadowImg, - bmpFileName, - bmpId); - } - - UiLayout()->SetShadowBmp(shadowImg, shadowMaskImg, TShadowBitmapIndex(i)); - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ReadBackgroundInfoL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindow::ReadBackgroundInfoL( TInt aResId ) - { - if( aResId == 0 ) - return; - - if( BackgroundBmp() ) - { - CFbsBitmap* bkBmp = BackgroundBmp(); - delete bkBmp; - SetBackgroundBmp( NULL ); - } - if( BkMaskBmp() ) - { - CFbsBitmap* bkMaskBmp = BkMaskBmp(); - delete bkMaskBmp; - SetBackgroundMaskBmp( NULL ); - } - - TResourceReader resReader; - CCoeEnv::Static()->CreateResourceReaderLC( resReader, aResId ); - - TPtrC bmpFileName = resReader.ReadTPtrC(); - TInt32 imgMajorSkinId = resReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - const TInt16 bmpId = resReader.ReadInt16(); - const TInt16 bmpMskId = resReader.ReadInt16(); - skinitemid = resReader.ReadInt16(); - id.Set(TInt(imgMajorSkinId), skinitemid); - - if (bmpId != KInvalidImg) - { - CFbsBitmap* backgroundImg = NULL; - CFbsBitmap* backgroundMaskImg = NULL; - if (bmpMskId != KInvalidImg) - { - AknsUtils::CreateIconL(skininstance, - id, - backgroundImg, - backgroundMaskImg, - bmpFileName, - bmpId, - bmpMskId); - } - else - { - AknsUtils::CreateIconL(skininstance, - id, - backgroundImg, - bmpFileName, - bmpId); - } - - SetBackgroundBmp( backgroundImg ); - SetBackgroundMaskBmp( backgroundMaskImg ); - } - CleanupStack::PopAndDestroy( 1 ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ReadIcfInfo -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::ReadIcfInfo( TResourceReader aResReader ) - { - TPtrC bmpFileName = aResReader.ReadTPtrC(); - TInt32 imgMajorSkinId = aResReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - const TInt16 icfbgId = aResReader.ReadInt16(); - const TInt16 icfbgmaskId = aResReader.ReadInt16(); - skinitemid = aResReader.ReadInt16(); - - id.Set( TInt( imgMajorSkinId ), skinitemid ); - - if ( icfbgId != KInvalidImg ) - { - CFbsBitmap* icfImg = NULL; - - if (icfbgmaskId != KInvalidImg) - { - CFbsBitmap* icfmaskImg = NULL; - - TRAP_IGNORE( AknsUtils::CreateIconL(skininstance, - id, - icfImg, - icfmaskImg, - bmpFileName, - icfbgId, - icfbgmaskId ) ); - - AknIconUtils::SetSize(icfmaskImg, TSize(1,1), EAspectRatioNotPreserved); - TRAP_IGNORE( iInputContextField->SetBackgroundMaskBitmapL(icfmaskImg) ); - } - else - { - TRAP_IGNORE( AknsUtils::CreateIconL(skininstance, - id, - icfImg, - bmpFileName, - icfbgId) ); - } - - AknIconUtils::SetSize(icfImg, TSize(1,1), EAspectRatioNotPreserved); - TRAP_IGNORE( iInputContextField->SetBackgroundBitmapL(icfImg) ); - } - - // read text color - TRgb textcolor; - TInt32 colorMajorSkinId = aResReader.ReadInt32(); - skinitemid = aResReader.ReadInt16(); - - id.Set(TInt(colorMajorSkinId), skinitemid); - - const TInt16 textcoloridx = aResReader.ReadInt16(); - - TInt error = AknsUtils::GetCachedColor(skininstance, - textcolor, - id, - textcoloridx); - - if (error == KErrNone) - { - iInputContextField->SetTextColor( textcolor ); - } - else - { - iInputContextField->SetTextColor( TRgb( KDefaultTextColor ) ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::Draw -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::Draw() - { - // Draw shadow - CAknFepCtrlBaseWindow::Draw(); - - //DrawShadow(); - - UpdateArea(UiLayout()->Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::GetKeyMappingStringL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -HBufC* CPeninputLayoutWindow::GetKeyMappingStringL(TInt aKeyMapping) - { - HBufC* rs = NULL; - if ( aKeyMapping == EKeymapFromResource ) - { - HBufC* customRes = (HBufC*) iLayoutContext->RequestData(EAknFepDataTypeUseDefinedResource); - _LIT(KTenNumbers,"0123456789"); - rs = HBufC::NewL(KTenNumbers().Length() + customRes->Length()); - rs->Des().Copy(*customRes); - rs->Des().Append(KTenNumbers); - } - else - { - rs = iKeyMappingMgr->KeyMappingStringL( aKeyMapping ); - } - - return rs; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SetEnableSwitchToHwr -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetEnableSwitchToHwr(TBool aEnable) - { - CAknFepCtrlEventButton* switchToHwrBtn = static_cast - ( iCtrlPool->Control( EPeninutWindowCtrlIdSwitchToHwrBtn ) ); - - if( switchToHwrBtn != NULL ) - { - if ( aEnable ) - { - switchToHwrBtn->SetDimmed(EFalse); - } - else - { - switchToHwrBtn->SetDimmed(ETrue); - switchToHwrBtn->SetActive(EFalse); - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::SetEnableSettingBtn -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindow::SetEnableSettingBtn(TBool aEnable) - { - CAknFepCtrlEventButton* langSetBtn = static_cast - ( iCtrlPool->Control( EPeninutWindowCtrlIdInputLangSwitcherBtn ) ); - - - if( langSetBtn != NULL ) - { - if ( aEnable ) - { - langSetBtn->SetDimmed(EFalse); - iTouchInputOptionButton->SetDimmed(EFalse); - } - else - { - langSetBtn->SetDimmed(ETrue); - langSetBtn->SetActive(EFalse); - iTouchInputOptionButton->SetDimmed(ETrue); - iTouchInputOptionButton->SetActive(EFalse); - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ReconfigUnitSize -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputLayoutWindow::ReconfigUnitSize(TInt /*aClientLayoutId*/) - { - return EFalse; - } - -void CPeninputLayoutWindow::AddMultiContextFieldL() - { - const CFont* icfFont = NULL; - TAknTextLineLayout textPaneTextLayout; - - textPaneTextLayout = - AknLayoutScalable_Avkon::fep_vkb_top_text_pane_t1().LayoutLine(); - - icfFont = AknLayoutUtils::FontFromId( textPaneTextLayout.iFont, NULL ); - if ( icfFont ) - { - iMultiLineIcf = CFepLayoutMultiLineIcf::NewL( TRect(), - UiLayout(), EPeninputWindowCtrlIdMultiLineICF, - icfFont->HeightInPixels(), - icfFont->FontMaxHeight(),icfFont ); - - HeaderPane()->AddControlL( iMultiLineIcf ); - - // Add layout as event observer - iMultiLineIcf->AddEventObserver( UiLayout() ); - iMultiLineIcf->SetFocus(ETrue); - } - } - -EXPORT_C TBool CPeninputLayoutWindow::IsMultiLineIcf() - { - return EFalse; - } - - -void CPeninputLayoutWindow::ReadMultiLineIcfInforL(TInt aResID) - { - if (!aResID) - { - return; - } - - TResourceReader resReader; - CCoeEnv::Static()->CreateResourceReaderLC( resReader, aResID ); - - TPtrC bmpFileName = resReader.ReadTPtrC(); - TInt32 imgMajorSkinId = resReader.ReadInt32(); - - TAknsItemID id; - TInt skinitemid; - - MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); - - const TInt16 icfbgId = resReader.ReadInt16(); - const TInt16 icfbgmaskId = resReader.ReadInt16(); - skinitemid = resReader.ReadInt16(); - - id.Set( TInt( imgMajorSkinId ), skinitemid ); - - if ( icfbgId != KInvalidImg ) - { - CFbsBitmap* icfImg = NULL; - - if (icfbgmaskId != KInvalidImg) - { - CFbsBitmap* icfmaskImg = NULL; - - TRAP_IGNORE( AknsUtils::CreateIconL(skininstance, - id, - icfImg, - icfmaskImg, - bmpFileName, - icfbgId, - icfbgmaskId ) ); - - AknIconUtils::SetSize(icfmaskImg, TSize(1,1), EAspectRatioNotPreserved); - TRAP_IGNORE( iMultiLineIcf->SetBackgroundMaskBitmapL(icfmaskImg) ); - } - else - { - TRAP_IGNORE( AknsUtils::CreateIconL(skininstance, - id, - icfImg, - bmpFileName, - icfbgId) ); - } - - AknIconUtils::SetSize(icfImg, TSize(1,1), EAspectRatioNotPreserved); - TRAP_IGNORE( iMultiLineIcf->SetBackgroundBitmapL(icfImg) ); - } - - // read text color - TRgb textcolor; - TInt32 colorMajorSkinId = resReader.ReadInt32(); - skinitemid = resReader.ReadInt16(); - - id.Set(TInt(colorMajorSkinId), skinitemid); - - const TInt16 textcoloridx = resReader.ReadInt16(); - - TInt error = AknsUtils::GetCachedColor(skininstance, - textcolor, - id, - textcoloridx); - - if (error == KErrNone) - { - iMultiLineIcf->SetTextColorL( textcolor ); - } - else - { - iMultiLineIcf->SetTextColorL( TRgb( KDefaultTextColor ) ); - } - CleanupStack::PopAndDestroy( 1 ); // resReader*/ - } - -EXPORT_C TBool CPeninputLayoutWindow::IsCanChangeRange(TInt /*aRange*/) - { - return ETrue; - } - -EXPORT_C void CPeninputLayoutWindow::ChangeToPreviousRange(TInt /*aRange*/) - { - - } - -EXPORT_C void CPeninputLayoutWindow::SetTextAlignmentL( TInt aAlignment ) - { - if ( iMultiLineIcf && ConfigInfo()->Language() != ELangNone ) - { - iMultiLineIcf->SetTextAlignmentL( aAlignment, ConfigInfo()->Language() ); - } - } -//End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp --- a/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1829 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: common layout window for UI interface of VKB and HWR -* -*/ - - -// System includes -#include - -#include -#include -#include -#include // Use global signal -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include - -// User includes -#include "peninputdataconverter.h" -#include "peninputrangebarinfo.h" -#include "peninputlayoutwindowext.h" -#include "peninputclientlayoutinfo.h" -#include "peninputdataprovider.h" -#include "peninputlayoutcontext.h" -#include "peninputvkbctrlext.h" -#include "peninputnumerickeymappingmgr.h" - -// Constants -const TInt KIntLengthForByte = 8; -const TInt KPeninputLayoutWindowUnitWidth = 12; -const TInt KInvalidIndex = -1; - -//const TInt32 KInvalidResId = -1; -//const TInt KInvalidImg = -1 ; -const TUint32 KDefaultTextColor = 0x000000; -const TUint32 KDefaultShadowTextColor = 0xffffff; -//const TInt KNotSupportSkin = -1; - -const TInt KIntSizeToInt16 = 2; -const TInt KMaxNumericString = 32; - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputLayoutWindowExt::CPeninputLayoutWindowExt -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputLayoutWindowExt::CPeninputLayoutWindowExt( - CFepUiLayout* aUiLayout, MPeninputLayoutContext* aLayoutContext ) - : CAknFepCtrlBaseWindowExt( aUiLayout, EPeninutWindowCtrlIdBaseWindow ), - iConfigInfo( NULL ), iLayoutContext( aLayoutContext ), - iLastUsedTotalColumns( KPeninputLayoutWindowUnitWidth ), - iFirstTimeConstruct( ETrue ), - iSwitchFontSet(EFalse), - iUnitSizeChange(EFalse) - { - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ConstructL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ConstructL() - { - BaseConstructL(); - - if( iLayoutContext->LayoutType() == EPluginInputModeVkb || - iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - { - iVkbLayout = CAknFepCtrlVkbLayout::NewL(); - } - else - { - iVkbLayout = NULL; - } - - CCoeEnv* coeEnv = CCoeEnv::Static(); - - // Set up resources - TFileName resFileName = GetWindowResFileName(); - BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resFileName ); - iWinResId = coeEnv->AddResourceFileL( resFileName ); - - //TResourceReader reader; - - //coeEnv->CreateResourceReaderLC( reader, GetWindowResId() ); - SetResourceId( GetWindowResId() ); - ConstructFromResourceL(); - - if (!iKeyMappingMgr) - { - // if key mapping mgr is not constructed in ConstructFromResourceL, need to - // construct it here - TResourceReader resReader; - CCoeEnv::Static()->CreateResourceReaderLC(resReader, GetNumKeymappingResId()); - iKeyMappingMgr = CPeninputNumericKepMappingMgr::NewL(resReader); - CleanupStack::PopAndDestroy(1); - } - - CreateAllControlsL(); - SetControlsFont(); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::~CPeninputLayoutWindowExt -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutWindowExt::~CPeninputLayoutWindowExt() - { - delete iConfigInfo; - delete iKeyMappingMgr; - delete iVkbLayout; - // Delete resource file from CoeEnv - CCoeEnv::Static()->DeleteResourceFile( iWinResId ); - - CCoeEnv::Static()->DeleteResourceFile( iConfigResId ); - - delete iToneSet; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SizeChanged -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SizeChanged( TBool /*aLandscapeStyle*/ ) - { - iLangOrSizeChanged = ETrue; - ReadLafForShadow(); - ResetLastColRow(); - - if ( iConfigInfo ) - { - ChangeClientSize(); - } - - //ReadLafForShadow( rect ); - - TInt style = EPeninputPositionChangeBrJustify; - TBuf bufStyle; - bufStyle = ( TUint16* )&style; - HandleControlEvent(EPeninputLayoutEventMovePosition, NULL, bufStyle); - - iLangOrSizeChanged = EFalse; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ReadLafForShadow -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindowExt::ReadLafForShadow() - { - TAknWindowLineLayout shadowPane; - TAknWindowLineLayout shadowTl; - TAknWindowLineLayout shadowBr; - TAknLayoutRect shadowRect; - TAknLayoutRect shadowTlRect; - TAknLayoutRect shadowBrRect; - - shadowPane = AknLayoutScalable_Avkon::bg_popup_fep_shadow_pane(1).LayoutLine(); - shadowRect.LayoutRect(TRect(), shadowPane); - - shadowTl = AknLayoutScalable_Avkon::bg_popup_fep_shadow_pane_g1().LayoutLine(); - shadowTlRect.LayoutRect(shadowRect.Rect(), shadowTl); - - shadowBr = AknLayoutScalable_Avkon::bg_popup_fep_shadow_pane_g8().LayoutLine(); - shadowBrRect.LayoutRect(shadowRect.Rect(), shadowBr); - - iShadowTlWidth = shadowTlRect.Rect().Size().iWidth; - iShadowTlHeight = shadowTlRect.Rect().Size().iHeight; - iShadowBrWidth = shadowBrRect.Rect().Size().iWidth; - iShadowBrHeight = shadowBrRect.Rect().Size().iHeight; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SizeChanged -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SizeChangedForBaseWindow( TInt /*aTotalColumns*/ ) - { - } -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::HandleControlEvent -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::HandleControlEvent( TInt aEventType, - CFepUiBaseCtrl* aCtrl, const TDesC& aEventData ) - { - // Call this function in base class - CAknFepCtrlBaseWindowExt::HandleControlEvent( aEventType, - aCtrl, aEventData ); - - TInt* data = ( TInt* ) aEventData.Ptr(); - - switch ( aEventType ) - { - case EEventButtonUp: - { - // check current range - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - if( aCtrl->ControlId() == EPeninutWindowCtrlIdShiftBtn) - { - if ( ( curRange == ERangeEnglish ) || ( curRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() && ( curRange == ERangeNative ) ) ) - { - CAknFepCtrlMultiModeButton* button = - static_cast( aCtrl ); - TInt realCase = button->GetRealCaseByMode( button->CurrentMode() ); - HandleMergedBtnClicked( realCase ); - } - else - { - HandleShiftAndCapslockBtnClicked(); - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - ChangeMergedButtonStatus( shiftStatus, 0 ); - } - } - - } - break; - case EPeninputLayoutEventSwitchLanguage: - { - TRAP_IGNORE( ChangeInputLanguageL( *data ) ); - } - break; - case EPeninputLayoutEventRange: - { - HandleRangeEvent( *data ); - } - break; - case EPeninputLayoutEventRangeLoop: - { - HandleRangeLoopEvent( *data ); - } - break; - case EPeninputLayoutEventShift: - { - HandleShiftAndCapslockBtnClicked(); - } - break; - case EPeninputLayoutEventCapslock: - { - HandleCapslockBtnClicked(); - } - break; - case EPeninputLayoutEventMovePosition: - { - TInt style = *( ( TUint16* ) aEventData.Ptr() ); - ChangeLayoutPosition( style ); - } - break; - case EPeninputLayoutEventSetPermittedRange: - { - if ( *data & ERangeNative ) - { - *data = *data | ERangeAccent | ERangeNativeNumber - | ERangeMixedText | ERangeMixedNumber; - } - else if(*data & ERangeEnglish) - { - *data = *data | ERangeAccent; - } - - iLayoutContext->SetData( EPeninputDataTypePermittedRange, data ); - - // Set range of range bar component - CFepUiBaseCtrl* bar = - Control( EPeninutWindowCtrlIdRangeBar ); - if ( bar ) - { - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - rangebar->SetPermittedRanges( *data ); - } - } - break; - case EPeninputLayoutEventSetPermittedCase: - { - // Update data:case - iLayoutContext->SetData( EPeninputDataTypePermittedCase, data ); - - // Set range of case - CFepUiBaseCtrl* bar = - Control( EPeninutWindowCtrlIdRangeBar ); - if ( bar ) - { - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - - rangebar->SetPermittedCase( ERangeEnglish, ECaseUpper, - ( *data & ECaseUpper) != 0 ); - rangebar->SetPermittedCase( ERangeEnglish, ECaseLower, - ( *data & ECaseLower) != 0 ); - rangebar->SetPermittedCase( ERangeEnglish, ECaseText, - ( *data & ECaseText) != 0 ); - } - } - break; - case EPeninputLayoutEventSetCase: - { - DoCaseChange( *data ); - } - break; - case EEventSizeChanged: - { - //if icf editor size changed, we need to inform owner - if(aCtrl->ControlId() == EPeninutWindowCtrlIdInputContextField || - aCtrl->ControlId() == EPeninputWindowCtrlIdMultiLineICF) - { - iLayoutContext->Sendkey( ESignalLayoutICFLengthChanged, KNullDesC ); - } - } - break; - default: - break; - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SetEditorTextL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetEditorTextL( - const TFepInputContextFieldData& aData ) - { - if (Control(EPeninutWindowCtrlIdInputContextField)) - { - static_cast( Control(EPeninutWindowCtrlIdInputContextField))->SetTextL( aData ); - return; - } - - if (Control(EPeninputWindowCtrlIdMultiLineICF)) - { - CFepLayoutMultiLineIcf* multiIcf = - static_cast( Control(EPeninputWindowCtrlIdMultiLineICF)); - - multiIcf->SetTextL( aData ); - - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb || - iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - { - TInt lang = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) ); - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - if ( lang == ELangVietnamese && curRange == ERangeEnglish ) - { - TBuf<1> preData; - multiIcf->ExtractText( preData, aData.iCurSel.LowerPos()-1, 1 ); - iVowelChar = EFalse; - - if ( KNullDesC() != preData ) - { - for (TUint i = 0; i < sizeof(VietVowelList) / sizeof(TText); ++i) - { - TBuf<1> buf; - buf.Append( VietVowelList[i] ); - if (preData == buf) - { - iVowelChar = ETrue; - break; - } - } - } - CPeninputVkbCtrlExt* vkbCtrl = static_cast - ( Control( EPeninutWindowCtrlIdVkbCtrl ) ); - vkbCtrl->DimKeySet( iToneSet, !iVowelChar ); - } - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SetEditorTextL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetTextIsSecret( TBool aData ) - { - if ( Control(EPeninutWindowCtrlIdInputContextField)) - { - static_cast - (Control(EPeninutWindowCtrlIdInputContextField))->SetTextIsSecret( aData ); - } - else if (Control(EPeninputWindowCtrlIdMultiLineICF)) - { - static_cast - (Control(EPeninputWindowCtrlIdMultiLineICF))->SetTextIsSecret( aData ); - } - } - -void CPeninputLayoutWindowExt::SetNumberGrouping( TBool aData ) - { - if (Control(EPeninputWindowCtrlIdMultiLineICF)) - { - static_cast - (Control(EPeninputWindowCtrlIdMultiLineICF))->SetNumberGrouping( aData ); - } - } - - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::DoClose -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputLayoutWindowExt::DoClose() - { - // Send EVkbEventWindowClose to layout - this->ReportEvent( EPeninputLayoutEventClose, KNullDesC ); - - // Return true which will permit the window close - return EFalse; - } - - -// --------------------------------------------------------------------------- -// Get layout config method. It does a lasy initialization for a instance of -// CPeninputLayoutWindowExt::ConfigInfo -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C CPeninputLayoutConfig* CPeninputLayoutWindowExt::ConfigInfo() const - { - return iConfigInfo; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::CheckResourceExist -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -TBool CPeninputLayoutWindowExt::CheckResourceExist( const TDesC& aFileName ) - { - RFile file; - - if ( !aFileName.Length() ) - { - return EFalse; - } - - TInt rs = file.Open( CCoeEnv::Static()->FsSession(), aFileName, EFileRead ); - - if ( rs == KErrNotFound ) - { - return EFalse; - } - else - { - file.Close(); - - return ETrue; - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeInputLanguageL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeInputLanguageL( TInt aLangID ) - { - // Determine whether a new language id is same as existing one, - if ( ConfigInfo() ) - { - // If language not changed, exit this function - if ( ConfigInfo()->Language() == aLangID ) - { - return; - } - } - - // First check file exist or not - TBool found = CheckResourceExist( GetWindowConfigResFileName( aLangID ) ); - if ( !found ) - { - aLangID = ELangEnglish; - found = CheckResourceExist( GetWindowConfigResFileName( aLangID ) ); - } - - if ( found ) - { - // Store language - iLayoutContext->SetData( EPeninputDataTypeInputLanguage, &aLangID ); - - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb || - iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - { - CFepUiBaseCtrl* ctrl = - Control( EPeninutWindowCtrlIdVkbCtrl ); - if ( ctrl ) - { - ( static_cast( ctrl ) )->Reset(); - } - } - - // Re-construct config info - if ( iConfigInfo ) - { - delete iConfigInfo; - iConfigInfo = NULL; - } - - if (iConfigResId) - { - CCoeEnv::Static()->DeleteResourceFile( iConfigResId ); - } - - // construct resource utils - - CCoeEnv* coeEnv = CCoeEnv::Static(); - - // Set up resources - TFileName resFileName = GetWindowConfigResFileName( aLangID ); - BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resFileName ); - iConfigResId = coeEnv->AddResourceFileL( resFileName ); - - TResourceReader reader; - - coeEnv->CreateResourceReaderLC( reader, GetWindowConfigResId() ); - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb || - iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - { - iVkbLayout->Reset(); - } - iConfigInfo = CPeninputLayoutConfig::NewL( *iVkbLayout, reader ); - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - - // Re-construct rangebar - ChangeRangeBarL(); - - //Reset range and layoutid - TInt range = -1; - iLayoutContext->SetData( EPeninputDataTypeCurrentRange, &range ); - iLayoutContext->SetData( EPeninputDataTypeClientLayout, &range ); - ResetLastColRow(); - iLangOrSizeChanged = ETrue; - - CFepUiBaseCtrl* icfCtrl = Control( EPeninputWindowCtrlIdMultiLineICF ); - if ( icfCtrl ) - { - static_cast(icfCtrl)->SetLanguageId( aLangID ); - } - - delete iToneSet; - iToneSet = NULL; - - if ( aLangID == ELangVietnamese ) - { - iToneSet = HBufC::NewL( KNumberOfToneMarks ); - - for (TInt index = 0; index < KNumberOfToneMarks; index ++) - { - iToneSet->Des().Append( VietToneMatrix[0][index] ); - } - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeRangeBarL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindowExt::ChangeRangeBarL() - { - // Read range bar from config into and reconstruct range button - if ( iConfigInfo ) - { - TInt resid = iConfigInfo->RangebarResId(); - CFepUiBaseCtrl* bar = - Control( EPeninutWindowCtrlIdRangeBar ); - - if ( bar ) - { - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - - CAknFepCtrlRangeBar::TRangeBarActionStyle style = - ( CAknFepCtrlRangeBar::TRangeBarActionStyle ) - iConfigInfo->RangeBarInfo()->RangeStyle(); - - rangebar->SetActionStyle( style ); - - TResourceReader reader; - - CCoeEnv::Static()->CreateResourceReaderLC( reader, resid ); - - rangebar->ConstructFromResourceL( reader ); - - // Pop and destroy reader - CleanupStack::PopAndDestroy( 1 ); - } - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeRange -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeRange( TInt aRange, TInt aVkbLayoutId, - TBool aNotify ) - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - TInt curVkbLayout = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeVkbLayout ) ); - - CFepUiBaseCtrl* bar = - Control( EPeninutWindowCtrlIdRangeBar ); - CAknFepCtrlRangeBar* rangebar = - static_cast( bar ); - - if ( rangebar ) - { - rangebar->ActiveRange( aRange ); - } - - if (curRange != aRange || curVkbLayout != aVkbLayoutId || aRange == ERangeAccent) - { - // Update data:range - if (curRange != aRange) - iLayoutContext->SetData( EPeninputDataTypeCurrentRange, &aRange ); - - // Change client layout - CPeninputRangeBarInfo* rangeBarInfo = iConfigInfo->RangeBarInfo(); - CPeninputRangeInfo* rangeInfo = rangeBarInfo->FindRange(aRange); - - __ASSERT_DEBUG(rangeInfo, User::Panic(_L("Commonlayout-Invalid Range"), aRange)); - - ChangeClientLayout(rangeInfo->ClientLayoutId()); - - // Notify fep the new range - if (aNotify) - { - TBuf buf; - CPeninputDataConverter::IntToDesc( aRange, buf ); - iLayoutContext->Sendkey( ESignalRange, buf ); - - // When change range mannually, make the entire window visible - TInt style = EPeninputPositionChangeBrJustify; - TBuf bufStyle; - bufStyle = ( TUint16* )&style; - HandleControlEvent(EPeninputLayoutEventMovePosition, NULL, bufStyle); - } - - // Change vkb layout - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb || - iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - { - if ( ( aRange == ERangeEnglish ) || ( aRange == ERangeAccent ) - || ( aRange == ERangeNativeNumber ) - || ( ConfigInfo()->CaseSensitive() - && ( aRange == ERangeNative ) ) ) - { - // Change shift and capslock button status according to the current case - TInt curCase = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCase ) ); - TInt shfit; - TInt capslock; - - CPeninputDataConverter::ShiftCapslockByCase( curCase, - shfit, capslock ); - - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shfit ); - //ChangeButtonStatus( shfit, EPeninutWindowCtrlIdShiftBtn ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &capslock ); - //ChangeButtonStatus( capslock, EPeninutWindowCtrlIdCapslockBtn ); - ChangeMergedButtonStatus( shfit, capslock ); - - TInt caseid = CaseByShiftCapslockStatus(); - TInt vkblayoutid = - ConfigInfo()->ShiftCapsSingleVkbLayoutId( aRange, caseid ); - - if ( aRange == ERangeAccent ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkblayoutid = vkblayoutid + curAccentIndex * 2; - } - - // Change vkb layout - ChangeVkbLayout( vkblayoutid ); - } - else - { - TInt flag = 0; - - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &flag ); - //ChangeButtonStatus( 0, EPeninutWindowCtrlIdShiftBtn ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &flag ); - //ChangeButtonStatus( 0, EPeninutWindowCtrlIdCapslockBtn ); - ChangeMergedButtonStatus( 0, 0 ); - - // Change vkb layout - if ( aVkbLayoutId ) - { - ChangeVkbLayout( aVkbLayoutId ); - } - else - { - ChangeVkbLayout( rangeInfo->VkbLayoutId() ); - } - } - } - - } - - if ( ( iLayoutContext->LayoutType() == EPluginInputModeVkb || - iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - && ( curRange == ERangeNumber || curRange == ERangeNativeNumber ) - && ( curRange == aRange ) ) - { - // Dimmed some keys if needed - DimKeys(); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeClientLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeClientLayout( - TInt aClientLayoutId ) - { - TInt curClientId = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeClientLayout ) ); - - if ( curClientId != aClientLayoutId ) - { - CPeninputClientLayoutInfo* clientLayout = - ConfigInfo()->FindClientLayoutInfo( aClientLayoutId ); - - __ASSERT_DEBUG( clientLayout, User::Panic(_L("Commonlayout-Invalid ClientLayout"), aClientLayoutId)); - - SetLafLayOut( clientLayout->Rows(), clientLayout->Columns() ); - - //SizeChangedForBaseWindow( clientLayout->Columns() ); - - // Re-Orginize all controls according to the configuration - ReorganizeControls( aClientLayoutId, ETrue ); - - // Update data:client layout id - iLayoutContext->SetData( EPeninputDataTypeClientLayout, - &aClientLayoutId ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeVkbLayout -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeVkbLayout( TInt aVkbLayoutId ) - { - TInt latchedFlag = CPeninputDataConverter::AnyToInt( - iLayoutContext->RequestData(EAkninputDataTypeLatchedSet)); - // If the DeadKey is latched, cancel it and then change the VKB layout - if(latchedFlag) - { - RPointerArray vkbListInfo; - RPointerArray keyInfoList; - - vkbListInfo = iVkbLayout->VkbLayoutInfoList(); - TInt vkbListNum = vkbListInfo.Count(); - - CVirtualKey* pKey; - TBool deadKeyChange = EFalse; - // Find the latched DeadKey in all the Vkb layout - for(TInt i = 0; i < vkbListNum; i++) - { - // Get key info list in one VKB layout - keyInfoList = vkbListInfo[i]->KeyInfoList(); - TInt keyListNum = keyInfoList.Count(); - for(TInt j = 0; j < keyListNum; j++) - { - pKey = keyInfoList[j]->Key(); - if(pKey->Latched()) - { - // Unlatch the DeadKey - pKey->SetLatched(EFalse); - - // Set the DeadKey state - iLayoutContext->SetData(EAkninputDataTypeLatchedSet, &deadKeyChange); - deadKeyChange = ETrue; - break; - } - } - if(deadKeyChange) - { - break; - } - } - } - - TInt curVkbId = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeVkbLayout ) ); - - if ( ( curVkbId != aVkbLayoutId ) || ( iLangOrSizeChanged ) ) - { - iLangOrSizeChanged = EFalse; - // Update data : vkb layout id - iLayoutContext->SetData( EPeninputDataTypeVkbLayout, &aVkbLayoutId ); - - iVkbLayout->ChangeVkbLayout( aVkbLayoutId ); - SetVkbLayoutSize(); - - TInt curClientId = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeClientLayout ) ); - CPeninputControlInfo* vkbInfo = iConfigInfo->FindClientLayoutInfo - ( curClientId )->FindControlInfo( EPeninutWindowCtrlIdVkbCtrl ); - - TRect rect; - CPeninputVkbCtrlExt* vkbCtrl = static_cast - ( Control(EPeninutWindowCtrlIdVkbCtrl)); - - - CPeninputVkbLayoutInfo* vkblayout = - ConfigInfo()->FindVkbLayoutInfo( aVkbLayoutId ); - - if ( vkbCtrl && vkblayout ) - { - DimKeys(); - - // Make the true draw - UpdateArea( vkbCtrl->Rect(), EFalse ); - } - } - } - -// -------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::HandleRangeEvent -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::HandleRangeEvent( TInt aRange ) - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - CPeninputRangeBarInfo* rangeBar = iConfigInfo->RangeBarInfo(); - if ( !rangeBar ) - { - return; - } - - CPeninputRangeInfo* rangeInfo = rangeBar->FindRange( aRange ); - - if ( !rangeInfo ) - { - return; - } - - TInt responseStyle = rangeInfo->ResponseStyle(); - if ( responseStyle == EPeninputRangeResponseNoAction ) - { - return; - } - - if (curRange != aRange && responseStyle == EPeninputRangeResponseSwitchRange) - { - TInt index = KInvalidIndex; - - if ( aRange == ERangeAccent ) - { - index = 0; - } - iLayoutContext->SetData( EPeninputDataTypeCurrentAccent, &index ); - - ChangeRange( aRange ); - } - else if ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) - { - PopupChoiceList(); - } - } - -// -------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::HandleRangeLoopEvent -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::HandleRangeLoopEvent( TInt aLoop ) - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - CFepUiBaseCtrl* ctrl = Control( EPeninutWindowCtrlIdRangeBar ); - CAknFepCtrlRangeBar* rangebar = static_cast( ctrl ); - - if ( rangebar ) - { - TRAP_IGNORE( rangebar->SetCaseL( curRange, aLoop ) ); - - if ( ( curRange == ERangeEnglish ) || ( ConfigInfo()->CaseSensitive() - && ( curRange == ERangeNative ) ) ) - { - TInt curCase = rangebar->GetCase( curRange ); - - // Store case in the data manager, the engine will - // get notice at the same time - iLayoutContext->SetData( EPeninputDataTypeCase, &curCase ); - - // Notify fep the new case - TBuf buf; - CPeninputDataConverter::IntToDesc( curCase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - } - } - -// -------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::CaseByShiftCapslockStatus -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C TInt CPeninputLayoutWindowExt::CaseByShiftCapslockStatus() - { - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - TInt capslockStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCapslockDown ) ); - - return ( capslockStatus * 2 + shiftStatus ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::HandleShiftBtnClicked -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::HandleMergedBtnClicked( TInt aCase ) - { - switch( aCase ) - { - case ECaseLower: - { - HandleCapslockBtnClicked(); - } - break; - case ECaseUpper: - { - HandleShiftBtnClicked(); - } - break; - case ECaseText: -// case ECaseInverseText: - { - // Current case is Text, equals shift button - //HandleCapslockBtnClicked(); - HandleShiftAndCapslockBtnClicked(); - } - break; - default: - break; - } - - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::HandleShiftBtnClicked -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::HandleShiftBtnClicked() - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - TInt capslockStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCapslockDown ) ); - - // Update data - if ( iLayoutContext->IsCapsLockPermitted() ) - { - if ( curRange == ERangeEnglish || curRange == ERangeAccent - || ( ConfigInfo()->CaseSensitive() && curRange == ERangeNative ) ) - { - capslockStatus = !capslockStatus; - ChangeMergedButtonStatus( shiftStatus, capslockStatus ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &capslockStatus ); - } - } - else - { - if ( iLayoutContext->IsShiftPermitted() ) - { - shiftStatus = !shiftStatus; - ChangeMergedButtonStatus( shiftStatus, capslockStatus ); - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shiftStatus ); - } - } - - // Update vkb layout - TInt caseid = CaseByShiftCapslockStatus(); - - TInt vkbLayout = iConfigInfo->ShiftCapsSingleVkbLayoutId( curRange, - caseid ); - - TInt responseStyle = - iConfigInfo->RangeBarInfo()->FindRange( curRange )->ResponseStyle(); - if ( ( curRange == ERangeAccent ) - && ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkbLayout = vkbLayout + curAccentIndex * 2; - } - - ChangeVkbLayout( vkbLayout ); - - // Synchronize case if needed - if ( ( curRange == ERangeEnglish ) || ( curRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() && ( curRange == ERangeNative ) ) ) - { - // Notify fep the new case - TBuf buf; - TInt fepcase = CPeninputDataConverter::FepCaseByCaseId( caseid ); - iLayoutContext->SetData( EPeninputDataTypeCase, &fepcase ); - CPeninputDataConverter::IntToDesc( fepcase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::HandleCapslockBtnClicked -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::HandleCapslockBtnClicked() - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - TInt capslockStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCapslockDown ) ); - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - - if ( iLayoutContext->IsShiftPermitted() ) - { - if ( curRange == ERangeEnglish || curRange == ERangeAccent || - ( ConfigInfo()->CaseSensitive() && curRange == ERangeNative ) ) - { - shiftStatus = !shiftStatus; - ChangeMergedButtonStatus( shiftStatus, capslockStatus ); - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shiftStatus ); - } - } - else - { - if ( iLayoutContext->IsCapsLockPermitted() ) - { - capslockStatus = !capslockStatus; - ChangeMergedButtonStatus( shiftStatus, capslockStatus ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &capslockStatus ); - } - } - - // Update vkb layout - TInt caseid = CaseByShiftCapslockStatus(); - TInt vkbLayout = iConfigInfo->ShiftCapsSingleVkbLayoutId( curRange, - caseid ); - - TInt responseStyle = - iConfigInfo->RangeBarInfo()->FindRange( curRange )->ResponseStyle(); - if ( ( curRange == ERangeAccent ) - && ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkbLayout = vkbLayout + curAccentIndex * 2; - } - - ChangeVkbLayout( vkbLayout ); - - // Synchronize case if needed - if ( ( curRange == ERangeEnglish ) || ( curRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() && ( curRange == ERangeNative ) ) ) - { - // Notify fep the new case - TBuf buf; - TInt fepcase = CPeninputDataConverter::FepCaseByCaseId( caseid ); - iLayoutContext->SetData( EPeninputDataTypeCase, &fepcase ); - CPeninputDataConverter::IntToDesc( fepcase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - } - -EXPORT_C void CPeninputLayoutWindowExt::HandleShiftAndCapslockBtnClicked() - { - TInt curRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - - TInt shiftStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeShiftDown ) ); - TInt capslockStatus = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCapslockDown ) ); - - if ( shiftStatus ) - { - shiftStatus = 0; - } - else - { - shiftStatus = 1; - } - - // Update data - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shiftStatus ); - - if ( iLayoutContext->IsCapsLockPermitted() ) - { - if ( curRange == ERangeEnglish || curRange == ERangeAccent - || ( ConfigInfo()->CaseSensitive() && curRange == ERangeNative ) ) - { - capslockStatus = !capslockStatus; - ChangeMergedButtonStatus( shiftStatus, capslockStatus ); - iLayoutContext->SetData( EPeninputDataTypeCapslockDown, &capslockStatus ); - } - } - else - { - if ( iLayoutContext->IsShiftPermitted() ) - { - shiftStatus = !shiftStatus; - ChangeMergedButtonStatus( shiftStatus, capslockStatus ); - iLayoutContext->SetData( EPeninputDataTypeShiftDown, &shiftStatus ); - } - } - - // Update vkb layout - TInt caseid = CaseByShiftCapslockStatus(); - - TInt vkbLayout = iConfigInfo->ShiftCapsSingleVkbLayoutId( curRange, - caseid ); - - TInt responseStyle = - iConfigInfo->RangeBarInfo()->FindRange( curRange )->ResponseStyle(); - if ( ( curRange == ERangeAccent ) - && ( responseStyle == EPeninputRangeResponsePopupChoiceItem ) ) - { - TInt curAccentIndex = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentAccent ) ); - vkbLayout = vkbLayout + curAccentIndex * 2; - } - - ChangeVkbLayout( vkbLayout ); - - // Synchronize case if needed - if ( ( curRange == ERangeEnglish ) || ( curRange == ERangeAccent ) - || ( ConfigInfo()->CaseSensitive() && ( curRange == ERangeNative ) ) ) - { - // Notify fep the new case - TBuf buf; - TInt fepcase = CPeninputDataConverter::FepCaseByCaseId( caseid ); - iLayoutContext->SetData( EPeninputDataTypeCase, &fepcase ); - CPeninputDataConverter::IntToDesc( fepcase, buf ); - iLayoutContext->Sendkey( ESignalCaseMode, buf ); - } - - - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::DimKeys -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindowExt::DimKeys() - { - TRAP_IGNORE(DimKeysL()); - } -void CPeninputLayoutWindowExt::DimKeysL() - { - CPeninputVkbCtrlExt* vkbCtrl = static_cast - ( Control( EPeninutWindowCtrlIdVkbCtrl ) ); - vkbCtrl->CancelDims(); - TInt currentRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) ); - TInt permitRange = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypePermittedRange ) ); - TInt keyMapping = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeNumericKeymap ) ); - TInt inputLang = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) ); - - if ( currentRange == ERangeNumber && - (permitRange == ERangeNumber || - permitRange == ERangeNativeNumber || - permitRange == (ERangeNumber | ERangeNativeNumber)) ) - { - HBufC* rs = NULL; - if ( keyMapping == EKeymapFromResource ) - { - HBufC* customRes = - (HBufC*) iLayoutContext->RequestData(EAknFepDataTypeUseDefinedResource); - _LIT(KTenNumbers,"0123456789"); - rs = HBufC::NewL(KTenNumbers().Length() + customRes->Length()); - rs->Des().Copy(*customRes); - rs->Des().Append(KTenNumbers); - } - else - { - TRAP_IGNORE( rs = iKeyMappingMgr->KeyMappingStringL( keyMapping ); ); - } - - if( rs ) - { - vkbCtrl->DimKeys( rs ); - delete rs; - } - } - else if ( currentRange == ERangeNativeNumber && - (permitRange == ERangeNumber || - permitRange == ERangeNativeNumber || - permitRange == (ERangeNumber | ERangeNativeNumber)) ) - { - HBufC* rs = NULL; - TRAP_IGNORE( rs = GetKeyMappingStringL( keyMapping, inputLang ) ); - if( rs ) - { - vkbCtrl->DimKeys( rs ); - delete rs; - } - } - - else if ( (currentRange == ERangeNative || currentRange == ERangeEnglish) && CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) ) == ELangVietnamese ) - { - vkbCtrl->DimKeySet( iToneSet, !iVowelChar ); - } - - vkbCtrl->Draw(); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::AddControlL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::AddNotOwnedControl( - CFepUiBaseCtrl* aControl ) - { - //do nothing if we already has the control. - if ( KErrNotFound != ControlList().Find( aControl ) ) - { - return; - } - - if ( aControl ) - { - ( const_cast&> - ( ControlList() ) ).Append( aControl ); - } - } -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeButtonStatus -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeButtonStatus( const TInt aIsDown, - const TInt aControlId ) - { - CAknFepCtrlEventButton* button = - static_cast - (ControlById( aControlId ) ); - - if ( button ) - { - button->SetHighlight( aIsDown == 0 ? EFalse : ETrue ); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindow::ChangeButtonStatus -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeMergedButtonStatus( - const TInt aIsShiftCase, - const TInt aIsCapslockCase ) - { - CAknFepCtrlMultiModeButton* button = - static_cast - (ControlById( EPeninutWindowCtrlIdShiftBtn ) ); - - if( !button ) - { - return; - } - switch ( aIsCapslockCase * 2 + aIsShiftCase ) - { - case 1: // text case - { - TRAP_IGNORE( button->SetCurrentModeL( EBtnBmpActive, 1 ) ); - button->SetHighlight( ETrue ); - } - break; - case 2: // upper case - { - TRAP_IGNORE( button->SetCurrentModeL( EBtnBmpActive, 2 ) ); - button->SetHighlight( ETrue ); - } - break; - default: - { - TRAP_IGNORE( button->SetCurrentModeL( EBtnBmpActive, 0 ) ); - button->SetHighlight( EFalse ); - } - break; - } - } -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ChangeLayoutPosition -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::ChangeLayoutPosition( TInt aJustifyStyle ) - { - if ( iLayoutContext->LayoutType() == EPluginInputModeFSQ ) - { - TopLeftJustify(); - return; - } - switch ( aJustifyStyle ) - { - case EPeninputPositionChangeBrJustify: - { - BottomRightJustify(); - } - break; - case EPeninputPositionChangeDataQuery: - { - //BottomRightJustify(); - DataQueryJustify(); - } - break; - default: - { - TopLeftJustify(); - } - break; - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SetWindowRect -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetWindowRect( const TRect& aRect ) - { - //we should know the layout size now - if(iLayoutContext->LayoutType() == EPluginInputModeFSQ) - { - SetRect( aRect ); - UiLayout()->SetRect(aRect); - } - else - { - TRect rect = aRect; - - - TRect shadowRect = TRect( TPoint(), - TSize( aRect.Width() + iShadowBrWidth + iShadowTlWidth, - aRect.Height() + iShadowTlHeight + iShadowBrHeight) - ); - - rect.Move( TPoint(iShadowTlWidth, iShadowTlHeight) - rect.iTl ); - - SetRect( rect ); - RootControl()->SetRect( rect ); - UiLayout()->SetShadowRect( shadowRect ); - } - } - - -// ----------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SetSwitchBtnFont -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetSwitchBtnFont(CAknFepCtrlEventButton& aSwitchBtn) - { - // read switch font laf info only when need - if (CPeninputDataConverter::AnyToInt( - iLayoutContext->RequestData(EAkninputDataTypeSizeChanging)) ||(!iSwitchFontSet)) - { - TAknTextLineLayout langSwitch; - TAknTextLineLayout langSwitchShadow; - - switch( iLayoutContext->LayoutType() ) - { - case EPluginInputModeVkb: - case EPluginInputModeFSQ: - { - langSwitch = - AknLayoutScalable_Avkon::cell_vkb_side_pane_t1().LayoutLine(); - langSwitchShadow = - AknLayoutScalable_Avkon::cell_vkb_side_pane_t1_copy1().LayoutLine(); - } - break; - case EPluginInputModeHwr: - { - langSwitch = - AknLayoutScalable_Avkon::cell_hwr_side_pane_t1().LayoutLine(); - langSwitchShadow = - AknLayoutScalable_Avkon::cell_hwr_side_pane_t1_copy1().LayoutLine(); - } - break; - default: - { - return; - } - } - - iSwitchFont = langSwitch.iFont; - iSwitchShadowFont = langSwitchShadow.iFont; - } - - aSwitchBtn.SetFont(AknLayoutUtils::FontFromId(iSwitchFont, NULL)); - aSwitchBtn.SetShadowFont(AknLayoutUtils::FontFromId(iSwitchShadowFont, NULL)); - iSwitchFontSet = ETrue; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::TopLeftJustify -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetSwitchBtnTextColor(CAknFepCtrlEventButton& aSwitchBtn) - { - TRgb textColor; - TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - textColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG59); - - if (error != KErrNone) - { - textColor = TRgb(KDefaultTextColor); - } - - aSwitchBtn.SetFontColor( textColor ); - - TRgb shadowTextColor; - error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), - shadowTextColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG62); - - if (error != KErrNone) - { - shadowTextColor = TRgb(KDefaultShadowTextColor); - } - - aSwitchBtn.SetShadowFontColor( shadowTextColor ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::TopLeftJustify -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindowExt::TopLeftJustify() - { - // Read position from datamgr - TSize layoutSize = UiLayout()->Rect().Size(); - - TPoint tl = UiLayout()->Position(); - - TPoint oldBr = tl + layoutSize; - - if ( tl.iX < 0 ) - { - tl.iX = 0; - } - - if ( tl.iY < 0 ) - { - tl.iY = 0; - } - - TPoint br = tl + layoutSize; - - if ( br != oldBr ) - { - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & br.iX; - y = 0xFFFF0000 & ( br.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - } - - UiLayout()->LayoutOwner()->SetPosition( tl ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::BottomRightJustify -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindowExt::BottomRightJustify() - { - // Read position from datamgr - TSize layoutSize( UiLayout()->Rect().Size() ); - - TPoint oldbr; - TPoint br; - TPoint tl; - - TSize screenSize = *( ( TSize* ) iLayoutContext->RequestData - ( EPeninputDataTypeScreenSize ) ); - - TInt windowPosition = CPeninputDataConverter::AnyToInt - ( iLayoutContext->RequestData( EPeninputDataTypeWindowPosition ) ); - - oldbr.iX = windowPosition & 0x0000FFFF; - oldbr.iY = ( windowPosition & 0xFFFF0000 ) >> 16; - - br = oldbr; - - // Check the top left point is in screen - if (br.iX > screenSize.iWidth) - { - br.iX = screenSize.iWidth; - } - if( br.iY > screenSize.iHeight ) - { - br.iY = screenSize.iHeight; - } - - tl.iX = br.iX - layoutSize.iWidth; - tl.iY = br.iY - layoutSize.iHeight; - - if ( tl.iX < 0 ) - { - tl.iX = 0; - br.iX = layoutSize.iWidth; - } - - if ( tl.iY < 0 ) - { - tl.iY = 0; - br.iY = layoutSize.iHeight; - } - - if ( oldbr != br ) - { - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & br.iX; - y = 0xFFFF0000 & ( br.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - } - - UiLayout()->LayoutOwner()->SetPosition( tl ); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::DataQueryJustify -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -void CPeninputLayoutWindowExt::DataQueryJustify() - { - TRect* dataQueryRect = ( TRect* )( iLayoutContext->RequestData - ( EPeninputDataTypeDataQueryDlgRect) ); - - TRect rect = TRect( UiLayout()->Position(), UiLayout()->Rect().Size() ); - - CCoeEnv* coeEnv = CCoeEnv::Static(); - TPixelsTwipsAndRotation ptSize; - coeEnv->ScreenDevice()->GetDefaultScreenSizeAndRotation(ptSize); - - // Landscape mode: move window to the br of the screen - if (ptSize.iPixelSize.iWidth > ptSize.iPixelSize.iHeight) - { - rect.SetRect(ptSize.iPixelSize.iWidth - rect.Width(), - ptSize.iPixelSize.iHeight/2 - rect.Height()/2, - ptSize.iPixelSize.iWidth, - ptSize.iPixelSize.iHeight/2 + rect.Height()/2); - } - // Portrait mode: dodge the dataquery - else if ( rect.Intersects( *dataQueryRect ) ) - { - TInt Y = dataQueryRect->iTl.iY; - TInt height = rect.iBr.iY - rect.iTl.iY; - rect.iTl.iY = Y - height; - rect.iBr.iY = Y; - - if( rect.iTl.iY <0 ) - { - rect.iTl.iY = 0; - rect.iBr.iY = height; - } - } - - //Write the new position into CenRep - TInt x = 0; - TInt y = 0; - x = 0x0000FFFF & rect.iBr.iX; - y = 0xFFFF0000 & ( rect.iBr.iY << 16 ); - TInt pos = x | y; - iLayoutContext->SetData( EPeninputDataTypeWindowPosition, &pos ); - - //Set the layout position - UiLayout()->LayoutOwner()->SetPosition( rect.iTl ); - } - -TBool CPeninputLayoutWindowExt::CreateCustomControlL( TInt16 /*aControlId*/, TInt32 /*aImageId*/ ) - { - return EFalse; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::Draw -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::Draw() - { - // Draw shadow - CAknFepCtrlBaseWindowExt::Draw(); - UpdateArea(UiLayout()->Rect(), EFalse); - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::GetKeyMappingStringL -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -HBufC* CPeninputLayoutWindowExt::GetKeyMappingStringL(TInt aKeyMapping, - const TInt aLang ) - { - HBufC* rs = NULL; - if ( aKeyMapping == EKeymapFromResource ) - { - HBufC* customRes = (HBufC*) iLayoutContext->RequestData(EAknFepDataTypeUseDefinedResource); - _LIT(KTenNumbers,"0123456789"); - TBuf numbers; - if( aLang == ELangArabic ) - { - numbers.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x0660, 0x0661, 0x0662, - 0x0663, 0x0664, 0x0665, - 0x0666, 0x0667, 0x0668, 0x0669 ); - } - else if( aLang == ELangUrdu || aLang == ELangFarsi ) - { - numbers.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x06F0, 0x06F1, 0x06F2, - 0x06F3, 0x06F4, 0x06F5, - 0x06F6, 0x06F7, 0x06F8, 0x06F9 ); - } - else if( aLang == ELangHindi ) - { - numbers.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x0966, 0x0967, 0x0968, - 0x0969, 0x096a, 0x096b, - 0x096c, 0x096d, 0x096e, 0x096f ); - } - else if( aLang == ELangThai ) - { - numbers.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x0E50, 0x0E51, 0x0E52, - 0x0E53, 0x0E54, 0x0E55, - 0x0E56, 0x0E57, 0x0E58, 0x0E59 ); - } - else - { - numbers = KTenNumbers; - } - - rs = HBufC::NewL(numbers.Length() + customRes->Length()); - rs->Des().Copy(*customRes); - rs->Des().Append(numbers); - } - else - { - rs = iKeyMappingMgr->KeyMappingStringL( aKeyMapping, aLang ); - } - - return rs; - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SetEnableSwitchToHwr -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetEnableSwitchToHwr(TBool aEnable) - { - CAknFepCtrlEventButton* switchToHwrBtn = static_cast - ( Control( EPeninutWindowCtrlIdSwitchToHwrBtn ) ); - - if ( aEnable ) - { - switchToHwrBtn->SetDimmed(EFalse); - } - else - { - switchToHwrBtn->SetDimmed(ETrue); - switchToHwrBtn->SetActive(EFalse); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::SetEnableSettingBtn -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C void CPeninputLayoutWindowExt::SetEnableSettingBtn(TBool aEnable) - { - CAknFepCtrlEventButton* optionBtn = static_cast - (Control( EPeninutWindowCtrlIdOptionBtn ) ); - - if ( aEnable ) - { - optionBtn->SetDimmed(EFalse); - } - else - { - optionBtn->SetDimmed(ETrue); - optionBtn->SetActive(EFalse); - } - } - -// --------------------------------------------------------------------------- -// CPeninputLayoutWindowExt::ReconfigUnitSize -// (other items were commented in a header) -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputLayoutWindowExt::ReconfigUnitSize(TInt /*aClientLayoutId*/) - { - return EFalse; - } - -EXPORT_C void CPeninputLayoutWindowExt::SetLafLayOut(TInt /*aRows*/, TInt /*aColumns*/) - { - - } - -EXPORT_C void CPeninputLayoutWindowExt::SetVkbLayoutSize() - { - - } -EXPORT_C void CPeninputLayoutWindowExt::OnInputLanguageChange() - { - if ( iLayoutContext->LayoutType() == EPluginInputModeVkb ) - { - CFepUiBaseCtrl* ctrl = - Control( EPeninutWindowCtrlIdVkbCtrl ); - if ( ctrl ) - { - ( static_cast( ctrl ) )->Reset(); - } - } - } - -void CPeninputLayoutWindowExt::AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl) - { - AddControlL(aCtrl); - } - -void CPeninputLayoutWindowExt::ResetLastColRow() - { - iLastUsedTotalColumns = 0; - iLastUsedTotalRows = 0; - } - - -EXPORT_C void CPeninputLayoutWindowExt::SetTextAlignmentL( TInt aAlignment ) - { - CFepLayoutMultiLineIcf* icf = - static_cast( Control(EPeninputWindowCtrlIdMultiLineICF)); - - if ( icf && ConfigInfo()->Language() != ELangNone ) - { - icf->SetTextAlignmentL( aAlignment, ConfigInfo()->Language() ); - } - } - -//End Of File diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputnumerickeymappingmgr.cpp --- a/textinput/peninputcommonlayout/src/peninputnumerickeymappingmgr.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: number keymapping manager -* -*/ - - -// System includes -#include - -// User includes -#include "peninputnumerickeymappingmgr.h" - -// Constants -_LIT( KNumberString, "0123456789" ); -const TInt KMaxNumericString = 32; - - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputNumericKepMappingMgr* CPeninputNumericKepMappingMgr::NewL( - TResourceReader aReader ) - { - CPeninputNumericKepMappingMgr* self = NewLC( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputNumericKepMappingMgr* CPeninputNumericKepMappingMgr::NewLC( - TResourceReader aReader ) - { - CPeninputNumericKepMappingMgr* self = - new ( ELeave ) CPeninputNumericKepMappingMgr(); - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputNumericKepMappingMgr::ConstructL( TResourceReader aReader ) - { - const TInt count = aReader.ReadInt16(); - - for ( TInt i = 0; i < count; i++ ) - { - iKeyMappingIdList.Append( aReader.ReadInt16() ); - TPtrC ptr = aReader.ReadTPtrC(); - iKeyMappingStringList.Append( ptr.AllocL() ); - } - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::~CPeninputNumericKepMappingMgr -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputNumericKepMappingMgr::~CPeninputNumericKepMappingMgr() - { - iKeyMappingIdList.Reset(); - iKeyMappingIdList.Close(); - - iKeyMappingStringList.ResetAndDestroy(); - iKeyMappingStringList.Close(); - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::KeyMappingStringL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C HBufC* CPeninputNumericKepMappingMgr::KeyMappingStringL( - const TInt aKeyMappingId ) const - { - TLocale locale; - TBuf rs = KNumberString(); - const TInt index = iKeyMappingIdList.Find( aKeyMappingId ); - - if ( index != KErrNotFound ) - { - HBufC* buf = iKeyMappingStringList[index]; - - rs.Append( *buf ); - - if ( ( aKeyMappingId == EAknEditorCalculatorNumberModeKeymap ) - || ( aKeyMappingId == EAknEditorConverterNumberModeKeymap ) ) - { - rs.Append( locale.DecimalSeparator() ); - } - } - - return rs.AllocL(); - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::ArabicKeyMappingStringL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C HBufC* CPeninputNumericKepMappingMgr::KeyMappingStringL( - const TInt aKeyMappingId, const TInt aLang ) const - { - - TLocale locale; - TBuf rs; - if( aLang == ELangArabic ) - { - rs.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x0660, 0x0661, 0x0662, - 0x0663, 0x0664, 0x0665, - 0x0666, 0x0667, 0x0668, 0x0669 ); - } - else if( aLang == ELangFarsi || aLang == ELangUrdu ) - { - rs.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x06F0, 0x06F1, 0x06F2, - 0x06F3, 0x06F4, 0x06F5, - 0x06F6, 0x06F7, 0x06F8, 0x06F9 ); - } - else if( aLang == ELangHindi ) - { - rs.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x0966, 0x0967, 0x0968, - 0x0969, 0x096a, 0x096b, - 0x096c, 0x096d, 0x096e, 0x096f ); - } - else if( aLang == ELangThai ) - { - rs.Format( _L("%c%c%c%c%c%c%c%c%c%c"), - 0x0E50, 0x0E51, 0x0E52, - 0x0E53, 0x0E54, 0x0E55, - 0x0E56, 0x0E57, 0x0E58, 0x0E59 ); - } - else - { - rs = KNumberString(); - } - - const TInt index = iKeyMappingIdList.Find( aKeyMappingId ); - - if ( index != KErrNotFound ) - { - HBufC* buf = iKeyMappingStringList[index]; - - rs.Append( *buf ); - - if ( ( aKeyMappingId == EAknEditorCalculatorNumberModeKeymap ) - || ( aKeyMappingId == EAknEditorConverterNumberModeKeymap ) ) - { - rs.Append( locale.DecimalSeparator() ); - } - } - - return rs.AllocL(); - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::Count -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C TInt CPeninputNumericKepMappingMgr::Count() const - { - return iKeyMappingIdList.Count(); - } - -// ------------------------------------------------------------------------ -// CPeninputNumericKepMappingMgr::Reset -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C void CPeninputNumericKepMappingMgr::Reset() - { - iKeyMappingIdList.Reset(); - iKeyMappingStringList.ResetAndDestroy(); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputrangebarinfo.cpp --- a/textinput/peninputcommonlayout/src/peninputrangebarinfo.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: range bar layout implementation -* -*/ - - -// User includes -#include "peninputrangebarinfo.h" - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputRangeInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeInfo* CPeninputRangeInfo::NewL( - TResourceReader& aReader ) - { - CPeninputRangeInfo* self = NewLC( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputRangeInfo::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeInfo* CPeninputRangeInfo::NewLC( - TResourceReader& aReader ) - { - CPeninputRangeInfo* self = new ( ELeave ) CPeninputRangeInfo(); - - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputRangeInfo::~CPeninputRangeInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeInfo::~CPeninputRangeInfo() - { - } - -// ------------------------------------------------------------------------ -// CPeninputRangeInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputRangeInfo::ConstructL( TResourceReader& aReader ) - { - ConstructFromResourceL( aReader ); - } - -// ------------------------------------------------------------------------ -// CPeninputRangeInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputRangeInfo::ConstructFromResourceL( TResourceReader& aReader ) - { - User::LeaveIfError( iRangeId = aReader.ReadInt16() ); - - TInt responseStyle = aReader.ReadInt16(); - - switch ( responseStyle ) - { - case 0: - { - iResponseStyle = EPeninputRangeResponseNoAction; - } - break; - case 1: - { - iResponseStyle = EPeninputRangeResponseSwitchRange; - } - break; - case 2: - { - iResponseStyle = EPeninputRangeResponsePopupChoiceItem; - } - break; - default: - { - iResponseStyle = EPeninputRangeResponseNoAction; - } - break; - } - - iClientLayoutId = aReader.ReadInt16(); - iVkbLayoutId = aReader.ReadInt16(); - - } - -// ------------------------------------------------------------------------ -// CPeninputRangeBarInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeBarInfo* CPeninputRangeBarInfo::NewL( - TResourceReader& aReader ) - { - CPeninputRangeBarInfo* self = NewLC( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputRangeBarInfo::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeBarInfo* CPeninputRangeBarInfo::NewLC( - TResourceReader& aReader ) - { - CPeninputRangeBarInfo* self = new ( ELeave ) CPeninputRangeBarInfo(); - - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputRangeBarInfo::~CPeninputRangeBarInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeBarInfo::~CPeninputRangeBarInfo() - { - iRanges.ResetAndDestroy(); - iRanges.Close(); - } - -// ------------------------------------------------------------------------ -// CPeninputRangeBarInfo::FindRange -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputRangeInfo* CPeninputRangeBarInfo::FindRange( TInt aRangeId ) - { - const TInt count = iRanges.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iRanges[i]->RangeId() == aRangeId ) - { - return iRanges[i]; - } - } - - return NULL; - } - -// ------------------------------------------------------------------------ -// CPeninputRangeBarInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputRangeBarInfo::ConstructL( TResourceReader& aReader ) - { - ConstructFromResourceL( aReader ); - } - -// ------------------------------------------------------------------------ -// CPeninputRangeBarInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputRangeBarInfo::ConstructFromResourceL( - TResourceReader& aReader ) - { - iRangeStyle = aReader.ReadInt16(); - - TInt count = aReader.ReadInt16(); - for ( TInt i = 0; i < count; i++ ) - { - CPeninputRangeInfo* rangeInfo = CPeninputRangeInfo::NewL( aReader ); - iRanges.Append( rangeInfo ); - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputshiftcapsInfo.cpp --- a/textinput/peninputcommonlayout/src/peninputshiftcapsInfo.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: shift&caps info implementation -* -*/ - - -// User includes -#include "peninputshiftcapsInfo.h" - - -// ======== MEMBER FUNCTIONS ======== - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::NewL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputShiftCapsInfo* CPeninputShiftCapsInfo::NewL( - TResourceReader& aReader ) - { - CPeninputShiftCapsInfo* self = NewLC( aReader ); - CleanupStack::Pop( self ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::NewLC -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputShiftCapsInfo* CPeninputShiftCapsInfo::NewLC( - TResourceReader& aReader ) - { - CPeninputShiftCapsInfo* self = new ( ELeave ) CPeninputShiftCapsInfo(); - - CleanupStack::PushL( self ); - self->ConstructL( aReader ); - - return self; - } - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::~CPeninputShiftCapsInfo -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputShiftCapsInfo::~CPeninputShiftCapsInfo() - { - iShiftCapsSingleList.ResetAndDestroy(); - iShiftCapsSingleList.Close(); - } - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::FindShiftCapsSingleById -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputShiftCapsInfo::TPeninputShiftCapsSingle* - CPeninputShiftCapsInfo::FindShiftCapsSingleById( TInt aId ) - { - const TInt count = iShiftCapsSingleList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iShiftCapsSingleList[i]->iId == aId ) - { - return iShiftCapsSingleList[i]; - } - } - - return NULL; - } - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::FindShiftCapsSingleByCase -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -EXPORT_C CPeninputShiftCapsInfo::TPeninputShiftCapsSingle* - CPeninputShiftCapsInfo::FindShiftCapsSingleByCase( TInt aCase ) - { - const TInt count = iShiftCapsSingleList.Count(); - - for ( TInt i = 0; i < count; i++ ) - { - if ( iShiftCapsSingleList[i]->iCaseUsed == aCase ) - { - return iShiftCapsSingleList[i]; - } - } - - return NULL; - } - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::ConstructL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputShiftCapsInfo::ConstructL( TResourceReader& aReader ) - { - ConstructFromResourceL( aReader ); - } - -// ------------------------------------------------------------------------ -// CPeninputShiftCapsInfo::ConstructFromResourceL -// (other items were commented in a header) -// ------------------------------------------------------------------------ -// -void CPeninputShiftCapsInfo::ConstructFromResourceL( - TResourceReader& aReader ) - { - iRangeId = aReader.ReadInt16(); - - const TInt count = aReader.ReadInt16(); - for ( TInt i = 0; i < count; i++ ) - { - TPeninputShiftCapsSingle* shiftCapsSingle = - new ( ELeave ) TPeninputShiftCapsSingle(); - - shiftCapsSingle->iId = aReader.ReadInt16(); - shiftCapsSingle->iVkbLayoutId = aReader.ReadInt16(); - shiftCapsSingle->iCaseUsed = aReader.ReadInt16(); - - iShiftCapsSingleList.Append( shiftCapsSingle ); - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputuistatebase.cpp --- a/textinput/peninputcommonlayout/src/peninputuistatebase.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the ui state base -* -*/ - - -// User includes -#include -#include // Define EPluginInputModeHwr -#include -#include "peninputuistatebase.h" -#include "peninputlayoutcontext.h" -#include "peninputcmd.h" -#include "peninputcommonlayoutglobalenum.h" - -const TInt KMaxKeyLength = 10; - -// ======== MEMBER FUNCTIONS ======== - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::CPeninputUiStateBase -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateBase::CPeninputUiStateBase( - MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext ) - : iUiStateMgr( aUiStateMgr ), iContext( aContext ) - { - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::NewL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateBase* CPeninputUiStateBase::NewL( - MPeninputUiStateMgr* aUiStateMgr, MPeninputLayoutContext* aContext ) - { - CPeninputUiStateBase* self = new ( ELeave ) - CPeninputUiStateBase( aUiStateMgr, aContext ); - CleanupStack::PushL( self ); - self->Construct(); - CleanupStack::Pop( self ); - - return self; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::ConstructL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputUiStateBase::Construct() - { - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::~CPeninputUiStateBase -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateBase::~CPeninputUiStateBase() - { - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::HandleKeyEventL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputUiStateBase::HandleKeyEventL( - const TRawEvent& /*aData*/ ) - { - return EFalse; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::HandleControlEvent -// (other items were commented in a header). -// -------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputUiStateBase::HandleControlEvent( TInt /*aEventType*/, - const TDesC& /*aEventData*/ ) - { - return EFalse; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateBase::SendKey -// (other items were commented in a header). -// -------------------------------------------------------------------------- -// -EXPORT_C TBool CPeninputUiStateBase::SendKey( const TDesC& aEventData ) - { - TInt len = aEventData.Length(); - - if ( iContext->LayoutType() == EPluginInputModeHwr ) - { - iContext->Sendkey(ESignalKeyEvent,aEventData); - } - else - { - if ( len == 1) - { - // If it is enter, tab, space, back key etc. - TPtrC ptr = aEventData.Left(1); - iContext->Sendkey(ESignalKeyEvent,ptr); - } - else if ( len > 1) - { - // If it is virtual key - TVirtualKeyEventData* data = (TVirtualKeyEventData* ) aEventData.Ptr(); - - TInt lang = CPeninputDataConverter::AnyToInt - ( iContext->RequestData( EPeninputDataTypeInputLanguage ) ); - - TBuf trueKeySeries; - - if ( lang == ELangArabic ) - { - TInt len = data->iKeyData.Length(); - for ( TInt i=0;i < len; i++ ) - { - trueKeySeries.Append(data->iKeyData[len-i-1]); - } - } - else - { - trueKeySeries.Append( data->iKeyData ); - } - - iContext->Sendkey( ESignalKeyEvent, trueKeySeries ); - } - } - - return ETrue; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputcommonlayout/src/peninputuistatemgr.cpp --- a/textinput/peninputcommonlayout/src/peninputuistatemgr.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the ui state machine manager -* -*/ - - -// User includes -#include "peninputuistatemgr.h" -#include "peninputlayoutcontext.h" -#include "peninputuistatebase.h" - - -// ======== MEMBER FUNCTIONS ======== - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::CPeninputUiStateMgr -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -CPeninputUiStateMgr::CPeninputUiStateMgr( MPeninputLayoutContext* aContext ) - : iContext( aContext ) - { - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::NewL -// (other items were commented in a header). -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateMgr* CPeninputUiStateMgr::NewL( - MPeninputLayoutContext* aContext ) - { - CPeninputUiStateMgr* self = NewLC( aContext ); - CleanupStack::Pop( self ); - - return self; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::NewLC -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateMgr* CPeninputUiStateMgr::NewLC( - MPeninputLayoutContext* aContext ) - { - CPeninputUiStateMgr* self = - new ( ELeave ) CPeninputUiStateMgr( aContext ); - CleanupStack::PushL( self ); - self->Construct(); - - return self; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::~CPeninputUiStateMgr -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateMgr::~CPeninputUiStateMgr() - { - iUiStateTypeList.Reset(); - iUiStateTypeList.Close(); - - iUiStateList.ResetAndDestroy(); - iUiStateList.Close(); - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::CurrentUiState -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C CPeninputUiStateBase* CPeninputUiStateMgr::CurrentUiState() - { - return iCurrentState; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::GetUiState -// (other items were commented in a header). -// -------------------------------------------------------------------------- -EXPORT_C CPeninputUiStateBase* CPeninputUiStateMgr::GetUiState( - TInt aUiStateType ) - { - CPeninputUiStateBase* uiState = NULL; - - for ( TInt i = 0; i < iUiStateTypeList.Count(); i++ ) - { - if ( iUiStateTypeList[i] == aUiStateType ) - { - uiState = iUiStateList[i]; - break; - } - } - - return uiState; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::SetCurrentUiState -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputUiStateMgr::SetCurrentUiState( - CPeninputUiStateBase* aUiState ) - { - iCurrentState = aUiState; - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::SetCurrentUiState -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputUiStateMgr::SetCurrentUiState( TInt aUiStateType ) - { - iCurrentState = GetUiState( aUiStateType ); - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::AddUiState -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -EXPORT_C void CPeninputUiStateMgr::AddUiState( CPeninputUiStateBase* aUiState, - TInt aUiStateType ) - { - iUiStateTypeList.Append( aUiStateType ); - iUiStateList.Append( aUiState ); - } - -// -------------------------------------------------------------------------- -// CPeninputUiStateMgr::ConstructL -// (other items were commented in a header) -// -------------------------------------------------------------------------- -// -void CPeninputUiStateMgr::Construct() - { - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/data/TrainUiPreset.dat Binary file textinput/peninputhwrtrui/data/TrainUiPreset.dat has changed diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/data/trui.rss --- a/textinput/peninputhwrtrui/data/trui.rss Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2624 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource definitions for project TrainingUI -* -*/ - -NAME HELL - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "trui.hrh" -#include "trui.rh" - -#define TRUI_SHORTCUTEDITOR_TEXT_MAXLENGTH 160 - -// d:Radio button's text in shortcut edit model view -// l:(none) -// r:5.0 -// -#define qtn_hwrt_radio_button_own_symbol "Own symbol" - -// d:Tooltip text for grid buttont on edit symbol view -// l:list_single_graphic_pane -// r:5.0 -// -#define qtn_hwrt_tooltip_select_symbol "Select symbol" - -// d:Radio button's text in shortcut edit model view -// l:(none) -// r:5.0 -// -#define qtn_hwrt_radio_button_preset_symbol "Preset symbol" - -// d:Tooltip text for preset symbols in shortcut edit model view -// l:none -// r:5.0 -// -#define qtn_hwrt_text_purpose_selected_symbol "You can select a symbol for the shortcut text and use it later to call the text." - -// d:Query note for all preset models are in use -// l:popup_note_window -// r:5.0 -// -#define qtn_hwrt_all_symbols_in_use_notification "All preset symbols are in use." - -// d:Displayed in SCT dialog. -// d:Text in sct dialog as the title -// l:(none) -// r:5.0 -// -#define qtn_sct_dialog_title "Select a character:" - -// d:Short application name in application shell. -// l:(none) -// r:5.0 -// -#define qtn_trui_short_caption "trui" - -// d:Item in choicelist when language script is western. -// d:Perform the function of changing character range to western lower -// l:(none) -// r:5.0 -// -#define qtn_hwrt_char_range_lower "ab" - -// d:Item in choicelist when language script is western. -// d:Perform the function of changing character range to western captial -// l:(none) -// r:5.0 -// -#define qtn_hwrt_char_range_capital "AB" - -// d:Item in choicelist under all scripts. -// d:Perform the function of changing character range to digits -// l:(none) -// r:5.0 -// -#define qtn_hwrt_char_range_digits "12" - -// d:Item in choicelist under all scripts. -// d:Perform the function of changing character range to symbols -// l:(none) -// r:5.0 -// -#define qtn_hwrt_char_range_symbols "*#" - -// d:Item in choicelist when language script is cyrillic. -// d:Perform the function of changing character range to cyrillic lower -// l:(none) -// r:5.0 -// -#define qtn_hwrt_cyrillic_lower_range <0x0430><0x0431> - -// d:Item in choicelist when language script is cyrillic. -// d:Perform the function of changing character range to cyrillic capital -// l:(none) -// r:5.0 -// -#define qtn_hwrt_cyrillic_capital_range <0x0410><0x0411> - -// d:Item in choicelist when language script is greek. -// d:Perform the function of changing character range to greek lower -// l:(none) -// r:5.0 -// -#define qtn_hwrt_greek_lower_range <0x03B1><0x03C9> - -// d:Item in choicelist when language script is greek. -// d:Perform the function of changing character range to greek captial -// l:(none) -// r:5.0 -// -#define qtn_hwrt_greek_capital_range <0x0391><0x03A9> - -// d:Item in choicelist when language script is hebrew. -// d:Perform the function of changing character range to hebrew letters -// l:(none) -// r:5.0 -// -#define qtn_hwrt_hebrew_letters <0x05D0><0x05D1> - -// d:Command in options list of sub menu of character range under western script. -// d:Perform the function of changing character range to western lower. -// l:(none) -// r:5.0 -// -#define qtn_hwrt_submenu_latin_lower "ab" - -// d:Command in options list of sub menu of character range under western script. -// d:Perform the function of changing character range to western capital -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_latin_capital "AB" - -// d:Command in options list of sub menu of character range under western script. -// d:Perform the function of changing character range to western accent -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_char_range_latin_accent <0x00E0><0x017E> - -// d:Command in options list of sub menu of character range under all scripts. -// d:Perform the function of changing character range to digits -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_digits "12" - -// d:Command in options list of sub menu of character range under all scripts. -// d:Perform the function of changing character range to symbols -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_symbols "*#" - -// d:Command in options list of sub menu of character range under cyrillic script. -// d:Perform the function of changing character range to cyrillic lower -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_cyrillic_lower <0x0430><0x0431> - -// d:Command in options list of sub menu of character range under cyrillic script. -// d:Perform the function of changing character range to cyrillic capital -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_cyrillic_capital <0x0410><0x0411> - -// d:Command in options list of sub menu of character range under cyrillic script. -// d:Perform the function of changing character range to cyrillic accent -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_char_range_cyrillic_accent <0x044A><0x0451> - -// d:Command in options list of sub menu of character range under greek script. -// d:Perform the function of changing character range to greek lower -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_greek_lower <0x03B1><0x03C9> - -// d:Command in options list of sub menu of character range under greek script. -// d:Perform the function of changing character range to greek capital. -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_greek_capital <0x0391><0x03A9> - -// d:Command in options list of sub menu of character range under hebrew script. -// d:Perform the function of changing character range to hebrew letters. -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_hebrew_letters <0x05D0><0x05D1> - -// Latin character set -// d:Displayed in SCT, used during developping temporarily. -// d:Latin lower letters -// l:(none) -// r:5.0 -// -#define qtn_sct_latin_lowerletters <0x0061><0x0062><0x0063><0x0064><0x0065>\ - <0x0066><0x0067><0x0068><0x0069><0x006A>\ - <0x006B><0x006C><0x006D><0x006E><0x006F>\ - <0x0070><0x0071><0x0072><0x0073><0x0074>\ - <0x0075><0x0076><0x0077><0x0078><0x0079>\ - <0x007A> - -// d:Displayed in SCT, used during developping temporarily. -// d:Latin upper letters -// l:(none) -// r:5.0 -// -#define qtn_sct_latin_upperletters <0x0041><0x0042><0x0043><0x0044><0x0045>\ - <0x0046><0x0047><0x0048><0x0049><0x004A>\ - <0x004B><0x004C><0x004D><0x004E><0x004F>\ - <0x0050><0x0051><0x0052><0x0053><0x0054>\ - <0x0055><0x0056><0x0057><0x0058><0x0059>\ - <0x005A> - -// d:Displayed in SCT, used during developping temporarily. -// d:Latin digital letters -// l:(none) -// r:5.0 -// -#define qtn_sct_latin_digital <0x0031><0x0032><0x0033><0x0034><0x0035>\ - <0x0036><0x0037><0x0038><0x0039><0x0030> - -// d:Displayed in SCT, used during developping temporarily. -// d:Latin symbol letters -// l:(none) -// r:5.0 -// -#define qtn_sct_latin_symbol <0x002E><0x002C><0x0027><0x003F>\ - <0x0021><0x0022><0x002D><0x0028>\ - <0x0029><0x0040><0x002F><0x003A>\ - <0x005F><0x003B><0x002B><0x0026>\ - <0x0025><0x002A><0x003D><0x00A3>\ - <0x20AC><0x0024><0x00A5><0x00A4>\ - <0x003C><0x003E><0x005C><0x007E>\ - <0x005E><0x00A1><0x00BF><0x0023>\ - <0x007C><0x0060><0x201E><0x00B1>\ - <0x2030><0x00A2><0x20AA><0x0E3F>\ - <0x20AB> - -// d:Displayed in SCT, used during developping temporarily. -// d:Chinese Latin symbol letters -// l:(none) -// r:5.0 -// -#define qtn_sct_latin_symbol_chinese <0x002E><0x002C><0x0027><0x003F>\ - <0x0021><0x0022><0x002D><0x0028>\ - <0x0029><0x0040><0x002F><0x003A>\ - <0x005F><0x003B><0x002B><0x0026>\ - <0x0025><0x002A><0x003D><0x00A3>\ - <0x20AC><0x0024><0x00A5><0x00A4>\ - <0x003C><0x003E><0x005C><0x007E>\ - <0x005E><0x00A1><0x00BF><0x0023>\ - <0x007C><0x0060><0x201E><0x00B1>\ - <0x2030><0x00A2> - -// d:Displayed in SCT, used during developping temporarily. -// d:Latin accent letters -// l:(none) -// r:5.0 -// -#define qtn_sct_latin_accent <0x00C0><0x00C1><0x00C2><0x00C3><0x00C4><0x00C5><0x00C6>\ - <0x00C7><0x00C8><0x00C9><0x00CA><0x00CB><0x00CC><0x00CD>\ - <0x00CE><0x00CF><0x00D0><0x00D1><0x00D2><0x00D3><0x00D4>\ - <0x00D5><0x00D6><0x00D8><0x00D9><0x00DA><0x00DB><0x00DC>\ - <0x00DD><0x00DE><0x00DF><0x00E0><0x00E1><0x00E2><0x00E3>\ - <0x00E4><0x00E5><0x00E6><0x00E7><0x00E8><0x00E9><0x00EA>\ - <0x00EB><0x00EC><0x00ED><0x00EE><0x00EF><0x00F0><0x00F1>\ - <0x00F2><0x00F3><0x00F4><0x00F5><0x00F6><0x00F8><0x00F9>\ - <0x00FA><0x00FB><0x00FC><0x00FD><0x00FE><0x00FF><0x0100>\ - <0x0101><0x0102><0x0103><0x0104><0x0105><0x0106><0x0107>\ - <0x0108><0x0109><0x010A><0x010B><0x010C><0x010D><0x010E>\ - <0x010F><0x0110><0x0111><0x0112><0x0113><0x0114><0x0115>\ - <0x0116><0x0117><0x0118><0x0119><0x011A><0x011B><0x011C>\ - <0x011D><0x011E><0x011F><0x0120><0x0121><0x0122><0x0123>\ - <0x0124><0x0125><0x0126><0x0127><0x012A><0x012B><0x012C>\ - <0x012D><0x012E><0x012F><0x0130><0x0131><0x0134><0x0135>\ - <0x0136><0x0137><0x0139><0x013A><0x013B><0x013C><0x013D>\ - <0x013E><0x013F><0x0140><0x0141><0x0142><0x0143><0x0144>\ - <0x0145><0x0146><0x0147><0x0148><0x014A><0x014B><0x014C>\ - <0x014D><0x014E><0x014F><0x0150><0x0151><0x0152><0x0153>\ - <0x0154><0x0155><0x0156><0x0157><0x0158><0x0159><0x015A>\ - <0x015B><0x015C><0x015D><0x015E><0x015F><0x0160><0x0161>\ - <0x0162><0x0163><0x0164><0x0165><0x0166><0x0167><0x016A>\ - <0x016B><0x016C><0x016D><0x016E><0x016F><0x0170><0x0171>\ - <0x0172><0x0173><0x0174><0x0175><0x0176><0x0177><0x0178>\ - <0x0179><0x017A><0x017B><0x017C><0x017D><0x017E><0x018F>\ - <0x01B7><0x01E4><0x01E5><0x01E6><0x01E7><0x01E8><0x01E9>\ - <0x01EE><0x01EF><0x021E><0x021F><0x0259><0x0292> - -// Cyrillic character set -// d:Displayed in SCT, used during developping temporarily. -// d:Cyrillic lower letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_lowerletters <0x0430><0x0431><0x0432><0x0433>\ - <0x0491><0x0434><0x0452><0x0435>\ - <0x0451><0x0454><0x0436><0x0437>\ - <0x0438><0x0439><0x0456><0x0457>\ - <0x0458><0x043A><0x043B><0x0459>\ - <0x043C><0x043D><0x045A><0x043E>\ - <0x043F><0x0440><0x0441><0x0442>\ - <0x045B><0x0443><0x0444><0x0445>\ - <0x0446><0x0447><0x0448><0x0449>\ - <0x044A><0x044B><0x044C><0x044D>\ - <0x044E><0x044F> - -// d:Displayed in SCT, used during developping temporarily. -// d:Cyrillic upper letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_upperletters <0x0410><0x0411><0x0412><0x0413>\ - <0x0490><0x0414><0x0402><0x0415>\ - <0x0401><0x0404><0x0416><0x0417>\ - <0x0418><0x0419><0x0406><0x0407>\ - <0x0408><0x041A><0x041B><0x0409>\ - <0x041C><0x041D><0x040A><0x041E>\ - <0x041F><0x0420><0x0421><0x0422>\ - <0x0423><0x0424><0x0425><0x0426>\ - <0x0427><0x0428><0x0429><0x042A>\ - <0x042B><0x042C><0x042D><0x042E>\ - <0x042F> - -// d:Displayed in SCT, used during developping temporarily. -// d:Cyrillic accent letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_accent <0x0453><0x0403><0x0491><0x0490>\ - <0x0493><0x0492><0x0452><0x0402>\ - <0x0455><0x0405><0x0450><0x0400>\ - <0x0451><0x0401><0x0454><0x0404>\ - <0x04D9><0x04D8><0x04C2><0x04C1>\ - <0x0456><0x0406><0x0457><0x0407>\ - <0x045D><0x040D><0x0458><0x0408>\ - <0x045C><0x040C><0x049B><0x049A>\ - <0x049D><0x049C><0x0459><0x0409>\ - <0x045A><0x040A><0x04A3><0x04A2>\ - <0x04E9><0x04E8><0x045E><0x040E>\ - <0x04AF><0x04AE><0x04B1><0x04B0>\ - <0x04B3><0x04B2><0x045F><0x040F>\ - <0x045B><0x040B><0x04B9><0x04B8>\ - <0x04BB><0x04BA> - -// d:Displayed in SCT, used during developping temporarily. -// d:Greek lower letters -// l:(none) -// r:5.0 -// -#define qtn_sct_greek_lowerletters <0x03B1><0x03AC><0x03B2><0x03B3>\ - <0x03B4><0x03B5><0x03AD><0x03B6>\ - <0x03B7><0x03AE><0x03B8><0x03B9>\ - <0x03AF><0x03CA><0x0390><0x03BA>\ - <0x03BB><0x03BC><0x03BD><0x03BE>\ - <0x03BF><0x03CC><0x03C0><0x03C1>\ - <0x03C3><0x03C2><0x03C4><0x03C5>\ - <0x03CD><0x03CB><0x03B0><0x03C6>\ - <0x03C7><0x03C8><0x03C9><0x03CE> - - -// d:Displayed in SCT, used during developping temporarily. -// d:Greek upper letters -// l:(none) -// r:5.0 -// -#define qtn_sct_greek_upperletters <0x0391><0x0386><0x0392><0x0393>\ - <0x0394><0x0395><0x0388><0x0396>\ - <0x0397><0x0389><0x0398><0x0399>\ - <0x038A><0x03AA><0x039A><0x039B>\ - <0x039C><0x039D><0x039E><0x039F>\ - <0x038C><0x03A0><0x03A1><0x03A3>\ - <0x03A4><0x03A5><0x038E><0x03AB>\ - <0x03A6><0x03A7><0x03A8><0x03A9>\ - <0x038F> - -// Hebrew character set -// d:Displayed in SCT, used during developping temporarily. -// d:Hebrew lower letters -// l:(none) -// r:5.0 -// -#define qtn_sct_hebrew_letters <0x05D0><0x05D1><0x05D2><0x05D3>\ - <0x05D4><0x05D5><0x05D6><0x05D7>\ - <0x05D8><0x05D9><0x05DB><0x05DA>\ - <0x05DC><0x05DE><0x05DD><0x05E0>\ - <0x05DF><0x05E1><0x05E2><0x05E4>\ - <0x05E3><0x05E6><0x05E5><0x05E7>\ - <0x05E8><0x05E9><0x05EA> - -// Cyrillic character set -// d:Displayed in SCT, used during developping temporarily. -// d:Bulgarian lower letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_lowerletters_bulgarian <0x0430><0x0431><0x0432><0x0433>\ - <0x0434><0x0435><0x0436><0x0437>\ - <0x0438><0x0439><0x043A><0x043B>\ - <0x043C><0x043D><0x043E><0x043F>\ - <0x0440><0x0441><0x0442><0x0443>\ - <0x0444><0x0445><0x0446><0x0447>\ - <0x0448><0x0449><0x044A><0x044C>\ - <0x044E><0x044F> - -// Cyrillic character set -// d:Displayed in SCT, used during developping temporarily. -// d:Russian lowers letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_lowerletters_russian <0x0430><0x0431><0x0432><0x0433>\ - <0x0434><0x0435><0x0451><0x0436>\ - <0x0437><0x0438><0x0439><0x043A>\ - <0x043B><0x043C><0x043D><0x043E>\ - <0x043F><0x0440><0x0441><0x0442>\ - <0x0443><0x0444><0x0445><0x0446>\ - <0x0447><0x0448><0x0449><0x044A>\ - <0x044B><0x044C><0x044D><0x044E>\ - <0x044F> -// Cyrillic character set -// d:Displayed in SCT, used during developping temporarily. -// d:Ukraine lowers letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_lowerletters_ukraine <0x0430><0x0431><0x0432><0x0433>\ - <0x0491><0x0434><0x0435><0x0454>\ - <0x0436><0x0437><0x0438><0x0439>\ - <0x0456><0x0457><0x043A><0x043B>\ - <0x043C><0x043D><0x043E><0x043F>\ - <0x0440><0x0441><0x0442><0x0443>\ - <0x0444><0x0445><0x0446><0x0447>\ - <0x0448><0x0449><0x044C><0x044E>\ - <0x044F> - -// d:Displayed in SCT, used during developping temporarily. -// d:Bulgarian upper letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_upperletters_bulgarian <0x0410><0x0411><0x0412><0x0413>\ - <0x0414><0x0415><0x0416><0x0417>\ - <0x0418><0x0419><0x041A><0x041B>\ - <0x041C><0x041D><0x041E><0x041F>\ - <0x0420><0x0421><0x0422><0x0423>\ - <0x0424><0x0425><0x0426><0x0427>\ - <0x0428><0x0429><0x042A><0x042C>\ - <0x042E><0x042F> - -// d:Displayed in SCT, used during developping temporarily. -// d:Russian upper letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_upperletters_russian <0x0410><0x0411><0x0412><0x0413>\ - <0x0414><0x0415><0x0401><0x0416>\ - <0x0417><0x0418><0x0419><0x041A>\ - <0x041B><0x041C><0x041D><0x041E>\ - <0x041F><0x0420><0x0421><0x0422>\ - <0x0423><0x0424><0x0425><0x0426>\ - <0x0427><0x0428><0x0429><0x042A>\ - <0x042B><0x042C><0x042D><0x042E>\ - <0x042F> - -// d:Displayed in SCT, used during developping temporarily. -// d:Ukraine upper letters -// l:(none) -// r:5.0 -// -#define qtn_sct_cyrillic_upperletters_ukraine <0x0410><0x0411><0x0412><0x0413>\ - <0x0490><0x0414><0x0415><0x0404>\ - <0x0416><0x0417><0x0418><0x0419>\ - <0x0406><0x0407><0x041A><0x041B>\ - <0x041C><0x041D><0x041E><0x041F>\ - <0x0420><0x0421><0x0422><0x0423>\ - <0x0424><0x0425><0x0426><0x0427>\ - <0x0428><0x0429><0x042C><0x042E>\ - <0x042F> - -// Preset symbols character set -// d:Preset symbols text -// l:none -// r:5.0 -// -#define qtn_hwrt_preset_characters <0x2600><0x2601><0x2610><0x2630><0x2690><0x26A1><0x2642>\ - <0x2640><0x2661><0x2662><0x2664><0x2667><0x263E><0x2606>\ - <0x266C><0x26AF><0x2668><0x2698><0x2687><0x2695> - -// d:Fullname of MBG files saving App info. -// l:(none) -// r:5.0 -// -#define qtn_trui_appinfo_icons_filename "trui_aif.mif" - -// d:Fullname of MBG files. -// l:(none) -// r:5.0 -// -#define qtn_trui_icons_filename "trui_icons.mif" - -// d:Indicator's text in main view. -// d:Information of which character being trained. -// d:%S stands for the currently trained character -// l:(none) -// r:5.0 -// -#define qtn_hwrt_active_char_indicator "%S" - -// d:Default in SCT must be set when initializing a SCT dialog -// d:It is not used for display, but only for initializing a SCT dialog successfully. -// l:(none) -// r:5.0 -// -#define qtn_hwr_sct_initial_text " " - -// d:Tooltip of character model failing to be saved. -// l:popup_note_window -// r:5.0 -// -#define qtn_hwrt_note_save_failed "Save failed" - -// d:Full application name in application shell. -// l:(none) -// r:5.0 -// -#define qtn_trui_full_caption "TrainingUI" - -// --------------------------------------------------------------------------- -// -// Define the resource file signature -// This resource should be empty. -// -// --------------------------------------------------------------------------- -// -RESOURCE RSS_SIGNATURE { } - -// --------------------------------------------------------------------------- -// -// Default Document Name -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_default_document_name { buf=""; } - -// --------------------------------------------------------------------------- -// -// Define default menu and CBA key. -// -// --------------------------------------------------------------------------- -// -RESOURCE EIK_APP_INFO - { - menubar = r_trui_mainview_menubar; - } - -RESOURCE EIK_APP_INFO_EXT r_trui_toolbar_info_extension - { - popup_toolbar = r_trui_fixed_toolbar; - } - -// --------------------------------------------------------------------------- -// r_trui_mainview -// Define main view -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_VIEW r_trui_mainview - { - menubar = r_trui_mainview_menubar; - cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT; - toolbar = r_trui_mainview_toolbar; - } - -// --------------------------------------------------------------------------- -// -// r_trui_fixed_toolbar -// fixed toolbar -// -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_TOOLBAR r_trui_fixed_toolbar - { - flags = KAknToolbarWithoutCba | KAknToolbarTransparent | KAknToolbarFixed; - } - -// --------------------------------------------------------------------------- -// -// r_trui_mainview_toolbar_buttons -// fixed toolbar button groups -// -// --------------------------------------------------------------------------- -// -RESOURCE TOOLBAR_BUTTON_GROUPS r_trui_mainview_toolbar_buttons - { - buttons = - { - TBAR_CTRL - { - type = EAknCtButton; - id = EMainViewButtonIdGrid; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_select_character; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_char_grid; - bmpmask = EMbmTrui_iconsQgn_indi_tb_char_grid_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiTbCharGrid; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EMainViewButtonIdPreview; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_preview_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_model_preview; - bmpmask = EMbmTrui_iconsQgn_indi_tb_model_preview_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiTbModelPreview; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EMainViewButtonIdDelete; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_delete_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_remove; - bmpmask = EMbmTrui_iconsQgn_indi_tb_remove_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiTbRemove; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_mainview_menubar -// Menu title definition in main view -// --------------------------------------------------------------------------- -// -RESOURCE MENU_BAR r_trui_mainview_menubar - { - titles = - { - MENU_TITLE - { - menu_pane = r_trui_mainview_menupane; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_mainview_menupane -// Menu for "Options" in main view -// --------------------------------------------------------------------------- -// -RESOURCE MENU_PANE r_trui_mainview_menupane - { - items = - { - MENU_ITEM - { - command = EMainViewDeleteModel; - cascade = r_trui_mainview_menu_delete_cascade; - txt = qtn_hwrt_om_delete_model; - }, - MENU_ITEM - { - command = EMainViewPreviewModel; - txt = qtn_hwrt_om_preview_model; - }, - MENU_ITEM - { - command = EMainViewCharRange; - cascade = r_trui_mainview_menu_charrange_cascade; - txt = qtn_hwrt_om_character_range; - }, - MENU_ITEM - { - command = EMainViewCharGrid; - txt = qtn_hwrt_om_character_grid; - }, - MENU_ITEM - { - command = EMainViewLanguageScript; - cascade = r_trui_mainview_menu_languagescript_cascade; - txt = qtn_hwrt_om_select_language; - }, - MENU_ITEM - { - command = EMainViewToShortcutsView; - txt = qtn_hwrt_om_shortcuts; - }, - MENU_ITEM - { - command = EMainViewHelp; - txt = qtn_options_help; - }, - MENU_ITEM - { - command = EAknSoftkeyExit; - txt = qtn_options_exit; - } - }; - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_menu_delete_cascade -// Sub menu-pane of "Language script" menu -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_PANE r_trui_mainview_menu_delete_cascade - { - items= - { - MENU_ITEM - { - command = EMainViewDeleteCurrentModel; - txt = qtn_hwrt_submenu_delete_current_model; - }, - MENU_ITEM - { - command = EMainViewDeleteAllModel; - txt = qtn_hwrt_submenu_delete_all_models; - } - }; - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_menu_languagescript_cascade -// Sub menu-pane of "Language script" menu -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_PANE r_trui_mainview_menu_languagescript_cascade - { - items= - { - MENU_ITEM - { - command = EMainViewSubmenuWestern; - txt = qtn_hwrt_submenu_western; - flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn; - }, - MENU_ITEM - { - command = EMainViewSubmenuCyrillic; - txt = qtn_hwrt_submenu_cyrillic; - }, - MENU_ITEM - { - command = EMainViewSubmenuGreek; - txt = qtn_hwrt_submenu_greek; - }, - MENU_ITEM - { - command = EMainViewSubmenuHebrew; - txt = qtn_hwrt_submenu_hebrew; - flags = EEikMenuItemRadioEnd; - } - }; - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_menu_charrange_cascade -// Sub menu-pane of "Character Range" menu -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_PANE r_trui_mainview_menu_charrange_cascade - { - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_submenu_charrange_latin -// Sub menu items of "Character Range" under Latin -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_ITEMS r_trui_mainview_submenu_charrange_latin - { - items= - { - MENU_ITEM - { - command = EMainViewSubmenuLatinLowerLetter; - txt = qtn_hwrt_submenu_latin_lower; - flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn; - }, - MENU_ITEM - { - command = EMainViewSubmenuLatinUpperLetter; - txt = qtn_hwrt_submenu_latin_capital; - }, - MENU_ITEM - { - command = EMainViewSubmenuLatinAccent; - txt = qtn_hwrt_char_range_latin_accent; - }, - MENU_ITEM - { - command = EMainViewSubmenuDigital; - txt = qtn_hwrt_submenu_digits; - }, - MENU_ITEM - { - command = EMainViewSubmenuSymbols; - txt = qtn_hwrt_submenu_symbols; - flags = EEikMenuItemRadioEnd; - } - }; - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_submenu_charrange_cyrillic -// Sub menu items of "Character Range" under Cyrillic -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_ITEMS r_trui_mainview_submenu_charrange_cyrillic - { - items= - { - MENU_ITEM - { - command = EMainViewSubmenuCyrillicLowerLetters; - txt = qtn_hwrt_submenu_cyrillic_lower; - flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn; - }, - MENU_ITEM - { - command = EMainViewSubmenuCyrillicUpperLetters; - txt = qtn_hwrt_submenu_cyrillic_capital; - }, - MENU_ITEM - { - command = EMainViewSubmenuCyrillicAccent; - txt = qtn_hwrt_char_range_cyrillic_accent; - }, - MENU_ITEM - { - command = EMainViewSubmenuDigital; - txt = qtn_hwrt_submenu_digits; - }, - MENU_ITEM - { - command = EMainViewSubmenuSymbols; - txt = qtn_hwrt_submenu_symbols; - flags = EEikMenuItemRadioEnd; - } - }; - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_submenu_charrange_greek -// Sub menu items of "Character Range" under Greek -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_ITEMS r_trui_mainview_submenu_charrange_greek - { - items= - { - MENU_ITEM - { - command = EMainViewSubmenuGreekLowerLetters; - txt = qtn_hwrt_submenu_greek_lower; - flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn; - }, - MENU_ITEM - { - command = EMainViewSubmenuGreekUpperLetters; - txt = qtn_hwrt_submenu_greek_capital; - }, - MENU_ITEM - { - command = EMainViewSubmenuDigital; - txt = qtn_hwrt_submenu_digits; - }, - MENU_ITEM - { - command = EMainViewSubmenuSymbols; - txt = qtn_hwrt_submenu_symbols; - flags = EEikMenuItemRadioEnd; - } - }; - } - -//----------------------------------------------------------------------------- -// -// r_trui_mainview_submenu_charrange_hebrew -// Sub menu items of "Character Range" under Hebrew -// -//----------------------------------------------------------------------------- -// -RESOURCE MENU_ITEMS r_trui_mainview_submenu_charrange_hebrew - { - items= - { - MENU_ITEM - { - command = EMainViewSubmenuHebrewLetters; - txt = qtn_hwrt_submenu_hebrew_letters; - flags = EEikMenuItemRadioStart | EEikMenuItemSymbolOn; - }, - MENU_ITEM - { - command = EMainViewSubmenuDigital; - txt = qtn_hwrt_submenu_digits; - }, - MENU_ITEM - { - command = EMainViewSubmenuSymbols; - txt = qtn_hwrt_submenu_symbols; - flags = EEikMenuItemRadioEnd; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcutsview -// Define shortcuts view -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_VIEW r_trui_shortcutsview - { - menubar = r_trui_shortcutsview_menubar; - cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT; - toolbar = r_trui_shortcuts_toolbar; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcutedittextview -// Define shortcut edit text view -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_VIEW r_trui_shortcutedittextview - { - cba = r_trui_shortcuteditview_empty_cba; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcuts_toolbar_buttons -// fixed toolbar button groups -// -// --------------------------------------------------------------------------- -// -RESOURCE TOOLBAR_BUTTON_GROUPS r_trui_shortcuts_toolbar_buttons - { - buttons = - { - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutsViewButtonIdEditText; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_edit_shortcut_text; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_mce_tb_text; - bmpmask = EMbmTrui_iconsQgn_indi_mce_tb_text_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiMceTbText; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutsViewButtonIdEditModel; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_edit_shortcut_symbol; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_edit_model; - bmpmask = EMbmTrui_iconsQgn_indi_tb_edit_model_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiTbEditModel; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutsViewButtonIdDelete; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_delete; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_remove; - bmpmask = EMbmTrui_iconsQgn_indi_tb_remove_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiTbRemove; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcutsview_menubar -// Menu title definition in shortcuts view -// --------------------------------------------------------------------------- -// -RESOURCE MENU_BAR r_trui_shortcutsview_menubar - { - titles = - { - MENU_TITLE - { - menu_pane = r_trui_shortcutsview_menupane; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcutsview_menupane -// Menu for "Options" in shortcuts view -// --------------------------------------------------------------------------- -// -RESOURCE MENU_PANE r_trui_shortcutsview_menupane - { - items = - { - MENU_ITEM - { - command = EShortcutViewEditText; - txt = qtn_hwrt_om_edit_shortcut_text; - }, - MENU_ITEM - { - command = EShortcutViewEditModel; - txt = qtn_hwrt_om_edit_shortcut_symbol; - }, - MENU_ITEM - { - command = EShortcutViewCreate; - txt = qtn_hwrt_om_new_shortcut; - }, - MENU_ITEM - { - command = EShortcutViewDelete; - txt = qtn_hwrt_om_delete_shortcut; - }, - MENU_ITEM - { - command = EShortcutViewLinkToHandwritting; - txt = qtn_hwrt_om_training; - }, - MENU_ITEM - { - command = EShortcutViewMark; - txt = qtn_options_list_mark_one; - }, - MENU_ITEM - { - command = EShortcutViewUnmark; - txt = qtn_options_list_unmark_one; - }, - MENU_ITEM - { - command = EShortcutViewResetInfoMessage; - txt = qtn_hwrt_om_reset_intro; - }, - MENU_ITEM - { - command = EShortcutViewHelp; - txt = qtn_options_help; - }, - MENU_ITEM - { - command = EAknSoftkeyExit; - txt = qtn_options_exit; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcutsview_context_menubar -// Menu title definition for context menu in shortcuts view -// --------------------------------------------------------------------------- -// -RESOURCE MENU_BAR r_trui_shortcutsview_context_menubar - { - titles = - { - MENU_TITLE - { - menu_pane = r_trui_shortcutsview_context_menupane; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcutsview_context_menupane -// Menu for context menu in shortcuts view -// --------------------------------------------------------------------------- -// -RESOURCE MENU_PANE r_trui_shortcutsview_context_menupane - { - items = - { - MENU_ITEM - { - command = EShortcutViewEditText; - txt = qtn_msk_edit_text; - }, - MENU_ITEM - { - command = EShortcutViewEditModel; - txt = qtn_msk_edit_symbol; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcuteditview -// Define shortcut edit view -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_VIEW r_trui_shortcuteditview - { - cba = R_AVKON_SOFTKEYS_DONE_BACK; - toolbar = r_trui_shortcut_edit_symbol_toolbar; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcuteditview_create_cba -// CBA button when enter shortcut edit symbol view in wizard -// -// --------------------------------------------------------------------------- -// -RESOURCE CBA r_trui_shortcuteditview_create_cba - { - flags = 0; - buttons = - { - CBA_BUTTON - { - id = EAknSoftkeyDone; - txt = text_softkey_finish; - }, - CBA_BUTTON - { - id = EAknSoftkeyBack; - txt = text_softkey_back; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcuteditview_empty_cba -// Empty CBA button -// -// --------------------------------------------------------------------------- -// -RESOURCE CBA r_trui_shortcuteditview_empty_cba - { - flags = 0; - buttons = - { - CBA_BUTTON - { - }, - CBA_BUTTON - { - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcuteditview_toolbar_buttons -// fixed toolbar button groups -// -// --------------------------------------------------------------------------- -// -RESOURCE TOOLBAR_BUTTON_GROUPS r_trui_shortcuteditview_toolbar_buttons - { - buttons = - { - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutEditViewGrid; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutEditViewPreviewModel; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_preview_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_model_preview; - bmpmask = EMbmTrui_iconsQgn_indi_tb_model_preview_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiTbModelPreview; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutEditViewDelete; - control = SKIN_BUTTON - { - flags = KAknButtonSizeFitText; - helptxt= qtn_hwrt_tooltip_delete_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_remove; - bmpmask = EMbmTrui_iconsQgn_indi_tb_remove_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiTbRemove; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_infomessageview -// Define shortcut edit view -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_VIEW r_trui_infomessageview - { - cba = r_trui_infomessageview_cba; - } - -// --------------------------------------------------------------------------- -// -// r_trui_infomessageview_cba -// CBA button for trui infomessage view -// -// --------------------------------------------------------------------------- -// -RESOURCE CBA r_trui_infomessageview_cba - { - flags = 0; - buttons = - { - CBA_BUTTON - { - id = EAknSoftkeyNext; - txt = text_softkey_start; - }, - CBA_BUTTON - { - id = EAknSoftkeyCancel; - txt = text_softkey_cancel; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_latin_lower -// Skin-specified button for latin lower range -// -// --------------------------------------------------------------------------- -// - -RESOURCE SKIN_BUTTON r_mainview_button_charrange_latin_lower - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_small; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_small_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseSmall; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_latin_upper -// Skin-specified button for latin upper range -// -// --------------------------------------------------------------------------- -// - -RESOURCE SKIN_BUTTON r_mainview_button_charrange_latin_upper - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_capital; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_capital_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseCapital; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_latin_accent -// Skin-specified button for latin accent range -// -// --------------------------------------------------------------------------- -// - -RESOURCE SKIN_BUTTON r_mainview_button_charrange_latin_accent - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_accented; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_accented_mask; - mainitemid = EAknsMajorNone; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseAccented; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_cyrillic_lower -// Skin-specified button for cyrillic lower range -// -// --------------------------------------------------------------------------- -// - -RESOURCE SKIN_BUTTON r_mainview_button_charrange_cyrillic_lower - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_small_cyrillic; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_small_cyrillic_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseSmallCyrillic; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_cyrillic_upper -// Skin-specified button for cyrillic upper range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_cyrillic_upper - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_capital_cyrillic; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_capital_cyrillic_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseCapitalCyrillic; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_cyrillic_accent -// Skin-specified button for cyrillic accent range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_cyrillic_accent - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_accented_cyrillic; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_accented_cyrillic_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseAccentedCyrillic; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_greek_lower -// Skin-specified button for greek lower range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_greek_lower - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_small_greek; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_small_greek_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseSmallGreek; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_greek_upper -// Skin-specified button for greek upper range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_greek_upper - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_capital_greek; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_capital_greek_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseCapitalGreek; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_hebrew_letters -// Skin-specified button for hebrew range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_hebrew_letters - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_text_hebrew; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_text_hebrew_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseTextHebrew; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_numeric -// Skin-specified button for numeric range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_numeric - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_numeric; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_numeric_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseNumeric; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_charrange_symbol -// Skin-specified button for symbol range -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_charrange_symbol - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_case_special; - bmpmask = EMbmTrui_iconsQgn_indi_input_case_special_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiFepButtonCaseSpecial; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_left -// Skin-specified button for left button -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_left - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_char_prev; - bmpmask = EMbmTrui_iconsQgn_indi_input_char_prev_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiInputCharPrev; - } - -// --------------------------------------------------------------------------- -// -// r_mainview_button_right -// Skin-specified button for right button -// -// --------------------------------------------------------------------------- -// -RESOURCE SKIN_BUTTON r_mainview_button_right - { - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_input_char_next; - bmpmask = EMbmTrui_iconsQgn_indi_input_char_next_mask; - mainitemid = EAknsMajorSkin; - minoritemid = EAknsMinorGenericQgnIndiInputCharNext; - } - -RESOURCE LABEL r_mainview_label_tip - { - horiz_align = EEikLabelAlignHLeft; - vert_align = EEikLabelAlignVTop; - } - -RESOURCE LABEL r_mainview_label_indicator - { - horiz_align = EEikLabelAlignHCenter; - vert_align = EEikLabelAlignVCenter; - } - -// --------------------------------------------------------------------------- -// -// r_navigationpane_tabgroup -// Tab group definition, loaded when menu item selected -// -// --------------------------------------------------------------------------- -// -RESOURCE TAB_GROUP r_navigationpane_tabgroup - { - tab_width = EAknTabWidthWithTwoTabs; // display two tabs - active = 0; - tabs = - { - TAB - { - id = ENavigationPaneMainViewTab; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_prop_hwrtraining_tab2; - bmpmask = EMbmTrui_iconsQgn_prop_hwrtraining_tab2_mask; - }, - TAB - { - id = ENavigationPaneShortcutsViewTab; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_prop_hwrtraining_shortcut_tab2; - bmpmask = EMbmTrui_iconsQgn_prop_hwrtraining_shortcut_tab2_mask; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_shortcuteditview_label_shortcuttext -// Shortcut edit botton in the shortcuteditview -// -// --------------------------------------------------------------------------- -// -RESOURCE LABEL r_shortcuteditview_label_shortcuttext - { - horiz_align = EEikLabelAlignHCenter; - vert_align = EEikLabelAlignVCenter; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_dialog -// SCT definition. -// -// --------------------------------------------------------------------------- -// -RESOURCE DIALOG r_trui_sct_dialog - { - flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | - EEikDialogFlagNoShadow | EEikDialogFlagWait; - buttons = R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT; - items= - { - DLG_LINE - { - type = EAknCtPopupHeadingPane; - id = EAknSCTQueryHeadingId; - control = AVKON_HEADING - { - label = qtn_hwrt_sct_select_character; - headinglayout = R_AVKON_SCT_LIST_HEADING_PANE; - }; - }, - DLG_LINE - { - type = EAknCtSpecialCharacterMap; - id = EAknSCTQueryContentId; - control = SPECIAL_CHAR_TABLE - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_hwr_sct_initial_text; - } - }; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_lower -// SCT charset definition for latin lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_latin_lower - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_latin_lowerletters; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_upper -// SCT charset definition for latin upper range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_latin_upper - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_latin_upperletters; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_numeric -// SCT charset definition for latin numeric range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_latin_numeric - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_latin_digital; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_symbol -// SCT charset definition for latin symbol range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_latin_symbol - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_latin_symbol; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_symbol_chinese -// SCT charset definition for latin symbol range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_latin_symbol_chinese - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_latin_symbol_chinese; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_accent -// SCT charset definition for latin accent range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_latin_accent - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_latin_accent; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_lower -// SCT charset definition for cyrillic lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_lower - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_lowerletters; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_lower_bulgarian -// SCT charset definition for Bulgarian lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_lower_bulgarian - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_lowerletters_bulgarian; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_lower_russian -// SCT charset definition for Russian lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_lower_russian - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_lowerletters_russian; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_lower_ukraine -// SCT charset definition for Ukraine lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_lower_ukraine - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_lowerletters_ukraine; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_upper -// SCT charset definition for cyrillic upper range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_upper - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_upperletters; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_upper_bulgarian -// SCT charset definition for Bulgarian upper range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_upper_bulgarian - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_upperletters_bulgarian; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_upper_russian -// SCT charset definition for Russian upper range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_upper_russian - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_upperletters_russian; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_upper_ukraine -// SCT charset definition for Ukraine upper range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_upper_ukraine - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_upperletters_ukraine; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_cyrillic_accent -// SCT charset definition for cyrillic accent range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_cyrillic_accent - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_cyrillic_accent; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_greek_lower -// SCT charset definition for greek lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_greek_lower - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_greek_lowerletters; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_greek_upper -// SCT charset definition for greek upper range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_greek_upper - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_greek_upperletters; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_hebrew_letters -// SCT charset definition for hebrew letters range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_hebrew_letters - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_sct_hebrew_letters; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_trui_querydialog_delete_shortcut -// Query dialog appear -// when pressing "Delete shortcut" from menu. -// -// --------------------------------------------------------------------------- -// -RESOURCE DIALOG r_trui_querydialog_delete_shortcut - { - flags = EGeneralQueryFlags; - buttons = R_AVKON_SOFTKEYS_YES_NO; - items = - { - DLG_LINE - { - type = EAknCtQuery; - id = EGeneralQuery; - control = AVKON_CONFIRMATION_QUERY - { - layout = EConfirmationQueryLayout; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_trui_querydialog_shortcut_not_assigned -// Query dialog appearing when exiting without model -// -// --------------------------------------------------------------------------- -// -RESOURCE DIALOG r_trui_querydialog_shortcut_not_assigned - { - flags = EGeneralQueryFlags; - buttons = R_AVKON_SOFTKEYS_YES_NO; - items = - { - DLG_LINE - { - type = EAknCtQuery; - id = EGeneralQuery; - control = AVKON_CONFIRMATION_QUERY - { - layout = EConfirmationQueryLayout; - label = qtn_hwrt_note_shortcut_not_assigned; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcut_edit_text_editor -// Shortcut text setting editor -// -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_SETTING_PAGE r_trui_shortcut_edit_text_editor - { - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL; - label = qtn_hwrt_shortcut_assign_text; - type = EEikCtEdwin; - editor_resource_id = r_trui_shortcut_setting_editor_edwin; - invalid_contents_softkey_resource = R_AVKON_SOFTKEYS_CANCEL; - extension = r_trui_setting_page_extension; - } - -RESOURCE AVKON_SETTING_PAGE_EXTENSION r_trui_setting_page_extension - { - flags = KAknSettingPageNoEmbeddedSoftKeys; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcut_setting_editor_edwin -// Setting editor control. -// -// --------------------------------------------------------------------------- -// -RESOURCE EDWIN r_trui_shortcut_setting_editor_edwin - { - lines = 0; - maxlength = TRUI_SHORTCUTEDITOR_TEXT_MAXLENGTH; - } - -// --------------------------------------------------------------------------- -// r_trui_shortcut_edit_text_editor -// Shortcut text setting editor -// -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_SETTING_PAGE r_trui_shortcut_wizard_editor - { - softkey_resource = r_trui_shortcutedittextview_next_back; - label = qtn_hwrt_shortcut_assign_text; - type = EEikCtEdwin; - editor_resource_id = r_trui_shortcut_setting_editor_edwin; - invalid_contents_softkey_resource = R_AVKON_SOFTKEYS_BACK; - extension = r_trui_setting_page_extension; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcutedittextview_next_back -// CBA button -// -// --------------------------------------------------------------------------- -// -RESOURCE CBA r_trui_shortcutedittextview_next_back - { - flags = 0; - buttons = - { - CBA_BUTTON - { - id = EAknSoftkeyNext; - txt = text_softkey_next; - }, - CBA_BUTTON - { - id = EAknSoftkeyBack; - txt = text_softkey_back; - } - }; - } - -// --------------------------------------------------------------------------- -// -// This is the first option of the listbox in the -// shortcut view "New WHR Shortcut" -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_shortcutview_new_shortcut - { buf = qtn_hwrt_list_item_new_shortcut; } - -// --------------------------------------------------------------------------- -// -// The text above the Writing Box -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_mainview_text_teach_character - { buf = qtn_hwrt_text_teach_character; } - -// --------------------------------------------------------------------------- -// -// The Active character indicator -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_mainview_active_char_indicator - { buf = qtn_hwrt_active_char_indicator; } - -// --------------------------------------------------------------------------- -// -// Text for Character Range -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_mainview_char_range_lower - { buf = qtn_hwrt_char_range_lower; } - -RESOURCE TBUF r_trui_mainview_char_range_capital - { buf = qtn_hwrt_char_range_capital; } - -RESOURCE TBUF r_trui_mainview_char_range_accent - { buf = qtn_hwrt_char_range_latin_accent; } - -RESOURCE TBUF r_trui_mainview_char_range_digits - { buf = qtn_hwrt_char_range_digits; } - -RESOURCE TBUF r_trui_mainview_char_range_symbols - { buf = qtn_hwrt_char_range_symbols; } - -RESOURCE TBUF r_trui_mainview_cyrillic_lower - { buf = qtn_hwrt_cyrillic_lower_range; } - -RESOURCE TBUF r_trui_mainview_cyrillic_capital - { buf = qtn_hwrt_cyrillic_capital_range; } - -RESOURCE TBUF r_trui_mainview_cyrillic_accent - { buf = qtn_hwrt_char_range_cyrillic_accent; } - -RESOURCE TBUF r_trui_mainview_greek_lower - { buf = qtn_hwrt_greek_lower_range; } - -RESOURCE TBUF r_trui_mainview_greek_capital - { buf = qtn_hwrt_greek_capital_range; } - -RESOURCE TBUF r_trui_mainview_hebrew_letters - { buf = qtn_hwrt_hebrew_letters; } - - -// --------------------------------------------------------------------------- -// -// Text for Character Set -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_characterset_latin_lowerletters - { buf = qtn_sct_latin_lowerletters; } - -RESOURCE TBUF r_trui_characterset_latin_upperletters - { buf = qtn_sct_latin_upperletters;} - -RESOURCE TBUF r_trui_characterset_latin_accent - { buf = qtn_sct_latin_accent;} - -RESOURCE TBUF r_trui_characterset_latin_digital - { buf = qtn_sct_latin_digital; } - -RESOURCE TBUF r_trui_characterset_latin_symbol - { buf = qtn_sct_latin_symbol; } - -RESOURCE TBUF r_trui_characterset_latin_symbol_chinese - { buf = qtn_sct_latin_symbol_chinese; } - -RESOURCE TBUF r_trui_characterset_cyrillic_lowerletters - { buf = qtn_sct_cyrillic_lowerletters; } - -RESOURCE TBUF r_trui_characterset_cyrillic_lowerletters_bulgarian - { buf = qtn_sct_cyrillic_lowerletters_bulgarian; } - -RESOURCE TBUF r_trui_characterset_cyrillic_lowerletters_ukraine - { buf = qtn_sct_cyrillic_lowerletters_ukraine; } - -RESOURCE TBUF r_trui_characterset_cyrillic_lowerletters_russian - { buf = qtn_sct_cyrillic_lowerletters_russian; } - -RESOURCE TBUF r_trui_characterset_cyrillic_upperletters - { buf = qtn_sct_cyrillic_upperletters; } - -RESOURCE TBUF r_trui_characterset_cyrillic_upperletters_bulgarian - { buf = qtn_sct_cyrillic_upperletters_bulgarian; } - -RESOURCE TBUF r_trui_characterset_cyrillic_upperletters_russian - { buf = qtn_sct_cyrillic_upperletters_russian; } - -RESOURCE TBUF r_trui_characterset_cyrillic_upperletters_ukraine - { buf = qtn_sct_cyrillic_upperletters_ukraine; } - -RESOURCE TBUF r_trui_characterset_cyrillic_accent - { buf = qtn_sct_cyrillic_accent;} - -RESOURCE TBUF r_trui_characterset_greek_lowerletters - { buf = qtn_sct_greek_lowerletters; } - -RESOURCE TBUF r_trui_characterset_greek_upperletters - { buf = qtn_sct_greek_upperletters; } - -RESOURCE TBUF r_trui_characterset_hebrew_letters - { buf = qtn_sct_hebrew_letters; } - -// --------------------------------------------------------------------------- -// -// Operation tooltip -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_tooltip_saved - { buf = qtn_hwrt_confirmation_banner_saved; } -RESOURCE TBUF r_trui_tooltip_deleted - { buf = qtn_hwrt_confirmation_banner_deleted; } -RESOURCE TBUF r_trui_note_clear_box - { buf = qtn_hwrt_note_clear_box; } -RESOURCE TBUF r_trui_note_similar_model - { buf = qtn_hwrt_note_similar_model; } -RESOURCE TBUF r_trui_note_save_failed - { buf = qtn_hwrt_note_save_failed; } - -// --------------------------------------------------------------------------- -// -// Text for title pane -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_mainview_titlepane_text - { buf = qtn_hwrt_title_pane; } -RESOURCE TBUF r_trui_shortcutsview_titlepane_text - { buf = qtn_hwrt_title_pane; } -RESOURCE TBUF r_trui_shortcuteditview_titlepane_text - { buf = qtn_hwrt_title_wizard_hwr_shortcut; } -RESOURCE TBUF r_trui_infomessageview_titlepane_text - { buf = qtn_hwrt_title_crete_new_shortcut; } -RESOURCE TBUF r_trui_shortcutedittextview_titlepane_text - { buf = qtn_hwrt_title_hwr_shortcut; } -RESOURCE TBUF r_trui_shortcutedittextview_titlepane_number - { buf = qtn_hwrt_title_first_page_number; } -RESOURCE TBUF r_trui_shortcutedittextview_titlepane_last_number - { buf = qtn_hwrt_title_last_page_number; } - -// --------------------------------------------------------------------------- -// r_trui_localisable_app_info -// Trainui localisable app info. -// -// --------------------------------------------------------------------------- -// -RESOURCE LOCALISABLE_APP_INFO r_trui_localisable_app_info - { - short_caption = qtn_apps_hwrt_grid; - caption_and_icon = - { - CAPTION_AND_ICON_INFO - { - number_of_icons = 1; - icon_file = APP_BITMAP_DIR"\\"qtn_trui_appinfo_icons_filename; - } - }; - } - -// --------------------------------------------------------------------------- -// -// Text for shortcut edit model view -// -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_shortcuteditmodelview_radiobutton_own - { buf = qtn_hwrt_radio_button_own_symbol; } -RESOURCE TBUF r_trui_shortcuteditmodelview_radiobutton_preset - { buf = qtn_hwrt_radio_button_preset_symbol; } -RESOURCE TBUF r_trui_shortcuteditmodelview_label_own - { buf = qtn_hwrt_text_purpose_own_symbol; } - -// --------------------------------------------------------------------------- -// r_trui_language_script_set -// Define the resource struct for mapping table -// from language code to language script. -// --------------------------------------------------------------------------- -// -RESOURCE LANGUAGE_SCRIPT_SET r_trui_language_script_set - { - contents = - { - LANGUAGE_SCRIPT - { - id = EMainViewSubmenuWestern; - codes = - { - 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 13, - 14, 15, 17, 18, 25, 26, 27, 28, 39, 45, 49, - 51, 59, 67, 68, 70, 76, 78, 79, 83, 157, 158, - 159, 160, 161, 326, 327, 44, 102, 103, 401, 402 - }; - }, - LANGUAGE_SCRIPT - { - id = EMainViewSubmenuCyrillic; - codes = - { - 16, 42, 93 - }; - }, - LANGUAGE_SCRIPT - { - id = EMainViewSubmenuGreek; - codes = - { - 54 - }; - }, - LANGUAGE_SCRIPT - { - id = EMainViewSubmenuHebrew; - codes = - { - 57 - }; - } - }; - } - -// --------------------------------------------------------------------------- -// The informative message for shortcut wizard. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_infomaessageview_message - { buf = qtn_hwrt_informative_message; } - -// --------------------------------------------------------------------------- -// The text for checkbox in info message view. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_infomaessageview_checkbox_text - { buf = qtn_hwrt_informative_message_check_box_label; } - -// --------------------------------------------------------------------------- -// The text for own symbol in shortcut edit symbol view. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_shortcuteditview_own_symbol - { buf = qtn_hwrt_text_purpose_own_symbol; } - -// --------------------------------------------------------------------------- -// The text for preset symbol in shortcut edit symbol view. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_shortcuteditview_preset_symbol - { buf = qtn_hwrt_text_purpose_selected_symbol; } - -// --------------------------------------------------------------------------- -// The text for error note of symbol in use. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_shortcuteditview_error_note_in_use - { buf = qtn_hwrt_note_shortcut_is_used; } - -// --------------------------------------------------------------------------- -// The text for error note of all symbols in use. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_shortcuteditview_error_note_all_in_use - { buf = qtn_hwrt_all_symbols_in_use_notification; } - -// --------------------------------------------------------------------------- -// r_trui_sct_charset_latin_lower -// SCT charset definition for latin lower range. -// -// --------------------------------------------------------------------------- -// -RESOURCE SPECIAL_CHAR_TABLE r_trui_sct_charset_preset - { - contents = - { - SCT_CHAR_SET - { - id = EAknSCTLowerCase; - chars = qtn_hwrt_preset_characters; - } - }; - } - -// --------------------------------------------------------------------------- -// Preset symbols -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_trui_preset_symbols - { buf = qtn_hwrt_preset_characters; } - -// --------------------------------------------------------------------------- -// -// r_trui_querydialog_delete_shortcut -// Query dialog appear -// when pressing "Current shortcut" from menu. -// -// --------------------------------------------------------------------------- -// -RESOURCE DIALOG r_trui_querydialog_delete_all_models - { - flags = EGeneralQueryFlags; - buttons = R_AVKON_SOFTKEYS_YES_NO; - items = - { - DLG_LINE - { - type = EAknCtQuery; - id = EGeneralQuery; - control = AVKON_CONFIRMATION_QUERY - { - layout = EConfirmationQueryLayout; - label = qtn_hwrt_note_delete_all_models; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// Query dialog text for deleting single shortcut. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_qtn_hwrt_query_delete_shortcut - { buf = qtn_hwrt_query_delete_shortcut; } - -// --------------------------------------------------------------------------- -// Query dialog text for deleting mutiple shortcuts. -// --------------------------------------------------------------------------- -// -RESOURCE TBUF r_qtn_hwrt_query_delete_several_shortcuts - { buf = qtn_hwrt_query_delete_several_shortcuts; } - -// --------------------------------------------------------------------------- -// -// r_trui_mainview_toolbar -// toolbar -// -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_TOOLBAR r_trui_mainview_toolbar - { - flags = KAknToolbarWithoutCba | KAknToolbarTransparent | KAknToolbarFixed; - items = - { - TBAR_CTRL - { - type = EAknCtButton; - id = EMainViewButtonIdGrid; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_select_character; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_char_grid; - bmpmask = EMbmTrui_iconsQgn_indi_tb_char_grid_mask; - } - }; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EMainViewButtonIdPreview; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_preview_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_model_preview; - bmpmask = EMbmTrui_iconsQgn_indi_tb_model_preview_mask; - } - }; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EMainViewButtonIdDelete; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_delete_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_remove; - bmpmask = EMbmTrui_iconsQgn_indi_tb_remove_mask; - } - }; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcuts_toolbar -// toolbar -// -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_TOOLBAR r_trui_shortcuts_toolbar - { - flags = KAknToolbarWithoutCba | KAknToolbarTransparent | KAknToolbarFixed; - items = - { - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutsViewButtonIdEditText; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_edit_shortcut_text; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_mce_tb_text; - bmpmask = EMbmTrui_iconsQgn_indi_mce_tb_text_mask; - } - }; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutsViewButtonIdEditModel; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_edit_shortcut_symbol; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_edit_model; - bmpmask = EMbmTrui_iconsQgn_indi_tb_edit_model_mask; - } - }; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutsViewButtonIdDelete; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_delete; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_remove; - bmpmask = EMbmTrui_iconsQgn_indi_tb_remove_mask; - } - }; - }; - } - }; - } - -// --------------------------------------------------------------------------- -// -// r_trui_shortcut_edit_symbol_toolbar -// toolbar -// -// --------------------------------------------------------------------------- -// -RESOURCE AVKON_TOOLBAR r_trui_shortcut_edit_symbol_toolbar - { - flags = KAknToolbarWithoutCba | KAknToolbarTransparent | KAknToolbarFixed; - items = - { - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutEditViewGrid; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutEditViewPreviewModel; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_preview_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_model_preview; - bmpmask = EMbmTrui_iconsQgn_indi_tb_model_preview_mask; - } - }; - }; - }, - TBAR_CTRL - { - type = EAknCtButton; - id = EShortcutEditViewDelete; - control = AVKON_BUTTON - { - flags = KAknButtonSizeFitText; - states = - { - AVKON_BUTTON_STATE - { - helptxt= qtn_hwrt_tooltip_delete_drawing; - bmpfile = APP_BITMAP_DIR"\\"qtn_trui_icons_filename; - bmpid = EMbmTrui_iconsQgn_indi_tb_remove; - bmpmask = EMbmTrui_iconsQgn_indi_tb_remove_mask; - } - }; - }; - } - }; - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/data/trui_reg.rss --- a/textinput/peninputhwrtrui/data/trui_reg.rss Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource definitions for project TrainingUI -* -*/ -//trui application's registration resource file - -#include -#include -#include - -UID2 KUidAppRegistrationResourceFile -UID3 0x2000B104 - -// d:Trui app file name -// l:(none) -// r:5.0 -// -#define qtn_trui_app_file "trui" - -// d:Trui localisable resource file name -// l:(none) -// r:5.0 -// -#define qtn_trui_localisable_resource_file "trui" - -RESOURCE APP_REGISTRATION_INFO - { - app_file = qtn_trui_app_file; - localisable_resource_file = APP_RESOURCE_DIR"\\"qtn_trui_localisable_resource_file; - localisable_resource_id = R_TRUI_LOCALISABLE_APP_INFO; - hidden = KAppIsHidden; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/group/bld.inf --- a/textinput/peninputhwrtrui/group/bld.inf Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project ?myapp -* -*/ - -#include - -PRJ_EXPORTS -../loc/trui.loc MW_LAYER_LOC_EXPORT_PATH(trui.loc) -../data/TrainUiPreset.dat /epoc32/RELEASE/winscw/udeb/Z/resource/TrainUiPreset.dat -../data/TrainUiPreset.dat /epoc32/RELEASE/winscw/urel/Z/resource/TrainUiPreset.dat -../data/TrainUiPreset.dat /epoc32/RELEASE/armv5/UREL/z/resource/TrainUiPreset.dat -../data/TrainUiPreset.dat /epoc32/RELEASE/armv5/UDEB/z/resource/TrainUiPreset.dat -../inc/truisupportedlanguageid.h |../../../inc/truisupportedlanguageid.h - -../rom/peninputhwrtruivariant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(peninputhwrtruivariant.iby) -../rom/peninputhwrtruiresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(peninputhwrtruiresources.iby) - -PRJ_MMPFILES - -//gnumakefile trui_aif.mk -trui.mmp - -PRJ_EXTENSIONS -START EXTENSION s60/mifconv -OPTION TARGETFILE trui_icons.mif -OPTION HEADERFILE trui_icons.mbg -OPTION SOURCEFILE iconlist.txt -END - -START EXTENSION s60/mifconv -OPTION TARGETFILE trui_aif.mif -OPTION SOURCEFILE iconlist_aif.txt -END - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/group/iconlist.txt --- a/textinput/peninputhwrtrui/group/iconlist.txt Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ --c32,1 qgn_indi_input_case_accented.svg --c32,1 qgn_indi_input_case_capital.svg --c32,1 qgn_indi_input_case_capital_cyrillic.svg --c32,1 qgn_indi_input_case_capital_greek.svg --c32,1 qgn_indi_input_case_numeric.svg --c32,1 qgn_indi_input_case_small.svg --c32,1 qgn_indi_input_case_small_cyrillic.svg --c32,1 qgn_indi_input_case_small_greek.svg --c32,1 qgn_indi_input_case_text_hebrew.svg --c32,1 qgn_indi_input_case_special.svg --c32,1 qgn_indi_input_char_next.svg --c32,1 qgn_indi_input_char_prev.svg --c32,1 qgn_indi_tb_char_grid.svg --c32,1 qgn_indi_tb_edit_model.svg --c32,1 qgn_indi_tb_model_preview.svg --c32,1 qgn_indi_tb_remove.svg --c32,1 qgn_prop_hwrtraining_shortcut_new.svg --c32,1 qgn_prop_hwrtraining_shortcut_tab2.svg --c32,1 qgn_prop_hwrtraining_tab2.svg --c32,1 qgn_indi_mce_tb_text.svg --c32,1 qgn_indi_marked_add.svg --c32,1 qgn_graf_fep_bg_colour.svg --c32,1 qgn_graf_fep_popup_shadow_tl.svg --c32,1 qgn_graf_fep_popup_shadow_t.svg --c32,1 qgn_graf_fep_popup_shadow_tr.svg --c32,1 qgn_graf_fep_popup_shadow_b.svg --c32,1 qgn_graf_fep_popup_shadow_bl.svg --c32,1 qgn_graf_fep_popup_shadow_br.svg --c32,1 qgn_graf_fep_popup_shadow_l.svg --c32,1 qgn_graf_fep_popup_shadow_r.svg --c32,1 qgn_indi_input_case_accented_cyrillic.svg \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/group/iconlist_aif.txt --- a/textinput/peninputhwrtrui/group/iconlist_aif.txt Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ --c32,1 qgn_menu_hwr_training.svg \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/group/trui.mmp --- a/textinput/peninputhwrtrui/group/trui.mmp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for TrainingUI -* -*/ - - -#include -#include - -TARGETPATH PROGRAMS_DIR -TARGET trui.exe -TARGETTYPE exe -UID 0x100039CE 0x2000B104 - -CAPABILITY CAP_APPLICATION -VENDORID VID_DEFAULT -EPOCSTACKSIZE 0x5000 - -SOURCEPATH ../src -SOURCE trui.cpp -SOURCE truiapplication.cpp -SOURCE truidocument.cpp -SOURCE truiappui.cpp -SOURCE truimainview.cpp -SOURCE truishortcutsview.cpp -SOURCE truishortcuteditview.cpp -SOURCE truicontainerbase.cpp -SOURCE truimainviewcontainer.cpp -SOURCE truishortcutscontainer.cpp -SOURCE truishortcuteditcontainer.cpp -SOURCE truiengine.cpp -SOURCE truihwrbox.cpp -SOURCE truitextsettingpagecontainer.cpp -SOURCE truishortcutedittextview.cpp -SOURCE truiinfomessageview.cpp -SOURCE truiinfomessagecontainer.cpp -SOURCE truilanguagerelation.cpp -SOURCE truiappradiobutton.cpp - -USERINCLUDE ../inc -MW_LAYER_SYSTEMINCLUDE -APP_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib -LIBRARY apparc.lib -LIBRARY cone.lib -LIBRARY eikcore.lib -LIBRARY avkon.lib -LIBRARY eikcoctl.lib -LIBRARY bafl.lib -LIBRARY eiksrv.lib -LIBRARY eikctl.lib -LIBRARY aknicon.lib -LIBRARY egul.lib -LIBRARY estor.lib -LIBRARY efsrv.lib -LIBRARY CommonEngine.lib -LIBRARY centralrepository.lib -LIBRARY ptiengine.lib -LIBRARY hlplch.lib -LIBRARY cdlengine.lib -LIBRARY aknlayout2.lib -LIBRARY gdi.lib -LIBRARY aknskins.lib -LIBRARY aknskinsrv.lib -LIBRARY aknswallpaperutils.lib -LIBRARY fbscli.lib -LIBRARY aknlayout2scalable.lib -LIBRARY ws32.lib -LIBRARY etext.lib -LIBRARY form.lib - -LIBRARY FeatMgr.lib // feature manager -#ifdef RD_TACTILE_FEEDBACK -LIBRARY touchfeedback.lib -#endif // RD_TACTILE_FEEDBACK - -SOURCEPATH ../data -START RESOURCE trui.rss -HEADER -LANGUAGE_IDS -TARGETPATH APP_RESOURCE_DIR -END // RESOURCE - -START RESOURCE trui_reg.rss -DEPENDS trui.rsg -TARGETPATH /private/10003a3f/apps -END // RESOURCE - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/group/trui_aif.mk --- a/textinput/peninputhwrtrui/group/trui_aif.mk Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -# -# Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0"" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: icons makefile for project ?myapp -# - -ifeq (WINS,$(findstring WINS, $(PLATFORM))) -ZDIR=$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(CFG)\Z -else -ZDIR=$(EPOCROOT)Epoc32\data\z -endif - -TARGETDIR = $(ZDIR)\resource\apps -HEADERDIR = $(EPOCROOT)epoc32\include -APPINFOFILENAME = $(TARGETDIR)\trui_aif.mif -ICONTARGETFILENAME = $(TARGETDIR)\trui_icons.mif -HEADERFILENAME = $(HEADERDIR)\trui_icons.mbg -ICONDIR = ..\data - -do_nothing : - @rem do_nothing - -MAKMAKE : do_nothing - -BLD : do_nothing - -CLEAN : do_nothing - -LIB : do_nothing - -CLEANLIB : do_nothing - -RESOURCE : - mifconv $(ICONTARGETFILENAME) /H$(HEADERFILENAME) \ - /c32,1 qgn_indi_input_case_accented.svg \ - /c32,1 qgn_indi_input_case_capital.svg \ - /c32,1 qgn_indi_input_case_capital_cyrillic.svg \ - /c32,1 qgn_indi_input_case_capital_greek.svg \ - /c32,1 qgn_indi_input_case_numeric.svg \ - /c32,1 qgn_indi_input_case_small.svg \ - /c32,1 qgn_indi_input_case_small_cyrillic.svg \ - /c32,1 qgn_indi_input_case_small_greek.svg \ - /c32,1 qgn_indi_input_case_text_hebrew.svg \ - /c32,1 qgn_indi_input_case_special.svg \ - /c32,1 qgn_indi_input_char_next.svg \ - /c32,1 qgn_indi_input_char_prev.svg \ - /c32,1 qgn_indi_tb_char_grid.svg \ - /c32,1 qgn_indi_tb_edit_model.svg \ - /c32,1 qgn_indi_tb_model_preview.svg \ - /c32,1 qgn_indi_tb_remove.svg \ - /c32,1 qgn_prop_hwrtraining_shortcut_new.svg \ - /c32,1 qgn_prop_hwrtraining_shortcut_tab2.svg \ - /c32,1 qgn_prop_hwrtraining_tab2.svg \ - /c32,1 qgn_indi_mce_tb_text.svg \ - /c32,1 qgn_indi_marked_add.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_bg_colour.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_tl.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_t.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_tr.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_b.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_bl.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_br.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_l.svg \ - /c32,1 $(ICONDIR)\qgn_graf_fep_popup_shadow_r.svg \ - /c32,1 qgn_indi_input_case_accented_cyrillic.svg - - mifconv $(APPINFOFILENAME)\ - /c32,1 qgn_menu_hwr_training.svg - -FREEZE : do_nothing - -SAVESPACE : do_nothing - -RELEASABLES : - @echo $(ICONTARGETFILENAME) - -FINAL : do_nothing diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/trui.hrh --- a/textinput/peninputhwrtrui/inc/trui.hrh Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project TrainingUI -* -*/ - - -#ifndef TRUI_HRH -#define TRUI_HRH - -/** trui enumerate command codes */ -enum TTruiIds - { - ENavigationPaneMainViewTab = 1, // start value must not be 0 - ENavigationPaneShortcutsViewTab, - EMainViewDeleteModel, - EMainViewDeleteCurrentModel, - EMainViewDeleteAllModel, - EMainViewPreviewModel, - EMainViewCharRange, - EMainViewCharGrid, - EMainViewLanguageScript, - EMainViewToShortcutsView, - EMainViewHelp, - EMainViewSubmenuWestern, - EMainViewSubmenuCyrillic, - EMainViewSubmenuGreek, - EMainViewSubmenuHebrew, - EMainViewSubmenuLatinLowerLetter, - EMainViewSubmenuLatinUpperLetter, - EMainViewSubmenuDigital, - EMainViewSubmenuSymbols, - EMainViewSubmenuLatinAccent, - EMainViewSubmenuCyrillicLowerLetters, - EMainViewSubmenuCyrillicUpperLetters, - EMainViewSubmenuCyrillicAccent, - EMainViewSubmenuGreekLowerLetters, - EMainViewSubmenuGreekUpperLetters, - EMainViewSubmenuHebrewLetters, - EShortcutViewEditText, - EShortcutViewEditModel, - EShortcutViewCreate, - EShortcutViewDelete, - EShortcutViewLinkToHandwritting, - EShortcutViewMark, - EShortcutViewUnmark, - EShortcutViewResetInfoMessage, - EShortcutViewHelp, - EShortcutEditViewDelete, - EShortcutEditViewPreviewModel, - EShortcutEditViewGrid, - EMainViewMsk, - EMainViewButtonIdGrid, - EMainViewButtonIdPreview, - EMainViewButtonIdDelete, - EShortcutsViewButtonIdEditText, - EShortcutsViewButtonIdEditModel, - EShortcutsViewButtonIdDelete - }; - -/** trui enumerate character range id */ -enum TTruiCharacterRange - { - ELatinLowerLetters = EMainViewSubmenuLatinLowerLetter, - ELatinUpperLetters, - ELatinDigital, - ELatinSymbol, - ELatinAccent, - ECyrillicLowerLetters, - ECyrillicUpperLetters, - ECyrillicAccent, - EGreekLowerLetters, - EGreekUpperLetters, - EHebrewLetters - }; -#endif // TRUI_HRH diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/trui.rh --- a/textinput/peninputhwrtrui/inc/trui.rh Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project ?myapp -* -*/ - -#ifndef TRUI_RH -#define TRUI_RH - -// --------------------------------------------------------------------------- -// Define MENU_ITEMS struct type to save all menu items -// --------------------------------------------------------------------------- -// -STRUCT MENU_ITEMS - { - // All menu items - STRUCT items[]; - } - -// --------------------------------------------------------------------------- -// Define LANGUAGE_SCRIPT_SET struct type to store supported language script. -// --------------------------------------------------------------------------- -// -STRUCT LANGUAGE_SCRIPT_SET - { - // All language script - STRUCT contents[]; - } - -// --------------------------------------------------------------------------- -// Define LANGUAGE_SCRIPT_SET struct type to store supported language script. -// --------------------------------------------------------------------------- -// -STRUCT LANGUAGE_SCRIPT - { - WORD id; - WORD codes[]; - } - -// --------------------------------------------------------------------------- -// Define LANGUAGE_SCRIPT_SET struct type for skin specified button. -// --------------------------------------------------------------------------- -// -STRUCT SKIN_BUTTON - { - WORD flags=0; - LTEXT helptxt=""; - LTEXT bmpfile=""; - WORD bmpid=0xffff; - WORD bmpmask=0xffff; - WORD press_bmpid=0xffff; - WORD press_bmpmask=0xffff; - LONG mainitemid=0; - LONG minoritemid=0; - LONG mainitempressid=0; - LONG minoritempressid=0; - } - -STRUCT TOOLBAR_BUTTON_GROUPS - { - STRUCT buttons[]; - } - -#endif // TRUI_RH diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiapplication.h --- a/textinput/peninputhwrtrui/inc/truiapplication.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Application class of TrainingUI -* -*/ - - -#ifndef C_TRUIAPPLICATION_H -#define C_TRUIAPPLICATION_H - -// UID for the application, this should correspond to the uid defined in the mmp file -static const TUid KUidtruiApp = { 0x2000B104 }; - -#include - -/** - * Instance of CTruiApplication is the application part of the AVKON - * application framework for the TrainingUI application - * - * @code - * new CTruiApplication; - * @endcode - * - * @lib avkon.lib eikcore.lib eiksrv.lib - */ -class CTruiApplication : public CAknApplication - { -public: // from CAknApplication - - /** - * Returns the application DLL UID value - * - * @return the UID of this Application/Dll - */ - TUid AppDllUid() const; - -protected: // from CAknApplication - - /** - * Create a CApaDocument object and return a pointer to it - * - * @return a pointer to the created document - */ - CApaDocument* CreateDocumentL(); - - /** - * Opens the .ini file associated with the application. - * - * @param aFs File server session to use. Not used. - * @return Pointer to the dictionary store object representing the - * application's .ini file. - */ - CDictionaryStore* OpenIniFileLC( RFs& aFs ) const; - }; - -#endif // C_TRUIAPPLICATION_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiappradiobutton.h --- a/textinput/peninputhwrtrui/inc/truiappradiobutton.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,301 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: radio button - control in Training UI application -* -*/ - - -#ifndef C_TRUIAPPRADIOBUTTON_H -#define C_TRUIAPPRADIOBUTTON_H - -// includes -#include - -// Class declaration -class MTruiRadioButtonObserver; - -/** - * CTruiRadioButton is a new component for selecting own/preset model - * in shortcut edit view. - * @lib avkon.lib - */ - -class CTruiRadioButton: public CCoeControl, public MCoeControlObserver - { -public: - /* Flags for radion button status. */ - enum TRadioButtonStatus - { - ENonSelected = 0, - ESelected - }; - - /* Flags for button type. */ - enum TSelectionType - { - ERadioButton = 0, - ECheckBox - }; - - /** - * Two-phased constructor. - * @param aParent the parent control for choice list - * @param aTextArray the items' text that will be displayed in radion button. - * @param aStatusArray the selected status for each radio button. - * @param aSelectionType The type of the selection type, radio or checkbox - * @return Pointer to CTruiRadioButton's instance - */ - static CTruiRadioButton* NewL( CCoeControl* aParent, - TSelectionType aSelectionType, - MTruiRadioButtonObserver* aObserver = NULL ); - - /** - * Two-phased constructor. - * @param aParent the parent control for choice list - * @param aTextArray the items' text that will be displayed in radion button. - * @param aStatusArray The selected status for each radio button. - * @param aSelectionType The type of the selection type, radio or checkbox - * @return Pointer to CTruiRadioButton's instance - */ - static CTruiRadioButton* NewLC( CCoeControl* aParent, - TSelectionType aSelectionType, - MTruiRadioButtonObserver* aObserver = NULL ); - /** - * Destructor - */ - ~CTruiRadioButton(); - - /** - * Convert texts into Label and update them in radio buttons - */ - void HandleItemAdditionL(); - - /** - * Add one item to radio button - * @param aText The text of the radio button. - * @param aStatus The current selected status of the radio button - */ - void AddItem( const HBufC* aText, TRadioButtonStatus aStatus ); - - /** - * Return the status array - */ - inline const RArray& StatusArray() const - { - return iStatusArray; - }; - - /** - * Handle pointer on radio button - * - * @param aIndex The index of the button group item. - * @param aEventType The event type. - */ - void HandlePointerRadioButtonL( TInt aIndex, TCoeEvent aEventType ); - - /** - * Handle pointer on checkbox - * - * @param aIndex The index of the button group item. - * @param aEventType The event type. - */ - void HandlePointerCheckBox( TInt aIndex, TCoeEvent aEventType ); - - inline void SetMultilineLayout( const TAknMultiLineTextLayout& aMultilineLayout ) - { - iMultilineLayout = aMultilineLayout; - }; - -// from CCoeControl - /** - * Return the control's minisize. - */ - TSize MinimumSize(); - -private: - - /** - * C++ Default Constructor - */ - CTruiRadioButton( MTruiRadioButtonObserver* aObserver, - TSelectionType aSelectionType ); - - /** - * 2nd phase constructor - * @param aParent the parent control for choice list - * @param aTextArray the items' text that will be displayed in radion button. - * @param aStatusArray the selected status for each radio button. - */ - void ConstructL( CCoeControl* aParent ); - - /** - * Create radio button's bitmap. - */ - void CreateBitmapForRadioButtonL(); - - /** - * Get cached color of skin for label control - * - * @param aColor The color of Label will be set - */ - TInt GetCachedLabelTextColor( TRgb& aColor ); - - /** - * Load layouts for icons from LAF. - * - * @param aVarity Varity for LAF - */ - void LoadIconsLayout( TInt aVarity ); - - /** - * Convert logical name to visual name for label when needed. - * - * @param aLabel The label is used to show text - * @param aLogicalTxt The logical text which is needed to be converted. - * @param aFont The font of label text - * @param aLineWidth The line width of each text of label - */ - void ConvertToVisualForEdwinL( CEikLabel* aLabel, const TDesC& aLogicalTxt, - const CFont& aFont, TInt aLineWidth ); - - /** - * Clip text of label to fit label width. - * - * @param aLabel The label is used to show text - * @param aIndex The index of text in text array - */ - void ClipToFitLabelL( CEikLabel* aLabel, TInt aIndex ); - -// from MCoeControlObserver - /** - * From MCoeControlObserver. Handles an event from an observed control. - * @param aControl The control that sent the event. - * @param aEventType The event type. - */ - void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType ); - -// from CCoeControl - /** - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * Draws control to given area - * @param aRect The rectangle that should be drawn by the control. - */ - void Draw( const TRect& aRect ) const; - - /** - * Gets the number of controls contained in a compound control. - * @return The number of component controls contained by this control. - */ - TInt CountComponentControls() const; - - /** - * Gets an indexed component of a compound control. - * @param aIndex The index of the control. - * @return The component control with an index of aIndex. - */ - CCoeControl* ComponentControl( TInt aIndex ) const; - - /** - * Gets an indexed component of a compound control. - * @param aIndex The index of the control. - * @return The component control with an index of aIndex. - */ - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - - /** - * From CoeControl. - * Handles a change to the control's resources. - * - * @param aType A message UID value. - */ - void HandleResourceChange( TInt aType ); - -private: // data - - /** - * The control array store all sub-controls - * Own - */ - CArrayPtrFlat* iControlArray; - - /** - * The array to store the current status for each radio button - * Own - */ - RArray iStatusArray; - - /** - * The text array to store the text for each radio button - * Own - */ - RPointerArray iTextArray; - - /** - * The bitmap for selected radio button. - * Own - */ - CFbsBitmap* iRadioButtonSelectedBmp; - - /** - * The bitmap mask for selected radio button. - * Own - */ - CFbsBitmap* iRadioButtonSelectedBmpm; - - /** - * The bitmap for non-selected radio button. - * Own - */ - CFbsBitmap* iRadioButtonNonSelectedBmp; - - /** - * The bitmap mask for non-selected radio button. - * Own - */ - CFbsBitmap* iRadioButtonNonSelectedBmpm; - - /** - * The observer used to notify the current selected item changed - * Not own - */ - MTruiRadioButtonObserver* iObserver; - - /** - * The observer used to notify the current selected item changed - * Not own - */ - TSelectionType iSelectionType; - - /** - * Array to store TAknLayoutRect for icons - * - * Own - */ - RArray iIconLayout; - - TBool iTactileSupported; - - /** - * MultilineLayout for edwin - * - */ - TAknMultiLineTextLayout iMultilineLayout; - }; - -#endif // C_TRUIAPPRADIOBUTTON_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiappui.h --- a/textinput/peninputhwrtrui/inc/truiappui.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: UI class of TrainingUI -* -*/ - - -#ifndef C_TRUIAPPUI_H -#define C_TRUIAPPUI_H - -#include -#include - -// Forward reference -class CTruiMainView; -class CTruiShortcutsView; -class CTruiShortcutEditView; -class CAknNavigationDecorator; -class CTruiEngine; -class CTruiShortcutEditTextView; -class CTruiInfoMessageView; - -/** - * Instance of CTruidemoAppUi is the User Interface part of the AVKON - * application framework for the TrainingUI application - * - * @code - * CEikAppUi* appUi = new (ELeave) CTruiAppUi; - * @endcode - * - * @lib avkon.lib eikcore.lib eiksrv.lib - */ -class CTruiAppUi : public CAknViewAppUi, public MAknTabObserver - { -public: - /** - * Perform the second phase construction of a CTruiAppUi object - */ - void ConstructL(); - - /** - * Perform the first phase of two phase construction. - */ - CTruiAppUi(); - - /** - * Destroy the object and release all memory objects - */ - ~CTruiAppUi(); - - /** - * Get hand writing engine - * - * @return Pointer to CTruiEngine's instance - */ - CTruiEngine* HwrEngine() const; - - /** - * Get hand Navigation Decorator - * - * @return The pointer to navigation pane. - */ - CAknNavigationDecorator* GetNaviDecorator() const; - - /** - * Close the navi pane - */ - void CloseNaviPaneL(); - - /** - * Show the navi pane - */ - void ShowNaviPaneL(); - - /** - * Show the title pane - * - * @param aTitle: The text to be displayed in Tilte pane - */ - void ShowTitlePaneL( const TDesC& aTitle ); - -// from CAknViewAppUi - - /** - * Handle user menu selections - * - * @param aCommand the enumerated code for the option selected - */ - void HandleCommandL( TInt aCommand ); - - // from MAknTabObserver - /** - * Handle active tab changed - * - * @param aIndex the index of active tab. - */ - void TabChangedL( TInt aIndex ); - -private: - - /** - * Create navigation pane. - * - * @param aResourceId The resource Id. - * @return The pointer to navigation pane. - * - */ - CAknNavigationDecorator* CreateNavigationTabL( const TInt aResourceId, - const TInt aDefaultActive ); - -private: // data - /** - * iMainView is the view that allows user to train HWR engine to - * recognize user's own writing style - * Own - */ - CTruiMainView* iMainView; - - /** - * iShortcutsView is the view that allows user to manage the shortcuts - * Own - */ - CTruiShortcutsView* iShortcutsView; - - /** - * iShortcutEditView is the view that allows user to edit the shortcuts - * Own - */ - CTruiShortcutEditView* iShortcutEditView; - - /** - * Pointer to shortcut edit text view - * on which users can alter shortcut's text. - * Own - */ - CTruiShortcutEditTextView* iShortcutEditTextView; - - /** - * Pointer to info message view for shortcut wizard. - * Own - */ - CTruiInfoMessageView* iInfoMessageView; - - /** - * iNaviDecorator is navigation pane. - * Allow users to switch views between main view and shortcut main view. - * Own - */ - CAknNavigationDecorator* iNaviDecorator; - - CAknNavigationDecorator* iEmptyNaviDecorator; - - /** - * hand writing engine - * Own - */ - CTruiEngine* iEngine; - }; - - -#endif // C_TRUIAPPUI_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truicontainerbase.h --- a/textinput/peninputhwrtrui/inc/truicontainerbase.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiContainerBase class of TrainingUI -* -*/ - - -#ifndef C_TRUICONTAINERBASE_H -#define C_TRUICONTAINERBASE_H - - -#include -#include - -class CTruiAppUi; -class CTruiEngine; -class MCoeControlObserver; -class CAknButton; -class CAknToolbar; -class TAknLayoutText; -class CAknView; - -// Varity of landscape -const TInt KLandscapeVarity = 1; - -// Varity of portrait -const TInt KPortraitVarity = 0; - -const TInt KLabelMaxLines = 20; - -/* Key lead to the setting of always displaying wizard view*/ -const TUint32 KAlwaysDisplayWizardKey = 0x00000001; - -_LIT( KLineBreak, "\n" ); - -const TUid KAknfepUID = { 0x100056de }; - -const TInt KExtraSize = 10; - -/** - * Base class for contrainers - * All contrainer need to be inherited from this class - * - */ -class CTruiContainerBase : public CCoeControl - { -public: - - /** - * Destructor. - */ - virtual ~CTruiContainerBase(); - - /** - * Get the origin size in which input the model for preset symbols. - * - * @return The size in which to input preset symbols. - */ - static TSize OriginSymbolSize(); - inline void SetView( CAknView* aView ) - { - iView = aView; - }; -protected: - CTruiContainerBase(); - - /** - * Wrap the text to fit the minisize of Label - * - * @param aLabel The pointer to the label. - * @param aText The origin text - * @param aMaxLines The max line of the wrapped text. - * @param aWrappedText Store the wrapped text. - * @return The number of lines. - */ - TInt WrapLabelText( const CEikLabel* aLabel, const TDesC& aText, - TInt aMaxLines, HBufC* aWrappedText ); - - /** - * Wrap the text to fit the minisize of Label - * - * @param aLayoutText Layout of text. - * @param aText The origin text - * @param aMaxLines The max line of the wrapped text. - * @param aWrappedText Store the wrapped text. - * @return The number of lines. - */ - TInt WrapLabelText( const TAknLayoutText& aLayoutText, const TDesC& aText, - TInt aMaxLines, HBufC* aWrappedText ); - - /** - * Wrap the text to fit Label - * - * @param aFont Font of text. - * @param aText The origin text need to be wrapped - * @param aLineWidthArray Line width array. - * @param aWrappedText Store the wrapped text. - */ - void WrapLabelTextL( const CFont* aFont, const TDesC& aText, - const RArray& aLineWidthArray, - HBufC* aWrappedText ); - - - /** - * Create skin specified button from resource - * - * @param aResourceId The resource Id. - * @param aParent The parent of control - * @param aObserver The observer of control - * @return Instance of aknbutton. - */ - CAknButton* CreateButtonL( TInt aResourceId, - const CCoeControl* aParent, - MCoeControlObserver* aObserver ); - - /** - * Add skin specified buttons into toolbar - * - * @param aToolbar The toolbar will contain skin-specified buttons. - * @param aResourceId Button groups resource id. - */ - void AddButtonsToToolbarL( CAknToolbar* aToolbar, TInt aResourceId ); - - /** - * Return current keyboard mode. - * - * @return 0: ITU-T; 1: QWERTY. - */ - TInt CurrentKeyBoardModeL(); - - /** - * Read setting from ini file to decide if display wizard view. - * - * @param aKey Key value in ini file. - * @param aValue Value of the key. - */ - void GetSettingFromIniFileL( TUint32 aKey, TInt& aValue ); - - /** - * Save settings into file - * - * @param aKey Key value to specify one setting - * @param aValue Value to be stored - */ - void SaveSettingIntoIniFileL( TUint32 aKey, TInt aValue ); - - /** - * Get cached color of skin for label control - * - * @param aColor The color of Label will be set - */ - TInt GetCachedLabelTextColor( TRgb& aColor ); - - /** - * Get cached color of skin for icon - * - * @param aColorId The color id of icon color group - * @param aColorIndex The color index in the color group - * @param aColor On return, the catched color. - */ - TInt GetCachedIcontColor( TRgb& aColor, const TAknsItemID& aColorId, TInt aColorIndex ); - - /** - * Construct icons from resource. - * - * @param aResourceId Resource Id. - * @return The constructed icon - */ - CGulIcon* ConstructIconFromResourceL( TInt aResourceId ); - - /** - * From CoeControl. - * Handles a change to the control's resources. - * - * @param aType A message UID value. - */ - void HandleResourceChange( TInt aType ); - -private: - /** - * Create skin specified button from resource - * - * @param aReader The resource reader. - * @return Instance of aknbutton. - */ - CAknButton* ConstructButtonFromResourceL( TResourceReader& aReader ); - - /** - * Wrap the text to fit the minisize of Label - * - * @param aFont Font of text. - * @param aWidth Width of text. - * @param aText The origin text - * @param aMaxLines The max line of the wrapped text. - * @param aWrappedText Store the wrapped text. - * @return The number of lines. - */ - TInt DoWrapLabelText( const CFont* aFont, TInt aWidth, - const TDesC& aText, - TInt aMaxLines, - HBufC* aWrappedText ); - - -protected: // data - - /** - * Point to the controlor class of the application. - * Not Own. - */ - CTruiAppUi* iAppUi; - - /** - * hand writing engine - * Not Own. - */ - CTruiEngine* iEngine; - CAknView* iView; - }; - -#endif // C_TRUICONTAINERBASE_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truidocument.h --- a/textinput/peninputhwrtrui/inc/truidocument.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declares document for TrainingUI -* -*/ - - -#ifndef C_TRUIDOCUMENT_H -#define C_TRUIDOCUMENT_H - -#include - -// Forward references -class CTruiAppUi; -class CAknApplication; - -/** - * Instance of class CTruiDocument is the Document part of the AVKON - * application framework for the TrainingUI application - * - * @code - * CApaDocument* document = new (ELeave) CTruiDocument(*this); - * @endcode - * - * @lib avkon.lib eikcore.lib eiksrv.lib - */ -class CTruiDocument : public CAknDocument - { -public: - /** - * Perform the first phase of two phase construction - * - * @param aApp application creating this document - */ - CTruiDocument( CAknApplication& aApp ); - - /** - * Destroy the object and release all memory objects - */ - ~CTruiDocument(); - - - /** - * Create a CTruiAppUi object and return a pointer to it - * - * @return a pointer to the created instance of the AppUi created - */ - CEikAppUi* CreateAppUiL(); - - }; - -#endif // C_TRUIDOCUMENT_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiengine.h --- a/textinput/peninputhwrtrui/inc/truiengine.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,484 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiEngine class of TrainingUI -* -*/ - - -#ifndef C_TRUIENGINE_H -#define C_TRUIENGINE_H - -#include -#include - -const TInt KShortcutMaxLength = 164; -class CPtiEngine; -class MTruiEngine; -class TLanguageRelation; -class CEikonEnv; - -/** - * CTruiEngine view class. - * - */ -class CTruiEngine : public CBase - { -public: - /** - * Two phase construction. - * - * @return Pointer to CTruiEngine's instance - */ - static CTruiEngine* NewL( CEikonEnv* aEikonEnv ); - - /** - * Two phase construction. - * - * @return Pointer to CTruiEngine's instance - */ - static CTruiEngine* NewLC( CEikonEnv* aEikonEnv ); - - /** - * Destroy the object and release all memory objects - */ - virtual ~CTruiEngine(); - - /** - * Get the current input language - * - * @return Current input language - */ - inline TLanguage InputLanguage() const; - -//Language Script - /** - * Set current language script - * - * @param aIndex The index of language script in the array named iSupportedScript - */ - void SetLanguageScriptByIndexL( TInt aIndex ); - - /** - * Get name list of all supported language scripts - * - * @return CDesCArray* The name list - */ - inline const CDesCArray* LanguageScriptName(); - - /** - * Get id of supported language script - * - * @return RArray list of the script id - */ - inline const RArray& SupportedLanguageScript(); - - /** - * Get enum ID of the current language script - * - * @return ID of the current language - */ - inline TInt CurrentLanguageScript() const; - -//Character Range - /** - * Set current character range - * - * @param aIndex The index of character range in the array named iSupportedRange - */ - void SetCharacterRangeByIndexL( TInt aIndex ); - - /** - * Get name list of all supported character range - * - * @return CDesCArray* The name list - */ - CDesCArray* GetCharacterRangeName(); - - /** - * Get enum ID of the current character range - * - * @return TInt ID of the character range - */ - TInt GetCurrentCharacterRange(); - - /** - * Get enum ID of the supported character ranges - * - * @return Reference to the array saving IDs of the supported range - */ - inline const RArray& GetCurrentSupportedRangesId(); - - /** - * Transform character range to engine's subrange - */ - void SetSubrange(); - -//Character Set - - /** - * Get current character set - * - * @return HBufC* The string contained character set - */ - const HBufC* CharacterSet(); - - /** - * Check if character has model - * - * @param aLanguageScript Where the character is come from - * @param aChar The character which is checked - * @return TBool True means this character has model - * False means this character doesn't has model yet - */ - TBool CheckCharacterModel( const TDesC& aChar ); - - /** - * Get character model - * - * @param aChar Get this character's model - * @param aModel Array of points where the character's model is stored. - */ - void GetCharacterModelL( const TDesC& aChar, RArray& aModel ); - - /** - * Set character model - * - * @param aChar Set model to this character - * @param aModel Array of points where the character's model is stored. - * @param aSimilarMsg Text exists in the HWREngine with the similar model. - * @return none, if the symbol model is invalid, leave with KErrAlreadyExists - */ - void SetCharacterModelL( const TDesC& aChar, - RArray& aModel, - TDes& aSimilarMsg ); - - /** - * Delete character model - * - * @param aChar Delete this character's model - * @return TInt Error value. If no error occurred, KErrNone is returned - */ - TInt DeleteCharacterModel( const TDesC& aChar ); - -//Shortcut - - /** - * Check if shortcut has model - * - * @param aText The shortcut which is checked - * @return TBool True means this shortcut has model - * False means this shortcut doesn't has model yet - */ - TBool CheckShortcutModel( const TDesC& aText ); - - /** - * Change the text of an existing shortcut - * - * @param aOldText The text of an existing shortcut - * @param aNewText The new text of the shortcut - */ - void ChangeShortcutTextL( const TDesC& aNewText ); - - /** - * Set current editing shortcut - * - * @param sShortcut text of the shortcut - * @return TInt Error value. If no error occurred, KErrNone is returned - */ - TInt SetShortcut( const TDesC& aText ); - - /** - * Get current edited shortcut - * - * @return TDes shortcut text - */ - inline TDes& Shortcut(); - - /** - * Get all shortcuts from HWR engine - * - * @return Pointer to iShortcutList to contain all existing shortcut - */ - inline CDesCArray* ShortcutTextList(); - - /** - * Save shortcut text and its assigned character model into PTI Engine - * - * @param aText Save this Shortcut's model - * @param aModel Array of points where the Shortcut's model is stored. - * @param aSimilarMsg Text exists in the HWREngine with the similar model. - * @return none, if the symbol model is invalid, leave with KErrAlreadyExists - */ - void SaveShortcutL( const TDesC& aText, - RArray& aModel, - TDes& aSimilarMsg ); - - /** - * Delete Shortcut model - * - * @param aText Delete this Shortcut's model - * @return TInt Error value. If no error occurred, KErrNone is returned - */ - TInt DeleteShortcut( const TDesC& aText ); - - /** - * Update Shortcut list - * - */ - void UpdateShortcutListL(); - - /** - * Set edit state - * - * @param aNew: ETrue, perform the function of adding new shortcut. - * EFalse, perform the function of editting old shortcut. - */ - inline void NewShortcut( TBool aNew ); - - /** - * Get edit state - * - */ - inline TBool NewShortcut(); - - /** - * Set if display shortcut wizard view. - * - * @param aIsDisplay ETrue: Display shortcut wizard view - */ - inline void SetDisplayWizard( TBool aIsDisplay ); - - /** - * Get if display shortcut wizard view - * - * @return ETrue: Display shortcut wizard view - */ - inline TBool DisplayWizard() const; - - /** - * Set the current selected index - * - * @param aSelectedIndex currently selected index of shortcuts - */ - inline void SetCurrentSelectedIndex( TInt aSelectedIndex ); - - /** - * Get the current selected index - * - * @return aSelectedIndex currently selected index of shortcuts - */ - inline TInt CurrentSelectedIndex(); - - /** - * Get guiding line pos - * - * @param aSize The size of WritingBox - * @param aTop The vertical coordinate of top guiding line - * @param aBottom The vertical coordinate of bottom guiding line - * @return TInt Error value. If no error occurred, KErrNone is returned - */ - TInt GetGuidingLinePos( const TSize& aSize, TInt& aTop , TInt& aBottom); - - /** - * Get the number of the maximum of shortcuts - * - * @return TInt The number of the maximum of shortcuts - */ - TInt MaxShortCutLength(); - - /** - * Get trails assigned to the specified shortcut. - * - * @param aText The specified shortcut text - * @param aModel Trails of the shortcut. - * @param aUnicode The assigned preset text if it is a preset shortcut, - * otherwise, it is 0; - */ - void GetShortcutModelL( const TDesC& aText, RArray& aModel, TUint& aUnicode ); - - /** - * Save preset shortcuts. - * - * @param aUnicode The assigned preset text. - * @param aShortcut The shortcut to be save. - */ - void SavePresetShortcutL( TUint aUnicode, const TDesC& aShortcut ); - - /** - * Get trails assigned to a preset text. - * - * @param aUnicode The unicode of the preset text. - * @param aModel Store trails of the preset text. - * @param aShortcut Indicate whether the preset text has been assigned to a shortcut text. - * If KNullDesC, it is not in use. - */ - void GetPresetSymbolByUnicodeL( TUint aUnicode, RArray& aModel, TDes& aShortcut ); - - /** - * Return all unicodes of preset text stored in PTI engine - * - * @param aPresets All preset text's unicodes are stored in this array. - */ - void GetAllPresetSymbolsL( RArray& aPresets ); - -private: - - /** - * Perform the first phase of two phase construction. - */ - CTruiEngine( CEikonEnv* aEikonEnv ); - - /** - * Perform the second phase construction of a CTruidemoAppUi object - */ - void ConstructL(); - - /** - * Initialize the table used to map language to language script - * @param aResourceId ResourceId of Language script set. - * @param aLanguageRelation Store the mappint relation. - */ - void InitLanguageRelationL( TInt aResourceId, - RArray& aLanguageRelation ); - - /** - * Initialize the supported language script. - * @param aSupportedScript Store the suppotred script. - * @param aEngine PtiEngine from which get supported input language. - * @param aLanguageRelation Mapping relation used to convert language - * into language script. - */ - void InitSupportedLanguageScriptL( RArray& aSupportedScript, - CPtiEngine* aEngine, - const RArray& aLanguageRelation ); - - /** - * Get the active language script from the active input language - * @param aLanguageCode Currently active input language code. - * @param aLanguageRelation Mapping relation used to convert language - * into language script. - */ - TInt GetActiveLanguageScript( TInt aLanguageCode, - const RArray& aLanguageRelation ); - - /** - * Get the resourc id of lower case of Cyrillic according to the current input language - * @param aLanguage Currently input language. - * @return resource id - */ - TInt CyrillicLowerResourceId( TLanguage aLanguage ); - - /** - * Get the resourc id of upper case of Cyrillic according to the current input language - * @param aLanguage Currently input language. - * @return resource id - */ - TInt CyrillicUpperResourceId( TLanguage aLanguage ); - -private: - - /** - * Current edited shortcut - */ - TBuf iShortcut; - - /** - * Array of all supported language script - * Own - */ - RArray iSupportedScript; - - /** - * Current language script - */ - TInt iCurrentScript; - - /** - * Array of all supported character range - * Own - */ - RArray iSupportedRange; - - /** - * Array of the name of all supported character range - * Own - */ - CDesCArray* iRangeName; - - /** - * Current character range - */ - TInt iCurrentRange; - - /** - * String of character set - * Own - */ - HBufC* iCharacterSet; - - /** - * Array of the shortcut - * Own - */ - CDesCArray* iShortcutList; - - /** - * Indicate if current edited shortcut is new created - */ - TBool iNewShortcut; - - /** - * The currently selected index of shortcuts - */ - TInt iSelectedShortcut; - - /** - * PtiEngine - * Own - */ - CPtiEngine* iEngine; - - /** - * Interface trui used in PtiEngine - * Not own - */ - MTruiEngine* iPtiEngine; - - /** - * Current subrange - */ - TInt iSubrange; - - /** - * Pointer to eikon enviroment. - * Not own - */ - CEikonEnv* iEnv; - - /** - * Check if need to display shortcut wizard view - */ - TBool iIsDisplay; - - /** - * Current input language - */ - TLanguage iInputLanguage; - }; - -#include "truiengine.inl" - -#endif // C_TRUIENGINE_H - - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiengine.inl --- a/textinput/peninputhwrtrui/inc/truiengine.inl Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: implementation of inline function of CTruiEngine -* -*/ - - -// --------------------------------------------------------------------------- -// Get enum ID of the current language script -// --------------------------------------------------------------------------- -// -inline TInt CTruiEngine::CurrentLanguageScript() const - { - return iCurrentScript; - } - -// --------------------------------------------------------------------------- -// Get name list of all supported character range -// --------------------------------------------------------------------------- -// -inline CDesCArray* CTruiEngine::GetCharacterRangeName() - { - return iRangeName; - } - -// --------------------------------------------------------------------------- -// Get enum ID of the current character range -// --------------------------------------------------------------------------- -// -inline TInt CTruiEngine::GetCurrentCharacterRange() - { - return iCurrentRange; - } - -// --------------------------------------------------------------------------- -// Get enum ID of the supported character ranges -// --------------------------------------------------------------------------- -// -inline const RArray& CTruiEngine::GetCurrentSupportedRangesId() - { - return iSupportedRange; - } - -// --------------------------------------------------------------------------- -// Get current character set -// --------------------------------------------------------------------------- -// -inline const HBufC* CTruiEngine::CharacterSet() - { - return iCharacterSet; - } - -// --------------------------------------------------------------------------- -// Get current edited shortcut -// --------------------------------------------------------------------------- -// -inline TDes& CTruiEngine::Shortcut() - { - return iShortcut; - } - -inline const RArray& CTruiEngine::SupportedLanguageScript() - { - return iSupportedScript; - } - -// --------------------------------------------------------------------------- -// Set edit state -// --------------------------------------------------------------------------- -// -inline void CTruiEngine::NewShortcut( TBool aNew ) - { - iNewShortcut = aNew; - } - -// --------------------------------------------------------------------------- -// Get edit state -// --------------------------------------------------------------------------- -// -inline TBool CTruiEngine::NewShortcut() - { - return iNewShortcut; - } - -// --------------------------------------------------------------------------- -// Set if display shortcut wizard view. -// --------------------------------------------------------------------------- -// -inline void CTruiEngine::SetDisplayWizard( TBool aIsDisplay ) - { - iIsDisplay = aIsDisplay; - } - -// --------------------------------------------------------------------------- -// Get if display shortcut wizard view -// --------------------------------------------------------------------------- -// -inline TBool CTruiEngine::DisplayWizard() const - { - return iIsDisplay; - } - -// --------------------------------------------------------------------------- -// Set the current selected index -// --------------------------------------------------------------------------- -// -inline void CTruiEngine::SetCurrentSelectedIndex( TInt aSelectedIndex ) - { - iSelectedShortcut = aSelectedIndex; - } - -// --------------------------------------------------------------------------- -// Get the current selected index -// --------------------------------------------------------------------------- -// -inline TInt CTruiEngine::CurrentSelectedIndex() - { - return iSelectedShortcut; - } - -// --------------------------------------------------------------------------- -// Get shortcut list -// --------------------------------------------------------------------------- -// -inline CDesCArray* CTruiEngine::ShortcutTextList() - { - return iShortcutList; - } - -// --------------------------------------------------------------------------- -// Get the current input language -// --------------------------------------------------------------------------- -// -inline TLanguage CTruiEngine::InputLanguage() const - { - return iInputLanguage; - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truihelp.h --- a/textinput/peninputhwrtrui/inc/truihelp.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Define help topic -* -*/ - - -#ifndef TRUIHELP_H -#define TRUIHELP_H - -// Main view topic in help application -_LIT( HWRT_HLP_MAIN_VIEW,"HWRT_HLP_MAIN_VIEW" ); - -// Shortcuts view topic in help application -_LIT( HWRT_HLP_SHORTCUTS,"HWRT_HLP_SHORTCUTS_MAIN_VIEW" ); - -// Shortcut edit view topic in help application -_LIT( HWRT_HLP_SHORTCUTS_EDIT_VIEW,"SHORTCUTS_EDIT_VIEW" ); - -#endif - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truihwrbox.h --- a/textinput/peninputhwrtrui/inc/truihwrbox.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,593 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: hand writing box - control in Training UI application -* -*/ - - -#ifndef C_TRAININGUIHWRBOX_H -#define C_TRAININGUIHWRBOX_H - -// includes -#include -#include // Tooltip - -// forward declarations -class MTruiHwrBoxObserver; -class CAknInfoPopupNoteController; -class CAknsBasicBackgroundControlContext; - -const TPoint KTail( 0xFFFF,0 ); - -// Class declaration -/** - * CTruiHwrBox - * CTruiHwrBox is new component, which allows input and output a character - * model by strokes - * @lib avkon.lib - */ -class CTruiHwrBox : public CCoeControl, public MAknInfoPopupNoteObserver - { -public: - - /* Flags for hwrbox state. HwrBox must be one and only one state */ - enum TBoxState - { - /* Already has model but doesn't play the animation */ - EExistModelStop = 0, - /* Already has model and play the animation */ - EExistModelDraw, - /* Ready to input an new character model */ - ENewModelStop, - /* Use is inputting an new character model */ - ENewModelDraw, - }; - - enum THwrBoxFlag - { - ENoFrameHwrBox = 0x00000000, - EFrameHwrBox = 0x00000001, - EReadOnlyHwrBox = 0x00000002, - EWritableHwrBox = 0x00000004 - }; - -public: - - /** - * Two-phased constructor. - * @param aParent the parent control for choice list - * @param aRect the extent of the control - * @return Pointer to CTruiHwrBox's instance - */ - static CTruiHwrBox* NewL( CCoeControl* aParent, - MTruiHwrBoxObserver* aHwrBoxObserver = NULL, - MAknsControlContext* aBgContext = NULL ); - - /** - * Two-phased constructor. - * @param aParent the parent control for choice list - * @param aRect the extent of the control - * @return Pointer to CTruiHwrBox's instance - */ - static CTruiHwrBox* NewLC( CCoeControl* aParent, - MTruiHwrBoxObserver* aHwrBoxObserver = NULL, - MAknsControlContext* aBgContext = NULL ); - - /** - * Destructor - */ - ~CTruiHwrBox(); - - /** - * Periodic Callback function - * To save the model - * - * @param aObject: Transfer the pointer to CTruiHwrBox into this function - * @return system-wide err code - */ - static TInt TimeToSaveL( TAny* aObject ); - - /** - * Save the new inputting model - */ - void SaveModelL(); - - /** - * Save the new inputting model by manual. - */ - void SaveModelByManuallyL(); - - /** - * Periodic Callback function - * To draw the next piont in the animation - * - * @param aObject: Transfer the pointer to CTruiHwrBox into this function - * @return system-wide err code - */ - static TInt TimeToDrawNextL( TAny* aObject ); - - /** - * Draw the next piont in the animation - */ - void DrawNextL(); - - /** - * Begin to draw the existing model - * - * @param aIsScale ETrue scale points to the fitable size before playing. - * @param aRefSize The size as the reference coordination for scaling. - */ - void PlayAnimation( TBool aIsScale = EFalse, const TSize& aRefSize = TSize( 1, 1 ) ); - - /** - * clear the existing model - */ - void ClearExistModel(); - - /** - * Set HwrBox observer - * @param aHwrBoxObserver the observer - */ - void SetHwrBoxObserver( MTruiHwrBoxObserver* aHwrBoxObserver ); - - /** - * Get the Hwrbox's model - * - * @return Reference to iPointArrayModel - */ - RArray& Model(); - - /** - * Get the Hwrbox's state - * - * @return Current HWR box's state - */ - TInt BoxState() const; - - /** - * Pause the playing of animation - */ - void PausePlaying(); - - /** - * Resume the playing of animation - */ - void ResumePlaying(); - - /** - * Set guiding line - * - * @param aTop The vertical coordinate of top guiding line - * @param aBottom The vertical coordinate of bottom guiding line - * @return system-wide err code - */ - TInt SetGuidingLine( TInt aTop, TInt aBottom ); - - /** - * Show trails statically - * - * @param aPointArray The points that will be shown in HwrBox - */ - void ShowTrails( const RArray& aPointArray, - TBool aIsScale = EFalse, - const TSize& aRefSize = TSize( 1, 1 ) ); - - /** - * Show tooltip - * - * @param aText The tooltip tex. - * @param aPosition The tooltip's location. - * @param aBeforeTimeout The time internal that will popup tooltip - * @param aInViewTimeout The time internal that will hide tooltip - */ - void ShowTooltipL( const TDesC& aText, - const TPoint& aPosition, - const TInt aBeforeTimeout, - const TInt aInViewTimeout ); - - /** - * Set the position for tooltip - * - * @param aPosition The tooltip's location. - */ - void SetTooltipPosition( const TPoint& aPosition ); - - /** - * Hide tooltip - * - */ - void HideInfoPopupNote(); -// From CCoeControl - - /** - * From CCoeControl. Handles key events. - * @param aKeyEvent the key event - * @param aType The type of key event - * @return Indicates whether or not the keyevent was used by this control - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * From CCoeControl. Draws control to given area - * @param aRect The rectangle that should be drawn by the control. - */ - void Draw( const TRect& aRect ) const; - - /** - * Draw character model - */ - void DrawModel(); - - /** - * Set box state from outside - * - * @param aReady ture means model is loaded - * false means no model is loaded - */ - void ModelIsReady( TBool aReady = ETrue ); - - TRect DrawableRect() const; - - inline void SetHwrBoxFlag( TUint aFlag ) - { - iFlag = aFlag; - }; - - /** - * Set flag to indicate if draw bottom guideline - * - * @param aBottomGuideLineDisplay ETrue means draw bottom guideline - */ - inline void SetDisplayBottomGuideLine( TBool aBottomGuideLineDisplay ) - { - iBottomGuideLineDisplay = aBottomGuideLineDisplay; - }; - - /** - * Set flag to indicate if draw top guideline - * - * @param aTopGuideLineDisplay ETrue means draw bottom guideline - */ - inline void SetDisplayTopGuideLine( TBool aTopGuideLineDisplay ) - { - iTopGuideLineDisplay = aTopGuideLineDisplay; - }; - - /** - * Set editing mode to readonly or writable - * - * @param aReadOnly ETrue means hwrbox is readonly - * EFalse means hwrbox is loaded - */ - void SetHwrBoxReadOnly( TBool aReadOnly ); - -// from CCoeControl - - /** - * From CCoeControl. Handles pointer events - * @param aPointerEvent the pointer event be be handled. - */ - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - -protected: - - - /** - * From CoeControl. - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * Handles a change to the control's resources. - * - * @param aType A message UID value. - */ - void HandleResourceChange( TInt aType ); - - /** - * Handle focus changed - * - */ - void FocusChanged( TDrawNow aDrawNow ); - -private: - - /** - * C++ Default Constructor - */ - CTruiHwrBox(); - - /** - * 2nd phase constructor - * @param aParent the parent control for choice list - * @param aRect the extent of the control - */ - void ConstructL( CCoeControl* aParent, - MTruiHwrBoxObserver* aHwrBoxObserver = NULL, - MAknsControlContext* aBgContext = NULL ); - - /** - * Check if the point is contained in drawing area - * - * @param aPoint The point which to be checked - * @return ETrue: The point is in drawing area - * EFalse: The point isn't in drawing area - */ - TBool IsContained( const TPoint& aPoint ) const; - - /** - * Adjust shortcut model's point to fit the popup hwr box. - * @param aOriginSize Origin size of which input character model. - * @param aRealSize Real popup hwr box's size. - * @param aModel The model to be adjuested. - */ - void ScaleModel( const TSize& aOriginSize, - const TSize& aRealSize, - RArray& aModel ); - - /** - * Draws all points. - */ - void DrawTrails( CWindowGc& aGc ) const; - - /** - * Set context for this control. - * - * @param aGc Handle for CWindowGc - */ - void PrepareContext( CWindowGc& aGc ) const; - - /** - * Load bitmaps for border. - * - */ - void LoadBorderBitmapsL(); - - /** - * Load bitmaps for shadows. - * - */ - void LoadShadowBitmapsL(); - - /** - * Load bitmaps for guidelines. - * - */ - void LoadGuideLineBitmapsL(); - - /** - * Load layouts for borders from LAF. - * - * @param aVarity Varity for LAF - */ - void LoadBorderLayout( TInt aVarity ); - - /** - * Load layouts for shadows from LAF. - * - * @param aVarity Varity for LAF - */ - void LoadShadowLayout( TInt aVarity ); - - /** - * Load layouts for guidelines from LAF. - * - * @param aVarity Varity for LAF - */ - void LoadGuideLineLayout( TInt aVarity ); - - /** - * Draw borders. - * - */ - void DrawBorders( CWindowGc& aGc ) const; - - /** - * Draw shadows. - * - */ - void DrawShadows( CWindowGc& aGc ) const; - - /** - * Draw guideliens. - * - */ - void DrawGuideLines( CWindowGc& aGc ) const; - -// From MAknInfoPopupNoteObserver - /** - * Handles events reported from info popup note. - * @param aController The controller that controls the note, from - * where the event originates. - * @param aEvent The event. - */ - void HandleInfoPopupNoteEvent( CAknInfoPopupNoteController* aController, - TAknInfoPopupNoteEvent aEvent ); - -private: // data - - /** - * When this timer time out, the inputting of new character is over. - * Own. - */ - CPeriodic* iTimeToSave; - - /** - * To control drawing speed - * Own. - */ - CPeriodic* iTimeToDrawNext; - - /** - * Contain the points need to be drawn on screen - * Own - */ - RArray iPointArrayDraw; - - /** - * Contain the character model points - * Own - */ - RArray iPointArrayModel; - - /** - * Current control state - */ - TBoxState iBoxState; - - /** - * Observe user's input - * Not own - */ - MTruiHwrBoxObserver* iHwrBoxObserver; - - /** - * Use this attribute to count the last animated point - * zero implies the first point - */ - TInt iLastAnimatedPoint; - - /** - * Guideline top left point - */ - TPoint iGuideLineTopL; - - /** - * Guideline top right point - */ - TPoint iGuideLineTopR; - - /** - * Guideline bottom left point - */ - TPoint iGuideLineBottomL; - - /** - * Guideline bottom right point - */ - TPoint iGuideLineBottomR; - - /** - * Indicate pen position - */ - TBool iPenInRect; - - /** - * Flag of training box. - */ - TUint iFlag; - - /** - * Component used to show tooltip - * Own. - */ - CAknInfoPopupNoteController* iTooltip; - - /** - * Check if draw bottom guideline. - */ - TBool iBottomGuideLineDisplay; - - /** - * Check if draw bottom guideline. - */ - TBool iTopGuideLineDisplay; - - /** - * Pointer array to store pointers to bitmaps of borders - * - * Own - */ - RPointerArray iBorderBitmaps; - - /** - * Pointer array to store pointers to mask bitmaps of borders - * - * Own - */ - RPointerArray iBorderBitmapMasks; - - /** - * Array to store pointers to TAknLayoutRect for borders - * - * Own - */ - RArray iBorderLayout; - - - /** - * Pointer array to store pointers to bitmaps of shadows - * - * Own - */ - RPointerArray iShadowBitmaps; - - /** - * Pointer array to store pointers to mask bitmaps of shadows - * - * Own - */ - RPointerArray iShadowBitmapMasks; - - /** - * Array to store pointers to TAknLayoutRect for shadows - * - * Own - */ - RArray iShadowLayout; - - /** - * Pointer array to store pointers to bitmaps of guideline - * - * Own - */ - RPointerArray iGuideLineBitmaps; - - /** - * Pointer array to store pointers to mask bitmaps of guideline - * - * Own - */ - RPointerArray iGuideLineBitmapMasks; - - /** - * Array to store pointers to TAknLayoutRect for guidelines - * - * Own - */ - RArray iGuideLineLayout; - - /** - * Rect of drawable for trails; - * - */ - TRect iDrawabelRect; - - /** - * Color of pen; - * - */ - TRgb iPenColor; - - - CAknsBasicBackgroundControlContext* iBgContext; - - TBool iStartSave; - }; - -#endif // TRAININGUIHWRBOX_H - -// end of file - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truihwrboxobserver.h --- a/textinput/peninputhwrtrui/inc/truihwrboxobserver.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Control's observer -* -*/ - - -#ifndef M_TRUIHWRBOXOBSERVER_H -#define M_TRUIHWRBOXOBSERVER_H - -// CLASS DECLARATION - -/** -* MTruiHwrBoxObserver. -* An instance of a class derived from MTrainingUIHwrBoxObserver is an object -* which can be informed when an event defined in this interface occured. -*/ -class MTruiHwrBoxObserver - { -public: - enum TMessageType - { - EModelExist, - EModelDelete - }; - /** - * TimeOut - * Handle the event when a time out occurs. - * @param aModel the array of points where the model is stored - */ - virtual void SaveNewModelL() = 0; - - /** - * HandleEventL - * Handle the message event from the HwrBox - * @param aMessage According to the aMessage to handle the event - */ - virtual void HandleEventL( TMessageType aMessage ) = 0; - }; - -#endif //M_TRUIHWRBOXOBSERVER_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiinfomessagecontainer.h --- a/textinput/peninputhwrtrui/inc/truiinfomessagecontainer.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiInfoMessageContainer class of TrainingUI -* -*/ - - -#ifndef C_TRUIINFOMESSAGECONTAINER_H -#define C_TRUIINFOMESSAGECONTAINER_H - -#include -#include "truicontainerbase.h" - -class CAknsBasicBackgroundControlContext; -class CEikButtonGroupContainer; -class CEikLabel; -class CTruiRadioButton; -class CEikEdwin; - -/** - * CTruiInfoMessageContainer container control - * Used as the component to shortcut main view - * - * @code - * iContainer = CTruiInfoMessageContainer::NewL( ClientRect() ); - * iContainer->SetMopParent( this ); - * AppUi()->AddToStackL( *this, iContainer ); - * @endcode - * - */ - -class CTruiInfoMessageContainer : public CTruiContainerBase - { -public: - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin - * of its associated window. - * @return Pointer to the component control - */ - static CTruiInfoMessageContainer* NewL( const TRect& aRect ); - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin - * of its associated window. - * @return Pointer to the component control - */ - static CTruiInfoMessageContainer* NewLC( const TRect& aRect ); - - /** - * Destructor. - */ - virtual ~CTruiInfoMessageContainer(); - - /** - * Do something before exit - */ - void PrepareToExitL(); - -private: - - /** - * Constructor. - */ - CTruiInfoMessageContainer(); - - /** - * Two-phased constructor. Second phase - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin - * of its associated window. - */ - void ConstructL( const TRect& aRect ); - - /** - * Create controls to be displayed in this container. - */ - void InitializeControlsL(); - - /** - * Create label and display it in the container. - * - * @param aParent The parent of the control. - * @return The pointer to the label. - */ - CEikLabel* CreateLabelL( const CCoeControl* aParent ); - - - -// from base class CCoeControl - /** - * Draw the screen. - * @param aRect the rectangle of this view that needs updating - */ - void Draw( const TRect& aRect ) const; - - /** - * From CoeControl. - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * From CoeControl. - * Handles a change to the control's resources. - * - * @param aType A message UID value. - */ - void HandleResourceChange( TInt aType ); - -private: // data - - /** - * Pointer to background - * Own - */ - CAknsBasicBackgroundControlContext* iBackGround; - - /** - * Pointer to the label text - * Own - */ - HBufC* iLabelText; - - /** - * Pointer to the radio button - * Own - */ - CTruiRadioButton* iRadioButtonContainer; - - /** - * Pointer to the edwin text - * Own - */ - CEikEdwin* iEdwin; - - /** - * MultilineLayout for edwin - * - */ - TAknMultiLineTextLayout iMultilineLayout; - - /** - * TRect of instruct pane for edwin - * - */ - TRect iInstructPaneRect; - }; - -#endif // C_TRUIINFOMESSAGECONTAINER_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiinfomessageview.h --- a/textinput/peninputhwrtrui/inc/truiinfomessageview.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiInfoMessageView class of TrainingUI -* -*/ - - -#ifndef C_TRUIINFOMESSAGEVIEW_H -#define C_TRUIINFOMESSAGEVIEW_H - -#include - -class CTruiInfoMessageContainer; - -// UID of view -const TUid KTruiInfoMessageViewId = {5}; - -/** - * CTruiInfoMessageView view class. - * - * @code - * CTruiInfoMessageView* view = CTruiInfoMessageView::NewLC(); - * AddViewL( view ); - * CleanupStack::Pop(); - * @endcode - * - */ -class CTruiInfoMessageView : public CAknView - { -public: - /** - * Two phase construction. - * - * @return Pointer to CTruiInfoMessageView's instance - */ - static CTruiInfoMessageView* NewL(); - - /** - * Two phase construction. - * - * @return Pointer to CTruiInfoMessageView's instance - */ - static CTruiInfoMessageView* NewLC(); - - /** - * Destructor. - */ - virtual ~CTruiInfoMessageView(); - -// from base class CAknView - - /** - * From CAknView - * Returns views id. - * - * @return id for this view. - */ - TUid Id() const; - - /** - * From CAknView - * Command handling function. - * - * @param aCommand ID of the command to respond to. - */ - void HandleCommandL( TInt aCommand ); - -private: - - CTruiInfoMessageView(); - - void ConstructL(); - - /** - * From CAknView - * Called by the framework when view is activated. - * - * @param aPrevViewId This is not used now. - * @param aCustomMessage This is not used now. - * @param aCustomMessage This is not used now. - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * Called by the framework when view is deactivated. - * - */ - void DoDeactivate(); - -private: // data - - CTruiInfoMessageContainer* iContainer; - }; - -#endif // C_TRUIINFOMESSAGEVIEW_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truilanguagerelation.h --- a/textinput/peninputhwrtrui/inc/truilanguagerelation.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: TLanguageRelation class of TrainingUI -* -*/ - - -#ifndef T_TRUILANGUAGERELATION_H -#define T_TRUILANGUAGERELATION_H - -#include - -class TLanguageRelation - { -public: - TLanguageRelation( TInt aCode, TInt aLanguageScriptId ); - - inline TInt LanguageCode() const - { - return iCode; - }; - - inline TInt LanguageScriptId() const - { - return iLanguageScriptId; - }; - -private: - TInt iCode; - TInt iLanguageScriptId; - }; - -#endif // T_TRUILANGUAGERELATION_H diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truimainview.h --- a/textinput/peninputhwrtrui/inc/truimainview.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiMainView class of TrainingUI -* -*/ - - -#ifndef C_TRUIMAINVIEW_H -#define C_TRUIMAINVIEW_H - -#include -#include - -class CTruiMainViewContainer; - -// UID of view -const TUid KTruiMainViewId = {1}; - -/** - * CTruiMainView view class. - * - * @code - * CTruiMainView* view = CTruiMainView::NewLC(); - * AddViewL( view ); - * CleanupStack::Pop(); - * @endcode - * - */ -class CTruiMainView : public CAknView, public MAknToolbarObserver - { -public: - - /** - * Two phase construction. - * - * @return Pointer to CTruiMainView's instance - */ - static CTruiMainView* NewL(); - - /** - * Two phase construction. - * - * @return Pointer to CTruiMainView's instance - */ - static CTruiMainView* NewLC(); - - /** - * Destructor. - */ - virtual ~CTruiMainView(); - -// from base class CAknView - - /** - * Returns views id. - * - * @return id for this view. - */ - TUid Id() const; - - /** - * Command handling function. - * - * @param aCommand ID of the command to respond to. - */ - void HandleCommandL( TInt aCommand ); - -// from MEikMenuObserver - /** - * Dynamically initialises a menu pane. - * - * @param aResourceId The resource Id. - * @param aMenuPane The in-memory representation of the menu pane. - */ - void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); - -private: - - /** - * Constructor. - */ - CTruiMainView(); - - /** - * Perform the second phase construction of a CTruiMainView object. - */ - void ConstructL(); - - /** - * Dynamically initialises the character range menu pane. - * - * @param aScriptId Language script Id. - * @param aMenuPane The in-memory representation of the menu pane. - */ - void InitCharRangeSubMenuL( TInt aScriptId, CEikMenuPane* aMenuPane); - - /** - * Get reource ID of menu items for initializing menu pane. - * - * @param aScriptId Language script Id. - * @return resource Id of menu items. - */ - TInt MenuItemsReourceId( TInt aScriptId ); - - /** - * Check menu item dimmed by menu item id. - * - * @param aMenuPane Pointer to menu pane. - * @param aMenuItemId Menu item id of menu. - * @return ETrue: menu item is dimmed - */ - TBool IsMenuItemDimmed( CEikMenuPane* aMenuPane, TInt aMenuItemId ); - -// from base class CAknView - /** - * Called by the framework when view is activated. - * - * @param aPrevViewId This is not used now. - * @param aCustomMessage This is not used now. - * @param aCustomMessage This is not used now. - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * Called by the framework when view is deactivated. - * - */ - void DoDeactivate(); - - /** - * From MAknToolbarObserver. - * Handles toolbar events for a certain toolbar item. - * - * @param aCommand The command ID of some toolbar item. - */ - void OfferToolbarEventL( TInt aCommand ); - -private: // data - - /** - * Pointer to the component control - * own. - */ - CTruiMainViewContainer* iContainer; - - /** - * Indicates whether all delete is dimmed - */ - TBool iDimAllDelete; - }; - -#endif // C_TRUIMAINVIEW_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truimainviewcontainer.h --- a/textinput/peninputhwrtrui/inc/truimainviewcontainer.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,439 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiMainViewContainer class of TrainingUI -* -*/ - - -#ifndef C_TRUIMAINVIEWCONTAINER_H -#define C_TRUIMAINVIEWCONTAINER_H - -#include "truicontainerbase.h" -#include "truihwrboxobserver.h" - -class CAknButton; -class CAknChoiceList; -class CTruiHwrBox; -class CAknCharMapDialog; -class CAknsBasicBackgroundControlContext; -class CEikLabel; -class CAknPreviewPopUpController; - -const TInt KActiveCharSize = 1; -const TInt KLabelTextLen = 100; -/** - * CTruiMainViewContainer container control - * Used as the component to training ui main view - * - * @code - * iContainer = CTruiMainViewContainer::NewL( ClientRect() ); - * iContainer->SetMopParent( this ); - * AppUi()->AddToStackL( *this, iContainer ); - * @endcode - * - */ -class CTruiMainViewContainer : public CTruiContainerBase, - public MCoeControlObserver, - public MTruiHwrBoxObserver - { -public: - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin of its associated window. - * @return Pointer to the component control - */ - static CTruiMainViewContainer* NewL( const TRect& aRect ); - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin of its associated window. - * @return Pointer to the component control - */ - static CTruiMainViewContainer* NewLC( const TRect& aRect ); - - /** - * Destructor. - */ - virtual ~CTruiMainViewContainer(); - - /** - * Handles an event from an observed control. - * - * @param aControl The control that sent the event. - * @param aEventType The event type. - */ - void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); - - /** - * Handles language script changed. - * - * @param aScriptId The selected language script's Id - */ - void HandleLanguageScriptChangedL( TInt aScriptId ); - - /** - * Handles character range changed. - * - * @param aIndex The index of range item in Menu "character range" or choicelist - * @param aRangeId The range Id. - */ - void HandleCharRangeChangedL( TInt aIndex, TInt aRangeId ); - - /** - * Handles choosing an active char from SCT. - * - */ - void HandleChooseCharEventL(); - - /** - * Preview character model - * - */ - void PreviewCharacterModel(); - - /** - * Set current trained character - * - * @param aChar the trained character - */ - void SetCurrentCharL( const TPtrC& aChar ); - - /** - * Clear current model - * - */ - void ClearCurrentModel(); - - /** - * Delete model of current character - * - */ - void DeleteModelL(); - - /** - * Delete all models of current character - * - */ - void DeleteAllModelL(); - - /** - * Check if clear button has been dimmed - * - * @return ETrue: dimmed; EFalse: undimmed - */ - TBool IsButtonDimmed(); - - /** - * Check if all delete button has been dimmed - * - * @return ETrue: dimmed; EFalse: undimmed - */ - TBool IsAllDelete(); - - /** - * Get character set Id, used to choose which characters will be displayed in SCT - * - * @param aRangeId Character range Id for special character table - * - * @return Id of character set. - */ - TInt SctCharacterSetId( TInt aRangeId ); - - /** - * Get cyrillic lower character set Id - * - * @param aInputLanguage Current input language - * - * @return Id of character set. - */ - TInt SctCyrillicLowerCharacterSetId( TLanguage aInputLanguage ); - - /** - * Get cyrillic upper character set Id - * - * @param aInputLanguage Current input language - * - * @return Id of character set. - */ - TInt SctCyrillicUpperCharacterSetId( TLanguage aInputLanguage ); - - /** - * Before exit, do some necessary operation - * - */ - void PrepareToExitL(); - - /** - * Handle size changed - * - * @param aVarity: Use aVarity to load different resulotion's LAF data. - */ - void DoSizeChanged( TInt aVarity ); - -private: - - /** - * Constructor. - */ - CTruiMainViewContainer(); - - /** - * Perform the second phase construction of a CTruiMainViewContainer object. - * - * @param aRect: The rectangle that defines the control's extent. - */ - void ConstructL( const TRect& aRect ); - - /** - * Create controls to be displayed in this container. - * - */ - void InitializeControlsL(); - - /** - * Create label and display it in the container. - * - * @param aResourceID The resource ID - * @param aParent The parent of the control. - * @param aObserver The observer of the control. - * @return The pointer to the label. - */ - CEikLabel* CreateLabelL( const TInt aResourceId, - const CCoeControl* aParent, - MCoeControlObserver* aObserver ); - - /** - * Create choicelist and display it in the container. - * - * @param aParent The parent of the control. - * @param aObserver The observer of the control. - * @param aTextArray The content displayed in the control. - * @param aButton The attached button. - * @return The pointer to the choiclist. - */ - CAknChoiceList* CreateChoiceListL( CCoeControl* aParent, - MCoeControlObserver* aObserver, - CDesCArray* aTextArray, - CAknButton* aButton ); - - /** - * Create HWRBox and display it in the container. - * - * @param aParent The parent of the control. - * @param aObserver The observer of the control. - * @return The pointer to the choiclist. - */ - CTruiHwrBox* CreateHwrBoxL( CCoeControl* aParent, - MTruiHwrBoxObserver* aObserver ); - - /** - * Return button's resourceId by Character Range Id. - * - * @param aRangeId The character range ID. - * @return Reource Id to be used to create button for choicelist. - */ - TInt ButtonResourceId( TInt aRangeId ) const; - - /** - * Pop Sct dialog - * - * @param aCharCase Character case for special character table - * - * @param aSpecialChar Reference to the buffer where selected special characters are put. - * @param aCharSetResourceId The resource ID of special character table - * @return Id of the button used to dismiss dialog. - * - */ - TInt PopupSctDialogL( TInt aCharCase, TDes& aSpecialChars, TInt aCharSetResourceId ); - - /** - * Popup information note - * - * @param aText The text to be displayed in CAknInformationNote. - */ - void PopupInformationNoteL( const TDesC& aText ); - - /** - * Adjust special behavior characters to displayable characters. - * @param aResult Return result for adjustment. - * - */ - void AdjustDisplayChars( TDes& aResult ); - - /** - * From CoeControl. - * Handles key event. - * - * @param aKeyEvent The key event. - * @param aType The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. - * @return Indicates whether or not the key event was used by this control. - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * GetHelpContext() - * Identify the help context so that the framework can look up - * the corresponding help topic - * @param aContext Returns the help context - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * From CoeControl. - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * From CoeControl. - * Responds to a change in focus. - * - * @param aRect Contains the value that was passed to it by SetFocus(). - */ - void FocusChanged( TDrawNow aDrawNow ); - - /** - * From CoeControl. - * Draws the container. - * - * @param aRect The region of the control to be redrawn. Co-ordinates are relative to the control's origin (top left corner). - */ - virtual void Draw( const TRect& aRect ) const; - - /** - * From CoeControl. - * Handles a change to the control's resources. - * - * @param aType A message UID value. - */ - void HandleResourceChange( TInt aType ); - - void HandlePointerEventL(const TPointerEvent& aPointerEvent); - -// From MTruiHWRBoxObserver - /** - * From MTruiHWRBoxObserver. - * Input times out - * Handle the save model event - */ - void SaveNewModelL(); - - /** - * From MTruiHWRBoxObserver. - * HandleEventL - * Handle the message event from the HWRBox - * @param aMessage According to the aMessage to handle the event - */ - void HandleEventL( TMessageType aMessage ); - -private: // data - - /** - * The current trained character - */ - TBuf iCurrentChar; - - /** - * The current tip of training character - */ - HBufC* iLabeltext; - - /** - * Store the wrapped text to indicate which character is being trained. - * - * Own - */ - HBufC* iWrappedLabelText; - - /** - * This text helps a user understand that he / she is - * teaching his / her own character models to HWR engine - * Not own - */ - CEikLabel* iLabel; - - /** - * The Clear button in toolbar, used to clean up the Writing Box - * Not own - */ - CAknButton* iClearBtn; - - /** - * The preview button in toolbar - * Not own - */ - CAknButton* iPreviewBtn; - - /** - * The button currently associated with choicelist. - * Not own - */ - CAknButton* iCurChoiceListBtn; - - /** - * Left buttons allow quick access to the previous character - * in the selected character range. - * Not own - */ - CAknButton* iLeftBtn; - - /** - * Indicates which character is currently selected. - * Not own - */ - CEikLabel* iIindicator; - - /** - * Right buttons allow quick access to the Next character - * in the selected character range. - * Not own - */ - CAknButton* iRightBtn; - - /** - * ChoiceList is used for switching between character ranges. - * Not own - */ - CAknChoiceList* iChoicelist; - - /** - * The Writing Box is used for drawing a character model. - * Not own - */ - CTruiHwrBox* iHwrBox; - - /** - * Pointer to background - * Own - */ - CAknsBasicBackgroundControlContext* iBackGround; - - /** - * Rect of parent pane of label - */ - TRect iLabelPaneRect; - - /** - * MultiLineTextLayout of Label - */ - TAknMultiLineTextLayout iMultilineLayout; - - RArray iLineWidthArray; - }; - -#endif // C_TRUIMAINVIEWCONTAINER_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truiradiobuttonobserver.h --- a/textinput/peninputhwrtrui/inc/truiradiobuttonobserver.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Control radio button's observer -* -*/ - -#ifndef M_TRUIRADIOBUTTONOBSERVER_H -#define M_TRUIRADIOBUTTONOBSERVER_H - -// CLASS DECLARATION - -/** -* MTruiRadioButtonObserver. -* An instance of a class derived from MTruiRadioButtonObserver is an object -* which can be informed when an event of state-changed occure. -*/ -class MTruiRadioButtonObserver - { -public: - /** - * Notify that which radio button is selected. - * @param aIndex The index of currently selected index. - */ - virtual void SelectChangedL( TInt aIndex ) = 0; - }; - -#endif //M_TRUIRADIOBUTTONOBSERVER_H - - - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truishortcuteditcontainer.h --- a/textinput/peninputhwrtrui/inc/truishortcuteditcontainer.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,417 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiShortcutEditContainer class of TrainingUI -* -*/ - - -#ifndef C_TRUISHORTCUTEDITCONTAINER_H -#define C_TRUISHORTCUTEDITCONTAINER_H - -#include -#include "truicontainerbase.h" -#include "truihwrboxobserver.h" -#include "truiradiobuttonobserver.h" - -class CAknButton; -class CTruiHwrBox; -class CAknsBasicBackgroundControlContext; -class CTruiRadioButton; -class CAknCharMapDialog; - -/** - * CTruiShortcutEditContainer container control - * Used as the component to shortcut main view - * - * @code - * iContainer = CTruiShortcutEditContainer::NewL( ClientRect() ); - * iContainer->SetMopParent( this ); - * AppUi()->AddToStackL( *this, iContainer ); - * @endcode - * - */ -class CTruiShortcutEditContainer : public CTruiContainerBase, - public MCoeControlObserver, - public MTruiHwrBoxObserver, - public MTruiRadioButtonObserver - { -public: - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin - * of its associated window. - * @return Pointer to the component control - */ - static CTruiShortcutEditContainer* NewL( const TRect& aRect ); - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin - * of its associated window. - * @return Pointer to the component control - */ - static CTruiShortcutEditContainer* NewLC( const TRect& aRect ); - - /** - * Destructor. - */ - virtual ~CTruiShortcutEditContainer(); - - /** - * Switch app's active view to ShortcutView. - */ - void SwitchToShortcutViewL(); - - /** - * Go back to the previous view. - */ - void BackToPreviousViewL(); - - /** - * Query if shortcut model exist - */ - TBool HasShortcutModel(); - - /** - * Preview shortcut model - */ - void PreviewShortcutModel(); - - /** - * Before exit, do some necessary operation - * - * @retrun TBool if ready to exit, true will be return, - * otherwise it will return false - */ - TBool PrepareToExitL(); - - /** - * Clear current model - * - */ - void ClearCurrentModelL(); - - /** - * Return the currently selected index, which will be set in Shortcuts view. - * - * @param aItemList The shortcut list array in which will locate the aTex. - * @param aText The shortcut item which will be located in aItemList - * @return The index of aText in aItemList. - * If it doesn't exist, it will return KErrNotFound. - */ - TInt DefaultSelectedIndex( const CDesCArray* aItemList, - const TDesC& aText ); - - /** - * Popup SCT dialog. - * - */ - void PopupSctDialogL(); - -private: - - /** - * Constructor. - */ - CTruiShortcutEditContainer(); - - /** - * Two-phased constructor. Second phase - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin - * of its associated window. - */ - void ConstructL( const TRect& aRect ); - - /** - * Create controls to be displayed in this container. - */ - void InitializeControlsL(); - - /** - * Create radio button. - */ - void CreateRadioButtonL(); - - /** - * Create HWRBox - */ - void CreateHwrBoxL(); - - /** - * Create buttons - */ - void CcnstructButtonL(); - - /** - * Create Label - */ - void CreateLabelL(); - - /** - * Popup tooltip - * - * @param aResourceID The numeric ID of the resource string to be read. - */ - void PopupTooltipL( TInt aResourceID ); - - /** - * Layout under landscape condition - */ - void DoLayoutLandscape(); - - /** - * Layout under portait condition - */ - void DoLayoutPortait(); - - /** - * Save own shortcut. - * - * @param aShortcut The shortcut text which to be stored. - * @param aModel The points array assigned to the shortcut. - * @param aErrMsg The error message for too similar. - * Leave with code KErrAlreadyInUse - */ - void SaveOwnShortcutL( const TDesC& aShortcut, - RArray& aModel, - TDes& aErrMsg ); - - /** - * Save preset shortcut - * - * @param aShortcut The shortcut text which to be stored. - * @param aUnicode The unicode of preset symbol assigned to the shortcut. - * Leave with code KErrAlreadyInUse - */ - void SavePresetShortcutL( const TDesC& aShortcut, TUint aUnicode ); - - /** - * Backup shortcut model. It is probably to be restored when press Back to exit. - * - * @param aOriginalModel The shortcut model which to be backuped. - * @param aOriginalUnicode The unicode of preset symbol which to be backuped. - */ - void BackupShortcutModel( const RArray& aOriginalModel, - TUint aOriginalUnicode ); - - /** - * Set active char. - * - * @param aUnicode The unicode which to be displayed. - */ - void SetActiveCharL( TUint aUnicode ); - - /** - * Find the first available preset symbol. - * - * @param aStartPos The position from which to search - * @param aDirection The direction of how to search in preset arrays, - * Toward left or toward right - * @param aUnicode The unicode of the first available preset symbol. - * @return ETrue: search successfully; EFalse: Fail to seach, meaning all in use - */ - TBool FindFirstAvailableCharL( TInt aStartPos, TInt aEndPos, - TInt aDirection, TUint& aUnicode ); - - /** - * Return if the preset is in use - * - * @param aUnicode The preset's unicode - * @return ETrue: in use - */ - TBool CheckPresetSymbolInUseL( TUint aUnicode ); - - /** - * Do something to response to size changed - * - * @param aVarity Varity to decide which option will be retrieved from LAF data - */ - void DoSizeChanged( TInt aVarity ); - -// from base class CCoeControl - /** - * Draw the screen. - * @param aRect the rectangle of this view that needs updating - */ - void Draw( const TRect& aRect ) const; - - /** - * From CoeControl. - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * From CoeControl. - * Responds to a change in focus. - * - * @param aRect Contains the value that was passed to it by SetFocus(). - */ - void FocusChanged( TDrawNow aDrawNow ); - - /** - * Handles a change to the control's resources. - * - * @param aType A message UID value. - */ - void HandleResourceChange( TInt aType ); - -// from MCoeControlObserver - /** - * Handles an event from an observed control. - * This function is called when a control for which this control is the - * observer calls CCoeControl::ReportEventL(). It should be implemented - * by the observer control, and should handle all events sent by controls - * it observes. - * - *@param aControl The control that sent the event. - *@param aEventType The event type. - */ - void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); - -// From MTruiHWRBoxObserver - /** - * From MTruiHWRBoxObserver. - * Input times out - * Handle the save model event - */ - void SaveNewModelL(); - - /** - * From MTruiHWRBoxObserver. - * HandleEventL - * Handle the message event from the HWRBox - * @param aMessage According to the aMessage to handle the event - */ - void HandleEventL( TMessageType aMessage ); - -// from MTruiRadioButtonObserver - /** - * Notify that which radio button is selected. - * @param aIndex The index of currently selected index. - */ - void SelectChangedL( TInt aIndex ); - -private: // data - /** - * The Writing Box is used for drawing a character model. - * Not own - */ - CTruiHwrBox* iHwrBox; - - /** - * Pointer to background - * Own - */ - CAknsBasicBackgroundControlContext* iBackGround; - - /** - * Pointer to radio button - * Not own - */ - CTruiRadioButton* iRadioButtonContainer; - - /** - * Pointer to the tip label - * Not own - */ - CEikLabel* iLabelTip; - - /** - * The current tip of training shortcut - * Own - */ - HBufC* iLabeltext; - - /** - * Store the wrapped text to give tips about own or preset. - * Own - */ - HBufC* iWrappedLabelText; - - /** - * Left button. - * Not own - */ - CAknButton* iLeftBtn; - - /** - * Right button. - * Not own - */ - CAknButton* iRightBtn; - - /** - * Active indicator. - * Not own - */ - CEikLabel* iIndicator; - - /** - * Current preset symbol. - */ - TUint iUnicode; - - /** - * Current shortcut type. - */ - TInt iShortcutType; - - /** - * Store the old points of the current shortcut. - * own - */ - RArray iModelBak; - - /** - * Store the old unicode of the current preset shortcut. - */ - TUint iUnicodeBak; - - /** - * Check if need to restore old shortcut. - */ - TBool iIsRestored; - - /** - * Check if the hwrbox is empty. - */ - TBool iIsEmptyHwrBox; - - /** - * Store all presets from Engine. - * Own - */ - RArray iPresets; - - /** - * Which char is active in preset array. - */ - TInt iActiveCharPos; - - TAknMultiLineTextLayout iMultilineLayout; - - /** - * Line array. - * Own - */ - RArray iLineWidthArray; - }; - -#endif // C_TRUISHORTCUTEDITCONTAINER_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truishortcutedittextview.h --- a/textinput/peninputhwrtrui/inc/truishortcutedittextview.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiShortcutEditTextView class of TrainingUI -* -*/ - - -#ifndef C_TRUISHORTCUTEDITTEXTVIEW_H -#define C_TRUISHORTCUTEDITTEXTVIEW_H - -#include - -class CTruiTextSettingPageContainer; - -// UID of view -const TUid KTruiShortcutEditTextViewId = {4}; - -/** - * CTruiShortcutEditTextView view class. - * - * @code - * CTruiShortcutEditTextView* view = CTruiShortcutEditTextView::NewLC(); - * AddViewL( view ); - * CleanupStack::Pop(); - * @endcode - * - */ -class CTruiShortcutEditTextView : public CAknView - { -public: - - /** - * Two phase construction. - * - * @return Pointer to CTruiShortcutEditTextView's instance - */ - static CTruiShortcutEditTextView* NewL(); - - /** - * Two phase construction. - * - * @return Pointer to CTruiShortcutEditTextView's instance - */ - static CTruiShortcutEditTextView* NewLC(); - - /** - * Destructor. - */ - virtual ~CTruiShortcutEditTextView(); - - inline const TVwsViewId& StartViewId() - { - return iStartView; - }; - -// from base class CAknView - - /** - * From CAknView - * Returns views id. - * - * @return id for this view. - */ - TUid Id() const; - -private: - - CTruiShortcutEditTextView(); - - void ConstructL(); - - /** - * From CAknView - * Called by the framework when view is activated. - * - * @param aPrevViewId This is not used now. - * @param aCustomMessage This is not used now. - * @param aCustomMessage This is not used now. - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * Called by the framework when view is deactivated. - * - */ - void DoDeactivate(); - -private: // data - - /** - * Pointer to the component control - * own. - */ - CTruiTextSettingPageContainer* iContainer; - - TVwsViewId iStartView; - }; - -#endif diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truishortcuteditview.h --- a/textinput/peninputhwrtrui/inc/truishortcuteditview.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiShortcutEditView class of TrainingUI -* -*/ - - - -#ifndef C_TRUISHORTCUTEDITVIEW_H -#define C_TRUISHORTCUTEDITVIEW_H - -#include -#include - -class CTruiShortcutEditContainer; - -// UID of view -const TUid KTruiShortcutEditViewId = {3}; - -/** - * CTruiShortcutEditView view class. - * - * @code - * CTruiShortcutEditView* view = CTruiShortcutEditView::NewLC(); - * AddViewL( view ); - * CleanupStack::Pop(); - * @endcode - * - */ -class CTruiShortcutEditView : public CAknView, public MAknToolbarObserver - { -public: - - /** - * Two phase construction. - * - * @return Pointer to CTruiShortcutEditView's instance - */ - static CTruiShortcutEditView* NewL(); - - /** - * Two phase construction. - * - * @return Pointer to CTruiShortcutEditView's instance - */ - static CTruiShortcutEditView* NewLC(); - - /** - * Destructor. - */ - virtual ~CTruiShortcutEditView(); - - inline const TVwsViewId& PreviousViewId() const - { - return iPreViewId; - }; - -// from base class CAknView - - /** - * Returns views id. - * - * @return id for this view. - */ - TUid Id() const; - - /** - * Command handling function. - * - * @param aCommand ID of the command to respond to. - */ - void HandleCommandL( TInt aCommand ); - -private: - - /** - * Constructor. - */ - CTruiShortcutEditView(); - - /** - * Perform the second phase construction of a CTruiShortcutEditView object. - */ - void ConstructL(); - -// From CAknView - /** - * Called by the framework when view is activated. - * - * @param aPrevViewId This is not used now. - * @param aCustomMessage This is not used now. - * @param aCustomMessage This is not used now. - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * Called by the framework when view is deactivated. - * - */ - void DoDeactivate(); - -// MAknToolbarObserver - /** - * Handles toolbar events for a certain toolbar item. - * @param aCommand The command ID of some toolbar item. - */ - void OfferToolbarEventL( TInt aCommand ); - -private: // data - - /** - * Pointer to the component control - * own. - */ - CTruiShortcutEditContainer* iContainer; - - /** - * The previous view id - */ - TVwsViewId iPreViewId; - }; - -#endif // C_TRUISHORTCUTEDITVIEW_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truishortcutscontainer.h --- a/textinput/peninputhwrtrui/inc/truishortcutscontainer.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,319 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiShortcutsContainer class of TrainingUI -* -*/ - - -#ifndef C_TRUISHORTCUTSCONTAINER_H -#define C_TRUISHORTCUTSCONTAINER_H - -#include -#include -#include "truicontainerbase.h" - -class CEikButtonGroupContainer; -class CAknSingleGraphicStyleListBox; -class CTruiHwrBox; -class CAknPreviewPopUpController; - -/** - * CTruiShortcutsContainer container control - * Used as the component to shortcut main view - * - * @code - * iContainer = CTruiShortcutsContainer::NewL( ClientRect() ); - * iContainer->SetMopParent( this ); - * AppUi()->AddToStackL( *this, iContainer ); - * @endcode - * - */ -class CTruiShortcutsContainer : public CTruiContainerBase, - public MEikListBoxObserver, - public MAknPreviewPopUpObserver - { -public: - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin of its associated window. - * @return Pointer to the component control - */ - static CTruiShortcutsContainer* NewL( const TRect& aRect ); - - /** - * Two-phased constructor. - * @param aRect The rectangle that defines the control's extent. - * The rectangle's origin is relative to the origin of its associated window. - * @return Pointer to the component control - */ - static CTruiShortcutsContainer* NewLC( const TRect& aRect ); - - /** - * Destructor. - */ - virtual ~CTruiShortcutsContainer(); - - /** - * Popup the TextSettingPage and added the new shortcut to ListBox. - */ - void AddShortcutL(); - - /** - * Delete shortcut. - */ - void DeleteShortcutL(); - - /** - * Mark shortcut. - */ - void MarkShortcutL(); - - /** - * Unmark shortcut. - */ - void UnmarkShortcutL(); - - /** - * Return currently selected item's index. - * - * @return Currently selected item's index. - */ - TInt CurrentItemIndex(); - - /** - * Test if the currently selected index is marked. - * - * @param aSelectedIndex: Current selected item's index - * @return ETrue if the item is marked. EFalse if it is not marked. - */ - TBool IsMarked( TInt aSelectedIndex ); - - /** - * Return the count of being marked currently. - * - * @return The count of being marked. - */ - TInt MarkCount(); - - /** - * Edit shortcut - * @param aOnlyEditText ETrue : Only edit shortcut text. - * EFalse : Only edit shortcut model. - */ - void EditShortcutL( TBool aOnlyEditText = EFalse ); - - - /** - * Check if reset introduction - * - * @return ETrue: Reset introcudtion - * EFalse: Do not. - */ - TBool IsResetIntroduction(); - - /** - * Reset introduction - * - */ - void ResetIntroductionL(); - - /** - * Set flag to indicate popup window being displayed. - * - * @param aDisplayPopupWindow ETrue : Displaying. - * EFalse : Not displaying. - */ - inline void SetDisplayPopupWindow( TBool aDisplayPopupWindow ) - { - iDisplayPopupWindow = aDisplayPopupWindow; - }; - -// from MEikListBoxObserver - /** - * Observer callback from the listbox - * @param aListBox ptr to listbox that is calling the method - * @param aEventType type of event; defined by MEikListBoxObserver - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - -// from CCoeControl - /** - * Handles key event. - * - * @param aKeyEvent The key event. - * @param aType The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. - * - * @return Indicates whether or not the key event was used by this control. - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType ); - - /** - * GetHelpContext() - * Identify the help context so that the framework can look up - * the corresponding help topic - * @param aContext Returns the help context - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - -private: - - /** - * Constructor. - */ - CTruiShortcutsContainer(); - - /** - * Perform the second phase construction of a CTruiMainViewContainer object. - * - * @param aRect: The rectangle that defines the control's extent. - */ - void ConstructL( const TRect& aRect ); - - /** - * Create controls to be displayed in this container. - */ - void InitializeControlsL(); - - /** - * Delete shortcut from ListBox. - */ - void DeleteItemsL(); - - /** - * Create preview popup controller to show popup hwrbox. - */ - CAknPreviewPopUpController* CreatePopupHwrBoxL(); - - /** - * Popup HWR box - * @param aPosition The position to display HWR box - * @param aShowDelay The delay time interval before being shown. - * @param aHideDelay The delay time interval after which to hide tooltip. - */ - void PopupHwrBoxL( const TPoint& aPosition, - const TTimeIntervalMicroSeconds32& aShowDelay, - const TTimeIntervalMicroSeconds32& aHideDelay ); - /** - * Preview shortcut model in popup hwrbox. - * @param aShortcutText The shortcut to be previewed - */ - void PreviewShortcutModelL( const TDesC& aShortcutText, TInt aIndex ); - - /** - * Check if need to preview shortcut and perform previewing necessarily. - * - * @param aIndex To stand for which item of the listbox - * @return ETrue : Preview shortcut model. EFalse : Don't preview it. - */ - TBool CheckAndPreviewShortcutModelL( TInt aIndex ); - - /** - * Update buttons' status in toolbar. - * - * @param aIndex To stand for which item of the listbox. - */ - void UpdateToolbarButtonStatus( TInt aIndex ); - - /** - * Create ListBox - */ - void CreateListBoxL(); - - /** - * Setup text data for listbox - */ - void LoadTextArrayL( const CDesCArray* aTextArray ); - - /** - * Handle event when listbox change to another focused item. - */ - void HandleListBoxFocusChangedL( TInt aIndex ); - - /** - * Popup context menu. - * @param aResourceId The resource Id of the context menu. - */ - void PopupContextMenuL( TInt aResourceId ); - - /** - * Get position relative to screen origin for popup window. - * @param aIndex The index of item from which pop up. - */ - TPoint PopupWindowPosition( TInt aIndex ); - -// from MAknPreviewPopUpObserver - /** - * Called by the preview popup when an appropriate event takes place. - * @param aController Pointer to the sender of the event. - * @param aEvent Event type. - */ - void HandlePreviewPopUpEventL( - CAknPreviewPopUpController* aController, TPreviewPopUpEvent aEvent ); - -// from CoeControl. - /** - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * Responds to a change in focus. - * @param aDrawNow Contains the value that was passed to it by SetFocus(). - */ - void FocusChanged( TDrawNow aDrawNow ); - - /** - * Handles pointer events. - * @param aPointerEvent The pointer event. - */ - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - -private: // data - - /** - * list box to display all shortcut - * Not own - */ - CAknSingleGraphicStyleListBox* iListBox; - - /** - * Pointer to HWR box displayed in popup controller - * Own - */ - CTruiHwrBox* iHwrBox; - - /** - * Pointer to preview popup used to show tooltip - * Own - */ - CAknPreviewPopUpController* iPopupController; - - /** - * Check if popup preview when focus changed - */ - TBool iDisplayPopupWindow; - - TUint iShortcutUnicode; - - /** - * Point of pen down on item. - */ - TPoint iPenDownPoint; - }; - -#endif // C_TRUISHORTCUTSCONTAINER_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truishortcutsview.h --- a/textinput/peninputhwrtrui/inc/truishortcutsview.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiShortcutsView class of TrainingUI -* -*/ - - - -#ifndef C_TRUISHORTCUTSVIEW_H -#define C_TRUISHORTCUTSVIEW_H - -#include -#include - -class CTruiShortcutsContainer; -class CTruiTextSettingPageContainer; - -// UID of view -const TUid KTruiShortcutsViewId = {2}; - -/** - * CTruiShortcutsView view class. - * - * @code - * CTruiShortcutsView* view = CTruiShortcutsView::NewLC(); - * AddViewL( view ); - * CleanupStack::Pop(); - * @endcode - * - */ -class CTruiShortcutsView : public CAknView, public MAknToolbarObserver - { -public: - - /** - * Two phase construction. - * - * @return Pointer to CTruiShortcutsView's instance - */ - static CTruiShortcutsView* NewL(); - - /** - * Two phase construction. - * - * @return Pointer to CTruiShortcutsView's instance - */ - static CTruiShortcutsView* NewLC(); - - /** - * Destructor. - */ - virtual ~CTruiShortcutsView(); - -// from base class CAknView - /** - * From CAknView - * Returns views id. - * - * @return id for this view. - */ - TUid Id() const; - - /** - * From CAknView - * Command handling function. - * - * @param aCommand ID of the command to respond to. - */ - void HandleCommandL( TInt aCommand ); - -private: - - CTruiShortcutsView(); - - void ConstructL(); - - /** - * From CAknView - * Called by the framework when view is activated. - * - * @param aPrevViewId This is not used now. - * @param aCustomMessage This is not used now. - * @param aCustomMessage This is not used now. - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * Called by the framework when view is deactivated. - * - */ - void DoDeactivate(); - -// from MEikMenuObserver - /** - * Dynamically initialises a menu pane. - * - * @param aResourceId The resource Id. - * @param aMenuPane The in-memory representation of the menu pane. - */ - void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); - - /** - * Dynamically initialises a menu bar. - * - * @param aResourceId The resource Id. - * @param aMenuPane The in-memory representation of the menu bar. - */ - void DynInitMenuBarL( TInt aResourceId, CEikMenuBar *aMenuBar ); - -// from MAknToolbarObserver - /** - * Handles toolbar events for a certain toolbar item. - * - * @param aCommand The command ID of some toolbar item. - */ - void OfferToolbarEventL( TInt aCommand ); - /** - * From CAknView. This function processes user commands. - * @param aCommand ID of the command to respond to. - */ - void ProcessCommandL( TInt aCommand ); - -private: // data - - /** - * Pointer to the component control - * own. - */ - CTruiShortcutsContainer* iContainer; - }; - -#endif // C_TRUISHORTCUTSVIEW_H - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truisupportedlanguageid.h --- a/textinput/peninputhwrtrui/inc/truisupportedlanguageid.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Define which language should be supported. -* -*/ - - - -#ifndef T_TRUISUPPORTEDLANGUAGEID_H -#define T_TRUISUPPORTEDLANGUAGEID_H - -#include - -const TInt KTruiSupportedLanguages[] = - { - ELangEnglish, - ELangFrench, - ELangGerman, - ELangSpanish, - ELangItalian, - ELangSwedish, - ELangDanish, - ELangNorwegian, - ELangFinnish, - ELangAmerican, - ELangPortuguese, - ELangTurkish, - ELangIcelandic, - ELangRussian, - ELangHungarian, - ELangDutch, - ELangCzech, - ELangSlovak, - ELangPolish, - ELangSlovenian, - ELangTagalog, - ELangBulgarian, - ELangCroatian, - ELangEstonian, - ELangCanadianFrench, - ELangIndonesian, - ELangLatvian, - ELangLithuanian, - ELangMalay, - ELangBrazilianPortuguese, - ELangRomanian, - ELangSerbian, - ELangLatinAmericanSpanish, - ELangEnglish_Taiwan, - ELangEnglish_HongKong, - ELangEnglish_Prc, - ELangEnglish_Japan, - ELangEnglish_Thailand, - ELangMalay_Apac, - 327, - ELangCatalan, - 102, - 103, - 401, - 402, - ELangUkrainian, - ELangGreek, - ELangHebrew - }; - -#endif // \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/inc/truitextsettingpagecontainer.h --- a/textinput/peninputhwrtrui/inc/truitextsettingpagecontainer.h Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTruiTextSettingPageContainer class of TrainingUI -* -*/ - - -#ifndef C_TRUITEXTSETTINGPAGECONTAINER_H -#define C_TRUITEXTSETTINGPAGECONTAINER_H - -#include -#include - -class CTruiHwrBox; -class CAknPreviewPopUpController; - -class CTruiTextSettingPageContainer : public CAknTextSettingPage, - public MAknPreviewPopUpObserver - { -public: - - /** - * Two-phased constructor. - * @param aResourceId Resource Id of CAknTextSettingPage - * @param aText Reference to text for editing - * @param aEnableHwrBox Indicate whether to open HWR box to preview model - * assigned to the shortcut text - * @param aTextSettingPageFlags option flags for miscellaneous things - * @return Pointer to the component control - */ - static CTruiTextSettingPageContainer* NewL( TInt aResourceId, - TDes& aText, - const TRect& aRect, - TBool aEnableHwrBox = EFalse, - TInt aTextSettingPageFlags = 0 ); - - /** - * Two-phased constructor. - * @param aResourceId Resource Id of CAknTextSettingPage - * @param aText Reference to text for editing - * @param aEnableHwrBox Indicate whether to open HWR box to preview model - * assigned to the shortcut text - * @param aTextSettingPageFlags option flags for miscellaneous things - * @return Pointer to the component control - */ - static CTruiTextSettingPageContainer* NewLC( TInt aResourceId, - TDes& aText, - const TRect& aRect, - TBool aEnableHwrBox = EFalse, - TInt aTextSettingPageFlags = 0 ); - - /** - * Destructor. - */ - virtual ~CTruiTextSettingPageContainer(); - -private: - /** - * Constructor. - * @param aSettingPageResourceId Setting Page to use (if present) - * @param aText Reference to text for editing - * @param aTextSettingPageFlags option flags for miscellaneous things - */ - CTruiTextSettingPageContainer( TInt aResourceID, TDes& aText, TInt aTextSettingPageFlags = 0 ); - - /** - * Perform the second phase construction of a CTruiMainViewContainer object. - * - * @param aEnableHwrBox Indicate whether to open HWR box to preview model - * assigned to the shortcut text - */ - void ConstructL( const TRect& aRect, TBool aEnableHwrBox = EFalse ); - - /** - * From CoeControl. - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * From CAknSettingPage - * Processes events from the softkeys. - * - * @param aCommandId Event Id from the soft-key - */ - void ProcessCommandL( TInt aCommandId ); - -// from MAknPreviewPopUpObserver - /** - * Called by the preview popup when an appropriate event takes place. - * @param aController Pointer to the sender of the event. - * @param aEvent Event type. - */ - void HandlePreviewPopUpEventL( - CAknPreviewPopUpController* aController, TPreviewPopUpEvent aEvent ); - -private: // data - /** - * Pointer to HWR box. - * Own - */ - CTruiHwrBox* iHwrBox; - - /** - * Pointer to preview popup used to show tooltip - * Own - */ - CAknPreviewPopUpController* iPopupController; - }; - -#endif // C_TRUITEXTSETTINGPAGECONTAINER_H \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/loc/trui.loc --- a/textinput/peninputhwrtrui/loc/trui.loc Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,391 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Localization strings for project TrainingUI -* -*/ - - -// d:Command in options list in mainview and shortcut edit view. -// d:Perform the function of deleting character model -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_delete_model "Delete a model" - -// d:Command in options list in mainview. -// d:Perform the function of previewing character model -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_preview_model "Preview model" - -// d:Command in options list in mainview. -// d:Perform the function of changing character range. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_character_range "Character range" - -// d:Command in options list in mainview. -// d:Perform the function of openning sct dialog. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_character_grid "Character grid" - -// d:Command in options list in mainview. -// d:Perform the function of changing language script. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_select_language "Language script" - -// d:Command in options list in mainview, shortcuts view and shortcut edit view. -// d:Perform the function of openning help application. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_options_help "Help" - -// d:Command in options list in mainview, shortcuts view and shortcut edit view. -// d:Perform the function of exitting the application. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_options_exit "Exit" - -// d:Command in options list in shortcuts view. -// d:Perform the function of editting the old text of shortcut. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_edit_shortcut_text "Edit text" - -// d:Command in options list in shortcuts view. -// d:Perform the function of editting the old model of shortcut. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_edit_shortcut_symbol "Edit model" - -// d:Command in options list in shortcuts view. -// d:Perform the function of creating a new shortcut. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_new_shortcut "Create shortcut" - -// d:Command in options list in shortcuts view. -// d:The entry of deleting shortcuts -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_delete_shortcut "Delete shortcut" - -// d:Command in options list in shortcuts view. -// d:Perform the function of switching to the main view. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_training "Training view" - -// d:Command in options list in shortcuts view. -// d:Perform the function of marking an old shortcut. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_options_list_mark_one "Mark" - -// d:Command in options list in shortcuts view. -// d:Perform the function of unmarking an old shortcut. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_options_list_unmark_one "Unmark" - -// d:Tip text in shortcut text setting page. -// d:Tip of shortcut text setting page. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_shortcut_assign_text "Shortcut text:" - -// d:First item's text of ListBox in shortcuts view. -// d:Perform the function of creating a new shortcut. -// l:(none) -// r:5.0 -// -#define qtn_hwrt_list_item_new_shortcut "New shortcut" - -// d:Label's text in main view. -// d:Information of which character being trained. -// d:%U stands for the currently trained character -// l:list_single_hwr_training_instruct_pane_t1 -// r:5.0 -// -#define qtn_hwrt_text_teach_character "Teach your own character '%U' for handwriting recognition" - -// d:Title pane text in main view and shortcuts view. -// l:title_pane_t2/opt9 -// r:5.0 -// -#define qtn_hwrt_title_pane "Handwritting" - -// d:Title pane text in info message view. -// l:title_pane_t2/opt9 -// r:5.0 -// -#define qtn_hwrt_title_crete_new_shortcut "Create new shortcut" - -// d:Tooltip text in confirmation banner. -// d:Information of the character model being saved successfully. -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_confirmation_banner_saved "Saved" - -// d:Tooltip text in confirmation banner. -// d:Information of the character model being deleted. -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_confirmation_banner_deleted "Deleted" - -// d:Command in options list of sub_menu language script in main view. -// d:Perform the function of changing language script -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_western "WESTERN" - -// d:Command in options list of sub_menu language script in main view. -// d:Perform the function of changing language script -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_cyrillic "CYRILLIC" - -// d:Command in options list of sub_menu language script in main view. -// d:Perform the function of changing language script -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_greek "GREEK" - -// d:Command in options list of sub_menu language script in main view. -// d:Perform the function of changing language script -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_hebrew "HEBREW" - -// d:Tooltip to clear current character model first in the state of drawing the unempty HWR box. -// l:popup_preview_text_window/opt1 -// r:5.0 -// -#define qtn_hwrt_note_clear_box "Delete the current model first and then draw a new one" - -// d:Tooltip to clear current character model first in the state of saving a similar model. -// d: %S stands for the similar character with which the newly inputed model is similar with. -// l:popup_preview_text_window/opt1 -// r:5.0 -// -#define qtn_hwrt_note_similar_model "Character model is too similar to %S" - -// d:Tooltip of shortcut will being deleted before leave shortcut edit view with empty character model. -// l:popup_note_window -// r:5.0 -// -#define qtn_hwrt_note_shortcut_not_assigned "Shortcut model missing. Shortcut will be deleted.\nExit anyway?" - -// d:Displayed in Query dialog, when press "Current shortcut" from menu. -// d:Text in query dialog to query if delete the selected shortcut -// l:popup_note_window -// r:5.0 -// -#define qtn_hwrt_query_delete_shortcut "Delete shortcut?" - -// d:Displayed in context menu in shortcuts view. -// d:Text in context emnu -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_msk_edit_text "Edit text" - -// d:Displayed in context menu in shortcuts view. -// d:Text in context emnu -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_msk_edit_symbol "Edit symbol" - -// d:Tooltip text for edit text button in toolbar on shortcut main view -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_tooltip_edit_shortcut_text "Edit Shortcut text" - -// d:Tooltip text for edit symbol button in toolbar on shortcut main view -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_tooltip_edit_shortcut_symbol "Edit Shortcut Symbol" - -// d:Tooltip text for delete button in toolbar on shortcut main view -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_tooltip_delete "Delete" - -// d:Tooltip text for own symbols in shortcut edit model view -// l:list_single_hwr_training_instruct_pane/opt3 -// r:5.0 -// -#define qtn_hwrt_text_purpose_own_symbol "You can drow a symbol for the shortcut text and use it later to call the text. Please use maximum of six strokes." - -// d:Infomation message -// l:list_single_hwr_training_instruct_pane/opt3 -// r:5.0 -// -#define qtn_hwrt_informative_message "To create a new shortcut, please, first define the text (1/1). After that, select or draw your own symbol for the shortcut (2/2)." - -// d:Text for radio button in infomessage view -// l:list_single_hwr_training_symbol_option_pane_t1 -// r:5.0 -// -#define qtn_hwrt_informative_message_check_box_label "Don’t show this again" - -// d:Text of left softkey for Next -// l:control_pane_t1/opt7 -// r:5.0 -// -#define text_softkey_next "Next" - -// d:Text of left softkey for Back -// l:control_pane_t1/opt7 -// r:5.0 -// -#define text_softkey_back "Back" - -// d:Text of left softkey for Finish -// l:control_pane_t1/opt7 -// r:5.0 -// -#define text_softkey_finish "Finish" - -// d:Error note for already in use of shortcut -// l:None -// r:5.0 -// -#define qtn_hwrt_note_shortcut_is_used "Shortcut symbol is in use, select a new one." - -// d:Text on main view option menu -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_delete_current_model "Current model" - -// d:Text on main view option menu -// l:list_single_popup_submenu_pane_t1 -// r:5.0 -// -#define qtn_hwrt_submenu_delete_all_models "All Models" - -// d:Text on main view option menu -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_shortcuts "Shortcuts view" - -// d:Text for LSK on infomessage view -// l:control_pane_t1/opt7 -// r:5.0 -// -#define text_softkey_start "Start" - -// d:Text for LSK on infomessage view -// l:control_pane_t1/opt7 -// r:5.0 -// -#define text_softkey_cancel "Cancel" - -// d:Tooltip text for grid buttont on training main view -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_tooltip_select_character "Select character" - -// d:Tooltip text for preview buttont on training main view -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_tooltip_preview_drawing "Preview drawing" - -// d:Tooltip text for delete buttont on training main view -// l:popup_preview_text_window_t1 -// r:5.0 -// -#define qtn_hwrt_tooltip_delete_drawing "Delete drawing" - -// d:Query note for delete all models -// l:popup_note_window -// r:5.0 -// -#define qtn_hwrt_note_delete_all_models "Are you sure you want to delete all models?" - -// d:Displayed in SCT dialog. -// d:Text in sct dialog as the title -// l:heading_pane_t1/opt1 -// r:5.0 -// -#define qtn_hwrt_sct_select_character "Select a character" - -// d:Tooltip of HWR Training in Fast swap window -// d:Text in sct dialog as the title -// l:cell_app_pane_t1 -// r:5.0 -// -#define qtn_apps_hwrt_grid "Training" - -// d:Last page number for title pane in shortcut edit text view -// l:title_pane_t2/opt9 -// r:5.0 -// -#define qtn_hwrt_title_last_page_number "2(2)" - -// d:Text of query dialog for shortcut mail view when deleting mutiple shortcuts -// d:%N is the number of marked list items. -// l:popup_note_window -// r:5.0 -// -#define qtn_hwrt_query_delete_several_shortcuts "Delete %N Shortcuts?" - -// d:Option menu item on shortcut main view. -// d:To get the hided Informative Message View visible again. -// l:list_single_pane_t1_cp2 -// r:5.0 -// -#define qtn_hwrt_om_reset_intro "Reset introduction" - -// d:Title pane text in shortcut edit view. -// l:title_pane_t2/opt9 -// r:5.0 -// -#define qtn_hwrt_title_wizard_hwr_shortcut "1(2) HWR shortcut" - -// d:Title pane text in shortcut edit view. -// l:title_pane_t2/opt9 -// r:5.0 -// -#define qtn_hwrt_title_hwr_shortcut "HWR Shortcut" diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/rom/peninputhwrtruiresources.iby --- a/textinput/peninputhwrtrui/rom/peninputhwrtruiresources.iby Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for TrainUI application -* -*/ - -#ifndef TRUIRESOURCES_IBY -#define TRUIRESOURCES_IBY -#ifdef __PEN_SUPPORT -#include - -#ifndef FF_CAPACITIVE_DISPLAY -#ifdef __HANDWRITING_RECOGNITION_INPUT - -// TrainUI UI ======================================================= -S60_APP_RESOURCE(trui) - -#endif // __HANDWRITING_RECOGNITION_INPUT -#endif // FF_CAPACITIVE_DISPLAY - -#endif // __PEN_SUPPORT -#endif // TRUIRESOURCES_IBY \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/rom/peninputhwrtruivariant.iby --- a/textinput/peninputhwrtrui/rom/peninputhwrtruivariant.iby Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for TrainUI application -* -*/ - -#ifndef TRUI_IBY -#define TRUI_IBY - -#include -#include - -#ifdef __PEN_SUPPORT -#ifndef FF_CAPACITIVE_DISPLAY -#ifdef __HANDWRITING_RECOGNITION_INPUT -#if defined(LOCALES_SC_IBY) || defined(__LOCALES_01_IBY__) \ - || defined(__LOCALES_02_IBY__) || defined(__LOCALES_03_IBY__) \ - || defined(__LOCALES_04_IBY__) || defined(__LOCALES_05_IBY__) \ - || defined(__LOCALES_06_IBY__) || defined(__LOCALES_07_IBY__) \ - || defined(__LOCALES_08_IBY__) || defined(__LOCALES_09_IBY__) \ - || defined(__LOCALES_10_IBY__) || defined(__LOCALES_13_IBY__) \ - || defined(__LOCALES_14_IBY__) || defined(__LOCALES_15_IBY__) \ - || defined(__LOCALES_16_IBY__) || defined(__LOCALES_17_IBY__) \ - || defined(__LOCALES_18_IBY__) || defined(__LOCALES_25_IBY__) \ - || defined(__LOCALES_26_IBY__) || defined(__LOCALES_27_IBY__) \ - || defined(__LOCALES_28_IBY__) || defined(__LOCALES_39_IBY__) \ - || defined(__LOCALES_45_IBY__) || defined(__LOCALES_49_IBY__) \ - || defined(__LOCALES_51_IBY__) || defined(__LOCALES_59_IBY__) \ - || defined(__LOCALES_67_IBY__) || defined(__LOCALES_68_IBY__) \ - || defined(__LOCALES_70_IBY__) || defined(__LOCALES_76_IBY__) \ - || defined(__LOCALES_78_IBY__) || defined(__LOCALES_79_IBY__) \ - || defined(__LOCALES_83_IBY__) || defined(__LOCALES_157_IBY__) \ - || defined(__LOCALES_158_IBY__) || defined(__LOCALES_159_IBY__) \ - || defined(__LOCALES_160_IBY__) || defined(__LOCALES_161_IBY__) \ - || defined(__LOCALES_326_IBY__) || defined(__LOCALES_327_IBY__) \ - || defined(__LOCALES_44_IBY__) || defined(__LOCALES_401_IBY__) \ - || defined(__LOCALES_402_IBY__) || defined(__LOCALES_186_IBY__) \ - || defined(__LOCALES_102_IBY__) || defined(__LOCALES_103_IBY__) \ - || defined(__LOCALES_230_IBY__) || defined(__LOCALES_16_IBY__) \ - || defined(__LOCALES_42_IBY__) || defined(__LOCALES_93_IBY__) \ - || defined(__LOCALES_54_IBY__) || defined(__LOCALES_57_IBY__) -#define PENINPUT_TRUI -#endif // __HANDWRITING_RECOGNITION_INPUT -#endif // FF_CAPACITIVE_DISPLAY -#endif // __PEN_SUPPORT - -#ifdef PENINPUT_TRUI -// TrainUI UI ======================================================= -S60_APP_EXE(trui) -S60_APP_AIF_ICONS(trui) -S60_APP_AIF_RSC(trui) -data=\epoc32\release\armv5\urel\z\resource\TrainUiPreset.dat RESOURCE_FILES_DIR\TrainUiPreset.dat -data=\epoc32\data\Z\resource\apps\trui_icons.mif APP_BITMAP_DIR\trui_icons.mif -#endif -#endif // __PEN_SUPPORT - -#endif // TRUI_IBY \ No newline at end of file diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/trui.cpp --- a/textinput/peninputhwrtrui/src/trui.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Application entrance -* -*/ - - -#include -#include "truiapplication.h" - -// ================= EXPORTED FUNCTIONS ================================= -// --------------------------------------------------------------------------- -// Create an application, and return a pointer to it -// --------------------------------------------------------------------------- -// -CApaApplication* NewApplication() - { - return new CTruiApplication; - } - - -TInt E32Main() - { - return EikStart::RunApplication( NewApplication ); - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truiapplication.cpp --- a/textinput/peninputhwrtrui/src/truiapplication.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiApplication -* -*/ - - -#include - -#include "truidocument.h" -#include "truiapplication.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// To create document -// --------------------------------------------------------------------------- -// -CApaDocument* CTruiApplication::CreateDocumentL() - { - // Create an trui document, and return a pointer to it - CApaDocument* document = new (ELeave) CTruiDocument( *this ); - return document; - } - -// --------------------------------------------------------------------------- -// Get Uid of AppDll -// --------------------------------------------------------------------------- -// -TUid CTruiApplication::AppDllUid() const - { - // Return the UID for the trui application - return KUidtruiApp; - } - -// --------------------------------------------------------------------------- -// Opens the .ini file associated with the application. -// --------------------------------------------------------------------------- -// -CDictionaryStore* CTruiApplication::OpenIniFileLC( RFs& aFs ) const - { - return CEikApplication::OpenIniFileLC( aFs ); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truiappradiobutton.cpp --- a/textinput/peninputhwrtrui/src/truiappradiobutton.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,545 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiRadioButton -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef RD_TACTILE_FEEDBACK -#include -#endif //RD_TACTILE_FEEDBACK - -#include "truiappradiobutton.h" -#include "truiradiobuttonobserver.h" -#include "truicontainerbase.h" - -// The amount of icons of bitmap files for ratio button -const TInt KRadioButtonIconCounts = 2; - -const TInt KSpaceBetweenItems = 10; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CTruiRadioButton* CTruiRadioButton::NewL( CCoeControl* aParent, - TSelectionType aSelectionType, - MTruiRadioButtonObserver* aObserver ) - { - CTruiRadioButton* self = CTruiRadioButton::NewLC( aParent, aSelectionType, - aObserver ); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CTruiRadioButton* CTruiRadioButton::NewLC( CCoeControl* aParent, - TSelectionType aSelectionType, - MTruiRadioButtonObserver* aObserver ) - { - CTruiRadioButton* self = new ( ELeave ) CTruiRadioButton( aObserver, - aSelectionType ); - CleanupStack::PushL( self ); - self->ConstructL( aParent ); - return self; - } - -// ----------------------------------------------------------------------------- -// CTruiHwrBox::CTruiHwrBox() -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CTruiRadioButton::CTruiRadioButton( MTruiRadioButtonObserver* aObserver, - TSelectionType aSelectionType ) - :iObserver( aObserver ), iSelectionType( aSelectionType ) - { - // No implementation required - } - - -// ----------------------------------------------------------------------------- -// CTruiRadioButton::ConstructL() -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::ConstructL( CCoeControl* aParent ) - { - SetContainerWindowL( *aParent ); - CreateBitmapForRadioButtonL(); - #ifdef RD_TACTILE_FEEDBACK - iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback ); - #endif // RD_TACTILE_FEEDBACK - } - -// ----------------------------------------------------------------------------- -// Convert texts into Label and update them in radio buttons. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::HandleItemAdditionL() - { - // Re-init control array - delete iControlArray; - iControlArray = NULL; - if ( iTextArray.Count() > 0 ) - { - iControlArray = new (ELeave) CArrayPtrFlat - ( iTextArray.Count() ); - } - // text layout - // Add items for radio button - for ( TInt i = 0; i < iTextArray.Count(); i++ ) - { - // Create label - CEikLabel* label = new (ELeave) CEikLabel(); - CleanupStack::PushL( label ); - label->SetContainerWindowL( *this ); - label->SetObserver( this ); - label->SetTextL( *iTextArray[i] ); - - // Add label to control array - iControlArray->AppendL( label ); - CleanupStack::Pop( label ); - } - } - -// ----------------------------------------------------------------------------- -// Add one item to radio button. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::AddItem( const HBufC* aText, TRadioButtonStatus aStatus ) - { - iTextArray.Append( aText ); - iStatusArray.Append( aStatus ); - } - -// ----------------------------------------------------------------------------- -// CTruiRadioButton::~CTruiRadioButton() -// Destructor. -// ----------------------------------------------------------------------------- -// -CTruiRadioButton::~CTruiRadioButton() - { - iStatusArray.Close(); - iTextArray.ResetAndDestroy(); - if ( iControlArray ) - { - iControlArray->ResetAndDestroy(); - delete iControlArray; - } - delete iRadioButtonSelectedBmp; - delete iRadioButtonSelectedBmpm; - delete iRadioButtonNonSelectedBmp; - delete iRadioButtonNonSelectedBmpm; - iIconLayout.Close(); - } - -// --------------------------------------------------------------------------- -// Handles an event from an observed control. -// --------------------------------------------------------------------------- -// -void CTruiRadioButton::HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType ) - { - TInt index; - for ( index = 0; index < iControlArray->Count(); index++ ) - { - if ( aControl == iControlArray->At( index ) ) - { - break; - } - } - if ( iSelectionType == ERadioButton ) - { - HandlePointerRadioButtonL( index, aEventType ); - } - else - { - HandlePointerCheckBox( index, aEventType ); - } - DrawNow(); - } - -// --------------------------------------------------------------------------- -// Handle pointer on radio button. -// --------------------------------------------------------------------------- -// -void CTruiRadioButton::HandlePointerRadioButtonL( TInt aIndex, TCoeEvent aEventType ) - { - if ( aIndex < iStatusArray.Count() && aEventType == EEventRequestFocus ) - { - for ( TInt i = 0; i < iStatusArray.Count(); i++ ) - { - if ( i == aIndex ) - { - if ( iStatusArray[aIndex] == ENonSelected ) - { - iStatusArray[aIndex] = ESelected; - if ( iObserver ) - { - iObserver->SelectChangedL( aIndex ); - } - } - } - else - { - iStatusArray[i] = ENonSelected; - } - } - } - } - -// --------------------------------------------------------------------------- -// Handle pointer on checkbox. -// --------------------------------------------------------------------------- -// -void CTruiRadioButton::HandlePointerCheckBox( TInt aIndex, TCoeEvent aEventType ) - { - if ( aIndex < iControlArray->Count() && aEventType == EEventRequestFocus ) - { - iStatusArray[aIndex] = ( iStatusArray[aIndex] == ENonSelected ) - ? ESelected : ENonSelected; - } - } - -// --------------------------------------------------------------------------- -// Handles an event from an observed control. -// --------------------------------------------------------------------------- -// -void CTruiRadioButton::SizeChanged() - { - LoadIconsLayout( 0 ); - for ( TInt i = 0; i < iIconLayout.Count(); i++ ) - { - TSize iconSize = iIconLayout[i].Rect().Size(); - AknIconUtils::SetSize( iRadioButtonSelectedBmp, iconSize ); - AknIconUtils::SetSize( iRadioButtonSelectedBmpm, iconSize ); - AknIconUtils::SetSize( iRadioButtonNonSelectedBmpm, iconSize ); - AknIconUtils::SetSize( iRadioButtonNonSelectedBmpm, iconSize ); - } - // list_single_hwr_training_symbol_option_pane_t1 - if ( iControlArray && iTextArray.Count() > 0 ) - { - for ( TInt i = 0; i < iTextArray.Count(); i++ ) - { - TAknTextComponentLayout option_pane_t1_layout = - AknLayoutScalable_Apps:: - list_single_hwr_training_symbol_option_pane_t1( 0 ); - CEikLabel* label = static_cast( iControlArray->At( i ) ); - AknLayoutUtils::LayoutLabel( label, - Rect(), - iMultilineLayout ); - // Set color for label - TRgb labelColor = KRgbBlack; - TInt error = GetCachedLabelTextColor( labelColor ); - if ( error == KErrNone ) - { - TRAP_IGNORE( label->OverrideColorL( EColorLabelText, labelColor ) ); - } - TRAP_IGNORE( ClipToFitLabelL( label, i ) ); - // Set font for label - if ( TBidiText::ScriptDirectionality( User::Language() ) - == TBidiText::ERightToLeft ) - { // arabic,hebrew, set text RTL - label->SetLabelAlignment( ELayoutAlignBidi ); - } - } - } - } - -// ----------------------------------------------------------------------------- -// Draws control to given area -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::Draw( const TRect& /*aRect*/ ) const - { - CWindowGc& gc = SystemGc(); - // Gets the control's extent - TRect rect( Rect() ); - // Clears the screen - Window().SetBackgroundColor( TRgb( ~0 ) ); - - TSize pixSize = iRadioButtonSelectedBmp->SizeInPixels(); - for ( TInt i = 0; i < iStatusArray.Count(); i++ ) - { - TPoint tl( rect.iTl.iX, rect.iTl.iY + pixSize.iWidth * i - + KSpaceBetweenItems * i ); - if ( iStatusArray[i] == ESelected ) - { - iIconLayout[0].DrawImage( gc, iRadioButtonSelectedBmp, iRadioButtonSelectedBmpm ); - } - else if ( iStatusArray[i] == ENonSelected ) - { - iIconLayout[0].DrawImage( gc, iRadioButtonNonSelectedBmp, - iRadioButtonNonSelectedBmpm ); - } - } - } - -// ----------------------------------------------------------------------------- -// Gets the number of controls contained in a compound control. -// ----------------------------------------------------------------------------- -// -TInt CTruiRadioButton::CountComponentControls() const - { - if ( iControlArray ) - { - return iControlArray->Count(); - } - return 0; - } - -// ----------------------------------------------------------------------------- -// Gets an indexed component of a compound control. -// ----------------------------------------------------------------------------- -// -CCoeControl* CTruiRadioButton::ComponentControl( TInt aIndex ) const - { - if ( iControlArray && aIndex < iControlArray->Count() ) - { - return iControlArray->At( aIndex ); - } - return NULL; - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles a change to the control's resources. -// --------------------------------------------------------------------------- -// -void CTruiRadioButton::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange( aType ); - if ( aType == KAknsMessageSkinChange && iControlArray ) - { - TRgb labelColor = KRgbBlack; - TInt error = GetCachedLabelTextColor( labelColor ); - if ( error == KErrNone ) - { - for ( TInt i = 0; i < iControlArray->Count(); i++ ) - { - CCoeControl* label = iControlArray->At( i ); - TRAP_IGNORE( label->OverrideColorL( EColorLabelText, labelColor ) ); - } - } - TRAP_IGNORE( CreateBitmapForRadioButtonL() ); - SizeChanged(); - } - } - -// ----------------------------------------------------------------------------- -// Gets an indexed component of a compound control. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::HandlePointerEventL( const TPointerEvent& aPointerEvent ) - { - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - // Click the area of icon - TSize pixSize = iRadioButtonSelectedBmp->SizeInPixels(); - TRect rect( Rect() ); - for ( TInt i = 0; i < iControlArray->Count(); i++ ) - { - if ( iIconLayout[i].Rect().Contains( aPointerEvent.iPosition ) ) - { - // Handle the event to point on Icon - HandleControlEventL( iControlArray->At( i ), - EEventRequestFocus ); - } - } - #ifdef RD_TACTILE_FEEDBACK - if ( iTactileSupported ) - { - MTouchFeedback::Instance()->InstantFeedback( ETouchFeedbackBasic ); - } - #endif // RD_TACTILE_FEEDBACK - } - CCoeControl::HandlePointerEventL( aPointerEvent ); - } - -// ----------------------------------------------------------------------------- -// Return the control's minisize. -// ----------------------------------------------------------------------------- -// -TSize CTruiRadioButton::MinimumSize() - { - TInt miniWidth = 0; - TInt miniHeight = 0; - for ( TInt i = 0; i < iControlArray->Count(); i++ ) - { - TSize itemMiniSize = iControlArray->At( i )->Size(); - miniHeight += itemMiniSize.iHeight + KSpaceBetweenItems * i; - miniWidth = itemMiniSize.iWidth - + iRadioButtonSelectedBmp->SizeInPixels().iWidth; - } - return TSize( miniWidth, miniHeight ); - } - -// ----------------------------------------------------------------------------- -// Create radio button's bitmap. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::CreateBitmapForRadioButtonL() - { - delete iRadioButtonSelectedBmp; - delete iRadioButtonSelectedBmpm; - delete iRadioButtonNonSelectedBmp; - delete iRadioButtonNonSelectedBmpm; - // Read resource file - TResourceReader reader; - TInt btnResource; - if ( iSelectionType == ERadioButton ) - { - btnResource = R_AVKON_SETTING_PAGE_RADIOBUTTON_ICONS; - } - else - { - btnResource= R_AVKON_SETTING_PAGE_CHECKBOX_ICONS; - } - iEikonEnv->CreateResourceReaderLC( reader, btnResource ); - reader.ReadInt16(); //not needed, simple or complex - HBufC* bmpFile = reader.ReadHBufCL(); - CleanupStack::PushL( bmpFile ); - TInt count = reader.ReadInt16(); // count - if( count < KRadioButtonIconCounts ) - { - User::Leave(KErrCorrupt); - } - TInt32 bmpSelected = reader.ReadInt32(); - TInt32 bmpSelectedM = reader.ReadInt32(); - TInt32 bmpNonSelected = reader.ReadInt32(); - TInt32 bmpNonSelectedM = reader.ReadInt32(); - CleanupStack::Pop( bmpFile ); - CleanupStack::PopAndDestroy(); // reader - - CleanupStack::PushL( bmpFile ); - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnIndiRadiobuttOn, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - iRadioButtonSelectedBmp, - iRadioButtonSelectedBmpm, - *bmpFile, - bmpSelected, - bmpSelectedM, - KRgbBlack - ); - - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnIndiRadiobuttOff, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - iRadioButtonNonSelectedBmp, - iRadioButtonNonSelectedBmpm, - *bmpFile, - bmpNonSelected, - bmpNonSelectedM, - KRgbBlack - ); - CleanupStack::PopAndDestroy( bmpFile ); - } - -// --------------------------------------------------------------------------- -// Get cached color of skin for label control -// --------------------------------------------------------------------------- -// -TInt CTruiRadioButton::GetCachedLabelTextColor( TRgb& aColor ) - { - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - // Set pen color to the color of test in main area - return AknsUtils::GetCachedColor( skin, - aColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG6 ); - } - -// --------------------------------------------------------------------------- -// Load layouts for icons from LAF. -// --------------------------------------------------------------------------- -// -void CTruiRadioButton::LoadIconsLayout( TInt aVarity ) - { - TRect rect = Rect(); - iIconLayout.Reset(); - // Caculate list_single_hwr_training_symbol_option_pane_g1 for line1 - TAknWindowComponentLayout icon_checked_layout = - AknLayoutScalable_Apps::list_single_hwr_training_symbol_option_pane_g1 - ( aVarity ); - TAknLayoutRect icon_checked_layout_rect; - icon_checked_layout_rect.LayoutRect( rect, icon_checked_layout ); - iIconLayout.Append( icon_checked_layout_rect ); - } -// ----------------------------------------------------------------------------- -// Convert logical name to visual name for label when needed. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::ConvertToVisualForEdwinL( CEikLabel* aLabel, - const TDesC& aLogicalTxt, - const CFont& aFont, - TInt aLineWidth ) - { - HBufC* visualText = HBufC::NewLC( aLogicalTxt.Length() - + TBidiLogicalToVisual::KMinCharAvailable - + KExtraSize ); - TPtr visualTextPtr = visualText->Des(); - AknBidiTextUtils::ConvertToVisualAndClip( aLogicalTxt, visualTextPtr, - aFont, aLineWidth, aLineWidth ); - aLabel->SetTextL( *visualText ); - aLabel->SetLabelAlignment( ELayoutAlignBidi ); - CleanupStack::PopAndDestroy( visualText ); - } - -// ----------------------------------------------------------------------------- -// Clip text of editor to fit editor width. -// ----------------------------------------------------------------------------- -// -void CTruiRadioButton::ClipToFitLabelL( CEikLabel* aLabel, TInt aIndex ) - { - if ( aLabel && aLabel->Size().iWidth > 0 ) - { - // Get font fo editor from LAF - const CFont* edwinFont = AknLayoutUtils::FontFromId - ( iMultilineLayout.FontId() ); - // Prepare text to set into editor - HBufC* textInArray = iTextArray[aIndex]; - // Create a new HBufC to store text for editor - HBufC* edwinText = HBufC::NewLC( textInArray->Length() - + KExtraSize ); - TPtr edwinTextPtr = edwinText->Des(); - edwinTextPtr.Copy( *textInArray ); - // Clip text for editor - AknTextUtils::ClipToFit( edwinTextPtr, *edwinFont, - aLabel->Size().iWidth ); - aLabel->SetTextL( *edwinText ); - CleanupStack::PopAndDestroy( edwinText ); - } - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truiappui.cpp --- a/textinput/peninputhwrtrui/src/truiappui.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,286 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiAppUi -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "trui.hrh" -#include "truiappui.h" -#include "truimainview.h" -#include "truishortcutsview.h" -#include "truishortcuteditview.h" -#include "truishortcutedittextview.h" -#include "truiinfomessageview.h" -#include "truiengine.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// ConstructL is called by the application framework -// --------------------------------------------------------------------------- -// -void CTruiAppUi::ConstructL() - { - BaseConstructL(); - //Create HWR engine - iEngine = CTruiEngine::NewL( iEikonEnv ); - - //Create view - iMainView = CTruiMainView::NewL(); - AddViewL( iMainView ); - - iShortcutsView = CTruiShortcutsView::NewL(); - AddViewL( iShortcutsView ); - - iShortcutEditView = CTruiShortcutEditView::NewL(); - AddViewL( iShortcutEditView ); - - iShortcutEditTextView = CTruiShortcutEditTextView::NewL(); - AddViewL( iShortcutEditTextView ); - - iInfoMessageView = CTruiInfoMessageView::NewL(); - AddViewL( iInfoMessageView ); - - SetDefaultViewL( *iMainView ); - - iNaviDecorator = CreateNavigationTabL( R_NAVIGATIONPANE_TABGROUP, 0 ); - - // Create empty navi pane - // Get status pane from AppUi - CEikStatusPane* statusPane = StatusPane(); - CEikStatusPaneBase::TPaneCapabilities naviPaneCapability = - statusPane->PaneCapabilities( TUid::Uid( EEikStatusPaneUidNavi ) ); - // if the navigation pane can be used - if ( naviPaneCapability.IsPresent() && naviPaneCapability.IsAppOwned() ) - { - CAknNavigationControlContainer* naviPane = - static_cast - ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); - // if the navigation pane can be used - if ( naviPaneCapability.IsPresent() && naviPaneCapability.IsAppOwned() ) - { - iEmptyNaviDecorator = naviPane->CreateNavigationLabelL(); - } - } - AknsUtils::SetAvkonSkinEnabledL( ETrue ); - } - -// --------------------------------------------------------------------------- -// Constructor -// --------------------------------------------------------------------------- -// -CTruiAppUi::CTruiAppUi() - { - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CTruiAppUi::~CTruiAppUi() - { - if ( iNaviDecorator ) - { - delete iNaviDecorator; - } - if ( iEmptyNaviDecorator ) - { - delete iEmptyNaviDecorator; - } - if ( iEngine ) - { - delete iEngine; - } - } - -// --------------------------------------------------------------------------- -// handle any menu commands -// --------------------------------------------------------------------------- -// -void CTruiAppUi::HandleCommandL( TInt aCommand ) - { - switch( aCommand ) - { - case EEikCmdExit: - case EAknSoftkeyExit: - { - PrepareToExit(); - Exit(); - break; - } - case EMainViewHelp: - case EShortcutViewHelp: - { - CArrayFix* buf = CCoeAppUi::AppHelpContextL(); - HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), - buf ); - break; - } - default: - break; - } - } - -// --------------------------------------------------------------------------- -// Create navigation pane -// --------------------------------------------------------------------------- -// -CAknNavigationDecorator* CTruiAppUi::CreateNavigationTabL - ( const TInt aResourceId, - const TInt aDefaultActive ) - { - // Get status pane from AppUi - CEikStatusPane* statusPane = StatusPane(); - CEikStatusPaneBase::TPaneCapabilities naviPaneCapability = - statusPane->PaneCapabilities( TUid::Uid( EEikStatusPaneUidNavi ) ); - - CAknNavigationDecorator* naviDecorator = NULL; - // if the navigation pane can be used - if ( naviPaneCapability.IsPresent() && naviPaneCapability.IsAppOwned() ) - { - // Get the navigation pane from status pane. - CAknNavigationControlContainer* naviPane = - static_cast - ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC( reader, aResourceId ); - - // Create the navigation pane tab group - naviDecorator = naviPane->CreateTabGroupL( reader, this ); - CleanupStack::PushL( naviDecorator ); - - // Set tab text - CAknTabGroup* tabGroup = static_cast - ( naviDecorator->DecoratedControl() ); - tabGroup->SetActiveTabByIndex( aDefaultActive ); - - // Push and show the navigation pane - naviPane->PushL( *naviDecorator ); - CleanupStack::Pop( naviDecorator ); - CleanupStack::PopAndDestroy(); // reader - } - return naviDecorator; - } - -// --------------------------------------------------------------------------- -// return pointer of hand writing engine -// --------------------------------------------------------------------------- -// -CTruiEngine* CTruiAppUi::HwrEngine() const - { - return iEngine; - } - -// --------------------------------------------------------------------------- -// Return a pointer to navigation pane. -// --------------------------------------------------------------------------- -// -CAknNavigationDecorator* CTruiAppUi::GetNaviDecorator() const - { - return iNaviDecorator; - } - -// --------------------------------------------------------------------------- -// Close the navi pane -// --------------------------------------------------------------------------- -// -void CTruiAppUi::CloseNaviPaneL() - { - // Get status pane from AppUi - CEikStatusPane* statusPane = StatusPane(); - - CEikStatusPaneBase::TPaneCapabilities naviPaneCapability = - statusPane->PaneCapabilities( TUid::Uid( EEikStatusPaneUidNavi ) ); - // if the navigation pane can be used - if ( naviPaneCapability.IsPresent() && naviPaneCapability.IsAppOwned() ) - { - // Get the navigation pane from status pane. - CAknNavigationControlContainer* naviPane = - static_cast - ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); - // Pop and hide the navigation pane - naviPane->PushL( *iEmptyNaviDecorator ); - } - } - -// --------------------------------------------------------------------------- -// Show the navi pane -// --------------------------------------------------------------------------- -// -void CTruiAppUi::ShowNaviPaneL() - { - CEikStatusPane* statusPane = StatusPane(); - - CEikStatusPaneBase::TPaneCapabilities naviPaneCapability = - statusPane->PaneCapabilities( TUid::Uid( EEikStatusPaneUidNavi ) ); - // if the navigation pane can be used - if ( naviPaneCapability.IsPresent() && naviPaneCapability.IsAppOwned() ) - { - CAknNavigationControlContainer* naviPane = - static_cast - ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); - // Push and show the navigation pane - naviPane->PushL( *iNaviDecorator ); - } - } - -// --------------------------------------------------------------------------- -// Handle active tab changed -// --------------------------------------------------------------------------- -// -void CTruiAppUi::TabChangedL( TInt aIndex ) - { - if ( aIndex == 0 ) - { - // Switch to mainview - ActivateLocalViewL( KTruiMainViewId ); - } - else - { - // Switch to shortcuts view - ActivateLocalViewL( KTruiShortcutsViewId ); - } - } - -// --------------------------------------------------------------------------- -// Show the title pane -// --------------------------------------------------------------------------- -// -void CTruiAppUi::ShowTitlePaneL( const TDesC& aTitle ) - { - CEikStatusPane* statusPane = StatusPane(); - CEikStatusPaneBase::TPaneCapabilities titlePaneCapability = - statusPane->PaneCapabilities( TUid::Uid( EEikStatusPaneUidTitle ) ); - if ( titlePaneCapability.IsPresent() && titlePaneCapability.IsAppOwned() ) - { - CAknTitlePane* titlePane = static_cast - ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); - titlePane->SetTextL( aTitle ); - } - } - - - - - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truicontainerbase.cpp --- a/textinput/peninputhwrtrui/src/truicontainerbase.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,434 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiContainerBase -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "truicontainerbase.h" -#include "truiappui.h" - -_LIT( KChangeLine, "\n" ); - -const TSize KHwrBoxSizeLandscape = TSize( 200, 200 ); - -// ======== MEMBER FUNCTIONS ======== - -CTruiContainerBase::CTruiContainerBase() - { - iAppUi = static_cast( iAvkonViewAppUi ); - iEngine = iAppUi->HwrEngine(); - } - -CTruiContainerBase::~CTruiContainerBase() - { - } - -// --------------------------------------------------------------------------- -// Get the origin size in which input the model for preset symbols. -// --------------------------------------------------------------------------- -// -TSize CTruiContainerBase::OriginSymbolSize() - { - TRect rect = iAvkonViewAppUi->ClientRect(); - - TAknWindowComponentLayout main_pane_layout = - AknLayoutScalable_Apps::main_hwr_training_pane(); - TAknLayoutRect main_pane_layout_rect; - main_pane_layout_rect.LayoutRect( rect, main_pane_layout ); - TRect main_pane_rect = main_pane_layout_rect.Rect(); - - // hwr_training_write_pane - TAknWindowComponentLayout write_pane_layout = - AknLayoutScalable_Apps::hwr_training_write_pane( 2 ); - TAknLayoutRect write_pane_layout_rect; - write_pane_layout_rect.LayoutRect( main_pane_rect, write_pane_layout ); - - TAknWindowComponentLayout drawable_rect_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g7( 0 ); - TAknLayoutRect drawable_rect_layout_rect; - drawable_rect_layout_rect.LayoutRect( write_pane_layout_rect.Rect(), - drawable_rect_layout ); - return drawable_rect_layout_rect.Rect().Size(); - } - -// --------------------------------------------------------------------------- -// Wrap the text to fit the minisize of Label. -// --------------------------------------------------------------------------- -// -TInt CTruiContainerBase::WrapLabelText( const CEikLabel* aLabel, - const TDesC& aText, - TInt aMaxLines, - HBufC* aWrappedText ) - { - return DoWrapLabelText( aLabel->Font(), aLabel->Size().iWidth, aText, - aMaxLines, aWrappedText ); - } - -// --------------------------------------------------------------------------- -// Wrap the text to fit the minisize of Label. -// --------------------------------------------------------------------------- -// -TInt CTruiContainerBase::WrapLabelText( const TAknLayoutText& aLayoutText, - const TDesC& aText, - TInt aMaxLines, - HBufC* aWrappedText ) - { - const CFont* font = aLayoutText.Font(); - TInt width = aLayoutText.TextRect().Size().iWidth; - return DoWrapLabelText( font, width, aText, aMaxLines, aWrappedText ); - } - -// --------------------------------------------------------------------------- -// Wrap the text to fit the minisize of Label. -// --------------------------------------------------------------------------- -// -void CTruiContainerBase::WrapLabelTextL( const CFont* aFont, const TDesC& aText, - const RArray& aLineWidthArray, - HBufC* aWrappedText ) - { - if ( aWrappedText && aLineWidthArray.Count() > 0 ) - { - CArrayFixFlat* lineWidthArray = new (ELeave) - CArrayFixFlat( aLineWidthArray.Count() ); - CleanupStack::PushL( lineWidthArray ); - // Create line array - for ( TInt i = 0; i < aLineWidthArray.Count(); i++ ) - { - lineWidthArray->AppendL( aLineWidthArray[i] ); - } - // Do wrap and clip - TPtr wrappedTextPtr = aWrappedText->Des(); - AknTextUtils::WrapToStringAndClipL( aText, *lineWidthArray, *aFont, - wrappedTextPtr ); - CleanupStack::PopAndDestroy( lineWidthArray ); - } - } - -// --------------------------------------------------------------------------- -// Create skin specified button from resource. -// --------------------------------------------------------------------------- -// -CAknButton* CTruiContainerBase::CreateButtonL( TInt aResourceId, - const CCoeControl* aParent, - MCoeControlObserver* aObserver ) - { - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC( reader, aResourceId ); - CAknButton* button = ConstructButtonFromResourceL( reader ); - if ( aParent ) - { - button->SetContainerWindowL( *aParent ); - } - if ( aObserver ) - { - button->SetObserver( aObserver ); - } - CleanupStack::PopAndDestroy(); // reader - return button; - } - -// --------------------------------------------------------------------------- -// Add skin specified buttons into toolbar. -// --------------------------------------------------------------------------- -// -void CTruiContainerBase::AddButtonsToToolbarL( CAknToolbar* aToolbar, TInt aResourceId ) - { - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC( reader, aResourceId ); - const TInt buttonCount = reader.ReadInt16(); - for ( TInt i = 0; i < buttonCount; i++ ) - { - // Create each toolbar item - TInt controlType = reader.ReadInt16(); - TInt commandId = reader.ReadInt16(); - reader.ReadInt16(); // flags - reader.ReadInt16(); // length - CAknButton* button = ConstructButtonFromResourceL( reader ); - aToolbar->AddItemL( button, controlType, commandId, 0, i ); - } - CleanupStack::PopAndDestroy(); // reader - } - -// --------------------------------------------------------------------------- -// Return current keyboard mode. -// --------------------------------------------------------------------------- -// -TInt CTruiContainerBase::CurrentKeyBoardModeL() - { - RProperty keyboardProperty; - CleanupClosePushL( keyboardProperty ); - User::LeaveIfError( keyboardProperty.Attach( KCRUidAvkon, - KAknQwertyInputModeActive ) ); - TInt keyboardMode = 0; - keyboardProperty.Get( keyboardMode ); - CleanupStack::PopAndDestroy( &keyboardProperty ); - return keyboardMode; - } - -// --------------------------------------------------------------------------- -// Read setting from ini file to decide if display wizard view. -// --------------------------------------------------------------------------- -// -void CTruiContainerBase::GetSettingFromIniFileL( TUint32 aKey, TInt& aValue ) - { - CDictionaryStore* iniFile = iAppUi->Application()->OpenIniFileLC( iEikonEnv->FsSession() ); - RDictionaryReadStream readSteam; - readSteam.OpenLC( *iniFile, TUid::Uid( aKey ) ); - TInt16 value; - readSteam >> value; - aValue = value; - CleanupStack::PopAndDestroy( &readSteam ); - CleanupStack::PopAndDestroy( iniFile ); - } - -// --------------------------------------------------------------------------- -// Save settings into file. -// --------------------------------------------------------------------------- -// -void CTruiContainerBase::SaveSettingIntoIniFileL( TUint32 aKey, TInt aValue ) - { - CDictionaryStore* iniFile = - iAppUi->Application()->OpenIniFileLC( iEikonEnv->FsSession() ); - RDictionaryWriteStream stream; - stream.AssignLC( *iniFile, TUid::Uid( aKey ) ); - stream << (TInt16)aValue; - stream.CommitL(); - iniFile->CommitL(); - CleanupStack::PopAndDestroy( &stream ); - CleanupStack::PopAndDestroy( iniFile ); - } - -// --------------------------------------------------------------------------- -// Get cached color of skin for label control -// --------------------------------------------------------------------------- -// -TInt CTruiContainerBase::GetCachedLabelTextColor( TRgb& aColor ) - { - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - // Set pen color to the color of test in main area - return AknsUtils::GetCachedColor( skin, - aColor, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG6 ); - } - -// --------------------------------------------------------------------------- -// Get cached color of skin for icon -// --------------------------------------------------------------------------- -// -TInt CTruiContainerBase::GetCachedIcontColor( TRgb& aColor, - const TAknsItemID& aColorId, - TInt aColorIndex ) - { - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - // Set pen color to the color of test in main area - return AknsUtils::GetCachedColor( skin, - aColor, - aColorId, - aColorIndex ); - } - -// --------------------------------------------------------------------------- -// Create skin specified button from resource. -// --------------------------------------------------------------------------- -// -CAknButton* CTruiContainerBase::ConstructButtonFromResourceL( TResourceReader& aReader ) - { - TInt flags = aReader.ReadInt16(); - TPtrC helpText = aReader.ReadTPtrC(); - TPtrC fileName = aReader.ReadTPtrC(); - TInt bmpId = aReader.ReadInt16(); - TInt bmpMaskId = aReader.ReadInt16(); - TInt pressId = aReader.ReadInt16(); - TInt pressMaskId = aReader.ReadInt16(); - TInt mainItemId = aReader.ReadInt32(); - TInt minorItemId = aReader.ReadInt32(); - TInt mainItemPressId = aReader.ReadInt32(); - TInt minorItemPressId = aReader.ReadInt32(); - - CGulIcon* icon = NULL; - TInt length = fileName.Length(); - if ( fileName.Length() ) - { - TAknsItemID aknItemId = { mainItemId, minorItemId }; - - // Create icon - CFbsBitmap* bitmap; - CFbsBitmap* bitmapm; - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - AknsUtils::CreateColorIconL( skin, - aknItemId, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG30, - bitmap, - bitmapm, - fileName, - bmpId, - bmpMaskId, - KRgbBlack ); - CleanupStack::PushL( bitmap ); - CleanupStack::PushL( bitmapm ); - icon = CGulIcon::NewL( bitmap, bitmapm ); // Ownership transfered - CleanupStack::Pop( bitmapm ); - CleanupStack::Pop( bitmap ); - } - CleanupStack::PushL( icon ); - CAknButton* button = CAknButton::NewL ( icon, - NULL, - NULL, - NULL, - KNullDesC, - helpText, - flags, - NULL ); - CleanupStack::Pop( icon ); - return button; - } - -// --------------------------------------------------------------------------- -// Construct icons from resource. -// --------------------------------------------------------------------------- -// -CGulIcon* CTruiContainerBase::ConstructIconFromResourceL( TInt aResourceId ) - { - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC( reader, aResourceId ); - TInt flags = reader.ReadInt16(); - TPtrC helpText = reader.ReadTPtrC(); - TPtrC fileName = reader.ReadTPtrC(); - TInt bmpId = reader.ReadInt16(); - TInt bmpMaskId = reader.ReadInt16(); - TInt pressId = reader.ReadInt16(); - TInt pressMaskId = reader.ReadInt16(); - TInt mainItemId = reader.ReadInt32(); - TInt minorItemId = reader.ReadInt32(); - TInt mainItemPressId = reader.ReadInt32(); - TInt minorItemPressId = reader.ReadInt32(); - - TAknsItemID aknItemId = { mainItemId, minorItemId }; - - // Create icon - CFbsBitmap* bitmap; - CFbsBitmap* bitmapm; - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - AknsUtils::CreateColorIconL( skin, - aknItemId, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG30, - bitmap, - bitmapm, - fileName, - bmpId, - bmpMaskId, - KRgbBlack ); - CleanupStack::PushL( bitmap ); - CleanupStack::PushL( bitmapm ); - CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapm ); // Ownership transfered - CleanupStack::Pop( bitmapm ); - CleanupStack::Pop( bitmap ); - CleanupStack::PopAndDestroy(); // reader - return icon; - } - -// --------------------------------------------------------------------------- -// Wrap the text to fit the minisize of Label. -// --------------------------------------------------------------------------- -// -TInt CTruiContainerBase::DoWrapLabelText( const CFont* aFont, TInt aWidth, - const TDesC& aText, TInt aMaxLines, - HBufC* aWrappedText ) - { - TInt lineCount; - TInt startPos = 0; - TInt lines = 1; - if ( aWidth <= 0 || !aWrappedText ) - { - return 0; - } - TPtrC subText = aText.Mid( startPos, aText.Length() - startPos ); - TPtr newTextPtr = aWrappedText->Des(); - newTextPtr.Copy( KNullDesC ); - while ( ( lineCount = aFont->TextCount( subText, aWidth ) ) < subText.Length() ) - { - // Need to wrap - if ( ++lines > aMaxLines ) - { - // Check if it is up to maximum line - break; - } - // get the last char of every line - TChar nextCharLine = aText[ startPos + lineCount ]; - - // Decide at which position insert the \n - if ( nextCharLine == TChar( ' ' ) ) - { - // Replace nextCharLine with \n - newTextPtr.Append( subText.Mid( 0, lineCount ) ); - newTextPtr.Append( KChangeLine ); - // And move the startPos for the next loop. - startPos += lineCount + 1; - } - else - { - // Go forward to find " " and replace it with \n - // And move the startPos for the next loop. - TPtrC subTextPtr = subText.Mid( 0, lineCount ); - TInt pos = subTextPtr.LocateReverse( TChar( ' ' ) ); - if ( pos != KErrNotFound ) - { - newTextPtr.Append( subTextPtr.Left( pos ) ); - newTextPtr.Append( KChangeLine ); - startPos += pos + 1; - } - else - { - newTextPtr.Append( subTextPtr ); - newTextPtr.Append( KChangeLine ); - startPos += lineCount; - } - } - subText.Set( aText.Mid( startPos, aText.Length() - startPos ) ); - } - newTextPtr.Append( subText ); - return lines; - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles a change to the control's resources. -// --------------------------------------------------------------------------- -// -void CTruiContainerBase::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange( aType ); - if ( aType==KEikDynamicLayoutVariantSwitch && iView ) - { - SetRect( iView->ClientRect() ); - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truidocument.cpp --- a/textinput/peninputhwrtrui/src/truidocument.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiDocument -* -*/ - - -#include "truiappui.h" -#include "truidocument.h" -#include "truiapplication.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Standard Symbian OS construction -// --------------------------------------------------------------------------- -// -CTruiDocument::CTruiDocument( CAknApplication& aApp ) : CAknDocument( aApp ) - { - } - -// --------------------------------------------------------------------------- -// Standard Symbian OS construction -// --------------------------------------------------------------------------- -// -CTruiDocument::~CTruiDocument() - { - } - -// --------------------------------------------------------------------------- -// Create the application user interface, and return a pointer to it, -// the framework takes ownership of this object -// --------------------------------------------------------------------------- -// -CEikAppUi* CTruiDocument::CreateAppUiL() - { - CEikAppUi* appUi = new (ELeave) CTruiAppUi; - return appUi; - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truiengine.cpp --- a/textinput/peninputhwrtrui/src/truiengine.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,725 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutsView -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "trui.hrh" -#include "truiengine.h" - -#include "truilanguagerelation.h" - -const TInt KRangeNamesArraySize = 5; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// construction -// --------------------------------------------------------------------------- -// -CTruiEngine::CTruiEngine( CEikonEnv* aEikonEnv ) : iEnv( aEikonEnv ) - { - } - -// --------------------------------------------------------------------------- -// construction -// --------------------------------------------------------------------------- -// -void CTruiEngine::ConstructL() - { - CRepository* repository = CRepository::NewLC( KCRUidAknFep ); - // Get current input language - TInt inputLanguage = 0; - repository->Get( KAknFepInputTxtLang, inputLanguage ); - iInputLanguage = (TLanguage)inputLanguage; - - // Create PtiEngine - iEngine = CPtiEngine::NewL(); - MPtiHwrRecognizer* hwr = iEngine->GetHwrRecognizerL( ELangEnglish ); - - iPtiEngine = hwr->QueryUdmInterfaceL() ; - - // Initialize a mapping table for language script - RArray languageRelation; - CleanupClosePushL( languageRelation ); - InitLanguageRelationL( R_TRUI_LANGUAGE_SCRIPT_SET, languageRelation ); - - // Get all supported language script - InitSupportedLanguageScriptL( iSupportedScript, iEngine, languageRelation ); - - if ( iSupportedScript.Count() == 0 ) - { - User::Leave( KErrNotSupported ); - } - - // Get currently active language script - TInt langCode; - repository->Get( KAknFepInputTxtLang, langCode ); - TInt activeScript = GetActiveLanguageScript( langCode, languageRelation ); - - // Destroy the mapping table. - CleanupStack::PopAndDestroy( &languageRelation ); - CleanupStack::PopAndDestroy( repository ); - - if ( activeScript != KErrNotFound ) - { - SetLanguageScriptByIndexL( activeScript ); - } - else - { - User::Leave( KErrNotSupported ); - } - } - -// --------------------------------------------------------------------------- -// construction -// --------------------------------------------------------------------------- -// -CTruiEngine* CTruiEngine::NewL( CEikonEnv* aEikonEnv ) - { - CTruiEngine* self = CTruiEngine::NewLC( aEikonEnv ); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// construction -// --------------------------------------------------------------------------- -// -CTruiEngine* CTruiEngine::NewLC( CEikonEnv* aEikonEnv ) - { - CTruiEngine* self = new ( ELeave ) CTruiEngine( aEikonEnv ); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------------------------- -// destruction -// --------------------------------------------------------------------------- -// -CTruiEngine::~CTruiEngine() - { - iSupportedScript.Close(); - if ( iRangeName ) - { - iRangeName->Reset(); - delete iRangeName; - } - iSupportedRange.Close(); - if ( iCharacterSet ) - { - delete iCharacterSet; - } - if ( iShortcutList ) - { - iShortcutList->Reset(); - delete iShortcutList; - } - delete iEngine; - } - -// --------------------------------------------------------------------------- -// Set current language script -// --------------------------------------------------------------------------- -// -void CTruiEngine::SetLanguageScriptByIndexL( TInt aIndex ) - { - //Set script - iCurrentScript = aIndex; - - //Delete previous iRangeName - if ( iRangeName ) - { - delete iRangeName; - iRangeName = NULL; - } - //Reset iSupportedRange - iSupportedRange.Reset(); - - //Set character range - HBufC* charRange; - switch( iCurrentScript ) - { - case EMainViewSubmenuWestern: - { - //There are 5 subranges under Western - iRangeName = new (ELeave) CDesCArrayFlat( KRangeNamesArraySize ); - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_LOWER ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinLowerLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_CAPITAL ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinUpperLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_ACCENT ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinAccent ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_DIGITS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinDigital ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_SYMBOLS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinSymbol ); - - iPtiEngine->SetLanguageScriptL( EPtiHwrScriptLatin ); - break; - } - case EMainViewSubmenuCyrillic: - { - //There are 5 subranges under Cyrillic - iRangeName = new (ELeave) CDesCArrayFlat( KRangeNamesArraySize ); - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CYRILLIC_LOWER ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ECyrillicLowerLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CYRILLIC_CAPITAL ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ECyrillicUpperLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_DIGITS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinDigital ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_SYMBOLS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinSymbol ); - - iPtiEngine->SetLanguageScriptL( EPtiHwrScriptCyrillic ); - break; - } - case EMainViewSubmenuGreek: - { - //There are 5 subranges under Greek - iRangeName = new (ELeave) CDesCArrayFlat( KRangeNamesArraySize ); - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_GREEK_LOWER ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( EGreekLowerLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_GREEK_CAPITAL ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( EGreekUpperLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_DIGITS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinDigital ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_SYMBOLS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinSymbol ); - - iPtiEngine->SetLanguageScriptL( EPtiHwrScriptGreek ); - break; - } - case EMainViewSubmenuHebrew: - { - //There are 4 subranges under Hebrew - iRangeName = new (ELeave) CDesCArrayFlat( KRangeNamesArraySize ); - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_HEBREW_LETTERS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( EHebrewLetters ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_DIGITS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinDigital ); - - charRange = iEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_CHAR_RANGE_SYMBOLS ); - iRangeName->AppendL( *charRange ); - CleanupStack::PopAndDestroy( charRange ); - iSupportedRange.Append( ELatinSymbol ); - - iPtiEngine->SetLanguageScriptL( EPtiHwrScriptHebrew ); - break; - } - default: - { - User::Leave( KErrArgument ); - } - } - // Set the first range as the default range - SetCharacterRangeByIndexL( 0 ); - } - -// --------------------------------------------------------------------------- -// Set current character range -// --------------------------------------------------------------------------- -// -void CTruiEngine::SetCharacterRangeByIndexL( TInt aIndex ) - { - iCurrentRange = iSupportedRange[aIndex]; - - //Update character set by range - TInt resourceId= 0; - switch( iCurrentRange ) - { - case ELatinLowerLetters: - { - resourceId = R_TRUI_CHARACTERSET_LATIN_LOWERLETTERS; - break; - } - case ELatinUpperLetters: - { - resourceId = R_TRUI_CHARACTERSET_LATIN_UPPERLETTERS; - break; - } - case ELatinAccent: - { - resourceId = R_TRUI_CHARACTERSET_LATIN_ACCENT; - break; - } - case ELatinDigital: - { - resourceId = R_TRUI_CHARACTERSET_LATIN_DIGITAL; - break; - } - case ELatinSymbol: - { - if ( FeatureManager::FeatureSupported(KFeatureIdChinese) ) - { - resourceId = R_TRUI_CHARACTERSET_LATIN_SYMBOL_CHINESE; - } - else - { - resourceId = R_TRUI_CHARACTERSET_LATIN_SYMBOL; - } - break; - } - case ECyrillicLowerLetters: - { - // According to current input language, - // Return different resource id. - resourceId = CyrillicLowerResourceId( iInputLanguage ); - break; - } - case ECyrillicUpperLetters: - { - resourceId = CyrillicUpperResourceId( iInputLanguage ); - break; - } - case ECyrillicAccent: - { - resourceId = R_TRUI_CHARACTERSET_CYRILLIC_ACCENT; - break; - } - case EGreekLowerLetters: - { - resourceId = R_TRUI_CHARACTERSET_GREEK_LOWERLETTERS; - break; - } - case EGreekUpperLetters: - { - resourceId = R_TRUI_CHARACTERSET_GREEK_UPPERLETTERS; - break; - } - case EHebrewLetters: - { - resourceId = R_TRUI_CHARACTERSET_HEBREW_LETTERS; - break; - } - default: - { - User::Leave( KErrArgument ); - } - } - if ( iCharacterSet ) - { - delete iCharacterSet; - iCharacterSet = NULL; - } - iCharacterSet = iEnv->AllocReadResourceL( resourceId ); - - //Transfer character range to engine's subrange and store it in local - SetSubrange(); - } - -// --------------------------------------------------------------------------- -// Check if character has model -// --------------------------------------------------------------------------- -// -TBool CTruiEngine::CheckCharacterModel( const TDesC& aChar ) - { - return iPtiEngine->CharacterModelExist( aChar ); - } - -// --------------------------------------------------------------------------- -// Delete character model -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::DeleteCharacterModel( const TDesC& aChar ) - { - return iPtiEngine->DeleteCharacterModel( aChar ); - } - -// --------------------------------------------------------------------------- -// Set character model -// --------------------------------------------------------------------------- -// -void CTruiEngine::SetCharacterModelL( const TDesC& aChar, - RArray& aModel, - TDes& aSimilarMsg ) - { - iPtiEngine->SetCharacterModelL( aChar, aModel, iSubrange, aSimilarMsg ); - } - -// --------------------------------------------------------------------------- -// Get character model -// --------------------------------------------------------------------------- -// -void CTruiEngine::GetCharacterModelL( const TDesC& aChar, RArray& aModel ) - { - iPtiEngine->GetCharacterModelL( aChar, aModel ); - } - -// --------------------------------------------------------------------------- -// Check if shortcut has model -// --------------------------------------------------------------------------- -// -TBool CTruiEngine::CheckShortcutModel( const TDesC& aText ) - { - return iPtiEngine->CheckShortcutModel( aText ); - } - -// --------------------------------------------------------------------------- -// Save shortcut text and its assigned character model into PTI Engine -// Meanwhile update shortcutlist -// --------------------------------------------------------------------------- -// -void CTruiEngine::SaveShortcutL( const TDesC& aText, - RArray& aModel, - TDes& aSimilarMsg ) - { - iPtiEngine->SetShortcutModelL( aText, aModel, aSimilarMsg ); - } - -// --------------------------------------------------------------------------- -// Delete shortcut text and its assigned character model from PTI Engine -// Meanwhile update shortcutlist -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::DeleteShortcut( const TDesC& aText ) - { - return iPtiEngine->DeleteShortcutModel( aText ); - } - -// --------------------------------------------------------------------------- -// Set current edited shortcut -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::SetShortcut( const TDesC& aText ) - { - iShortcut = aText; - return KErrNone; - } - -// --------------------------------------------------------------------------- -// Update Shortcut list -// --------------------------------------------------------------------------- -// -void CTruiEngine::UpdateShortcutListL() - { - if ( iShortcutList ) - { - iShortcutList->Reset(); - delete iShortcutList; - iShortcutList = NULL; - } - - RPointerArray list; - CleanupClosePushL( list ); - TRAPD( err, iPtiEngine->GetShortcutTextListL( list ) ); - if ( err == KErrNone ) - { - if ( list.Count() > 0 ) - { - iShortcutList = new (ELeave) CDesCArrayFlat( list.Count() ); - for ( TInt i = 0; i < list.Count(); i++ ) - { - iShortcutList->AppendL( *list[i] ); - } - iShortcutList->Sort( ECmpCollated ); - } - } - list.ResetAndDestroy(); - CleanupStack::PopAndDestroy( &list ); - } - -// --------------------------------------------------------------------------- -// From class MTruiEngine. -// change the text of an existing shortcut. -// --------------------------------------------------------------------------- -// -void CTruiEngine::ChangeShortcutTextL( const TDesC& aNewText ) - { - iPtiEngine->ChangeShortcutTextL( iShortcut, aNewText ); - } - -// --------------------------------------------------------------------------- -// Get guiding line pos -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::GetGuidingLinePos( const TSize& aSize, TInt& aTop , TInt& aBottom ) - { - return iPtiEngine->GetGuidingLinePos( aSize, aTop, aBottom ); - } - -// --------------------------------------------------------------------------- -// Get the number of the maximum of shortcuts -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::MaxShortCutLength() - { - return iPtiEngine->MaxShortCutLength(); - } - -// --------------------------------------------------------------------------- -// Get trails assigned to the specified shortcut. -// --------------------------------------------------------------------------- -// -void CTruiEngine::GetShortcutModelL( const TDesC& aText, - RArray& aModel, - TUint& aUnicode ) - { - iPtiEngine->GetShortcutModelL( aText, aModel, aUnicode ); - } - -// --------------------------------------------------------------------------- -// Save preset shortcuts. -// --------------------------------------------------------------------------- -// -void CTruiEngine::SavePresetShortcutL( TUint aUnicode, const TDesC& aShortcut ) - { - iPtiEngine->SavePresetShortcutL( aUnicode, aShortcut ); - } - -// --------------------------------------------------------------------------- -// Get trails assigned to a preset text. -// --------------------------------------------------------------------------- -// -void CTruiEngine::GetPresetSymbolByUnicodeL( TUint aUnicode, - RArray& aModel, - TDes& aShortcut ) - { - iPtiEngine->GetPresetSymbolByUnicodeL( aUnicode, aModel, aShortcut ); - } - -// --------------------------------------------------------------------------- -// Return all unicodes of preset text stored in PTI engine. -// --------------------------------------------------------------------------- -// -void CTruiEngine::GetAllPresetSymbolsL( RArray& aPresets ) - { - iPtiEngine->GetAllPresetSymbolsL( aPresets ); - } - -// --------------------------------------------------------------------------- -// Transform character range to engine's subrange -// --------------------------------------------------------------------------- -// -void CTruiEngine::SetSubrange() - { - switch( iCurrentRange ) - { - case ELatinLowerLetters: - case ELatinUpperLetters: - case ELatinAccent: - { - iSubrange = EPtiHwrRangeLanguage; - break; - } - case ELatinDigital: - { - iSubrange = EPtiHwrRangeNumber; - break; - } - case ELatinSymbol: - { - iSubrange = EPtiHwrRangeSymbol; - break; - } - case ECyrillicLowerLetters: - case ECyrillicUpperLetters: - case ECyrillicAccent: - { - iSubrange = EPtiHwrRangeLanguage; - break; - } - case EGreekLowerLetters: - case EGreekUpperLetters: - { - iSubrange = EPtiHwrRangeLanguage; - break; - } - case EHebrewLetters: - { - iSubrange = EPtiHwrRangeLanguage; - break; - } - default: - { - iSubrange = EPtiHwrRangeAny; - } - } - } - -// --------------------------------------------------------------------------- -// Initialize the tabel used to map language to language script -// --------------------------------------------------------------------------- -// -void CTruiEngine::InitLanguageRelationL( TInt aResourceId, - RArray& aLanguageRelation ) - { - TResourceReader reader; - iEnv->CreateResourceReaderLC( reader, aResourceId ); - TInt script_count = reader.ReadInt16(); - for ( TInt i = 0; i < script_count; i++ ) - { - TInt scriptId = reader.ReadInt16(); - TInt lang_count = reader.ReadInt16(); - for ( TInt j = 0; j < lang_count; j++ ) - { - TInt langCode = reader.ReadInt16(); - aLanguageRelation.Append( TLanguageRelation( langCode, scriptId ) ); - } - } - CleanupStack::PopAndDestroy(); // reader - } - -// --------------------------------------------------------------------------- -// Initialize the supported language script. -// --------------------------------------------------------------------------- -// -void CTruiEngine::InitSupportedLanguageScriptL( RArray& aSupportedScript, - CPtiEngine* aEngine, - const RArray& aLanguageRelation ) - { - // Get all supported input language. - RArray avaiableLanuage; - CleanupClosePushL( avaiableLanuage ); - aEngine->GetAvailableLanguagesL( avaiableLanuage ); - avaiableLanuage.Sort(); - - // Map language to language script utilizing TLanguageRelation - for ( TInt i = 0; i < aLanguageRelation.Count(); i++ ) - { - TInt languageScriptId = aLanguageRelation[i].LanguageScriptId(); - if ( aSupportedScript.Find( languageScriptId ) == KErrNotFound ) - { - TInt languageCode = aLanguageRelation[i].LanguageCode(); - if ( avaiableLanuage.FindInOrder( languageCode ) != KErrNotFound ) - { - // Add language to aSupportedScript - aSupportedScript.Append( languageScriptId ); - } - } - } - - CleanupStack::PopAndDestroy( &avaiableLanuage ); - } - -// --------------------------------------------------------------------------- -// Initialize the supported language script. -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::GetActiveLanguageScript( TInt aLanguageCode, - const RArray& aLanguageRelation ) - { - for ( TInt i = 0; i < aLanguageRelation.Count(); i++ ) - { - if ( aLanguageCode == aLanguageRelation[i].LanguageCode() ) - { - return aLanguageRelation[i].LanguageScriptId(); - } - } - return KErrNotFound; - } - -// --------------------------------------------------------------------------- -// Get the resourc id of lower case of Cyrillic -// according to the current input language. -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::CyrillicLowerResourceId( TLanguage aLanguage ) - { - if ( aLanguage == ELangBulgarian ) - { - return R_TRUI_CHARACTERSET_CYRILLIC_LOWERLETTERS_BULGARIAN; - } - else if ( aLanguage == ELangRussian ) - { - return R_TRUI_CHARACTERSET_CYRILLIC_LOWERLETTERS_RUSSIAN; - } - else if ( aLanguage == ELangUkrainian ) - { - return R_TRUI_CHARACTERSET_CYRILLIC_LOWERLETTERS_UKRAINE; - } - else - { - return R_TRUI_CHARACTERSET_CYRILLIC_LOWERLETTERS; - } - } - -// --------------------------------------------------------------------------- -// Get the resourc id of upper case of Cyrillic -// according to the current input language. -// --------------------------------------------------------------------------- -// -TInt CTruiEngine::CyrillicUpperResourceId( TLanguage aLanguage ) - { - if ( aLanguage == ELangBulgarian ) - { - return R_TRUI_CHARACTERSET_CYRILLIC_UPPERLETTERS_BULGARIAN; - } - else if ( aLanguage == ELangRussian ) - { - return R_TRUI_CHARACTERSET_CYRILLIC_UPPERLETTERS_RUSSIAN; - } - else if ( aLanguage == ELangUkrainian ) - { - return R_TRUI_CHARACTERSET_CYRILLIC_UPPERLETTERS_UKRAINE; - } - else - { - return R_TRUI_CHARACTERSET_CYRILLIC_UPPERLETTERS; - } - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truihwrbox.cpp --- a/textinput/peninputhwrtrui/src/truihwrbox.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1374 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiHwrBox -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "truihwrbox.h" -#include "truihwrboxobserver.h" -#include "truiappui.h" -#include "truiappui.h" -#include "truiengine.h" - -#ifdef __WINS__ -static const TInt KWritePeriod = 1500000; -#else -static const TInt KWritePeriod = 1000000; -#endif - -#ifdef __WINS__ -static const TInt KDrawSpeed = 30000; -#else -static const TInt KDrawSpeed = 30000; -#endif - -const TInt KFirstPoint = -1; -const TSize KGuideLinePenSize = TSize( 1, 1 ); -const TSize KLinePenSize = TSize( 4, 4 ); -const TInt KFirstEventDelay = 0; - -_LIT( KTRUIICONSFILENAME, "\\resource\\apps\\trui_icons.mif" ); - -const TInt KTopGuideLineIndex = 0; -const TInt KBottomGuideLineIndex = 1; - -const TInt KGuideLineWidthRadio = 10; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CTruiHwrBox* CTruiHwrBox::NewL( CCoeControl* aParent, - MTruiHwrBoxObserver* aHwrBoxObserver, - MAknsControlContext* aBgContext ) - { - CTruiHwrBox* self = CTruiHwrBox::NewLC( aParent, aHwrBoxObserver, - aBgContext ); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CTruiHwrBox* CTruiHwrBox::NewLC( CCoeControl* aParent, - MTruiHwrBoxObserver* aHwrBoxObserver, - MAknsControlContext* aBgContex ) - { - CTruiHwrBox* self = new ( ELeave ) CTruiHwrBox(); - CleanupStack::PushL( self ); - self->ConstructL( aParent, aHwrBoxObserver, - aBgContex ); - return self; - } - -// ----------------------------------------------------------------------------- -// CTruiHwrBox::CTruiHwrBox() -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CTruiHwrBox::CTruiHwrBox() - { - // No implementation required - } - -// ----------------------------------------------------------------------------- -// CTruiHwrBox::ConstructL() -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::ConstructL( CCoeControl* aParent, - MTruiHwrBoxObserver* aHwrBoxObserver, - MAknsControlContext* aBgContext ) - { - if ( aParent ) - { - SetContainerWindowL( *aParent ); - } - else - { - CreateWindowL(); - } - - SetHwrBoxObserver( aHwrBoxObserver ); - - // Create tooltip - iTooltip = CAknInfoPopupNoteController::NewL(); - iTooltip->SetTooltipModeL( ETrue ); - iTooltip->AddObserverL( *this ); - - iBoxState = ENewModelStop; - iTimeToSave = CPeriodic::NewL( CActive::EPriorityHigh ); // neutral priority - iTimeToDrawNext = CPeriodic::NewL( CActive::EPriorityStandard ); // neutral priority - - iPointArrayDraw.Reset(); - iPointArrayModel.Reset(); - - LoadBorderBitmapsL(); - LoadShadowBitmapsL(); - LoadGuideLineBitmapsL(); - - EnableDragEvents(); - - iBgContext = static_cast( aBgContext ); - - } - -// ----------------------------------------------------------------------------- -// CTruiHwrBox::~CTruiHwrBox() -// Destructor. -// ----------------------------------------------------------------------------- -// -CTruiHwrBox::~CTruiHwrBox() - { - if ( iTooltip ) - { - iTooltip->RemoveObserver( *this ); - } - HideInfoPopupNote(); - - // Cancel and delete timer. - if ( iTimeToSave ) - { - iTimeToSave->Cancel(); - delete iTimeToSave; - } - - if ( iTimeToDrawNext ) - { - iTimeToDrawNext->Cancel(); - delete iTimeToDrawNext; - } - - iPointArrayDraw.Close(); - iPointArrayModel.Close(); - delete iTooltip; - - iBorderBitmaps.ResetAndDestroy(); - iBorderBitmapMasks.ResetAndDestroy(); - iBorderLayout.Close(); - - iShadowBitmaps.ResetAndDestroy(); - iShadowBitmapMasks.ResetAndDestroy(); - iShadowLayout.Close(); - - iGuideLineBitmaps.ResetAndDestroy(); - iGuideLineBitmapMasks.ResetAndDestroy(); - iGuideLineLayout.Close(); - } - -// ----------------------------------------------------------------------------- -// Draws control to given area -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::Draw( const TRect& /*aRect*/ ) const - { - // Get the standard graphics context - CWindowGc& gc = SystemGc(); - - // Set context - PrepareContext( gc ); - - // Gets the control's extent - TRect rect = Rect(); - if ( iBgContext ) - { - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - if ( !AknsDrawUtils::Background( skin, iBgContext, - gc, rect ) ) - { - gc.Clear( rect ); - } - } - - if ( iFlag & EFrameHwrBox == EFrameHwrBox ) - { - // Draw border - DrawBorders( gc ); - // Draw shawdow - DrawShadows( gc ); - } - - // Get repository - CRepository* repository = NULL; - TRAPD( err, repository = CRepository::NewL( KCRUidPersonalizationSettings ) ); - if ( err == KErrNone ) - { - TInt guideLine; - repository->Get( KSettingsPenInputGuideLine, guideLine ); - delete repository; - repository = NULL; - // Draw guideline - if ( guideLine ) - { - // Draw guidelines - DrawGuideLines( gc ); - } - } - // Draw work area - gc.SetPenSize( KLinePenSize ); - DrawTrails( gc ); - } - -TInt CTruiHwrBox::TimeToSaveL( TAny* aObject ) - { - ( (CTruiHwrBox*)aObject )->SaveModelL(); // cast, and call non-static function - return KErrNone; - } - -TInt CTruiHwrBox::TimeToDrawNextL( TAny* aObject ) - { - ( (CTruiHwrBox*)aObject )->DrawNextL(); // cast, and call non-static function - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CTruiHwrBox::TimedOut() -// Timer control, called everytime the time times out. -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::SaveModelL() - { - if ( iBoxState == ENewModelDraw ) - { - // Restore all screen to invalid region. - Window().Invalidate(); - //Cancel the timer - iTimeToSave->Cancel(); - iBoxState = EExistModelStop; - SetPointerCapture( EFalse ); - iPointArrayModel.Reset(); - for ( TInt i=0; i 0 ) - { - if ( iHwrBoxObserver ) - { - iHwrBoxObserver->SaveNewModelL(); - } - } - else - { - ClearExistModel(); - } - iStartSave = EFalse; - } - } - -// ----------------------------------------------------------------------------- -// Compare the numbers of points of two arrays at first. if they are not same, -// add a new point from iPointArrayModel to iPointArrayDraw. then draw a new line -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::DrawNextL() - { - // Check HwrBox state at first and then Check if model is drawn acompletely - if ( iBoxState == EExistModelDraw && - iPointArrayModel.Count() > iPointArrayDraw.Count() ) - { - // Add new point to iPointArrayDraw - iPointArrayDraw.AppendL( iPointArrayModel[ iPointArrayDraw.Count() ] ); - // Update the screen - DrawModel(); - } - else - { - iBoxState = EExistModelStop; - iTimeToDrawNext->Cancel(); - Window().Invalidate(); - } - } - -// --------------------------------------------------------------------------- -// Draw an existing model -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::PlayAnimation( TBool aIsScale, const TSize& aRefSize ) - { - if ( ( iBoxState == EExistModelStop || iBoxState == EExistModelDraw ) - && iPointArrayModel.Count() ) - { - // Check and scale model points - if ( aIsScale ) - { - // Scale model points - ScaleModel( aRefSize, Rect().Size(), iPointArrayModel ); - } - - //Cancel the timer at first - iTimeToDrawNext->Cancel(); - - //Clear the box - iPointArrayDraw.Reset(); - if ( Parent() ) - { - Parent()->DrawNow(); - } - - //Set index of point need to be drawn to the beginning - iLastAnimatedPoint = KFirstPoint; - - //Set animate timer - iTimeToDrawNext->Start( KFirstEventDelay, KDrawSpeed, TCallBack( TimeToDrawNextL, this ) ); - - //Change box state - iBoxState = EExistModelDraw; - } - } - -// --------------------------------------------------------------------------- -// Clear the existing model -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::ClearExistModel() - { - switch ( iBoxState ) - { - case EExistModelDraw: - { - //animation is playing, cancel the timer before clear it - iTimeToDrawNext->Cancel(); - break; - } - case ENewModelDraw: - { - //new model is inputting, cancel the timer before clear it - iTimeToSave->Cancel(); - iStartSave = EFalse; - break; - } - case EExistModelStop: - case ENewModelStop: - default: - { - } - } - iPointArrayModel.Reset(); - iPointArrayDraw.Reset(); - iBoxState = ENewModelStop; - Window().Invalidate(); - } - -// --------------------------------------------------------------------------- -// Handles an event from an observed control. -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::HandlePointerEventL( const TPointerEvent& aPointerEvent ) - { - if ( iFlag & EReadOnlyHwrBox ) - { - // Readonly, don't handle pointer event. - return; - } - - CCoeControl::HandlePointerEventL( aPointerEvent ); - if ( AknLayoutUtils::PenEnabled() ) - { - switch( aPointerEvent.iType ) - { - case TPointerEvent::EButton1Down: - { - Window().Invalidate(); - if ( IsContained( aPointerEvent.iPosition ) ) - { - HideInfoPopupNote(); - iPenInRect = ETrue; - if ( iBoxState == ENewModelStop ) - { - //change box state - iBoxState = ENewModelDraw; - SetPointerCapture( ETrue ); - //start from the point where button is down - iPointArrayDraw.Append( aPointerEvent.iPosition - Position() ); - iLastAnimatedPoint = KFirstPoint; - DrawModel(); - } - else if ( iBoxState == ENewModelDraw ) - { - //cancel the iTimeToSave - iTimeToSave->Cancel(); - iStartSave = EFalse; - //start from the point where button is down - iPointArrayDraw.Append( aPointerEvent.iPosition - Position() ); - DrawModel(); - } - else - { - if ( iHwrBoxObserver ) - { - iHwrBoxObserver->HandleEventL( MTruiHwrBoxObserver::EModelExist ); - } - } - } - else - { - iPenInRect = EFalse; - } - break; - } - case TPointerEvent::EButton1Up: - { - if ( iBoxState == ENewModelDraw ) - { - iPointArrayDraw.Append( KTail ); - if ( !iStartSave ) - { - iStartSave = ETrue; - iTimeToSave->Start( KWritePeriod, - KWritePeriod, - TCallBack( TimeToSaveL, this ) ); - } - } - break; - } - case TPointerEvent::EDrag: - case TPointerEvent::EMove: - { - if ( iBoxState == ENewModelDraw ) - { - if ( IsContained( aPointerEvent.iPosition ) ) - { - Window().Invalidate(); - HideInfoPopupNote(); - //Pen go into available rect again, start an new trace - if ( iPenInRect == EFalse ) - { - iTimeToSave->Cancel(); - iStartSave = EFalse; - } - iPointArrayDraw.Append( aPointerEvent.iPosition - Position() ); - DrawModel(); - iPenInRect = ETrue; - } - else - { - if ( iPenInRect ) - { - iPointArrayDraw.Append( KTail ); - if ( !iStartSave ) - { - iStartSave = ETrue; - iTimeToSave->Start( KWritePeriod, - KWritePeriod, - TCallBack( TimeToSaveL, - this ) ); - } - iPenInRect = EFalse; - } - } - } - break; - } - default: - break; - } - } - } - -// --------------------------------------------------------------------------- -// Handles an event from an observed control. -// --------------------------------------------------------------------------- -// -TKeyResponse CTruiHwrBox::OfferKeyEventL( const TKeyEvent& /*aKeyEvent*/, - TEventCode /*aType*/ ) - { - return EKeyWasConsumed; - } - -// -------------------------------------------------------------------------- -// CTruiHwrBox::SetHwrBoxObserver -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::SetHwrBoxObserver( MTruiHwrBoxObserver* aHwrBoxObserver ) - { - iHwrBoxObserver = aHwrBoxObserver; - } - -// -------------------------------------------------------------------------- -// Get the HwrBox's model. -// -------------------------------------------------------------------------- -// -RArray& CTruiHwrBox::Model() - { - return iPointArrayModel; - } - -// -------------------------------------------------------------------------- -// Draw character model -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::DrawModel() - { - if ( IsActivated() && iPointArrayDraw.Count() && - iLastAnimatedPoint + 1 < iPointArrayDraw.Count() ) - { - // Get system graphic content - CWindowGc& gc = SystemGc(); - RWindow& window = Window(); - gc.Activate( window ); - window.Invalidate( Rect() ); - window.BeginRedraw( Rect() ); - Draw( Rect() ); - window.EndRedraw(); - gc.Deactivate(); - } - } - -// --------------------------------------------------------------------------- -// Responds to changes to the size and position of the contents of this control. -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::SizeChanged() - { - LoadBorderLayout( 0 ); - for ( TInt i = 0; i < iBorderLayout.Count() - && i < iBorderBitmaps.Count() - && i < iBorderBitmapMasks.Count(); i++ ) - { - TSize size = iBorderLayout[i].Rect().Size(); - AknIconUtils::SetSize( iBorderBitmaps[i], size, EAspectRatioNotPreserved ); - AknIconUtils::SetSize( iBorderBitmapMasks[i], size, EAspectRatioNotPreserved ); - } - - LoadShadowLayout( 0 ); - for ( TInt i = 0; i < iShadowLayout.Count() - && i < iShadowBitmaps.Count() - && i < iShadowBitmapMasks.Count(); i++ ) - { - TSize size = iShadowLayout[i].Rect().Size(); - AknIconUtils::SetSize( iShadowBitmaps[i], size, EAspectRatioNotPreserved ); - AknIconUtils::SetSize( iShadowBitmapMasks[i], size, EAspectRatioNotPreserved ); - } - - LoadGuideLineLayout( 0 ); - // Guide line position - TInt margin = Size().iWidth / KGuideLineWidthRadio; - - iGuideLineBottomL.iX = Position().iX + margin; - iGuideLineTopL.iX = Position().iX + margin; - - for ( TInt i = 0; i < iGuideLineLayout.Count() - && i < iGuideLineBitmaps.Count() - && i < iGuideLineBitmapMasks.Count(); i++ ) - { - TSize size = iGuideLineLayout[i].Rect().Size(); - size.iWidth = Size().iWidth - margin * 2; - AknIconUtils::SetSize( iGuideLineBitmaps[i], size, EAspectRatioNotPreserved ); - AknIconUtils::SetSize( iGuideLineBitmapMasks[i], size, EAspectRatioNotPreserved ); - } - - // Caculate hwr_training_write_pane_g7 for drawable rect - TRect rect = Rect(); - TAknWindowComponentLayout drawable_rect_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g7( 0 ); - TAknLayoutRect drawable_rect_layout_rect; - drawable_rect_layout_rect.LayoutRect( rect, drawable_rect_layout ); - iDrawabelRect = drawable_rect_layout_rect.Rect(); - iDrawabelRect.Shrink( KLinePenSize.iWidth , - KLinePenSize.iHeight ); - iPenColor = drawable_rect_layout_rect.Color(); - - TInt guidinglinetop(0); - TInt guidinglinebottom(0); - CTruiEngine* engine = static_cast( iEikonEnv->AppUi() )->HwrEngine(); - engine->GetGuidingLinePos( iDrawabelRect.Size(), guidinglinetop, guidinglinebottom ); - SetGuidingLine( guidinglinetop, guidinglinebottom ); - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles a change to the control's resources. -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange( aType ); - if ( aType == KEikMessageUnfadeWindows ) - { - DrawDeferred(); - } - if ( aType == KAknsMessageSkinChange ) - { - TRAP_IGNORE( - LoadBorderBitmapsL(); - LoadShadowBitmapsL(); - LoadGuideLineBitmapsL(); - ) - SizeChanged(); - } - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handle focus changed. -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::FocusChanged( TDrawNow /*aDrawNow*/ ) - { - if ( !IsFocused() && iBoxState == ENewModelDraw ) - { - iPointArrayDraw.Append( KTail ); - TRAP_IGNORE( SaveModelL() ); - } - } - -// --------------------------------------------------------------------------- -// When load model from outside, set box state -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::ModelIsReady( TBool aReady ) - { - if ( aReady ) - { - iBoxState = EExistModelStop; - } - else - { - iBoxState = ENewModelStop; - } - } - -TRect CTruiHwrBox::DrawableRect() const - { - return iDrawabelRect; - } - -// --------------------------------------------------------------------------- -// Set editing mode to readonly or writable -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::SetHwrBoxReadOnly( TBool aReadOnly ) - { - TUint flag = aReadOnly ? EReadOnlyHwrBox : EWritableHwrBox; - iFlag &= ( ~EReadOnlyHwrBox & ~EWritableHwrBox ); - iFlag |= flag; - } - -// --------------------------------------------------------------------------- -// Get the Hwrbox's state -// --------------------------------------------------------------------------- -// -TInt CTruiHwrBox::BoxState() const - { - return iBoxState; - } - -// --------------------------------------------------------------------------- -// Pause the playing of animation -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::PausePlaying() - { - if ( iBoxState == EExistModelDraw ) - { - iBoxState = EExistModelStop; - iTimeToDrawNext->Cancel(); - Window().Invalidate(); - } - } - -// --------------------------------------------------------------------------- -// Resume the playing of animation -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::ResumePlaying() - { - // Check HwrBox state at first and then Check if model is drawn acompletely - if ( iBoxState == EExistModelStop && - iPointArrayModel.Count() > iPointArrayDraw.Count() ) - { - - //Cancel the timer at first - iTimeToDrawNext->Cancel(); - - //Set animate timer - iTimeToDrawNext->Start( KFirstEventDelay, KDrawSpeed, - TCallBack(TimeToDrawNextL, this) ); - - //Change box state - iBoxState = EExistModelDraw; - } - } - -// --------------------------------------------------------------------------- -// Set Guiding Line -// --------------------------------------------------------------------------- -// -TInt CTruiHwrBox::SetGuidingLine( TInt aTop, TInt aBottom ) - { - TRect rect = DrawableRect(); - if ( Size().iHeight <= aBottom || aBottom <= 0 - || Size().iHeight <= aTop || aTop <= 0 ) - { - return KErrArgument; - } - - iGuideLineTopL.iY = rect.iTl.iY + aTop; - iGuideLineBottomL.iY = rect.iTl.iY + aBottom; - return KErrNone; - } - -// --------------------------------------------------------------------------- -// Check if the point is contained in drawing area -// --------------------------------------------------------------------------- -// -TBool CTruiHwrBox::IsContained( const TPoint& aPoint ) const - { - return DrawableRect().Contains( aPoint ); - } - -// --------------------------------------------------------------------------- -// Adjust shortcut model's point to fit the popup hwr box. -// --------------------------------------------------------------------------- -// -void CTruiHwrBox::ScaleModel( const TSize& aOriginSize, - const TSize& aRealSize, - RArray& aModel ) - { - CTruiEngine* engine = static_cast( iEikonEnv->AppUi() )->HwrEngine(); - TInt originTop; - TInt originBottom; - engine->GetGuidingLinePos( aOriginSize, originTop, originBottom ); - TInt realTop; - TInt realBottom; - engine->GetGuidingLinePos( aRealSize, realTop, realBottom ); - for ( TInt i =0; i < aModel.Count(); i++ ) - { - if ( aModel[i] != KTail ) - { - aModel[i].iX = aModel[i].iX * realBottom / originBottom; - aModel[i].iY = aModel[i].iY * realBottom / originBottom; - } - } - } - -// ----------------------------------------------------------------------------- -// Draws all points. -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::DrawTrails( CWindowGc& aGc ) const - { - // Draw model - if ( iPointArrayDraw.Count() ) - { - //Draw from the first point in the array - TInt lastAnimatedPoint( 0 ); - TPoint relativePos; - if ( OwnsWindow() ) - { - relativePos = TPoint( 0, 0 ); - } - else - { - relativePos = Position(); - } - aGc.Plot( iPointArrayDraw[lastAnimatedPoint] + relativePos ); - - // Check if there is point need to be drawn - // Plus 1 to lastAnimatedPointIndex since zero implies the first point - // in the iLastAnimatedPoint - while ( lastAnimatedPoint + 1 < iPointArrayDraw.Count() ) - { - //Check if this is a new arc and increase the index counter - if ( iPointArrayDraw[lastAnimatedPoint++] != KTail ) - { - //It is not a new arc, then check if this is the end of an arc - if ( iPointArrayDraw[lastAnimatedPoint] != KTail ) - { - //It is not the end of an arc, so draw line - aGc.DrawLineTo( iPointArrayDraw[lastAnimatedPoint] - + relativePos ); - } - } - else - { - //It is a new arc, so move the pen to the new point - aGc.Plot( iPointArrayDraw[lastAnimatedPoint] - + relativePos ); - } - } - } - } - -// -------------------------------------------------------------------------- -// Set context for this control. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::PrepareContext( CWindowGc& aGc ) const - { - TRgb color; - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - // Set pen color to the color of test in main area - TInt error = AknsUtils::GetCachedColor( skin, - color, - KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG6 ); - if ( !error ) - { - aGc.SetPenColor( color ); - } - } - -// -------------------------------------------------------------------------- -// Load bitmaps for border. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::LoadBorderBitmapsL() - { - iBorderBitmaps.ResetAndDestroy(); - iBorderBitmapMasks.ResetAndDestroy(); - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - CFbsBitmap* bitmapLeft; - CFbsBitmap* bitmapLeftMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepBgColour, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapLeft, - bitmapLeftMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_bg_colour, - EMbmTrui_iconsQgn_graf_fep_bg_colour_mask, - KRgbBlack - ); - iBorderBitmaps.Append( bitmapLeft ); - iBorderBitmapMasks.Append( bitmapLeftMask ); - - CFbsBitmap* bitmapTop; - CFbsBitmap* bitmapTopMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepBgColour, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapTop, - bitmapTopMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_bg_colour, - EMbmTrui_iconsQgn_graf_fep_bg_colour_mask, - KRgbBlack - ); - iBorderBitmaps.Append( bitmapTop ); - iBorderBitmapMasks.Append( bitmapTopMask ); - - CFbsBitmap* bitmapBottom; - CFbsBitmap* bitmapBottomMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepBgColour, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapBottom, - bitmapBottomMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_bg_colour, - EMbmTrui_iconsQgn_graf_fep_bg_colour_mask, - KRgbBlack - ); - iBorderBitmaps.Append( bitmapBottom ); - iBorderBitmapMasks.Append( bitmapBottomMask ); - - CFbsBitmap* bitmapRight; - CFbsBitmap* bitmapRightMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepBgColour, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapRight, - bitmapRightMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_bg_colour, - EMbmTrui_iconsQgn_graf_fep_bg_colour_mask, - KRgbBlack - ); - iBorderBitmaps.Append( bitmapRight ); - iBorderBitmapMasks.Append( bitmapRightMask ); - } - -// -------------------------------------------------------------------------- -// Load bitmaps for shadows. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::LoadShadowBitmapsL() - { - iShadowBitmaps.ResetAndDestroy(); - iShadowBitmapMasks.ResetAndDestroy(); - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - CFbsBitmap* bitmapTl; - CFbsBitmap* bitmapTlMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowTl, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapTl, - bitmapTlMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_tl, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_tl_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapTl ); - iShadowBitmapMasks.Append( bitmapTlMask ); - - CFbsBitmap* bitmapT; - CFbsBitmap* bitmapTMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowT, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapT, - bitmapTMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_t, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_t_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapT ); - iShadowBitmapMasks.Append( bitmapTMask ); - - CFbsBitmap* bitmapTr; - CFbsBitmap* bitmapTrMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowTr, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapTr, - bitmapTrMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_tr, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_tr_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapTr ); - iShadowBitmapMasks.Append( bitmapTrMask ); - - CFbsBitmap* bitmapL; - CFbsBitmap* bitmapLMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowL, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapL, - bitmapLMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_l, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_l_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapL ); - iShadowBitmapMasks.Append( bitmapLMask ); - - CFbsBitmap* bitmapBl; - CFbsBitmap* bitmapBlMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowBl, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapBl, - bitmapBlMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_bl, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_bl_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapBl ); - iShadowBitmapMasks.Append( bitmapBlMask ); - - CFbsBitmap* bitmapR; - CFbsBitmap* bitmapRMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowR, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapR, - bitmapRMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_r, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_r_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapR ); - iShadowBitmapMasks.Append( bitmapRMask ); - - CFbsBitmap* bitmapB; - CFbsBitmap* bitmapBMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowB, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapB, - bitmapBMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_b, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_b_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapB ); - iShadowBitmapMasks.Append( bitmapBMask ); - - CFbsBitmap* bitmapBr; - CFbsBitmap* bitmapBrMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepPopupShadowBr, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapBr, - bitmapBrMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_br, - EMbmTrui_iconsQgn_graf_fep_popup_shadow_br_mask, - KRgbBlack - ); - iShadowBitmaps.Append( bitmapBr ); - iShadowBitmapMasks.Append( bitmapBrMask ); - } - -// -------------------------------------------------------------------------- -// Load bitmaps for guidelines. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::LoadGuideLineBitmapsL() - { - iGuideLineBitmaps.ResetAndDestroy(); - iGuideLineBitmapMasks.ResetAndDestroy(); - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - CFbsBitmap* bitmapTop; - CFbsBitmap* bitmapTopMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepBgColour, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapTop, - bitmapTopMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_bg_colour, - EMbmTrui_iconsQgn_graf_fep_bg_colour_mask, - KRgbBlack - ); - iGuideLineBitmaps.Append( bitmapTop ); - iGuideLineBitmapMasks.Append( bitmapTopMask ); - - CFbsBitmap* bitmapBottom; - CFbsBitmap* bitmapBottomMask; - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnGrafFepBgColour, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG14, - bitmapBottom, - bitmapBottomMask, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_graf_fep_bg_colour, - EMbmTrui_iconsQgn_graf_fep_bg_colour_mask, - KRgbBlack - ); - iGuideLineBitmaps.Append( bitmapBottom ); - iGuideLineBitmapMasks.Append( bitmapBottomMask ); - } - -// -------------------------------------------------------------------------- -// Load layouts for borders from LAF. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::LoadBorderLayout( TInt aVarity ) - { - TRect rect = Rect(); - iBorderLayout.Reset(); - // Caculate hwr_training_write_pane_g1 - TAknWindowComponentLayout border_left_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g1( aVarity ); - TAknLayoutRect border_left_layout_rect; - border_left_layout_rect.LayoutRect( rect, border_left_layout ); - iBorderLayout.Append( border_left_layout_rect ); - - TAknWindowComponentLayout border_top_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g2( aVarity ); - TAknLayoutRect border_top_layout_rect; - border_top_layout_rect.LayoutRect( rect, border_top_layout ); - iBorderLayout.Append( border_top_layout_rect ); - - TAknWindowComponentLayout border_bottom_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g3( aVarity ); - TAknLayoutRect border_bottom_layout_rect; - border_bottom_layout_rect.LayoutRect( rect, border_bottom_layout ); - iBorderLayout.Append( border_bottom_layout_rect ); - - TAknWindowComponentLayout border_right_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g4( aVarity ); - TAknLayoutRect border_right_layout_rect; - border_right_layout_rect.LayoutRect( rect, border_right_layout ); - iBorderLayout.Append( border_right_layout_rect ); - } - -// -------------------------------------------------------------------------- -// Load layouts for shadows from LAF. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::LoadShadowLayout( TInt aVarity ) - { - TRect rect = Rect(); - iShadowLayout.Reset(); - // Caculate bg_frame_shadow_pane - TAknWindowComponentLayout shadow_pane_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane( aVarity ); - TAknLayoutRect shadow_pane_layout_rect; - shadow_pane_layout_rect.LayoutRect( rect, shadow_pane_layout ); - TRect shadowPaneRect = shadow_pane_layout_rect.Rect(); - - // Caculate bg_frame_shadow_pane_g1 - TAknWindowComponentLayout shadow_pane_tl_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g1( aVarity ); - TAknLayoutRect shadow_pane_tl_layout_rect; - shadow_pane_tl_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_tl_layout ); - iShadowLayout.Append( shadow_pane_tl_layout_rect ); - - // Caculate bg_frame_shadow_pane_g2 - TAknWindowComponentLayout shadow_pane_t_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g2( aVarity ); - TAknLayoutRect shadow_pane_t_layout_rect; - shadow_pane_t_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_t_layout ); - iShadowLayout.Append( shadow_pane_t_layout_rect ); - - // Caculate bg_frame_shadow_pane_g3 - TAknWindowComponentLayout shadow_pane_tr_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g3( aVarity ); - TAknLayoutRect shadow_pane_tr_layout_rect; - shadow_pane_tr_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_tr_layout ); - iShadowLayout.Append( shadow_pane_tr_layout_rect ); - - // Caculate bg_frame_shadow_pane_g4 - TAknWindowComponentLayout shadow_pane_l_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g4( aVarity ); - TAknLayoutRect shadow_pane_l_layout_rect; - shadow_pane_l_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_l_layout ); - iShadowLayout.Append( shadow_pane_l_layout_rect ); - - // Caculate bg_frame_shadow_pane_g5 - TAknWindowComponentLayout shadow_pane_bl_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g5( aVarity ); - TAknLayoutRect shadow_pane_bl_layout_rect; - shadow_pane_bl_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_bl_layout ); - iShadowLayout.Append( shadow_pane_bl_layout_rect ); - - // Caculate bg_frame_shadow_pane_g6 - TAknWindowComponentLayout shadow_pane_r_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g6( aVarity ); - TAknLayoutRect shadow_pane_r_layout_rect; - shadow_pane_r_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_r_layout ); - iShadowLayout.Append( shadow_pane_r_layout_rect ); - - // Caculate bg_frame_shadow_pane_g7 - TAknWindowComponentLayout shadow_pane_b_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g7( aVarity ); - TAknLayoutRect shadow_pane_b_layout_rect; - shadow_pane_b_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_b_layout ); - iShadowLayout.Append( shadow_pane_b_layout_rect ); - - // Caculate bg_frame_shadow_pane_g8 - TAknWindowComponentLayout shadow_pane_br_layout = - AknLayoutScalable_Apps::bg_frame_shadow_pane_g8( aVarity ); - TAknLayoutRect shadow_pane_br_layout_rect; - shadow_pane_br_layout_rect.LayoutRect( shadowPaneRect, shadow_pane_br_layout ); - iShadowLayout.Append( shadow_pane_br_layout_rect ); - } - -// -------------------------------------------------------------------------- -// Load layouts for guidelines from LAF. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::LoadGuideLineLayout( TInt aVarity ) - { - TRect rect = Rect(); - iGuideLineLayout.Reset(); - // Caculate hwr_training_write_pane_g5 - TAknWindowComponentLayout top_guideline_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g5( aVarity ); - TAknLayoutRect top_guideline_layout_rect; - top_guideline_layout_rect.LayoutRect( rect, top_guideline_layout ); - iGuideLineLayout.Append( top_guideline_layout_rect ); - - // Caculate hwr_training_write_pane_g6 - TAknWindowComponentLayout bottom_guideline_layout = - AknLayoutScalable_Apps::hwr_training_write_pane_g6( aVarity ); - TAknLayoutRect bottom_guideline_layout_rect; - bottom_guideline_layout_rect.LayoutRect( rect, bottom_guideline_layout ); - iGuideLineLayout.Append( bottom_guideline_layout_rect ); - } - -// -------------------------------------------------------------------------- -// Draw borders. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::DrawBorders( CWindowGc& aGc ) const - { - for ( TInt i = 0; i < iBorderLayout.Count(); i++ ) - { - iBorderLayout[i].DrawImage( aGc, iBorderBitmaps[i], iBorderBitmapMasks[i] ); - } - } - -// -------------------------------------------------------------------------- -// Draw shadows. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::DrawShadows( CWindowGc& aGc ) const - { - for ( TInt i = 0; i < iShadowLayout.Count(); i++ ) - { - iShadowLayout[i].DrawImage( aGc, iShadowBitmaps[i], iShadowBitmapMasks[i] ); - } - } - -// -------------------------------------------------------------------------- -// Draw guidelines. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::DrawGuideLines( CWindowGc& aGc ) const - { - if ( iTopGuideLineDisplay && KTopGuideLineIndex < iGuideLineLayout.Count() - && KTopGuideLineIndex < iGuideLineBitmaps.Count() - && KTopGuideLineIndex < iGuideLineBitmapMasks.Count() ) - { - TSize pixSize = iGuideLineBitmaps[KTopGuideLineIndex]->SizeInPixels(); - aGc.BitBltMasked( iGuideLineTopL, iGuideLineBitmaps[KTopGuideLineIndex], - TRect( TPoint( 0, 0 ), pixSize ), - iGuideLineBitmapMasks[KTopGuideLineIndex], EFalse ); - } - - if ( iBottomGuideLineDisplay && KBottomGuideLineIndex < iGuideLineLayout.Count() - && KBottomGuideLineIndex < iGuideLineBitmaps.Count() - && KBottomGuideLineIndex < iGuideLineBitmapMasks.Count() ) - { - TSize pixSize = iGuideLineBitmaps[KBottomGuideLineIndex]->SizeInPixels(); - aGc.BitBltMasked( iGuideLineBottomL, iGuideLineBitmaps[KBottomGuideLineIndex], - TRect( TPoint( 0, 0 ), pixSize ), - iGuideLineBitmapMasks[KBottomGuideLineIndex], EFalse ); - } - } - -// ----------------------------------------------------------------------------- -// Show trails. -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::ShowTrails( const RArray& aPointArray, - TBool aIsScale, - const TSize& aRefSize ) - { - // Set values fo iPointArrayDraw - if ( aPointArray.Count() > 0 ) - { - iPointArrayDraw.Reset(); - for ( TInt i = 0; i < aPointArray.Count(); i++ ) - { - iPointArrayDraw.Append( aPointArray[i] ); - } - } - - // Adjust the trails in terms of HwrBox size - if ( aIsScale ) - { - // Scale model points - ScaleModel( aRefSize, iDrawabelRect.Size(), iPointArrayDraw ); - } - DrawNow(); - } - -// -------------------------------------------------------------------------- -// CTruiHwrBox::ShowTooltipL -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::ShowTooltipL( const TDesC& aText, - const TPoint& aPosition, - const TInt aBeforeTimeout, - const TInt aInViewTimeout ) - { - if ( aText.Length() < 0 ) - { - return; - } - iTooltip->SetTextL( aText ); - iTooltip->SetTimeDelayBeforeShow( aBeforeTimeout ); - iTooltip->SetTimePopupInView( aInViewTimeout ); - iTooltip->SetPositionAndAlignment( aPosition, EHCenterVTop ); - - iTooltip->ShowInfoPopupNote(); - } - -void CTruiHwrBox::SetTooltipPosition( const TPoint& aPosition ) - { - if ( iTooltip ) - { - iTooltip->SetPositionAndAlignment( aPosition, EHCenterVTop ); - } - } - -// -------------------------------------------------------------------------- -// Hide tooltip. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::HideInfoPopupNote() - { - if ( iTooltip ) - { - iTooltip->HideInfoPopupNote(); - } - } - -// -------------------------------------------------------------------------- -// Handles events reported from info popup note. -// -------------------------------------------------------------------------- -// -void CTruiHwrBox::HandleInfoPopupNoteEvent( CAknInfoPopupNoteController* aController, - TAknInfoPopupNoteEvent aEvent ) - { - if ( aController == iTooltip && aEvent == EInfoPopupNoteHidden ) - { - DrawNow(); - } - } - -// ----------------------------------------------------------------------------- -// Save the new inputting model by manual. -// ----------------------------------------------------------------------------- -// -void CTruiHwrBox::SaveModelByManuallyL() - { - if ( iPointArrayDraw.Count() && !iStartSave ) - { - // Has drawn - if ( iPointArrayDraw[iPointArrayDraw.Count() - 1] != KTail ) - { - iPointArrayDraw.Append( KTail ); - } - SaveModelL(); - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truiinfomessagecontainer.cpp --- a/textinput/peninputhwrtrui/src/truiinfomessagecontainer.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,316 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiInfoMessageContainer -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "truiinfomessagecontainer.h" -#include "truiappradiobutton.h" -#include "truiappui.h" -#include "truiengine.h" -#include "truicontainerbase.h" - -// Varity of instruct pane both for landscape and portrait -const TInt KVarityInstructPane = 4; - -// Varity of list pane both for landscape and portrait -const TInt KVarityListPane = 2; - -// Varity of symbol option pane both for landscape and portrait -const TInt KVaritySymbolOptionPane = 2; - -// Varity of list symbol option pane both for landscape and portrait -const TInt KVarityListSymbolOptionPane = 1; - - -// ======== MEMBER FUNCTIONS ======== - -CTruiInfoMessageContainer::CTruiInfoMessageContainer() - { - } - -void CTruiInfoMessageContainer::ConstructL( const TRect& aRect ) - { - // Initialize control array - InitComponentArrayL(); - - // Set parent control or owning window - CreateWindowL(); - - // Initialize controls - InitializeControlsL(); - - iLabelText = iEikonEnv->AllocReadResourceL( R_TRUI_INFOMAESSAGEVIEW_MESSAGE ); - iEdwin->SetTextL( iLabelText ); - - SetRect( aRect ); - ActivateL(); - - iBackGround = CAknsBasicBackgroundControlContext::NewL - ( KAknsIIDQsnBgAreaMain, Rect(), EFalse); - iEdwin->SetSkinBackgroundControlContextL( iBackGround ); - } - -CTruiInfoMessageContainer* CTruiInfoMessageContainer::NewL( const TRect& aRect ) - { - CTruiInfoMessageContainer* self = CTruiInfoMessageContainer::NewLC( aRect ); - CleanupStack::Pop( self ); - return self; - } - -CTruiInfoMessageContainer* CTruiInfoMessageContainer::NewLC( const TRect& aRect ) - { - CTruiInfoMessageContainer* self = new (ELeave) CTruiInfoMessageContainer(); - CleanupStack::PushL( self ); - self->ConstructL( aRect ); - return self; - } - -CTruiInfoMessageContainer::~CTruiInfoMessageContainer() - { - delete iBackGround; - delete iLabelText; - } - -// --------------------------------------------------------------------------- -// Do something before exit. -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageContainer::PrepareToExitL() - { - // Save checkbox setting - const RArray& statusArray = - iRadioButtonContainer->StatusArray(); - TBool isDisplayed = statusArray.Count() && statusArray[0] ? EFalse : ETrue; - iEngine->SetDisplayWizard( isDisplayed ); - if ( statusArray.Count() ) - { - SaveSettingIntoIniFileL( KAlwaysDisplayWizardKey, statusArray[0] ); - } - } - -// --------------------------------------------------------------------------- -// Create controls to be displayed in this container. -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageContainer::InitializeControlsL() - { - iRadioButtonContainer = CTruiRadioButton::NewL( this, - CTruiRadioButton:: ECheckBox ); - Components().AppendLC( iRadioButtonContainer ); - CleanupStack::Pop( iRadioButtonContainer ); - - HBufC* radioText1 = iEikonEnv->AllocReadResourceLC - ( R_TRUI_INFOMAESSAGEVIEW_CHECKBOX_TEXT ); - iRadioButtonContainer->AddItem( radioText1, CTruiRadioButton::ENonSelected ); - CleanupStack::Pop( radioText1 ); // transfered ownership - iRadioButtonContainer->HandleItemAdditionL(); - - iEdwin = new (ELeave) CEikEdwin; - iEdwin->ConstructL(); - iEdwin->SetReadOnly( ETrue ); - Components().AppendLC( iEdwin ); - CleanupStack::Pop( iEdwin ); - - } - -// --------------------------------------------------------------------------- -// Create label and display it in the container. -// --------------------------------------------------------------------------- -// -CEikLabel* CTruiInfoMessageContainer::CreateLabelL( const CCoeControl* aParent ) - { - CEikLabel* aknLabel = new (ELeave) CEikLabel(); - CleanupStack::PushL( aknLabel ); - aknLabel->SetContainerWindowL( *aParent ); - aknLabel->ActivateL(); - CleanupStack::Pop( aknLabel ); - return aknLabel; - } - - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Responds to changes to the size and position of the contents of this control. -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageContainer::SizeChanged() - { - TRect rect = Rect(); - - TAknWindowComponentLayout main_pane_layout = - AknLayoutScalable_Apps::main_hwr_training_pane(); - TAknLayoutRect main_pane_layout_rect; - main_pane_layout_rect.LayoutRect( rect, main_pane_layout ); - TRect main_pane_rect = main_pane_layout_rect.Rect(); - - // hwr_training_instruct_pane - TAknWindowComponentLayout instruct_pane_layout = - AknLayoutScalable_Apps::hwr_training_instruct_pane( KVarityInstructPane ); - TAknLayoutRect instruct_pane_layout_rect; - instruct_pane_layout_rect.LayoutRect( main_pane_rect, instruct_pane_layout ); - iInstructPaneRect = instruct_pane_layout_rect.Rect(); - - // count of text rows - TInt count = AknLayoutScalable_Apps:: - list_single_hwr_training_instruct_pane_ParamLimits( KVarityListPane ) - .LastRow() + 1; - - // array contains all text rows in help screen - RArray textLayoutArray; - for( TInt i = 0; i < count; i++ ) - { - // pane area for each row - TAknWindowComponentLayout each_row_layout = - AknLayoutScalable_Apps::list_single_hwr_training_instruct_pane - ( KVarityListPane, 0, i ); - TAknLayoutRect each_row_layout_rect; - each_row_layout_rect.LayoutRect( iInstructPaneRect, - each_row_layout ); - // smaller pane for text itself - TAknTextComponentLayout each_row_text_layout = - AknLayoutScalable_Apps::list_single_hwr_training_instruct_pane_t1(); - - // composition of two latter componets - TAknTextComponentLayout textCompCompositionWiz = - TAknWindowComponentLayout::ComposeText( - each_row_layout, each_row_text_layout ); - - TRAPD( error, textLayoutArray.AppendL( textCompCompositionWiz ) ); - // if error in append function, then just exit the loop - if ( error != KErrNone ) - { - break; - } - } - iMultilineLayout = TAknTextComponentLayout::Multiline( textLayoutArray ); - textLayoutArray.Close(); - - // Do layout for edwin - AknLayoutUtils::LayoutEdwin( iEdwin, - iInstructPaneRect, - iMultilineLayout, - EAknsCIQsnTextColorsCG6 ); - - // Do layout for radio button - // hwr_training_instruct_pane - TAknWindowComponentLayout symbol_option_pane = - AknLayoutScalable_Apps::main_hwr_training_symbol_option_pane - ( KVaritySymbolOptionPane ); - TAknLayoutRect symbol_option_pane_layout_rect; - symbol_option_pane_layout_rect.LayoutRect( main_pane_rect, symbol_option_pane ); - - TAknWindowComponentLayout list_option_pane = - AknLayoutScalable_Apps::list_single_hwr_training_symbol_option_pane - ( KVarityListSymbolOptionPane ); - TAknLayoutRect list_option_pane_layout_rect; - list_option_pane_layout_rect.LayoutRect( symbol_option_pane_layout_rect.Rect(), - list_option_pane ); - // Create multiline text for radion button - // count of text rows - TInt radionLines = AknLayoutScalable_Apps:: - list_single_hwr_training_symbol_option_pane_ParamLimits - ( KVarityListSymbolOptionPane ) - .LastRow() + 1; - - // array contains all text rows in help screen - RArray radionTextLayoutArray; - for( TInt i = 0; i < radionLines; i++ ) - { - // pane area for each row - TAknWindowComponentLayout each_row_layout = - AknLayoutScalable_Apps::list_single_hwr_training_symbol_option_pane - ( KVarityListSymbolOptionPane, 0, i ); - TAknLayoutRect each_row_layout_rect; - each_row_layout_rect.LayoutRect( symbol_option_pane_layout_rect.Rect(), - each_row_layout ); - // smaller pane for text itself - TAknTextComponentLayout each_row_text_layout = - AknLayoutScalable_Apps::list_single_hwr_training_symbol_option_pane_t1(); - - // composition of two latter componets - TAknTextComponentLayout textCompCompositionWiz = - TAknWindowComponentLayout::ComposeText( - each_row_layout, each_row_text_layout ); - - TRAPD( error, radionTextLayoutArray.AppendL( textCompCompositionWiz ) ); - // if error in append function, then just exit the loop - if ( error != KErrNone ) - { - break; - } - } - TAknMultiLineTextLayout radioMultilineLayout - = TAknTextComponentLayout::Multiline( radionTextLayoutArray ); - radionTextLayoutArray.Close(); - iRadioButtonContainer->SetMultilineLayout( radioMultilineLayout ); - iRadioButtonContainer->SetRect( symbol_option_pane_layout_rect.Rect() ); - - if ( iBackGround ) - { - iBackGround->SetRect( Rect() ); - } - } - -// --------------------------------------------------------------------------- -// Draw. -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageContainer::Draw( const TRect& /*aRect*/ ) const - { - // Get the standard graphics context - CWindowGc& gc = SystemGc(); - // Gets the control's extent - TRect rect( Rect()); - // Clears the screen - gc.Clear( rect ); - - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - if ( AknsDrawUtils::HasBitmapBackground( skin, iBackGround ) ) - { - AknsDrawUtils::Background( skin, iBackGround, gc, rect ); - } - } -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles a change to the control's resources. -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageContainer::HandleResourceChange( TInt aType ) - { - CTruiContainerBase::HandleResourceChange( aType ); - if ( aType == KAknsMessageSkinChange ) - { - if ( iEdwin ) - { - // Do layout for edwin - AknLayoutUtils::LayoutEdwin( iEdwin, - iInstructPaneRect, - iMultilineLayout, - EAknsCIQsnTextColorsCG6 ); - } - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truiinfomessageview.cpp --- a/textinput/peninputhwrtrui/src/truiinfomessageview.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutEditTextView -* -*/ - - -#include -#include -#include -#include - -#include "truiinfomessageview.h" -#include "truiappui.h" -#include "truiinfomessagecontainer.h" -#include "truishortcutedittextview.h" -#include "truishortcutsview.h" -#include "truiengine.h" - -// ======== MEMBER FUNCTIONS ======== - -CTruiInfoMessageView::CTruiInfoMessageView() - { - } - -void CTruiInfoMessageView::ConstructL() - { - BaseConstructL( R_TRUI_INFOMESSAGEVIEW ); - } - -CTruiInfoMessageView* CTruiInfoMessageView::NewL() - { - CTruiInfoMessageView* self = CTruiInfoMessageView::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -CTruiInfoMessageView* CTruiInfoMessageView::NewLC() - { - CTruiInfoMessageView* self = new( ELeave ) CTruiInfoMessageView; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -CTruiInfoMessageView::~CTruiInfoMessageView() - { - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Returns views id. -// --------------------------------------------------------------------------- -// -TUid CTruiInfoMessageView::Id() const - { - return KTruiInfoMessageViewId; - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Command handling function. -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageView::HandleCommandL( TInt aCommand ) - { - CTruiAppUi* appui = static_cast( AppUi() ); - switch ( aCommand ) - { - case EAknSoftkeyNext: - { - appui->HwrEngine()->SetShortcut( KNullDesC ); - iContainer->PrepareToExitL(); - appui->ActivateLocalViewL( KTruiShortcutEditTextViewId ); - break; - } - case EAknSoftkeyCancel: - { - appui->ActivateLocalViewL( KTruiShortcutsViewId ); - break; - } - } - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is activated -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - CTruiAppUi* appui = static_cast( AppUi() ); - // Set title pane - HBufC* titleText = iEikonEnv->AllocReadResourceLC - ( R_TRUI_INFOMESSAGEVIEW_TITLEPANE_TEXT ); - appui->ShowTitlePaneL( *titleText ); - CleanupStack::PopAndDestroy( titleText ); - - // Close navi pane - appui->CloseNaviPaneL(); - - // Create container - iContainer = CTruiInfoMessageContainer::NewL( ClientRect() ); - iContainer->SetMopParent( this ); - iContainer->SetView( this ); - AppUi()->AddToStackL( *this, iContainer ); - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is deactivated -// --------------------------------------------------------------------------- -// -void CTruiInfoMessageView::DoDeactivate() - { - if ( iContainer ) - { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truilanguagerelation.cpp --- a/textinput/peninputhwrtrui/src/truilanguagerelation.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class TLanguageRelation -* -*/ - - -#include "truilanguagerelation.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// construction -// --------------------------------------------------------------------------- -// -TLanguageRelation::TLanguageRelation( TInt aCode, TInt aLanguageScriptId ) - : iCode( aCode ), iLanguageScriptId( aLanguageScriptId ) - { - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truimainview.cpp --- a/textinput/peninputhwrtrui/src/truimainview.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,401 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiMainView -* -*/ - - -#include -#include -#include -#include -#include -#include - -#include "truimainview.h" -#include "truimainviewcontainer.h" -#include "trui.hrh" -#include "truiappui.h" -#include "truiengine.h" -#include "truishortcutsview.h" - -// ======== MEMBER FUNCTIONS ======== - -CTruiMainView::CTruiMainView() - { - } - -void CTruiMainView::ConstructL() - { - BaseConstructL( R_TRUI_MAINVIEW ); - } - -CTruiMainView* CTruiMainView::NewL() - { - CTruiMainView* self = CTruiMainView::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -CTruiMainView* CTruiMainView::NewLC() - { - CTruiMainView* self = new( ELeave ) CTruiMainView; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -CTruiMainView::~CTruiMainView() - { - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Returns views id. -// --------------------------------------------------------------------------- -// -TUid CTruiMainView::Id() const - { - return KTruiMainViewId; - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Command handling function. -// --------------------------------------------------------------------------- -// -void CTruiMainView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EMainViewCharGrid: - { - // Handle menu item command "Character Grid" - iContainer->HandleChooseCharEventL(); - } - break; - case EMainViewSubmenuWestern: - case EMainViewSubmenuCyrillic: - case EMainViewSubmenuGreek: - case EMainViewSubmenuHebrew: - { - iContainer->HandleLanguageScriptChangedL( aCommand ); - } - break; - case EMainViewSubmenuLatinLowerLetter: - case EMainViewSubmenuLatinUpperLetter: - case EMainViewSubmenuLatinAccent: - case EMainViewSubmenuDigital: - case EMainViewSubmenuSymbols: - case EMainViewSubmenuCyrillicLowerLetters: - case EMainViewSubmenuCyrillicUpperLetters: - case EMainViewSubmenuCyrillicAccent: - case EMainViewSubmenuGreekLowerLetters: - case EMainViewSubmenuGreekUpperLetters: - case EMainViewSubmenuHebrewLetters: - { - // Handle character range changed - // Get range index in menu pane by range Id - CTruiAppUi* appui = static_cast( AppUi() ); - CTruiEngine* engine = appui->HwrEngine(); - const RArray& rangeIdArray = - engine->GetCurrentSupportedRangesId(); - TInt indexOfMenuItems = rangeIdArray.Find( aCommand ); - if ( indexOfMenuItems != KErrNotFound ) - { - // Set current character range by index in Engine - engine->SetCharacterRangeByIndexL( indexOfMenuItems ); - - // Call iContainer->HandleCharRangeChanged to handle it. - iContainer->HandleCharRangeChangedL( indexOfMenuItems, - aCommand ); - } - } - break; - case EMainViewDeleteCurrentModel: - { - iContainer->DeleteModelL(); - } - break; - case EMainViewDeleteAllModel: - { - iContainer->DeleteAllModelL(); - break; - } - case EMainViewPreviewModel: - { - iContainer->PreviewCharacterModel(); - break; - } - case EMainViewToShortcutsView: - { - CTruiAppUi* appui = static_cast( AppUi() ); - CAknNavigationDecorator* naviDecorator = appui->GetNaviDecorator(); - CAknTabGroup* tabGroup = static_cast - ( naviDecorator->DecoratedControl() ); - tabGroup->SetActiveTabById( ENavigationPaneShortcutsViewTab ); - // Switch to local view. - appui->ActivateLocalViewL( KTruiShortcutsViewId ); - break; - } - case EAknSoftkeyExit: - { - iContainer->PrepareToExitL(); - AppUi()->HandleCommandL( aCommand ); - } - break; - default: - { - AppUi()->HandleCommandL( aCommand ); - } - } - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is activated -// --------------------------------------------------------------------------- -// -void CTruiMainView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - // Set title pane - CTruiAppUi* appui = static_cast( AppUi() ); - HBufC* titleText = - iEikonEnv->AllocReadResourceLC( R_TRUI_MAINVIEW_TITLEPANE_TEXT ); - appui->ShowTitlePaneL( *titleText ); - CleanupStack::PopAndDestroy( titleText ); - - iContainer = CTruiMainViewContainer::NewL( ClientRect() ); - iContainer->SetMopParent( this ); - AppUi()->AddToStackL( *this, iContainer ); - iContainer->SetView( this ); - - // Set toolbar - CAknToolbar* toolbar = Toolbar(); - if ( toolbar ) - { - toolbar->SetToolbarObserver( this ); - toolbar->SetToolbarVisibility( ETrue, EFalse ); - } - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is deactivated -// --------------------------------------------------------------------------- -// -void CTruiMainView::DoDeactivate() - { - if ( iContainer ) - { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; - } - } - -// --------------------------------------------------------------------------- -// From class MAknToolbarObserver. -// Handles toolbar events for a certain toolbar item. -// --------------------------------------------------------------------------- -// -void CTruiMainView::OfferToolbarEventL( TInt aCommand ) - { - switch ( aCommand ) - { - case EMainViewButtonIdGrid: - { - // Open SCT - iContainer->HandleChooseCharEventL(); - break; - } - case EMainViewButtonIdPreview: - { - // Preview character animation - iContainer->PreviewCharacterModel(); - break; - } - case EMainViewButtonIdDelete: - { - // Clear HWR box and delete character model - iContainer->DeleteModelL(); - break; - } - } - } - -// --------------------------------------------------------------------------- -// Dynamically initialises a menu pane. -// --------------------------------------------------------------------------- -// -void CTruiMainView::DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) - { - // Get engine - CTruiAppUi* appui = static_cast( AppUi() ); - CTruiEngine* engine = appui->HwrEngine(); - - if ( aResourceId == R_TRUI_MAINVIEW_MENUPANE ) - { - // Get language script from engine - // Determine whether "Language script" will be displayed. - aMenuPane->SetItemDimmed( EMainViewLanguageScript, - ( engine->SupportedLanguageScript().Count() <= 1 ) ); - - // Determine whether "Delete model" will be displayed - iDimAllDelete = iContainer->IsAllDelete(); - - TBool isDimmed = ( iContainer->IsButtonDimmed() && iDimAllDelete ) - ? ETrue: EFalse; - aMenuPane->SetItemDimmed( EMainViewDeleteModel, isDimmed ); - - // Determine whether "Preview model" will be displayed. - TBool isPreviewDimmed = iContainer->IsButtonDimmed() ? ETrue: EFalse; - aMenuPane->SetItemDimmed( EMainViewPreviewModel, isPreviewDimmed ); - } - if ( aResourceId == R_TRUI_MAINVIEW_MENU_LANGUAGESCRIPT_CASCADE ) - { - // Set which items will be displayed by supported language script - const RArray& languageScriptId = - engine->SupportedLanguageScript(); - aMenuPane->SetItemDimmed( EMainViewSubmenuWestern, ETrue ); - aMenuPane->SetItemDimmed( EMainViewSubmenuCyrillic, ETrue ); - aMenuPane->SetItemDimmed( EMainViewSubmenuGreek, ETrue ); - aMenuPane->SetItemDimmed( EMainViewSubmenuHebrew, ETrue ); - for ( TInt i = 0; i < languageScriptId.Count(); i++ ) - { - aMenuPane->SetItemDimmed( languageScriptId[i], EFalse ); - } - - if ( IsMenuItemDimmed( aMenuPane, EMainViewSubmenuWestern ) ) - { - aMenuPane->DeleteMenuItem( EMainViewSubmenuWestern ); - } - if ( IsMenuItemDimmed( aMenuPane, EMainViewSubmenuCyrillic ) ) - { - aMenuPane->DeleteMenuItem( EMainViewSubmenuCyrillic ); - } - if ( IsMenuItemDimmed( aMenuPane, EMainViewSubmenuGreek ) ) - { - aMenuPane->DeleteMenuItem( EMainViewSubmenuGreek ); - } - if ( IsMenuItemDimmed( aMenuPane, EMainViewSubmenuHebrew ) ) - { - aMenuPane->DeleteMenuItem( EMainViewSubmenuHebrew ); - } - - // Set which item will be indicated by current language script - aMenuPane->SetItemButtonState( engine->CurrentLanguageScript(), - EEikMenuItemSymbolOn ); - - // Set current selected item - TInt pos; - aMenuPane->ItemAndPos( engine->CurrentLanguageScript(), pos ); - aMenuPane->SetSelectedItem( pos ); - } - if ( aResourceId == R_TRUI_MAINVIEW_MENU_CHARRANGE_CASCADE ) - { - // Get language script from model - // Init character range submenu - InitCharRangeSubMenuL( engine->CurrentLanguageScript(), aMenuPane ); - - if ( engine->CurrentLanguageScript() == EMainViewSubmenuCyrillic ) - { - // Dim cyrillic accent range - aMenuPane->SetItemDimmed( EMainViewSubmenuCyrillicAccent, ETrue ); - } - - // Get the current item's Id - TInt rangeId = engine->GetCurrentCharacterRange(); - - // Set which item to be indicated - aMenuPane->SetItemButtonState( rangeId, EEikMenuItemSymbolOn ); - - // Set which item to be highlighted - const RArray& rangeIdArray = - engine->GetCurrentSupportedRangesId(); - TInt indexOfMenuItems = rangeIdArray.Find( rangeId ); - if ( indexOfMenuItems != KErrNotFound ) - { - aMenuPane->SetSelectedItem( indexOfMenuItems ); - } - } - if ( aResourceId == R_TRUI_MAINVIEW_MENU_DELETE_CASCADE ) - { - aMenuPane->SetItemDimmed( EMainViewDeleteCurrentModel, - iContainer->IsButtonDimmed() ); - aMenuPane->SetItemDimmed( EMainViewDeleteAllModel, iDimAllDelete ); - } - } - -// --------------------------------------------------------------------------- -// Dynamically initialises the character range menu pane. -// --------------------------------------------------------------------------- -// -void CTruiMainView::InitCharRangeSubMenuL( TInt aScriptId, - CEikMenuPane* aMenuPane) - { - // Get the corrent reource ID of MENU_ITEMS by - TInt reourceId = MenuItemsReourceId( aScriptId ); - // Add these menu items into menu pane - aMenuPane->AddMenuItemsL( reourceId ); - } - -// --------------------------------------------------------------------------- -// Get reource ID of menu items for initializing menu pane. -// --------------------------------------------------------------------------- -// -TInt CTruiMainView::MenuItemsReourceId( TInt aScriptId ) - { - TInt reourceId; - switch ( aScriptId ) - { - case EMainViewSubmenuWestern: - { - reourceId = R_TRUI_MAINVIEW_SUBMENU_CHARRANGE_LATIN; - } - break; - case EMainViewSubmenuCyrillic: - { - reourceId = R_TRUI_MAINVIEW_SUBMENU_CHARRANGE_CYRILLIC; - } - break; - case EMainViewSubmenuGreek: - { - reourceId = R_TRUI_MAINVIEW_SUBMENU_CHARRANGE_GREEK; - } - break; - case EMainViewSubmenuHebrew: - { - reourceId = R_TRUI_MAINVIEW_SUBMENU_CHARRANGE_HEBREW; - } - break; - default: - reourceId = 0; - break; - } - return reourceId; - } - -// --------------------------------------------------------------------------- -// Check menu item dimmed by menu item id. -// --------------------------------------------------------------------------- -// -TBool CTruiMainView::IsMenuItemDimmed( CEikMenuPane* aMenuPane, TInt aMenuItemId ) - { - CEikMenuPaneItem::SData& itemdata = aMenuPane->ItemData( aMenuItemId ); - return ( itemdata.iFlags & EEikMenuItemDimmed == EEikMenuItemDimmed ); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truimainviewcontainer.cpp --- a/textinput/peninputhwrtrui/src/truimainviewcontainer.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1333 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiMainViewContainer -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "truicontainerbase.h" -#include "truimainviewcontainer.h" -#include "truihwrbox.h" -#include "truiengine.h" -#include "truiappui.h" -#include "truiapplication.h" -#include "truihelp.h" -#include "trui.hrh" -#include "truimainview.h" - -// Max length of text in indicator -const TInt KIndicatorTextLen = 10; - -// Max length of text of silimar message -const TInt KSimilarMsgLength = 160; - -// Delay time of showing tooltip -const TInt KTooltipShowDelay = 0; - -// Delay time of hiding tooltip -const TInt KTooltipHideDelay = 3000; - -// Size for buffer to fill maximum characters from SCT. -const TInt KSctBufferSize = 32; - -const TInt KHwrTooltipY = 20; - -const TInt KVarityNaviPaneContents = 0; - -//the special gesture characters -_LIT(KDisplayBackspace, "\x2190"); -_LIT(KDisplaySpace, "\xF800"); -_LIT(KDisplayEnter, "\xF801"); - -// ======== MEMBER FUNCTIONS ======== - -CTruiMainViewContainer::CTruiMainViewContainer() - { - } - -void CTruiMainViewContainer::ConstructL( const TRect& aRect ) - { - // Initialize control array - InitComponentArrayL(); - - // Set parent control or owning window - CreateWindowL(); - - iBackGround = CAknsBasicBackgroundControlContext::NewL - ( KAknsIIDQsnBgAreaMain, - Rect(), - EFalse ); - - // Initialize controls - InitializeControlsL(); - - SetRect( aRect ); - - // Set first character of the character set as the default trained character - const HBufC* charSet = iEngine->CharacterSet(); - ASSERT( charSet ); - SetCurrentCharL( charSet->Mid( 0, 1 ) ); - - TInt currentRangeId = iEngine->GetCurrentCharacterRange(); - const RArray& rangeIdArray = - iEngine->GetCurrentSupportedRangesId(); - TInt indexOfMenuItems = rangeIdArray.Find( currentRangeId ); - if ( indexOfMenuItems != KErrNotFound ) - { - // Set choiclist' selected item to index. - iChoicelist->SetSelectedIndex( indexOfMenuItems ); - } - else - { - iChoicelist->SetSelectedIndex( 0 ); - } - - // Set hwrbox's rect to engine and set guiding line to hwrbox - iHwrBox->SetDisplayBottomGuideLine( ETrue ); - if ( iEngine->CurrentLanguageScript() == EMainViewSubmenuHebrew ) - { - iHwrBox->SetDisplayTopGuideLine( ETrue ); - } - - ActivateL(); - - } - -CTruiMainViewContainer* CTruiMainViewContainer::NewL( const TRect& aRect ) - { - CTruiMainViewContainer* self = CTruiMainViewContainer::NewLC( aRect ); - CleanupStack::Pop( self ); - return self; - } - -CTruiMainViewContainer* CTruiMainViewContainer::NewLC( const TRect& aRect ) - { - CTruiMainViewContainer* self = new (ELeave) CTruiMainViewContainer(); - CleanupStack::PushL( self ); - self->ConstructL( aRect ); - return self; - } - -CTruiMainViewContainer::~CTruiMainViewContainer() - { - if ( iBackGround ) - { - delete iBackGround; - } - delete iWrappedLabelText; - delete iLabeltext; - iLineWidthArray.Close(); - } - -// --------------------------------------------------------------------------- -// Create controls to be displayed in this container. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::InitializeControlsL() - { - CAknToolbar* toolbar = iAppUi->View( KTruiMainViewId )->Toolbar(); - // Get Clear button from toolbar - if ( toolbar ) - { - iClearBtn = static_cast - ( toolbar->ControlOrNull( EMainViewButtonIdDelete ) ); - iPreviewBtn = static_cast - ( toolbar->ControlOrNull( EMainViewButtonIdPreview ) ); - } - - // Create Label for text above writting box - iLabel = CreateLabelL( R_MAINVIEW_LABEL_TIP, this, NULL ); - Components().AppendLC( iLabel ); - CleanupStack::Pop( iLabel ); - - // Create left button - iLeftBtn = CreateButtonL( R_MAINVIEW_BUTTON_LEFT, this, this ); - Components().AppendLC( iLeftBtn ); - CleanupStack::Pop( iLeftBtn ); - - // Create indicator - iIindicator = CreateLabelL( R_MAINVIEW_LABEL_INDICATOR, this, this ); - Components().AppendLC( iIindicator ); - CleanupStack::Pop( iIindicator ); - - // Create right button - iRightBtn = CreateButtonL( R_MAINVIEW_BUTTON_RIGHT, this, this ); - Components().AppendLC( iRightBtn ); - CleanupStack::Pop( iRightBtn ); - - // Create choicelist - TInt buttonResource = ButtonResourceId - ( iEngine->GetCurrentCharacterRange() ); - CAknButton* rangeButton = CreateButtonL( buttonResource, - this, NULL ); - iCurChoiceListBtn = rangeButton; - CDesCArray* charRangeArray = iEngine->GetCharacterRangeName(); - CDesCArray* ownedCharRangeArray = new ( ELeave ) CDesCArrayFlat - ( charRangeArray->MdcaCount() ); - - CleanupStack::PushL( ownedCharRangeArray ); - for ( TInt i=0; iMdcaCount(); i++ ) - { - ownedCharRangeArray->AppendL( charRangeArray->MdcaPoint( i ) ); - } - iChoicelist = CreateChoiceListL( this, this, - ownedCharRangeArray,rangeButton ); - CleanupStack::Pop( ownedCharRangeArray ); - ownedCharRangeArray = NULL;// Ownership has been transfered to choicelist - Components().AppendLC( iChoicelist ); - CleanupStack::Pop( iChoicelist ); - - iHwrBox = CreateHwrBoxL( this, this ); - iHwrBox->SetHwrBoxFlag( CTruiHwrBox::EFrameHwrBox ); - Components().AppendLC( iHwrBox ); - CleanupStack::Pop( iHwrBox ); - } - -// --------------------------------------------------------------------------- -// Create label and display it in the container. -// --------------------------------------------------------------------------- -// -CEikLabel* CTruiMainViewContainer::CreateLabelL( const TInt aResourceId, - const CCoeControl* aParent, - MCoeControlObserver* aObserver ) - { - CEikLabel* aknLabel = new (ELeave) CEikLabel(); - CleanupStack::PushL( aknLabel ); - if ( aParent ) - { - aknLabel->SetContainerWindowL( *aParent ); - } - if ( aObserver ) - { - aknLabel->SetObserver( aObserver ); - } - if ( aResourceId != 0 ) - { - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC( reader, aResourceId ); - aknLabel->ConstructFromResourceL( reader ); - CleanupStack::PopAndDestroy(); // reader - } - aknLabel->ActivateL(); - CleanupStack::Pop( aknLabel ); - return aknLabel; - } - -// --------------------------------------------------------------------------- -// Create choicelist and display it in the container. -// --------------------------------------------------------------------------- -// - CAknChoiceList* CTruiMainViewContainer::CreateChoiceListL - ( CCoeControl* aParent, - MCoeControlObserver* aObserver, - CDesCArray* aTextArray, - CAknButton* aButton ) - { - CAknChoiceList* choiceList = CAknChoiceList::NewLC( aParent, - aTextArray, - CAknChoiceList::EAknChoiceListWithoutCurrentSelection, - aButton ); - choiceList->SetObserver( aObserver ); - CleanupStack::Pop( choiceList ); - return choiceList; - } - -// --------------------------------------------------------------------------- -// Create HWRBox and display it in the container. -// --------------------------------------------------------------------------- -// -CTruiHwrBox* CTruiMainViewContainer::CreateHwrBoxL( CCoeControl* aParent, - MTruiHwrBoxObserver* aObserver ) - { - return CTruiHwrBox::NewL( aParent, aObserver, iBackGround ); - } - -// --------------------------------------------------------------------------- -// Responds to changes to the size and position of the contents of this control. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::SizeChanged() - { - TInt varity = Layout_Meta_Data::IsLandscapeOrientation() ? KLandscapeVarity - : KPortraitVarity; - DoSizeChanged( varity ); - - if ( iBackGround ) - { - iBackGround->SetRect( Rect() ); - } - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles key event. -// --------------------------------------------------------------------------- -// -TKeyResponse CTruiMainViewContainer::OfferKeyEventL - ( const TKeyEvent& aKeyEvent, - TEventCode aType ) - { - if ( aType == EEventKey ) - { - switch ( aKeyEvent.iCode ) - { - case EKeyLeftArrow: - { - return EKeyWasConsumed; - } - case EKeyRightArrow: - { - CAknNavigationDecorator* naviDecorator = - iAppUi->GetNaviDecorator(); - CAknTabGroup* tabGroup = static_cast - ( naviDecorator->DecoratedControl() ); - return tabGroup->OfferKeyEventL( aKeyEvent, aType ); - } - default: - break; - } - } - return EKeyWasNotConsumed; - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// The region of the control to be redrawn. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::Draw( const TRect& /*aRect*/ ) const - { - // Get the standard graphics context - CWindowGc& gc = SystemGc(); - // Gets the control's extent - TRect rect( Rect() ); - // Clears the screen - gc.Clear( rect ); - - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - if ( AknsDrawUtils::HasBitmapBackground( skin, iBackGround ) ) - { - AknsDrawUtils::Background( skin, iBackGround, gc, rect ); - } - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles a change to the control's resources. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::HandleResourceChange( TInt aType ) - { - CTruiContainerBase::HandleResourceChange( aType ); - if ( aType == KEikDynamicLayoutVariantSwitch && iHwrBox ) - { - if ( iHwrBox->BoxState() == CTruiHwrBox::ENewModelDraw ) - { - TRAP_IGNORE( iHwrBox->SaveModelByManuallyL() ); - } - } - - if ( aType == KAknsMessageSkinChange ) - { - TRgb labelColor = KRgbBlack; - TInt error = GetCachedLabelTextColor( labelColor ); - if ( error == KErrNone ) - { - TRAPD( errLable, iLabel->OverrideColorL( EColorLabelText, - labelColor ) ); - if ( errLable != KErrNone ) - { - return; - } - TRAP_IGNORE( iIindicator->OverrideColorL( EColorLabelText, - labelColor ) ); - } - TRgb iconColor = KRgbBlack; - // Change left icon - iLeftBtn->State()->SetIcon( ConstructIconFromResourceL - ( R_MAINVIEW_BUTTON_LEFT ) ); - // Change right icon - iRightBtn->State()->SetIcon( ConstructIconFromResourceL - ( R_MAINVIEW_BUTTON_RIGHT ) ); - - // Change choicelist button - TInt rangeId = iEngine->GetCurrentCharacterRange(); - TInt buttonResoureId = ButtonResourceId( rangeId ); - iCurChoiceListBtn->State()->SetIcon( ConstructIconFromResourceL - ( buttonResoureId ) ); - } - } - -// --------------------------------------------------------------------------- -// Handles an event from an observed control. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::HandleControlEventL(CCoeControl* aControl, - TCoeEvent aEventType) - { - // Handle left button event - if ( aControl == iLeftBtn && aEventType == EEventStateChanged ) - { - //Get character set - const HBufC* charSet = iEngine->CharacterSet(); - ASSERT( charSet ); - //Locate current position - TInt charPos = charSet->Find( iCurrentChar ); - if ( charPos != KErrNotFound ) - { - //Move left - TInt length = charSet->Length(); - charPos = ( charPos - 1 + length ) % length; - SetCurrentCharL( charSet->Mid( charPos, 1 ) ); - } - } - // Handle indicator button event - else if ( aControl == iIindicator && aEventType == EEventRequestFocus ) - { - PreviewCharacterModel(); - } - // Handle right button event - else if ( aControl == iRightBtn && aEventType == EEventStateChanged ) - { - //Get character set - const HBufC* charSet = iEngine->CharacterSet(); - ASSERT( charSet ); - //Locate current position - TInt charPos = charSet->Find( iCurrentChar ); - if ( charPos != KErrNotFound ) - { - //Move left - TInt length = charSet->Length(); - charPos = ( charPos + 1 + length ) % length; - SetCurrentCharL( charSet->Mid( charPos, 1 ) ); - } - } - // Handle choicelist event - else if ( aControl == iChoicelist && aEventType == EEventStateChanged ) - { - // Handle character range changing event - // Get the selected index - TInt index = iChoicelist->SelectedIndex(); - - // Set current character range by index in Engine - iEngine->SetCharacterRangeByIndexL( index ); - - // Get the current character range Id - TInt rangeId = iEngine->GetCurrentCharacterRange(); - - // Handle character range changed - HandleCharRangeChangedL( index, rangeId ); - } - } - -// --------------------------------------------------------------------------- -// From class MTruiHWRBoxObserver. -// Responds to changes to the size and position of the contents of control. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::SaveNewModelL() - { - TBuf similarMsg; - TRAPD( err, iEngine->SetCharacterModelL( iCurrentChar, - iHwrBox->Model(), - similarMsg ) ); - switch ( err ) - { - case KErrNone: - { - //Dim clear button and preview button - if ( iClearBtn ) - { - iClearBtn->SetDimmed( EFalse ); - iClearBtn->DrawNow(); - } - if ( iPreviewBtn ) - { - iPreviewBtn->SetDimmed( EFalse ); - iPreviewBtn->DrawNow(); - } - TPoint hwrPos = iHwrBox->PositionRelativeToScreen(); - HBufC* tooltipText = - iEikonEnv->AllocReadResourceLC( R_TRUI_TOOLTIP_SAVED ); - iHwrBox->ShowTooltipL( *tooltipText, - hwrPos + TPoint( iHwrBox->Size().iWidth, KHwrTooltipY ), - KTooltipShowDelay, KTooltipHideDelay ); - CleanupStack::PopAndDestroy( tooltipText ); - break; - } - case KErrAlreadyExists: - { - //Clear invalid model - ClearCurrentModel(); - - // Transfer some special gesture chars into displayable chars. - AdjustDisplayChars( similarMsg ); - - //Popup err message - HBufC* errMsg = iEikonEnv->AllocReadResourceLC( R_TRUI_NOTE_SIMILAR_MODEL ); - HBufC* tooltipText = HBufC::NewLC( errMsg->Length() + similarMsg.Length() - + KExtraSize ); - TPtr tooltipTextPtr = tooltipText->Des(); - tooltipTextPtr.Format( *errMsg, &similarMsg ); - PopupInformationNoteL( *tooltipText ); - CleanupStack::PopAndDestroy( tooltipText ); - CleanupStack::PopAndDestroy( errMsg ); - break; - } - default: - { - //Clear invalid model - ClearCurrentModel(); - //Popup err message - HBufC* tooltipText = iEikonEnv->AllocReadResourceLC( R_TRUI_NOTE_SAVE_FAILED ); - PopupInformationNoteL( *tooltipText ); - CleanupStack::PopAndDestroy( tooltipText ); - break; - } - } - }; - -// --------------------------------------------------------------------------- -// From class MTruiHWRBoxObserver. -// Handle the message event from the HWRBox -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::HandleEventL( TMessageType aMessage ) - { - if ( aMessage == EModelExist ) - { - HBufC* tooltipText = - iEikonEnv->AllocReadResourceLC( R_TRUI_NOTE_CLEAR_BOX ); - PopupInformationNoteL( *tooltipText ); - CleanupStack::PopAndDestroy( tooltipText ); - } - } - -// --------------------------------------------------------------------------- -// Handles language script changed. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::HandleLanguageScriptChangedL( TInt aScriptId ) - { - CTruiEngine* engine = iAppUi->HwrEngine(); - const RArray& languageScriptId = engine->SupportedLanguageScript(); - TInt index = languageScriptId.Find( aScriptId ); - if ( index != KErrNotFound ) - { - // Set the language script - engine->SetLanguageScriptByIndexL( aScriptId ); - - // Copy language script names array - CDesCArray* rangeNames = engine->GetCharacterRangeName(); - CDesCArray* itemsInChoiceList = new (ELeave) CDesCArrayFlat - ( rangeNames->Count() ); - CleanupStack::PushL( itemsInChoiceList ); - for ( TInt i = 0; i < rangeNames->Count(); i++ ) - { - itemsInChoiceList->AppendL( ( *rangeNames )[i] ); - } - - // Set the items in choicelist - iChoicelist->SetItems( itemsInChoiceList ); // Transfered ownership - CleanupStack::Pop( itemsInChoiceList ); - - // Set hwrbox's rect to engine and set guiding line to hwrbox - TBool isDisplayTopGuideLine = ( iEngine->CurrentLanguageScript() - == EMainViewSubmenuHebrew ) ? ETrue : EFalse; - - iHwrBox->SetDisplayTopGuideLine( isDisplayTopGuideLine ); - - // Get the ative character range's ID. - TInt rangeId = engine->GetCurrentCharacterRange(); - // Handle char range changed with index 0 - HandleCharRangeChangedL( 0, rangeId ); - } - } - -// --------------------------------------------------------------------------- -// Handles character range changed. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::HandleCharRangeChangedL( TInt aIndex, - TInt aRangeId ) - { - // Get the button's resourceID by char range's ID - TInt buttonResoureId = ButtonResourceId( aRangeId ); - // Create new button with the reourceID - // and add it to the AknChoiceList - if ( buttonResoureId ) - { - CAknButton* rangeButton = CreateButtonL( buttonResoureId, - this, NULL ); - iCurChoiceListBtn = rangeButton; - CleanupStack::PushL( rangeButton ); - iChoicelist->SetButtonL( rangeButton ); - CleanupStack::Pop( rangeButton ); - iChoicelist->DrawNow(); - } - // Set choiclist' selected item to index. - iChoicelist->SetSelectedIndex( aIndex ); - - // Refresh the active char with the first char in the character set - const HBufC* charSet = iEngine->CharacterSet(); - ASSERT( charSet ); - SetCurrentCharL( charSet->Mid( 0, 1 ) ); - } - -// --------------------------------------------------------------------------- -// Handles choosing an active char from SCT. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::HandleChooseCharEventL() - { - TInt rangeId = - iAppUi->HwrEngine()->GetCurrentCharacterRange(); - - // Get character set id by character range id - TInt characterSetId = SctCharacterSetId( rangeId ); - - // Popup SCT dialog - TBuf selectedStr; - TInt buttonId = PopupSctDialogL( EAknSCTLowerCase, - selectedStr, - characterSetId ); - if ( buttonId != 0 && selectedStr.Length() > 0 ) - { - SetCurrentCharL( selectedStr.Mid( 0, 1 ) ); - } - } - -// --------------------------------------------------------------------------- -// Check if clear button has been dimmed. -// --------------------------------------------------------------------------- -// -TBool CTruiMainViewContainer::IsButtonDimmed() - { - return iClearBtn ? iClearBtn->IsDimmed() : EFalse; - } - -// --------------------------------------------------------------------------- -// Check if all delete button has been dimmed. -// --------------------------------------------------------------------------- -// -TBool CTruiMainViewContainer::IsAllDelete() - { - const HBufC* charSet = iEngine->CharacterSet(); - for ( TInt i = 0; i < charSet->Length(); i++ ) - { - if ( iEngine->CheckCharacterModel( charSet->Mid( i, 1 ) ) ) - { - return EFalse; - } - } - return ETrue; - } - -// --------------------------------------------------------------------------- -// Return button's resourceId by Character Range Id. -// Use this resoueceId to create the correct button. -// --------------------------------------------------------------------------- -// -TInt CTruiMainViewContainer::ButtonResourceId( TInt aRangeId ) const - { - TInt resoureId; - switch ( aRangeId ) - { - case ELatinLowerLetters: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_LATIN_LOWER; - } - break; - case ELatinUpperLetters: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_LATIN_UPPER; - } - break; - case ELatinAccent: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_LATIN_ACCENT; - } - break; - case ELatinDigital: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_NUMERIC; - } - break; - case ELatinSymbol: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_SYMBOL; - } - break; - case ECyrillicLowerLetters: - { // - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_CYRILLIC_LOWER; - } - break; - case ECyrillicUpperLetters: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_CYRILLIC_UPPER; - } - break; - case ECyrillicAccent: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_CYRILLIC_ACCENT; - } - break; - case EGreekLowerLetters: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_GREEK_LOWER; - } - break; - case EGreekUpperLetters: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_GREEK_UPPER; - } - break; - case EHebrewLetters: - { - resoureId = R_MAINVIEW_BUTTON_CHARRANGE_HEBREW_LETTERS; - } - break; - default: - { - resoureId = 0; - } - } - return resoureId; - } - -// --------------------------------------------------------------------------- -// Pop Sct dialog. -// --------------------------------------------------------------------------- -// -TInt CTruiMainViewContainer::PopupSctDialogL( TInt aCharCase, - TDes& aSpecialChars, - TInt aCharSetResourceId ) - { - CAknCharMapDialog* sct = new (ELeave) CAknCharMapDialog( aCharCase, - aSpecialChars, - aCharSetResourceId ); - TInt keyboardMode = CurrentKeyBoardModeL(); - if ( keyboardMode ) - { - // QWERTY: Lock numeric keys. - sct->LockNumericKeys( ETrue ); - } - else - { - // ITU-T: Unlock numeric keys. - sct->LockNumericKeys( EFalse ); - } - - sct->DisableRecentCharsRow(); - TInt retValue = sct->ExecuteLD( R_TRUI_SCT_DIALOG ); - return retValue; - } - -// --------------------------------------------------------------------------- -// Set current trained char -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::SetCurrentCharL( const TPtrC& aChar ) - { - //If previous char's model is not saved, save it before setting new char. - if ( iHwrBox->BoxState() == CTruiHwrBox::ENewModelDraw ) - { - //Call save function from hwrbox, - //in order to stop periodics in the hwrbox - iHwrBox->SaveModelByManuallyL(); - } - // In case of new localization not check-in, temporary - if ( iCurrentChar != aChar ) - { - //Set current char - iCurrentChar = aChar; - //Set Top Label's text - HBufC* teachCharacter = NULL; - teachCharacter = StringLoader::LoadLC - ( R_TRUI_MAINVIEW_TEXT_TEACH_CHARACTER, aChar ); - if ( !iLabeltext ) - { - delete iLabeltext; - iLabeltext = NULL; - iLabeltext = HBufC::NewL( teachCharacter->Length() + KExtraSize ); - } - TPtr labelOldPtr = iLabeltext->Des(); - if ( labelOldPtr.MaxLength() < teachCharacter->Length() ) - { - iLabeltext = iLabeltext->ReAlloc( teachCharacter->Length() + KExtraSize ); - } - TPtr labelTextPtr = iLabeltext->Des(); - labelTextPtr.Copy( *teachCharacter ); - CleanupStack::PopAndDestroy( teachCharacter ); - - delete iWrappedLabelText; - iWrappedLabelText = NULL; - iWrappedLabelText = HBufC::NewL( iLabeltext->Length() - + iLineWidthArray.Count() - + KExtraSize ); - // Be ready to show label - const CFont* font = AknLayoutUtils::FontFromId( iMultilineLayout.FontId() ); - TRAPD( err, WrapLabelTextL( font, *iLabeltext, iLineWidthArray, iWrappedLabelText ) ); - if ( err == KErrNone ) - { - iLabel->SetTextL( *iWrappedLabelText ); - } - else - { - iLabel->SetTextL( *iLabeltext ); - } - AknLayoutUtils::LayoutLabel( iLabel, - iLabelPaneRect, - iMultilineLayout ); - TRgb labelColor = KRgbBlack; - if ( GetCachedLabelTextColor( labelColor ) == KErrNone ) - { - iLabel->OverrideColorL( EColorLabelText, labelColor ); - } - - //Set Indicator's text - const HBufC* charIndicator = iEikonEnv->AllocReadResourceL - ( R_TRUI_MAINVIEW_ACTIVE_CHAR_INDICATOR ); - TBuf indicatortext; - indicatortext.Format( *charIndicator, &aChar ); - delete charIndicator; - charIndicator = NULL; - iIindicator->SetTextL( indicatortext ); - } - - iHwrBox->ClearExistModel(); - //Load existing model and dim clear button - if ( iEngine->CheckCharacterModel( iCurrentChar ) ) - { - //Get model from engine - TRAPD( err, iEngine->GetCharacterModelL( iCurrentChar, iHwrBox->Model() ) ); - if ( err == KErrNone ) - { - iHwrBox->ModelIsReady(); - //Activate clear button and preview button - if ( iClearBtn ) - { - iClearBtn->SetDimmed( EFalse ); - iClearBtn->DrawNow(); - } - if ( iPreviewBtn ) - { - iPreviewBtn->SetDimmed( EFalse ); - iPreviewBtn->DrawNow(); - } - } - //Preview - iHwrBox->PlayAnimation( EFalse ); - } - else - { - iHwrBox->ModelIsReady( EFalse ); - if ( iClearBtn ) - { - //Dim clear button and preview button - iClearBtn->SetDimmed( ETrue ); - iClearBtn->DrawNow(); - } - if ( iPreviewBtn ) - { - iPreviewBtn->SetDimmed( ETrue ); - iPreviewBtn->DrawNow(); - } - } - } - -// --------------------------------------------------------------------------- -// Preview character model -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::PreviewCharacterModel() - { - if ( iEngine->CheckCharacterModel( iCurrentChar ) ) - { - iHwrBox->PlayAnimation( EFalse ); - } - } - -// --------------------------------------------------------------------------- -// Clear current model -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::ClearCurrentModel() - { - if ( iClearBtn ) - { - iClearBtn->SetDimmed( ETrue ); - iClearBtn->DrawNow(); - } - if ( iPreviewBtn ) - { - iPreviewBtn->SetDimmed( ETrue ); - iPreviewBtn->DrawNow(); - } - iHwrBox->ClearExistModel(); - } - -// --------------------------------------------------------------------------- -// Popup information note -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::PopupInformationNoteL( const TDesC& aText ) - { - CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue ); - note->ExecuteLD( aText ); - } -// --------------------------------------------------------------------------- -// Adjust special behavior characters to displayable characters. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::AdjustDisplayChars( TDes& aResult ) - { - if ( aResult.Length() > 0 && aResult.Length() <= 1 ) - { - switch ( aResult[0] ) - { - case EKeyEnter: - { - aResult.Replace( 0, 1, KDisplayEnter ); - break; - } - case EKeySpace: - { - aResult.Replace( 0, 1, KDisplaySpace ); - break; - } - case EKeyBackspace: - { - aResult.Replace( 0, 1, KDisplayBackspace ); - break; - } - } - } - } - -// --------------------------------------------------------------------------- -// Delete model of the shortcut -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::DeleteModelL() - { - // Delete shortcut from engine - if ( iEngine->DeleteCharacterModel( *iIindicator->Text() ) - == KErrNone ) - { - ClearCurrentModel(); - - // Pop tooltip - HBufC* tooltipText = - iEikonEnv->AllocReadResourceLC( R_TRUI_TOOLTIP_DELETED ); - TPoint hwrPos = iHwrBox->PositionRelativeToScreen(); - iHwrBox->ShowTooltipL( *tooltipText, - hwrPos + TPoint( iHwrBox->Size().iWidth, KHwrTooltipY ), - KTooltipShowDelay, KTooltipHideDelay ); - CleanupStack::PopAndDestroy( tooltipText ); - } - } - -// --------------------------------------------------------------------------- -// Delete all models of current character -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::DeleteAllModelL() - { - // Popup note dialog - CAknQueryDialog* dlg = CAknQueryDialog::NewL(); - if ( dlg->ExecuteLD( R_TRUI_QUERYDIALOG_DELETE_ALL_MODELS ) ) - { - // press yes - const HBufC* charSet = iEngine->CharacterSet(); - for ( TInt i = 0; i < charSet->Length(); i++ ) - { - if ( iEngine->CheckCharacterModel( charSet->Mid( i, 1 ) ) ) - { - if ( *iIindicator->Text() == charSet->Mid( i, 1 ) ) - { - DeleteModelL(); - } - else - { - iEngine->DeleteCharacterModel( charSet->Mid( i, 1 ) ); - } - } - } - } - } - -// --------------------------------------------------------------------------- -// Get character set Id, -// used to choose which characters will be displayed in SCT -// --------------------------------------------------------------------------- -// -TInt CTruiMainViewContainer::SctCharacterSetId( TInt aRangeId ) - { - TInt characterSetId; - switch ( aRangeId ) - { - case EMainViewSubmenuLatinLowerLetter: - { - characterSetId = R_TRUI_SCT_CHARSET_LATIN_LOWER; - break; - } - case EMainViewSubmenuCyrillicLowerLetters: - { - characterSetId = SctCyrillicLowerCharacterSetId - ( iEngine->InputLanguage() ); - break; - } - case EMainViewSubmenuGreekLowerLetters: - { - characterSetId = R_TRUI_SCT_CHARSET_GREEK_LOWER; - break; - } - case EMainViewSubmenuHebrewLetters: - { - characterSetId = R_TRUI_SCT_CHARSET_HEBREW_LETTERS; - break; - } - case EMainViewSubmenuLatinAccent: - { - characterSetId = R_TRUI_SCT_CHARSET_LATIN_ACCENT; - break; - } - case EMainViewSubmenuLatinUpperLetter: - { - characterSetId = R_TRUI_SCT_CHARSET_LATIN_UPPER; - break; - } - case EMainViewSubmenuCyrillicUpperLetters: - { - characterSetId = SctCyrillicUpperCharacterSetId - ( iEngine->InputLanguage() ); - break; - } - case EMainViewSubmenuCyrillicAccent: - { - characterSetId = R_TRUI_SCT_CHARSET_CYRILLIC_ACCENT; - break; - } - case EMainViewSubmenuGreekUpperLetters: - { - characterSetId = R_TRUI_SCT_CHARSET_GREEK_UPPER; - break; - } - case EMainViewSubmenuDigital: - { - characterSetId = R_TRUI_SCT_CHARSET_LATIN_NUMERIC; - break; - } - case EMainViewSubmenuSymbols: - { - if ( FeatureManager::FeatureSupported(KFeatureIdChinese) ) - { - characterSetId = R_TRUI_SCT_CHARSET_LATIN_SYMBOL_CHINESE; - } - else - { - characterSetId = R_TRUI_SCT_CHARSET_LATIN_SYMBOL; - } - break; - } - default: - { - characterSetId = 0; - } - } - return characterSetId; - } - -// --------------------------------------------------------------------------- -// Get cyrillic lower character set Id. -// --------------------------------------------------------------------------- -// -TInt CTruiMainViewContainer::SctCyrillicLowerCharacterSetId - ( TLanguage aInputLanguage ) - { - if ( aInputLanguage == ELangBulgarian ) - { - return R_TRUI_SCT_CHARSET_CYRILLIC_LOWER_BULGARIAN; - } - else if ( aInputLanguage == ELangRussian ) - { - return R_TRUI_SCT_CHARSET_CYRILLIC_LOWER_RUSSIAN; - } - else if ( aInputLanguage == ELangUkrainian ) - { - return R_TRUI_SCT_CHARSET_CYRILLIC_LOWER_UKRAINE; - } - else - { - return R_TRUI_SCT_CHARSET_CYRILLIC_LOWER; - } - } - -// --------------------------------------------------------------------------- -// Get cyrillic upper character set Id. -// --------------------------------------------------------------------------- -// -TInt CTruiMainViewContainer::SctCyrillicUpperCharacterSetId - ( TLanguage aInputLanguage ) - { - if ( aInputLanguage == ELangBulgarian ) - { - return R_TRUI_SCT_CHARSET_CYRILLIC_UPPER_BULGARIAN; - } - else if ( aInputLanguage == ELangRussian ) - { - return R_TRUI_SCT_CHARSET_CYRILLIC_UPPER_RUSSIAN; - } - else if ( aInputLanguage == ELangUkrainian ) - { - return R_TRUI_SCT_CHARSET_CYRILLIC_UPPER_UKRAINE; - } - else - { - return R_TRUI_SCT_CHARSET_CYRILLIC_UPPER; - } - } - -// --------------------------------------------------------------------------- -// Before exit, do some necessary operation -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::PrepareToExitL() - { - //If previous char's model is not saved, save it before exit. - if ( iHwrBox->BoxState() == CTruiHwrBox::ENewModelDraw ) - { - //Call save function from hwrbox, - //in order to stop periodics in the hwrbox - iHwrBox->SaveModelByManuallyL(); - } - iHwrBox->HideInfoPopupNote(); - } - -// --------------------------------------------------------------------------- -// This is called whenever the control gains or loses focus, -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::FocusChanged( TDrawNow /*aDrawNow*/ ) - { - if ( IsFocused() ) - { - if ( iHwrBox->BoxState() == CTruiHwrBox::EExistModelStop ) - { - iHwrBox->ResumePlaying(); - } - } - else - { - if ( iHwrBox->BoxState() == CTruiHwrBox::EExistModelDraw ) - { - iHwrBox->PausePlaying(); - } - } - iHwrBox->SetFocus( IsFocused() ); - } - -// --------------------------------------------------------------------------- -// Gets the control's help context. Returns a NULL context by default. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidtruiApp; - aContext.iContext = HWRT_HLP_MAIN_VIEW; - } - -// --------------------------------------------------------------------------- -// Handle size changed. -// --------------------------------------------------------------------------- -// -void CTruiMainViewContainer::DoSizeChanged( TInt aVarity ) - { - TRect rect = Rect(); - - TAknWindowComponentLayout main_pane_layout = - AknLayoutScalable_Apps::main_hwr_training_pane(); - TAknLayoutRect main_pane_layout_rect; - main_pane_layout_rect.LayoutRect( rect, main_pane_layout ); - TRect main_pane_rect = main_pane_layout_rect.Rect(); - - // Caculate hwr_training_navi_pane - TAknWindowComponentLayout navi_pane_layout = - AknLayoutScalable_Apps::hwr_training_navi_pane( aVarity ); - TAknLayoutRect navi_pane_layout_rect; - navi_pane_layout_rect.LayoutRect( main_pane_rect, navi_pane_layout ); - TRect navi_pane_rect = navi_pane_layout_rect.Rect(); - // Caculate navi pane contents - // hwr_training_navi_pane_g1 - TAknWindowComponentLayout navi_pane_g1_layout = - AknLayoutScalable_Apps::hwr_training_navi_pane_g1 - ( KVarityNaviPaneContents ); - TAknLayoutRect navi_pane_g1_layout_rect; - navi_pane_g1_layout_rect.LayoutRect( navi_pane_rect, navi_pane_g1_layout ); - TRect choicelistRect = navi_pane_g1_layout_rect.Rect(); - iChoicelist->SetRect( choicelistRect ); - - // hwr_training_navi_pane_g2 - // hwr_training_navi_pane_g3 - TAknWindowComponentLayout navi_pane_g3_layout = - AknLayoutScalable_Apps::hwr_training_navi_pane_g3 - ( KVarityNaviPaneContents ); - TAknLayoutRect navi_pane_g3_layout_rect; - navi_pane_g3_layout_rect.LayoutRect( navi_pane_rect, navi_pane_g3_layout ); - iLeftBtn->SetRect( navi_pane_g3_layout_rect.Rect() ); - // hwr_training_navi_pane_g4 - TAknWindowComponentLayout navi_pane_g4_layout = - AknLayoutScalable_Apps::hwr_training_navi_pane_g4 - ( KVarityNaviPaneContents ); - TAknLayoutRect navi_pane_g4_layout_rect; - navi_pane_g4_layout_rect.LayoutRect( navi_pane_rect, navi_pane_g4_layout ); - iRightBtn->SetRect( navi_pane_g4_layout_rect.Rect() ); - // hwr_training_navi_pane_g5 - TAknWindowComponentLayout navi_pane_g5_layout = - AknLayoutScalable_Apps::hwr_training_navi_pane_g5 - ( KVarityNaviPaneContents ); - TAknLayoutRect navi_pane_g5_layout_rect; - navi_pane_g5_layout_rect.LayoutRect( navi_pane_rect, navi_pane_g5_layout ); - TRect indicator_rect = navi_pane_g5_layout_rect.Rect(); - iIindicator->SetRect( indicator_rect ); - // hwr_training_navi_pane_t1 - TAknTextComponentLayout nave_pane_t1_layout = - AknLayoutScalable_Apps::hwr_training_navi_pane_t1 - ( KVarityNaviPaneContents ); - TAknLayoutText navi_pane_t1_layout_text; - navi_pane_t1_layout_text.LayoutText( indicator_rect, nave_pane_t1_layout ); - iIindicator->SetFont( navi_pane_t1_layout_text.Font() ); - iIindicator->SetLabelAlignment( navi_pane_t1_layout_text.Align() ); - - // hwr_training_write_pane - TAknWindowComponentLayout write_pane_layout = - AknLayoutScalable_Apps::hwr_training_write_pane( aVarity ); - TAknLayoutRect write_pane_layout_rect; - write_pane_layout_rect.LayoutRect( main_pane_rect, write_pane_layout ); - iHwrBox->SetRect( write_pane_layout_rect.Rect() ); - - TPoint hwrPos = iHwrBox->PositionRelativeToScreen(); - iHwrBox->SetTooltipPosition( hwrPos + TPoint( iHwrBox->Size().iWidth, KHwrTooltipY ) ); - - // hwr_training_instruct_pane - TAknWindowComponentLayout instruct_pane_layout = - AknLayoutScalable_Apps::hwr_training_instruct_pane( aVarity ); - TAknLayoutRect instruct_pane_layout_rect; - instruct_pane_layout_rect.LayoutRect( main_pane_rect, instruct_pane_layout ); - iLabelPaneRect = instruct_pane_layout_rect.Rect(); - - // count of text rows - TInt count = AknLayoutScalable_Apps:: - list_single_hwr_training_instruct_pane_ParamLimits().LastRow() + 1; - - // array contains all text rows in help screen - RArray textLayoutArray; - iLineWidthArray.Reset(); - for( TInt i = 0; i < count; i++ ) - { - // pane area for each row - TAknWindowComponentLayout each_row_layout = - AknLayoutScalable_Apps::list_single_hwr_training_instruct_pane( 0, 0, i ); - TAknLayoutRect each_row_layout_rect; - each_row_layout_rect.LayoutRect( iLabelPaneRect, - each_row_layout ); - iLineWidthArray.Append( each_row_layout_rect.Rect().Width() ); - // smaller pane for text itself - TAknTextComponentLayout each_row_text_layout = - AknLayoutScalable_Apps::list_single_hwr_training_instruct_pane_t1(); - - // composition of two latter componets - TAknTextComponentLayout textCompCompositionWiz = - TAknWindowComponentLayout::ComposeText( - each_row_layout, each_row_text_layout ); - - TRAPD(error, textLayoutArray.AppendL( textCompCompositionWiz ) ); - // if error in append function, then just exit the loop - if ( error != KErrNone ) - { - - break; - } - } - - iMultilineLayout = TAknTextComponentLayout::Multiline( textLayoutArray ); - if ( iLabeltext && iWrappedLabelText ) - { - // Be ready to show label - TAknLayoutText multilineTextLayout; - multilineTextLayout.LayoutText( iLabelPaneRect, iMultilineLayout ); - const CFont* font = AknLayoutUtils::FontFromId( iMultilineLayout.FontId() ); - TRAPD( err, WrapLabelTextL( font, *iLabeltext, iLineWidthArray, iWrappedLabelText ) ); - if ( err == KErrNone ) - { - TRAP_IGNORE( iLabel->SetTextL( *iWrappedLabelText ) ); - } - else - { - TRAP_IGNORE( iLabel->SetTextL( *iLabeltext ) ); - } - AknLayoutUtils::LayoutLabel( iLabel, - iLabelPaneRect, - iMultilineLayout ); - } - textLayoutArray.Close(); - - TRgb labelColor = KRgbBlack; - TInt error = GetCachedLabelTextColor( labelColor ); - if ( error == KErrNone ) - { - TRAP_IGNORE( iLabel->OverrideColorL( EColorLabelText, labelColor ) ); - TRAP_IGNORE( iIindicator->OverrideColorL( EColorLabelText, labelColor ) ); - } - } - -void CTruiMainViewContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent) - { - if ( iHwrBox->BoxState() == CTruiHwrBox::ENewModelDraw ) - { - //Call save function from hwrbox, - //in order to stop periodics in the hwrbox - iHwrBox->HandlePointerEventL( aPointerEvent ); - } - else - { - CCoeControl::HandlePointerEventL( aPointerEvent ); - } - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truishortcuteditcontainer.cpp --- a/textinput/peninputhwrtrui/src/truishortcuteditcontainer.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1235 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutEditContainer -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "truicontainerbase.h" -#include "truishortcuteditcontainer.h" -#include "truihwrbox.h" -#include "truiengine.h" -#include "truiappui.h" -#include "truishortcutsview.h" -#include "truiapplication.h" -#include "truiappradiobutton.h" -#include "truishortcutsview.h" -#include "truiapplication.h" -#include "truishortcutedittextview.h" -#include "trui.hrh" -#include "truishortcuteditview.h" - -const TInt KSimilarMsgLength = 160; - -// The maximum number of lines for tips -const TInt KIndicatorBufSize = 2; - -// The index of each item in radio button groups -const TInt KOwnIndex = 0; -const TInt KPresetIndex = 1; - -// Layout for portrait -const TPoint KLabelTipPosPortrait = TPoint( 0, 0 ); -const TSize KLabelTipSizePortrait = TSize( 360, 60 ); -const TPoint KRadioPosPortrait = TPoint( 5, 73 ); -const TSize KRadioSizePortrait = TSize( 196, 99 ); -const TPoint KLeftBtnPosPotrait = TPoint( 115, 160 ); -const TPoint KIndicatorPosPotrait = TPoint( 165, 160 ); -const TPoint KRightBtnPosPotrait = TPoint( 215, 160 ); -const TPoint KHwrBoxPosPortrait = TPoint( 90, 215 ); - -const TSize KButtonSize = TSize( 50, 50 ); - -// Layout for landscape -const TPoint KRadioPosLandscape = TPoint( 5, 18 ); -const TPoint KLabelTipPosLandscape = TPoint( 5, 120 ); -const TSize KLabelTipSizeLandscape = TSize( 250, 120 ); - -const TPoint KLeftBtnPos = TPoint( 300, 15 ); - -const TPoint KRightBtnPos = TPoint( 400, 15 ); -const TPoint KIndicatorPosLandscape = TPoint( 350, 15 ); -const TSize KHwrBoxSizeLandscape = TSize( 200, 200 ); -const TPoint KHwrBoxPosLandscape = TPoint( 275, 80 ); - -const TInt KTooltipPopupTimeOut = 0; -const TInt KTooltipStayTimeOut = 3000; - -const TInt KSctBufferSize = 32; -const TInt KHwrTooltipY = 20; - -_LIT( KActiveCharFormat, "%c" ); - -// Varity of landscape for common components -const TInt KVarityLandscape = 3; - -// Varity of portrait for common components -const TInt KVarityPortrait = 2; - -const TInt KVarityListPane = 1; - -// ======== MEMBER FUNCTIONS ======== - -CTruiShortcutEditContainer::CTruiShortcutEditContainer() - { - iActiveCharPos = KErrNotFound; - } - -void CTruiShortcutEditContainer::ConstructL( const TRect& aRect ) - { - // Initialize control array - InitComponentArrayL(); - - // Set parent control or owning window - CreateWindowL(); - - iBackGround = CAknsBasicBackgroundControlContext::NewL - ( KAknsIIDQsnBgAreaMain, Rect(), EFalse); - - // Initialize controls - InitializeControlsL(); - -#ifdef TRAININGUI_FOR_PRESET - // Get all presets from Engine - HBufC* presetHBuf = iEikonEnv->AllocReadResourceLC( R_TRUI_PRESET_SYMBOLS ); - for ( TInt i = 0; i < presetHBuf->Length(); i++ ) - { - iPresets.Append( ( *presetHBuf )[i] ); - } - CleanupStack::PopAndDestroy( presetHBuf ); -#endif - - // Load setting data - CTruiShortcutEditView* view = static_cast - ( iAppUi->View( KTruiShortcutEditViewId ) ); - - if ( view->PreviousViewId() == TVwsViewId( KUidtruiApp, KTruiShortcutsViewId ) ) - { - // Edit old shortcut - iEngine->GetShortcutModelL( iEngine->Shortcut(), - iHwrBox->Model(), - iUnicode ); - // Backup shortcut model - BackupShortcutModel( iHwrBox->Model(), iUnicode ); - // Load the current active char whether is own or preset. - iShortcutType = iUnicode ? KPresetIndex : KOwnIndex; - iIsEmptyHwrBox = iUnicode ? ETrue : EFalse; -#ifdef TRAININGUI_FOR_PRESET - if ( iUnicode ) - { - // Edit preset shortcut - iActiveCharPos = iPresets.Find( iUnicode ); - } - else - { - // Edit own shortcut, get the first available preset shortcut - if ( FindFirstAvailableCharL( 0, iPresets.Count() - 1, 1, iUnicode ) ) - { - iActiveCharPos = iPresets.Find( iUnicode ); - } - else - { - iActiveCharPos = KErrNotFound; - } - } -#endif - } - else - { - // Create new shortcut - // Load the current active char whether is own or preset. - iShortcutType = KOwnIndex; - iIsEmptyHwrBox = ETrue; -#ifdef TRAININGUI_FOR_PRESET - if ( FindFirstAvailableCharL( 0, iPresets.Count() - 1, 1, iUnicode ) ) - { - iActiveCharPos = iPresets.Find( iUnicode ); - } - else - { - iActiveCharPos = KErrNotFound; - } -#endif - } - - // Set radio button - iRadioButtonContainer->HandlePointerRadioButtonL( iShortcutType, - EEventRequestFocus ); - SetRect( aRect ); - - ActivateL(); - } - -CTruiShortcutEditContainer* CTruiShortcutEditContainer::NewL( const TRect& aRect ) - { - CTruiShortcutEditContainer* self = CTruiShortcutEditContainer::NewLC( aRect ); - CleanupStack::Pop( self ); - return self; - } - -CTruiShortcutEditContainer* CTruiShortcutEditContainer::NewLC( const TRect& aRect ) - { - CTruiShortcutEditContainer* self = new (ELeave) CTruiShortcutEditContainer(); - CleanupStack::PushL( self ); - self->ConstructL( aRect ); - return self; - } - -CTruiShortcutEditContainer::~CTruiShortcutEditContainer() - { - delete iBackGround; - delete iLabeltext; - delete iWrappedLabelText; - iModelBak.Close(); - iPresets.Close(); - iLineWidthArray.Close(); - } - -// --------------------------------------------------------------------------- -// Create controls to be displayed in this container. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::InitializeControlsL() - { - // Create fixed toolbar - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutEditViewId )->Toolbar(); - // Get Clear button from toolbar - CAknButton* clearButton = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewDelete ) ); - - CreateRadioButtonL(); - - CcnstructButtonL(); - - CreateLabelL(); - - CreateHwrBoxL(); - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Responds to changes to the size and position of the contents of this control. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SizeChanged() - { - TInt varity = Layout_Meta_Data::IsLandscapeOrientation() ? KVarityLandscape - : KVarityPortrait; - DoSizeChanged( varity ); - // Set hwrbox's rect to engine and set guiding line to hwrbox - iHwrBox->SetDisplayBottomGuideLine( ETrue ); - TBool isDisplayTopGuideLine = ( iEngine->CurrentLanguageScript() - == EMainViewSubmenuHebrew ) ? ETrue : EFalse; - - iHwrBox->SetDisplayTopGuideLine( isDisplayTopGuideLine ); - - if ( varity == KVarityLandscape ) - { - DoLayoutLandscape(); - } - else if ( varity == KVarityPortrait ) - { - DoLayoutPortait(); - } - if ( iBackGround ) - { - iBackGround->SetRect( Rect() ); - } - } - -// --------------------------------------------------------------------------- -// Layout under landscape condition. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::DoLayoutLandscape() - { -#ifdef TRAININGUI_FOR_PRESET - iRadioButtonContainer->SetRect( TRect( KRadioPosLandscape, - KRadioSizePortrait ) ); - iLeftBtn->SetRect( TRect( KLeftBtnPos, KButtonSize ) ); - iRightBtn->SetRect( TRect( KRightBtnPos, KButtonSize ) ); - iIndicator->SetRect( TRect( KIndicatorPosLandscape, KButtonSize ) ); -#endif - } - -// --------------------------------------------------------------------------- -// Layout under portait condition. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::DoLayoutPortait() - { -#ifdef TRAININGUI_FOR_PRESET - iRadioButtonContainer->SetRect( TRect( KRadioPosPortrait, - KRadioSizePortrait ) ); - iLeftBtn->SetRect( TRect( KLeftBtnPosPotrait, KButtonSize ) ); - iRightBtn->SetRect( TRect( KRightBtnPosPotrait, KButtonSize ) ); - iIndicator->SetRect( TRect( KIndicatorPosPotrait, KButtonSize ) ); -#endif - } - -// --------------------------------------------------------------------------- -// Save own shortcut. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SaveOwnShortcutL( const TDesC& aShortcut, - RArray& aModel, - TDes& aErrMsg ) - { - // Ensure the shortcut doesn't exist. - if ( iEngine->CheckShortcutModel( aShortcut ) ) - { - iEngine->DeleteShortcut( aShortcut ); - } - if ( aModel.Count() ) - { - iEngine->SaveShortcutL( aShortcut, aModel, aErrMsg ); - } - } - -// --------------------------------------------------------------------------- -// Save preset shortcut. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SavePresetShortcutL( const TDesC& aShortcut, - TUint aUnicode ) - { - // Ensure the shortcut doesn't exist. - if ( iEngine->CheckShortcutModel( aShortcut ) ) - { - iEngine->DeleteShortcut( aShortcut ); - } - // Check if aUnicode is in use. - RArray presetModel; - CleanupClosePushL( presetModel ); - TBuf msg; - iEngine->GetPresetSymbolByUnicodeL( aUnicode, presetModel, msg ); - if ( msg.Length() > 0 ) - { - // In use, being assigned to some shortcut. - User::Leave( KErrInUse ); - } - CleanupStack::PopAndDestroy( &presetModel ); - iEngine->SavePresetShortcutL( aUnicode, aShortcut ); - } - -// --------------------------------------------------------------------------- -// Backup shortcut model. It is probably to be restored when press Back to exit. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::BackupShortcutModel - ( const RArray& aOriginalModel, - TUint aOriginalUnicode ) - { - iUnicodeBak = aOriginalUnicode; - if ( !iUnicodeBak ) - { - // If old shortcut is own, it is necessary to store trails. - // If it is preset, backup is unecessary - for ( TInt i = 0; i < aOriginalModel.Count(); i++ ) - { - iModelBak.Append( aOriginalModel[i] ); - } - } - } - -// --------------------------------------------------------------------------- -// Set active char. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SetActiveCharL( TUint aUnicode ) - { - // Set active indicator - TBuf preset; - - // Preset symbol - preset.Format( KActiveCharFormat, aUnicode ); - iIndicator->SetTextL( preset ); - iIndicator->DrawNow(); - // Clear hwrbox and stop playing animation - iHwrBox->ClearExistModel(); - // Get model - TBuf similarMsg; - iEngine->GetPresetSymbolByUnicodeL( aUnicode, iHwrBox->Model(), - similarMsg ); - // Play animation in HwrBox - iHwrBox->ModelIsReady( ETrue ); - if ( iShortcutType == KPresetIndex ) - { - // As for preset, need to scale trails size firstly - iHwrBox->PlayAnimation( ETrue, CTruiContainerBase::OriginSymbolSize() ); - } - else - { - iHwrBox->PlayAnimation(); - } - } - -// --------------------------------------------------------------------------- -// Find the first available preset symbol. -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutEditContainer::FindFirstAvailableCharL( TInt aStartPos, - TInt aEndPos, - TInt aDirection, - TUint& aUnicode ) - { - while ( aStartPos != aEndPos && aStartPos < iPresets.Count() ) - { - if ( !CheckPresetSymbolInUseL( iPresets[aStartPos] ) ) - { - aUnicode = iPresets[aStartPos]; - return ETrue; - } - else - { - // In use - if ( iUnicodeBak == iPresets[aStartPos] ) - { - // But the preset symbol is the old preset - // which users are editting, - // Still display the symbol in indicator - aUnicode = iPresets[aStartPos]; - return ETrue; - } - } - if ( aDirection ) - { - // Go right - aStartPos = ( ++aStartPos + iPresets.Count() ) % iPresets.Count(); - } - else - { - // Go left - aStartPos = ( --aStartPos + iPresets.Count() ) % iPresets.Count(); - } - } - if ( aEndPos < iPresets.Count() && !CheckPresetSymbolInUseL( iPresets[aEndPos] ) ) - { - aUnicode = iPresets[aEndPos]; - return ETrue; - } - return EFalse; - } - -// --------------------------------------------------------------------------- -// Return if the preset is in use. -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutEditContainer::CheckPresetSymbolInUseL( TUint aUnicode ) - { - // Check if iUnicode is in use - RArray presetModels; - CleanupClosePushL( presetModels ); - TBuf similarMsg; - iEngine->GetPresetSymbolByUnicodeL( aUnicode, - presetModels, - similarMsg ); - CleanupStack::PopAndDestroy( &presetModels ); - if ( similarMsg.Length() ) - { - return ETrue; - } - return EFalse; - } - -// --------------------------------------------------------------------------- -// Do something to response to size changed. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::DoSizeChanged( TInt aVarity ) - { - TRect rect = Rect(); - - TAknWindowComponentLayout main_pane_layout = - AknLayoutScalable_Apps::main_hwr_training_pane(); - TAknLayoutRect main_pane_layout_rect; - main_pane_layout_rect.LayoutRect( rect, main_pane_layout ); - TRect main_pane_rect = main_pane_layout_rect.Rect(); - - // hwr_training_write_pane - TAknWindowComponentLayout write_pane_layout = - AknLayoutScalable_Apps::hwr_training_write_pane( aVarity ); - TAknLayoutRect write_pane_layout_rect; - write_pane_layout_rect.LayoutRect( main_pane_rect, write_pane_layout ); - iHwrBox->SetRect( write_pane_layout_rect.Rect() ); - - TPoint hwrPos = iHwrBox->PositionRelativeToScreen(); - iHwrBox->SetTooltipPosition( hwrPos + TPoint( iHwrBox->Size().iWidth, KHwrTooltipY ) ); - - // hwr_training_instruct_pane - TAknWindowComponentLayout instruct_pane_layout = - AknLayoutScalable_Apps::hwr_training_instruct_pane( aVarity ); - TAknLayoutRect instruct_pane_layout_rect; - instruct_pane_layout_rect.LayoutRect( main_pane_rect, instruct_pane_layout ); - // count of text rows - TInt count = AknLayoutScalable_Apps:: - list_single_hwr_training_instruct_pane_ParamLimits( KVarityListPane ) - .LastRow() + 1; - - // array contains all text rows in help screen - RArray textLayoutArray; - iLineWidthArray.Reset(); - for( TInt i = 0; i < count; i++ ) - { - // pane area for each row - TAknWindowComponentLayout each_row_layout = - AknLayoutScalable_Apps::list_single_hwr_training_instruct_pane - ( KVarityListPane, 0, i ); - TAknLayoutRect each_row_layout_rect; - each_row_layout_rect.LayoutRect( instruct_pane_layout_rect.Rect(), - each_row_layout ); - iLineWidthArray.Append( each_row_layout_rect.Rect().Width() ); - // smaller pane for text itself - TAknTextComponentLayout each_row_text_layout = - AknLayoutScalable_Apps::list_single_hwr_training_instruct_pane_t1(); - - // composition of two latter componets - TAknTextComponentLayout textCompCompositionWiz = - TAknWindowComponentLayout::ComposeText( - each_row_layout, each_row_text_layout ); - - TRAPD(error, textLayoutArray.AppendL( textCompCompositionWiz ) ); - // if error in append function, then just exit the loop - if ( error != KErrNone ) - { - break; - } - } - iMultilineLayout = TAknTextComponentLayout::Multiline( textLayoutArray ); - if ( iLabeltext && iWrappedLabelText ) - { - // Be ready to show label - TAknLayoutText multilineTextLayout; - multilineTextLayout.LayoutText( instruct_pane_layout_rect.Rect(), iMultilineLayout ); - const CFont* font = AknLayoutUtils::FontFromId( iMultilineLayout.FontId() ); - TRAPD( err, WrapLabelTextL( font, *iLabeltext, iLineWidthArray, iWrappedLabelText ) ); - if ( err == KErrNone ) - { - TRAP_IGNORE( iLabelTip->SetTextL( *iWrappedLabelText ) ); - } - else - { - TRAP_IGNORE( iLabelTip->SetTextL( *iLabeltext ) ); - } - AknLayoutUtils::LayoutLabel( iLabelTip, - instruct_pane_layout_rect.Rect(), - iMultilineLayout ); - } - textLayoutArray.Close(); - - TRgb labelColor = KRgbBlack; - TInt error = GetCachedLabelTextColor( labelColor ); - if ( error == KErrNone ) - { - TRAP_IGNORE( iLabelTip->OverrideColorL( EColorLabelText, labelColor ) ); - TRAP_IGNORE( iIndicator->OverrideColorL( EColorLabelText, labelColor ) ); - } - } - -// --------------------------------------------------------------------------- -// Create radio button. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::CreateRadioButtonL() - { - iRadioButtonContainer = CTruiRadioButton::NewL( this, - CTruiRadioButton::ERadioButton, - this ); - Components().AppendLC( iRadioButtonContainer ); - CleanupStack::Pop( iRadioButtonContainer ); - - HBufC* radioTextOwn = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITMODELVIEW_RADIOBUTTON_OWN ); - iRadioButtonContainer->AddItem( radioTextOwn, CTruiRadioButton::ENonSelected ); - CleanupStack::Pop( radioTextOwn ); // transfered ownership - HBufC* radioTextPreset = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITMODELVIEW_RADIOBUTTON_PRESET ); - iRadioButtonContainer->AddItem( radioTextPreset, CTruiRadioButton::ENonSelected ); - CleanupStack::Pop( radioTextPreset ); // transfered ownership - iRadioButtonContainer->HandleItemAdditionL(); - } - -// --------------------------------------------------------------------------- -// Create HWR box to write and play model -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::CreateHwrBoxL() - { - CTruiHwrBox* hwrBox = CTruiHwrBox::NewL( this, this, iBackGround ); - hwrBox->SetHwrBoxFlag( CTruiHwrBox::EFrameHwrBox ); - Components().AppendLC( hwrBox ); - hwrBox->ActivateL(); - CleanupStack::Pop( hwrBox ); - iHwrBox = hwrBox; - } - -// --------------------------------------------------------------------------- -// Create buttons. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::CcnstructButtonL() - { - // Left button for last character - CAknButton* preButton = CreateButtonL( R_MAINVIEW_BUTTON_LEFT, - this, - this ); - Components().AppendLC( preButton ); - CleanupStack::Pop( preButton ); - iLeftBtn = preButton; - - // Right button for next character - CAknButton* nextButton = CreateButtonL( R_MAINVIEW_BUTTON_RIGHT, - this, - this ); - Components().AppendLC( nextButton ); - CleanupStack::Pop( nextButton ); - iRightBtn = nextButton; - } - -// --------------------------------------------------------------------------- -// Create buttons. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::CreateLabelL() - { - //Create label tip - CEikLabel* tipLabel = new (ELeave) CEikLabel(); - CleanupStack::PushL( tipLabel ); - tipLabel->SetContainerWindowL( *this ); - tipLabel->SetTextL( KNullDesC ); - tipLabel->ActivateL(); - CleanupStack::Pop( tipLabel ); - Components().AppendLC( tipLabel ); - CleanupStack::Pop( tipLabel ); - iLabelTip = tipLabel; - - // Create active character indicator - CEikLabel* aknLabel = new (ELeave) CEikLabel(); - CleanupStack::PushL( aknLabel ); - aknLabel->SetContainerWindowL( *this ); - aknLabel->SetObserver( this ); - aknLabel->SetAlignment( - TGulAlignmentValue ( EEikLabelAlignHCenter|EEikLabelAlignVCenter ) ); - aknLabel->SetTextL( KNullDesC ); - aknLabel->ActivateL(); - CleanupStack::Pop( aknLabel ); - Components().AppendLC( aknLabel ); - CleanupStack::Pop( aknLabel ); - iIndicator = aknLabel; - iIndicator->SetObserver( this ); - } - -// --------------------------------------------------------------------------- -// Draw. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::Draw( const TRect& /*aRect*/ ) const - { - // Get the standard graphics context - CWindowGc& gc = SystemGc(); - // Gets the control's extent - TRect rect( Rect()); - // Clears the screen - gc.Clear( rect ); - - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - if ( AknsDrawUtils::HasBitmapBackground( skin, iBackGround ) ) - { - AknsDrawUtils::Background( skin, iBackGround, gc, rect ); - } - } - -// --------------------------------------------------------------------------- -// Switch to shortcuts view. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SwitchToShortcutViewL() - { - // Update shortcut list - iEngine->UpdateShortcutListL(); - // Find the current shortcut's index in shortcut list - CDesCArray* shortcutList = iEngine->ShortcutTextList(); - TInt index = DefaultSelectedIndex( shortcutList, iEngine->Shortcut() ); - if ( index == KErrNotFound ) - { - TInt oldIndex = iEngine->CurrentSelectedIndex(); - if ( shortcutList ) - { - index = ( oldIndex > shortcutList->Count() ) - ? shortcutList->Count() : oldIndex; - } - else - { - index = 0; - } - } - - // Set current index in Engine - iEngine->SetCurrentSelectedIndex( index ); - - // Close tooltip - iHwrBox->HideInfoPopupNote(); - - iAppUi->ActivateLocalViewL( KTruiShortcutsViewId ); - // Show NaviDecorator - iAppUi->ShowNaviPaneL(); - } - -// --------------------------------------------------------------------------- -// Go back to previous view -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::BackToPreviousViewL() - { - if ( iIsRestored ) - { - // Check if restore the old shortcut - if ( iUnicodeBak ) - { - // Old shortcut is preset, restore it. - SavePresetShortcutL( iEngine->Shortcut(), iUnicodeBak ); - } - else - { - // Old shortcut is own, restore it. - // Or create new shortcut - TBuf similarMsg; - SaveOwnShortcutL( iEngine->Shortcut(), iModelBak, similarMsg ); - } - } - - // Close tooltip - iHwrBox->HideInfoPopupNote(); - - // Show NaviDecorator - CTruiShortcutEditView* view = static_cast - ( iAppUi->View( KTruiShortcutEditViewId ) ); - iAppUi->ActivateLocalViewL( view->PreviousViewId().iViewUid ); - - if ( view->PreviousViewId() == TVwsViewId( KUidtruiApp, KTruiShortcutsViewId ) ) - { - iAppUi->ShowNaviPaneL(); - } - } - -// --------------------------------------------------------------------------- -// Handles an event from an observed control. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::HandleControlEventL( CCoeControl* aControl, - TCoeEvent aEventType ) - { - if ( aControl == iLeftBtn && aEventType == EEventStateChanged ) - { - if ( iActiveCharPos != KErrNotFound ) - { - // Edit an old preset - // Find first available preset, otherwise, show error note all in use - // Create a new preset shortcut but at least one is available - // Find first available preset, otherwise, nothing to do - TInt startPos = ( iActiveCharPos - 1 + iPresets.Count() ) - % iPresets.Count(); - TInt endPos = ( iActiveCharPos + 1 + iPresets.Count() ) - % iPresets.Count(); - if ( FindFirstAvailableCharL( startPos, endPos, 0, iUnicode ) ) - { - iActiveCharPos = iPresets.Find( iUnicode ); - SetActiveCharL( iUnicode ); - } - else if ( !iEngine->NewShortcut() ) - { - // if Create a new preset shortcut but at least one is available - // nothing to do - // show error note : all in use - PopupTooltipL( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_ALL_IN_USE ); - } - } - else - { - // Create a new preset, but all in use - // Show error note - PopupTooltipL( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_ALL_IN_USE ); - } - } - else if ( aControl == iRightBtn && aEventType == EEventStateChanged ) - { - if ( iActiveCharPos != KErrNotFound ) - { - // Edit an old preset - // Find first available preset, otherwise, show error note all in use - // Create a new preset shortcut but at least one is available - // Find first available preset, otherwise, nothing to do - TInt startPos = ( iActiveCharPos + 1 + iPresets.Count() ) - % iPresets.Count(); - TInt endPos = ( iActiveCharPos - 1 + iPresets.Count() ) - % iPresets.Count(); - if ( FindFirstAvailableCharL( startPos, endPos, 1, iUnicode ) ) - { - iActiveCharPos = iPresets.Find( iUnicode ); - SetActiveCharL( iUnicode ); - } - else if ( !iEngine->NewShortcut() ) - { - // show error note : all in use - PopupTooltipL( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_ALL_IN_USE ); - } - } - else - { - // Create a new preset, but all in use - // Show error note - PopupTooltipL( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_ALL_IN_USE ); - } - } - else if ( iShortcutType == KPresetIndex && aControl == iIndicator - && aEventType == EEventRequestFocus ) - { - PreviewShortcutModel(); - } - } - -// --------------------------------------------------------------------------- -// From class MTruiHWRBoxObserver. -// Handle the save model event -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SaveNewModelL() - { - // Carry out saving new model - if ( iShortcutType == KOwnIndex ) - { - iIsRestored = ETrue; - - // If shortcut is own, it will save new model - TBuf similarMsg; - TRAPD( err, SaveOwnShortcutL( iEngine->Shortcut(), - iHwrBox->Model(), - similarMsg ) ); - switch ( err ) - { - case KErrNone: - { - iIsEmptyHwrBox = EFalse; - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutEditViewId ) - ->Toolbar(); - CAknButton* clearBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewDelete ) ); - clearBtn->SetDimmed( EFalse ); - clearBtn->DrawNow(); - CAknButton* previewBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewPreviewModel ) ); - previewBtn->SetDimmed( EFalse ); - previewBtn->DrawNow(); - - TPoint hwrPos = iHwrBox->PositionRelativeToScreen(); - HBufC* tooltipText = - iEikonEnv->AllocReadResourceLC( R_TRUI_TOOLTIP_SAVED ); - iHwrBox->ShowTooltipL( *tooltipText, - hwrPos + TPoint( iHwrBox->Size().iWidth, KHwrTooltipY ), - KTooltipPopupTimeOut, - KTooltipStayTimeOut ); - CleanupStack::PopAndDestroy( tooltipText ); - break; - } - case KErrAlreadyExists: - { - //Clear invalid model - ClearCurrentModelL(); - - //Popup err message - PopupTooltipL( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_IN_USE ); - break; - } - - } - } - } - -// --------------------------------------------------------------------------- -// From class MTruiHWRBoxObserver. -// Handle the message event from the HWRBox -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::HandleEventL( TMessageType aMessage ) - { - if ( aMessage == EModelExist ) - { - PopupTooltipL( R_TRUI_NOTE_CLEAR_BOX ); - } - } - -// --------------------------------------------------------------------------- -// From class MTruiHWRBoxObserver. -// Notify that which radio button is selected. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::SelectChangedL( TInt aIndex ) - { - // Change the text below radio buttons - TInt tipResource = aIndex ? R_TRUI_SHORTCUTEDITVIEW_PRESET_SYMBOL - : R_TRUI_SHORTCUTEDITVIEW_OWN_SYMBOL; - delete iLabeltext; - iLabeltext = NULL; - iLabeltext = iEikonEnv->AllocReadResourceL( tipResource ); - delete iWrappedLabelText; - iWrappedLabelText = NULL; - // count of text rows - TInt lines = AknLayoutScalable_Apps:: - list_single_hwr_training_instruct_pane_ParamLimits( KVarityListPane ) - .LastRow() + 1; - iWrappedLabelText = HBufC::NewL( iLabeltext->Length() + lines - + KExtraSize ); - // Be ready to show label - const CFont* font = AknLayoutUtils::FontFromId( iMultilineLayout.FontId() ); - TRAPD( err, WrapLabelTextL( font, *iLabeltext, iLineWidthArray, iWrappedLabelText ) ); - if ( err == KErrNone ) - { - iLabelTip->SetTextL( *iWrappedLabelText ); - } - else - { - iLabelTip->SetTextL( *iLabeltext ); - } - // Get Clear button from toolbar - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutEditViewId )->Toolbar(); - CAknButton* clearBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewDelete ) ); - CAknButton* gridBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewGrid ) ); - // Dim left and right buttons when selecting "own symbol" - TBool btnDimmed = aIndex ? EFalse : ETrue; - iLeftBtn->SetDimmed( btnDimmed ); - iLeftBtn->DrawNow(); - iRightBtn->SetDimmed( btnDimmed ); - iRightBtn->DrawNow(); - - // Set grid button status - gridBtn->SetDimmed( btnDimmed ); - gridBtn->DrawNow(); - - // Set active indicator - TBuf preset; - if ( aIndex && iUnicode ) - { - // Preset symbol - preset.Format( KActiveCharFormat, iUnicode ); - } - else - { - // Own - preset.Copy( KNullDesC ); - } - iIndicator->SetTextL( preset ); - iIndicator->DrawNow(); - - // Update current shortcut type - iShortcutType = aIndex; - - // Clear hwrbox and stop playing animation - iHwrBox->ClearExistModel(); - - if ( iShortcutType == KPresetIndex ) - { - // If preset shortcut, get trail points. - TBuf similarMsg; - iEngine->GetPresetSymbolByUnicodeL( iUnicode, - iHwrBox->Model(), similarMsg ); - iHwrBox->ModelIsReady( ETrue ); - iHwrBox->PlayAnimation( ETrue, CTruiContainerBase::OriginSymbolSize() ); - } - else if ( !iIsEmptyHwrBox ) - { - // If own shortcut, get trail points - TUint unicode = 0; - iEngine->GetShortcutModelL( iEngine->Shortcut(), iHwrBox->Model(), - unicode ); - iHwrBox->ModelIsReady( ETrue ); - iHwrBox->PlayAnimation(); - } - - // Set hwrbox model - if ( iShortcutType == KPresetIndex ) - { - iHwrBox->SetHwrBoxReadOnly( ETrue ); - } - else - { - iHwrBox->SetHwrBoxReadOnly( EFalse ); - } - - // Set clear button's status - clearBtn->SetDimmed( !( iHwrBox->Model().Count() ) | aIndex ); - clearBtn->DrawNow(); - - // Set preview button status - CAknButton* previewBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewPreviewModel ) ); - - previewBtn->SetDimmed( !( iHwrBox->Model().Count() | aIndex ) ); - previewBtn->DrawNow(); - } - -// --------------------------------------------------------------------------- -// Preview shortcut model -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::PreviewShortcutModel() - { - //even hwrbox know if current character has existing model. - //ask for engine to confirm this - iHwrBox->PlayAnimation(); - } - -// --------------------------------------------------------------------------- -// Check if model exist -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutEditContainer::HasShortcutModel() - { - return EFalse; - } - -// --------------------------------------------------------------------------- -// Prepare to exit -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutEditContainer::PrepareToExitL() - { - iHwrBox->HideInfoPopupNote(); - //If previous char's model is not saved, save it before exit. - if ( iHwrBox->BoxState() == CTruiHwrBox::ENewModelDraw ) - { - //Call save function from hwrbox, - //in order to stop periodics in the hwrbox - iHwrBox->SaveModelByManuallyL(); - } - - //After saving model, if shortcut model is empty, - //notice user that shortcut will be delete. - if ( iHwrBox->Model().Count() == 0 ) - { - // Not assign model to shortcut - CAknQueryDialog* dlg = CAknQueryDialog::NewL(); - if ( dlg->ExecuteLD( R_TRUI_QUERYDIALOG_SHORTCUT_NOT_ASSIGNED ) ) - { - // yes/ok pressed - iEngine->DeleteShortcut( iEngine->Shortcut() ); - return ETrue; - } - else - { - return EFalse; - } - } - else - { - if ( iShortcutType == KPresetIndex ) - { - // Save preset - // No need to save own preset again, because it has been saved before. - TRAPD( err, SavePresetShortcutL( iEngine->Shortcut(), iUnicode ) ); - if ( err == KErrInUse ) - { - // Pop information note - HBufC* errMsg = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_IN_USE ); - CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote - ( ETrue ); - note->ExecuteLD( *errMsg ); - CleanupStack::PopAndDestroy( errMsg ); - return EFalse; - } - } - } - return ETrue; - } - -// --------------------------------------------------------------------------- -// Clear current model -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::ClearCurrentModelL() - { - // Get Clear button from toolbar - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutEditViewId )->Toolbar(); - CAknButton* clearBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewDelete ) ); - clearBtn->SetDimmed( ETrue ); - clearBtn->DrawNow(); - - // Set preview button status - CAknButton* previewBtn = static_cast - ( toolbar->ControlOrNull( EShortcutEditViewPreviewModel ) ); - - previewBtn->SetDimmed( ETrue ); - previewBtn->DrawNow(); - - iHwrBox->ClearExistModel(); - HBufC* tipText = iEikonEnv->AllocReadResourceLC( R_TRUI_TOOLTIP_DELETED ); - TPoint hwrPos = iHwrBox->PositionRelativeToScreen(); - iHwrBox->ShowTooltipL( *tipText, - hwrPos + TPoint( iHwrBox->Size().iWidth, KHwrTooltipY ), - KTooltipPopupTimeOut, KTooltipStayTimeOut ); - CleanupStack::PopAndDestroy( tipText ); - iIsEmptyHwrBox = ETrue; - } - -// --------------------------------------------------------------------------- -// Popup tooltip -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::PopupTooltipL( TInt aResourceID ) - { - HBufC* tooltiptext =iEikonEnv->AllocReadResourceLC( aResourceID ); - CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue ); - note->ExecuteLD( *tooltiptext ); - CleanupStack::PopAndDestroy( tooltiptext ); - } - -// --------------------------------------------------------------------------- -// This is called whenever the control gains or loses focus, -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::FocusChanged( TDrawNow /*aDrawNow*/ ) - { - if ( IsFocused() ) - { - if ( iHwrBox->BoxState() == CTruiHwrBox::EExistModelStop ) - { - iHwrBox->ResumePlaying(); - } - } - else - { - if ( iHwrBox->BoxState() == CTruiHwrBox::EExistModelDraw ) - { - iHwrBox->PausePlaying(); - } - } - iHwrBox->SetFocus( IsFocused() ); - } - -// --------------------------------------------------------------------------- -// Return the currently selected index, which will be set in Shortcuts view. -// --------------------------------------------------------------------------- -// -TInt CTruiShortcutEditContainer::DefaultSelectedIndex( const CDesCArray* aItemList, - const TDesC& aText ) - { - if ( aItemList ) - { - for ( TInt i = 0; i < aItemList->Count(); i++ ) - { - if ( (*aItemList)[i].Compare( aText ) == 0 ) - { - return i + 1; - } - } - } - return KErrNotFound; - } - -// --------------------------------------------------------------------------- -// Popup SCT dialog. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::PopupSctDialogL() - { - TBuf selectedStr; - CAknCharMapDialog* sct = new (ELeave) CAknCharMapDialog( EAknSCTLowerCase, - selectedStr, - R_TRUI_SCT_CHARSET_PRESET ); - TInt keyboardMode = CurrentKeyBoardModeL(); - if ( keyboardMode ) - { - // QWERTY: Lock numeric keys. - sct->LockNumericKeys( ETrue ); - } - else - { - // ITU-T: Unlock numeric keys. - sct->LockNumericKeys( EFalse ); - } - sct->DisableRecentCharsRow(); - if ( sct->ExecuteLD( R_TRUI_SCT_DIALOG ) ) - { - TInt selectedUnicode = selectedStr.Length() ? selectedStr[0] : NULL; - TBool isInUse = CheckPresetSymbolInUseL( selectedUnicode ); - if ( isInUse && selectedUnicode != iUnicodeBak ) - { - // Preset is in use - //Popup err message - PopupTooltipL( R_TRUI_SHORTCUTEDITVIEW_ERROR_NOTE_IN_USE ); - return; - } - else - { - TInt activePos = iPresets.Find( selectedUnicode ); - - // Set active char pos - iActiveCharPos = ( activePos != KErrNotFound ) ? activePos : 0; - iUnicode = iPresets[iActiveCharPos]; - SetActiveCharL( selectedUnicode ); - } - } - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles a change to the control's resources. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditContainer::HandleResourceChange( TInt aType ) - { - CTruiContainerBase::HandleResourceChange( aType ); - if ( aType == KEikDynamicLayoutVariantSwitch && iHwrBox ) - { - if ( iHwrBox->BoxState() == CTruiHwrBox::ENewModelDraw ) - { - TRAP_IGNORE( iHwrBox->SaveModelByManuallyL() ); - } - } - - if ( aType == KAknsMessageSkinChange ) - { - TRgb labelColor = KRgbBlack; - TInt error = GetCachedLabelTextColor( labelColor ); - if ( error == KErrNone ) - { - TRAPD( errLable, iLabelTip->OverrideColorL( EColorLabelText, - labelColor ) ); - if ( errLable != KErrNone ) - { - return; - } - TRAP_IGNORE( iIndicator->OverrideColorL( EColorLabelText, - labelColor ) ); - } - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truishortcutedittextview.cpp --- a/textinput/peninputhwrtrui/src/truishortcutedittextview.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutEditTextView -* -*/ - - -#include -#include -#include -#include - -#include "truiappui.h" -#include "truishortcutedittextview.h" -#include "truitextsettingpagecontainer.h" -#include "truiengine.h" -#include "truiinfomessageview.h" -#include "truiapplication.h" -#include "truishortcuteditview.h" -#include "truishortcutsview.h" -#include "truicontainerbase.h" - -// ======== MEMBER FUNCTIONS ======== - -CTruiShortcutEditTextView::CTruiShortcutEditTextView() - { - } - -void CTruiShortcutEditTextView::ConstructL() - { - BaseConstructL(R_TRUI_SHORTCUTEDITTEXTVIEW); - } - -CTruiShortcutEditTextView* CTruiShortcutEditTextView::NewL() - { - CTruiShortcutEditTextView* self = CTruiShortcutEditTextView::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -CTruiShortcutEditTextView* CTruiShortcutEditTextView::NewLC() - { - CTruiShortcutEditTextView* self = new( ELeave ) CTruiShortcutEditTextView; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -CTruiShortcutEditTextView::~CTruiShortcutEditTextView() - { - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Returns views id. -// --------------------------------------------------------------------------- -// -TUid CTruiShortcutEditTextView::Id() const - { - return KTruiShortcutEditTextViewId; - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is activated -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditTextView::DoActivateL( const TVwsViewId& aPrevViewId, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - CTruiAppUi* appui = static_cast( AppUi() ); - if ( aPrevViewId == TVwsViewId( KUidtruiApp, KTruiInfoMessageViewId ) - || aPrevViewId == TVwsViewId( KUidtruiApp, KTruiShortcutsViewId ) ) - { - if ( appui->HwrEngine()->NewShortcut() ) - { - iStartView = TVwsViewId( KUidtruiApp, KTruiInfoMessageViewId ); - } - else - { - iStartView = aPrevViewId; - } - } - - // Set title pane - if ( iStartView == TVwsViewId( KUidtruiApp, KTruiInfoMessageViewId ) ) - { - HBufC* titleText = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITTEXTVIEW_TITLEPANE_TEXT ); - HBufC* titleNumber = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITTEXTVIEW_TITLEPANE_NUMBER ); - - // Offer new locfile by localization team - HBufC* titlePaneText = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITVIEW_TITLEPANE_TEXT ); - appui->ShowTitlePaneL( *titlePaneText ); - CleanupStack::PopAndDestroy( titlePaneText ); - CleanupStack::PopAndDestroy( titleNumber ); - CleanupStack::PopAndDestroy( titleText ); - } - else if ( iStartView == TVwsViewId( KUidtruiApp, KTruiShortcutsViewId ) ) - { - HBufC* titleText = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITTEXTVIEW_TITLEPANE_TEXT ); - appui->ShowTitlePaneL( *titleText ); - CleanupStack::PopAndDestroy( titleText ); - } - - // Close navi pane - appui->CloseNaviPaneL(); - - // Open container - if ( iStartView == TVwsViewId( KUidtruiApp, KTruiInfoMessageViewId ) ) - { - iContainer = CTruiTextSettingPageContainer::NewL - ( R_TRUI_SHORTCUT_WIZARD_EDITOR, - appui->HwrEngine()->Shortcut(), - ClientRect(), - EFalse, - CAknTextSettingPage::EPutCursorAtEnd | - CAknTextSettingPage::EPredictiveTextEntryPermitted ); - } - else - { - iContainer = CTruiTextSettingPageContainer::NewL - ( R_TRUI_SHORTCUT_EDIT_TEXT_EDITOR, - appui->HwrEngine()->Shortcut(), - ClientRect(), - ETrue, - CAknTextSettingPage::EPutCursorAtEnd | - CAknTextSettingPage::EPredictiveTextEntryPermitted ); - } - AppUi()->AddToStackL( *this, iContainer ); - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is deactivated -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditTextView::DoDeactivate() - { - if ( iContainer ) - { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; - } - - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truishortcuteditview.cpp --- a/textinput/peninputhwrtrui/src/truishortcuteditview.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutEditView -* -*/ - - -#include -#include -#include -#include -#include -#include - -#include "truishortcuteditview.h" -#include "truishortcuteditcontainer.h" -#include "truiappui.h" -#include "trui.hrh" -#include "truishortcutsview.h" -#include "truiapplication.h" -#include "truiengine.h" -#include "truishortcutedittextview.h" - -_LIT( KSeperatorBetweenTitle, " " ); - -// ======== MEMBER FUNCTIONS ======== - -CTruiShortcutEditView::CTruiShortcutEditView() - { - } - -void CTruiShortcutEditView::ConstructL() - { - BaseConstructL( R_TRUI_SHORTCUTEDITVIEW ); - } - -CTruiShortcutEditView* CTruiShortcutEditView::NewL() - { - CTruiShortcutEditView* self = CTruiShortcutEditView::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -CTruiShortcutEditView* CTruiShortcutEditView::NewLC() - { - CTruiShortcutEditView* self = new( ELeave ) CTruiShortcutEditView; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -CTruiShortcutEditView::~CTruiShortcutEditView() - { - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Returns views id. -// --------------------------------------------------------------------------- -// -TUid CTruiShortcutEditView::Id() const - { - return KTruiShortcutEditViewId; - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Command handling function. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EAknSoftkeyDone: - { - if ( iContainer->PrepareToExitL() ) - { - iContainer->SwitchToShortcutViewL(); - } - break; - } - case EAknSoftkeyBack: - { - iContainer->BackToPreviousViewL(); - break; - } - } - } - - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is activated -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditView::DoActivateL( const TVwsViewId& aPrevViewId, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - iPreViewId = aPrevViewId; - CTruiAppUi* appui = static_cast( AppUi() ); - CEikButtonGroupContainer* cba = Cba(); - // Set title pane and SK1's text - if ( aPrevViewId == TVwsViewId( KUidtruiApp, KTruiShortcutsViewId ) ) - { - appui->ShowTitlePaneL( appui->HwrEngine()->Shortcut() ); - cba->SetCommandSetL( R_AVKON_SOFTKEYS_DONE_BACK ); - } - else if ( aPrevViewId == TVwsViewId( KUidtruiApp, KTruiShortcutEditTextViewId ) ) - { - HBufC* numberText = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTEDITTEXTVIEW_TITLEPANE_LAST_NUMBER ); - HBufC* title = HBufC::NewLC( appui->HwrEngine()->Shortcut().Length() - + numberText->Length() + KExtraSize ); - TPtr titlePtr = title->Des(); - titlePtr.Copy( *numberText ); - titlePtr.Append( KSeperatorBetweenTitle ); - titlePtr.Append( appui->HwrEngine()->Shortcut() ); - appui->ShowTitlePaneL( *title ); - CleanupStack::PopAndDestroy( title ); - CleanupStack::PopAndDestroy( numberText ); - cba->SetCommandSetL( R_TRUI_SHORTCUTEDITVIEW_CREATE_CBA ); - } - - // Close navi pane - appui->CloseNaviPaneL(); - - iContainer = CTruiShortcutEditContainer::NewL( ClientRect() ); - iContainer->SetMopParent( this ); - AppUi()->AddToStackL( *this, iContainer ); - iContainer->SetView( this ); - - // Set toolbar - CAknToolbar* toolbar = Toolbar(); - if ( toolbar ) - { - toolbar->SetToolbarObserver( this ); - toolbar->SetToolbarVisibility( ETrue, EFalse ); - } - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is deactivated -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditView::DoDeactivate() - { - if ( iContainer ) - { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; - } - } - -// --------------------------------------------------------------------------- -// From class MAknToolbarObserver. -// Handles toolbar events for a certain toolbar item. -// --------------------------------------------------------------------------- -// -void CTruiShortcutEditView::OfferToolbarEventL( TInt aCommand ) - { - switch ( aCommand ) - { - case EShortcutEditViewDelete: - { - iContainer->ClearCurrentModelL(); - break; - } - case EShortcutEditViewPreviewModel: - { - iContainer->PreviewShortcutModel(); - break; - } - case EShortcutEditViewGrid: - { - iContainer->PopupSctDialogL(); - break; - } - } - } - diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truishortcutscontainer.cpp --- a/textinput/peninputhwrtrui/src/truishortcutscontainer.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1010 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutsContainer -* -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "truicontainerbase.h" -#include "truishortcutscontainer.h" -#include "truimainview.h" -#include "truiengine.h" -#include "truiappui.h" -#include "truiengine.h" -#include "truishortcuteditview.h" -#include "trui.hrh" -#include "truiapplication.h" -#include "truihelp.h" -#include "truihwrbox.h" -#include "truishortcutedittextview.h" -#include "truiinfomessageview.h" -#include "truishortcutsview.h" - -_LIT( KTRUIICONSFILENAME, "\\resource\\apps\\trui_icons.mif" ); - -// Initialized size for item array -const TInt KItemArraySize = 1; - -// Initialized size for icon array -const TInt KIconArraySize = 3; - -// listbox item format string -_LIT( KListItemWithPicFormat, "1\t%S\t\t" ); -_LIT( KListItemFormat, "\t%S\t\t" ); - -// Delay time of showing tooltip -const TTimeIntervalMicroSeconds32 KTooltipShowDelay = 1000000; - -// Delay time of hiding tooltip -const TTimeIntervalMicroSeconds32 KTooltipHideDelay = 3000000; - -// Rect of popup hwrbox -const TRect KPopupHwrBoxRect = TRect( TPoint( 0, 0 ), TSize( 75, 75 ) ); - -const TPoint KPopupHwrBoxPosLandscape = TPoint( 479, 360 ); -const TPoint KPopupHwrBoxPosPortrait = TPoint( 337, 500 ); - -const TInt KPopupWindowVarity = 0; - -const TInt KParaDelimiterSize = 1; -_LIT( KParaDelimiterFormat, "%c" ); - -// ======== MEMBER FUNCTIONS ======== - -CTruiShortcutsContainer::CTruiShortcutsContainer() - { - } - -void CTruiShortcutsContainer::ConstructL( const TRect& aRect ) - { - // Initialize control array - InitComponentArrayL(); - - // Set parent control or owning window - CreateWindowL(); - - // Load shortcuts - iEngine->UpdateShortcutListL(); - - // Initialize controls - InitializeControlsL(); - SetRect( aRect ); - - // Set default selected index - iListBox->SetCurrentItemIndex( iEngine->CurrentSelectedIndex() ); - - HandleListBoxFocusChangedL( CurrentItemIndex() ); - - ActivateL(); - } - -CTruiShortcutsContainer* CTruiShortcutsContainer::NewL( const TRect& aRect ) - { - CTruiShortcutsContainer* self = CTruiShortcutsContainer::NewLC( aRect ); - CleanupStack::Pop( self ); - return self; - } - -CTruiShortcutsContainer* CTruiShortcutsContainer::NewLC - ( const TRect& aRect ) - { - CTruiShortcutsContainer* self = new (ELeave) CTruiShortcutsContainer(); - CleanupStack::PushL( self ); - self->ConstructL( aRect ); - return self; - } - -CTruiShortcutsContainer::~CTruiShortcutsContainer() - { - delete iPopupController; - delete iHwrBox; - } - -// --------------------------------------------------------------------------- -// Create controls to be displayed in this container. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::InitializeControlsL() - { - // Create toolbar - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutsViewId )->Toolbar(); - // Get Clear button from toolbar - CAknButton* deleteButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdDelete ) ); - - // Create listbox - CreateListBoxL(); - - // Create preview popup window - iPopupController = CreatePopupHwrBoxL(); - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Responds to changes to the size and position of the contents of this control. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::SizeChanged() - { - if ( iListBox ) - { - iListBox->SetRect( Rect() ); - } - - // caculate main pane - TRect rect = Rect(); - TAknWindowComponentLayout main_pane_layout = - AknLayoutScalable_Apps::main_hwr_training_pane(); - TAknLayoutRect main_pane_layout_rect; - main_pane_layout_rect.LayoutRect( rect, main_pane_layout ); - TRect main_pane_rect = main_pane_layout_rect.Rect(); - - // Calculate popup_hwr_training_preview_window - TAknWindowComponentLayout preview_popup_layout = - AknLayoutScalable_Apps::popup_hwr_training_preview_window - ( KPopupWindowVarity ); - TAknLayoutRect preview_popup_layout_rect; - preview_popup_layout_rect.LayoutRect( main_pane_rect, preview_popup_layout ); - - iHwrBox->SetSize( preview_popup_layout_rect.Rect().Size() ); - - TPoint itemPos = PopupWindowPosition( CurrentItemIndex() ); - iPopupController->SetPosition( itemPos ); - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// This is called whenever the control gains or loses focus, -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::FocusChanged( TDrawNow /*aDrawNow*/ ) - { - if ( IsFocused() ) - { - if ( iDisplayPopupWindow ) - { - TRAPD( err, CheckAndPreviewShortcutModelL( CurrentItemIndex() ) ); - if ( err != KErrNone ) - { - iDisplayPopupWindow = EFalse; - } - } - } - else - { - // Close pupup preview window - iPopupController->HidePopUp(); - } - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles pointer events. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent ) - { - iPenDownPoint = aPointerEvent.iPosition; - CCoeControl::HandlePointerEventL( aPointerEvent ); - } - -// --------------------------------------------------------------------------- -// Popup the TextSettingPage and added the new shortcut to ListBox. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::AddShortcutL() - { - iEngine->NewShortcut( ETrue ); - iEngine->SetShortcut( KNullDesC ); - // Get always display setting from ini file - TInt isNotDisplayWizard = 0; - TRAPD( err, GetSettingFromIniFileL( KAlwaysDisplayWizardKey, isNotDisplayWizard ) ); - if ( err != KErrNone ) - { - isNotDisplayWizard = 0; - } - - if ( isNotDisplayWizard ) - { - iEngine->SetDisplayWizard( EFalse ); - iAppUi->ActivateLocalViewL( KTruiShortcutEditTextViewId ); - } - else - { - iEngine->SetDisplayWizard( ETrue ); - iAppUi->ActivateLocalViewL( KTruiInfoMessageViewId ); - } - } - -// --------------------------------------------------------------------------- -// Edit shortcut -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::EditShortcutL( TBool aOnlyEditText ) - { - CDesCArray* shortcutlist = iEngine->ShortcutTextList(); - TInt posInEngine = iListBox->CurrentItemIndex() - 1; - iEngine->SetShortcut( shortcutlist->MdcaPoint( posInEngine ) ); - iEngine->NewShortcut( EFalse ); - // Switch to shortcut edit view - if ( aOnlyEditText ) - { - iAppUi->ActivateLocalViewL( KTruiShortcutEditTextViewId ); - } - else - { - iAppUi->ActivateLocalViewL( KTruiShortcutEditViewId ); - } - } - -// --------------------------------------------------------------------------- -// Check if reset introduction -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutsContainer::IsResetIntroduction() - { - TInt value = 0; - TRAPD( err, GetSettingFromIniFileL( KAlwaysDisplayWizardKey, value ) ); - if ( err != KErrNone ) - { - value = 0; - } - return value ? ETrue: EFalse; - } - -// --------------------------------------------------------------------------- -// Reset introduction -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::ResetIntroductionL() - { - SaveSettingIntoIniFileL( KAlwaysDisplayWizardKey, 0 ); - iAppUi->ActivateLocalViewL( KTruiInfoMessageViewId ); - } - -// --------------------------------------------------------------------------- -// From MEikListBoxObserver -// Handle event from an listbox -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/, - TListBoxEvent aEventType ) - { - switch( aEventType ) - { - case EEventPenDownOnItem: - { - iPopupController->HidePopUp(); - // Check index - TInt index = CurrentItemIndex(); - iListBox->View()->XYPosToItemIndex( iPenDownPoint, index ); - // Popup preview window - HandleListBoxFocusChangedL( index ); - } - break; - case EEventItemClicked: - { - break; - } - case EEventItemDoubleClicked: - { - if ( CurrentItemIndex() > 0 ) - { - if ( MarkCount() == 0 ) - { - // Pop context menu - PopupContextMenuL( R_TRUI_SHORTCUTSVIEW_CONTEXT_MENUBAR ); - } - } - else - { - // Tap on "New shortcut" - AddShortcutL(); - } - // Set the current index into engine - // Update toolbar button's status - break; - } - case EEventItemDraggingActioned: - { - iPopupController->HidePopUp(); - TInt index = CurrentItemIndex(); - iListBox->View()->XYPosToItemIndex( iPenDownPoint, index ); - // Popup preview window - HandleListBoxFocusChangedL( index ); - break; - } - } - } - -// --------------------------------------------------------------------------- -// From class CCoeControl. -// Handles key event. -// --------------------------------------------------------------------------- -// -TKeyResponse CTruiShortcutsContainer::OfferKeyEventL - ( const TKeyEvent& aKeyEvent, - TEventCode aType ) - { - if ( aType == EEventKey ) - { - switch ( aKeyEvent.iCode ) - { - case EKeyLeftArrow: - { - CAknNavigationDecorator* naviDecorator = - iAppUi->GetNaviDecorator(); - CAknTabGroup* tabGroup = static_cast - ( naviDecorator->DecoratedControl() ); - return tabGroup->OfferKeyEventL( aKeyEvent, aType ); - } - case EKeyRightArrow: - { - return EKeyWasConsumed; - } - case EKeyUpArrow: - case EKeyDownArrow: - { - if ( iListBox ) - { - iPopupController->HidePopUp(); - TKeyResponse keyResponse = iListBox->OfferKeyEventL - ( aKeyEvent, aType ); - // Set the CBA button - if ( IsMarked( 0 ) ) - { - iListBox->SetCurrentItemIndex( 0 ); - AknSelectionService::HandleMarkableListProcessCommandL - ( EAknCmdUnmark, iListBox ); - iListBox->SetCurrentItemIndexAndDraw( iEngine->CurrentSelectedIndex() ); - } - HandleListBoxFocusChangedL( CurrentItemIndex() ); - return keyResponse; - } - } - case EKeyEnter: - case EKeyOK: - { - - if ( iListBox != NULL && CurrentItemIndex() == 0 ) - { - // Select "Create new shortcut" item - AddShortcutL(); - } - else - { - if ( MarkCount() == 0 ) - { - // Pop context menu - PopupContextMenuL( R_TRUI_SHORTCUTSVIEW_CONTEXT_MENUBAR ); - } - } - return EKeyWasConsumed; - } - default: - break; - } - } - return EKeyWasNotConsumed; - } - -// --------------------------------------------------------------------------- -// Gets the control's help context. Returns a NULL context by default. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::GetHelpContext( TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidtruiApp; - aContext.iContext = HWRT_HLP_SHORTCUTS; - } - -// --------------------------------------------------------------------------- -// Delete shortcut from ListBox -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::DeleteItemsL() - { - CTextListBoxModel* model = iListBox->Model(); - CDesCArray* itemArray = static_cast( model->ItemTextArray() ); - if ( MarkCount() > 0 ) - { - // Delete all marked items, ignoring the selected item. - RArray selectionIndexes; - CleanupClosePushL( selectionIndexes ); - const CArrayFix* indexArray = iListBox->SelectionIndexes(); - TInt indexArrayLen = indexArray->Count(); - - // Copy the selection indexes array into RArray - for ( TInt i = 0; i < indexArrayLen; i++ ) - { - selectionIndexes.Append( ( *indexArray )[i] ); - } - selectionIndexes.Sort(); - // Delete all marked items - TInt selectionCount = selectionIndexes.Count(); - for ( TInt i = selectionCount - 1; i >= 0; i-- ) - { - // Delete item from Engine - TInt itemArrayIndex = selectionIndexes[i]; - CDesCArray* shortcutList = iEngine->ShortcutTextList(); - - if ( shortcutList ) - { - iEngine->DeleteShortcut( (*shortcutList)[itemArrayIndex-1] ); - // Delete the currently selected item from array - itemArray->Delete( itemArrayIndex ); - // Update ListBox - AknListBoxUtils::HandleItemRemovalAndPositionHighlightL( iListBox, - itemArrayIndex, - ETrue); - } - } - CleanupStack::PopAndDestroy( &selectionIndexes ); // selectionIndexes - } - else - { - // Delete the currently selected item. - // Get the currently selected item - TInt selectedIndex = CurrentItemIndex(); - - // Delete item from Engine - CDesCArray* shortcutList = iEngine->ShortcutTextList(); - if ( shortcutList ) - { - iEngine->DeleteShortcut( (*shortcutList)[selectedIndex-1] ); - // Delete the currently selected item from array - itemArray->Delete( selectedIndex ); - // Update ListBox - AknListBoxUtils::HandleItemRemovalAndPositionHighlightL( iListBox, - selectedIndex, - ETrue); - } - } - iListBox->DrawNow(); - iEngine->UpdateShortcutListL(); - // Set the current CBA - HandleListBoxFocusChangedL( CurrentItemIndex() ); - } - -// --------------------------------------------------------------------------- -// Delete shortcut -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::DeleteShortcutL() - { - // Popup note dialog - CAknQueryDialog* dlg = CAknQueryDialog::NewL(); - HBufC* prompt = NULL; - TInt count = MarkCount(); - if ( count ) - { - prompt = StringLoader::LoadLC( R_QTN_HWRT_QUERY_DELETE_SEVERAL_SHORTCUTS, count ); - } - else - { - prompt = StringLoader::LoadLC( R_QTN_HWRT_QUERY_DELETE_SHORTCUT ); - } - - if ( dlg->ExecuteLD( R_TRUI_QUERYDIALOG_DELETE_SHORTCUT, *prompt ) ) - { - // press yes - // Delete item from Listbox, also delete from Engine in it. - iPopupController->HidePopUp(); - DeleteItemsL(); - } - CleanupStack::PopAndDestroy( prompt ); // prompt - } - -// --------------------------------------------------------------------------- -// Handle event when listbox change to another focused item. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::HandleListBoxFocusChangedL( TInt aIndex ) - { - // Set the current index into engine - iEngine->SetCurrentSelectedIndex( aIndex ); - // Update toolbar button's status - UpdateToolbarButtonStatus( aIndex ); - // Draw current item // add this line - iListBox->DrawItem( aIndex ); // add this line - // Preview shortcut model if it has model. - CheckAndPreviewShortcutModelL( aIndex ); - } - -// --------------------------------------------------------------------------- -// Mark shortcut -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::MarkShortcutL() - { - // The first item mustn't be marked - TInt currentIndex = CurrentItemIndex(); - if ( currentIndex != 0 ) - { - AknSelectionService::HandleMarkableListProcessCommandL( EAknCmdMark, - iListBox ); - } - - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutsViewId )->Toolbar(); - if ( toolbar ) - { - // Set edit text button's status - CAknButton* editTextButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdEditText ) ); - editTextButton->SetDimmed( ETrue ); - editTextButton->DrawNow(); - // Set edit model button's status - CAknButton* editModelButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdEditModel ) ); - editModelButton->SetDimmed( ETrue ); - editModelButton->DrawNow(); - } - } - -// --------------------------------------------------------------------------- -// Unmark shortcut -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::UnmarkShortcutL() - { - // The first item mustn't be unmarked - TInt currentIndex = CurrentItemIndex(); - if ( currentIndex != 0 ) - { - AknSelectionService::HandleMarkableListProcessCommandL( EAknCmdUnmark, - iListBox ); - } - if ( MarkCount() == 0 ) - { - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutsViewId )->Toolbar(); - if ( toolbar ) - { - // Set edit text button's status - CAknButton* editTextButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdEditText ) ); - editTextButton->SetDimmed( EFalse ); - editTextButton->DrawNow(); - // Set edit model button's status - CAknButton* editModelButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdEditModel ) ); - editModelButton->SetDimmed( EFalse ); - editModelButton->DrawNow(); - } - } - } - -// --------------------------------------------------------------------------- -// Return current selected item's index -// --------------------------------------------------------------------------- -// -TInt CTruiShortcutsContainer::CurrentItemIndex() - { - return iListBox->CurrentItemIndex(); - } - -// --------------------------------------------------------------------------- -// Test if the currently selected index is marked -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutsContainer::IsMarked( TInt aSelectedIndex ) - { - const CArrayFix* aIndexArray = iListBox->SelectionIndexes(); - for ( TInt index = 0; index < aIndexArray->Count(); index++ ) - { - if ( aSelectedIndex == ( *aIndexArray )[index] ) - { - return ETrue; - } - } - return EFalse; - } - -// --------------------------------------------------------------------------- -// Return the count of being marked currently. -// --------------------------------------------------------------------------- -// -TInt CTruiShortcutsContainer::MarkCount() - { - const CArrayFix* aIndexArray = iListBox->SelectionIndexes(); - return aIndexArray->Count(); - } - -// --------------------------------------------------------------------------- -// Create preview popup controller to show popup hwrbox. -// --------------------------------------------------------------------------- -// -CAknPreviewPopUpController* CTruiShortcutsContainer::CreatePopupHwrBoxL() - { - iHwrBox = CTruiHwrBox::NewL( this, NULL ); - iHwrBox->SetHwrBoxFlag( CTruiHwrBox::ENoFrameHwrBox - | CTruiHwrBox::EReadOnlyHwrBox ); - CAknPreviewPopUpController* popupController = - CAknPreviewPopUpController::NewL - ( *iHwrBox, CAknPreviewPopUpController::EPermanentMode ); - popupController->AddObserverL( *this ); - return popupController; - } - -// --------------------------------------------------------------------------- -// Show the text tooltip. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::PopupHwrBoxL( const TPoint& aPosition, - const TTimeIntervalMicroSeconds32& aShowDelay, - const TTimeIntervalMicroSeconds32& aHideDelay ) - { - if ( iPopupController && iHwrBox ) - { - iPopupController->SetPosition( aPosition ); - // Set hwrbox's rect to engine and set guiding line to hwrbox - iHwrBox->SetDisplayBottomGuideLine( ETrue ); - if ( iEngine->CurrentLanguageScript() == EMainViewSubmenuHebrew ) - { - iHwrBox->SetDisplayTopGuideLine( ETrue ); - } - iPopupController->SetPopUpShowDelay( aShowDelay ); - iPopupController->SetPopUpHideDelay( aHideDelay ); - iPopupController->ShowPopUp(); - } - } - -// --------------------------------------------------------------------------- -// Preview shortcut model in popup hwrbox. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::PreviewShortcutModelL( const TDesC& aShortcutText, - TInt aIndex ) - { - // Get shortcut model - if ( iEngine->CheckShortcutModel( aShortcutText ) ) - { - TRAPD( err, iEngine->GetShortcutModelL( aShortcutText, - iHwrBox->Model(), - iShortcutUnicode ) ); - if ( err == KErrNone ) - { - // Popup hwrbox - // Get position for popup window - TPoint itemPos = PopupWindowPosition( aIndex ); - PopupHwrBoxL( itemPos, - KTooltipShowDelay, - KTooltipHideDelay ); - } - } - } - -// --------------------------------------------------------------------------- -// Called by the preview popup when an appropriate event takes place. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::HandlePreviewPopUpEventL( - CAknPreviewPopUpController* aController, TPreviewPopUpEvent aEvent ) - { - if ( aController == iPopupController && aEvent == EPreviewPopUpShown ) - { - TSize refSize = CTruiContainerBase::OriginSymbolSize(); - iHwrBox->ShowTrails( iHwrBox->Model(), ETrue, refSize ); - iDisplayPopupWindow = EFalse; - } - else - { - iHwrBox->ClearExistModel(); - iHwrBox->DrawNow(); - iDisplayPopupWindow = ETrue; - } - } - -// --------------------------------------------------------------------------- -// Create list box to display all shortcut -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::CreateListBoxL() - { - // listbox instance - iListBox = new (ELeave) CAknSingleGraphicStyleListBox; - Components().AppendLC( iListBox ); - CleanupStack::Pop( iListBox ); // iListBox - - // Construct listbox - iListBox->ConstructL( this, EAknListBoxMarkableList ); - - // Set container control - iListBox->SetContainerWindowL( *this ); - - // Set observer - iListBox->SetListBoxObserver( this ); - - // Add scrollbars to listbox - iListBox->CreateScrollBarFrameL(ETrue); - iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( - CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); - - // Get shortcut list from engine - CDesCArray* primalList = iEngine->ShortcutTextList(); - - LoadTextArrayL( primalList ); - - // construct icon array with granularity 3 - CArrayPtr* iconList = new (ELeave) CAknIconArray( KIconArraySize ); - CleanupStack::PushL( iconList ); - CFbsBitmap* bitmap; - CFbsBitmap* bitmapm; - - MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - AknsUtils::CreateColorIconL( skin, - KAknsIIDQgnIndiMarkedAdd, - KAknsIIDQsnIconColors, - EAknsCIQsnIconColorsCG16, - bitmap, - bitmapm, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_indi_marked_add, - EMbmTrui_iconsQgn_indi_marked_add_mask, - KRgbBlack - ); - CleanupStack::PushL( bitmap ); - CleanupStack::PushL( bitmapm ); - CGulIcon* iconMark = CGulIcon::NewL( bitmap, bitmapm ); // Ownership transfered - CleanupStack::Pop( bitmapm ); - CleanupStack::Pop( bitmap ); - CleanupStack::PushL( iconMark ); - iconList->AppendL( iconMark ); - CleanupStack::Pop( iconMark ); - - AknsUtils::CreateIconL( skin, - KAknsIIDQgnPropHwrTrainingShortcut, - bitmap, - bitmapm, - KTRUIICONSFILENAME, - EMbmTrui_iconsQgn_prop_hwrtraining_shortcut_new, - EMbmTrui_iconsQgn_prop_hwrtraining_shortcut_new_mask - ); - CleanupStack::PushL( bitmap ); - CleanupStack::PushL( bitmapm ); - CGulIcon* iconNew = CGulIcon::NewL( bitmap, bitmapm ); // Ownership transfered - CleanupStack::Pop( bitmapm ); - CleanupStack::Pop( bitmap ); - CleanupStack::PushL( iconNew ); - iconList->AppendL( iconNew ); - CleanupStack::Pop( iconNew ); - - iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList ); - - CleanupStack::Pop( iconList ); // iconList - - iListBox->SetFocus( ETrue ); - // update listbox - iListBox->ActivateL(); - } - -// --------------------------------------------------------------------------- -// Setup text data for listbox -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::LoadTextArrayL( const CDesCArray* aTextArray ) - { - // Construct listbox item array. - // The items in the list contain an option of create new shortcut - // and the primal shortcuts from HWR engine - CDesCArray* itemList = new (ELeave) CDesCArrayFlat( KItemArraySize ); - CleanupStack::PushL(itemList); - - TBuf item; - HBufC* newShortcutText = StringLoader::LoadL( R_TRUI_SHORTCUTVIEW_NEW_SHORTCUT ); - item.Format( KListItemWithPicFormat, newShortcutText ); - delete newShortcutText; - newShortcutText = NULL; - itemList->AppendL(item); - - // if at least one shortcut exists - if ( aTextArray ) - { - // Item from WHR engine - for ( TInt i=0; i < aTextArray->Count(); i++ ) - { - TBuf itemPrimal; - itemPrimal = aTextArray->MdcaPoint(i); - item.Format( KListItemFormat, &itemPrimal ); - TBuf paraDelimiter; - paraDelimiter.Format( KParaDelimiterFormat, EKeyEnter ); - AknTextUtils::ReplaceCharacters( item, paraDelimiter, TChar( EKeySpace ) ); - itemList->AppendL( item ); - } - } - // set items and ownership - CleanupStack::Pop( itemList ); - iListBox->Model()->SetItemTextArray( itemList ); - iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray ); - iListBox->HandleItemAdditionL(); - } - -// --------------------------------------------------------------------------- -// Popup context menu. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::PopupContextMenuL( TInt aResourceId ) - { - // Hide popup preview window - iPopupController->HidePopUp(); - // Popup context menu - CEikMenuBar* parentMenuBar = iAppUi->View( KTruiShortcutsViewId )->MenuBar(); - if ( parentMenuBar ) - { - parentMenuBar->SetMenuTitleResourceId( aResourceId ); - parentMenuBar->SetMenuType( CEikMenuBar::EMenuContext ); - parentMenuBar->TryDisplayMenuBarL(); - parentMenuBar->SetMenuTitleResourceId( R_TRUI_SHORTCUTSVIEW_MENUBAR ); - parentMenuBar->SetMenuType( CEikMenuBar::EMenuOptions ); - } - } - -// --------------------------------------------------------------------------- -// Get position relative to screen origin for popup window. -// --------------------------------------------------------------------------- -// -TPoint CTruiShortcutsContainer::PopupWindowPosition( TInt aIndex ) - { - // Place popup window to left-bottom - TPoint itemPos = iListBox->View()->ItemPos( aIndex ) - + iListBox->PositionRelativeToScreen(); - TSize itemSize = iListBox->View()->ItemSize( aIndex ); - itemPos.iY += itemSize.iHeight; - - // if direction is upforwards. - if ( Rect().iBr.iY + iListBox->PositionRelativeToScreen().iY - - ( itemPos.iY + iPopupController->Size().iHeight ) < 0 ) - { - itemPos.iY -= ( itemSize.iHeight + iPopupController->Size().iHeight ); - } - - if ( TBidiText::ScriptDirectionality( User::Language() ) - == TBidiText::ELeftToRight ) - { // None-arabic,hebrew, place popup window to right-bottom - itemPos.iX += itemSize.iWidth; - // Sub width of scroll bar - TInt scrollbarWidth = 0; - if ( iListBox->ScrollBarFrame() ) - { - scrollbarWidth = iListBox->ScrollBarFrame() - ->ScrollBarBreadth( CEikScrollBar::EVertical ); - } - itemPos.iX -= scrollbarWidth; - } - else - { - itemPos.iX += iPopupController->Size().iWidth; - } - return itemPos; - } - -// --------------------------------------------------------------------------- -// Check if need to preview shortcut and perform previewing necessarily. -// --------------------------------------------------------------------------- -// -TBool CTruiShortcutsContainer::CheckAndPreviewShortcutModelL( TInt aIndex ) - { - TBool ret = EFalse; - if ( aIndex > 0 ) - { - // Get selected shortcut text - CDesCArray* shortcutlist = iEngine->ShortcutTextList(); - TInt posInEngine = aIndex - 1; - // Popup hwr box to preview - PreviewShortcutModelL( shortcutlist->MdcaPoint( posInEngine ), aIndex ); - ret = ETrue; - } - else - { - iPopupController->HidePopUp(); - ret = EFalse; - } - return ret; - } - -// --------------------------------------------------------------------------- -// Update buttons' status in toolbar -// --------------------------------------------------------------------------- -// -void CTruiShortcutsContainer::UpdateToolbarButtonStatus( TInt aIndex ) - { - CAknToolbar* toolbar = iAppUi->View( KTruiShortcutsViewId )->Toolbar(); - if ( toolbar ) - { - // Set edit text button's status - CAknButton* editTextButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdEditText ) ); - if ( editTextButton ) - { - if ( aIndex > 0 ) - { - if ( MarkCount() > 0 ) - { - editTextButton->SetDimmed( ETrue ); - } - else - { - editTextButton->SetDimmed( EFalse ); - } - } - else - { - editTextButton->SetDimmed( ETrue ); - } - editTextButton->DrawNow(); - } - - // Set edit model button's status - CAknButton* editModelButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdEditModel ) ); - if ( editModelButton ) - { - if( aIndex > 0 ) - { - if ( MarkCount() > 0 ) - { - editModelButton->SetDimmed( ETrue ); - } - else - { - CDesCArray* shortcutlist = iEngine->ShortcutTextList(); - TInt posInEngine = aIndex - 1; - if ( iEngine->CheckShortcutModel - ( shortcutlist->MdcaPoint( posInEngine ) ) ) - { - // Shortcut model exist and allow to edit model. - editModelButton->SetDimmed( EFalse ); - } - } - } - else - { - editModelButton->SetDimmed( ETrue ); - } - editModelButton->DrawNow(); - } - - // Set delete button's status - CAknButton* deleteButton = static_cast - ( toolbar->ControlOrNull( EShortcutsViewButtonIdDelete ) ); - if ( deleteButton ) - { - TBool isDimmed = aIndex > 0 ? EFalse : ETrue; - deleteButton->SetDimmed( isDimmed ); - deleteButton->DrawNow(); - } - } - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truishortcutsview.cpp --- a/textinput/peninputhwrtrui/src/truishortcutsview.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,302 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiShortcutsView -* -*/ - - -#include -#include -#include -#include -#include -#include - -#include "truishortcutsview.h" -#include "truishortcutscontainer.h" -#include "trui.hrh" -#include "truiappui.h" -#include "truishortcutedittextview.h" -#include "truimainview.h" - -// ======== MEMBER FUNCTIONS ======== - -CTruiShortcutsView::CTruiShortcutsView() - { - } - -void CTruiShortcutsView::ConstructL() - { - BaseConstructL( R_TRUI_SHORTCUTSVIEW ); - } - -CTruiShortcutsView* CTruiShortcutsView::NewL() - { - CTruiShortcutsView* self = CTruiShortcutsView::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -CTruiShortcutsView* CTruiShortcutsView::NewLC() - { - CTruiShortcutsView* self = new( ELeave ) CTruiShortcutsView; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -CTruiShortcutsView::~CTruiShortcutsView() - { - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Returns views id. -// --------------------------------------------------------------------------- -// -TUid CTruiShortcutsView::Id() const - { - return KTruiShortcutsViewId; - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Command handling function. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EShortcutViewCreate: - { - iContainer->AddShortcutL(); - } - break; - case EShortcutViewEditText: - { - iContainer->EditShortcutL( ETrue ); - break; - } - case EShortcutViewEditModel: - { - iContainer->EditShortcutL( EFalse ); - } - break; - case EShortcutViewLinkToHandwritting: - { - // Set main view tab active - CTruiAppUi* appui = static_cast( AppUi() ); - CAknNavigationDecorator* naviDecorator = appui->GetNaviDecorator(); - CAknTabGroup* tabGroup = static_cast - ( naviDecorator->DecoratedControl() ); - tabGroup->SetActiveTabById( ENavigationPaneMainViewTab ); - // Switch to local view. - appui->ActivateLocalViewL( KTruiMainViewId ); - } - break; - case EShortcutViewMark: - { - iContainer->MarkShortcutL(); - } - break; - case EShortcutViewUnmark: - { - iContainer->UnmarkShortcutL(); - } - break; - case EShortcutViewResetInfoMessage: - { - iContainer->ResetIntroductionL(); - } - break; - case EShortcutViewDelete: - { - iContainer->DeleteShortcutL(); - } - break; - default: - { - AppUi()->HandleCommandL( aCommand ); - } - } - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is activated -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - // Set title pane - CTruiAppUi* appui = static_cast( AppUi() ); - HBufC* titleText = iEikonEnv->AllocReadResourceLC - ( R_TRUI_SHORTCUTSVIEW_TITLEPANE_TEXT ); - appui->ShowTitlePaneL( *titleText ); - CleanupStack::PopAndDestroy( titleText ); - - // Show navi pane - appui->ShowNaviPaneL(); - - iContainer = CTruiShortcutsContainer::NewL( ClientRect() ); - iContainer->SetMopParent( this ); - AppUi()->AddToStackL( *this, iContainer ); - iContainer->SetView( this ); - - // Set toolbar - CAknToolbar* toolbar = Toolbar(); - if ( toolbar ) - { - toolbar->SetToolbarObserver( this ); - toolbar->SetToolbarVisibility( ETrue, EFalse ); - } - } - -// --------------------------------------------------------------------------- -// From class CAknView. -// Carried out when View is deactivated -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::DoDeactivate() - { - if ( iContainer ) - { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; - } - } - - -// --------------------------------------------------------------------------- -// From MEikMenuObserver -// Dynamically initialises a menu pane. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) - { - // Prepare to display popup window when focus return to container - iContainer->SetDisplayPopupWindow( ETrue ); - - if ( aResourceId == R_TRUI_SHORTCUTSVIEW_MENUPANE ) - { - // Check if "Edit" will be displayed when first item highlighted. - // Check if "Delete" will be displayed when first item highlighted. - // Check if "Mark" will be displayed when first item highlighted. - // Check if "Unmark" will be displayed when first item highlighted. - TInt currentIndex = iContainer->CurrentItemIndex(); - if ( currentIndex != 0 ) - { - if ( iContainer->MarkCount() > 0 ) - { - // At least one marked, "Edit" won't be displayed - aMenuPane->SetItemDimmed( EShortcutViewEditText, ETrue ); - aMenuPane->SetItemDimmed( EShortcutViewEditModel, ETrue ); - } - else - { - // All unmark, "Edit" will be displayed. - aMenuPane->SetItemDimmed( EShortcutViewEditText, EFalse ); - aMenuPane->SetItemDimmed( EShortcutViewEditModel, EFalse ); - } - aMenuPane->SetItemDimmed( EShortcutViewDelete, EFalse ); - aMenuPane->SetItemDimmed( EShortcutViewMark, EFalse ); - aMenuPane->SetItemDimmed( EShortcutViewUnmark, EFalse ); - if ( iContainer->IsMarked( currentIndex ) ) - { - // The currently selected item mark, display "Unmark" - aMenuPane->SetItemDimmed( EShortcutViewMark, ETrue ); - } - else - { - // The currently selected item unmark, display "Mark" - aMenuPane->SetItemDimmed( EShortcutViewUnmark, ETrue ); - } - - // Hide Reset introduction - aMenuPane->SetItemDimmed( EShortcutViewResetInfoMessage, ETrue ); - } - else - { - aMenuPane->SetItemDimmed( EShortcutViewEditText, ETrue ); - aMenuPane->SetItemDimmed( EShortcutViewEditModel, ETrue ); - aMenuPane->SetItemDimmed( EShortcutViewDelete, ETrue ); - aMenuPane->SetItemDimmed( EShortcutViewMark, ETrue ); - aMenuPane->SetItemDimmed( EShortcutViewUnmark, ETrue ); - - // Check value of setting of introduction - TBool isDimReset = iContainer->IsResetIntroduction() ? EFalse : ETrue; - aMenuPane->SetItemDimmed( EShortcutViewResetInfoMessage, isDimReset ); - } - } - } - -// --------------------------------------------------------------------------- -// From class MEikMenuObserver. -// Dynamically initialises a menu bar. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::DynInitMenuBarL( TInt aResourceId, - CEikMenuBar* /*aMenuBar*/ ) - { - if ( aResourceId == R_TRUI_SHORTCUTSVIEW_CONTEXT_MENUBAR ) - { - iContainer->SetDisplayPopupWindow( ETrue ); - } - } - -// --------------------------------------------------------------------------- -// From class MAknToolbarObserver. -// Handles toolbar events for a certain toolbar item. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::OfferToolbarEventL( TInt aCommand ) - { - switch ( aCommand ) - { - case EShortcutsViewButtonIdEditText: - { - // Open the text setting view - iContainer->EditShortcutL( ETrue ); - break; - } - case EShortcutsViewButtonIdEditModel: - { - // Open the shortcut edit view - iContainer->EditShortcutL( EFalse ); - break; - } - case EShortcutsViewButtonIdDelete: - { - iContainer->DeleteShortcutL(); - break; - } - } - } -// --------------------------------------------------------------------------- -// From CAknView. This function processes user commands. -// --------------------------------------------------------------------------- -// -void CTruiShortcutsView::ProcessCommandL( TInt aCommand ) - { - if ( !iContainer ) - { - return; - } - CAknView::ProcessCommandL( aCommand ); - } diff -r fc42a86c98e3 -r 694fa80c203c textinput/peninputhwrtrui/src/truitextsettingpagecontainer.cpp --- a/textinput/peninputhwrtrui/src/truitextsettingpagecontainer.cpp Wed Jun 23 04:57:58 2010 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,343 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implement of class CTruiTextSettingPageContainer -* -*/ - - -#include -#include -#include -#include -#include - -#include "truitextsettingpagecontainer.h" -#include "truihwrbox.h" -#include "truiappui.h" -#include "truiengine.h" -#include "truishortcutsview.h" -#include "truiapplication.h" -#include "truiinfomessageview.h" -#include "truishortcuteditview.h" -#include "truishortcutedittextview.h" -#include "trui.hrh" -#include "truicontainerbase.h" - -// Initialized size for hwrbox -const TSize KHwrboxSize = TSize( 100, 100 ); - -// The x-cordination of hwrbox pos -const TInt KHwrBoxPosPortraitX = 60; -const TInt KHwrBoxPosLandscapeX = 100; - -const TInt KPopupWindowVarity = 1; - -const TInt KParaDelimiterSize = 1; - -_LIT( KParaDelimiterFormat, "%c" ); - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Constructor. -// --------------------------------------------------------------------------- -// -CTruiTextSettingPageContainer::CTruiTextSettingPageContainer - ( TInt aResourceID, TDes& aText, TInt aTextSettingPageFlags ) - :CAknTextSettingPage( aResourceID, aText, aTextSettingPageFlags ) - { - } - -// --------------------------------------------------------------------------- -// Perform the second phase construction of a CTruiMainViewContainer object. -// --------------------------------------------------------------------------- -// -void CTruiTextSettingPageContainer::ConstructL( const TRect& aRect, TBool aEnableHwrBox ) - { - CAknTextSettingPage::ConstructL(); - TextControl()->SetObserver( this ); - // Check character model - CEikEdwin* edwin = static_cast( EditorControl() ); - HBufC* shortcutText = edwin->GetTextInHBufL(); - if ( shortcutText ) - { - // Replace paragraph seperator to line break - TPtr ptr = shortcutText->Des(); - TBuf paraDelimiter; - paraDelimiter.Format( KParaDelimiterFormat, EKeyEnter ); - AknTextUtils::ReplaceCharacters( ptr, paraDelimiter, - TChar( CEditableText::EParagraphDelimiter ) ); - CleanupStack::PushL( shortcutText ); - edwin->SetTextL( shortcutText ); - CleanupStack::PopAndDestroy( shortcutText ); - } - - if ( aEnableHwrBox ) - { - CTruiAppUi* appUi = static_cast( iAvkonViewAppUi ); - CTruiEngine* engine = appUi->HwrEngine(); - if ( engine->CheckShortcutModel( engine->Shortcut() ) ) - { - // Create hwrbox - iHwrBox = CTruiHwrBox::NewL( NULL, NULL ); - iHwrBox->SetHwrBoxFlag( CTruiHwrBox::ENoFrameHwrBox - | CTruiHwrBox::EReadOnlyHwrBox); - - // Create preview popup - iPopupController = CAknPreviewPopUpController::NewL - ( *iHwrBox, CAknPreviewPopUpController::EPermanentMode ); - iPopupController->AddObserverL( *this ); - // Set guide line - iHwrBox->SetDisplayBottomGuideLine( ETrue ); - if ( engine->CurrentLanguageScript() == EMainViewSubmenuHebrew ) - { - iHwrBox->SetDisplayTopGuideLine( ETrue ); - } - iPopupController->SetPopUpShowDelay( 0 ); - } - } - SetRect( aRect ); - if ( iPopupController ) - { - iPopupController->ShowPopUp(); - } - ActivateL(); - } - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CTruiTextSettingPageContainer* CTruiTextSettingPageContainer::NewL - ( TInt aResourceId, - TDes& aText, - const TRect& aRect, - TBool aEnableHwrBox, - TInt aTextSettingPageFlags ) - { - CTruiTextSettingPageContainer* self = CTruiTextSettingPageContainer::NewLC - ( aResourceId, aText, - aRect, - aEnableHwrBox, - aTextSettingPageFlags ); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CTruiTextSettingPageContainer* CTruiTextSettingPageContainer::NewLC - ( TInt aResourceId, - TDes& aText, - const TRect& aRect, - TBool aEnableHwrBox, - TInt aTextSettingPageFlags ) - { - CTruiTextSettingPageContainer* self = new (ELeave) - CTruiTextSettingPageContainer - ( aResourceId, aText, - aTextSettingPageFlags ); - CleanupStack::PushL( self ); - self->ConstructL( aRect, aEnableHwrBox ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor. -// --------------------------------------------------------------------------- -// - -CTruiTextSettingPageContainer::~CTruiTextSettingPageContainer() - { - delete iPopupController; - delete iHwrBox; - } - -// --------------------------------------------------------------------------- -// Responds to changes to the size and position of the contents of this control. -// --------------------------------------------------------------------------- -// -void CTruiTextSettingPageContainer::SizeChanged() - { - CAknTextSettingPage::SizeChanged(); - - if ( iHwrBox ) - { - // caculate main pane - TRect rect = Rect(); - TAknWindowComponentLayout main_pane_layout = - AknLayoutScalable_Apps::main_hwr_training_pane(); - TAknLayoutRect main_pane_layout_rect; - main_pane_layout_rect.LayoutRect( rect, main_pane_layout ); - TRect main_pane_rect = main_pane_layout_rect.Rect(); - - // Calculate popup_hwr_training_preview_window - TAknWindowComponentLayout preview_popup_layout = - AknLayoutScalable_Apps::popup_hwr_training_preview_window - ( KPopupWindowVarity ); - TAknLayoutRect preview_popup_layout_rect; - preview_popup_layout_rect.LayoutRect( main_pane_rect, preview_popup_layout ); - - TPoint labelPos = TextLabel()->PositionRelativeToScreen(); - TPoint hwrPos = TPoint( 0, 0 ); - if ( TBidiText::ScriptDirectionality( User::Language() ) - == TBidiText::ELeftToRight ) - { - TInt offset = Layout_Meta_Data::IsLandscapeOrientation() ? - KHwrBoxPosLandscapeX : KHwrBoxPosPortraitX; - hwrPos = labelPos + TPoint( offset, TextLabel()->Size().iHeight ); - } - else - { - hwrPos = labelPos + TPoint( TextLabel()->Size().iWidth, - TextLabel()->Size().iHeight ); - } - - iHwrBox->SetSize( preview_popup_layout_rect.Rect().Size() ); - iPopupController->SetPosition( hwrPos ); - } - } - -// --------------------------------------------------------------------------- -// Processes events from the softkeys. -// --------------------------------------------------------------------------- -// -void CTruiTextSettingPageContainer::ProcessCommandL( TInt aCommandId ) - { - HideMenu(); - switch ( aCommandId ) - { - case EAknSoftkeyOk: - case EAknSoftkeySelect: - { - // Get the current text in setting page - CTruiAppUi* appUi = static_cast( iAvkonViewAppUi ); - CTruiEngine* engine = appUi->HwrEngine(); - CEikEdwin* edwin = static_cast( EditorControl() ); - HBufC* shortcutText = edwin->GetTextInHBufL(); - CleanupStack::PushL( shortcutText ); - // Replace paragraph seperator to line break - TPtr ptr = shortcutText->Des(); - TBuf paraDelimiter; - paraDelimiter.Format( KParaDelimiterFormat, CEditableText::EParagraphDelimiter ); - AknTextUtils::ReplaceCharacters( ptr, paraDelimiter, TChar( EKeyEnter ) ); - // Update new text - engine->ChangeShortcutTextL( *shortcutText ); - // Recalculate selected index of shortcut list - // Update shortcut list - engine->UpdateShortcutListL(); - // Find the current shortcut's index in shortcut list - TInt index = 0; - CDesCArray* shortcutList = engine->ShortcutTextList(); - if ( shortcutList ) - { - TInt ret = 0; - ret = shortcutList->Find( *shortcutText, index ); - if ( ret == KErrNotFound ) - { - TInt oldIndex = engine->CurrentSelectedIndex(); - index = ( oldIndex > shortcutList->Count() ) - ? shortcutList->Count() : oldIndex; - } - } - // Set current index in Engine - engine->SetCurrentSelectedIndex( index + 1 ); - CleanupStack::PopAndDestroy( shortcutText ); - // Store the content of setting page - UpdateSettingL(); - CTruiShortcutEditTextView* view = - static_cast - ( appUi->View( KTruiShortcutEditTextViewId ) ); - if ( view->StartViewId() == - TVwsViewId( KUidtruiApp, KTruiInfoMessageViewId ) ) - { - ProcessCommandL( EAknSoftkeyNext ); - } - else - { - // Switch to shortcuts view. - iAvkonViewAppUi->ActivateLocalViewL - ( view->StartViewId().iViewUid ); - } - break; - } - case EAknSoftkeyCancel: - { - iAvkonViewAppUi->ActivateLocalViewL( KTruiShortcutsViewId ); - break; - } - case EAknSoftkeyNext: - { - UpdateSettingL(); - // Get the current text in setting page - CTruiAppUi* appUi = static_cast( iAvkonViewAppUi ); - CTruiEngine* engine = appUi->HwrEngine(); - CEikEdwin* edwin = static_cast( EditorControl() ); - HBufC* shortcutText = edwin->GetTextInHBufL(); - CleanupStack::PushL( shortcutText ); - // Replace paragraph seperator to line break - TPtr ptr = shortcutText->Des(); - TBuf paraDelimiter; - paraDelimiter.Format( KParaDelimiterFormat, CEditableText::EParagraphDelimiter ); - AknTextUtils::ReplaceCharacters( ptr, paraDelimiter, TChar( EKeyEnter ) ); - engine->SetShortcut( ptr ); - CleanupStack::PopAndDestroy( shortcutText ); - iAvkonViewAppUi->ActivateLocalViewL( KTruiShortcutEditViewId ); - break; - } - case EAknSoftkeyBack: - { - CTruiAppUi* appUi = static_cast( iAvkonViewAppUi ); - CTruiEngine* engine = appUi->HwrEngine(); - if ( engine->DisplayWizard() ) - { - iAvkonViewAppUi->ActivateLocalViewL( KTruiInfoMessageViewId ); - } - else - { - iAvkonViewAppUi->ActivateLocalViewL( KTruiShortcutsViewId ); - } - break; - } - } - } - -// --------------------------------------------------------------------------- -// From MAknPreviewPopUpObserver -// Called by the preview popup when an appropriate event takes place. -// --------------------------------------------------------------------------- -// -void CTruiTextSettingPageContainer::HandlePreviewPopUpEventL( - CAknPreviewPopUpController* aController, TPreviewPopUpEvent aEvent ) - { - if ( aController == iPopupController && aEvent == EPreviewPopUpShown ) - { - CTruiAppUi* appUi = static_cast( iAvkonViewAppUi ); - CTruiEngine* engine = appUi->HwrEngine(); - CEikEdwin* edwin = TextControl(); - HBufC* shortcutText = edwin->GetTextInHBufL(); - CleanupStack::PushL( shortcutText ); - // Get character model - TUint unicode = 0; - TRAPD( err, engine->GetShortcutModelL( engine->Shortcut(), iHwrBox->Model(), unicode ) ); - if ( err == KErrNone ) - { - TSize refSize = CTruiContainerBase::OriginSymbolSize(); - iHwrBox->ShowTrails( iHwrBox->Model(), ETrue, refSize ); - } - CleanupStack::PopAndDestroy( shortcutText ); - } - }