textinput/peninputvkbcn/ctrlinc/peninputvkbImlayout.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     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:  control info and image layout header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AKNFEPVKBIMLAYOUT_H
       
    20 #define C_AKNFEPVKBIMLAYOUT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <w32std.h>
       
    25 #include <barsread.h>
       
    26 
       
    27 /**
       
    28  *  vkb control info class
       
    29  *
       
    30  *  This class is to define control info. Application can create it from resource 
       
    31  *  file. Control info includes control id, begin row, end row, bgin column and 
       
    32  *  end column. 
       
    33  *
       
    34  *  @lib peninputvkbcn.lib
       
    35  *  @since S60 v3.2
       
    36  */
       
    37 class CAknFepControlInfo : public CBase
       
    38     {
       
    39     
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Symbian constructor
       
    44      *
       
    45      * @since S60 v3.2
       
    46      * @param aReader Resource reader    
       
    47      * @return Pointer to created CAknFepControlInfo object
       
    48      */
       
    49     static CAknFepControlInfo* NewL(TResourceReader& aReader);
       
    50 
       
    51     /**
       
    52      * Contruct from resource file
       
    53      *
       
    54      * @since S60 v3.2
       
    55      * @param aReader Resource reader    
       
    56      * @return None
       
    57      */    
       
    58     void ConstructFromResourceL(TResourceReader& aReader);
       
    59 
       
    60     /**
       
    61      * Destructor
       
    62      *
       
    63      * @since S60 v3.2
       
    64      * @return None
       
    65      */    
       
    66     virtual ~CAknFepControlInfo();
       
    67 
       
    68     /**
       
    69      * Get control id
       
    70      *
       
    71      * @since S60 v3.2
       
    72      * @return Control id
       
    73      */    
       
    74     inline const TInt ControlID() const;
       
    75 
       
    76     /**
       
    77      * Get begin row
       
    78      *
       
    79      * @since S60 v3.2
       
    80      * @return Begin row
       
    81      */    
       
    82     inline const TInt BeginRow() const;
       
    83 
       
    84     /**
       
    85      * Get end row
       
    86      *
       
    87      * @since S60 v3.2
       
    88      * @return End row
       
    89      */    
       
    90     inline const TInt EndRow() const;
       
    91 
       
    92     /**
       
    93      * Get begine column
       
    94      *
       
    95      * @since S60 v3.2
       
    96      * @return Begine column
       
    97      */    
       
    98     inline const TInt BeginColumn() const;
       
    99 
       
   100     /**
       
   101      * Get end column
       
   102      *
       
   103      * @since S60 v3.2
       
   104      * @return End column
       
   105      */    
       
   106     inline const TInt EndColumn() const;
       
   107     
       
   108 private: //Data
       
   109 
       
   110     /**
       
   111      * Control id
       
   112      */  
       
   113     TInt iControlID;
       
   114 
       
   115     /**
       
   116      * Begin row
       
   117      */  
       
   118     TInt iBeginRow;
       
   119 
       
   120     /**
       
   121      * End row
       
   122      */  
       
   123     TInt iEndRow;
       
   124 
       
   125     /**
       
   126      * Begin column
       
   127      */  
       
   128     TInt iBeginColumn;
       
   129 
       
   130     /**
       
   131      * End column
       
   132      */  
       
   133     TInt iEndColumn;
       
   134     
       
   135     };
       
   136 
       
   137 /**
       
   138  *  vkb image layout class
       
   139  *
       
   140  *  This class is to implement image layout. Application can create it from resource 
       
   141  *  file. Control info includes control id, row and column. 
       
   142  *
       
   143  *  @lib peninputvkbcn.lib
       
   144  *  @since S60 v3.2
       
   145  */
       
   146 class CAknFepVkbImLayout: public CBase
       
   147     {
       
   148     
       
   149 public:
       
   150 
       
   151     /**
       
   152      * Symbian constructor
       
   153      *
       
   154      * @since S60 v3.2
       
   155      * @param aReader Resource reader        
       
   156      * @return Pointer to created CAknFepVkbImLayout object
       
   157      */
       
   158     static CAknFepVkbImLayout* NewL(TResourceReader& aReader);
       
   159 
       
   160     /**
       
   161      * Symbian constructor
       
   162      *
       
   163      * @since S60 v3.2
       
   164      * @param aReader Resource reader        
       
   165      * @return Pointer to created CAknFepVkbImLayout object
       
   166      */
       
   167     static CAknFepVkbImLayout* NewLC(TResourceReader& aReader);
       
   168 
       
   169     /**
       
   170      * Destructor
       
   171      *
       
   172      * @since S60 v3.2
       
   173      * @return None
       
   174      */
       
   175     virtual ~CAknFepVkbImLayout();
       
   176     
       
   177     /**
       
   178      * Contruct from resource file
       
   179      *
       
   180      * @since S60 v3.2
       
   181      * @param aReader Resource reader    
       
   182      * @return None
       
   183      */    
       
   184     void ConstructFromResourceL(TResourceReader& aReader);
       
   185 
       
   186     /**
       
   187      * Contruct language is available
       
   188      *
       
   189      * @since S60 v3.2
       
   190      * @param aLangID language id  
       
   191      * @return ETrue for available language; otherwise EFalse
       
   192      */    
       
   193     TBool IsAvailableForLang(const TInt aLangID);
       
   194 
       
   195     /**
       
   196      * Get control info
       
   197      *
       
   198      * @since S60 v3.2
       
   199      * @param aLangID language id  
       
   200      * @return Pointer to CAknFepControlInfo
       
   201      */    
       
   202     CAknFepControlInfo* FindControlInfo(const TInt aControlID);
       
   203 
       
   204     /**
       
   205      * Add control info
       
   206      *
       
   207      * @since S60 v3.2
       
   208      * @param aControlInfo Pointer to control info
       
   209      * @return None
       
   210      */    
       
   211     void AddControlInfo(CAknFepControlInfo* aControlInfo);
       
   212 
       
   213     /**
       
   214      * Remove control info
       
   215      *
       
   216      * @since S60 v3.2
       
   217      * @param aControlInfo Pointer to control info
       
   218      * @return None
       
   219      */  
       
   220     void RmoveControlInfo(CAknFepControlInfo* aControlInfo);
       
   221  
       
   222     /**
       
   223      * Remove control info based on control id
       
   224      *
       
   225      * @since S60 v3.2
       
   226      * @param aControlID Control id
       
   227      * @return None
       
   228      */ 
       
   229     void RmoveControlInfo(const TInt aControlID);
       
   230 
       
   231     /**
       
   232      * Get layout id
       
   233      *
       
   234      * @since S60 v3.2
       
   235      * @return Layout id
       
   236      */ 
       
   237     inline TInt LayoutID() const;
       
   238 
       
   239     /**
       
   240      * Get column
       
   241      *
       
   242      * @since S60 v3.2
       
   243      * @return Column
       
   244      */ 
       
   245     inline TInt Columns() const;
       
   246 
       
   247     /**
       
   248      * Get row
       
   249      *
       
   250      * @since S60 v3.2
       
   251      * @return Row
       
   252      */ 
       
   253     inline TInt Rows() const;
       
   254 
       
   255     /**
       
   256      * Get control array
       
   257      *
       
   258      * @since S60 v3.2
       
   259      * @return Control array
       
   260      */ 
       
   261     inline RPointerArray<CAknFepControlInfo>& ControlInfoList();
       
   262 
       
   263 protected:
       
   264 
       
   265     /**
       
   266      * Symbian second-phase constructor
       
   267      *
       
   268      * @since S60 v3.2
       
   269      * @param aReader Resource reader   
       
   270      * @return None
       
   271      */ 
       
   272     void ConstructL(TResourceReader& aReader);  
       
   273                 
       
   274 private: // Data
       
   275 
       
   276     /**
       
   277      * Layout id
       
   278      */  
       
   279     TInt iLayoutID;
       
   280 
       
   281     /**
       
   282      * Column count
       
   283      */  
       
   284     TInt iColumns;
       
   285 
       
   286     /**
       
   287      * Row count
       
   288      */  
       
   289     TInt iRows;
       
   290 
       
   291     /**
       
   292      * Permitted langauge (Own)
       
   293      */  
       
   294     HBufC* iPermittedLanguage;
       
   295 
       
   296     /**
       
   297      * Control info array
       
   298      */  
       
   299     RPointerArray<CAknFepControlInfo> iControlInfoList;
       
   300     
       
   301     };
       
   302 
       
   303 #include "peninputvkbimlayout.inl"
       
   304     
       
   305 #endif // C_AKNFEPVKBIMLAYOUT_H
       
   306 
       
   307 // End Of File