textinput/peninputsplititut/inc/peninputsplititutlayout.h
changeset 0 eb1f2e154e89
child 7 a47de9135b21
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:  split itu-t layout
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SPLITITUTUILAYOUT_H
       
    20 #define C_SPLITITUTUILAYOUT_H
       
    21 
       
    22 #include <peninputlayout.h>
       
    23 #include <peninputpluginutils.h>
       
    24 //#include <peninputinputcontextfield.h>
       
    25 
       
    26 #include <peninputlayoutvkb.h>
       
    27 
       
    28 #include "peninputsplititutpropertysubscriber.h"
       
    29 #include "peninputsplititutlayoutcontext.h"
       
    30 
       
    31 class CAknFepCtrlButton;
       
    32 class CAknFepCtrlRepeatButton;
       
    33 class CAknFepCtrlRawKeyButton;
       
    34 class CSplitItutDataMgr;
       
    35 //class CFepCtrlDropdownList;
       
    36 class CSplitItutUiMgrBase;
       
    37 class CAknFepCtrlCommonButton;
       
    38 class CAknFepCtrlCommonBgCtrl;
       
    39 class CAknFepCtrlRepeatButtonEx;
       
    40 
       
    41 class CSplitItutWindowManager;
       
    42 class CSplitItutUiLayout : public CFepUiLayout,
       
    43                            public MSplitItutLayoutContext
       
    44     {
       
    45 public:
       
    46     /**
       
    47      * Symbian constructor.
       
    48      *
       
    49      * @since S60 v5.0
       
    50      * @return Pointer to created object.
       
    51      */
       
    52     static CSplitItutUiLayout* NewL(MLayoutOwner* aLayoutOwner,const TAny* aInitData);
       
    53 
       
    54     /**
       
    55      * standard c++ destructor.
       
    56      *
       
    57      * @since S60 v5.0
       
    58      * @return None
       
    59      */ 
       
    60     ~CSplitItutUiLayout();
       
    61 
       
    62     /**
       
    63      * handle control event
       
    64      *
       
    65      * @since S60 v5.0
       
    66      * @param aEventType event type
       
    67      * @param aCtrl control pointer
       
    68      * @param aEventData event data
       
    69      * @return None
       
    70      */
       
    71     void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData);
       
    72 
       
    73     /**
       
    74      * handle command
       
    75      *
       
    76      * @since S60 v5.0
       
    77      * @param aCmd command
       
    78      * @param aData 
       
    79      * @return TInt
       
    80      */
       
    81     TInt HandleCommand(TInt aCmd, TUint8* aData) ;
       
    82 
       
    83     /**
       
    84      * get pen input type
       
    85      *
       
    86      * @since S60 v5.0
       
    87      * @return pen input type
       
    88      */
       
    89     TInt PenInputType(); 
       
    90 
       
    91     /**
       
    92      * handle size change
       
    93      *
       
    94      * @since S60 v5.0
       
    95      * @param pData
       
    96      * @return TInt
       
    97      */
       
    98     TInt SizeChanged(const TAny* pData);
       
    99 
       
   100     /**
       
   101      * get control pointer
       
   102      *
       
   103      * @since S60 v5.0
       
   104      * @param aCtrlId
       
   105      * @return control pointer
       
   106      */
       
   107     CFepUiBaseCtrl* Control(TInt aCtrlId);
       
   108    
       
   109     /**
       
   110      * get UI layout
       
   111      *
       
   112      * @since S60 v5.0
       
   113      * @return UI layout
       
   114      */
       
   115     CFepUiLayout* UiLayout();
       
   116 
       
   117     /**
       
   118      * get submit text
       
   119      *
       
   120      * @since S60 v5.0
       
   121      * @param aEventData
       
   122      * @return None
       
   123      */
       
   124     void SubmitText(const TDesC& aEventData);
       
   125 
       
   126     /**
       
   127      * get UI layout
       
   128      *
       
   129      * @since S60 v5.0
       
   130      * @return UI manager
       
   131      */
       
   132     CSplitItutUiMgrBase* UiMgr();
       
   133 
       
   134     /**
       
   135      * handle deactivate
       
   136      *
       
   137      * @since S60 v5.0
       
   138      * @return None
       
   139      */
       
   140     void OnDeActivate();
       
   141     
       
   142     /**
       
   143      * handle activate
       
   144      *
       
   145      * @since S60 v5.0
       
   146      * @return None
       
   147      */
       
   148     void OnActivate();    
       
   149 
       
   150     /**
       
   151      * get data manager
       
   152      *
       
   153      * @since S60 v5.0
       
   154      * @return data mgr
       
   155      */
       
   156     inline CSplitItutDataMgr* DataMgr();
       
   157 
       
   158     /**
       
   159      * get data manager
       
   160      *
       
   161      * @since S60 v5.0
       
   162      * @return data mgr
       
   163      */
       
   164     inline TBool IsSecretEdtior();
       
   165 
       
   166     /**
       
   167      * handle app info change
       
   168      *
       
   169      * @since S60 v5.0
       
   170      * @return None
       
   171      */
       
   172     void HandleAppInfoChange(const TDesC& aInfo, TPeninputAppInfo aType);
       
   173     
       
   174     /**
       
   175      * show/hide arrow button
       
   176      *
       
   177      * @since S60 v5.0
       
   178      * @param aShowFlag
       
   179      * @return None
       
   180      */
       
   181     void ShowArrowBtn(TInt aShowFlag);
       
   182  
       
   183     /**
       
   184      * apply laf data
       
   185      *
       
   186      * @since S60 v5.0
       
   187      * @param aResolutionChange
       
   188      * @return None
       
   189      */
       
   190     void ApplyVariantLafDataL(TBool aResolutionChange = EFalse);
       
   191     
       
   192     /**
       
   193      * get ui manager
       
   194      *
       
   195      * @since S60 v5.0
       
   196      * @return ui mgr
       
   197      */
       
   198     CSplitItutWindowManager* UiManager();
       
   199     
       
   200     /**
       
   201      * apply laf data
       
   202      *
       
   203      * @since S60 v5.0
       
   204      * @param aScanCode
       
   205      * @param aType
       
   206      * @return None
       
   207      */
       
   208     void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType); 
       
   209     
       
   210     /**
       
   211      * set input language
       
   212      *
       
   213      * @since S60 v5.0
       
   214      * @param aLanguage
       
   215      * @return None
       
   216      */
       
   217     void SetInputLanguageL(TInt aLanguage);  
       
   218     
       
   219     /**
       
   220      * set latin only flag
       
   221      *
       
   222      * @since S60 v5.0
       
   223      * @param aLatinOnly
       
   224      * @return None
       
   225      */
       
   226     void SetLatinOnly( TBool aLatinOnly );
       
   227    
       
   228 private:
       
   229     /**
       
   230      * C++ constructor
       
   231      *
       
   232      * @since S60 v5.0
       
   233      * @return None
       
   234      */
       
   235     CSplitItutUiLayout(MLayoutOwner* aLayoutOwner);
       
   236 
       
   237     /**
       
   238      * Symbian second-phase constructor
       
   239      *
       
   240      * @since S60 v5.0
       
   241      * @return None
       
   242      */
       
   243     void ConstructL(const TAny* aInitData); 
       
   244 
       
   245     /**
       
   246      * create dropdownlist
       
   247      *
       
   248      * @since S60 v5.0
       
   249      * @return None
       
   250      */
       
   251 //    void CreateDropdownListL();
       
   252 
       
   253     /**
       
   254      * create dropdownlist
       
   255      *
       
   256      * @since S60 v5.0
       
   257      * @return None
       
   258      */
       
   259     TInt OnSkinChange();
       
   260 
       
   261     /**
       
   262      * is press on control
       
   263      *
       
   264      * @since S60 v5.0
       
   265      * @param aPt
       
   266      * @return TBool
       
   267      */
       
   268     TBool PressOnCtrls(TPoint aPt);
       
   269 
       
   270     /**
       
   271      * set input mode
       
   272      *
       
   273      * @since S60 v5.0
       
   274      * @param aMode
       
   275      * @return None
       
   276      */
       
   277     void SetInputModeL(TInt aMode);
       
   278     
       
   279     /**
       
   280      * set input mode
       
   281      *
       
   282      * @since S60 v5.0
       
   283      * @param aMode
       
   284      * @return None
       
   285      */
       
   286     void SetCtrlRect(CFepUiBaseCtrl* aCtrl, TInt aRectIdx);
       
   287 
       
   288     /**
       
   289      * get chinese ui mgr
       
   290      *
       
   291      * @since S60 v5.0
       
   292      * @return chinese ui mgr
       
   293      */
       
   294     CSplitItutUiMgrBase* ChineseUiManager();
       
   295    
       
   296 private:
       
   297     /**
       
   298      * data manager.
       
   299      * own
       
   300      */
       
   301     CSplitItutDataMgr* iDataMgr;
       
   302 
       
   303     /**
       
   304      * Chinese UI manager.
       
   305      * own
       
   306      */
       
   307     CSplitItutUiMgrBase* iChnUiMgr;
       
   308     
       
   309     /**
       
   310      * Western UI manager.
       
   311      * own
       
   312      */
       
   313     CSplitItutUiMgrBase* iWesternUiMgr;
       
   314     
       
   315     /**
       
   316      * Current UI manager.
       
   317      * own
       
   318      */
       
   319     CSplitItutUiMgrBase* iCurrentUiMgr;
       
   320     
       
   321     /**
       
   322      * is secret flag.
       
   323      */
       
   324     TBool iIsSecret;
       
   325     
       
   326     /**
       
   327      * window manager.
       
   328      * own
       
   329      */
       
   330     CSplitItutWindowManager* iWindowMgr;
       
   331     };
       
   332 
       
   333 // ---------------------------------------------------------------------------
       
   334 // CSplitItutUiLayout::DataMgr
       
   335 // ---------------------------------------------------------------------------
       
   336 //
       
   337 inline CSplitItutDataMgr* CSplitItutUiLayout::DataMgr()
       
   338     {
       
   339     return iDataMgr;
       
   340     }
       
   341 
       
   342 // ---------------------------------------------------------------------------
       
   343 // CSplitItutUiLayout::IsSecretEdtior
       
   344 // ---------------------------------------------------------------------------
       
   345 //
       
   346 inline TBool CSplitItutUiLayout::IsSecretEdtior()
       
   347     {
       
   348     return iIsSecret;
       
   349     }
       
   350 
       
   351 #endif //C_SPLITITUTUILAYOUT_H