textinput/peninputsplitqwerty/inc/peninputsplitqwertylayout.h
changeset 0 eb1f2e154e89
child 3 f5a1e66df979
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 screen qwerty layout
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef C_PENINPUTSPLITQWERTYLAYOUT_H
       
    19 #define C_PENINPUTSPLITQWERTYLAYOUT_H
       
    20 
       
    21 // User includes
       
    22 #include <aknfepglobalenums.h>
       
    23 #include "peninputcommonlayoutext.h"
       
    24 
       
    25 
       
    26 /**
       
    27  *  Split qwerty layout implementation class
       
    28  *
       
    29  *  @lib peninputsplitqwerty.lib
       
    30  *  @since since S60 v5.0
       
    31  */
       
    32 class CPeninputSplitQwertyLayoutImp : public CFepUiLayoutInterface
       
    33     {
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Symbian constructor
       
    38      *
       
    39      * @since since S60 v5.0
       
    40      * @param aInitParams Init data for layout
       
    41      * @return Pointer to created object
       
    42      */
       
    43     static CPeninputSplitQwertyLayoutImp* NewL( TAny* aInitParams );
       
    44 
       
    45     /**
       
    46      * C++ destructor
       
    47      *
       
    48      * @since since S60 v5.0
       
    49      * @return None
       
    50      */
       
    51     virtual ~CPeninputSplitQwertyLayoutImp();
       
    52 
       
    53 public: // From base class CFepUiLayoutInterface
       
    54 
       
    55     /**
       
    56      * From CFepUiLayoutInterface
       
    57      * Create fep ui layout
       
    58      *
       
    59      * @since since S60 v5.0
       
    60      * @param aLayoutOwner The layout owner
       
    61      * @param aData The data for creating layout
       
    62      * @return Pointer to created CFepUiLayout object
       
    63      */
       
    64     CFepUiLayout* CreateFepUiLayoutL( MLayoutOwner* aLayoutOwner,
       
    65                                       const TAny* aData );
       
    66 
       
    67 private:
       
    68 
       
    69     /**
       
    70      * C++ constructor
       
    71      *
       
    72      * @since since S60 v5.0
       
    73      * @return None
       
    74      */
       
    75     CPeninputSplitQwertyLayoutImp();
       
    76 
       
    77     /**
       
    78      * Symbian constructor
       
    79      *
       
    80      * @since since S60 v5.0
       
    81      * @return None
       
    82      */
       
    83     void ConstructL();
       
    84 
       
    85     };
       
    86 
       
    87 /**
       
    88  *  class CPeninputSplitQwertyLayout
       
    89  *
       
    90  *  @lib peninputsplitqwerty.lib
       
    91  *  @since since S60 v5.0
       
    92  */
       
    93 class CPeninputSplitQwertyLayout : public CPeninputCommonLayoutExt
       
    94     {
       
    95 public:
       
    96 
       
    97     /**
       
    98      * Symbian constructor
       
    99      *
       
   100      * @since since S60 v5.0
       
   101      * @param aLayoutOwner The owner of layout
       
   102      * @param aInitData Init data of layout
       
   103      * @return The pointer to created object
       
   104      */
       
   105     static CPeninputSplitQwertyLayout* NewL( MLayoutOwner* aLayoutOwner,
       
   106                                              const TAny* aInitData );
       
   107 
       
   108     /**
       
   109      * C++ destructor
       
   110      *
       
   111      * @since since S60 v5.0
       
   112      * @return None
       
   113      */
       
   114     virtual ~CPeninputSplitQwertyLayout();
       
   115 
       
   116 public: // From base class CPeninputCommonLayout
       
   117 
       
   118     /**
       
   119      * From CPeninputCommonLayout
       
   120      * Handle layout command event
       
   121      *
       
   122      * @since since S60 v5.0
       
   123      * @param aCmd Command Id
       
   124      * @param aData Data for command
       
   125      * @return Errors when return value smaller than zero
       
   126      */
       
   127     TInt HandleCommand( TInt aCmd, TUint8* aData );
       
   128 
       
   129     /**
       
   130      * From CPeninputCommonLayout
       
   131      * Handle control event
       
   132      *
       
   133      * @since since S60 v5.0
       
   134      * @param aEventType event type
       
   135      * @param aCtrl Controler
       
   136      * @param aEventData The event data
       
   137      * @return None    
       
   138      */
       
   139     void HandleControlEvent( TInt aEventType, CFepUiBaseCtrl* aCtrl,
       
   140                              const TDesC& aEventData );
       
   141 
       
   142     /**
       
   143      * From CPeninputCommonLayout
       
   144      * Handle editor text coming
       
   145      * Called by animation dll when app editor text is coming
       
   146      * If a ui layout has a editor area, it must implements 
       
   147      * this function to get the text
       
   148      *
       
   149      * @since S60 v5.0
       
   150      * @param aData Editor Text Coming data
       
   151      * @return KErrNone is operation succeeded
       
   152      */
       
   153     TInt OnAppEditorTextComing( const TFepInputContextFieldData& aData );
       
   154 
       
   155     /**
       
   156      * From CPeninputCommonLayout
       
   157      * Inform layout the size changing event
       
   158      *
       
   159      * @since S60 v3.2
       
   160      * @param aData The event data
       
   161      * @return KErrNone if successfully size changing
       
   162      */    
       
   163     TInt SizeChanged( const TAny* aData );
       
   164 
       
   165 public: //from base class CFepUiLayout
       
   166     /**
       
   167      * From CFepUiLayout
       
   168      * Inform UI that application infomation changed.
       
   169      *
       
   170      * @since S60 v5.0
       
   171      * @param aInfo The information.
       
   172      * @param aType The information type
       
   173      * @return none
       
   174      */
       
   175     void HandleAppInfoChange( const TDesC& aInfo, TPeninputAppInfo aType );
       
   176 
       
   177     /**
       
   178      * From CFepUiLayout
       
   179      * Called by owner when the layout is going to be active
       
   180      *
       
   181      * @since S60 v5.0
       
   182      * @return none
       
   183      */
       
   184     void OnActivate();
       
   185 
       
   186     /**
       
   187      * From CFepUiLayout
       
   188      * Tell whether this layout require transparency.
       
   189      * This is to save memory used in mask bitmap. If transparency not deeded,
       
   190      * We use black-white bitmap.
       
   191      *
       
   192      * @since since S60 v5.0
       
   193      * @return ETrue if layout require transparency, otherwise EFalse.
       
   194      */
       
   195     TBool SemiTransparencyRequired();
       
   196     
       
   197 protected:
       
   198 
       
   199     /**
       
   200      * C++ constructor
       
   201      *
       
   202      * @since since S60 v5.0
       
   203      * @param aLayoutOwner The owner of layout
       
   204      * @return None
       
   205      */
       
   206     CPeninputSplitQwertyLayout( MLayoutOwner* aLayoutOwner );
       
   207 
       
   208 protected: // From base class CPeninputCommonLayout
       
   209     /**
       
   210      * Symbian constructor
       
   211      *
       
   212      * @since since S60 v5.0
       
   213      * @param aInitData Init data of layout
       
   214      * @return None
       
   215      */
       
   216     void ConstructL( const TAny *aInitData );
       
   217 
       
   218     /**
       
   219      * From CPeninputCommonLayout
       
   220      * Factory method for creation of layout window. The decision which 
       
   221      * layout window(VKB or HWR) is created will be postboned in subclasses 
       
   222      * of this class
       
   223      *
       
   224      * @since since S60 v5.0
       
   225      * @return None
       
   226      */
       
   227     void CreateLayoutWindowL();
       
   228 
       
   229     /**
       
   230      * From CPeninputCommonLayout
       
   231      * Factory method for creation resource config. It is enough at present 
       
   232      * to create and initialize resource config. Any necessary extension 
       
   233      * will be implemented in subclasses
       
   234      * 
       
   235      * @since since S60 v5.0
       
   236      * @return None
       
   237      */
       
   238     void CreateDataMgrL( const TAny* aInitData );
       
   239 
       
   240     /**
       
   241      * From CPeninputCommonLayout
       
   242      * Get the layout type, child class must rewrite the function
       
   243      * 
       
   244      * @since since S60 v5.0
       
   245      * @return The layout type
       
   246      */
       
   247     TInt LayoutType();
       
   248 
       
   249 private:
       
   250     /**
       
   251      * Handle virtual key event
       
   252      * 
       
   253      * @since since S60 v5.0
       
   254      * @param aEventType event type
       
   255      * @param aCtrl the control report this event
       
   256      * @param aEventData event data
       
   257      * @return none
       
   258      */
       
   259     void HandleVirtualKeyUpL( TInt aEventType, CFepUiBaseCtrl* aCtrl,
       
   260                               const TDesC& aEventData );
       
   261 
       
   262 private:
       
   263 
       
   264     /**
       
   265      * Layout type
       
   266      */
       
   267     TInt iLayoutType;
       
   268     
       
   269     /**
       
   270      * word query flag
       
   271      */
       
   272     TBool iInEditWordQueryDlg;
       
   273 
       
   274     /*
       
   275      * Indicate if ITI is enabled.
       
   276      */
       
   277     TBool iITIEnabled;
       
   278     };
       
   279 
       
   280 
       
   281 #endif // C_PENINPUTSPLITQWERTYLAYOUT_H