fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/aknfepuictrlpinyineep.h
changeset 0 eb1f2e154e89
child 3 f5a1e66df979
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2008 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:           
       
    15  *      Provides the CAknFepUICtrlPinyinEEP definition 
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #ifndef C_AKNFEPUICTRLPINYINEEP_H
       
    31 #define C_AKNFEPUICTRLPINYINEEP_H
       
    32 
       
    33 #include <e32std.h>
       
    34 #include <e32base.h>
       
    35 #include <coecntrl.h>
       
    36 #include <AknUtils.h>
       
    37 #include <AknsFrameBackgroundControlContext.h> 
       
    38 
       
    39 #include "aknfepuictrleditpane.h"
       
    40 #include "aknfepuictrleepcontrol.h"
       
    41 
       
    42 /**
       
    43  * The parent control of CAknFepUICtrlEEPControl.
       
    44  * 
       
    45  * @lib aknfepuiavkonplugin.dll
       
    46  * @since S60 v5.0
       
    47  */
       
    48 const TInt KMaxBufLen = 100;
       
    49 class CAknFepUICtrlPinyinEEP : public CCoeControl, public MAknFepUICtrlEditPane
       
    50     {
       
    51 public:
       
    52     enum
       
    53         {
       
    54         EEditableEntryPane
       
    55         };
       
    56     enum
       
    57         {
       
    58         EZhuyinNULL,
       
    59         EZhuyinInsert,
       
    60         EZhuyinDelete,
       
    61         EZhuyinReplace,
       
    62         EZhuyinMoveCursor
       
    63         };
       
    64     /**
       
    65      * NewL function.
       
    66      * 
       
    67      * @since S60 v5.0
       
    68      * @param aParent. the RWindow object.
       
    69      * @return self object.
       
    70      */
       
    71     static CAknFepUICtrlPinyinEEP* NewL( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr );
       
    72 
       
    73     /**
       
    74      * NewLC function.
       
    75      * 
       
    76      * @since S60 v5.0
       
    77      * @param aParent. the RWindow object.
       
    78      * @return self object.
       
    79      */
       
    80     static CAknFepUICtrlPinyinEEP* NewLC( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr );
       
    81 
       
    82     /**
       
    83      * Destructor.
       
    84      * 
       
    85      * @return none.
       
    86      */
       
    87     virtual ~CAknFepUICtrlPinyinEEP();
       
    88 
       
    89     /**
       
    90      * From CCoeControl.
       
    91      * 
       
    92      * @return. count of controls.
       
    93      */
       
    94     virtual TInt CountComponentControls() const;
       
    95 
       
    96     /**
       
    97      * From CCoeControl.
       
    98      * 
       
    99      * @param aIndex.
       
   100      * @return. the pointer of sub-control
       
   101      */
       
   102     virtual CCoeControl* ComponentControl( TInt aIndex ) const;
       
   103 
       
   104     /**
       
   105      * From CCoeControl.
       
   106      * 
       
   107      * @param aRect.
       
   108      * @return None.
       
   109      */
       
   110     virtual void Draw( const TRect& aRect ) const;
       
   111 
       
   112     /**
       
   113      * From CCoeControl.
       
   114      * 
       
   115      * @param None.
       
   116      * @return None.
       
   117      */
       
   118     virtual void SizeChanged();
       
   119 
       
   120     /**
       
   121      * From MAknFepUICtrlEditPane.
       
   122      * Set the text buffer and maintain the current cursor position.
       
   123      * 
       
   124      * @since S60 v5.0
       
   125      * @param aDes. the content you set.
       
   126      * @return None.
       
   127      */
       
   128     void SetText( const TDesC& aDes );
       
   129 
       
   130     /**
       
   131      * From MAknFepUICtrlEditPane.
       
   132      * Set the text buffer and posit the cursor index.
       
   133      * 
       
   134      * @since S60 v5.0
       
   135      * @param aDes. the content you set.
       
   136      * @param aCursorPos. the position of cursor.
       
   137      * @param aMiniQwertyZhuyin 
       
   138      * @return None.
       
   139      */
       
   140     void SetText( const TDesC& aDes, TInt aCursorIndex, TBool aMiniQwertyZhuyin = EFalse );
       
   141 
       
   142     /**
       
   143      * From MAknFepUICtrlEditPane.
       
   144      * Set the text buffer and posit the cursor index for zhuyin.
       
   145      * 
       
   146      * @since S60 v5.0
       
   147      * @param aDes. the content you set.
       
   148      * @param aCursorPos. the position for cursor.
       
   149      * @param aChineseCount. the count for chinese characters.
       
   150      * @param aJudgeSeed. current zhuyin symbols' descriptor.
       
   151      * @param aKeystroke. current key stroke position.
       
   152      * @param aInvalid. whether aDes is invalid. ETrue for invalid, EFalse for valid.
       
   153      * @return None.
       
   154      */
       
   155     void SetTextForZhuyin( const TDesC& aDes, TInt aCursorIndex, TInt aChineseCount,
       
   156         const TDesC& aJudgeSeed, TInt aKeystroke, TBool aInvalid = EFalse, TBool aMiniQwertyZhuyin = EFalse );
       
   157 
       
   158     /**
       
   159      * From MAknFepUICtrlEditPane
       
   160      * Set the cursor position.
       
   161      * 
       
   162      * @since S60 v5.0
       
   163      * @param aIndex. the cursor position you set.
       
   164      * @return None.
       
   165      */
       
   166     void SetCursor( const TInt aIndex );
       
   167 
       
   168     /**
       
   169      * From MAknFepUICtrlEditPane
       
   170      * get the position index of cursor.The max cursor index must be larger
       
   171      * than the length of text buffer by 1.
       
   172      * 
       
   173      * @since S60 v5.0
       
   174      * @param None.
       
   175      * @return. the position index.
       
   176      */
       
   177     TInt GetCursor();
       
   178 
       
   179     /**
       
   180      * From MAknFepUICtrlEditPane
       
   181      * move cursor to the left by a 1 stride.
       
   182      * 
       
   183      * @since S60 v5.0
       
   184      * @param aStride. the stride for motion
       
   185      * @return. succeed or not.
       
   186      */
       
   187     TBool MoveCursorLeft( TInt aStride = 1 );
       
   188 
       
   189     /**
       
   190      * From MAknFepUICtrlEditPane
       
   191      * move cursor to the right by a 1 stride.
       
   192      * 
       
   193      * @since S60 v5.0
       
   194      * @param aStride. the stride for motion
       
   195      * @return. succeed or not.
       
   196      */
       
   197     TBool MoveCursorRight( TInt aStride = 1);
       
   198 
       
   199     /**
       
   200      * From MAknFepUICtrlEditPane.
       
   201      * active the cursor,the cursor will be black and with a wink.this cursor
       
   202      * state represent this control is focused.
       
   203      * 
       
   204      * @since S60 v5.0
       
   205      * @param None.
       
   206      * @return None.
       
   207      */
       
   208     void ActiveCursor();
       
   209 
       
   210     /**
       
   211      * From MAknFepUICtrlEditPane.
       
   212      * deactive the cursor, the cursor will be gray and no wink this cursor
       
   213      * state represent this control with no focus.
       
   214      * 
       
   215      * @since S60 v5.0
       
   216      * @param None.
       
   217      * @return None.
       
   218      */
       
   219     void DeactiveCursor();
       
   220 
       
   221     /**
       
   222      * From MAknFepUICtrlEditPane.
       
   223      * enable the cursor,the cursor will be drawn.
       
   224      * 
       
   225      * @since S60 v5.0
       
   226      * @param None.
       
   227      * @return None.
       
   228      */
       
   229     void EnableCursor();
       
   230 
       
   231     /**
       
   232      * From MAknFepUICtrlEditPane.
       
   233      * deactive the cursor, the cursor will not be drawn.
       
   234      * @since S60 v5.0
       
   235      * @param None.
       
   236      * @return None.
       
   237      */
       
   238     void DisableCursor();
       
   239 
       
   240     /**
       
   241      * From MAknFepUICtrlEditPane.
       
   242      * set the beginning and ending index for the underline text.
       
   243      * 
       
   244      * @since S60 v5.0
       
   245      * @param aBeg. the beginning index for underlined text.
       
   246      * @param aEnd. the ending index for underlined text.
       
   247      * @return None.
       
   248      */
       
   249     void SetUnderline( TInt aBeg, TInt aEnd );
       
   250 
       
   251     /**
       
   252      * From MAknFepUICtrlEditPane.
       
   253      * get the indexes for text with underline.
       
   254      * 
       
   255      * @since S60 v5.0
       
   256      * @param aBeg. a output param for receiving beginning index for underlined text.
       
   257      * @param aEnd. a output param for receiving ending index for underlined text.
       
   258      * @return None.
       
   259      */
       
   260     void GetUnderlineIndex( TInt& aBeg, TInt& aEnd );
       
   261 
       
   262     /**
       
   263      * From MAknFepUICtrlEditPane.
       
   264      * set the indexes for the text with highlight
       
   265      * 
       
   266      * @since S60 v5.0
       
   267      * @Param aBeg. the beginning index for highlighted text.
       
   268      * @param aEnd. the ending index for highlighted text.
       
   269      * @return None.
       
   270      */
       
   271     void SetHighlight( TInt aBeg, TInt aEnd );
       
   272 
       
   273     /**
       
   274      * From MAknFepUICtrlEditPane.
       
   275      * get the indexes for the text with highlight
       
   276      * 
       
   277      * @since S60 v5.0
       
   278      * @param aBeg. a output parameter which will receive the beginning index.
       
   279      * @param aEnd. a output parameter which will receive the ending index.
       
   280      * @return None.
       
   281      */
       
   282     void GetHighlightIndex( TInt& aBeg, TInt& aEnd );
       
   283 
       
   284     /**
       
   285      * From MAknFepUICtrlEditPane.
       
   286      * set keystroke index. 
       
   287      * 
       
   288      * @since S60 v5.0
       
   289      * @param aStartIndex. the keystroke index.
       
   290      * @return None.
       
   291      */
       
   292     void SetCursorIndexOfKeystroke( const TInt aStartIndex );
       
   293 
       
   294     /**
       
   295      * From MAknFepUICtrlEditPane.
       
   296      * get the keystroke index
       
   297      * 
       
   298      * @since S60 v5.0
       
   299      * @param None.
       
   300      * @return. the keystroke index.
       
   301      */
       
   302     TInt GetCursorIndexOfKeystroke();
       
   303 
       
   304     /**
       
   305      * From MAknFepUICtrlEditPane.
       
   306      * whether this control will be actived.ETrue represent enable otherwise
       
   307      * disable.
       
   308      * 
       
   309      * @since S60 v5.0
       
   310      * @param aEnable.ETrue represent enable this control,otherwise disable.
       
   311      * @return None.
       
   312      */
       
   313     void Enable( TBool aEnable );
       
   314 
       
   315     /**
       
   316      * From MAknFepUICtrlEditPane.
       
   317      * return whether this control is enabled.
       
   318      * 
       
   319      * @since S60 v5.0
       
   320      * @param None.
       
   321      * @return.ETrue represent this control is enabled, otherwise disabled.
       
   322      */
       
   323     TBool IsEnabled() const;
       
   324 
       
   325     /**
       
   326      * Get the info before cursor.
       
   327      * 
       
   328      * @since S60 v5.0
       
   329      * @param aText the show info.
       
   330      * @return none.
       
   331      */
       
   332     void GetText( TDes& aText );
       
   333 
       
   334     /**
       
   335      * Get the info before cursor.
       
   336      * 
       
   337      * @since S60 v5.0
       
   338      * @param aOut the info before cursor.
       
   339      * @return ETrue if can get the info.
       
   340      */
       
   341     TBool GetDesBeforeCursor( TDes& aOut );
       
   342 
       
   343     /**
       
   344      * From MAknFepUICtrlEditPane.
       
   345      * Not used.
       
   346      */
       
   347     void SetToneMark( const TDesC& aToneMark );
       
   348 
       
   349     /**
       
   350      * From MAknFepUICtrlEditPane.
       
   351      * Not used.
       
   352      */
       
   353     void SetToneMarkValidity( TBool aValid );
       
   354 
       
   355     /**
       
   356      * From MAknFepUICtrlEditPane.
       
   357      * Not used.
       
   358      */
       
   359     void SetOverrideFontId( TInt aFontId );
       
   360 
       
   361     /**
       
   362      * From MAknFepUICtrlEditPane.
       
   363      * Not used.
       
   364      */
       
   365     void SetFlag( TInt aFlag );
       
   366 
       
   367     /**
       
   368      * From MAknFepUICtrlEditPane.
       
   369      * Not used.
       
   370      */
       
   371     void ClearFlag( TInt aFlag );
       
   372 
       
   373     /**
       
   374      * From MAknFepUICtrlEditPane.
       
   375      * Not used.
       
   376      */
       
   377     TBool IsFlagSet( TInt aFlag ) const;
       
   378 
       
   379     /**
       
   380      * Set the cursor index for moving to the left.
       
   381      * 
       
   382      * @since S60 v5.0
       
   383      * @param aIndex. the cursor index for moving left.
       
   384      * @return None.
       
   385      */
       
   386     void SetCursorForMoveLeft( const TInt aIndex );
       
   387 
       
   388     /**
       
   389      * Set the cursor index for moving to the right.
       
   390      * 
       
   391      * @since S60 v5.0
       
   392      * @param aIndex. the cursor index for moving right.
       
   393      * @return None.
       
   394      */
       
   395     void SetCursorForMoveRight( const TInt aIndex );
       
   396     /**
       
   397      * Add some text at the end of buffer.
       
   398      * 
       
   399      * @since S60 v5.0
       
   400      * @param aDes. the content you want to append.
       
   401      * @return. ETrue represent success, otherwise failure.
       
   402      */
       
   403     TBool Append( const TDesC& aDes );
       
   404 
       
   405     /**
       
   406      * delete the content begin with aBeg index, and with an aLen length.
       
   407      * 
       
   408      * @since S60 v5.0
       
   409      * @param aBeg. the beginning index for delete.
       
   410      * @param aLen. the length you delete.
       
   411      * @return ETrue for success, and EFalse for failure.
       
   412      */
       
   413     TBool Delete( TInt aBeg, TInt aLen = 1 );
       
   414 
       
   415     /**
       
   416      * Insert some text after aIndex character.
       
   417      * 
       
   418      * @since S60 v5.0
       
   419      * @param aIndex. the index for insert.
       
   420      * @param aDes. the content you insert.
       
   421      * @return ETrue for success, and EFalse for failure.
       
   422      */
       
   423     TBool Insert( TInt aIndex, const TDesC& aDes );
       
   424 
       
   425     /**
       
   426      * Replace text from aBeg index to aBeg + aLen with aDes.
       
   427      * 
       
   428      * @since S60 v5.0
       
   429      * @param aBeg. the beginning index for replace.
       
   430      * @param aLen. the length for replace.
       
   431      * @param aDes. the new content after replacing.
       
   432      * @return ETrue for success, and EFalse for failure.
       
   433      */
       
   434     TBool Replace( TInt aBeg, TInt aLen, const TDesC& aDes );
       
   435 
       
   436     /**
       
   437      * Reset private member viariable.
       
   438      * 
       
   439      * @since S60 v5.0
       
   440      * @param None.
       
   441      * @return None.
       
   442      */
       
   443 	void Reset();
       
   444 
       
   445 	/**
       
   446      * Return kestroke array.
       
   447      * 
       
   448      * @since S60 v3.2.3
       
   449      * @param None.
       
   450      * @return pointer of array.
       
   451      */
       
   452     CDesCArrayFlat* KeystrokeArray();
       
   453     
       
   454 	/**
       
   455      * Return keycode array.
       
   456      * 
       
   457      * @since S60 v3.2.3
       
   458      * @param None.
       
   459      * @return pointer of array.
       
   460      */
       
   461     RArray<TInt>* KeycodeArray();
       
   462 
       
   463     /**
       
   464      * Return show kestroke array. 
       
   465      * 
       
   466      * @since S60 v3.2.3
       
   467      * @param None.
       
   468      * @return pointer of array.
       
   469      */
       
   470     CDesCArrayFlat* ShowKeystrokeArray();
       
   471 
       
   472     /**
       
   473      * Return choose chinese charater array. 
       
   474      * 
       
   475      * @since S60 v3.2.3
       
   476      * @param None.
       
   477      * @return pointer of array.
       
   478      */
       
   479     CDesCArrayFlat* PhraseArray();
       
   480 
       
   481     /**
       
   482      * Return choose chinese charater show keystroke array. 
       
   483      * 
       
   484      * @since S60 v3.2.3
       
   485      * @param None.
       
   486      * @return pointer of array.
       
   487      */
       
   488     CDesCArrayFlat* PhraseShowKeyStrokeArray();
       
   489     
       
   490 	/**
       
   491      * Return phrase keycode array.
       
   492      * 
       
   493      * @since S60 v3.2.3
       
   494      * @param None.
       
   495      * @return pointer of array.
       
   496      */
       
   497     RArray<TInt>* PhraseKeycodeArray();
       
   498     
       
   499     /**
       
   500      * Return temp array. 
       
   501      * 
       
   502      * @since S60 v3.2.3
       
   503      * @param None.
       
   504      * @return pointer of array.
       
   505      */
       
   506     CDesCArrayFlat* TempArray();    
       
   507     
       
   508     /**
       
   509      * Reset private member viariable array.
       
   510      * 
       
   511      * @since S60 v3.2.3
       
   512      * @param None.
       
   513      * @return None.
       
   514      */
       
   515     void ResetAllArray();
       
   516     
       
   517     /**
       
   518      * change state flag.
       
   519      * 
       
   520      * @since S60 v3.2.3
       
   521      * @param aState, ETrue change state.
       
   522      * @return None.
       
   523      */
       
   524     void SetChangeState( TBool aState = ETrue );
       
   525     
       
   526     /**
       
   527      * check change state flag.
       
   528      * 
       
   529      * @since S60 v3.2.3
       
   530      * @param None.
       
   531      * @return ETrue if change state, EFalse others.
       
   532      */
       
   533     TBool IsChangeState();
       
   534 
       
   535     /**
       
   536      * Set auto change state flag.
       
   537      * 
       
   538      * @since S60 v3.2.3
       
   539      * @param aState, ETrue auto change state, EFalse manual change state.
       
   540      * @return None.
       
   541      */
       
   542     void SetAutoChangeStateFlag( TBool aState = ETrue );
       
   543     
       
   544     /**
       
   545      * Get the auto change state flag.
       
   546      * 
       
   547      * @since S60 v3.2.3
       
   548      * @param None.
       
   549      * @return ETrue atuo change state, EFalse others.
       
   550      */
       
   551     TBool GetAutoChangeStateFlag();
       
   552     
       
   553     /**
       
   554      * Set all the keystroke valid flag.
       
   555      * 
       
   556      * @since S60 v3.2.3
       
   557      * @param aState, ETrue all the keystroke is valid, EFalse others.
       
   558      * @return None.
       
   559      */
       
   560     void SetAllValidFlag( TBool aState = ETrue );
       
   561     
       
   562     /**
       
   563      * Get all the keystroke valid flag.
       
   564      * 
       
   565      * @since S60 v3.2.3
       
   566      * @param None.
       
   567      * @return ETrue all the keystroke is valid, EFalse others.
       
   568      */
       
   569     TBool GetAllValidFlag();
       
   570     
       
   571     /**
       
   572      * Set Phrase Creation flag.
       
   573      * 
       
   574      * @since S60 v3.2.3
       
   575      * @param aState, ETrue is phrase creation, EFalse others.
       
   576      * @return None.
       
   577      */
       
   578     void SetPhraseCreationFlag( TBool aState );
       
   579     
       
   580     /**
       
   581      * Get Phrase Creation flag.
       
   582      * 
       
   583      * @since S60 v3.2.3
       
   584      * @param None.
       
   585      * @return ETrue is phrase creation, EFalse others.
       
   586      */
       
   587     TBool GetPhraseCreationFlag();
       
   588     
       
   589     /**
       
   590      * Set the keystroke invalid index.
       
   591      * 
       
   592      * @since S60 v3.2.3
       
   593      * @param aIndex, the keystroke invalid index.
       
   594      * @return None.
       
   595      */
       
   596     void SetInvalidIndex( TInt aIndex = 0 );
       
   597     
       
   598     /**
       
   599      * Get all the invalid keystroke index.
       
   600      * 
       
   601      * @since S60 v3.2.3
       
   602      * @param None.
       
   603      * @return invalid keystroke index.
       
   604      */
       
   605     TInt GetInvalidIndex();
       
   606     
       
   607     /**
       
   608      * Set Phrase Candidate state need refresh UI flag.
       
   609      * 
       
   610      * @since S60 v3.2.3
       
   611      * @param aState, ETrue is that Candidate state need refresh UI,other don't need.
       
   612      * @return None.
       
   613      */
       
   614     void SetCandidateRefreshFlag( TBool aState );
       
   615     
       
   616     /**
       
   617      * Get Phrase Candidate state need refresh UI flag.
       
   618      * 
       
   619      * @since S60 v3.2.3
       
   620      * @param None.
       
   621      * @return ETrue is that Candidate state need refresh UI,EFalse don't need.
       
   622      */
       
   623     TBool GetCandidateRefreshFlag();
       
   624     
       
   625     /**
       
   626      * Set the delimiter count of keystroke.
       
   627      * 
       
   628      * @since S60 v3.2.3
       
   629      * @param aCount, the delimiter count of keystroke.
       
   630      * @return None.
       
   631      */
       
   632     void SetDelimiterCount( TInt aCount );
       
   633     
       
   634     /**
       
   635      * Get the delimiter count of keystroke. 
       
   636      * 
       
   637      * @since S60 v3.2.3
       
   638      * @param None.
       
   639      * @return aCount, the delimiter count of keystroke.
       
   640      */
       
   641     TInt GetDelimiterCount();
       
   642     
       
   643     /**
       
   644      * Get current cba resource id. 
       
   645      * 
       
   646      * @since S60 v3.2.3
       
   647      * @param None.
       
   648      * @return current cba resource id.
       
   649      */
       
   650     TInt GetCurrentCBAResID();
       
   651     
       
   652     /**
       
   653      * Set current cba resource id. 
       
   654      * 
       
   655      * @since S60 v3.2.3
       
   656      * @param aResourceId, current cba resource id.
       
   657      * @return None.
       
   658      */
       
   659     void SetCurrentCBAResID( TInt aResourceId );
       
   660     
       
   661     void SetEffictiveLength( TInt aLength );
       
   662     
       
   663     TInt GetEffictiveLength();
       
   664     
       
   665     void DecEffictiveLength();
       
   666     
       
   667     void AddEffictiveLength();
       
   668     
       
   669     void SetNeedClearDeliberateSelection( TBool aNeedClearDeliberateSelection );
       
   670     
       
   671     TBool NeedClearDeliberateSelection();
       
   672     
       
   673 protected:
       
   674 
       
   675     /**
       
   676      * Layout contained controls.
       
   677      * 
       
   678      * @since S60 v5.0
       
   679      * @param None.
       
   680      * @return None.
       
   681      */
       
   682     void LayoutContainedControls();
       
   683 
       
   684     /**
       
   685      * layout the background frames.
       
   686      * 
       
   687      * @since S60 v5.0
       
   688      * @param None.
       
   689      * @return None.
       
   690      */
       
   691     void LayoutFrames();
       
   692 
       
   693     /**
       
   694      * layout its rectangles
       
   695      * 
       
   696      * @since S60 v5.0
       
   697      * @param None.
       
   698      * @return None.
       
   699      */
       
   700     void LayoutRects();
       
   701 
       
   702 private:
       
   703     /**
       
   704      * C++ constructor.
       
   705      */
       
   706     CAknFepUICtrlPinyinEEP( CAknFepUiLayoutDataMgr* aLafDataMgr );
       
   707 
       
   708     /**
       
   709      * Two-phrase constructor.
       
   710      */
       
   711     void ConstructL( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr );
       
   712 
       
   713     /**
       
   714      * Calculate visual text for appending.
       
   715      * 
       
   716      * @since S60 v5.0
       
   717      * @param aDes.the content you want to append.
       
   718      * @return None.
       
   719      */
       
   720     void CalculateVisualTextForAppend( const TDesC& aDes );
       
   721 
       
   722     /**
       
   723      * Calculate visual text for deleting.
       
   724      * 
       
   725      * @since S60 v5.0
       
   726      * @param aBeg. the beginning index you want to delete.
       
   727      * @param aLen. the length you want to delete, 1 by default.
       
   728      * @return None.
       
   729      */
       
   730     void CalculateVisualTextForDelete( TInt aBeg, TInt aLen = 1 );
       
   731 
       
   732     /**
       
   733      * Calculate visual text for inserting.
       
   734      * 
       
   735      * @since S60 v5.0
       
   736      * @param aBeg. the beginning index for your insert.
       
   737      * @param aDes. the content you want to insert.
       
   738      * @return None.
       
   739      */
       
   740     void CalculateVisualTextForInsert( TInt aBeg, const TDesC& aDes );
       
   741 
       
   742     /**
       
   743      * Calculate visual text for replacing.
       
   744      * 
       
   745      * @since S60 v5.0
       
   746      * @param aBeg. the beginning index for you replace.
       
   747      * @param aLen. the length for your replace.
       
   748      * @param aDes. the new content after your replace.
       
   749      * @return None.
       
   750      */
       
   751     void CalculateVisualTextForReplace( TInt aBeg, TInt aLen,
       
   752         const TDesC& aDes );
       
   753 
       
   754     /**
       
   755      * Calculate visual text for moving to left.
       
   756      * 
       
   757      * @since S60 v5.0
       
   758      * @param None.
       
   759      * @return None.
       
   760      */
       
   761     void CalculateVisualTextForMoveLeft();
       
   762 
       
   763     /**
       
   764      * Calculate visual text for moving to the right.
       
   765      * 
       
   766      * @since S60 v5.0
       
   767      * @param None.
       
   768      * @return None.
       
   769      */
       
   770     void CalculateVisualTextForMoveRight();
       
   771 
       
   772     /**
       
   773      * Calculate the underline indexes and highlight indexes according to the
       
   774      * absolute value.
       
   775      * 
       
   776      * @since S60 v5.0
       
   777      * @param None.
       
   778      * @return None.
       
   779      */
       
   780     void CalculateVisualIndex();
       
   781 
       
   782     /**
       
   783      * layout the background frames.
       
   784      *
       
   785      * @since S60 v5.0
       
   786      * @param aOuterRect filled with outer rect coords
       
   787      * @param aInnerRect filled with inner rect coords
       
   788      * @return None.
       
   789      */
       
   790     void CalculateFrameRects( TRect& aOuterRect, TRect& aInnerRect ) const;
       
   791 
       
   792 private:
       
   793     // Data.
       
   794 	CAknFepUiLayoutDataMgr* iLafDataMgr;
       
   795     /**
       
   796      * the position of keystroke.
       
   797      */
       
   798     TInt iIndex;
       
   799     /**
       
   800      * Whether EEP control is enabled ( visible ) .
       
   801      */
       
   802     TBool iEnabled;
       
   803     /**
       
   804      * The background context for this control.
       
   805      */
       
   806     CAknsFrameBackgroundControlContext* iBgContext;
       
   807 
       
   808     TAknLayoutRect iRectCoverMainPaneInput;
       
   809     TAknLayoutRect iRectFirstShadowInput;
       
   810     TAknLayoutRect iRectOutlineFrameInput;
       
   811     TAknLayoutRect iRectInsideAreaInput;
       
   812     /**
       
   813      * Its contained control only for display.
       
   814      * own
       
   815      */
       
   816     CAknFepUICtrlEEPControl* iEditableEntryPane;
       
   817     /**
       
   818      * All the text its caller set.
       
   819      * own
       
   820      */
       
   821     HBufC* iAbsoluteBuffer;
       
   822     /**
       
   823      * The text displayed on the contained control.
       
   824      * own
       
   825      */
       
   826     HBufC* iVisualBuffer;
       
   827     /**
       
   828      * The cursor position relative to iAbsoluteBuffer which is set by its
       
   829      * caller.
       
   830      */
       
   831     TInt iAbsoluteCursorPos;
       
   832     /**
       
   833      * The offset between the beginning position of iVisualBuffer and
       
   834      * iAbsoluteBuffer.
       
   835      */
       
   836     TInt iOffset;
       
   837     /**
       
   838      * The beginning position of underlined text.
       
   839      */
       
   840     TInt iAbsoluteUnderlineBeg;
       
   841     /**
       
   842      * The end position of underlined text.
       
   843      */
       
   844     TInt iAbsoluteUnderlineEnd;
       
   845     /**
       
   846      * The beginning position of highlighted text.
       
   847      */
       
   848     TInt iAbsoluteHighlightBeg;
       
   849     /**
       
   850      * The end position of highlighted text.
       
   851      */
       
   852     TInt iAbsoluteHighlightEnd;
       
   853     /**
       
   854      * Store the highlight-setting&underline-setting sequence
       
   855      */
       
   856     RPointerArray<CAknFepUICtrlEEPControl::TSegment> iArray;
       
   857 
       
   858     /**
       
   859      * Only for zhuyin use
       
   860      * the seed descriptor used in zhuyin input method. 
       
   861      * used to store zhuyin symbols every time.
       
   862      */
       
   863     TBuf<KMaxBufLen> iJudgeSeed;
       
   864     /**
       
   865      * used to store count for chinese character.
       
   866      */
       
   867     TInt iChineseCount;
       
   868     
       
   869     /**
       
   870      * whether the last displayed text is valid.
       
   871      */
       
   872     TBool iLastValid;
       
   873     
       
   874     /**
       
   875      * keystroke arrray.
       
   876      */
       
   877     CDesCArrayFlat* iKeystrokeArray;
       
   878     
       
   879     /**
       
   880      * Keycode arrray.
       
   881      */
       
   882     RArray<TInt> iKeycodeArray;
       
   883 
       
   884     /**
       
   885      * show Keystroke array.
       
   886      */
       
   887     CDesCArrayFlat* iShowKeystrokeArray;
       
   888     
       
   889     /**
       
   890      * Chinese array.
       
   891      */
       
   892     CDesCArrayFlat* iPhraseArray;
       
   893     
       
   894     /**
       
   895      * phrase Keycode arrray.
       
   896      */
       
   897     RArray<TInt> iPhraseKeycodeArray;
       
   898     
       
   899     /**
       
   900      * KeyStroke array for the Chinese which have been selected.
       
   901      */
       
   902     CDesCArrayFlat* iPhraseShowKeyStrokeArray;
       
   903     
       
   904     /**
       
   905      * The temp array.
       
   906      */
       
   907     CDesCArrayFlat* iTempArray;
       
   908     
       
   909     /**
       
   910      * the change state flag.
       
   911      */
       
   912     TInt iChangeFlag;
       
   913     
       
   914     /**
       
   915      * the auto change state flag.
       
   916      */
       
   917     TInt iAutoChangeFlag;
       
   918     
       
   919     /**
       
   920      * The all kyestroke is valid.
       
   921      */
       
   922     TInt iAllValidFlag;
       
   923     
       
   924     /**
       
   925      * The invalid keystroke index.
       
   926      */
       
   927     TInt iInvalidKeystrokeIndex;
       
   928     
       
   929     /**
       
   930      * Is phrase creation.
       
   931      */
       
   932     TInt iPhraseCreation;
       
   933     
       
   934     /**
       
   935      * The candidate refresh flag.
       
   936      */
       
   937     TInt iCandidateRefreshFlag;
       
   938     
       
   939     /**
       
   940      * The delimiter count of keystroke.
       
   941      */
       
   942     TInt iDelimiterCount;
       
   943     
       
   944     /**
       
   945      * Current CBA resource id.
       
   946      */
       
   947     TInt iCurrentCBAResId;
       
   948     
       
   949     TInt iEffictiveLength;
       
   950     
       
   951     TBool iMiniQwertyZhuyin;
       
   952     
       
   953     TBool iNeedClearDeliberateSelection;
       
   954     
       
   955     };
       
   956 
       
   957 #endif /* C_AKNFEPUICTRLPINYINEEP_H */
       
   958 
       
   959 // End of File
       
   960