menufw/menufwui/mmwidgets/inc/mmwidgetsconstants.h
branchRCL_3
changeset 19 79311d856354
parent 9 f966699dea19
child 26 1b758917cafc
equal deleted inserted replaced
18:d05a55b217df 19:79311d856354
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Constants for the matrixmenu
    14 * Description:  Constants for the matrixmenu
    15 *  Version     : %version: 33.1.12 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: 33.1.13 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #ifndef MMWIDGETSCONSTANTS_H
    20 #ifndef MMWIDGETSCONSTANTS_H
    25 
    25 
    26 /**
    26 /**
    27  * Grid constants' namespace.
    27  * Grid constants' namespace.
    28  */
    28  */
    29 namespace MmGrid
    29 namespace MmGrid
    30 	{
    30   {
    31 	/**
    31   /**
    32 	 * X component of the 4x3 layout.
    32    * X component of the 4x3 layout.
    33 	 */
    33    */
    34 	const TInt K4By3LayoutX = 4;
    34   const TInt K4By3LayoutX = 4;
    35 
    35 
    36 	/**
    36   /**
    37 	 * Y component of the 4x3 layout.
    37    * Y component of the 4x3 layout.
    38 	 */
    38    */
    39 	const TInt K4By3LayoutY = 3;
    39   const TInt K4By3LayoutY = 3;
    40 
    40 
    41 	/**
    41   /**
    42 	 * X component of the 3x4 layout.
    42    * X component of the 3x4 layout.
    43 	 */
    43    */
    44 
    44 
    45 	const TInt K3By4LayoutX = 3;
    45   const TInt K3By4LayoutX = 3;
    46 
    46 
    47 	/**
    47   /**
    48 	 * Y component of the 3x4 layout.
    48    * Y component of the 3x4 layout.
    49 	 */
    49    */
    50 	const TInt K3By4LayoutY = 4;
    50   const TInt K3By4LayoutY = 4;
    51 
    51 
    52 	/**
    52   /**
    53 	 * X component of the 4x5 layout.
    53    * X component of the 4x5 layout.
    54 	 */
    54    */
    55 	const TInt K4By5LayoutX = 4;
    55   const TInt K4By5LayoutX = 4;
    56 
    56 
    57 	/**
    57   /**
    58 	 * Y component of the 5x4 layout.
    58    * Y component of the 5x4 layout.
    59 	 */
    59    */
    60 	const TInt K4By5LayoutY = 5;
    60   const TInt K4By5LayoutY = 5;
    61 
    61 
    62 	/**
    62   /**
    63 	 * X component of the 5x4 layout.
    63    * X component of the 5x4 layout.
    64 	 */
    64    */
    65 	const TInt K5By4LayoutX = 5;
    65   const TInt K5By4LayoutX = 5;
    66 
    66 
    67 	/**
    67   /**
    68 	 * Y component of the 5x4 layout.
    68    * Y component of the 5x4 layout.
    69 	 */
    69    */
    70 	const TInt K5By4LayoutY = 4;
    70   const TInt K5By4LayoutY = 4;
    71 
    71 
    72 	/**
    72   /**
    73 	 * Below this value, default highlight in 3x4 grid
    73    * Below this value, default highlight in 3x4 grid
    74 	 * is set up on the first item. Otherwize, on the default
    74    * is set up on the first item. Otherwize, on the default
    75 	 * highlight.
    75    * highlight.
    76 	 */
    76    */
    77 	const TInt K3By4Threshold(5);
    77   const TInt K3By4Threshold(5);
    78 
    78 
    79 	/**
    79   /**
    80 	 * Below this value, default highlight in 4x3 grid
    80    * Below this value, default highlight in 4x3 grid
    81 	 * is set up on the first item. Otherwize, on the default
    81    * is set up on the first item. Otherwize, on the default
    82 	 * highlight.
    82    * highlight.
    83 	 */
    83    */
    84 	const TInt K4By3Threshold(6);
    84   const TInt K4By3Threshold(6);
    85 
    85 
    86 	/**
    86   /**
    87 	 * Below this value, default highlight in 5x4 grid
    87    * Below this value, default highlight in 5x4 grid
    88 	 * is set up on the first item. Otherwize, on the default
    88    * is set up on the first item. Otherwize, on the default
    89 	 * highlight.
    89    * highlight.
    90 	 */
    90    */
    91 	const TInt K5By4Threshold(8);
    91   const TInt K5By4Threshold(8);
    92 
    92 
    93 	/**
    93   /**
    94 	 * Below this value, default highlight in 4x5 grid
    94    * Below this value, default highlight in 4x5 grid
    95 	 * is set up on the first item. Otherwize, on the default
    95    * is set up on the first item. Otherwize, on the default
    96 	 * highlight.
    96    * highlight.
    97 	 */
    97    */
    98 	const TInt K4By5Threshold(10);
    98   const TInt K4By5Threshold(10);
    99 
    99 
   100 	/**
   100   /**
   101 	 * Default highlight in 3x4 grid.
   101    * Default highlight in 3x4 grid.
   102 	 */
   102    */
   103 	const TInt K3By4DefaultHighlight(4);
   103   const TInt K3By4DefaultHighlight(4);
   104 
   104 
   105 	/**
   105   /**
   106 	 * Default highlight in 4x3 grid.
   106    * Default highlight in 4x3 grid.
   107 	 */
   107    */
   108 	const TInt K4By3DefaultHighlight(5);
   108   const TInt K4By3DefaultHighlight(5);
   109 
   109 
   110 	/**
   110   /**
   111 	 * Default highlight in 5x4 grid.
   111    * Default highlight in 5x4 grid.
   112 	 */
   112    */
   113 	const TInt K5By4DefaultHighlight(7);
   113   const TInt K5By4DefaultHighlight(7);
   114 
   114 
   115 	/**
   115   /**
   116 	 * Default highlight in 4x5 grid.
   116    * Default highlight in 4x5 grid.
   117 	 */
   117    */
   118 	const TInt K4By5DefaultHighlight(8);
   118   const TInt K4By5DefaultHighlight(8);
   119 
   119 
   120 	/**
   120   /**
   121 	 * Number of rows in portrait/non-zoom mode;
   121    * Number of rows in portrait/non-zoom mode;
   122 	 */
   122    */
   123 	const TInt KRowsPortraitZoomNormal(4);
   123   const TInt KRowsPortraitZoomNormal(4);
   124 
   124 
   125 	/**
   125   /**
   126 	 * Number of columns in landscape/non-zoom mode;
   126    * Number of columns in landscape/non-zoom mode;
   127 	 */
   127    */
   128 	const TInt KColsPortraitZoomNormal(3);
   128   const TInt KColsPortraitZoomNormal(3);
   129 
   129 
   130 	/**
   130   /**
   131 	 * Number of rows in portrait/non-zoom mode;
   131    * Number of rows in portrait/non-zoom mode;
   132 	 */
   132    */
   133 	const TInt KRowsLandscapeZoomNormal(3);
   133   const TInt KRowsLandscapeZoomNormal(3);
   134 
   134 
   135 	/**
   135   /**
   136 	 * Number of columns in landscape/non-zoom mode;
   136    * Number of columns in landscape/non-zoom mode;
   137 	 */
   137    */
   138 	const TInt KColsLandscapeZoomNormal(4);
   138   const TInt KColsLandscapeZoomNormal(4);
   139 	
   139 
   140     /**
   140     /**
   141      * Focus based scrolling item threshold for grid.
   141      * Focus based scrolling item threshold for grid.
   142      */
   142      */
   143     const TReal KFocusScrollingThreshold( 0.27 );
   143     const TReal KFocusScrollingThreshold( 0.27 );
   144 	}
   144   }
   145 
   145 
   146 /**
   146 /**
   147  * Listbox constants' namespace.
   147  * Listbox constants' namespace.
   148  */
   148  */
   149 namespace MmListBox
   149 namespace MmListBox
   150 	{
   150     {
   151 	/**
   151     /**
   152 	 * Threshold value, determinign if a partial should
   152      * Threshold value, determinign if a partial should
   153 	 * be shown in a list.
   153      * be shown in a list.
   154 	 */
   154      */
   155 	const TInt KPartialItemShowThreshold (0);
   155     const TInt KPartialItemShowThreshold( 0 );
   156 
   156 
   157 	/**
   157     /**
   158 	 * Default highlight in 4x5 grid.
   158      * Default highlight in 4x5 grid.
   159 	 */
   159      */
   160 	const TInt KCols(1);
   160     const TInt KCols( 1 );
   161 	
   161 
   162     /**
   162     /**
   163      * Focus based scrolling item threshold for list.
   163      * Focus based scrolling item threshold for list.
   164      */
   164      */
   165     const TReal KFocusScrollingThreshold( 0.55 );
   165     const TReal KFocusScrollingThreshold( 0.55 );
   166 	}
   166     }
   167 
   167 
   168 /**
   168 /**
   169  * Drag and drop related constants.
   169  * Drag and drop related constants.
   170  */
   170  */
   171 namespace MmEffects
   171 namespace MmEffects
   172 	{
   172   {
   173 	/**
   173     /**
   174 	 * Threshold for items shift.
   174      * Threshold for items shift.
   175 	 */
   175      */
   176 	const TReal KShiftRatio(0.25);
   176     const TReal KShiftRatio( 0.25 );
   177 
   177 
   178 	/**
   178     /**
   179 	 * Drag and drop speed limit.
   179      * Drag and drop speed limit.
   180 	 */
   180      */
   181 	const TInt KDragSpeedIgnoreThreshold(15 * 15);
   181     const TInt KDragSpeedIgnoreThreshold( 15 * 15 );
   182 
   182 
   183 	/**
   183     /**
   184 	 * Number of frames to animate.
   184      * Number of frames to animate.
   185 	 */
   185      */
   186 	const TInt KMaximumAnimationFramesCount( 6 );
   186     const TInt KMaximumAnimationFramesCount( 6 );
   187 
   187 
   188 	/**
   188     /**
   189 	 * Number of frames to animate.
   189      * Number of frames to animate.
   190 	 */
   190      */
   191 	const TInt KUsualAnimationFramesCount( 3 );
   191     const TInt KUsualAnimationFramesCount( 3 );
   192 
   192 
   193 	/**
   193     /**
   194 	 * Number of frames to animate on non-touch devices.
   194      * Number of frames to animate on non-touch devices.
   195 	 */
   195      */
   196 	const TInt KUsualAnimationFramesCountNonTouch( 2 );
   196     const TInt KUsualAnimationFramesCountNonTouch( 2 );
   197 
   197 
   198 	/**
   198     /**
   199 	 * No animation frames count.
   199      * No animation frames count.
   200 	 */
   200      */
   201 	const TInt KNoAnimationFramesCount( 1 );
   201     const TInt KNoAnimationFramesCount( 1 );
   202 
   202 
   203 	/**
   203     /**
   204 	 * Delay between redrawing frames.
   204      * Delay between redrawing frames.
   205 	 */
   205      */
   206 	const TInt KAnimationFrameDelay( 40000 );
   206     const TInt KAnimationFrameDelay( 35000 );
   207 
   207 
   208 	/**
   208     /**
   209 	 * Text alpha during drag.
   209      * Text alpha during drag.
   210 	 */
   210      */
   211 	const TInt KDragTextAlpha( 50 );
   211     const TInt KDragTextAlpha( 50 );
   212 
   212 
   213 	/**
   213     /**
   214 	 * Value of drag ignore.
   214      * Value of drag ignore.
   215 	 */
   215      */
   216 	const TInt KDragIgnoreRectValue(200);
   216     const TInt KDragIgnoreRectValue( 200 );
   217 
   217 
   218 	/**
   218     /**
   219 	 * Time between two butto repeat events.
   219      * Time between two butto repeat events.
   220 	 */
   220      */
   221 	const TInt KDragRepeatRespawn(2);
   221     const TInt KDragRepeatRespawn( 2 );
   222 
   222 
   223 	/**
   223     /**
   224 	 * Determines the speed of focus-based scrolling in edit mode.
   224      * Determines the speed of focus-based scrolling in edit mode.
   225 	 */
   225      */
   226 	const TInt KEditModeScrollingDelayFactor = 4000;
   226     const TInt KEditModeScrollingDelayFactor = 4000;
   227 	}
   227     }
   228 
   228 
   229 /**
   229 /**
   230  * Templates' related constants.
   230  * Templates' related constants.
   231  */
   231  */
   232 namespace MmTemplateContants
   232 namespace MmTemplateContants
   233 	{
   233   {
   234 	/**
   234   /**
   235 	 * If a custom (non LCT) template is used, this is
   235    * If a custom (non LCT) template is used, this is
   236 	 * its default scrollbar width.
   236    * its default scrollbar width.
   237 	 */
   237    */
   238 	const TInt KCustomTemplateScrolbarWidth (25);
   238   const TInt KCustomTemplateScrolbarWidth (25);
   239 
   239 
   240 	const TInt KTemplateChildTextLength (64);
   240   const TInt KTemplateChildTextLength (64);
   241 
   241 
   242 	const TInt KSubCellsCount (6);
   242   const TInt KSubCellsCount (6);
   243 
   243 
   244 	const TInt KItemSubCellsText (300);
   244   const TInt KItemSubCellsText (300);
   245 
   245 
   246 	const TInt KMoveIndicatorStartingPos ( 32 );
   246   const TInt KMoveIndicatorStartingPos ( 32 );
   247 
   247 
   248 	}
   248   }
   249 
   249 
   250 /**
   250 /**
   251  * Shortcut constants.
   251  * Shortcut constants.
   252  */
   252  */
   253 namespace MmShortcutConstants
   253 namespace MmShortcutConstants
   254 	{
   254   {
   255 	/**
   255   /**
   256 	 * Possible scancodes when interpreting shortcut key.
   256    * Possible scancodes when interpreting shortcut key.
   257 	 */
   257    */
   258 	const TInt KScanCodes[] = { '1','2','3','4','5','6','7','8','9',
   258   const TInt KScanCodes[] = { '1','2','3','4','5','6','7','8','9',
   259 #ifndef __WINS__
   259 #ifndef __WINS__
   260         '*',
   260         '*',
   261 #else
   261 #else
   262         EStdKeyNkpAsterisk,
   262         EStdKeyNkpAsterisk,
   263 #endif
   263 #endif
   264 	    '0', EStdKeyHash };
   264       '0', EStdKeyHash };
   265 
   265 
   266 	/**
   266   /**
   267 	 * Number of available scancodes.
   267    * Number of available scancodes.
   268 	 */
   268    */
   269 	const TInt KScanCodeCount = 12;
   269   const TInt KScanCodeCount = 12;
   270 	}
   270   }
   271 
   271 
   272 namespace MmMarqueeConstants
   272 namespace MmMarqueeConstants
   273 	{
   273   {
   274 	const TInt KTextTrimmingThreshold (80);
   274   const TInt KTextTrimmingThreshold (80);
   275 	const TInt KClippingBufLength (80);
   275   const TInt KClippingBufLength (80);
   276 	const TInt KLoops (1);
   276   const TInt KLoops (1);
   277 	const TInt KScrollAmount (6);
   277   const TInt KScrollAmount (6);
   278 	const TInt KScrollDelay (1000000);
   278   const TInt KScrollDelay (1000000);
   279 	}
   279   }
   280 /**
   280 /**
   281  * Matrix Template Library panic notice.
   281  * Matrix Template Library panic notice.
   282  */
   282  */
   283 _LIT( KMtlPanic,  "MTL" );
   283 _LIT( KMtlPanic,  "MTL" );
   284 
   284 
   304 _LIT8( KWidth8,        			"width"           );
   304 _LIT8( KWidth8,        			"width"           );
   305 _LIT8( KTextVisual8,        	"textvisual"           );
   305 _LIT8( KTextVisual8,        	"textvisual"           );
   306 _LIT8( KImageVisual8,        	"imagevisual"           );
   306 _LIT8( KImageVisual8,        	"imagevisual"           );
   307 _LIT8( KImagePath8,        		"imagepath"           );
   307 _LIT8( KImagePath8,        		"imagepath"           );
   308 _LIT8( KGridLayout8,        	"gridlayout"           );
   308 _LIT8( KGridLayout8,        	"gridlayout"           );
   309 _LIT8( KEnabled8,        	"enabled"           );
   309 _LIT8( KEnabled8,        	    "enabled"           );
   310 _LIT8( KRow8,        			"row"           );
   310 _LIT8( KRow8,        			"row"           );
   311 _LIT8( KCol8,        			"col"           );
   311 _LIT8( KCol8,        			"col"           );
   312 _LIT8( KPositionX8,        		"positionx"           );
   312 _LIT8( KPositionX8,        		"positionx"           );
   313 _LIT8( KPositionY8,        		"positiony"           );
   313 _LIT8( KPositionY8,        		"positiony"           );
   314 _LIT8( KStyle8,        			"style"           );
   314 _LIT8( KStyle8,        			"style"           );
   371 _LIT8( KUiaccelAagridCellImagePaneG18,        "uiaccel_aagrid_cell_image_pane_g1"           );
   371 _LIT8( KUiaccelAagridCellImagePaneG18,        "uiaccel_aagrid_cell_image_pane_g1"           );
   372 _LIT8( KUiaccelAagridCellImagePaneG28,        "uiaccel_aagrid_cell_image_pane_g2"           );
   372 _LIT8( KUiaccelAagridCellImagePaneG28,        "uiaccel_aagrid_cell_image_pane_g2"           );
   373 _LIT8( KUiaccelAagridCellImagePaneG38,        "uiaccel_aagrid_cell_image_pane_g3"           );
   373 _LIT8( KUiaccelAagridCellImagePaneG38,        "uiaccel_aagrid_cell_image_pane_g3"           );
   374 _LIT8( KUiaccelAagridCellImagePaneG48,        "uiaccel_aagrid_cell_image_pane_g4"           );
   374 _LIT8( KUiaccelAagridCellImagePaneG48,        "uiaccel_aagrid_cell_image_pane_g4"           );
   375 
   375 
   376 _LIT8( KCellHcAppsPane8,        "cell_hc_apps_pane"           );
   376 _LIT8( KCellHcAppsPane8,           "cell_hc_apps_pane"           );
   377 _LIT8( KCellHcAppsPaneT18,        "cell_hc_apps_pane_t1"           );
   377 _LIT8( KCellHcAppsPaneT18,        "cell_hc_apps_pane_t1"           );
   378 _LIT8( KCellHcAppsPaneG18,        "cell_hc_apps_pane_g1"           );
   378 _LIT8( KCellHcAppsPaneG18,        "cell_hc_apps_pane_g1"           );
   379 _LIT8( KCellHcAppsPaneG28,        "cell_hc_apps_pane_g2"           );
   379 _LIT8( KCellHcAppsPaneG28,        "cell_hc_apps_pane_g2"           );
   380 _LIT8( KCellHcAppsPaneG38,        "cell_hc_apps_pane_g3"           );
   380 _LIT8( KCellHcAppsPaneG38,        "cell_hc_apps_pane_g3"           );
   381 
   381 
   382 _LIT8( KCellAppPane8,        "cell_app_pane"           );
   382 _LIT8( KCellAppPane8,           "cell_app_pane"           );
   383 _LIT8( KCellAppsPaneG18,        "cell_app_pane_g1"           );
   383 _LIT8( KCellAppsPaneG18,        "cell_app_pane_g1"           );
   384 _LIT8( KCellAppsPaneT18,        "cell_app_pane_t1"           );
   384 _LIT8( KCellAppsPaneT18,        "cell_app_pane_t1"           );
   385 _LIT8( KCellAppsPaneG28,        "cell_app_pane_g2"           );
   385 _LIT8( KCellAppsPaneG28,        "cell_app_pane_g2"           );
   386 
   386 
   387 _LIT8( KListSingleHcAppsPane8,        "list_single_hc_apps_pane"           );
   387 _LIT8( KListSingleHcAppsPane8,          "list_single_hc_apps_pane"           );
   388 _LIT8( KListSingleHcAppsPaneT18,        "list_single_hc_apps_pane_t1"           );
   388 _LIT8( KListSingleHcAppsPaneT18,        "list_single_hc_apps_pane_t1"           );
   389 _LIT8( KListSingleHcAppsPaneG18,        "list_single_hc_apps_pane_g1"           );
   389 _LIT8( KListSingleHcAppsPaneG18,        "list_single_hc_apps_pane_g1"           );
   390 _LIT8( KListSingleHcAppsPaneG28,        "list_single_hc_apps_pane_g2"           );
   390 _LIT8( KListSingleHcAppsPaneG28,        "list_single_hc_apps_pane_g2"           );
   391 /**
   391 /**
   392  * Defines the type of a widget.
   392  * Defines the type of a widget.
   441     };
   441     };
   442 
   442 
   443 /**
   443 /**
   444  * The minimal drag vector y-length that can trigger kinetic scrolling.
   444  * The minimal drag vector y-length that can trigger kinetic scrolling.
   445  * This is just a rough estimation of the actual trigger value used by AVKON,
   445  * This is just a rough estimation of the actual trigger value used by AVKON,
   446  * but it is sufficient for our purposes.  
   446  * but it is sufficient for our purposes.
   447  */
   447  */
   448 const TInt KDragTreshold = 18;
   448 const TInt KDragTreshold = 18;
   449 
   449 
   450 /**
   450 /**
   451  * The interval between redraws when scrolling using the scrollbar.
   451  * The interval between redraws when scrolling using the scrollbar.