|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: drop-down list control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_GENERICITUTUIMGRBASE_H |
|
20 #define C_GENERICITUTUIMGRBASE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <PtiDefs.h> |
|
24 |
|
25 class CGenericItutUiStateBase; |
|
26 class MItutLayoutContext; |
|
27 class CGenericItutDataMgr; |
|
28 class CFepUiBaseCtrl; |
|
29 class CGenericItutWindowManager; |
|
30 |
|
31 class CGenericItutUiMgrBase : public CBase |
|
32 { |
|
33 public: |
|
34 enum TUiState |
|
35 { |
|
36 EStateNull, |
|
37 // chinese ui state |
|
38 EStateStandby, |
|
39 EStateComposition, |
|
40 EStatePredict, |
|
41 // western ui state |
|
42 EStateWesternStandby, |
|
43 EStateCustomization, |
|
44 EStateMatchSelection, |
|
45 EStateSpelling |
|
46 }; |
|
47 |
|
48 public: |
|
49 |
|
50 virtual ~CGenericItutUiMgrBase(); |
|
51 |
|
52 // called by ui layout |
|
53 virtual TInt HandleCommandL(TInt aCmd, TUint8* aData); |
|
54 |
|
55 // handle control event |
|
56 virtual TBool HandleCtrlEventL( TInt aEventType, |
|
57 CFepUiBaseCtrl* aCtrl, |
|
58 const TDesC& aEventData); |
|
59 |
|
60 virtual void SetCurrentStateL(TUiState aNewState) = 0; |
|
61 |
|
62 virtual void ActivateUiL() = 0; |
|
63 |
|
64 virtual void DeactivateUI() = 0; |
|
65 |
|
66 virtual void HandleLongPressNumberKeyL(TPtiKey aKey); |
|
67 |
|
68 inline void SetNumLongPressValid(TBool aValid); |
|
69 |
|
70 inline TBool NumLongPressValid(); |
|
71 |
|
72 inline MItutLayoutContext* LayoutContext(); |
|
73 |
|
74 inline CGenericItutDataMgr* DataMgr(); |
|
75 |
|
76 inline CGenericItutUiStateBase* CurrentState(); |
|
77 |
|
78 inline TBool ClrConsumed(); |
|
79 |
|
80 inline void SetClrConsume(TBool aConsume); |
|
81 |
|
82 inline CGenericItutWindowManager* UiManager(); |
|
83 |
|
84 protected: |
|
85 |
|
86 CGenericItutUiMgrBase(MItutLayoutContext* aContext, |
|
87 CGenericItutDataMgr* aDataMgr, |
|
88 CGenericItutWindowManager* aUiManager); |
|
89 |
|
90 virtual void ConstructL(); |
|
91 |
|
92 protected: |
|
93 |
|
94 // not own |
|
95 MItutLayoutContext* iLayoutContext; |
|
96 |
|
97 // not own |
|
98 CGenericItutDataMgr* iDataMgr; |
|
99 |
|
100 CGenericItutUiStateBase* iCurrentState; |
|
101 |
|
102 TBool iNumLongPressValid; |
|
103 |
|
104 TBool iClrConsume; |
|
105 |
|
106 CGenericItutWindowManager* iUiMgr; |
|
107 }; |
|
108 |
|
109 inline MItutLayoutContext* CGenericItutUiMgrBase::LayoutContext() |
|
110 { |
|
111 return iLayoutContext; |
|
112 } |
|
113 |
|
114 inline CGenericItutDataMgr* CGenericItutUiMgrBase::DataMgr() |
|
115 { |
|
116 return iDataMgr; |
|
117 } |
|
118 |
|
119 inline CGenericItutUiStateBase* CGenericItutUiMgrBase::CurrentState() |
|
120 { |
|
121 return iCurrentState; |
|
122 } |
|
123 |
|
124 inline void CGenericItutUiMgrBase::SetNumLongPressValid(TBool aValid) |
|
125 { |
|
126 iNumLongPressValid = aValid; |
|
127 } |
|
128 |
|
129 inline TBool CGenericItutUiMgrBase::NumLongPressValid() |
|
130 { |
|
131 return iNumLongPressValid; |
|
132 } |
|
133 |
|
134 inline TBool CGenericItutUiMgrBase::ClrConsumed() |
|
135 { |
|
136 return iClrConsume; |
|
137 } |
|
138 |
|
139 inline void CGenericItutUiMgrBase::SetClrConsume(TBool aConsume) |
|
140 { |
|
141 iClrConsume = aConsume; |
|
142 } |
|
143 |
|
144 inline CGenericItutWindowManager* CGenericItutUiMgrBase::UiManager() |
|
145 { |
|
146 return iUiMgr; |
|
147 } |
|
148 |
|
149 #endif // C_GENERICITUTUIMGRBASE_H |