menufw/menufwui/mmwidgets/inc/mmwidgetsconstants.h
branchRCL_3
changeset 35 3321d3e205b6
parent 34 5456b4e8b3a8
equal deleted inserted replaced
34:5456b4e8b3a8 35:3321d3e205b6
    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.14 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: 33.1.16 % << 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     /**
       
   146      * Scrolling step (in pixels) for grid.
       
   147      */
       
   148     const TInt KScrollingStep( 10 );
       
   149 
       
   150     /**
       
   151      * Determines the speed of focus-based scrolling in edit mode.
       
   152      * Minimal delay of scrolling in the grid layout.
       
   153      */
       
   154     const TInt KEditModeScrollingGridMinDelay( 2000 );
       
   155 
       
   156     /**
       
   157      * Determines the speed of focus-based scrolling in edit mode.
       
   158      * Maximal delay of scrolling in the grid layout.
       
   159      */
       
   160     const TInt KEditModeScrollingGridMaxDelay( 30000 );
       
   161     }
   145 
   162 
   146 /**
   163 /**
   147  * Listbox constants' namespace.
   164  * Listbox constants' namespace.
   148  */
   165  */
   149 namespace MmListBox
   166 namespace MmListBox
   161 
   178 
   162     /**
   179     /**
   163      * Focus based scrolling item threshold for list.
   180      * Focus based scrolling item threshold for list.
   164      */
   181      */
   165     const TReal KFocusScrollingThreshold( 0.55 );
   182     const TReal KFocusScrollingThreshold( 0.55 );
       
   183     
       
   184     /**
       
   185      * Scrolling step (in pixels) for listbox.
       
   186      */
       
   187     const TInt KScrollingStep( 10 );
       
   188     
       
   189     /**
       
   190      * Determines the speed of focus-based scrolling in edit mode.
       
   191      * Minimal delay of scrolling in the listbox layout.
       
   192      */
       
   193     const TInt KEditModeScrollingListBoxMinDelay( 4000 );
       
   194 
       
   195     /**
       
   196      * Determines the speed of focus-based scrolling in edit mode.
       
   197      * Maximal delay of scrolling in the listbox layout.
       
   198      */
       
   199     const TInt KEditModeScrollingListBoxMaxDelay( 30000 );
   166     }
   200     }
   167 
   201 
   168 /**
   202 /**
   169  * Drag and drop related constants.
   203  * Drag and drop related constants.
   170  */
   204  */
   171 namespace MmEffects
   205 namespace MmEffects
   172   {
   206     {
   173     /**
   207     /**
   174      * Threshold for items shift.
   208      * Threshold for items shift.
   175      */
   209      */
   176     const TReal KShiftRatio( 0.25 );
   210     const TReal KShiftRatio( 0.25 );
   177 
   211 
   217 
   251 
   218     /**
   252     /**
   219      * Time between two butto repeat events.
   253      * Time between two butto repeat events.
   220      */
   254      */
   221     const TInt KDragRepeatRespawn( 2 );
   255     const TInt KDragRepeatRespawn( 2 );
   222 
       
   223     /**
       
   224      * Determines the speed of focus-based scrolling in edit mode.
       
   225      */
       
   226     const TInt KEditModeScrollingDelayFactor = 4000;
       
   227     }
   256     }
   228 
   257 
   229 /**
   258 /**
   230  * Templates' related constants.
   259  * Templates' related constants.
   231  */
   260  */
   232 namespace MmTemplateContants
   261 namespace MmTemplateContants
   233   {
   262     {
   234   /**
   263     /**
   235    * If a custom (non LCT) template is used, this is
   264      * If a custom (non LCT) template is used, this is
   236    * its default scrollbar width.
   265      * its default scrollbar width.
   237    */
   266      */
   238   const TInt KCustomTemplateScrolbarWidth (25);
   267     const TInt KCustomTemplateScrolbarWidth( 25 );
   239 
   268 
   240   const TInt KTemplateChildTextLength (64);
   269     const TInt KTemplateChildTextLength( 64 );
   241 
   270 
   242   const TInt KSubCellsCount (6);
   271     const TInt KSubCellsCount( 6 );
   243 
   272 
   244   const TInt KItemSubCellsText (300);
   273     const TInt KItemSubCellsText( 300 );
   245 
   274 
   246   const TInt KMoveIndicatorStartingPos ( 32 );
   275     const TInt KMoveIndicatorStartingPos( 32 );
   247 
   276     }
   248   }
       
   249 
   277 
   250 /**
   278 /**
   251  * Shortcut constants.
   279  * Shortcut constants.
   252  */
   280  */
   253 namespace MmShortcutConstants
   281 namespace MmShortcutConstants
   268    */
   296    */
   269   const TInt KScanCodeCount = 12;
   297   const TInt KScanCodeCount = 12;
   270   }
   298   }
   271 
   299 
   272 namespace MmMarqueeConstants
   300 namespace MmMarqueeConstants
   273   {
   301     {
   274   const TInt KTextTrimmingThreshold (80);
   302     const TInt KTextTrimmingThreshold( 80 );
   275   const TInt KClippingBufLength (80);
   303     const TInt KClippingBufLength( 80 );
   276   const TInt KLoops (1);
   304     const TInt KLoops( 1 );
   277   const TInt KScrollAmount (6);
   305     const TInt KScrollAmount( 6 );
   278   const TInt KScrollDelay (1000000);
   306     const TInt KScrollDelay( 1000000 );
   279   }
   307     }
   280 /**
   308 /**
   281  * Matrix Template Library panic notice.
   309  * Matrix Template Library panic notice.
   282  */
   310  */
   283 _LIT( KMtlPanic,  "MTL" );
   311 _LIT( KMtlPanic,  "MTL" );
   284 
   312 
   446  * This is just a rough estimation of the actual trigger value used by AVKON,
   474  * This is just a rough estimation of the actual trigger value used by AVKON,
   447  * but it is sufficient for our purposes.
   475  * but it is sufficient for our purposes.
   448  */
   476  */
   449 const TInt KDragTreshold = 18;
   477 const TInt KDragTreshold = 18;
   450 
   478 
   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
   479 #endif // MMWIDGETSCONSTANTS_H