textinput/peninputvkbkr/inc/PeninputVkbKrLayout.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:  peninput VKB data manager
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef PENINPUTVKBLAYOUT_H
       
    19 #define PENINPUTVKBLAYOUT_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 #include <PeninputCommonLayoutExt.h>
       
    26 #include "PtiDefs.h"
       
    27 
       
    28 class CPtiEngine;
       
    29 
       
    30 class CPeninputVkbKrLayout : public CPeninputCommonLayoutExt
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     static CPeninputVkbKrLayout* NewL(
       
    36         MLayoutOwner* aLayoutOwner, 
       
    37         const TAny* aInitData,
       
    38         const TInt& aInputMode);
       
    39 
       
    40     virtual ~CPeninputVkbKrLayout();
       
    41 
       
    42 private:
       
    43 
       
    44     CPeninputVkbKrLayout(
       
    45         MLayoutOwner* aLayoutOwner,
       
    46         const TInt& aInputMode);
       
    47 
       
    48     void ConstructL(
       
    49         const TAny* aInitData);
       
    50 
       
    51 private: // from CFepUiLayout
       
    52     
       
    53     /**
       
    54      * From MFepLayoutBase
       
    55      * HandleEventL. Handle UI event.
       
    56      * There are only 3 kinds of UI event right now: raw event,
       
    57      * pointer and pointer buffer event.
       
    58      *
       
    59      * @since S60 v4.0
       
    60      * @param aType The event type. See TEventType
       
    61      * @param aEventData The event data.
       
    62      * @return The control which processes the event
       
    63      */
       
    64     TBool HandleEventL(TEventType aType, const TAny* aEventData);
       
    65 
       
    66     /**
       
    67      * From CFepUiLayout.
       
    68      * Handle layout command event
       
    69      *
       
    70      * @since S60 v3.2
       
    71      * @param aCmd Command Id.
       
    72      * @param aData Data for command.
       
    73      * @return Errors when return value small than 0.
       
    74      */
       
    75     TInt HandleCommand(TInt aCmd, TUint8* aData);
       
    76 
       
    77     /**
       
    78      * From CFepUiLayout.
       
    79      * Handle the event from control
       
    80      *
       
    81      * @since S60 v3.2
       
    82      * @param aEventType The event type
       
    83      * @param aCtrl  The sender
       
    84      * @param aEventData The event data.
       
    85      * @return None
       
    86      */
       
    87     void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData);
       
    88 
       
    89     /**
       
    90      * From CFepUiLayout.
       
    91      * Handle editor text coming
       
    92      * Called by animation dll when app editor text is coming.
       
    93      * If a ui layout has a editor area, it must implements this function to get the text
       
    94      *
       
    95      * @since S60 v3.2
       
    96      * @param aTotalTextLen The total editor text len
       
    97      * @param aTextStartPos The position of the selection in whole editor text
       
    98      * @param aCursolSel The cursor selection in the editor
       
    99      * @param aText The text sent by fep.
       
   100      * @return KErrNone is operation succeeded.
       
   101      */
       
   102     TInt OnAppEditorTextComing( const TFepInputContextFieldData& aData);
       
   103 
       
   104     /**
       
   105      * From CFepUiLayout.
       
   106      * Handle raw event key
       
   107      *
       
   108      * @since S60 v3.2
       
   109      * @param aData the key raw event data
       
   110      * @return ETrue if the key was handled, otherwise EFalse
       
   111      */
       
   112     TBool HandleRawKeyEventL(const TRawEvent& aKeyEvent);
       
   113 
       
   114     /**
       
   115      * From CFepUiLayout.
       
   116      * Handle pointer down/up event while this event is outside of the layout
       
   117      * Do nothing in default implementation
       
   118      *
       
   119      * @since S60 v4.0
       
   120      * @param aEvent The raw event
       
   121      * @return EFalse if the event needs forward on. Otherwise ETrue.
       
   122      */
       
   123     TBool OnPointerEventOutsideLayout(const TRawEvent& aEvent);
       
   124     
       
   125     TInt OnResourceChange(TInt aType);     
       
   126 
       
   127 private: // from CPeninputCommonLayout
       
   128 
       
   129     /**
       
   130      * From CPeninputCommonLayout
       
   131      * Factory method for creation of layout window. The decision which 
       
   132      * layout window(VKB or HWR) is created will be postboned in subclasses 
       
   133      * of this class
       
   134      *
       
   135      * @since S60 v3.2
       
   136      * @return None
       
   137      */
       
   138     void CreateLayoutWindowL();
       
   139 
       
   140     /**
       
   141      * From CPeninputCommonLayout
       
   142      * Factory method for creation resource config. It is enough at present 
       
   143      * to create and initialize resource config. Any necessary extension 
       
   144      * will be implemented in subclasses
       
   145      * 
       
   146      * @since S60 v3.2
       
   147      * @return None
       
   148      */
       
   149     void CreateDataMgrL( const TAny* aInitData );
       
   150 
       
   151     /**
       
   152      * From CPeninputCommonLayout
       
   153      * Get the layout type, VKB or HWR, child class must rewrite the function
       
   154      * 
       
   155      * @since S60 v3.2
       
   156      * @return The layout type
       
   157      */
       
   158      TInt LayoutType();
       
   159      
       
   160      TInt SizeChanged( const TAny* aData );
       
   161      
       
   162      void HandleAppInfoChange(const TDesC& aInfo, TPeninputAppInfo aType);
       
   163     /* Teleca change begin, 21.05.2009 ssal */
       
   164     static TInt HideByteWarningBubble(TAny* aPointer);
       
   165     void HideByteWarningBubble();
       
   166 	/* Teleca change end, 21.05.2009 ssal */ 
       
   167      
       
   168 private: //data
       
   169     
       
   170     CPtiEngine* iPtiEngine;
       
   171     
       
   172     TInt iInputMode;
       
   173 
       
   174     TBool iInEditWordQueryDlg;
       
   175     /* Teleca change begin, 21.05.2009 ssal */
       
   176     CPeriodic* iInfoTimer;
       
   177     /* Teleca change end, 21.05.2009 ssal */   
       
   178     TPtiKeyboardType iKeyBoardType;
       
   179 	TBool iIsOpenVkbKr;
       
   180     };
       
   181 
       
   182 #endif // PENINPUTVKBLAYOUT_H