44
|
1 |
/*
|
|
2 |
* Copyright (c) 2009-2010 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 of LAF manager.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDES
|
|
20 |
#include <aknlayoutscalable_avkon.cdl.h>
|
|
21 |
#include <aknlayoutscalable_apps.cdl.h>
|
|
22 |
#include <AknUtils.h>
|
|
23 |
|
|
24 |
#include "peninputfingerhwrarlafmanager.h"
|
|
25 |
#include "peninputfingerhwrarcontrolid.h"
|
|
26 |
|
|
27 |
//#define HackerVersion
|
|
28 |
#define ARABIC_LAF
|
|
29 |
|
|
30 |
const TInt KSymButtonNum = 3;
|
|
31 |
const TInt KFuncButtonRowNum = 2;
|
|
32 |
const TInt KFuncButtonColNum = 4;
|
|
33 |
const TInt KLandscapeVirtualKeypadRow = 4;
|
|
34 |
const TInt KLandscapeVirtualKeypadCol = 6;
|
|
35 |
const TInt KLandscapeNumpadRow = 4;
|
|
36 |
const TInt KLandscapeNumpadCol = 4;
|
|
37 |
|
|
38 |
// ---------------------------------------------------------------------------
|
|
39 |
// Symbian Constructor
|
|
40 |
// ---------------------------------------------------------------------------
|
|
41 |
//
|
|
42 |
CPeninputFingerHwrArLafManager* CPeninputFingerHwrArLafManager::NewL()
|
|
43 |
{
|
|
44 |
CPeninputFingerHwrArLafManager* self = CPeninputFingerHwrArLafManager::NewLC();
|
|
45 |
CleanupStack::Pop(); // self;
|
|
46 |
return self;
|
|
47 |
}
|
|
48 |
|
|
49 |
// ---------------------------------------------------------------------------
|
|
50 |
// Symbian Constructor
|
|
51 |
// ---------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
CPeninputFingerHwrArLafManager* CPeninputFingerHwrArLafManager::NewLC()
|
|
54 |
{
|
|
55 |
CPeninputFingerHwrArLafManager* self = new( ELeave ) CPeninputFingerHwrArLafManager();
|
|
56 |
CleanupStack::PushL( self );
|
|
57 |
self->ConstructL();
|
|
58 |
return self;
|
|
59 |
}
|
|
60 |
|
|
61 |
// ---------------------------------------------------------------------------
|
|
62 |
// c++ constructor
|
|
63 |
// ---------------------------------------------------------------------------
|
|
64 |
//
|
|
65 |
CPeninputFingerHwrArLafManager::CPeninputFingerHwrArLafManager()
|
|
66 |
{
|
|
67 |
|
|
68 |
}
|
|
69 |
|
|
70 |
// ---------------------------------------------------------------------------
|
|
71 |
// Symbian second-phase constructor
|
|
72 |
// ---------------------------------------------------------------------------
|
|
73 |
//
|
|
74 |
void CPeninputFingerHwrArLafManager::ConstructL()
|
|
75 |
{
|
|
76 |
}
|
|
77 |
|
|
78 |
// ---------------------------------------------------------------------------
|
|
79 |
// c++ destructor
|
|
80 |
// ---------------------------------------------------------------------------
|
|
81 |
//
|
|
82 |
CPeninputFingerHwrArLafManager::~CPeninputFingerHwrArLafManager()
|
|
83 |
{
|
|
84 |
iSCTrectArray.Close();
|
|
85 |
iSymBtnRectArray.Close();
|
|
86 |
iNumSCTrectArray.Close();
|
|
87 |
// iNumSymBtnRectArray.Close();
|
|
88 |
}
|
|
89 |
|
|
90 |
// ---------------------------------------------------------------------------
|
|
91 |
// CPeninputFingerHwrArLafManager::RetrieveLayoutData()
|
|
92 |
// Retrieve layout data
|
|
93 |
// ---------------------------------------------------------------------------
|
|
94 |
//
|
|
95 |
void CPeninputFingerHwrArLafManager::RetrieveLayoutData()
|
|
96 |
{
|
|
97 |
// Screen
|
|
98 |
TRect rect;
|
|
99 |
AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
|
|
100 |
iScreenSize = rect.Size();
|
|
101 |
|
|
102 |
iIsLandscape = iScreenSize.iWidth < iScreenSize.iHeight ? EFalse : ETrue;
|
|
103 |
|
|
104 |
AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, rect);
|
|
105 |
|
|
106 |
// finger Layout
|
|
107 |
TAknWindowLineLayout fshwrlayout;
|
|
108 |
TAknLayoutRect fshwrRect;
|
|
109 |
|
|
110 |
fshwrlayout = AknLayoutScalable_Avkon::main_fep_fshwr2_pane(0).LayoutLine();
|
|
111 |
fshwrRect.LayoutRect(rect, fshwrlayout);
|
|
112 |
|
|
113 |
iLayoutRect = fshwrRect.Rect();
|
|
114 |
iLayoutOffset = iLayoutRect.iTl;
|
|
115 |
}
|
|
116 |
|
|
117 |
// ---------------------------------------------------------------------------
|
|
118 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForICF()
|
|
119 |
// Retrieve laf data for ICF editor
|
|
120 |
// ---------------------------------------------------------------------------
|
|
121 |
//
|
|
122 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForICF()
|
|
123 |
{
|
|
124 |
// ICF laf data
|
|
125 |
TAknWindowLineLayout icfLayout;
|
|
126 |
TAknLayoutRect icfLayoutRect;
|
|
127 |
|
|
128 |
// read the icf layout
|
|
129 |
icfLayout = AknLayoutScalable_Avkon::fshwr2_icf_pane(1).LayoutLine();
|
|
130 |
|
|
131 |
icfLayoutRect.LayoutRect(iLayoutRect, icfLayout);
|
|
132 |
iRectIcf = icfLayoutRect.Rect();
|
|
133 |
|
|
134 |
// read icf text line layout
|
|
135 |
TAknTextLineLayout icfTextLineLayoutRow1 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 0).LayoutLine();
|
|
136 |
TAknTextLineLayout icfTextLineLayoutRow2 = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, 1).LayoutLine();
|
|
137 |
TInt maxRow = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1_ParamLimits(0).LastRow();
|
|
138 |
TAknTextLineLayout icfTextLineLayoutLastRow = AknLayoutScalable_Avkon::fshwr2_icf_pane_t1(0, 0, maxRow-1).LayoutLine();
|
|
139 |
|
|
140 |
// read icf layout text
|
|
141 |
TAknLayoutText icfLayoutText1;
|
|
142 |
TAknLayoutText icfLayoutText2;
|
|
143 |
TAknLayoutText icfLayoutTextLastRow;
|
|
144 |
|
|
145 |
icfLayoutText1.LayoutText( iRectIcf, icfTextLineLayoutRow1 );
|
|
146 |
icfLayoutText2.LayoutText( iRectIcf, icfTextLineLayoutRow2 );
|
|
147 |
icfLayoutTextLastRow.LayoutText( iRectIcf, icfTextLineLayoutLastRow );
|
|
148 |
|
|
149 |
// get the margins
|
|
150 |
iIcfTextLeftMargin = icfTextLineLayoutRow1.il;
|
|
151 |
iIcfTextRightMargin = iIcfTextLeftMargin;
|
|
152 |
iIcfTextTopMargin = icfLayoutText1.TextRect().iTl.iY - iRectIcf.iTl.iY;
|
|
153 |
iIcfTextLineSpaceMargin = icfLayoutText2.TextRect().iTl.iY - icfLayoutText1.TextRect().iBr.iY;
|
|
154 |
iIcfTextBottomMargin = iRectIcf.iBr.iY - icfLayoutTextLastRow.TextRect().iBr.iY - iIcfTextLineSpaceMargin;
|
|
155 |
iIcfTextHeight = icfLayoutText1.TextRect().Height();
|
|
156 |
|
|
157 |
// get font for text
|
|
158 |
iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icfTextLineLayoutRow1.iFont, NULL));
|
|
159 |
|
|
160 |
//indicator bubble.
|
|
161 |
#ifdef ARABIC_LAF
|
|
162 |
if(iIsLandscape)
|
|
163 |
{
|
|
164 |
iRectIndicatorBubble.SetRect(543,17,624,41);
|
|
165 |
}
|
|
166 |
else
|
|
167 |
{
|
|
168 |
iRectIndicatorBubble.SetRect(263,17,344,41);
|
|
169 |
}
|
|
170 |
#endif
|
|
171 |
}
|
|
172 |
|
|
173 |
// ---------------------------------------------------------------------------
|
|
174 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForCandidateList()
|
|
175 |
// Retrieve the laf data for candidate list
|
|
176 |
// ---------------------------------------------------------------------------
|
|
177 |
//
|
|
178 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForCandidateList()
|
|
179 |
{
|
|
180 |
// retrieve the cell flow:
|
|
181 |
// fshwr2_func_candi_pane->fshwr2_func_candi_row_pane->fshwr2_func_candi_cell_pane
|
|
182 |
// ->fshwr2_func_candi_cell_bg_pane
|
|
183 |
|
|
184 |
// candidate list
|
|
185 |
TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine();
|
|
186 |
|
|
187 |
TAknLayoutRect candpaneRect;
|
|
188 |
candpaneRect.LayoutRect( iLayoutRect, candlistpane );
|
|
189 |
TRect rect = candpaneRect.Rect();
|
|
190 |
|
|
191 |
// get candiate row1 pane
|
|
192 |
TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
|
|
193 |
LayoutLine();
|
|
194 |
TAknLayoutRect candrow1paneRect;
|
|
195 |
candrow1paneRect.LayoutRect( rect, candRow1Pane );
|
|
196 |
|
|
197 |
// get candidate cell pane with row 1 and col 0
|
|
198 |
TAknWindowLineLayout cellPane1Row1 = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 0 , 1 ).
|
|
199 |
LayoutLine();
|
|
200 |
TAknLayoutRect cellPane1Row1Rect;
|
|
201 |
cellPane1Row1Rect.LayoutRect( candrow1paneRect.Rect(), cellPane1Row1 );
|
|
202 |
|
|
203 |
// get candidate cell bg pane
|
|
204 |
TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
|
|
205 |
TAknLayoutRect cellPane1Row1BgRect;
|
|
206 |
cellPane1Row1BgRect.LayoutRect( cellPane1Row1Rect.Rect(), candbgpane );
|
|
207 |
|
|
208 |
// get candidate cell pane with row 1 and col 1
|
|
209 |
TAknWindowLineLayout cellPane2Row1 = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 1 , 1 ).
|
|
210 |
LayoutLine();
|
|
211 |
TAknLayoutRect cellPane2Row1Rect;
|
|
212 |
cellPane2Row1Rect.LayoutRect( candrow1paneRect.Rect(), cellPane2Row1 );
|
|
213 |
|
|
214 |
// get candidate cell2 bg pane
|
|
215 |
candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
|
|
216 |
TAknLayoutRect cellPane2Row1BgRect;
|
|
217 |
cellPane2Row1BgRect.LayoutRect( cellPane2Row1Rect.Rect(), candbgpane );
|
|
218 |
|
|
219 |
// ====================================================================================================
|
|
220 |
// get candidate row2 pane
|
|
221 |
TAknWindowLineLayout candRow2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 2).
|
|
222 |
LayoutLine();
|
|
223 |
TAknLayoutRect candrow2paneRect;
|
|
224 |
candrow2paneRect.LayoutRect( rect, candRow2Pane );
|
|
225 |
|
|
226 |
// get candidate cell pane with row 2 and col 0
|
|
227 |
TAknWindowLineLayout cellPane1Row2 = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , 0 , 0 ).
|
|
228 |
LayoutLine();
|
|
229 |
TAknLayoutRect cellPane1Row2Rect;
|
|
230 |
cellPane1Row2Rect.LayoutRect( candrow2paneRect.Rect(), cellPane1Row2 );
|
|
231 |
|
|
232 |
// get the candidate cell bg pane with row 2 and col 0
|
|
233 |
candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
|
|
234 |
TAknLayoutRect cellPane1Row2BgRect;
|
|
235 |
cellPane1Row2BgRect.LayoutRect( cellPane1Row2Rect.Rect(), candbgpane );
|
|
236 |
|
|
237 |
// calculate the margins
|
|
238 |
iCandsHorizontalMargin = cellPane2Row1BgRect.Rect().iTl.iX - cellPane1Row1BgRect.Rect().iBr.iX;
|
|
239 |
iCandsVerticalMargin = cellPane1Row2BgRect.Rect().iTl.iY - cellPane1Row1BgRect.Rect().iBr.iY;
|
|
240 |
|
|
241 |
iCandsUnitWidth = cellPane1Row1BgRect.Rect().Width();
|
|
242 |
iCandsUnitHeight = cellPane1Row1BgRect.Rect().Height();
|
|
243 |
|
|
244 |
iCandidateLTPos = candrow1paneRect.Rect().iTl;
|
|
245 |
|
|
246 |
// get candidate text laf data
|
|
247 |
TAknTextLineLayout candsTextLayout =
|
|
248 |
AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane_t1(1).LayoutLine();
|
|
249 |
TAknLayoutText candsText;
|
|
250 |
candsText.LayoutText( cellPane1Row1Rect.Rect(), candsTextLayout );
|
|
251 |
iCandsFont = const_cast<CFont*>( AknLayoutUtils::FontFromId( candsTextLayout.iFont, NULL ) );
|
|
252 |
iCandsTextMargin = candsText.TextRect().iTl.iX - cellPane1Row1Rect.Rect().iTl.iX;
|
|
253 |
}
|
|
254 |
|
|
255 |
// ---------------------------------------------------------------------------
|
|
256 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForFunctionalButton()
|
|
257 |
// Retrieve the laf data for functional group
|
|
258 |
// ---------------------------------------------------------------------------
|
|
259 |
//
|
|
260 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForFunctionalButton()
|
|
261 |
{
|
|
262 |
// retrieve the button laf flow:
|
|
263 |
// fshwr2_func_candi_pane->fshwr2_func_candi_row_pane->fshwr2_func_candi_cell_pane
|
|
264 |
// ->fshwr2_func_candi_cell_bg_pane
|
|
265 |
|
|
266 |
// candidate list
|
|
267 |
TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine();
|
|
268 |
|
|
269 |
TAknLayoutRect candpaneRect;
|
|
270 |
candpaneRect.LayoutRect( iLayoutRect, candlistpane );
|
|
271 |
TRect rect = candpaneRect.Rect();
|
|
272 |
|
|
273 |
TAknWindowLineLayout candRowPane;
|
|
274 |
TAknLayoutRect candRowPaneRect;
|
|
275 |
|
|
276 |
TAknWindowLineLayout cellPane;
|
|
277 |
TAknLayoutRect cellPaneRect;
|
|
278 |
|
|
279 |
TAknWindowLineLayout buttonBgPane;
|
|
280 |
TAknLayoutRect cellPaneRowBgRect;
|
|
281 |
|
|
282 |
RArray<TRect> buttonRect;
|
|
283 |
for(TInt row = 0; row < KFuncButtonRowNum; row++)
|
|
284 |
{
|
|
285 |
candRowPane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, row).LayoutLine();
|
|
286 |
candRowPaneRect.LayoutRect( rect, candRowPane );
|
|
287 |
|
|
288 |
for(TInt col = 0; col < KFuncButtonColNum; col++)
|
|
289 |
{
|
|
290 |
// cell pane
|
|
291 |
cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 2 , col , row ).LayoutLine();
|
|
292 |
cellPaneRect.LayoutRect(candRowPaneRect.Rect(),cellPane);
|
|
293 |
|
|
294 |
// cell bg pane
|
|
295 |
buttonBgPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(2).LayoutLine();
|
|
296 |
cellPaneRowBgRect.LayoutRect( cellPaneRect.Rect(), buttonBgPane );
|
|
297 |
buttonRect.Append(cellPaneRowBgRect.Rect());
|
|
298 |
}
|
|
299 |
}
|
|
300 |
|
|
301 |
// assign the functional button
|
|
302 |
TInt i = 0;
|
|
303 |
iRectBtnClose = buttonRect[i++];
|
|
304 |
iRectBtnOption = buttonRect[i++];
|
|
305 |
iRectBtnRangeSmb = buttonRect[i++];
|
|
306 |
iRectBtnBackspace = buttonRect[i++];
|
|
307 |
iRectBtnArrowLeft = buttonRect[i++];
|
|
308 |
iRectBtnArrowRight = buttonRect[i++];
|
|
309 |
iRectBtnSpace = buttonRect[i++];
|
|
310 |
iRectBtnEnter = buttonRect[i++];
|
|
311 |
buttonRect.Close();
|
|
312 |
|
|
313 |
// padding size of Btn
|
|
314 |
TInt xpad = (iRectBtnOption.iTl.iX - iRectBtnClose.iBr.iX)/2;
|
|
315 |
TInt ypad = (iRectBtnArrowLeft.iTl.iY - iRectBtnClose.iBr.iY)/2;
|
|
316 |
|
|
317 |
iSizeBtnPadding = TSize(xpad, ypad);
|
|
318 |
|
|
319 |
// padding size of arrow button
|
|
320 |
if(iIsLandscape)
|
|
321 |
{
|
|
322 |
iArrowPaddingSize = TSize(8,8);
|
|
323 |
}
|
|
324 |
else
|
|
325 |
{
|
|
326 |
iArrowPaddingSize = TSize(12,12);
|
|
327 |
}
|
|
328 |
}
|
|
329 |
|
|
330 |
// ---------------------------------------------------------------------------
|
|
331 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForHwrBox()
|
|
332 |
// Retrieve the laf data for hwr writing area
|
|
333 |
// ---------------------------------------------------------------------------
|
|
334 |
//
|
|
335 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForHwrBox()
|
|
336 |
{
|
|
337 |
TAknWindowLineLayout writingBoxPane;
|
|
338 |
TAknLayoutRect boxRect;
|
|
339 |
writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(1).LayoutLine();
|
|
340 |
boxRect.LayoutRect(iLayoutRect, writingBoxPane);
|
|
341 |
iRectWritingBox = boxRect.Rect();
|
|
342 |
|
|
343 |
// need read laf data?
|
|
344 |
iIndicatorRect.iTl = iRectWritingBox.iTl;
|
|
345 |
iIndicatorRect.iTl = iIndicatorRect.iTl + TPoint(20,20);
|
|
346 |
iIndicatorRect.SetSize(TSize(80,80));
|
|
347 |
}
|
|
348 |
|
|
349 |
// ---------------------------------------------------------------------------
|
|
350 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForSymbolTable()
|
|
351 |
// Retrieve the laf data for symbol table area
|
|
352 |
// ---------------------------------------------------------------------------
|
|
353 |
//
|
|
354 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForSymbolTable()
|
|
355 |
{
|
|
356 |
if(iIsLandscape)
|
|
357 |
{
|
|
358 |
RetrieveLandscapeLafDataForSymbolTable();
|
|
359 |
}
|
|
360 |
else
|
|
361 |
{
|
|
362 |
RetrievePortraitLafDataForSymbolTable();
|
|
363 |
}
|
|
364 |
}
|
|
365 |
|
|
366 |
// ---------------------------------------------------------------------------
|
|
367 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForNumSymbolTable()
|
|
368 |
// Retrieve the laf data for number symbol table area
|
|
369 |
// ---------------------------------------------------------------------------
|
|
370 |
//
|
|
371 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForNumSymbolTable()
|
|
372 |
{
|
|
373 |
if(iIsLandscape)
|
|
374 |
{
|
|
375 |
RetrieveLandscapeLafDataForNumSymbolTable();
|
|
376 |
}
|
|
377 |
else
|
|
378 |
{
|
|
379 |
RetrievePortraitLafDataForNumSymbolTable();
|
|
380 |
}
|
|
381 |
}
|
|
382 |
|
|
383 |
// ---------------------------------------------------------------------------
|
|
384 |
// CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForSymbolTable()
|
|
385 |
// Retrieve the landscape laf data for symbol table area
|
|
386 |
// ---------------------------------------------------------------------------
|
|
387 |
//
|
|
388 |
void CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForSymbolTable()
|
|
389 |
{
|
|
390 |
TAknLayoutScalableParameterLimits candiPaneVariety = AknLayoutScalable_Avkon::fshwr2_func_candi_pane_ParamLimits(2);
|
|
391 |
|
|
392 |
iSctpadRowCount = KLandscapeVirtualKeypadRow;//candiPaneVariety.LastRow();
|
|
393 |
iSctpadColCount = KLandscapeVirtualKeypadCol;//candiPaneVariety.LastColumn() + 1;
|
|
394 |
|
|
395 |
// get the functional buttons laf data for symbol table
|
|
396 |
// candidate list
|
|
397 |
TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine();
|
|
398 |
TAknLayoutRect candpaneRect;
|
|
399 |
candpaneRect.LayoutRect( iLayoutRect, candlistpane );
|
|
400 |
iRectOfSymbolTable = candpaneRect.Rect();
|
|
401 |
|
|
402 |
// get 1st row pane in button area
|
|
403 |
TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 0).LayoutLine();
|
|
404 |
TAknLayoutRect candrow1paneRect;
|
|
405 |
candrow1paneRect.LayoutRect( iRectOfSymbolTable, candRow1Pane );
|
|
406 |
|
|
407 |
iSymBtnRectArray.Reset();
|
|
408 |
TAknWindowLineLayout cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 5, 0, 0 ).
|
|
409 |
LayoutLine();
|
|
410 |
TAknLayoutRect cellPaneRect;
|
|
411 |
cellPaneRect.LayoutRect( candrow1paneRect.Rect(), cellPane );
|
|
412 |
|
|
413 |
// get the candidate cell bg pane with row 0 and col i
|
|
414 |
TAknWindowLineLayout cellbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(5).LayoutLine();
|
|
415 |
TAknLayoutRect cellbgRect;
|
|
416 |
cellbgRect.LayoutRect( cellPaneRect.Rect(), cellbgpane );
|
|
417 |
iSymBtnRectArray.Append(cellbgRect.Rect());
|
|
418 |
//get 1st row pane in SCT area
|
|
419 |
TAknWindowLineLayout row1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 1).LayoutLine();
|
|
420 |
TAknLayoutRect row1Rect;
|
|
421 |
row1Rect.LayoutRect(iRectOfSymbolTable,row1Pane);
|
|
422 |
iRectSctpad.iTl = row1Rect.Rect().iTl;
|
|
423 |
// iRectSctpad.iBr = iRectOfSymbolTable.iBr;
|
|
424 |
|
|
425 |
TAknWindowLineLayout key1bgpane, keypane;
|
|
426 |
TAknLayoutRect key1bgRect, keyRect;
|
|
427 |
|
|
428 |
|
|
429 |
keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 0 , 0 ).
|
|
430 |
LayoutLine();
|
|
431 |
keyRect.LayoutRect(row1Rect.Rect(), keypane);
|
|
432 |
|
|
433 |
key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine();
|
|
434 |
key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane);
|
|
435 |
|
|
436 |
keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 1 , 0 ).
|
|
437 |
LayoutLine();
|
|
438 |
keyRect.LayoutRect(row1Rect.Rect(), keypane);
|
|
439 |
|
|
440 |
TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine();
|
|
441 |
TAknLayoutRect key2bgRect;
|
|
442 |
key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane);
|
|
443 |
|
|
444 |
TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 2).LayoutLine();
|
|
445 |
TAknLayoutRect row2Rect;
|
|
446 |
row2Rect.LayoutRect(iRectOfSymbolTable,row2Pane);
|
|
447 |
|
|
448 |
keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 0 , 0 ).LayoutLine();
|
|
449 |
keyRect.LayoutRect(row2Rect.Rect(), keypane);
|
|
450 |
|
|
451 |
TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine();
|
|
452 |
TAknLayoutRect key3bgRect;
|
|
453 |
key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane);
|
|
454 |
|
|
455 |
TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX;
|
|
456 |
TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY;
|
|
457 |
|
|
458 |
TRect cursorRect(key1bgRect.Rect());
|
|
459 |
TRect originRect(key1bgRect.Rect());
|
|
460 |
TInt rectHeight = cursorRect.Height();
|
|
461 |
TInt rectWidth = cursorRect.Width();
|
|
462 |
|
|
463 |
iSCTrectArray.Reset();
|
|
464 |
for(TInt i = 0; i < iSctpadRowCount; i++)
|
|
465 |
{
|
|
466 |
cursorRect = originRect;
|
|
467 |
cursorRect.Move(0,i*(rectHeight+keyVerticalGap));
|
|
468 |
iSCTrectArray.Append(cursorRect);
|
|
469 |
for(TInt j = 1; j < iSctpadColCount; j++)
|
|
470 |
{
|
|
471 |
cursorRect.Move((rectWidth+keyHorizontalGap),0);
|
|
472 |
iSCTrectArray.Append(cursorRect);
|
|
473 |
}
|
|
474 |
}
|
|
475 |
iRectOfSymbolTable.iBr = cursorRect.iBr;
|
|
476 |
iRectSctpad.iBr = iRectOfSymbolTable.iBr;
|
|
477 |
|
|
478 |
}
|
|
479 |
|
|
480 |
// ---------------------------------------------------------------------------
|
|
481 |
// CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForSymbolTable()
|
|
482 |
// Retrieve the portrait laf data for symbol table area
|
|
483 |
// ---------------------------------------------------------------------------
|
|
484 |
//
|
|
485 |
void CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForSymbolTable()
|
|
486 |
{
|
|
487 |
// get the functional buttons laf data for symbol table
|
|
488 |
// candidate list
|
|
489 |
TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine();
|
|
490 |
|
|
491 |
TAknLayoutRect candpaneRect;
|
|
492 |
candpaneRect.LayoutRect( iLayoutRect, candlistpane );
|
|
493 |
TRect rect = candpaneRect.Rect();
|
|
494 |
|
|
495 |
// get candidate row2 pane
|
|
496 |
TAknWindowLineLayout candRow2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1).
|
|
497 |
LayoutLine();
|
|
498 |
TAknLayoutRect candrow2paneRect;
|
|
499 |
candrow2paneRect.LayoutRect( rect, candRow2Pane );
|
|
500 |
iRectOfSymbolTable.iTl = candrow2paneRect.Rect().iTl;
|
|
501 |
|
|
502 |
iSymBtnRectArray.Reset();
|
|
503 |
for(TInt i = 0; i < KSymButtonNum; i++)
|
|
504 |
{
|
|
505 |
// get candidate cell pane with row 0 and col i
|
|
506 |
TAknWindowLineLayout cellPaneRow = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 1, i , 0 ).
|
|
507 |
LayoutLine();
|
|
508 |
TAknLayoutRect cellPaneRect;
|
|
509 |
cellPaneRect.LayoutRect( candrow2paneRect.Rect(), cellPaneRow );
|
|
510 |
|
|
511 |
// get the candidate cell bg pane with row 0 and col i
|
|
512 |
TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).LayoutLine();
|
|
513 |
TAknLayoutRect BgRect;
|
|
514 |
BgRect.LayoutRect( cellPaneRect.Rect(), candbgpane );
|
|
515 |
iSymBtnRectArray.Append(BgRect.Rect());
|
|
516 |
}
|
|
517 |
|
|
518 |
// get the virtual key rects
|
|
519 |
TAknWindowLineLayout writingBoxPane;
|
|
520 |
TAknLayoutRect boxRect;
|
|
521 |
writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(0).LayoutLine();
|
|
522 |
boxRect.LayoutRect(iLayoutRect, writingBoxPane);
|
|
523 |
iRectSctpad = boxRect.Rect();
|
|
524 |
|
|
525 |
TAknWindowLineLayout keypane, keybgpane;
|
|
526 |
TAknLayoutRect keyRect, keybgRect;
|
|
527 |
|
|
528 |
TAknLayoutScalableParameterLimits sctPaneVariety =
|
|
529 |
AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0);
|
|
530 |
|
|
531 |
iSctpadRowCount = sctPaneVariety.LastRow() + 1;
|
|
532 |
iSctpadColCount = sctPaneVariety.LastColumn() + 1;
|
|
533 |
|
|
534 |
iSCTrectArray.Reset();
|
|
535 |
for(TInt i = 0; i < iSctpadRowCount; i++)
|
|
536 |
{
|
|
537 |
for ( TInt j = 0; j < iSctpadColCount; j++ )
|
|
538 |
{
|
|
539 |
keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(0, j, i).LayoutLine();
|
|
540 |
keyRect.LayoutRect(iRectSctpad, keypane);
|
|
541 |
keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(0).LayoutLine();
|
|
542 |
keybgRect.LayoutRect(keyRect.Rect(), keybgpane);
|
|
543 |
iSCTrectArray.Append( keybgRect.Rect());
|
|
544 |
}
|
|
545 |
}
|
|
546 |
iSizeSctpadCell = keybgRect.Rect().Size();
|
|
547 |
|
|
548 |
// calculate the symbol table rect
|
|
549 |
iRectOfSymbolTable.iBr = iRectSctpad.iBr;
|
|
550 |
}
|
|
551 |
|
|
552 |
// ---------------------------------------------------------------------------
|
|
553 |
// CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForNumSymbolTable()
|
|
554 |
// Retrieve the landscape laf data for number symbol table area
|
|
555 |
// ---------------------------------------------------------------------------
|
|
556 |
//
|
|
557 |
void CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForNumSymbolTable()
|
|
558 |
{
|
|
559 |
// TAknLayoutScalableParameterLimits candiPaneVariety = AknLayoutScalable_Avkon::fshwr2_func_candi_pane_ParamLimits(2);
|
|
560 |
|
|
561 |
iNumSctpadRowCount = KLandscapeNumpadRow;
|
|
562 |
iNumSctpadColCount = KLandscapeNumpadCol;
|
|
563 |
|
|
564 |
// get the functional buttons laf data for symbol table
|
|
565 |
// candidate list
|
|
566 |
TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine();
|
|
567 |
TAknLayoutRect candpaneRect;
|
|
568 |
candpaneRect.LayoutRect( iLayoutRect, candlistpane );
|
|
569 |
iRectOfNumSymbolTable = candpaneRect.Rect();
|
|
570 |
|
|
571 |
// get candidate row1 pane
|
|
572 |
TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(2, 0, 0).LayoutLine();
|
|
573 |
TAknLayoutRect candrow1paneRect;
|
|
574 |
candrow1paneRect.LayoutRect( candpaneRect.Rect(), candRow1Pane );
|
|
575 |
|
|
576 |
TAknWindowLineLayout rowPane, key1bgpane, keypane;
|
|
577 |
TAknLayoutRect rowRect, key1bgRect, keyRect;
|
|
578 |
|
|
579 |
iRectNumpad.iTl = candpaneRect.Rect().iTl;
|
|
580 |
|
|
581 |
keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 0 , 0 ).
|
|
582 |
LayoutLine();
|
|
583 |
keyRect.LayoutRect(candrow1paneRect.Rect(), keypane);
|
|
584 |
|
|
585 |
key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine();
|
|
586 |
key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane);
|
|
587 |
|
|
588 |
keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 1 , 0 ).
|
|
589 |
LayoutLine();
|
|
590 |
keyRect.LayoutRect(candrow1paneRect.Rect(), keypane);
|
|
591 |
|
|
592 |
TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine();
|
|
593 |
TAknLayoutRect key2bgRect;
|
|
594 |
key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane);
|
|
595 |
|
|
596 |
TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(2, 0, 1).LayoutLine();
|
|
597 |
TAknLayoutRect row2Rect;
|
|
598 |
row2Rect.LayoutRect(candpaneRect.Rect(),row2Pane);
|
|
599 |
|
|
600 |
keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 1, 0 ).LayoutLine();
|
|
601 |
keyRect.LayoutRect(row2Rect.Rect(), keypane);
|
|
602 |
|
|
603 |
TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine();
|
|
604 |
TAknLayoutRect key3bgRect;
|
|
605 |
key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane);
|
|
606 |
|
|
607 |
TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX;
|
|
608 |
TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY;
|
|
609 |
|
|
610 |
TRect cursorRect(key1bgRect.Rect());
|
|
611 |
TRect originRect(key1bgRect.Rect());
|
|
612 |
TInt rectHeight = cursorRect.Height();
|
|
613 |
TInt rectWidth = cursorRect.Width();
|
|
614 |
|
|
615 |
iNumSCTrectArray.Reset();
|
|
616 |
for(TInt i = 0; i < iNumSctpadRowCount; i++)
|
|
617 |
{
|
|
618 |
cursorRect = originRect;
|
|
619 |
cursorRect.Move(0,i*(rectHeight+keyVerticalGap));
|
|
620 |
iNumSCTrectArray.Append(cursorRect);
|
|
621 |
for(TInt j = 1; j < iNumSctpadColCount; j++)
|
|
622 |
{
|
|
623 |
cursorRect.Move((rectWidth+keyHorizontalGap),0);
|
|
624 |
iNumSCTrectArray.Append(cursorRect);
|
|
625 |
}
|
|
626 |
}
|
|
627 |
|
|
628 |
// calculate the symbol table rect
|
|
629 |
iRectOfNumSymbolTable.iBr = cursorRect.iBr;
|
|
630 |
iRectNumpad.iBr = iRectOfNumSymbolTable.iBr;
|
|
631 |
}
|
|
632 |
|
|
633 |
// ---------------------------------------------------------------------------
|
|
634 |
// CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForNumSymbolTable()
|
|
635 |
// Retrieve the portrait laf data for number symbol table area
|
|
636 |
// ---------------------------------------------------------------------------
|
|
637 |
//
|
|
638 |
void CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForNumSymbolTable()
|
|
639 |
{
|
|
640 |
|
|
641 |
// get the virtual key rects
|
|
642 |
TAknWindowLineLayout writingBoxPane;
|
|
643 |
TAknLayoutRect boxRect;
|
|
644 |
writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(2).LayoutLine();
|
|
645 |
boxRect.LayoutRect(iLayoutRect, writingBoxPane);
|
|
646 |
iRectNumpad = boxRect.Rect();
|
|
647 |
iRectOfNumSymbolTable.iTl = iRectNumpad.iTl;
|
|
648 |
|
|
649 |
|
|
650 |
TAknWindowLineLayout keypane, keybgpane;
|
|
651 |
TAknLayoutRect keyRect, keybgRect;
|
|
652 |
|
|
653 |
TAknLayoutScalableParameterLimits sctPaneVariety =
|
|
654 |
AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0);
|
|
655 |
|
|
656 |
iNumSctpadRowCount = sctPaneVariety.LastRow() + 1;
|
|
657 |
iNumSctpadColCount = sctPaneVariety.LastColumn() + 1;
|
|
658 |
|
|
659 |
iNumSCTrectArray.Reset();
|
|
660 |
for(TInt i = 0; i < iNumSctpadRowCount; i++)
|
|
661 |
{
|
|
662 |
for ( TInt j = 0; j < iNumSctpadColCount; j++ )
|
|
663 |
{
|
|
664 |
keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(1, j, i).LayoutLine();
|
|
665 |
keyRect.LayoutRect(iRectNumpad, keypane);
|
|
666 |
keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(1).LayoutLine();
|
|
667 |
keybgRect.LayoutRect(keyRect.Rect(), keybgpane);
|
|
668 |
TRect rect = keybgRect.Rect();
|
|
669 |
iNumSCTrectArray.Append( rect);
|
|
670 |
}
|
|
671 |
}
|
|
672 |
iSizeNumSctpadCell = keybgRect.Rect().Size();
|
|
673 |
|
|
674 |
// calculate the symbol table rect
|
|
675 |
iRectOfNumSymbolTable.iBr = iRectNumpad.iBr;
|
|
676 |
}
|
|
677 |
|
|
678 |
// ---------------------------------------------------------------------------
|
|
679 |
// CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble()
|
|
680 |
// Retrieve the laf data for preview bubble
|
|
681 |
// ---------------------------------------------------------------------------
|
|
682 |
//
|
|
683 |
void CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble()
|
|
684 |
{
|
|
685 |
// preview popup window
|
|
686 |
TAknWindowLineLayout previewWnd, previewWndInner;
|
|
687 |
TAknLayoutRect previewWndRect, previewWndInnerRect;
|
|
688 |
TAknLayoutText previewWndText;
|
|
689 |
previewWnd = AknLayoutScalable_Avkon::popup_fep_char_preview_window(0).LayoutLine();
|
|
690 |
previewWndRect.LayoutRect( TRect(0,0,50,50), previewWnd );
|
|
691 |
previewWndInner = AknLayoutScalable_Avkon::bg_popup_fep_char_preview_window_g9().LayoutLine();
|
|
692 |
previewWndInnerRect.LayoutRect( previewWndRect.Rect(), previewWndInner );
|
|
693 |
iPreviewWndRect = previewWndRect.Rect();
|
|
694 |
iPreviewWndInnerRect = previewWndInnerRect.Rect();
|
|
695 |
iPreviewWndText =
|
|
696 |
AknLayoutScalable_Avkon::popup_fep_char_preview_window_t1(0).LayoutLine();
|
|
697 |
previewWndText.LayoutText(previewWndRect.Rect(), iPreviewWndText);
|
|
698 |
iBubbleFont = previewWndText.Font();
|
|
699 |
}
|
|
700 |
|
|
701 |
// ---------------------------------------------------------------------------
|
|
702 |
// read laf data.
|
|
703 |
// ---------------------------------------------------------------------------
|
|
704 |
//
|
|
705 |
void CPeninputFingerHwrArLafManager::ReadLafInfo()
|
|
706 |
{
|
|
707 |
// retrieve the layout rect
|
|
708 |
RetrieveLayoutData();
|
|
709 |
|
|
710 |
// retrieve the laf data of icf
|
|
711 |
RetrieveLafDataForICF();
|
|
712 |
|
|
713 |
#ifdef HackerVersion
|
|
714 |
#else
|
|
715 |
// retrieve the laf data of functional button
|
|
716 |
RetrieveLafDataForFunctionalButton();
|
|
717 |
#endif
|
|
718 |
// retrieve the laf data of candidate list
|
|
719 |
RetrieveLafDataForCandidateList();
|
|
720 |
|
|
721 |
#ifdef HackerVersion
|
|
722 |
#else
|
|
723 |
// retrieve the laf data of symbol table
|
|
724 |
RetrieveLafDataForSymbolTable();
|
|
725 |
|
|
726 |
// retrieve the laf data of number symbol table
|
|
727 |
RetrieveLafDataForNumSymbolTable();
|
|
728 |
|
|
729 |
// retrieve the laf data of hwr box
|
|
730 |
RetrieveLafDataForHwrBox();
|
|
731 |
#endif
|
|
732 |
|
|
733 |
// retrieve the laf data of preview bubble
|
|
734 |
RetrieveLafDataForPreviewBubble();
|
|
735 |
|
|
736 |
//==========================================================================
|
|
737 |
// going to be removed if the LAF data is ready
|
|
738 |
//
|
|
739 |
#ifdef HackerVersion
|
|
740 |
|
|
741 |
const TUint KMarginLayout = 4;
|
|
742 |
// hardcode those and remove them after the laf data is ready
|
|
743 |
// do we really need to read ui data from laf system?
|
|
744 |
// icf margins
|
|
745 |
iIcfTextLeftMargin = 14;
|
|
746 |
iIcfTextRightMargin = 14;
|
|
747 |
iIcfTextTopMargin = 14;
|
|
748 |
iIcfTextBottomMargin = 20;
|
|
749 |
iIcfTextLineSpaceMargin = 5;
|
|
750 |
|
|
751 |
// candiate margin
|
|
752 |
iCandsHorizontalMargin = 1;
|
|
753 |
iCandsVerticalMargin = 1;
|
|
754 |
|
|
755 |
if(iIsLandscape)
|
|
756 |
{
|
|
757 |
TInt buttonHight = (iLayoutRect.Height()-2*KMarginLayout)/6;//-6; // 1mm ~= 6 pixls
|
|
758 |
TInt buttonWidth = (iLayoutRect.Width()-2*KMarginLayout)/8;//-8;
|
|
759 |
|
|
760 |
iRectBtnClose = TRect(iLayoutRect.iTl+TPoint(KMarginLayout,KMarginLayout),TPoint(buttonWidth+KMarginLayout,buttonHight+KMarginLayout));
|
|
761 |
|
|
762 |
iRectBtnOption = iRectBtnClose;
|
|
763 |
iRectBtnOption.Move(TPoint(buttonWidth,0));
|
|
764 |
|
|
765 |
iRectBtnRangeSmb = iRectBtnOption;
|
|
766 |
iRectBtnRangeSmb.Move(TPoint(buttonWidth,0));
|
|
767 |
|
|
768 |
iRectBtnBackspace = iRectBtnRangeSmb;
|
|
769 |
iRectBtnBackspace.Move(TPoint(buttonWidth,0));
|
|
770 |
|
|
771 |
// button on second row
|
|
772 |
iRectBtnArrowUp = iRectBtnClose;
|
|
773 |
iRectBtnArrowUp.Move(TPoint(0,buttonHight));
|
|
774 |
|
|
775 |
iRectBtnArrowDown = iRectBtnArrowUp;
|
|
776 |
iRectBtnArrowDown.Move(TPoint(buttonWidth,0));
|
|
777 |
|
|
778 |
iRectBtnArrowLeft = iRectBtnArrowDown;
|
|
779 |
iRectBtnArrowLeft.Move(TPoint(buttonWidth,0));
|
|
780 |
|
|
781 |
iRectBtnArrowRight = iRectBtnArrowLeft;
|
|
782 |
iRectBtnArrowRight.Move(TPoint(buttonWidth,0));
|
|
783 |
|
|
784 |
iSizeBtnPadding = TSize(6,6);
|
|
785 |
iArrowPaddingSize = TSize(8,8);
|
|
786 |
|
|
787 |
iRectBtnSpace = iRectBtnClose;
|
|
788 |
iRectBtnSpace.Move(TPoint(0,buttonHight));
|
|
789 |
|
|
790 |
iRectBtnEnter = iRectBtnSpace;
|
|
791 |
iRectBtnEnter.Move(TPoint(buttonWidth,0));
|
|
792 |
|
|
793 |
// candate position
|
|
794 |
iCandidateLTPos = iRectBtnClose.iTl + TPoint(0,buttonHight);
|
|
795 |
iCandsUnitWidth = buttonWidth-iCandsVerticalMargin;
|
|
796 |
iCandsUnitHeight = buttonHight;
|
|
797 |
|
|
798 |
// icf editor rect
|
|
799 |
iRectIcf = TRect(TPoint(4*buttonWidth+KMarginLayout,KMarginLayout),TPoint(iLayoutRect.iBr.iX-KMarginLayout,2*buttonHight+KMarginLayout));
|
|
800 |
|
|
801 |
// iwriting box
|
|
802 |
iRectWritingBox = TRect(TPoint(KMarginLayout,2*buttonHight+KMarginLayout),iLayoutRect.iBr-TPoint(KMarginLayout,KMarginLayout));
|
|
803 |
|
|
804 |
iIndicatorRect.iTl = iRectWritingBox.iTl;
|
|
805 |
iIndicatorRect.iTl = iIndicatorRect.iTl + TPoint(20,20);
|
|
806 |
iIndicatorRect.SetSize(TSize(80,80));
|
|
807 |
|
|
808 |
// construct symbol table
|
|
809 |
iRectOfSymbolTable = iRectWritingBox;
|
|
810 |
iRectOfSymbolTable.Move(TPoint(buttonWidth,-buttonHight));
|
|
811 |
iRectOfSymbolTable.SetHeight(5*buttonHight);
|
|
812 |
iRectOfSymbolTable.SetWidth(6*buttonWidth);
|
|
813 |
|
|
814 |
iRectSctpad = iRectOfSymbolTable;
|
|
815 |
iRectSctpad.Move(TPoint(0,buttonHight));
|
|
816 |
iRectSctpad.SetHeight(4*buttonHight);
|
|
817 |
iRectSctpad.SetWidth(6*buttonWidth);
|
|
818 |
|
|
819 |
// the button size for symbol table control
|
|
820 |
iSymBtnRectArray.Reset();
|
|
821 |
TRect btnRect;
|
|
822 |
btnRect.iTl = iRectOfSymbolTable.iTl;
|
|
823 |
btnRect.SetSize(TSize(2*buttonWidth,buttonHight));
|
|
824 |
iSymBtnRectArray.Append(btnRect);
|
|
825 |
|
|
826 |
btnRect.Move(TPoint(btnRect.Width(),0));
|
|
827 |
iSymBtnRectArray.Append(btnRect);
|
|
828 |
|
|
829 |
btnRect.Move(TPoint(btnRect.Width(),0));
|
|
830 |
iSymBtnRectArray.Append(btnRect);
|
|
831 |
|
|
832 |
iSctpadRowCount = 4;
|
|
833 |
iSctpadColCount = 6;
|
|
834 |
|
|
835 |
iSCTrectArray.Reset();
|
|
836 |
for(TInt i = 0; i < iSctpadRowCount; i++)
|
|
837 |
{
|
|
838 |
for(TInt j = 0; j < iSctpadColCount; j++)
|
|
839 |
{
|
|
840 |
TPoint rectTl = iRectSctpad.iTl+TPoint(j*buttonWidth,i*buttonHight);
|
|
841 |
TPoint rectBr = rectTl+ TPoint(buttonWidth,buttonHight);
|
|
842 |
iSCTrectArray.Append(TRect(rectTl,rectBr));
|
|
843 |
}
|
|
844 |
}
|
|
845 |
}
|
|
846 |
else
|
|
847 |
{
|
|
848 |
// icf rect
|
|
849 |
iRectIcf = TRect(iLayoutRect.iTl+TPoint(KMarginLayout,KMarginLayout),TPoint(iLayoutRect.iBr.iX-KMarginLayout,22.5*9));
|
|
850 |
|
|
851 |
TInt buttonHight = (iLayoutRect.Height()-iRectIcf.Height()-2*KMarginLayout)/6;//(15*9)/2; // 1mm ~= 9pixls
|
|
852 |
TInt buttonWidth = (iLayoutRect.Width()-2*KMarginLayout)/4;
|
|
853 |
|
|
854 |
// the button on second row
|
|
855 |
TPoint firstButtonTl = iRectIcf.iTl+TPoint(0,iRectIcf.Height());
|
|
856 |
iRectBtnClose = TRect(firstButtonTl,firstButtonTl+TPoint(buttonWidth,buttonHight));
|
|
857 |
|
|
858 |
iRectBtnOption = iRectBtnClose;
|
|
859 |
iRectBtnOption.Move(TPoint(buttonWidth,0));
|
|
860 |
|
|
861 |
iRectBtnRangeSmb = iRectBtnOption;
|
|
862 |
iRectBtnRangeSmb.Move(TPoint(buttonWidth,0));
|
|
863 |
|
|
864 |
iRectBtnBackspace = iRectBtnRangeSmb;
|
|
865 |
iRectBtnBackspace.Move(TPoint(buttonWidth,0));
|
|
866 |
|
|
867 |
// arrow button: on third row
|
|
868 |
iRectBtnArrowUp = iRectBtnClose;
|
|
869 |
iRectBtnArrowUp.Move(TPoint(0,buttonHight));
|
|
870 |
|
|
871 |
iRectBtnArrowDown = iRectBtnArrowUp;
|
|
872 |
iRectBtnArrowDown.Move(TPoint(buttonWidth,0));
|
|
873 |
|
|
874 |
iRectBtnArrowLeft = iRectBtnArrowDown;
|
|
875 |
iRectBtnArrowLeft.Move(TPoint(buttonWidth,0));
|
|
876 |
|
|
877 |
iRectBtnArrowRight = iRectBtnArrowLeft;
|
|
878 |
iRectBtnArrowRight.Move(TPoint(buttonWidth,0));
|
|
879 |
|
|
880 |
// button padding
|
|
881 |
iSizeBtnPadding = TSize(6,6);
|
|
882 |
iArrowPaddingSize = TSize(12,12);
|
|
883 |
|
|
884 |
// candate position
|
|
885 |
iCandidateLTPos = iRectBtnClose.iTl + TPoint(0,buttonHight);
|
|
886 |
iCandsUnitWidth = buttonWidth-iCandsVerticalMargin;
|
|
887 |
iCandsUnitHeight = buttonHight;
|
|
888 |
|
|
889 |
// HWR Box Rect
|
|
890 |
iRectWritingBox = TRect(TPoint(iRectBtnArrowUp.iTl.iX,iRectBtnArrowUp.iBr.iY),iLayoutRect.iBr-TPoint(KMarginLayout,KMarginLayout));
|
|
891 |
|
|
892 |
iIndicatorRect.iTl = iRectWritingBox.iTl;
|
|
893 |
iIndicatorRect.iTl = iIndicatorRect.iTl + TPoint(20,20);
|
|
894 |
iIndicatorRect.SetSize(TSize(80,80));
|
|
895 |
|
|
896 |
// construct symbol table
|
|
897 |
iRectOfSymbolTable = iRectWritingBox;
|
|
898 |
iRectOfSymbolTable.Move(TPoint(0,-buttonHight));
|
|
899 |
iRectOfSymbolTable.SetHeight(5*buttonHight);
|
|
900 |
iRectOfSymbolTable.SetWidth(4*buttonWidth);
|
|
901 |
|
|
902 |
iRectSctpad = iRectOfSymbolTable;
|
|
903 |
iRectSctpad.Move(TPoint(0,buttonHight));
|
|
904 |
iRectSctpad.SetHeight(4*buttonHight);
|
|
905 |
iRectSctpad.SetWidth(4*buttonWidth);
|
|
906 |
|
|
907 |
// the button size for symbol table control
|
|
908 |
iSymBtnRectArray.Reset();
|
|
909 |
TRect btnRect;
|
|
910 |
btnRect.iTl = iRectOfSymbolTable.iTl;
|
|
911 |
btnRect.SetSize(TSize((4*buttonWidth)/3,buttonHight));
|
|
912 |
iSymBtnRectArray.Append(btnRect);
|
|
913 |
|
|
914 |
btnRect.Move(TPoint(btnRect.Width(),0));
|
|
915 |
iSymBtnRectArray.Append(btnRect);
|
|
916 |
|
|
917 |
btnRect.Move(TPoint(btnRect.Width(),0));
|
|
918 |
iSymBtnRectArray.Append(btnRect);
|
|
919 |
|
|
920 |
iSctpadRowCount = 4;
|
|
921 |
iSctpadColCount = 4;
|
|
922 |
iSCTrectArray.Reset();
|
|
923 |
for(TInt i = 0; i < iSctpadRowCount; i++)
|
|
924 |
{
|
|
925 |
for(TInt j = 0; j < iSctpadColCount; j++)
|
|
926 |
{
|
|
927 |
TPoint rectTl = iRectSctpad.iTl+TPoint(j*buttonWidth,i*buttonHight);
|
|
928 |
TPoint rectBr = rectTl+ TPoint(buttonWidth,buttonHight);
|
|
929 |
iSCTrectArray.Append(TRect(rectTl,rectBr));
|
|
930 |
}
|
|
931 |
}
|
|
932 |
}
|
|
933 |
#endif
|
|
934 |
//
|
|
935 |
//==========================================================================
|
|
936 |
|
|
937 |
}
|
|
938 |
|
|
939 |
// ---------------------------------------------------------------------------
|
|
940 |
// get screen orientation.
|
|
941 |
// ---------------------------------------------------------------------------
|
|
942 |
//
|
|
943 |
TBool CPeninputFingerHwrArLafManager::IsLandscape()
|
|
944 |
{
|
|
945 |
return iIsLandscape;
|
|
946 |
}
|
|
947 |
|
|
948 |
// ---------------------------------------------------------------------------
|
|
949 |
// get rect of layout.
|
|
950 |
// ---------------------------------------------------------------------------
|
|
951 |
//
|
|
952 |
TRect CPeninputFingerHwrArLafManager::LayoutRect()
|
|
953 |
{
|
|
954 |
return iLayoutRect;
|
|
955 |
}
|
|
956 |
|
|
957 |
// ---------------------------------------------------------------------------
|
|
958 |
// get rect of specified control.
|
|
959 |
// ---------------------------------------------------------------------------
|
|
960 |
//
|
|
961 |
TRect CPeninputFingerHwrArLafManager::CtrlRect( TInt aCtrlId )
|
|
962 |
{
|
|
963 |
switch ( aCtrlId )
|
|
964 |
{
|
|
965 |
case EHwrCtrlIdInputContextField:
|
|
966 |
{
|
|
967 |
return iRectIcf;
|
|
968 |
}
|
|
969 |
case EHwrCtrlIdWritingBox:
|
|
970 |
{
|
|
971 |
return iRectWritingBox;
|
|
972 |
}
|
|
973 |
case EHwrCtrlIdSymbolTableVkbGroup:
|
|
974 |
{
|
|
975 |
return iRectOfSymbolTable;
|
|
976 |
}
|
|
977 |
case EHwrCtrlIdNumSymbolTableVkbGroup:
|
|
978 |
{
|
|
979 |
return iRectOfNumSymbolTable;
|
|
980 |
}
|
|
981 |
case EHwrCtrlIdClose:
|
|
982 |
{
|
|
983 |
return iRectBtnClose;
|
|
984 |
}
|
|
985 |
case EHwrCtrlIdSymbolButton:
|
|
986 |
{
|
|
987 |
return iRectBtnRangeSmb;
|
|
988 |
}
|
|
989 |
case EHwrCtrlIdBackspace:
|
|
990 |
{
|
|
991 |
return iRectBtnBackspace;
|
|
992 |
}
|
|
993 |
case EHwrCtrlIdArrowLeft:
|
|
994 |
{
|
|
995 |
return iRectBtnArrowLeft;
|
|
996 |
}
|
|
997 |
case EHwrCtrlIdArrowRight:
|
|
998 |
{
|
|
999 |
return iRectBtnArrowRight;
|
|
1000 |
}
|
|
1001 |
case EHwrCtrlIdBtnEnter:
|
|
1002 |
{
|
|
1003 |
return iRectBtnEnter;
|
|
1004 |
}
|
|
1005 |
case EHwrCtrlIdBtnSpace:
|
|
1006 |
{
|
|
1007 |
return iRectBtnSpace;
|
|
1008 |
}
|
|
1009 |
case EHwrCtrlIdLanguageOption:
|
|
1010 |
{
|
|
1011 |
return iRectBtnOption;
|
|
1012 |
}
|
|
1013 |
case EHwrCtrlId3Page1Btn:
|
|
1014 |
case EHwrCtrlId3Page2Btn:
|
|
1015 |
case EHwrCtrlId3Page3Btn:
|
|
1016 |
case EHwrCtrlId2Page1Btn:
|
|
1017 |
case EHwrCtrlId2Page2Btn:
|
|
1018 |
{
|
|
1019 |
return iRectBtnSctPage;
|
|
1020 |
}
|
|
1021 |
}
|
|
1022 |
return TRect();
|
|
1023 |
}
|
|
1024 |
|
|
1025 |
// ---------------------------------------------------------------------------
|
|
1026 |
// get rect of ICF control.
|
|
1027 |
// ---------------------------------------------------------------------------
|
|
1028 |
//
|
|
1029 |
TRect CPeninputFingerHwrArLafManager::IcfRect()
|
|
1030 |
{
|
|
1031 |
return iRectIcf;
|
|
1032 |
}
|
|
1033 |
|
|
1034 |
// ---------------------------------------------------------------------------
|
|
1035 |
// get left margin of icf.
|
|
1036 |
// ---------------------------------------------------------------------------
|
|
1037 |
//
|
|
1038 |
TInt CPeninputFingerHwrArLafManager::IcfLeftMargin()
|
|
1039 |
{
|
|
1040 |
return iIcfTextLeftMargin;
|
|
1041 |
}
|
|
1042 |
|
|
1043 |
// ---------------------------------------------------------------------------
|
|
1044 |
// get right margin of icf.
|
|
1045 |
// ---------------------------------------------------------------------------
|
|
1046 |
//
|
|
1047 |
TInt CPeninputFingerHwrArLafManager::IcfRightMargin()
|
|
1048 |
{
|
|
1049 |
return iIcfTextRightMargin;
|
|
1050 |
}
|
|
1051 |
|
|
1052 |
// ---------------------------------------------------------------------------
|
|
1053 |
// get top margin of icf.
|
|
1054 |
// ---------------------------------------------------------------------------
|
|
1055 |
//
|
|
1056 |
TInt CPeninputFingerHwrArLafManager::IcfTopMargin()
|
|
1057 |
{
|
|
1058 |
return iIcfTextTopMargin;
|
|
1059 |
}
|
|
1060 |
|
|
1061 |
// ---------------------------------------------------------------------------
|
|
1062 |
// get bottom margin of icf.
|
|
1063 |
// ---------------------------------------------------------------------------
|
|
1064 |
//
|
|
1065 |
TInt CPeninputFingerHwrArLafManager::IcfBottomMargin()
|
|
1066 |
{
|
|
1067 |
return iIcfTextBottomMargin;
|
|
1068 |
}
|
|
1069 |
|
|
1070 |
// ---------------------------------------------------------------------------
|
|
1071 |
// get line spacing of icf.
|
|
1072 |
// ---------------------------------------------------------------------------
|
|
1073 |
//
|
|
1074 |
TInt CPeninputFingerHwrArLafManager::IcfLineSpaceMargin()
|
|
1075 |
{
|
|
1076 |
return iIcfTextLineSpaceMargin;
|
|
1077 |
}
|
|
1078 |
|
|
1079 |
// ---------------------------------------------------------------------------
|
|
1080 |
// get font of icf.
|
|
1081 |
// ---------------------------------------------------------------------------
|
|
1082 |
//
|
|
1083 |
CFont* CPeninputFingerHwrArLafManager::IcfFont()
|
|
1084 |
{
|
|
1085 |
return iIcfFont;
|
|
1086 |
}
|
|
1087 |
|
|
1088 |
// ---------------------------------------------------------------------------
|
|
1089 |
// get text height of icf.
|
|
1090 |
// ---------------------------------------------------------------------------
|
|
1091 |
//
|
|
1092 |
TInt CPeninputFingerHwrArLafManager::IcfTextHeight()
|
|
1093 |
{
|
|
1094 |
return iIcfTextHeight;
|
|
1095 |
}
|
|
1096 |
|
|
1097 |
// ---------------------------------------------------------------------------
|
|
1098 |
// get indicator bubble rect.
|
|
1099 |
// ---------------------------------------------------------------------------
|
|
1100 |
//
|
|
1101 |
TRect CPeninputFingerHwrArLafManager::IndicatorBubbleRect()
|
|
1102 |
{
|
|
1103 |
return iRectIndicatorBubble;
|
|
1104 |
}
|
|
1105 |
|
|
1106 |
// ---------------------------------------------------------------------------
|
|
1107 |
// get inner padding of buttons.
|
|
1108 |
// ---------------------------------------------------------------------------
|
|
1109 |
//
|
|
1110 |
TSize CPeninputFingerHwrArLafManager::ButtonInnerPadding()
|
|
1111 |
{
|
|
1112 |
return iSizeBtnPadding;
|
|
1113 |
}
|
|
1114 |
|
|
1115 |
|
|
1116 |
// ---------------------------------------------------------------------------
|
|
1117 |
// get row count of virtual sctpad.
|
|
1118 |
// ---------------------------------------------------------------------------
|
|
1119 |
//
|
|
1120 |
TInt CPeninputFingerHwrArLafManager::VirtualSctpadRowCount()
|
|
1121 |
{
|
|
1122 |
return iSctpadRowCount;
|
|
1123 |
}
|
|
1124 |
|
|
1125 |
// ---------------------------------------------------------------------------
|
|
1126 |
// get column count of virtual sctpad.
|
|
1127 |
// ---------------------------------------------------------------------------
|
|
1128 |
//
|
|
1129 |
TInt CPeninputFingerHwrArLafManager::VirtualSctpadColCount()
|
|
1130 |
{
|
|
1131 |
return iSctpadColCount;
|
|
1132 |
}
|
|
1133 |
|
|
1134 |
// ---------------------------------------------------------------------------
|
|
1135 |
// get row count of virtual number sctpad.
|
|
1136 |
// ---------------------------------------------------------------------------
|
|
1137 |
//
|
|
1138 |
TInt CPeninputFingerHwrArLafManager::VirtualNumSctpadRowCount()
|
|
1139 |
{
|
|
1140 |
return iNumSctpadRowCount;
|
|
1141 |
}
|
|
1142 |
|
|
1143 |
// ---------------------------------------------------------------------------
|
|
1144 |
// get column count of virtual number sctpad.
|
|
1145 |
// ---------------------------------------------------------------------------
|
|
1146 |
//
|
|
1147 |
TInt CPeninputFingerHwrArLafManager::VirtualNumSctpadColCount()
|
|
1148 |
{
|
|
1149 |
return iNumSctpadColCount;
|
|
1150 |
}
|
|
1151 |
|
|
1152 |
// ---------------------------------------------------------------------------
|
|
1153 |
// get cell size of virtual sctpad.
|
|
1154 |
// ---------------------------------------------------------------------------
|
|
1155 |
//
|
|
1156 |
TRect CPeninputFingerHwrArLafManager::VirtualSctpadCellSize()
|
|
1157 |
{
|
|
1158 |
return iSizeSctpadCell;
|
|
1159 |
}
|
|
1160 |
|
|
1161 |
// ---------------------------------------------------------------------------
|
|
1162 |
// get cell size of virtual numpad.
|
|
1163 |
// ---------------------------------------------------------------------------
|
|
1164 |
//
|
|
1165 |
TRect CPeninputFingerHwrArLafManager::VirtualNumpadCellSize()
|
|
1166 |
{
|
|
1167 |
return iSizeNumSctpadCell;
|
|
1168 |
}
|
|
1169 |
|
|
1170 |
// ---------------------------------------------------------------------------
|
|
1171 |
// get preview bubble rect.
|
|
1172 |
// ---------------------------------------------------------------------------
|
|
1173 |
//
|
|
1174 |
TRect CPeninputFingerHwrArLafManager::PreviewBubbleRect()
|
|
1175 |
{
|
|
1176 |
return iPreviewWndRect;
|
|
1177 |
}
|
|
1178 |
|
|
1179 |
// ---------------------------------------------------------------------------
|
|
1180 |
// get preview bubble inner rect
|
|
1181 |
// ---------------------------------------------------------------------------
|
|
1182 |
//
|
|
1183 |
TRect CPeninputFingerHwrArLafManager::PreviewBubbleInnerRect()
|
|
1184 |
{
|
|
1185 |
return iPreviewWndInnerRect;
|
|
1186 |
}
|
|
1187 |
|
|
1188 |
// ---------------------------------------------------------------------------
|
|
1189 |
// get preview bubble font
|
|
1190 |
// ---------------------------------------------------------------------------
|
|
1191 |
//
|
|
1192 |
const CFont* CPeninputFingerHwrArLafManager::PreviewBubbleFont()
|
|
1193 |
{
|
|
1194 |
return iBubbleFont;
|
|
1195 |
}
|
|
1196 |
|
|
1197 |
// ---------------------------------------------------------------------------
|
|
1198 |
// get preview bubble text layout
|
|
1199 |
// ---------------------------------------------------------------------------
|
|
1200 |
//
|
|
1201 |
TAknTextLineLayout CPeninputFingerHwrArLafManager::PreviewBubbleTextLayout()
|
|
1202 |
{
|
|
1203 |
return iPreviewWndText;
|
|
1204 |
}
|
|
1205 |
|
|
1206 |
// ---------------------------------------------------------------------------
|
|
1207 |
// get cell rect of virtual sctpad.
|
|
1208 |
// ---------------------------------------------------------------------------
|
|
1209 |
//
|
|
1210 |
void CPeninputFingerHwrArLafManager::GetVirtualKeyRects( RArray<TRect>& aArrayRects )
|
|
1211 |
{
|
|
1212 |
aArrayRects.Reset();
|
|
1213 |
|
|
1214 |
for(TInt i = 0; i < iSCTrectArray.Count(); i++)
|
|
1215 |
{
|
|
1216 |
TRect absoluteRect = iSCTrectArray[i];
|
|
1217 |
absoluteRect.Move(-iRectSctpad.iTl.iX, -iRectSctpad.iTl.iY);
|
|
1218 |
aArrayRects.Append(absoluteRect);
|
|
1219 |
}
|
|
1220 |
}
|
|
1221 |
|
|
1222 |
// ---------------------------------------------------------------------------
|
|
1223 |
// get cell rect of virtual sctpad.
|
|
1224 |
// ---------------------------------------------------------------------------
|
|
1225 |
//
|
|
1226 |
void CPeninputFingerHwrArLafManager::GetNumVirtualKeyRects( RArray<TRect>& aArrayRects )
|
|
1227 |
{
|
|
1228 |
aArrayRects.Reset();
|
|
1229 |
|
|
1230 |
for(TInt i = 0; i < iNumSCTrectArray.Count(); i++)
|
|
1231 |
{
|
|
1232 |
TRect absoluteRect = iNumSCTrectArray[i];
|
|
1233 |
absoluteRect.Move(-iRectNumpad.iTl.iX, -iRectNumpad.iTl.iY);
|
|
1234 |
aArrayRects.Append(absoluteRect);
|
|
1235 |
}
|
|
1236 |
}
|
|
1237 |
|
|
1238 |
// ---------------------------------------------------------------------------
|
|
1239 |
// get text layout of virtual sctpad.
|
|
1240 |
// ---------------------------------------------------------------------------
|
|
1241 |
//
|
|
1242 |
TAknTextLineLayout CPeninputFingerHwrArLafManager::SctpadKeyTxtLayout()
|
|
1243 |
{
|
|
1244 |
TAknTextLineLayout layout;
|
|
1245 |
if(iIsLandscape)
|
|
1246 |
{
|
|
1247 |
layout = AknLayoutScalable_Avkon::
|
|
1248 |
fshwr2_func_candi_cell_pane_t1(4).LayoutLine();
|
|
1249 |
}
|
|
1250 |
else
|
|
1251 |
{
|
|
1252 |
layout = AknLayoutScalable_Avkon::
|
|
1253 |
cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
|
|
1254 |
}
|
|
1255 |
return layout;
|
|
1256 |
}
|
|
1257 |
|
|
1258 |
// ---------------------------------------------------------------------------
|
|
1259 |
// get text layout of virtual sctpad.
|
|
1260 |
// ---------------------------------------------------------------------------
|
|
1261 |
//
|
|
1262 |
TAknTextLineLayout CPeninputFingerHwrArLafManager::NumpadKeyTxtLayout()
|
|
1263 |
{
|
|
1264 |
TAknTextLineLayout layout;
|
|
1265 |
if(iIsLandscape)
|
|
1266 |
{
|
|
1267 |
layout = AknLayoutScalable_Avkon::
|
|
1268 |
fshwr2_func_candi_cell_pane_t1(6).LayoutLine();
|
|
1269 |
}
|
|
1270 |
else
|
|
1271 |
{
|
|
1272 |
layout = AknLayoutScalable_Avkon::
|
|
1273 |
cell_fshwr2_syb_bg_pane_t1(1).LayoutLine();
|
|
1274 |
}
|
|
1275 |
return layout;
|
|
1276 |
}
|
|
1277 |
|
|
1278 |
// ---------------------------------------------------------------------------
|
|
1279 |
// get width unit of candidate list.
|
|
1280 |
// ---------------------------------------------------------------------------
|
|
1281 |
//
|
|
1282 |
TInt CPeninputFingerHwrArLafManager::CandidateUnitWidth()
|
|
1283 |
{
|
|
1284 |
return iCandsUnitWidth;
|
|
1285 |
}
|
|
1286 |
|
|
1287 |
// ---------------------------------------------------------------------------
|
|
1288 |
// get height unit of candidate list.
|
|
1289 |
// ---------------------------------------------------------------------------
|
|
1290 |
//
|
|
1291 |
TInt CPeninputFingerHwrArLafManager::CandidateUnitHeight()
|
|
1292 |
{
|
|
1293 |
return iCandsUnitHeight;
|
|
1294 |
}
|
|
1295 |
|
|
1296 |
// ---------------------------------------------------------------------------
|
|
1297 |
// get horizontal margin of candidate list.
|
|
1298 |
// ---------------------------------------------------------------------------
|
|
1299 |
//
|
|
1300 |
TInt CPeninputFingerHwrArLafManager::CandidateHorizontalMargin()
|
|
1301 |
{
|
|
1302 |
return iCandsHorizontalMargin;
|
|
1303 |
}
|
|
1304 |
|
|
1305 |
// ---------------------------------------------------------------------------
|
|
1306 |
// get vertical margin of candidate list.
|
|
1307 |
// ---------------------------------------------------------------------------
|
|
1308 |
//
|
|
1309 |
TInt CPeninputFingerHwrArLafManager::CandidateVerticalMargin()
|
|
1310 |
{
|
|
1311 |
return iCandsVerticalMargin;
|
|
1312 |
}
|
|
1313 |
|
|
1314 |
// ---------------------------------------------------------------------------
|
|
1315 |
// get top-left position of candidate list.
|
|
1316 |
// ---------------------------------------------------------------------------
|
|
1317 |
//
|
|
1318 |
TPoint CPeninputFingerHwrArLafManager::CandidateLTPos()
|
|
1319 |
{
|
|
1320 |
return iCandidateLTPos;
|
|
1321 |
}
|
|
1322 |
|
|
1323 |
// ---------------------------------------------------------------------------
|
|
1324 |
// get font for candidate list.
|
|
1325 |
// ---------------------------------------------------------------------------
|
|
1326 |
//
|
|
1327 |
const CFont* CPeninputFingerHwrArLafManager::CandidateFont()
|
|
1328 |
{
|
|
1329 |
return iCandsFont;
|
|
1330 |
}
|
|
1331 |
|
|
1332 |
// ---------------------------------------------------------------------------
|
|
1333 |
// get rects for symbol buttons
|
|
1334 |
// ---------------------------------------------------------------------------
|
|
1335 |
//
|
|
1336 |
RArray<TRect>& CPeninputFingerHwrArLafManager::GetSymBtnArray()
|
|
1337 |
{
|
|
1338 |
return iSymBtnRectArray;
|
|
1339 |
}
|
|
1340 |
|
|
1341 |
// ---------------------------------------------------------------------------
|
|
1342 |
// get rect for virtual key
|
|
1343 |
// ---------------------------------------------------------------------------
|
|
1344 |
//
|
|
1345 |
TRect CPeninputFingerHwrArLafManager::GetVirtualKeyRect()
|
|
1346 |
{
|
|
1347 |
return iRectSctpad;
|
|
1348 |
}
|
|
1349 |
|
|
1350 |
// ---------------------------------------------------------------------------
|
|
1351 |
// get rect for virtual number keypad
|
|
1352 |
// ---------------------------------------------------------------------------
|
|
1353 |
//
|
|
1354 |
TRect CPeninputFingerHwrArLafManager::GetVirtualNumKeyRect()
|
|
1355 |
{
|
|
1356 |
return iRectNumpad;
|
|
1357 |
}
|
|
1358 |
|
|
1359 |
// ---------------------------------------------------------------------------
|
|
1360 |
// get rect for hwr indicator
|
|
1361 |
// ---------------------------------------------------------------------------
|
|
1362 |
//
|
|
1363 |
TRect CPeninputFingerHwrArLafManager::GetIndicatorRect()
|
|
1364 |
{
|
|
1365 |
return iIndicatorRect;
|
|
1366 |
}
|
|
1367 |
|
|
1368 |
// ---------------------------------------------------------------------------
|
|
1369 |
// get padding size for arrow button
|
|
1370 |
// ---------------------------------------------------------------------------
|
|
1371 |
//
|
|
1372 |
TSize CPeninputFingerHwrArLafManager::GetArrowPaddingSize()
|
|
1373 |
{
|
|
1374 |
return iArrowPaddingSize;
|
|
1375 |
}
|
|
1376 |
|
|
1377 |
// End Of File
|