textinput/peninputcommonlayout/inc/peninputrangebarinfo.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  range bar layout implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPENINPUTRANGEBARINFO_H
       
    20 #define C_CPENINPUTRANGEBARINFO_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <w32std.h>
       
    25 #include <barsread.h>
       
    26 
       
    27 // User includes
       
    28 #include "peninputcommonlayoutglobalenum.h"
       
    29 
       
    30 /**
       
    31  *  Peninput range bar definition
       
    32  *
       
    33  *  @lib peninputcommonlayout.lib
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 class CPeninputRangeInfo : public CBase
       
    37     {
       
    38 
       
    39 public:
       
    40     /**
       
    41      * Two-phase constructor
       
    42      *
       
    43      * @since S60 v3.2
       
    44      * @param aReader Resource reader
       
    45      * @return The pointer to CPeninputRangeInfo object
       
    46      */
       
    47     IMPORT_C static CPeninputRangeInfo* NewL( TResourceReader& aReader );
       
    48     
       
    49     /**
       
    50      * Two-phase constructor
       
    51      *
       
    52      * @since S60 v3.2
       
    53      * @param aReader Resource reader
       
    54      * @return The pointer to CPeninputRangeInfo object
       
    55      */
       
    56     IMPORT_C static CPeninputRangeInfo* NewLC( TResourceReader& aReader );
       
    57 
       
    58     /**
       
    59      * Destructor
       
    60      *
       
    61      * @since S60 v3.2
       
    62      * @return None
       
    63      */
       
    64     IMPORT_C virtual ~CPeninputRangeInfo();  
       
    65 
       
    66     /**
       
    67      * Get range id
       
    68      *
       
    69      * @since S60 v3.2
       
    70      * @return Range id
       
    71      */
       
    72     inline TInt RangeId();
       
    73 
       
    74     
       
    75     /**
       
    76      * Get response style
       
    77      *
       
    78      * @since S60 v3.2
       
    79      * @return Response style
       
    80      */
       
    81     inline TPeninputRangeResponseStyle ResponseStyle();
       
    82 
       
    83     /**
       
    84      * Get client layout id
       
    85      *
       
    86      * @since S60 v3.2
       
    87      * @return Client layout id
       
    88      */
       
    89     inline TInt ClientLayoutId();
       
    90 
       
    91     /**
       
    92      * Get vkb layout id
       
    93      *
       
    94      * @since S60 v3.2
       
    95      * @return Vkb layout id
       
    96      */
       
    97     inline TInt VkbLayoutId();
       
    98 
       
    99 
       
   100 protected:
       
   101 
       
   102     /**
       
   103      * Second phase constructor
       
   104      *
       
   105      * @since S60 v3.2
       
   106      * @param aReader Resource reader
       
   107      * @return None
       
   108      */
       
   109     void ConstructL( TResourceReader& aReader );
       
   110 
       
   111     /**
       
   112      * Construct from resource 
       
   113      *
       
   114      * @since S60 v3.2
       
   115      * @param aReader Resource reader
       
   116      * @return None
       
   117      */
       
   118     void ConstructFromResourceL( TResourceReader& aReader );
       
   119 
       
   120 private: // data
       
   121 
       
   122     /**
       
   123      * Range id
       
   124      */
       
   125     TInt iRangeId;
       
   126     
       
   127     /**
       
   128      * Response style
       
   129      */
       
   130     TPeninputRangeResponseStyle iResponseStyle;
       
   131 
       
   132     /**
       
   133      * Client layout id
       
   134      */
       
   135     TInt iClientLayoutId;
       
   136 
       
   137     /**
       
   138      * Vkb layout id
       
   139      */
       
   140     TInt iVkbLayoutId;
       
   141 
       
   142     };
       
   143 
       
   144 /**
       
   145  *  Peninput range bar definition
       
   146  *
       
   147  *  @lib peninputcommonlayout.lib
       
   148  *  @since S60 v3.2
       
   149  */
       
   150 class CPeninputRangeBarInfo : public CBase
       
   151     {
       
   152 
       
   153 public:
       
   154 
       
   155     /**
       
   156      * Two-phase constructor
       
   157      *
       
   158      * @since S60 v3.2
       
   159      * @param aReader Resource reader
       
   160      * @return The pointer to CPeninputRangeBarInfo object
       
   161      */
       
   162     IMPORT_C static CPeninputRangeBarInfo* NewL( TResourceReader& aReader );
       
   163     
       
   164     /**
       
   165      * Two-phase constructor
       
   166      *
       
   167      * @since S60 v3.2
       
   168      * @param aReader Resource reader    
       
   169      * @return The pointer to CPeninputRangeBarInfo object
       
   170      */
       
   171     IMPORT_C static CPeninputRangeBarInfo* NewLC( TResourceReader& aReader );
       
   172 
       
   173     /**
       
   174      * Destructor
       
   175      *
       
   176      * @since S60 v3.2
       
   177      * @return None
       
   178      */
       
   179     IMPORT_C virtual ~CPeninputRangeBarInfo();  
       
   180 
       
   181     /**
       
   182      * Get range style
       
   183      *
       
   184      * @since S60 v3.2
       
   185      * @return Range style
       
   186      */
       
   187     inline TInt RangeStyle();
       
   188     
       
   189     /**
       
   190      * Get range info by range id
       
   191      *
       
   192      * @since S60 v3.2
       
   193      * @param aRangeId Range id  
       
   194      * @return The pointer to CPeninputRangeInfo object
       
   195      */
       
   196     IMPORT_C CPeninputRangeInfo* FindRange( TInt aRangeId );
       
   197 
       
   198     /**
       
   199      * Get reference of pointer array of ranges
       
   200      *
       
   201      * @since S60 v3.2
       
   202      * @return The reference of pointer array of ranges
       
   203      */
       
   204     inline RPointerArray<CPeninputRangeInfo>& Ranges();
       
   205 
       
   206 protected:
       
   207 
       
   208     /**
       
   209      * Second phase constructor
       
   210      *
       
   211      * @since S60 v3.2
       
   212      * @param aReader Resource reader
       
   213      * @return None
       
   214      */
       
   215     void ConstructL( TResourceReader& aReader );
       
   216 
       
   217     /**
       
   218      * Construct from resource 
       
   219      *
       
   220      * @since S60 v3.2
       
   221      * @param aReader Resource reader
       
   222      * @return None
       
   223      */
       
   224     void ConstructFromResourceL( TResourceReader& aReader );
       
   225 
       
   226 private: // data
       
   227 
       
   228     /**
       
   229      * Range bar style
       
   230      */
       
   231     TInt iRangeStyle;
       
   232 
       
   233     /**
       
   234      * Array of ranges on rangebar
       
   235      */
       
   236     RPointerArray<CPeninputRangeInfo> iRanges;
       
   237 
       
   238     };
       
   239 
       
   240 #include "peninputrangebarinfo.inl" 
       
   241 
       
   242 #endif // C_CPENINPUTRANGEBARINFO_H