|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Implementation for chinese peninput full screen hwr |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __PENINPUTHWRFSCNCANDIDATEPANEL_H__ |
|
20 #define __PENINPUTHWRFSCNCANDIDATEPANEL_H__ |
|
21 |
|
22 #include "peninputhwrfscnbasepanel.h" |
|
23 #include "peninputhwrfscnstatemanager.h" |
|
24 #include "peninputhwrfscndatastore.h" |
|
25 #include "peninputdropdownlist.h" |
|
26 |
|
27 /** |
|
28 * Class CPeninputHwrfscnCandidatePanel |
|
29 * |
|
30 * Define the candidate panel and contain the candidate window |
|
31 * |
|
32 * @lib peninputhwrfscn.lib |
|
33 * @since S60 v5.0 |
|
34 */ |
|
35 class CPeninputHwrfscnCandidatePanel : public CPeninputHwrfscnBasePanel |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * The factory function |
|
40 * |
|
41 * @since Series 60 5.0 |
|
42 * @param aLayout The Full screen layout |
|
43 * @return Pointer to created CPeninputHwrfscnCandidatePanel object |
|
44 */ |
|
45 static CPeninputHwrfscnCandidatePanel* NewL( CPeninputHwrfscnLayout* aLayout ); |
|
46 |
|
47 /** |
|
48 * The destructor function |
|
49 * |
|
50 * @since Series 60 5.0 |
|
51 */ |
|
52 ~CPeninputHwrfscnCandidatePanel(); |
|
53 |
|
54 public: |
|
55 /** |
|
56 * From CPeninputHwrfscnBasePanel |
|
57 * Show controls |
|
58 * |
|
59 * @since Series 60 5.0 |
|
60 * @param aVisible Show or hide |
|
61 */ |
|
62 void Show( TBool aVisible ); |
|
63 |
|
64 /** |
|
65 * From CPeninputHwrfscnBasePanel |
|
66 * Draw |
|
67 * |
|
68 * @since Series 60 5.0 |
|
69 */ |
|
70 virtual void Draw(); |
|
71 |
|
72 /** |
|
73 * From CPeninputHwrfscnBasePanel |
|
74 * Handle control's event |
|
75 * |
|
76 * @since Series 60 5.0 |
|
77 * @param aEventType Event type |
|
78 * @param aCtrl Event source |
|
79 * @param aEventData event data |
|
80 */ |
|
81 virtual void HandleControlEvent( TInt aEventType, CFepUiBaseCtrl* aCtrl, |
|
82 const TDesC& aEventData ); |
|
83 |
|
84 /** |
|
85 * From CPeninputHwrfscnBasePanel |
|
86 * Handle layout command |
|
87 * |
|
88 * @since Series 60 5.0 |
|
89 * @param aCommand command type |
|
90 * @param aData Event data |
|
91 */ |
|
92 virtual void HandleCommand( TInt aCommand, TUint8* aData ); |
|
93 |
|
94 /** |
|
95 * From CPeninputHwrfscnBasePanel |
|
96 * Check if the property could be changed before changing it. |
|
97 * |
|
98 * @since S60 v5.0 |
|
99 * @param aProperty One of @see TPeninputHwrfscnProperty changed |
|
100 * @return TBool ETrue if the property needed to be changed, EFalse otherwise |
|
101 */ |
|
102 virtual TBool BeforePropertyChangedL( |
|
103 MPeninputHwrfscnPropertySubscriber:: |
|
104 TPeninputHwrfscnProperty aProptery ); |
|
105 |
|
106 /** |
|
107 * From CPeninputHwrfscnBasePanel |
|
108 * Notify the property subscriber the property changed. |
|
109 * |
|
110 * @since S60 v5.0 |
|
111 * @param aProperty One of @see TPeninputHwrfscnProperty changed |
|
112 */ |
|
113 virtual void PropertyChangedL( |
|
114 MPeninputHwrfscnPropertySubscriber:: |
|
115 TPeninputHwrfscnProperty aProptery ); |
|
116 |
|
117 /** |
|
118 * From CPeninputHwrfscnBasePanel |
|
119 * Handle size changed. |
|
120 * |
|
121 * @since S60 v5.0 |
|
122 */ |
|
123 void SizeChanged(); |
|
124 |
|
125 /** |
|
126 * From CPeninputHwrfscnBasePanel |
|
127 * Handle laf (Look and feel) changed |
|
128 * |
|
129 * @since S60 v5.0 |
|
130 */ |
|
131 void LafChanged(); |
|
132 |
|
133 /** |
|
134 * Show or Hide writing candidate dropdown list |
|
135 * |
|
136 * @since S60 v5.0 |
|
137 * @param aVisible Show or hide |
|
138 */ |
|
139 void ShowWritingCandidate( TBool aVisible ); |
|
140 |
|
141 private: |
|
142 /** |
|
143 * The constructor |
|
144 * |
|
145 * @since S60 5.0 |
|
146 * @param aLayout The layout pointer. |
|
147 */ |
|
148 CPeninputHwrfscnCandidatePanel( CPeninputHwrfscnLayout* aLayout ); |
|
149 |
|
150 /** |
|
151 * 2nd phase constructor |
|
152 * |
|
153 * @since S60 5.0 |
|
154 */ |
|
155 void ConstructL(); |
|
156 |
|
157 /** |
|
158 * Create writing candidate dropdown list |
|
159 * |
|
160 * @since S60 5.0 |
|
161 */ |
|
162 void AddCandidateDropdownListL(); |
|
163 |
|
164 /** |
|
165 * Create predictive candidate dropdown list |
|
166 * |
|
167 * @since S60 5.0 |
|
168 */ |
|
169 void AddPredictiveDropdownListL(); |
|
170 |
|
171 /** |
|
172 * Read LAF information |
|
173 * |
|
174 * @since S60 5.0 |
|
175 * @param aLandscapeStyle Landscape style |
|
176 */ |
|
177 void ReadLafInfo( TBool aLandscapeStyle ); |
|
178 |
|
179 /** |
|
180 * Move the candidate window when cursor moving |
|
181 * |
|
182 * @since S60 5.0 |
|
183 * @param aCursorRect The cursor rect |
|
184 */ |
|
185 void MoveCandidateWindow( const TRect aCursorRect ); |
|
186 |
|
187 /** |
|
188 * Clear the candidate window |
|
189 * |
|
190 * @since S60 5.0 |
|
191 */ |
|
192 void ClearWindow(); |
|
193 |
|
194 /** |
|
195 * Get the max row number according to different primary range |
|
196 * |
|
197 * @since S60 5.0 |
|
198 * @return TInt the max row number |
|
199 */ |
|
200 TInt MaxRowNum(); |
|
201 |
|
202 /** |
|
203 * Check the validity of the cursor position |
|
204 * |
|
205 * @since S60 5.0 |
|
206 * @param aCursorRect The cursor rect |
|
207 * @return TBool the cursor position is valid or not |
|
208 */ |
|
209 TBool CheckCursorPosition( const TRect aCursorRect ) const; |
|
210 |
|
211 private: |
|
212 /** |
|
213 * The writing candidate pointer |
|
214 * Own |
|
215 */ |
|
216 CFepCtrlDropdownList *iCandidateList; |
|
217 |
|
218 /** |
|
219 * The predictive candidate pointer |
|
220 * Own |
|
221 */ |
|
222 CFepCtrlDropdownList *iPredictList; |
|
223 |
|
224 /** |
|
225 * The data store object |
|
226 */ |
|
227 CPeninputHwrfscnDataStore& iDataStore; |
|
228 |
|
229 /** |
|
230 * The unit width |
|
231 */ |
|
232 TInt iUnitWidth; |
|
233 |
|
234 /** |
|
235 * The unit height |
|
236 */ |
|
237 TInt iUnitHeight; |
|
238 }; |
|
239 |
|
240 #endif //__PENINPUTHWRFSCNCANDIDATEPANEL_H__ |