textinput/peninputgenericitut/inc/peninputgenericitutlayout.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:  drop-down list control
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_GENERICITUTUILAYOUT_H
       
    20 #define C_GENERICITUTUILAYOUT_H
       
    21 
       
    22 #include <peninputlayout.h>
       
    23 #include <peninputpluginutils.h>
       
    24 #include <peninputlayoutmultilineicf.h>
       
    25 #include <peninputinputcontextfield.h>
       
    26 
       
    27 #include <peninputlayoutvkb.h>
       
    28 
       
    29 #include "peninputgenericitutpropertysubscriber.h"
       
    30 #include "peninputgenericitutlayoutcontext.h"
       
    31 
       
    32 class CAknFepCtrlButton;
       
    33 class CAknFepCtrlRepeatButton;
       
    34 class CAknFepCtrlRawKeyButton;
       
    35 class CGenericItutDataMgr;
       
    36 class CFepCtrlDropdownList;
       
    37 class CGenericItutUiMgrBase;
       
    38 class CPeninputLayoutInputmodelChoice;
       
    39 class CFepLayoutScrollableList;
       
    40 class CAknFepCtrlLabel;
       
    41 class CAknFepCtrlCommonButton;
       
    42 class CAknFepCtrlCommonBgCtrl;
       
    43 class CAknFepCtrlRepeatButtonEx;
       
    44 
       
    45 class CGenericItutWindowManager;
       
    46 class CGenericItutUiLayout : public CFepUiLayout,
       
    47                              public MItutLayoutContext
       
    48     {
       
    49 public:
       
    50     static CGenericItutUiLayout* NewL(MLayoutOwner* aLayoutOwner,const TAny* aInitData);
       
    51 
       
    52     ~CGenericItutUiLayout();
       
    53 
       
    54     void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData);
       
    55 
       
    56     TInt OnAppEditorTextComing(const TFepInputContextFieldData& aData);
       
    57 
       
    58     TInt HandleCommand(TInt aCmd, TUint8* aData) ;
       
    59 
       
    60     TInt PenInputType(); 
       
    61 
       
    62     TInt SizeChanged(const TAny* pData);
       
    63 
       
    64     // from MItutLayoutContext
       
    65     CFepUiBaseCtrl* Control(TInt aCtrlId);
       
    66     
       
    67     CFepUiLayout* UiLayout();
       
    68 
       
    69     void SubmitText(const TDesC& aEventData);
       
    70 
       
    71     CGenericItutUiMgrBase* UiMgr();
       
    72 
       
    73     void OnDeActivate();
       
    74     
       
    75     void OnActivate();    
       
    76 
       
    77     inline CGenericItutDataMgr* DataMgr();
       
    78 
       
    79     inline TBool IsSecretEdtior();
       
    80 
       
    81     void EnterMatchSelectionState(TBool aOn);
       
    82 
       
    83 
       
    84     void HandleAppInfoChange(const TDesC& aInfo, TPeninputAppInfo aType);
       
    85     
       
    86     void ShowArrowBtn(TInt aShowFlag);
       
    87     
       
    88     void ApplyVariantLafDataL(TBool aResolutionChange = EFalse);
       
    89     
       
    90     CGenericItutWindowManager* UiManager();
       
    91     
       
    92     void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType ); 
       
    93     
       
    94     /**
       
    95      * Simulate raw event to window server immediately
       
    96      * simulating raw event command won't be scheduled by AO 
       
    97      * because it won't be added into CPeninputAnimObj::iAnimCmd.
       
    98      *
       
    99      */
       
   100     void SimulateImmeRawEvent( TInt aScanCode, TRawEvent::TType aType );
       
   101     
       
   102     void SetInputLanguageL(TInt aLanguage);  
       
   103     
       
   104     
       
   105     void SetLatinOnly( TBool aLatinOnly );
       
   106    
       
   107 private:
       
   108     CGenericItutUiLayout(MLayoutOwner* aLayoutOwner);
       
   109 
       
   110     void ConstructL(const TAny* aInitData); 
       
   111 
       
   112 
       
   113     void CreateICFL();
       
   114 
       
   115     void CreateDropdownListL();
       
   116 
       
   117 
       
   118 
       
   119     TInt OnSkinChange();
       
   120 
       
   121     TBool PressOnCtrls(TPoint aPt);
       
   122 
       
   123     void SetInputModeL(TInt aMode);
       
   124     
       
   125     void SetCtrlRect(CFepUiBaseCtrl* aCtrl, TInt aRectIdx);
       
   126     
       
   127     CFepUiBaseCtrl* CurrentIndicator();
       
   128     
       
   129     void SetPromptTextL(TUint8* aData);
       
   130     
       
   131     CGenericItutUiMgrBase* ChineseUiManager();
       
   132    
       
   133 private:
       
   134 
       
   135     CGenericItutDataMgr* iDataMgr;
       
   136 
       
   137 
       
   138     TBool iPenDownOnNaviPane;
       
   139 
       
   140     
       
   141     CGenericItutUiMgrBase* iChnUiMgr;
       
   142     CGenericItutUiMgrBase* iWesternUiMgr;
       
   143     CPeninputLayoutInputmodelChoice* iInputModeSwitch;
       
   144     
       
   145     CGenericItutUiMgrBase* iCurrentUiMgr;
       
   146     TBool iIsSecret;
       
   147     
       
   148     CGenericItutWindowManager* iWindowMgr;
       
   149     };
       
   150 
       
   151 inline CGenericItutDataMgr* CGenericItutUiLayout::DataMgr()
       
   152     {
       
   153     return iDataMgr;
       
   154     }
       
   155 
       
   156 inline TBool CGenericItutUiLayout::IsSecretEdtior()
       
   157     {
       
   158     return iIsSecret;
       
   159     }
       
   160 
       
   161 #endif //C_GENERICITUTUILAYOUT_H