fep/aknfep/inc/AknFepUiInputStateJapaneseBase.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-2004 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:            Provides the TAknFepUiInputStateJapaneseBase definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #ifndef __AKN_FEP_UI_INPUTSTATE_JAPANESE_BASE_H__
       
    30 #define __AKN_FEP_UI_INPUTSTATE_JAPANESE_BASE_H__
       
    31 
       
    32 // INCLUDES
       
    33 #include <e32std.h>
       
    34 #include <uikon.hrh>
       
    35 
       
    36 #include "AknFepUiInputStateBase.h"
       
    37 #include "AknFepGlobalEnums.h"
       
    38 #include "AknFepUICtrlContainerJapanese.h"
       
    39 
       
    40 #include <PtiObserver.h> // MPtiObserver
       
    41 
       
    42 // CONSTANTS
       
    43 
       
    44 // MACROS
       
    45 
       
    46 // DATA TYPES
       
    47 
       
    48 // FUNCTION PROTOTYPES
       
    49 
       
    50 // FORWARD DECLARATIONS
       
    51 
       
    52 // CLASS DECLARATION
       
    53 class MAknFepUIManagerStateInterface;
       
    54 
       
    55 /**
       
    56  *  TAknFepUiInputStateJapaneseBase class.
       
    57  *
       
    58  *  @lib AknFep.lib
       
    59  *  @since 2.6
       
    60  */
       
    61 class TAknFepUiInputStateJapaneseBase : public TAknFepInputStateBase
       
    62     {
       
    63 protected:
       
    64         enum TStateEvent
       
    65         {
       
    66         EStateEventNone,
       
    67         EStateEventCompleteCharacter,
       
    68         EStateEventDeleteCharacter,
       
    69         EStateEventScrollLeft,
       
    70         EStateEventScrollRigth,
       
    71         EStateEventScrollUp,
       
    72         EStateEventScrollDown,
       
    73         EStateEventCandidateOff,
       
    74         EStateEventCandidateOn
       
    75         };
       
    76 
       
    77 public: // Constructors and destructor
       
    78     /**
       
    79      * C++ default Constructor
       
    80      *
       
    81      * @since 2.6
       
    82      * @param aOwner Object derived MAknFepUIManagerStateInterface
       
    83      * @param aUIContainer MAknFepUICtrlContainerJapanese object
       
    84      */
       
    85     TAknFepUiInputStateJapaneseBase(MAknFepUIManagerStateInterface* aOwner,
       
    86                                     MAknFepUICtrlContainerJapanese* aUIContainer);
       
    87 
       
    88 
       
    89 public: // Functions from base classes
       
    90     /**
       
    91      * From MPtiObserver
       
    92      * Call this function when Multitap timer of PtiEngine was time-out
       
    93      *
       
    94      * @since 2.6
       
    95      */
       
    96      void KeyTimerExpired();
       
    97 
       
    98     /**
       
    99      * From MPtiObserver
       
   100      * not-use Japanese state
       
   101      *
       
   102      * @since 2.6
       
   103      */
       
   104      void LastWordInSelectionList();
       
   105 
       
   106     /**
       
   107      * From MPtiObserver
       
   108      * not-use Japanese state
       
   109      *
       
   110      * @since 2.6
       
   111      */
       
   112      void FirstWordInSelectionList();
       
   113 
       
   114     /**
       
   115      * From TAknFepInputStateBase
       
   116      * Hnadling Keypress events. This Method is called by CAknFepUIManagerJapanese.
       
   117      *
       
   118      * @since 2.6
       
   119      * @param aKey The event key code
       
   120      * @param aLength The Length of keypress
       
   121      * @return ETrue If aKey was handled
       
   122      */
       
   123      TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
       
   124 
       
   125     /**
       
   126      * From TAknFepInputStateBase
       
   127      * Handling Command events. This Method is called by CAknFepUIManagerJapanese.
       
   128      *
       
   129      * @since 2.6
       
   130      * @param aCommandId Command ID value
       
   131      */
       
   132      void HandleCommandL(TInt aCommandId);
       
   133 
       
   134     /**
       
   135      * From TAknFepInputStateBase
       
   136      * A patch to force the vtable to be copied during an assignment.
       
   137      *
       
   138      * @since 2.6
       
   139      */
       
   140     void operator=(const TAknFepInputStateBase& aState);
       
   141 
       
   142 protected: // New Functions
       
   143     /**
       
   144      * Handling short keypress events of the numeric and the star.
       
   145      * HandleKeyEventL() call this method.
       
   146      *
       
   147      * @since 2.6
       
   148      * @param aKey The event key code
       
   149      * @return ETrue If aKey was handled
       
   150      */
       
   151     virtual TBool HandleNumericShortKeyL(TInt aKey);
       
   152 
       
   153     /**
       
   154      * Handling numeric long-keypress events.
       
   155      * HandleKeyEventL() call this method.
       
   156      *
       
   157      * @since 2.6
       
   158      * @param aKey The event key code
       
   159      * @return ETrue If aKey was handled
       
   160      */
       
   161     virtual TBool HandleNumericLongKeyL(TInt aKey);
       
   162 
       
   163     /**
       
   164      * Handling Qwerty keypress events.
       
   165      * HandleKeyEventL() call this method.
       
   166      *
       
   167      * @since 2.8
       
   168      * @param aKey The event key code
       
   169      * @return ETrue If aKey was handled
       
   170      */
       
   171     virtual TBool HandleQwertyShortKeyL(TInt aKey);
       
   172 
       
   173     /**
       
   174      * Handling navigate keypress events. HandleKeyEventL() call this method.
       
   175      *
       
   176      * @since 2.6
       
   177      * @param aKey The event key code
       
   178      * @param aLength The Length of keypress
       
   179      * @return ETrue If aKey was handled
       
   180      */
       
   181     virtual TBool HandleNaviKeyL(TInt aKey, TKeyPressLength aLength);
       
   182 
       
   183     /**
       
   184      * Handling auxiliary keypress events including OK and Backspace.
       
   185      * HandleKeyEventL() call this method.
       
   186      *
       
   187      * @since 2.6
       
   188      * @param aKey The event key code
       
   189      * @param aLength The Length of keypress
       
   190      * @return ETrue If aKey was handled
       
   191      */
       
   192     virtual TBool HandleAuxKeyL(TInt aKey, TKeyPressLength aLength);
       
   193 
       
   194     /**
       
   195      * Update inline editing string
       
   196      *
       
   197      * @since 2.6
       
   198      * @return ETrue If inline editing string was updated
       
   199      */
       
   200     virtual TBool UpdateInlineEditingCharacterL();
       
   201 
       
   202     /**
       
   203      * Commit inline editing string
       
   204      *
       
   205      * @since 2.6
       
   206      * @return ETrue If inline editing string was updated
       
   207      */
       
   208     virtual TBool CommitInlineEditingCharacterL();
       
   209 
       
   210     /**
       
   211      * Getting UI container object
       
   212      *
       
   213      * @since 2.6
       
   214      * @return Japanese UI container object
       
   215      */
       
   216     MAknFepUICtrlContainerJapanese* UIContainer();
       
   217 
       
   218     /**
       
   219      * Update character case
       
   220      *
       
   221      * @since 2.6
       
   222      * @param aChar 1-character, Judgment data of character case
       
   223      */
       
   224     void  UpdateCase(TPtrC& aChar);
       
   225 
       
   226     TBool IsNumberKey(const TInt aKey);
       
   227     TBool IsQwertyKey(const TInt aKey);
       
   228 
       
   229 private: // New Functions
       
   230     /**
       
   231      * Check whether last catacter case and current catacter case is same
       
   232      * 
       
   233      * @since 2.6
       
   234      * @param aChar 1-character, Judgment data of character case
       
   235      * @return ETrue If aChar case is diffrent from last character
       
   236      */
       
   237     TBool IsDiffrentCase(TPtrC& aChar) const;
       
   238 
       
   239     /**
       
   240      * Check a caracter case is upper
       
   241      * 
       
   242      * @since 2.6
       
   243      * @param aChar 1-character, Judgment data of character case
       
   244      * @return ETrue If aChar case is upper case
       
   245      */
       
   246     TBool IsUpperCase(TPtrC& aChar) const;
       
   247 
       
   248     /**
       
   249      * Check a caracter case is lower
       
   250      *
       
   251      * @since 2.6
       
   252      * @param aChar 1-character, Judgment data of character case
       
   253      * @return ETrue If aChar case is lower case
       
   254      */
       
   255     TBool IsLowerCase(TPtrC& aChar) const;
       
   256 
       
   257 protected: // Data
       
   258     MAknFepUICtrlContainerJapanese* iUIContainer; // not owner
       
   259     };
       
   260 #endif//__AKN_FEP_UI_INPUT_STATE_JAPANESE_BASE_H__
       
   261 // End of file