textinput/peninputsplititut/inc/peninputsplititutwindowmanager.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:  drop-down list control
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SPLITITUTWINDOWMANAGER_H
       
    20 #define C_SPLITITUTWINDOWMANAGER_H
       
    21 
       
    22 #include <peninputlayout.h>
       
    23 #include <peninputpluginutils.h>
       
    24 #include <peninputinputcontextfield.h>
       
    25 
       
    26 #include <peninputlayoutvkb.h>
       
    27 #include "peninputsplititutlayout.h"
       
    28 #include "peninputsplititutpropertysubscriber.h"
       
    29 #include "peninputsplititutlayoutcontext.h"
       
    30 
       
    31 class CSplitItutWindow;
       
    32 
       
    33 
       
    34 /**
       
    35  *  class CSplitItutWindowManager.
       
    36  *
       
    37  *  Split itu-t window manager class.
       
    38  *
       
    39  *  @lib peninputsplititut.lib
       
    40  *  @since S60 v5.0
       
    41  */
       
    42 class CSplitItutWindowManager : public CBase,
       
    43                                 public MItutPropertySubscriber
       
    44     {
       
    45 public:
       
    46     /** 
       
    47      * Symbian constructor.
       
    48      *
       
    49      * @since S60 5.0
       
    50      * 
       
    51      * @param aLayoutOwner The MLayoutOwner
       
    52      * @param iDataMgr The data mgr
       
    53      * @return Pointer to created CSplitItutWindowManager object
       
    54      */
       
    55     static CSplitItutWindowManager* NewL( CSplitItutUiLayout* aLayoutOwner,
       
    56                                           CSplitItutDataMgr* iDataMgr);
       
    57 
       
    58     /**
       
    59      * standard c++ destructor.
       
    60      *
       
    61      * @since S60 5.0
       
    62      * @return none
       
    63      */
       
    64     ~CSplitItutWindowManager();
       
    65     
       
    66     /**
       
    67      * Handle control event
       
    68      *
       
    69      * @since Series 60 5.0
       
    70      * @param aEventType
       
    71      * @param aCtrl
       
    72      * @param aEventData
       
    73      * @return None    
       
    74      */
       
    75     void HandleCtrlEventL( TInt aEventType, 
       
    76                            CFepUiBaseCtrl* aCtrl, 
       
    77                            const TDesC& aEventData);
       
    78 
       
    79     /**
       
    80      * Handle command event
       
    81      *
       
    82      * @since Series 60 5.0
       
    83      * @param aCmd
       
    84      * @param aData
       
    85      * @return TBool    
       
    86      */
       
    87     TBool HandleCommandL(TInt aCmd, TUint8* aData);
       
    88 
       
    89     /**
       
    90      * From MItutPropertySubscriber
       
    91      * Set property
       
    92      *
       
    93      * @since Series 60 5.0
       
    94      * @param aPropertyName
       
    95      * @param aPropertyValue
       
    96      * @return None    
       
    97      */
       
    98     void SetPropertyL( MItutPropertySubscriber::TItutProperty aPropertyName, 
       
    99                        const TDesC& aPropertyValue);
       
   100 
       
   101     /**
       
   102      * handle size change
       
   103      *
       
   104      * @since Series 60 5.0
       
   105      * @return None    
       
   106      */
       
   107     TInt SizeChanged();
       
   108 
       
   109     /**
       
   110      * Get ui layout pointer
       
   111      *
       
   112      * @since Series 60 5.0
       
   113      * @return ui layout pointer    
       
   114      */
       
   115     CFepUiLayout* UiLayout();
       
   116 
       
   117     /**
       
   118      * submit text
       
   119      *
       
   120      * @since Series 60 5.0
       
   121      * @param aEventData
       
   122      * @return None    
       
   123      */
       
   124     void SubmitText(const TDesC& aEventData);
       
   125 
       
   126     /**
       
   127      * show/hide arrow keys
       
   128      *
       
   129      * @since Series 60 5.0
       
   130      * @param aShowFlag
       
   131      * @return None    
       
   132      */
       
   133     void ShowArrowBtn(TInt aShowFlag);
       
   134     
       
   135     /**
       
   136      * Handle application change info
       
   137      *
       
   138      * @since Series 60 5.0
       
   139      * @param aInfo
       
   140      * @return None    
       
   141      */
       
   142     void HandleAppInfoChangeL(const TDesC& aInfo); 
       
   143     
       
   144     /**
       
   145      * simulate raw event
       
   146      *
       
   147      * @since Series 60 5.0
       
   148      * @param aScanCode
       
   149      * @param aType
       
   150      * @return None    
       
   151      */
       
   152     void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType); 
       
   153 
       
   154     /**
       
   155      * handle skin change
       
   156      *
       
   157      * @since Series 60 5.0
       
   158      * @return None    
       
   159      */
       
   160     TInt OnSkinChange();
       
   161     
       
   162     /**
       
   163      * set last raw key down
       
   164      *
       
   165      * @since Series 60 5.0
       
   166      * @param aScanCode
       
   167      * @param aKeyDown
       
   168      * @param aCtrl
       
   169      * @return None    
       
   170      */
       
   171     void SetLastRawKeyDown(TInt aScanCode, TBool aKeyDown, CFepUiBaseCtrl* aCtrl);    
       
   172 
       
   173     /**
       
   174      * create chinese specific controls
       
   175      *
       
   176      * @since Series 60 5.0
       
   177      * @return None    
       
   178      */
       
   179     void CreateChineseSpecificCtrlsIfNeededL();
       
   180     
       
   181     /**
       
   182      * apply variant laf data
       
   183      *
       
   184      * @since Series 60 5.0
       
   185      * @param aResolutionChange
       
   186      * @return None    
       
   187      */
       
   188     void ApplyVariantLafDataL(TBool aResolutionChange);
       
   189 
       
   190     /**
       
   191      * apply variant laf data
       
   192      *
       
   193      * @since Series 60 5.0
       
   194      * @param aResolutionChange
       
   195      * @return None    
       
   196      */
       
   197     CFepUiBaseCtrl* Control(TInt aCtrlId);
       
   198     
       
   199     /**
       
   200      * apply variant laf data
       
   201      *
       
   202      * @since Series 60 5.0
       
   203      * @param aResolutionChange
       
   204      * @return None    
       
   205      */
       
   206     void DimArrowKeys( TBool aDimArrow );
       
   207     
       
   208     /**
       
   209      * show/hide candidate preview bubble
       
   210      *
       
   211      * @since Series 60 5.0
       
   212      * @param aResolutionChange
       
   213      * @return None    
       
   214      */
       
   215     void ShowBubble(TInt aShow);
       
   216     
       
   217     /**
       
   218      * handle activate
       
   219      *
       
   220      * @since Series 60 5.0
       
   221      * @return None    
       
   222      */
       
   223     void OnActivate();
       
   224     
       
   225     /**
       
   226      * get split itut window
       
   227      *
       
   228      * @since Series 60 5.0
       
   229      * @return split itut window pointer    
       
   230      */
       
   231     inline CSplitItutWindow* Window();
       
   232     
       
   233 private:
       
   234     /**
       
   235      * C++ constructor
       
   236      *
       
   237      * @since S60 5.0
       
   238      * @param aLayoutOwner The MLayoutOwner pointer.
       
   239      * @param iDataMgr The data mgr pointer
       
   240      * @return none
       
   241      */
       
   242     CSplitItutWindowManager( CSplitItutUiLayout* aLayoutOwner,
       
   243                              CSplitItutDataMgr* iDataMgr);
       
   244 
       
   245     /**
       
   246      * Symbian second-phase constructor
       
   247      *
       
   248      * @since S60 5.0
       
   249      * @return none
       
   250      */
       
   251     void ConstructL(); 
       
   252 
       
   253 private:
       
   254    /**
       
   255      * The layout owner
       
   256      * Not own
       
   257      */
       
   258     CSplitItutUiLayout* iLayoutOwner;
       
   259     
       
   260    /**
       
   261      * The layout owner
       
   262      * Own
       
   263      */
       
   264     CSplitItutWindow* iWindow;
       
   265     
       
   266    /**
       
   267      * The data manager
       
   268      * Not own
       
   269      */
       
   270     CSplitItutDataMgr* iDataMgr;
       
   271     
       
   272    /**
       
   273      * The candidate preview bubble size
       
   274      */
       
   275     TAknWindowLineLayout iBubbleSize;
       
   276     
       
   277    /**
       
   278      * The candidate preview bubble text layout
       
   279      */
       
   280     TAknTextLineLayout iBubbleTextLayout;
       
   281     
       
   282    /**
       
   283      * The rawkey down flag
       
   284      */
       
   285     TBool iRawKeyDown;
       
   286     
       
   287    /**
       
   288      * The rawkey control
       
   289      * Not own
       
   290      */
       
   291     CFepUiBaseCtrl* iRawKeyCtrl;
       
   292     
       
   293    /**
       
   294      * The last rawkey down
       
   295      */    
       
   296     TInt iLastRawKeyDown;
       
   297     
       
   298    /**
       
   299      * The in editword query dialog flag
       
   300      */
       
   301     TBool iInEditWordQueryDlg;
       
   302     
       
   303    /**
       
   304      * The dim operation button flag
       
   305      */
       
   306     TBool iDimOperationBtn;
       
   307     };
       
   308 
       
   309 // ---------------------------------------------------------------------------
       
   310 // CSplitItutWindowManager::Window
       
   311 // ---------------------------------------------------------------------------
       
   312 //
       
   313 inline CSplitItutWindow* CSplitItutWindowManager::Window()
       
   314 	{
       
   315 	return iWindow;	
       
   316 	}
       
   317 #endif // C_SPLITITUTWINDOWMANAGER_H