|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef PENINPUTHWRARABICLAYOUT_ |
|
18 #define PENINPUTHWRARABICLAYOUT_ |
|
19 // User includes |
|
20 #include "peninputcommonlayout.h" |
|
21 |
|
22 class CPeninputHwrBxAbWnd; |
|
23 /** |
|
24 * Pen input HWR layout class |
|
25 * This class define the behaviors of HWR layout |
|
26 * |
|
27 * @lib peninputgenerichwr.lib |
|
28 * @since S60 v5.0 |
|
29 */ |
|
30 class CPeninputHwrBxAbLayout : public CPeninputCommonLayout |
|
31 { |
|
32 |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Two-phased constructor |
|
37 * |
|
38 * @since S60 v5.0 |
|
39 * @param aLafEnv The LAF enviroment |
|
40 * @param aLayoutOwner The owner of layout |
|
41 * @param aInitData Init data of layout |
|
42 * @return The pointer to CPeninputHwrBxAbLayout object |
|
43 */ |
|
44 static CPeninputHwrBxAbLayout* NewL( MLayoutOwner* aLayoutOwner, |
|
45 const TAny* aInitData ); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 * |
|
50 * @since S60 v5.0 |
|
51 * @return None |
|
52 */ |
|
53 virtual ~CPeninputHwrBxAbLayout(); |
|
54 |
|
55 // From base class CPeninputCommonLayout |
|
56 |
|
57 /** |
|
58 * From CPeninputCommonLayout |
|
59 * Handle layout command event |
|
60 * |
|
61 * @since S60 v5.0 |
|
62 * @param aCmd Command Id |
|
63 * @param aData Data for command |
|
64 * @return Errors when return value smaller than zero |
|
65 */ |
|
66 TInt HandleCommand( TInt aCmd, TUint8* aData ); |
|
67 /** |
|
68 * From CFepUiLayout |
|
69 * Handle the event from control |
|
70 * |
|
71 * @since S60 v3.2 |
|
72 * @param aEventType The event type |
|
73 * @param aCtrl The sender |
|
74 * @param aEventData The event data |
|
75 * @return None |
|
76 */ |
|
77 void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, |
|
78 const TDesC& aEventData); |
|
79 /** |
|
80 * Get layout window |
|
81 * |
|
82 * @since S60 v3.2 |
|
83 * @return The pointer to CPeninputLayoutWindow object |
|
84 */ |
|
85 CPeninputLayoutWindow* LayoutWindow() const; |
|
86 |
|
87 void TranslateCharCode( TDes& aCharCode ); |
|
88 |
|
89 void ReplaceL(const TDesC& aOldCharCode, const TDesC& aNewCharCode); |
|
90 void SubmitL(const TDesC& aCharCode); |
|
91 void ToPenStandBy(TBool aNotStandBy = EFalse); |
|
92 |
|
93 protected: |
|
94 |
|
95 /** |
|
96 * Constructor |
|
97 * |
|
98 * @since S60 v5.0 |
|
99 * @param aLayoutOwner The owner of layout |
|
100 * @return None |
|
101 */ |
|
102 CPeninputHwrBxAbLayout( MLayoutOwner* aLayoutOwner ); |
|
103 |
|
104 // From base class CPeninputCommonLayout |
|
105 |
|
106 /** |
|
107 * From CPeninputCommonLayout |
|
108 * Factory method for creation of layout window. The decision which |
|
109 * layout window(VKB or HWR) is created will be postboned in subclasses |
|
110 * of this class |
|
111 * |
|
112 * @since S60 v5.0 |
|
113 * @return None |
|
114 */ |
|
115 void CreateLayoutWindowL(); |
|
116 |
|
117 /** |
|
118 * From CPeninputCommonLayout |
|
119 * Factory method for creation resource config. It is enough at present |
|
120 * to create and initialize resource config. Any necessary extension |
|
121 * will be implemented in subclasses |
|
122 * |
|
123 * @since S60 v5.0 |
|
124 * @return None |
|
125 */ |
|
126 void CreateDataMgrL( const TAny* aInitData ); |
|
127 |
|
128 /** |
|
129 * From CPeninputCommonLayout |
|
130 * Get the layout type, VKB or HWR, child class must rewrite the function |
|
131 * |
|
132 * @since S60 v5.0 |
|
133 * @return The layout type |
|
134 */ |
|
135 TInt LayoutType(); |
|
136 |
|
137 /** |
|
138 * SemiTransparencyRequired. Tell whether this layout require transparency. |
|
139 * This is to save memory used in mask bitmap. If transparency not deeded, |
|
140 * We use black-white bitmap. |
|
141 * |
|
142 * @since S60 v5.0 |
|
143 * @return ETrue if layout require transparency, otherwise EFalse. |
|
144 */ |
|
145 TBool SemiTransparencyRequired(); |
|
146 |
|
147 protected: |
|
148 |
|
149 /** |
|
150 * Second phase constructor |
|
151 * |
|
152 * @since S60 v5.0 |
|
153 * @param aInitData Init data of layout |
|
154 * @return None |
|
155 */ |
|
156 void ConstructL( const TAny* aInitData ); |
|
157 |
|
158 }; |
|
159 |
|
160 |
|
161 /** |
|
162 * Pen input HWR layout implementation class |
|
163 * This class define the implementation interface of HWR layout |
|
164 * |
|
165 * @lib peninputgenerichwr.lib |
|
166 * @since S60 v5.0 |
|
167 */ |
|
168 class CPeninputHwrBxAbLayoutImp : public CFepUiLayoutInterface |
|
169 { |
|
170 |
|
171 public: |
|
172 |
|
173 /** |
|
174 * Two-phased constructor |
|
175 * |
|
176 * @since S60 v5.0 |
|
177 * @param aInitParams Init data for layout |
|
178 * @return The pointer to CPeninputHwrBxAbLayoutImp object |
|
179 */ |
|
180 static CPeninputHwrBxAbLayoutImp* NewL( TAny* aInitParams ); |
|
181 |
|
182 /** |
|
183 * Destructor |
|
184 * |
|
185 * @since S60 v5.0 |
|
186 * @return None |
|
187 */ |
|
188 virtual ~CPeninputHwrBxAbLayoutImp(); |
|
189 |
|
190 // From base class CFepUiLayoutInterface |
|
191 |
|
192 /** |
|
193 * From CFepUiLayoutInterface |
|
194 * Create fep ui layout |
|
195 * |
|
196 * @since S60 v5.0 |
|
197 * @param aLayoutOwner The layout owner |
|
198 * @param aData The data for creating layout |
|
199 * @return The pointer to CFepUiLayout object |
|
200 */ |
|
201 CFepUiLayout* CreateFepUiLayoutL( MLayoutOwner* aLayoutOwner, |
|
202 const TAny* aData ); |
|
203 |
|
204 private: |
|
205 |
|
206 /** |
|
207 * Constructor |
|
208 * |
|
209 * @since S60 v5.0 |
|
210 * @return None |
|
211 */ |
|
212 CPeninputHwrBxAbLayoutImp(); |
|
213 |
|
214 /** |
|
215 * Second phase constructor |
|
216 * |
|
217 * @since S60 v5.0 |
|
218 * @return None |
|
219 */ |
|
220 void Construct(); |
|
221 |
|
222 }; |
|
223 |
|
224 #endif /*PENINPUTHWRARABICLAYOUT_*/ |