textinput/peninputvkbcn/ctrlinc/peninputvkbctrlpool.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:  vkb control pool header file.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AKNFEPVKBCTRLPOOL_H
       
    20 #define C_AKNFEPVKBCTRLPOOL_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <w32std.h>
       
    25 
       
    26 // FORWARD DECLARATION
       
    27 class CFepUiBaseCtrl;
       
    28 
       
    29 /**
       
    30  *  vkb control pool class
       
    31  *
       
    32  *  This class is control pool. Application can use this class to 
       
    33  *  manage their controls. Control creates out side and add itself to this 
       
    34  *  pool. Application can get and remove one control based on control
       
    35  *  id. 
       
    36  *
       
    37  *  @lib peninputvkbcn.lib
       
    38  *  @since S60 v3.2
       
    39  */
       
    40 class CAknFepVkbCtrlPool: public CBase
       
    41     {
       
    42     
       
    43 public:
       
    44 
       
    45     /**
       
    46      * Symbian constructor
       
    47      *
       
    48      * @since S60 v3.2
       
    49      * @return Pointer to created CAknFepVkbCtrlPool object
       
    50      */
       
    51     static CAknFepVkbCtrlPool* NewL();
       
    52 
       
    53     /**
       
    54      * Symbian constructor
       
    55      *
       
    56      * @since S60 v3.2
       
    57      * @return Pointer to created CAknFepVkbCtrlPool object
       
    58      */    
       
    59     static CAknFepVkbCtrlPool* NewLC();
       
    60 
       
    61     /**
       
    62      * Destructor
       
    63      *
       
    64      * @since S60 v3.2
       
    65      * @return None
       
    66      */
       
    67     virtual ~CAknFepVkbCtrlPool();        
       
    68  
       
    69     /**
       
    70      * Add one control to the pooling, the control should have 
       
    71      * one control id
       
    72      *
       
    73      * @since S60 v3.2
       
    74      * @param aControl Pointer to control
       
    75      * @return None
       
    76      */
       
    77     void AddControl(CFepUiBaseCtrl* aControl); 
       
    78                
       
    79     /**
       
    80      * Remove one control from the pooling 
       
    81      *
       
    82      * @since S60 v3.2
       
    83      * @param aControlID Control id
       
    84      * @return None
       
    85      */    
       
    86     void RemoveControl(const TInt aControlID); 
       
    87 
       
    88     /**
       
    89      * Get one control from the pooling according to the control id
       
    90      *
       
    91      * @since S60 v3.2
       
    92      * @param aControlID Control id
       
    93      * @return Pointer to control 
       
    94      */   
       
    95     CFepUiBaseCtrl* Control(const TInt aControlID) const;    
       
    96  
       
    97     /**
       
    98      * Remove all controls and delete them
       
    99      *
       
   100      * @since S60 v3.2
       
   101      * @return None
       
   102      */    
       
   103     void Reset();
       
   104 
       
   105     /**
       
   106      * Get current control count in this pool
       
   107      *
       
   108      * @since S60 v3.2
       
   109      * @return None
       
   110      */  
       
   111     TInt ControlCount() const;
       
   112 
       
   113     /**
       
   114      * Get one control from the pooling according to the index
       
   115      *
       
   116      * @since S60 v3.2
       
   117      * @param aIndex Index in array
       
   118      * @return Pointer to control 
       
   119      */    
       
   120     CFepUiBaseCtrl* ControlByIndex(const TInt aIndex) const;
       
   121          
       
   122 protected:
       
   123 
       
   124     /**
       
   125      * Symbian second-phase constructor
       
   126      *
       
   127      * @since S60 v3.2
       
   128      * @return None
       
   129      */ 
       
   130     void ConstructL();  
       
   131     
       
   132 private: // Data
       
   133 
       
   134     /**
       
   135      * Control pointer array
       
   136      */  
       
   137     RPointerArray<CFepUiBaseCtrl> iControlList;     
       
   138     
       
   139     };
       
   140 
       
   141 #endif // C_AKNFEPVKBCTRLPOOL_H
       
   142 
       
   143 // End Of File