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