|
1 /* |
|
2 * Copyright (c) 2007 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: Constants for the matrixmenu |
|
15 * Version : %version: 33.1.14 % << Don't touch! Updated by Synergy at check-out. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MMWIDGETSCONSTANTS_H |
|
21 #define MMWIDGETSCONSTANTS_H |
|
22 |
|
23 |
|
24 #include <e32keys.h> |
|
25 |
|
26 /** |
|
27 * Grid constants' namespace. |
|
28 */ |
|
29 namespace MmGrid |
|
30 { |
|
31 /** |
|
32 * X component of the 4x3 layout. |
|
33 */ |
|
34 const TInt K4By3LayoutX = 4; |
|
35 |
|
36 /** |
|
37 * Y component of the 4x3 layout. |
|
38 */ |
|
39 const TInt K4By3LayoutY = 3; |
|
40 |
|
41 /** |
|
42 * X component of the 3x4 layout. |
|
43 */ |
|
44 |
|
45 const TInt K3By4LayoutX = 3; |
|
46 |
|
47 /** |
|
48 * Y component of the 3x4 layout. |
|
49 */ |
|
50 const TInt K3By4LayoutY = 4; |
|
51 |
|
52 /** |
|
53 * X component of the 4x5 layout. |
|
54 */ |
|
55 const TInt K4By5LayoutX = 4; |
|
56 |
|
57 /** |
|
58 * Y component of the 5x4 layout. |
|
59 */ |
|
60 const TInt K4By5LayoutY = 5; |
|
61 |
|
62 /** |
|
63 * X component of the 5x4 layout. |
|
64 */ |
|
65 const TInt K5By4LayoutX = 5; |
|
66 |
|
67 /** |
|
68 * Y component of the 5x4 layout. |
|
69 */ |
|
70 const TInt K5By4LayoutY = 4; |
|
71 |
|
72 /** |
|
73 * Below this value, default highlight in 3x4 grid |
|
74 * is set up on the first item. Otherwize, on the default |
|
75 * highlight. |
|
76 */ |
|
77 const TInt K3By4Threshold(5); |
|
78 |
|
79 /** |
|
80 * Below this value, default highlight in 4x3 grid |
|
81 * is set up on the first item. Otherwize, on the default |
|
82 * highlight. |
|
83 */ |
|
84 const TInt K4By3Threshold(6); |
|
85 |
|
86 /** |
|
87 * Below this value, default highlight in 5x4 grid |
|
88 * is set up on the first item. Otherwize, on the default |
|
89 * highlight. |
|
90 */ |
|
91 const TInt K5By4Threshold(8); |
|
92 |
|
93 /** |
|
94 * Below this value, default highlight in 4x5 grid |
|
95 * is set up on the first item. Otherwize, on the default |
|
96 * highlight. |
|
97 */ |
|
98 const TInt K4By5Threshold(10); |
|
99 |
|
100 /** |
|
101 * Default highlight in 3x4 grid. |
|
102 */ |
|
103 const TInt K3By4DefaultHighlight(4); |
|
104 |
|
105 /** |
|
106 * Default highlight in 4x3 grid. |
|
107 */ |
|
108 const TInt K4By3DefaultHighlight(5); |
|
109 |
|
110 /** |
|
111 * Default highlight in 5x4 grid. |
|
112 */ |
|
113 const TInt K5By4DefaultHighlight(7); |
|
114 |
|
115 /** |
|
116 * Default highlight in 4x5 grid. |
|
117 */ |
|
118 const TInt K4By5DefaultHighlight(8); |
|
119 |
|
120 /** |
|
121 * Number of rows in portrait/non-zoom mode; |
|
122 */ |
|
123 const TInt KRowsPortraitZoomNormal(4); |
|
124 |
|
125 /** |
|
126 * Number of columns in landscape/non-zoom mode; |
|
127 */ |
|
128 const TInt KColsPortraitZoomNormal(3); |
|
129 |
|
130 /** |
|
131 * Number of rows in portrait/non-zoom mode; |
|
132 */ |
|
133 const TInt KRowsLandscapeZoomNormal(3); |
|
134 |
|
135 /** |
|
136 * Number of columns in landscape/non-zoom mode; |
|
137 */ |
|
138 const TInt KColsLandscapeZoomNormal(4); |
|
139 |
|
140 /** |
|
141 * Focus based scrolling item threshold for grid. |
|
142 */ |
|
143 const TReal KFocusScrollingThreshold( 0.27 ); |
|
144 } |
|
145 |
|
146 /** |
|
147 * Listbox constants' namespace. |
|
148 */ |
|
149 namespace MmListBox |
|
150 { |
|
151 /** |
|
152 * Threshold value, determinign if a partial should |
|
153 * be shown in a list. |
|
154 */ |
|
155 const TInt KPartialItemShowThreshold( 0 ); |
|
156 |
|
157 /** |
|
158 * Default highlight in 4x5 grid. |
|
159 */ |
|
160 const TInt KCols( 1 ); |
|
161 |
|
162 /** |
|
163 * Focus based scrolling item threshold for list. |
|
164 */ |
|
165 const TReal KFocusScrollingThreshold( 0.55 ); |
|
166 } |
|
167 |
|
168 /** |
|
169 * Drag and drop related constants. |
|
170 */ |
|
171 namespace MmEffects |
|
172 { |
|
173 /** |
|
174 * Threshold for items shift. |
|
175 */ |
|
176 const TReal KShiftRatio( 0.25 ); |
|
177 |
|
178 /** |
|
179 * Drag and drop speed limit. |
|
180 */ |
|
181 const TInt KDragSpeedIgnoreThreshold( 15 * 15 ); |
|
182 |
|
183 /** |
|
184 * Number of frames to animate. |
|
185 */ |
|
186 const TInt KMaximumAnimationFramesCount( 6 ); |
|
187 |
|
188 /** |
|
189 * Number of frames to animate. |
|
190 */ |
|
191 const TInt KUsualAnimationFramesCount( 3 ); |
|
192 |
|
193 /** |
|
194 * Number of frames to animate on non-touch devices. |
|
195 */ |
|
196 const TInt KUsualAnimationFramesCountNonTouch( 2 ); |
|
197 |
|
198 /** |
|
199 * No animation frames count. |
|
200 */ |
|
201 const TInt KNoAnimationFramesCount( 1 ); |
|
202 |
|
203 /** |
|
204 * Delay between redrawing frames. |
|
205 */ |
|
206 const TInt KAnimationFrameDelay( 35000 ); |
|
207 |
|
208 /** |
|
209 * Text alpha during drag. |
|
210 */ |
|
211 const TInt KDragTextAlpha( 50 ); |
|
212 |
|
213 /** |
|
214 * Value of drag ignore. |
|
215 */ |
|
216 const TInt KDragIgnoreRectValue( 200 ); |
|
217 |
|
218 /** |
|
219 * Time between two butto repeat events. |
|
220 */ |
|
221 const TInt KDragRepeatRespawn( 2 ); |
|
222 |
|
223 /** |
|
224 * Determines the speed of focus-based scrolling in edit mode. |
|
225 */ |
|
226 const TInt KEditModeScrollingDelayFactor = 4000; |
|
227 } |
|
228 |
|
229 /** |
|
230 * Templates' related constants. |
|
231 */ |
|
232 namespace MmTemplateContants |
|
233 { |
|
234 /** |
|
235 * If a custom (non LCT) template is used, this is |
|
236 * its default scrollbar width. |
|
237 */ |
|
238 const TInt KCustomTemplateScrolbarWidth (25); |
|
239 |
|
240 const TInt KTemplateChildTextLength (64); |
|
241 |
|
242 const TInt KSubCellsCount (6); |
|
243 |
|
244 const TInt KItemSubCellsText (300); |
|
245 |
|
246 const TInt KMoveIndicatorStartingPos ( 32 ); |
|
247 |
|
248 } |
|
249 |
|
250 /** |
|
251 * Shortcut constants. |
|
252 */ |
|
253 namespace MmShortcutConstants |
|
254 { |
|
255 /** |
|
256 * Possible scancodes when interpreting shortcut key. |
|
257 */ |
|
258 const TInt KScanCodes[] = { '1','2','3','4','5','6','7','8','9', |
|
259 #ifndef __WINS__ |
|
260 '*', |
|
261 #else |
|
262 EStdKeyNkpAsterisk, |
|
263 #endif |
|
264 '0', EStdKeyHash }; |
|
265 |
|
266 /** |
|
267 * Number of available scancodes. |
|
268 */ |
|
269 const TInt KScanCodeCount = 12; |
|
270 } |
|
271 |
|
272 namespace MmMarqueeConstants |
|
273 { |
|
274 const TInt KTextTrimmingThreshold (80); |
|
275 const TInt KClippingBufLength (80); |
|
276 const TInt KLoops (1); |
|
277 const TInt KScrollAmount (6); |
|
278 const TInt KScrollDelay (1000000); |
|
279 } |
|
280 /** |
|
281 * Matrix Template Library panic notice. |
|
282 */ |
|
283 _LIT( KMtlPanic, "MTL" ); |
|
284 |
|
285 _LIT8( KMmTitle8, "mul_title" ); |
|
286 _LIT8( KMmDetail8, "mul_detail" ); |
|
287 _LIT8( KMmIcon8, "mul_icon" ); |
|
288 _LIT8( KMmBackdropIcon8, "mul_icon_backdrop" ); |
|
289 _LIT8( KMmTemplate8, "mul_template" ); |
|
290 _LIT8( KGrid8, "grid" ); |
|
291 _LIT8( KListbox8, "listbox" ); |
|
292 |
|
293 _LIT8( KEmpty8, "empty" ); |
|
294 _LIT8( KOrientation8, "orientation" ); |
|
295 _LIT8( KBase8, "base" ); |
|
296 _LIT8( KText8, "text" ); |
|
297 _LIT8( KLayout8, "layout" ); |
|
298 _LIT8( KVariety8, "variety" ); |
|
299 _LIT8( KHAlign8, "halign" ); |
|
300 _LIT8( KCenter8, "center" ); |
|
301 _LIT8( KLeft8, "left" ); |
|
302 _LIT8( KRight8, "right" ); |
|
303 _LIT8( KHeight8, "height" ); |
|
304 _LIT8( KWidth8, "width" ); |
|
305 _LIT8( KTextVisual8, "textvisual" ); |
|
306 _LIT8( KImageVisual8, "imagevisual" ); |
|
307 _LIT8( KImagePath8, "imagepath" ); |
|
308 _LIT8( KGridLayout8, "gridlayout" ); |
|
309 _LIT8( KEnabled8, "enabled" ); |
|
310 _LIT8( KRow8, "row" ); |
|
311 _LIT8( KCol8, "col" ); |
|
312 _LIT8( KPositionX8, "positionx" ); |
|
313 _LIT8( KPositionY8, "positiony" ); |
|
314 _LIT8( KStyle8, "style" ); |
|
315 _LIT8( KTargetValue8, "targetvalue" ); |
|
316 _LIT8( KQfnPrimarySmall8, "qfn_primarysmall" ); |
|
317 _LIT8( KHorizontalAlign8, "horizontalalign" ); |
|
318 _LIT8( KLct8, "lct"); |
|
319 _LIT8( KHighlight8, "highlight" ); |
|
320 _LIT8( KNoHighlight8, "nohighlight" ); |
|
321 _LIT8( KLandscape8, "landscape" ); |
|
322 |
|
323 _LIT8( KMmMoveIndicatorFrame8, "mul_move_indicator_frame" ); |
|
324 _LIT8( KMmMoveIndicatorArrowTop8, "mul_move_indicator_arrow_top" ); |
|
325 _LIT8( KMmMoveIndicatorArrowBottom8, "mul_move_indicator_arrow_bottom" ); |
|
326 _LIT8( KMmMoveIndicatorArrowLeft8, "mul_move_indicator_arrow_left" ); |
|
327 _LIT8( KMmMoveIndicatorArrowRight8, "mul_move_indicator_arrow_right" ); |
|
328 _LIT8( KMI8, "MI" ); |
|
329 |
|
330 _LIT( KTab, "\t" ); |
|
331 _LIT( KAkn, "akn" ); |
|
332 _LIT( KUnderline, "_" ); |
|
333 _LIT( KLct, "lct" ); |
|
334 _LIT( KCustom, "custom" ); |
|
335 |
|
336 _LIT( KZResource, "z:\\resource\\" ); |
|
337 |
|
338 _LIT( KFormat1, "\t%S\t%S\t" ); |
|
339 _LIT( KFormat2, "%d\t%S\t%S\t" ); |
|
340 |
|
341 |
|
342 _LIT( KMLID, "MLID" ); |
|
343 _LIT8( KListSingleLargeGraphicPane8, "list_single_large_graphic_pane" ); |
|
344 _LIT8( KUiaccelAalistDoubleGraphicPane8, "uiaccel_aalist_double_graphic_pane" ); |
|
345 _LIT8( KUiaccelAalistDoublePane8, "uiaccel_aalist_double_pane" ); |
|
346 _LIT8( KUiaccelAalistSinglePane8, "uiaccel_aalist_single_pane" ); |
|
347 _LIT8( KUiaccelAalistGeneAdPane8, "uiaccel_aalist_gene_ad_pane" ); |
|
348 _LIT8( KUiaccelAalistSinglePaneT18, "uiaccel_aalist_single_pane_t1" ); |
|
349 _LIT8( KUiaccelAalistDoubleGraphicPaneT18, "uiaccel_aalist_double_graphic_pane_t1" ); |
|
350 _LIT8( KUiaccelAalistDoubleGraphicPaneT28, "uiaccel_aalist_double_graphic_pane_t2" ); |
|
351 _LIT8( KUiaccelAalistDoublePaneT18, "uiaccel_aalist_double_pane_t1" ); |
|
352 _LIT8( KUiaccelAalistDoublePaneT28, "uiaccel_aalist_double_pane_t2" ); |
|
353 _LIT8( KlistSingleLargeGraphicPaneT18, "list_single_large_graphic_pane_t1" ); |
|
354 _LIT8( KUiaccelAalistSinglePaneG18, "uiaccel_aalist_single_pane_g1" ); |
|
355 _LIT8( KUiaccelAalistSinglePaneG28, "uiaccel_aalist_single_pane_g2" ); |
|
356 _LIT8( KUiaccelAalistDoubleGraphicPaneG1, "uiaccel_aalist_double_graphic_pane_g1" ); |
|
357 _LIT8( KUiaccelAalistDoubleGraphicPaneG28, "uiaccel_aalist_double_graphic_pane_g2" ); |
|
358 _LIT8( KUiaccelAalistDoubleGraphicPaneG38, "uiaccel_aalist_double_graphic_pane_g3" ); |
|
359 _LIT8( KUiaccelAalistDoubleGraphicPaneG68, "uiaccel_aalist_double_graphic_pane_g6" ); |
|
360 _LIT8( KUiaccelAalistDoubleGraphicPaneG78, "uiaccel_aalist_double_graphic_pane_g7" ); |
|
361 _LIT8( KUiaccelAalistDoublePaneG18, "uiaccel_aalist_double_pane_g1" ); |
|
362 _LIT8( KUiaccelAalistDoublePaneG28, "uiaccel_aalist_double_pane_g2" ); |
|
363 _LIT8( KlistSingleLargeGraphicPane8, "list_single_large_graphic_pane" ); |
|
364 _LIT8( KlistSingleLargeGraphicPaneG18, "list_single_large_graphic_pane_g1" ); |
|
365 _LIT8( KlistSingleLargeGraphicPaneG2Cp28, "list_single_large_graphic_pane_g2_cp2" ); |
|
366 _LIT8( KlistSingleLargeGraphicPaneG4Cp28, "list_single_large_graphic_pane_g4_cp2" ); |
|
367 _LIT8( KUiaccelAalistGeneAdPaneG18, "uiaccel_aalist_gene_ad_pane_g1" ); |
|
368 |
|
369 _LIT8( KUiaccelAagridCellImagePane8, "uiaccel_aagrid_cell_image_pane" ); |
|
370 _LIT8( KUiaccelAagridCellImagePaneT18, "uiaccel_aagrid_cell_image_pane_t1" ); |
|
371 _LIT8( KUiaccelAagridCellImagePaneG18, "uiaccel_aagrid_cell_image_pane_g1" ); |
|
372 _LIT8( KUiaccelAagridCellImagePaneG28, "uiaccel_aagrid_cell_image_pane_g2" ); |
|
373 _LIT8( KUiaccelAagridCellImagePaneG38, "uiaccel_aagrid_cell_image_pane_g3" ); |
|
374 _LIT8( KUiaccelAagridCellImagePaneG48, "uiaccel_aagrid_cell_image_pane_g4" ); |
|
375 |
|
376 _LIT8( KCellHcAppsPane8, "cell_hc_apps_pane" ); |
|
377 _LIT8( KCellHcAppsPaneT18, "cell_hc_apps_pane_t1" ); |
|
378 _LIT8( KCellHcAppsPaneG18, "cell_hc_apps_pane_g1" ); |
|
379 _LIT8( KCellHcAppsPaneG28, "cell_hc_apps_pane_g2" ); |
|
380 _LIT8( KCellHcAppsPaneG38, "cell_hc_apps_pane_g3" ); |
|
381 |
|
382 _LIT8( KCellAppPane8, "cell_app_pane" ); |
|
383 _LIT8( KCellAppsPaneG18, "cell_app_pane_g1" ); |
|
384 _LIT8( KCellAppsPaneT18, "cell_app_pane_t1" ); |
|
385 _LIT8( KCellAppsPaneG28, "cell_app_pane_g2" ); |
|
386 |
|
387 _LIT8( KListSingleHcAppsPane8, "list_single_hc_apps_pane" ); |
|
388 _LIT8( KListSingleHcAppsPaneT18, "list_single_hc_apps_pane_t1" ); |
|
389 _LIT8( KListSingleHcAppsPaneG18, "list_single_hc_apps_pane_g1" ); |
|
390 _LIT8( KListSingleHcAppsPaneG28, "list_single_hc_apps_pane_g2" ); |
|
391 /** |
|
392 * Defines the type of a widget. |
|
393 */ |
|
394 enum TMmWidgetType |
|
395 { |
|
396 EWidgetTypeNone = 0, |
|
397 EGrid, |
|
398 EListbox, |
|
399 ECoverflow |
|
400 }; |
|
401 |
|
402 enum TImageVisualId |
|
403 { |
|
404 EImageVisualIdNormalMode = 0x00000000, |
|
405 EImageVisualIdSwapMode = 0x00000001, |
|
406 EImageVisualIdEditMode = 0x00000002 |
|
407 }; |
|
408 |
|
409 /** |
|
410 * Defines the type of a template. |
|
411 */ |
|
412 enum TMmTemplateType |
|
413 { |
|
414 ETemplateTypeCustom = 0, |
|
415 ETemplateTypeLCT |
|
416 }; |
|
417 |
|
418 /** |
|
419 * Defines the type of a floating item. |
|
420 */ |
|
421 enum TMmFloatingItemType |
|
422 { |
|
423 EDrag, |
|
424 EPostDragRefreshItem, |
|
425 EPostHighlightChangeRefreshItem, |
|
426 ESwapTransition, |
|
427 EDragStart, |
|
428 EDragTransition, |
|
429 EZoomTransition |
|
430 }; |
|
431 |
|
432 const TInt KDelayInSeconds1 = 1000000; |
|
433 const TInt KDelayInSeconds6 = 6000000; |
|
434 const TInt KDelayInfinite = -1; |
|
435 |
|
436 enum TManualAlign |
|
437 { |
|
438 EManualAlignUndefined, |
|
439 EManualAlignLeft, |
|
440 EManualAlignCenter, |
|
441 EManualAlignRight |
|
442 }; |
|
443 |
|
444 /** |
|
445 * The minimal drag vector y-length that can trigger kinetic scrolling. |
|
446 * This is just a rough estimation of the actual trigger value used by AVKON, |
|
447 * but it is sufficient for our purposes. |
|
448 */ |
|
449 const TInt KDragTreshold = 18; |
|
450 |
|
451 /** |
|
452 * The interval between redraws when scrolling using the scrollbar. |
|
453 * This will give us nice ~30 fps. |
|
454 */ |
|
455 const TInt KScrollingRedrawInterval = 33333; |
|
456 |
|
457 #endif // MMWIDGETSCONSTANTS_H |