textinput/GSLangPlugin/inc/GSLangPlugin.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 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:  GSLangPlugin header file.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GSLANGPLUGIN_H
       
    19 #define GSLANGPLUGIN_H
       
    20 
       
    21 // Includes
       
    22 #include "GSLangPlugin.hrh"
       
    23 
       
    24 #include <gsbaseview.h>
       
    25 #include <gsfwviewuids.h>
       
    26 #include <gsplugininterface.h>
       
    27 
       
    28 #include <aknsettingpage.h>
       
    29 #include <aknview.h>
       
    30 #include <ConeResLoader.h>
       
    31 #include <eikclb.h>
       
    32 #include <eikmenup.h>
       
    33 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
       
    34 #include <e32property.h>
       
    35 #endif
       
    36 
       
    37 // Classes referenced
       
    38 class CAknViewAppUi;
       
    39 class CGSLangContainer;
       
    40 class CEikDialog;
       
    41 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
       
    42 class CRepository;
       
    43 #endif
       
    44 
       
    45 // Constants
       
    46 const TUid KGSLangPluginUID = { 0x10275067 };
       
    47 _LIT( KGSDefaultLangIconFileName, "Z:\\resource\\apps\\GSLangplugin.mbm");
       
    48 const TInt KGSBufSize128 = 128;
       
    49 const TInt KGSMapSize = 8;
       
    50 
       
    51 _LIT( KGSLangPluginResourceFileName, "z:GSLangPluginRsc.rsc" );
       
    52 
       
    53 // CLASS DECLARATION
       
    54 
       
    55 /**
       
    56 *  CGSLangPlugin view class.
       
    57 *  @lib GSLangPlugin.dll
       
    58 *  @since Series60 3.1
       
    59 */
       
    60 class CGSLangPlugin : public CGSBaseView
       
    61     {
       
    62     public: // Constructors and destructor
       
    63 
       
    64         /**
       
    65         * Symbian OS two-phased constructor
       
    66         * @return
       
    67         */
       
    68         static CGSLangPlugin* NewL( TAny* aInitParams );
       
    69 
       
    70         /**
       
    71         * Destructor.
       
    72         */
       
    73         ~CGSLangPlugin();
       
    74 
       
    75     public: // New
       
    76 
       
    77         /**
       
    78         * Getter for CGSLangPlugin's ccontainer.
       
    79         */
       
    80         CGSLangContainer* Container();
       
    81 
       
    82     public: // From CAknView
       
    83 
       
    84         /**
       
    85         * See base class.
       
    86         */
       
    87         TUid Id() const;
       
    88 
       
    89         /**
       
    90         * See base class.
       
    91         */
       
    92         void HandleClientRectChange();
       
    93 
       
    94         /**
       
    95         * See base class.
       
    96         */
       
    97         void DoActivateL( const TVwsViewId& aPrevViewId,
       
    98                           TUid aCustomMessageId,
       
    99                           const TDesC8& aCustomMessage );
       
   100 
       
   101         /**
       
   102         * See base class.
       
   103         */
       
   104         void DoDeactivate();
       
   105 
       
   106         /**
       
   107         * See base class.
       
   108         */
       
   109         void HandleCommandL( TInt aCommand );
       
   110 
       
   111     protected:
       
   112 
       
   113         /**
       
   114         * C++ default constructor.
       
   115         */
       
   116         CGSLangPlugin();
       
   117 
       
   118         /**
       
   119         * Symbian OS default constructor.
       
   120         */
       
   121         void ConstructL();
       
   122 
       
   123     public: // From CGSPluginInterface
       
   124 
       
   125         /**
       
   126         * See base class.
       
   127         */
       
   128         void GetCaptionL( TDes& aCaption ) const;
       
   129 
       
   130         /**
       
   131         * See base class.
       
   132         */
       
   133         TInt PluginProviderCategory() const;
       
   134         
       
   135         /**
       
   136         * See base class.
       
   137         */
       
   138         CGulIcon* CreateIconL( const TUid aIconType );        
       
   139         
       
   140     protected: // From MEikMenuObserver
       
   141 
       
   142         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   143 
       
   144     private: // From CGSBaseView
       
   145 
       
   146         /**
       
   147         * See base class.
       
   148         */
       
   149         void NewContainerL();
       
   150 
       
   151         /**
       
   152         * See base class.
       
   153         */
       
   154         void HandleListBoxSelectionL();
       
   155 
       
   156     private: // New
       
   157 
       
   158         /**
       
   159         * Confirm Boot of DTL
       
   160         */
       
   161         void ConfirmRebootDTLL( TInt aCurrentLanguage,
       
   162                                 const TDesC& aLanguageName );
       
   163 
       
   164         /**
       
   165         * Check current call state using PubSub or SA.
       
   166         */
       
   167         TInt CheckCallState();
       
   168 
       
   169         /**
       
   170         * Shows language selection page.
       
   171         */
       
   172         void ShowLanguageSelectionSettingPageL();
       
   173 
       
   174         /**
       
   175         * Shows input selection page.
       
   176         */
       
   177         void ShowInputSelectionSettingPageL();
       
   178 
       
   179         /**
       
   180         * Shows default input method selection page.
       
   181         */
       
   182         void ShowDefaultInputMethodSettingPageL();
       
   183 
       
   184         /**
       
   185         * Shows number mode setting page for A&H.
       
   186         */
       
   187         TBool ShowAHNumberModeSettingPageL();
       
   188 
       
   189         /**
       
   190         * Shows number mode setting page for Hindi.
       
   191         */
       
   192         TBool ShowHindiNumberModeSettingPageL();
       
   193         
       
   194         /**
       
   195         * Resets dictionary.
       
   196         */
       
   197         void ResetATOKDictionaryL();
       
   198         
       
   199         /*
       
   200         * Create a Keypress timeout setting page
       
   201         */
       
   202         void ShowKeypressTimeoutSettingPageL();
       
   203         
       
   204         /*
       
   205         * Change Japanese Qwerty settings
       
   206         * @param aFlag CenRep flag for Querty keypad
       
   207         * @param aItemId current feature ID
       
   208         * @param aShowSettingPage boolean, show/hide setting page.
       
   209         */
       
   210         void ChangeJapQwertySettingL( const TGSJapQwertyFlags aFlag,
       
   211                                       const TInt aItemId,
       
   212                                       const TBool aShowSettingPage );
       
   213         
       
   214         /*
       
   215         * Display Japanese Qwerty ON/OFF setting page.
       
   216         * @param aSettingPageResourceId setting page resourece ID
       
   217         * @param aItemArraryResourceId setting page items resourece ID
       
   218         * @param aCurrentValue current selection in setting page
       
   219         */
       
   220         TBool ShowJapQwertySettingPageL( const TInt aSettingPageResourceId,
       
   221                                         const TInt aItemArraryResourceId,
       
   222                                         const TBool aCurrentValue );
       
   223         
       
   224         /**
       
   225         * Show CangJie input mode setting page
       
   226         */
       
   227         void ShowChiCangJieInputModeSettingPageL();
       
   228         
       
   229         /**
       
   230         * Show Predictive mode setting page
       
   231         */
       
   232         void ShowPredictiveModeSettingPageL( const TBool aShowSettingPage );
       
   233         
       
   234 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   235 #ifdef FF_DUAL_LANGUAGE_SUPPORT
       
   236         void ShowDualInputLanguageSettingListL();
       
   237 #endif
       
   238         
       
   239         void ShowITIMultiSettingPageL(TBool aShowOnOffSettingPage);
       
   240         void ShowPredictiveSettingListL(); 
       
   241         
       
   242 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
       
   243         class CSubscriber : public CActive
       
   244             {
       
   245         public:
       
   246             CSubscriber(TCallBack aCallBack, RProperty& aProperty);
       
   247             ~CSubscriber();
       
   248 
       
   249         public: // New functions
       
   250             void SubscribeL();
       
   251             void StopSubscribe();
       
   252 
       
   253         private: // from CActive
       
   254             void RunL();
       
   255             void DoCancel();
       
   256 
       
   257         private:
       
   258             TCallBack   iCallBack;
       
   259             RProperty&  iProperty;
       
   260             };
       
   261         /**
       
   262          * Call back function to handle a change in keyboard layout.
       
   263          */ 
       
   264         static TInt HandleKeyboardLayoutChangeNotification(TAny* aObj);
       
   265         
       
   266         void HandleKeyboardLayoutChange();
       
   267         
       
   268         CSubscriber*    iKeyboardLayoutStatusSubscriber;
       
   269         RProperty       iKeyboardLayoutStatusProperty;    
       
   270         
       
   271         friend class CSubscriber;
       
   272 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__       
       
   273         
       
   274         TBool           iCascadeOptionsOpen;
       
   275 #endif //RD_INTELLIGENT_TEXT_INPUT
       
   276         CEikDialog* iDialog;
       
   277     };
       
   278 
       
   279 #endif // GSLANGPLUGIN_H
       
   280 // End of File