textinput/peninputarc/gsplugin/gspeninputplugin/inc/gspeninputcontainer.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:  Container for gspeninputplugin.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_GSPENINPUTCONTAINER_H
       
    20 #define C_GSPENINPUTCONTAINER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <gsbasecontainer.h>
       
    24 #include <gscommon.hrh>
       
    25 
       
    26 #include "gscenrepnotifyhandlercallback.h"
       
    27 
       
    28 // FORWARD DECLARATION
       
    29 class CGSListBoxItemTextArray;
       
    30 class CGSPenInputModel;
       
    31 class CGulIcon;
       
    32 class CAknNullService;
       
    33 
       
    34 /**
       
    35  *  GSPenInputPlugin container class
       
    36  *
       
    37  *  This class is GSPenInputPlugin container class. It offers not only CCoeControl
       
    38  *  but also CGSBaseContainer behavior. General settings framework will use the class
       
    39  *  to handle list box.
       
    40  *
       
    41  *  @lib gspeninputplugin.dll
       
    42  *  @since S60 v3.2
       
    43  */
       
    44 class CGSPenInputContainer : public CGSBaseContainer, 
       
    45                                 public MGsCenRepNotifyHandlerCallback 
       
    46     {
       
    47     
       
    48 public: 
       
    49 
       
    50     /**
       
    51      * C++ default constructor
       
    52      *
       
    53      * @since S60 v3.2
       
    54      * @return None
       
    55      */  
       
    56     CGSPenInputContainer();
       
    57 
       
    58     /**
       
    59      * Symbian second-phase constructor
       
    60      *
       
    61      * @since S60 v3.2
       
    62      * @param aRect Listbox's rect.
       
    63      * @return None
       
    64      */          
       
    65     void ConstructL(const TRect& aRect);
       
    66 
       
    67     /**
       
    68      * Destructor
       
    69      *
       
    70      * @since S60 v3.2
       
    71      * @return None
       
    72      */
       
    73     virtual ~CGSPenInputContainer();
       
    74 
       
    75     /**
       
    76      * Updates listbox item's value.
       
    77      *
       
    78      * @since S60 v3.2
       
    79      * @param aItemId Item id which is updated.
       
    80      * @return None
       
    81      */
       
    82     void UpdateListBoxL(TInt aItemId);
       
    83 
       
    84     /**
       
    85      * Retrieves the currently selected listbox id
       
    86      *
       
    87      * @since S60 v3.2
       
    88      * @return Selected list box item id.
       
    89      */
       
    90     TInt CurrentSelectedId() const;
       
    91 
       
    92     /**
       
    93      * Display input language setting page
       
    94      *
       
    95      * @since S60 v3.2
       
    96      * @return None
       
    97      */
       
    98     void ShowInputLanguagePageL();
       
    99 
       
   100     /**
       
   101      * Display input mode setting page
       
   102      *
       
   103      * @since S60 v3.2
       
   104      * @return None
       
   105      */
       
   106     void ShowInputModePageL();
       
   107 
       
   108     /**
       
   109      * Display writing speed setting page
       
   110      *
       
   111      * @since S60 v3.2
       
   112      * @return None
       
   113      */
       
   114     void ShowWritingSpeedPageL();
       
   115 
       
   116     /**
       
   117      * Display guide line setting page
       
   118      *
       
   119      * @since S60 v3.2
       
   120      * @return None
       
   121      */
       
   122     void ShowGuideLinePageL();
       
   123     void ShowRecognitionWithDictionaryL();
       
   124 
       
   125     /**
       
   126      * Display pen trail width setting page
       
   127      *
       
   128      * @since S60 v3.2
       
   129      * @return None
       
   130      */
       
   131     void ShowTrailWidthPageL();
       
   132         
       
   133     /**
       
   134      * Display pen trail colour setting page
       
   135      *
       
   136      * @since S60 v3.2
       
   137      * @return None
       
   138      */
       
   139     void ShowTrailColourPageL();
       
   140     
       
   141     /**
       
   142      * Display "Touch screen calibration" setting page
       
   143      *
       
   144      * @since S60 v3.2
       
   145      * @return None
       
   146      */ 
       
   147     void StartTouchScreenCalibL();
       
   148 
       
   149     /**
       
   150      * Display "Input method for find" setting page
       
   151      *
       
   152      * @since S60 v5.0
       
   153      * @return None
       
   154      */ 
       
   155     void ShowInputMethodForFindPageL();
       
   156     
       
   157     /**
       
   158      * Display "Chinese input method" setting page
       
   159      *
       
   160      * @since S60 v5.0
       
   161      * @return None
       
   162      */ 
       
   163     void ShowChineseFindMethodPageL();
       
   164     
       
   165     /**
       
   166      * Get model instance
       
   167      *
       
   168      * @since S60 v3.2
       
   169      * @return None
       
   170      */ 
       
   171     CGSPenInputModel* Model();
       
   172     
       
   173     /**
       
   174      * Re-Construct List box
       
   175      *
       
   176      * @since S60 v3.2
       
   177      * @return None 
       
   178      */
       
   179     void ReConstructListBoxL();
       
   180     
       
   181     /**
       
   182      * Launch other application
       
   183      *
       
   184      * @aAppUid: The application's uid     
       
   185      */
       
   186     void LaunchAppL( TUid aAppUid );
       
   187 
       
   188 // From MGsCenRepNotifyHandlerCallback
       
   189     
       
   190     /**
       
   191      * From MGsCenRepNotifyHandlerCallback
       
   192      * This callback method is used to notify the client about
       
   193      * key changing
       
   194      * 
       
   195      * @since S60 v3.2
       
   196      * @param aId Key id 
       
   197      * @param aNewValue New value
       
   198      * @return None
       
   199      */
       
   200     void HandleNotifyInt(TUint32 aId, TInt aNewValue); 
       
   201     void MakeRecognitionWithDictionaryL();
       
   202     
       
   203     /**
       
   204      * From MGsCenRepNotifyHandlerCallback
       
   205      * This callback method is used to notify the client about
       
   206      * key changing
       
   207      * 
       
   208      * @param aRepositoryUid The repository uid for each key
       
   209      * @param aId Key id 
       
   210      * @param aNewValue New value
       
   211      * @return None
       
   212      */
       
   213     void HandleNotifyInt(TUid aRepositoryUid, TUint32 aId, TInt aNewValue);
       
   214 
       
   215 protected:  
       
   216         
       
   217     /**
       
   218      * From CGSBaseContainer
       
   219      * Constructs listbox 
       
   220      *
       
   221      * @since S60 v3.2
       
   222      * @param aResLbxId Listbox source id
       
   223      * @return None
       
   224      */  
       
   225     void ConstructListBoxL(TInt aResLbxId);
       
   226 
       
   227 private: 
       
   228 
       
   229     /**
       
   230      * Constructs listbox items
       
   231      *
       
   232      * @since S60 v3.2
       
   233      * @return None
       
   234      */  
       
   235     void CreateListBoxItemsL();
       
   236 
       
   237     /**
       
   238      * Create listbox hwr trui item 
       
   239      *
       
   240      * @since S60 v3.2
       
   241      * @return None
       
   242      */  
       
   243     void MakeHwrTruiItemL();
       
   244     
       
   245     /**
       
   246      * Create listbox input language item 
       
   247      *
       
   248      * @since S60 v3.2
       
   249      * @return None
       
   250      */  
       
   251     void MakeInputLanguageL();
       
   252 
       
   253     /**
       
   254      * Create  input mode item 
       
   255      *
       
   256      * @since S60 v3.2
       
   257      * @return None
       
   258      */  
       
   259 
       
   260     void MakeInputModeL();
       
   261 
       
   262     /**
       
   263      * Create listbox guide line item 
       
   264      *
       
   265      * @since S60 v3.2
       
   266      * @return None
       
   267      */  
       
   268     void MakeGuideItemL();
       
   269     
       
   270     /**
       
   271      * Create listbox writing speed item 
       
   272      *
       
   273      * @since S60 v3.2
       
   274      * @return None
       
   275      */  
       
   276     void MakeSpeedItemL();
       
   277 
       
   278     /**
       
   279      * Create listbox pen trail width item
       
   280      *
       
   281      * @since S60 v3.2
       
   282      * @return None
       
   283      */  
       
   284     void MakeTrailWidthItemL();
       
   285 
       
   286     /**
       
   287      * Create listbox pen trail colour item
       
   288      *
       
   289      * @since S60 v3.2
       
   290      * @return None
       
   291      */  
       
   292     void MakeTrailColourItemL();
       
   293     
       
   294     /**
       
   295      * Create listbox touch screen calibration item
       
   296      *
       
   297      * @since S60 v3.2
       
   298      * @return None
       
   299      */  
       
   300     void MakeTouchScrCalibItemL();
       
   301     
       
   302     /**
       
   303      * Create listbox input method for find item
       
   304      *
       
   305      * @since S60 v3.2
       
   306      * @return None
       
   307      */  
       
   308     void MakeInputMethodForFindItemL();
       
   309     
       
   310     /**
       
   311      * Create listbox chinese find method item
       
   312      * Uses appropriate method to create listbox item.
       
   313      *
       
   314      * @since S60 v5.0
       
   315      * @return None
       
   316      */  
       
   317     void MakeChineseFindMethodItemL();
       
   318     
       
   319     /**
       
   320      * Display "Chinese hongkong input method" setting page
       
   321      *
       
   322      * @since S60 v5.0
       
   323      * @return None
       
   324      */ 
       
   325     void MakeChineseFindMethodHongkongItemL();
       
   326     
       
   327     /**
       
   328      * Display "Chinese hongkong input method" setting page
       
   329      *
       
   330      * @since S60 v5.0
       
   331      * @return None
       
   332      */ 
       
   333     void ShowChineseFindMethodHongkongPageL();
       
   334     
       
   335     /**
       
   336      * Create a new icon
       
   337      *
       
   338      * @since S60 v3.2
       
   339      * @return Pointer to create new icom
       
   340      */  
       
   341     CGulIcon* CreateNewIconL();
       
   342     
       
   343     /**
       
   344      * Draw icon bitmap
       
   345      *
       
   346      * @since S60 v3.2
       
   347      * @param aRect Reference to main rect
       
   348      * @param aIcon Pointer to icon
       
   349      * @return None
       
   350      */  
       
   351     void DrawIconL(const TRect& aRect, CGulIcon* aIcon);
       
   352     
       
   353     /**
       
   354      * Create a icon for pen trail colour item 
       
   355      *
       
   356      * @since S60 v3.2
       
   357      * @return None
       
   358      */  
       
   359     void CreateIconL();  
       
   360     /**
       
   361      *  From CCoeControl
       
   362      *  Identify the help context so that the framework can look up
       
   363      *  the corresponding help topic
       
   364      *  @param aContext Returns the help context
       
   365      */    
       
   366     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   367     
       
   368     /**
       
   369      * Handle notifier from KCRUidPersonalizationSettings in CRepository
       
   370      *
       
   371      * @param aId Key id
       
   372      * @param aNewValue New value     
       
   373      */
       
   374     void HandleNotifyIntFromPersonalizationL( TUint32 aId, TInt aNewValue );
       
   375     
       
   376     /**
       
   377      * Handle notifier from KCRUidAknFep in CRepository
       
   378      *
       
   379      * @param aId Key id
       
   380      * @param aNewValue New value     
       
   381      */
       
   382     void HandleNotifyIntFromAknFepL( TUint32 aId, TInt aNewValue );
       
   383     
       
   384     /**
       
   385      * Handle notifier from KCRUidAvkon in CRepository
       
   386      *
       
   387      * @param aId Key id
       
   388      * @param aNewValue New value     
       
   389      */
       
   390     void HandleNotifyIntFromAvkonL( TUint32 aId, TInt aNewValue );
       
   391 
       
   392 private:// data
       
   393     
       
   394     /**
       
   395      * The icon array of list box item (Not own)
       
   396      */
       
   397     CArrayPtr<CGulIcon>* iIconArray;
       
   398 
       
   399     /**
       
   400      * The model (Own)
       
   401      */
       
   402     CGSPenInputModel* iModel;
       
   403 
       
   404     /**
       
   405      * The string array of list box item (Own)
       
   406      */
       
   407     CGSListBoxItemTextArray* iListboxItemArray;
       
   408 
       
   409     /**
       
   410      * The string array of writing speed items (Own)
       
   411      */
       
   412     CDesCArrayFlat* iWritingSpeedItems;
       
   413 
       
   414     /**
       
   415      * The string array of guide line items (Own)
       
   416      */
       
   417     CDesCArrayFlat* iGuideLineItems;
       
   418     /**
       
   419      * The string array of guide line items (Own)
       
   420      */
       
   421     CDesCArrayFlat* iRecognitionWithDictionaryItems;    
       
   422 
       
   423     /**
       
   424      * The string array of pen trail width items (Own)
       
   425      */
       
   426     CDesCArrayFlat* iPenTrailWidthItems;
       
   427     
       
   428     /**
       
   429      * The string array of input mode items (Own)
       
   430      */
       
   431     CDesCArrayFlat* iInputModeItems; 
       
   432 
       
   433     /**
       
   434      * The string array of method for find items (Own)
       
   435      */
       
   436     CDesCArrayFlat* iInputMethodForFindItems;
       
   437 
       
   438     /**
       
   439      * Resource id of chinese find method item array
       
   440      */
       
   441     TInt iChineseFindMethodResourceID;
       
   442     
       
   443     /**
       
   444      * The string array of chinese find method items (Own)
       
   445      */
       
   446     CDesCArrayFlat* iChineseFindMethodItems;
       
   447     
       
   448     /**
       
   449      * Current language is Chinese
       
   450      */
       
   451     TBool iChinese;
       
   452     
       
   453     /**
       
   454      * Current language is Japanese
       
   455      */
       
   456     TBool iJapanese;    
       
   457     
       
   458     /**
       
   459      * Launch application;
       
   460      */    
       
   461     CAknNullService* iNullService;
       
   462     };
       
   463 
       
   464 #endif // C_GSPENINPUTCONTAINER_H
       
   465 
       
   466 // End Of File