menufw/menufwui/mmwidgets/inc/mmwidgetsconstants.h
changeset 0 f72a12da539e
child 1 5315654608de
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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.8 % << 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 
       
   142 /**
       
   143  * Listbox constants' namespace.
       
   144  */
       
   145 namespace MmListBox
       
   146 	{
       
   147 	/**
       
   148 	 * Threshold value, determinign if a partial should
       
   149 	 * be shown in a list.
       
   150 	 */
       
   151 	const TInt KPartialItemShowThreshold (0);
       
   152 
       
   153 	/**
       
   154 	 * Default highlight in 4x5 grid.
       
   155 	 */
       
   156 	const TInt KCols(1);
       
   157 	}
       
   158 
       
   159 /**
       
   160  * Drag and drop related constants.
       
   161  */
       
   162 namespace MmEffects
       
   163 	{
       
   164 	/**
       
   165 	 * Threshold for items shift.
       
   166 	 */
       
   167 	const TReal KShiftRatio(0.25);
       
   168 	
       
   169 	/**
       
   170 	 * Drag and drop speed limit.
       
   171 	 */
       
   172 	const TInt KDragSpeedIgnoreThreshold(15 * 15);
       
   173 	
       
   174 	/**
       
   175 	 * Number of frames to animate.
       
   176 	 */
       
   177 	const TInt KMaximumAnimationFramesCount( 6 );
       
   178 	
       
   179 	/**
       
   180 	 * Number of frames to animate.
       
   181 	 */
       
   182 	const TInt KUsualAnimationFramesCount( 3 );
       
   183 	
       
   184 	/**
       
   185 	 * Number of frames to animate on non-touch devices.
       
   186 	 */
       
   187 	const TInt KUsualAnimationFramesCountNonTouch( 2 );
       
   188 	
       
   189 	/**
       
   190 	 * No animation frames count.
       
   191 	 */
       
   192 	const TInt KNoAnimationFramesCount( 1 );
       
   193 	
       
   194 	/**
       
   195 	 * Delay between redrawing frames.
       
   196 	 */
       
   197 	const TInt KAnimationFrameDelay( 40000 );
       
   198 	
       
   199 	/**
       
   200 	 * Text alpha during drag.
       
   201 	 */
       
   202 	const TInt KDragTextAlpha( 50 );
       
   203 	
       
   204 	/**
       
   205 	 * Focus based scrolling item threshold.
       
   206 	 */
       
   207 	const TReal KFocusScrollingThreshold( 0.55 );
       
   208 	
       
   209 	/**
       
   210 	 * Focus based scrolling item threshold for listbox landscape mode.
       
   211 	 */
       
   212 	const TReal KFocusScrollingThresholdListboxLanscape( 1.0 );
       
   213 	
       
   214 	/**
       
   215 	 * Value of drag ignore.
       
   216 	 */
       
   217 	const TInt KDragIgnoreRectValue(200);
       
   218 	
       
   219 	/**
       
   220 	 * Time between two butto repeat events.
       
   221 	 */
       
   222 	const TInt KDragRepeatRespawn(2);
       
   223 	
       
   224 	/**
       
   225 	 * Determines the speed of focus-based scrolling in edit mode.
       
   226 	 */
       
   227 	const TInt KEditModeScrollingDelayFactor = 4000;
       
   228 	}	
       
   229 
       
   230 /**
       
   231  * Templates' related constants.
       
   232  */
       
   233 namespace MmTemplateContants
       
   234 	{
       
   235 	/**
       
   236 	 * If a custom (non LCT) template is used, this is
       
   237 	 * its default scrollbar width.
       
   238 	 */
       
   239 	const TInt KCustomTemplateScrolbarWidth (25);
       
   240 	
       
   241 	const TInt KTemplateChildTextLength (64);
       
   242 	
       
   243 	const TInt KSubCellsCount (6);
       
   244 	
       
   245 	const TInt KItemSubCellsText (300);
       
   246 	
       
   247 	const TInt KMoveIndicatorStartingPos ( 32 );
       
   248 	
       
   249 	}
       
   250 
       
   251 /**
       
   252  * Shortcut constants.
       
   253  */
       
   254 namespace MmShortcutConstants
       
   255 	{
       
   256 	/**
       
   257 	 * Possible scancodes when interpreting shortcut key.
       
   258 	 */
       
   259 	const TInt KScanCodes[] = { '1','2','3','4','5','6','7','8','9',
       
   260 #ifndef __WINS__
       
   261         '*',
       
   262 #else
       
   263         EStdKeyNkpAsterisk,
       
   264 #endif
       
   265 	    '0', EStdKeyHash };
       
   266 	
       
   267 	/**
       
   268 	 * Number of available scancodes.
       
   269 	 */
       
   270 	const TInt KScanCodeCount = 12;
       
   271 	}
       
   272            
       
   273 namespace MmMarqueeConstants
       
   274 	{
       
   275 	const TInt KTextTrimmingThreshold (80);
       
   276 	const TInt KClippingBufLength (80);
       
   277 	const TInt KLoops (1);
       
   278 	const TInt KScrollAmount (6);
       
   279 	const TInt KScrollDelay (1000000);
       
   280 	}
       
   281 /**
       
   282  * Matrix Template Library panic notice.
       
   283  */
       
   284 _LIT( KMtlPanic,  "MTL" );
       
   285  
       
   286 _LIT8( KMmTitle8,       	"mul_title"         );
       
   287 _LIT8( KMmDetail8,      	"mul_detail"        );
       
   288 _LIT8( KMmIcon8,        	"mul_icon"          );
       
   289 _LIT8( KMmBackdropIcon8,    "mul_icon_backdrop" );
       
   290 _LIT8( KMmTemplate8,    	"mul_template"      );
       
   291 _LIT8( KGrid8,           	"grid"              );
       
   292 _LIT8( KListbox8,        	"listbox"           );
       
   293 _LIT8( KZoomLarge8,         "large_zoom"        );
       
   294 _LIT8( KZoomNormal8,        "normal_zoom"       );
       
   295 _LIT8( KZoomSmall8,        	"small_zoom"       	);
       
   296 
       
   297 _LIT8( KEmpty8,        			"empty"            );
       
   298 _LIT8( KOrientation8,        	"orientation"      );
       
   299 _LIT8( KBase8,        			"base"             );
       
   300 _LIT8( KText8,        			"text"             );
       
   301 _LIT8( KLayout8,        		"layout"           );
       
   302 _LIT8( KVariety8,        		"variety"          );
       
   303 _LIT8( KHAlign8,                "halign"           );
       
   304 _LIT8( KCenter8,                "center"           );
       
   305 _LIT8( KLeft8,                  "left"             );
       
   306 _LIT8( KRight8,                 "right"            );
       
   307 _LIT8( KHeight8,        		"height"           );
       
   308 _LIT8( KWidth8,        			"width"           );
       
   309 _LIT8( KTextVisual8,        	"textvisual"           );
       
   310 _LIT8( KImageVisual8,        	"imagevisual"           );
       
   311 _LIT8( KImagePath8,        		"imagepath"           );
       
   312 _LIT8( KGridLayout8,        	"gridlayout"           );
       
   313 _LIT8( KVarietyZoom8,        	"variety_zoom"           );
       
   314 _LIT8( KEnabled8,        	"enabled"           );
       
   315 _LIT8( KRow8,        			"row"           );
       
   316 _LIT8( KCol8,        			"col"           );
       
   317 _LIT8( KPositionX8,        		"positionx"           );
       
   318 _LIT8( KPositionY8,        		"positiony"           );
       
   319 _LIT8( KStyle8,        			"style"           );
       
   320 _LIT8( KTargetValue8,        	"targetvalue"           );
       
   321 _LIT8( KQfnPrimarySmall8,       "qfn_primarysmall"           );
       
   322 _LIT8( KHorizontalAlign8,       "horizontalalign"           );
       
   323 _LIT8( KLct8, 					"lct");
       
   324 _LIT8( KHighlight8,      		"highlight"       );
       
   325 _LIT8( KNoHighlight8,   		"nohighlight"    );
       
   326 _LIT8( KLandscape8,        		"landscape"         );   
       
   327 
       
   328 _LIT8( KMmMoveIndicatorFrame8,    		"mul_move_indicator_frame"      	);
       
   329 _LIT8( KMmMoveIndicatorArrowTop8,  		"mul_move_indicator_arrow_top"   	);
       
   330 _LIT8( KMmMoveIndicatorArrowBottom8,	"mul_move_indicator_arrow_bottom"   );
       
   331 _LIT8( KMmMoveIndicatorArrowLeft8,    	"mul_move_indicator_arrow_left"     );
       
   332 _LIT8( KMmMoveIndicatorArrowRight8,   	"mul_move_indicator_arrow_right"    );
       
   333 _LIT8( KMI8,        					"MI" 						        );
       
   334 
       
   335 _LIT( KTab,         "\t"      	);
       
   336 _LIT( KAkn, 		"akn"		);
       
   337 _LIT( KUnderline, 	"_"			);
       
   338 _LIT( KLct, 		"lct"		);
       
   339 _LIT( KCustom, 		"custom"	);
       
   340 
       
   341 _LIT( KZResource,        "z:\\resource\\"    );
       
   342 
       
   343 _LIT( KFormat1,          "\t%S\t%S\t"        );
       
   344 _LIT( KFormat2,          "%d\t%S\t%S\t"      );
       
   345 
       
   346 
       
   347 _LIT( KMLID,          "MLID"      );
       
   348 _LIT8( KListSingleLargeGraphicPane8,        "list_single_large_graphic_pane"           );
       
   349 _LIT8( KUiaccelAalistDoubleGraphicPane8,        "uiaccel_aalist_double_graphic_pane"           );
       
   350 _LIT8( KUiaccelAalistDoublePane8,        "uiaccel_aalist_double_pane"           );
       
   351 _LIT8( KUiaccelAalistSinglePane8,        "uiaccel_aalist_single_pane"           );
       
   352 _LIT8( KUiaccelAalistGeneAdPane8,        "uiaccel_aalist_gene_ad_pane"           );
       
   353 _LIT8( KUiaccelAalistSinglePaneT18,        "uiaccel_aalist_single_pane_t1"           );
       
   354 _LIT8( KUiaccelAalistDoubleGraphicPaneT18,        "uiaccel_aalist_double_graphic_pane_t1"           );
       
   355 _LIT8( KUiaccelAalistDoubleGraphicPaneT28,        "uiaccel_aalist_double_graphic_pane_t2"           );
       
   356 _LIT8( KUiaccelAalistDoublePaneT18,        "uiaccel_aalist_double_pane_t1"           );
       
   357 _LIT8( KUiaccelAalistDoublePaneT28,        "uiaccel_aalist_double_pane_t2"           );
       
   358 _LIT8( KlistSingleLargeGraphicPaneT18,        "list_single_large_graphic_pane_t1"           );
       
   359 _LIT8( KUiaccelAalistSinglePaneG18,        "uiaccel_aalist_single_pane_g1"           );
       
   360 _LIT8( KUiaccelAalistSinglePaneG28,        "uiaccel_aalist_single_pane_g2"           );
       
   361 _LIT8( KUiaccelAalistDoubleGraphicPaneG1,        "uiaccel_aalist_double_graphic_pane_g1"           );
       
   362 _LIT8( KUiaccelAalistDoubleGraphicPaneG28,        "uiaccel_aalist_double_graphic_pane_g2"           );
       
   363 _LIT8( KUiaccelAalistDoubleGraphicPaneG38,        "uiaccel_aalist_double_graphic_pane_g3"           );
       
   364 _LIT8( KUiaccelAalistDoubleGraphicPaneG68,        "uiaccel_aalist_double_graphic_pane_g6"           );
       
   365 _LIT8( KUiaccelAalistDoubleGraphicPaneG78,        "uiaccel_aalist_double_graphic_pane_g7"           );
       
   366 _LIT8( KUiaccelAalistDoublePaneG18,        "uiaccel_aalist_double_pane_g1"           );
       
   367 _LIT8( KUiaccelAalistDoublePaneG28,        "uiaccel_aalist_double_pane_g2"           );
       
   368 _LIT8( KlistSingleLargeGraphicPane8,        "list_single_large_graphic_pane"           );
       
   369 _LIT8( KlistSingleLargeGraphicPaneG18,        "list_single_large_graphic_pane_g1"           );
       
   370 _LIT8( KlistSingleLargeGraphicPaneG2Cp28,        "list_single_large_graphic_pane_g2_cp2"           );
       
   371 _LIT8( KlistSingleLargeGraphicPaneG4Cp28,        "list_single_large_graphic_pane_g4_cp2"           );
       
   372 _LIT8( KUiaccelAalistGeneAdPaneG18,        "uiaccel_aalist_gene_ad_pane_g1"           );
       
   373 
       
   374 _LIT8( KUiaccelAagridCellImagePane8,        "uiaccel_aagrid_cell_image_pane"           );
       
   375 _LIT8( KUiaccelAagridCellImagePaneT18,        "uiaccel_aagrid_cell_image_pane_t1"           );
       
   376 _LIT8( KUiaccelAagridCellImagePaneG18,        "uiaccel_aagrid_cell_image_pane_g1"           );
       
   377 _LIT8( KUiaccelAagridCellImagePaneG28,        "uiaccel_aagrid_cell_image_pane_g2"           );
       
   378 _LIT8( KUiaccelAagridCellImagePaneG38,        "uiaccel_aagrid_cell_image_pane_g3"           );
       
   379 _LIT8( KUiaccelAagridCellImagePaneG48,        "uiaccel_aagrid_cell_image_pane_g4"           );
       
   380 
       
   381 _LIT8( KCellHcAppsPane8,        "cell_hc_apps_pane"           );
       
   382 _LIT8( KCellHcAppsPaneT18,        "cell_hc_apps_pane_t1"           );
       
   383 _LIT8( KCellHcAppsPaneG18,        "cell_hc_apps_pane_g1"           );
       
   384 _LIT8( KCellHcAppsPaneG28,        "cell_hc_apps_pane_g2"           );
       
   385 _LIT8( KCellHcAppsPaneG38,        "cell_hc_apps_pane_g3"           );
       
   386 
       
   387 _LIT8( KCellAppPane8,        "cell_app_pane"           );
       
   388 _LIT8( KCellAppsPaneG18,        "cell_app_pane_g1"           );
       
   389 _LIT8( KCellAppsPaneT18,        "cell_app_pane_t1"           );
       
   390 _LIT8( KCellAppsPaneG28,        "cell_app_pane_g2"           );
       
   391 
       
   392 _LIT8( KListSingleHcAppsPane8,        "list_single_hc_apps_pane"           );
       
   393 _LIT8( KListSingleHcAppsPaneT18,        "list_single_hc_apps_pane_t1"           );
       
   394 _LIT8( KListSingleHcAppsPaneG18,        "list_single_hc_apps_pane_g1"           );
       
   395 _LIT8( KListSingleHcAppsPaneG28,        "list_single_hc_apps_pane_g2"           );
       
   396 /**
       
   397  * Defines the type of a widget.
       
   398  */
       
   399 enum TMmWidgetType
       
   400     {
       
   401     EWidgetTypeNone = 0,
       
   402     EGrid,
       
   403     EListbox,
       
   404     ECoverflow
       
   405     };
       
   406 
       
   407 enum TImageVisualId
       
   408     {
       
   409     EImageVisualIdNormalMode = 0x00000000,
       
   410     EImageVisualIdSwapMode = 0x00000001,
       
   411     EImageVisualIdEditMode = 0x00000002
       
   412     };
       
   413     
       
   414 /**
       
   415  * Defines the type of a template.
       
   416  */
       
   417 enum TMmTemplateType
       
   418     {
       
   419     ETemplateTypeCustom = 0,
       
   420     ETemplateTypeLCT
       
   421     };
       
   422 
       
   423 /**
       
   424  * Defines the type of a floating item.
       
   425  */
       
   426 enum TMmFloatingItemType
       
   427     {
       
   428     EDrag,
       
   429     EPostDragRefreshItem,
       
   430     EPostHighlightChangeRefreshItem,
       
   431     ESwapTransition,
       
   432     EDragTransition,
       
   433     EZoomTransition
       
   434     };
       
   435 
       
   436 const TInt KDelayInSeconds1 = 1000000;
       
   437 const TInt KDelayInSeconds6 = 6000000;
       
   438 const TInt KDelayInfinite = -1;
       
   439 
       
   440 enum TManualAlign
       
   441     {
       
   442     EManualAlignUndefined,
       
   443     EManualAlignLeft,
       
   444     EManualAlignCenter,
       
   445     EManualAlignRight
       
   446     };
       
   447 
       
   448 #endif // MMWIDGETSCONSTANTS_H