Revision: 201039 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 14:55:58 +0300
branchRCL_3
changeset 56 8152b1f1763a
parent 50 5a1685599b76
child 57 9eb76adaa71f
Revision: 201039 Kit: 201041
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/group/AknFepUiAvkonPlugin.mmp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidateCharacter.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidatePane.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidateSelected.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlContainerChinese.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlPinyinPopup.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/aknfepuilayoutdatamgr.h
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidateCharacter.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidatePane.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidateSelected.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlContainerChinese.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlInputPane.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlPinyinPopup.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuictrleepcontrol.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuictrlpinyineep.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuilayoutdatamgr.cpp
fep/aknfep/UiPlugins/AknFepUiInterface/inc/AknFepUiCtrlContainerChinese.h
fep/aknfep/conf/aknfep.confml
fep/aknfep/conf/aknfep_101F876D.crml
fep/aknfep/group/AknFep.mmp
fep/aknfep/group/Iconlist.txt
fep/aknfep/group/bld.inf
fep/aknfep/inc/AknFepLanguageManager.h
fep/aknfep/inc/AknFepManager.h
fep/aknfep/inc/AknFepManagerUIInterface.h
fep/aknfep/inc/AknFepPluginManager.h
fep/aknfep/inc/AknFepSharedDataInterface.h
fep/aknfep/inc/AknFepUIInputStateEntryMiniQwertyCangJie.h
fep/aknfep/inc/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.h
fep/aknfep/inc/AknFepUiInputStateBase.h
fep/aknfep/inc/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.h
fep/aknfep/inc/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.h
fep/aknfep/inc/AknFepUiInputStateChineseBase.h
fep/aknfep/inc/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.h
fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h
fep/aknfep/inc/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.h
fep/aknfep/inc/AknFepUiInputStatePredictiveInputMiniQwertyChinesePhrase.h
fep/aknfep/inc/AknFepUiInputStateQwertyKorean.h
fep/aknfep/inc/AknFepUiManagerBase.h
fep/aknfep/inc/AknFepUiManagerChinese.h
fep/aknfep/inc/aknfepuiinputminiqwertysogoupinyinphraseplugin.h
fep/aknfep/inc/aknfepuiinputminiqwertysogoustrokephraseplugin.h
fep/aknfep/inc/aknfepuiinputstateminiqwertystrokephrase.h
fep/aknfep/inc/aknfepuiinputstateminiqwertyzhuyinphrase.h
fep/aknfep/peninputplugins/PeninputPluginKr/src/PluginKrFepManagerBase.cpp
fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp
fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp
fep/aknfep/src/AknFepKeyCatcher.cpp
fep/aknfep/src/AknFepManager.cpp
fep/aknfep/src/AknFepPluginManager.cpp
fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyCangJie.cpp
fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.cpp
fep/aknfep/src/AknFepUIInputStatePredictiveInputMiniQwertyChinesePhrase.cpp
fep/aknfep/src/AknFepUiInputStateBase.cpp
fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp
fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp
fep/aknfep/src/AknFepUiInputStateCandidateQwertyBaseChinesePhrase.cpp
fep/aknfep/src/AknFepUiInputStateChineseBase.cpp
fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp
fep/aknfep/src/AknFepUiInputStateEntryQwertyBaseChinesePhrase.cpp
fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp
fep/aknfep/src/AknFepUiInputStateEntryThaiPredictive.cpp
fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp
fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp
fep/aknfep/src/AknFepUiInputStateInitialKoreanMultitap.cpp
fep/aknfep/src/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.cpp
fep/aknfep/src/AknFepUiInputStatePredictiveInputQwertyChinesePhrase.cpp
fep/aknfep/src/AknFepUiInputStateQwerty.cpp
fep/aknfep/src/AknFepUiManagerBase.cpp
fep/aknfep/src/AknFepUiManagerChinese.cpp
fep/aknfep/src/AknFepUiManagerKorean.cpp
fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp
fep/aknfep/src/aknfepuiinputminiqwertysogoupinyinphraseplugin.cpp
fep/aknfep/src/aknfepuiinputminiqwertysogoustrokephraseplugin.cpp
fep/aknfep/src/aknfepuiinputminiqwertystrokephrasebase.cpp
fep/aknfep/src/aknfepuiinputstateminiqwertystrokephrase.cpp
fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp
fep/aknfep/src/aknfepuiinputstateqwertykorean.cpp
inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h
inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h
inputmethods_plat/pen_input_server_api/inc/peninputclient.h
inputmethods_plat/pen_input_server_api/inc/peninputcmd.h
inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h
inputmethods_pub/ptiengine_iti_api/inc/PtiDefs.h
textinput/group/bld.inf
textinput/peninputarc/bwins/peninputClientU.DEF
textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF
textinput/peninputarc/eabi/peninputClientU.DEF
textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF
textinput/peninputarc/group/bld.inf
textinput/peninputarc/gsplugin/gspeninputplugin/loc/gspeninputplugin.loc
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbubblectrl.h
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.h
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.inl
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputpopupbubble.h
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputtapsettingmanager.h
textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h
textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h
textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h
textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h
textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h
textinput/peninputarc/inc/pensrvcliinc/peninputserver.h
textinput/peninputarc/inc/pensrvcliinc/peninputsrvobserver.h
textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h
textinput/peninputarc/inc/pensrvcliinc/penuicandidatewnd.h
textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h
textinput/peninputarc/inc/pensrvcliinc/penuiwndeventhandler.h
textinput/peninputarc/inc/pensrvcliinc/penuiwndeventobserver.h
textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h
textinput/peninputarc/rom/peninputarc.iby
textinput/peninputarc/src/peninputanim/peninputanim.cpp
textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp
textinput/peninputarc/src/peninputclient/penclientimpl.cpp
textinput/peninputarc/src/peninputclient/peninputclient.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputpopupbubble.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputtapsettingmanager.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp
textinput/peninputarc/src/peninputserverapp/data/peninputserver.rss
textinput/peninputarc/src/peninputserverapp/iconlist.txt
textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp
textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp
textinput/peninputarc/src/peninputserverapp/peninputserver.cpp
textinput/peninputarc/src/peninputserverapp/peninputserver.mmp
textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp
textinput/peninputarc/src/peninputserverapp/penuicandidatewnd.cpp
textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp
textinput/peninputarc/src/peninputserverapp/penuiwndeventhandler.cpp
textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp
textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF
textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF
textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h
textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h
textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp
textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss
textinput/peninputfingerhwrar/group/iconlist.txt
textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp
textinput/peninputfingerhwrar/inc/peninputfingerhwarvkbutility.h
textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h
textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h
textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h
textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h
textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h
textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h
textinput/peninputfingerhwrar/src/peninputfingerhwarvkbutility.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp
textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp
textinput/peninputgenericitut/inc/peninputgenericitutdata.h
textinput/peninputgenericitut/inc/peninputgenericitutdatamgr.h
textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp
textinput/peninputgenericitut/src/peninputgenericitutwindow.cpp
textinput/peninputgenericitut/src/peninputitutchnuimgr.cpp
textinput/peninputgenericitut/src/peninputitutwesternuimgr.cpp
textinput/peninputgenericvkb/inc/peninputgenericvkblayout.h
textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h
textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp
textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp
textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp
textinput/peninputsplititut/inc/peninputsplititutdata.h
textinput/peninputsplititut/inc/peninputsplititutdatamgr.h
textinput/peninputsplititut/inc/peninputsplititutlayout.h
textinput/peninputsplititut/inc/peninputsplititutwesternuistatespelling.h
textinput/peninputsplititut/inc/peninputsplititutwindow.h
textinput/peninputsplititut/src/peninputsplititutchnuimgr.cpp
textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp
textinput/peninputsplititut/src/peninputsplititutlayout.cpp
textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp
textinput/peninputsplititut/src/peninputsplititutwesternuistatespelling.cpp
textinput/peninputsplititut/src/peninputsplititutwindow.cpp
textinput/peninputsplititut/src/peninputsplititutwindowmanager.cpp
textinput/peninputsplitqwerty/inc/peninputsplitqwertylafdatamgr.h
textinput/peninputsplitqwerty/inc/peninputsplitqwertylayout.h
textinput/peninputsplitqwerty/inc/peninputsplitqwertywindow.h
textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp
textinput/peninputsplitqwerty/src/peninputsplitqwertylayout.cpp
textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp
textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp
textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h
textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp
textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp
textinput/ptienginev2/src/PtiEngineImpl.cpp
textinput/ptienginev2/src/PtiKeyMappings.cpp
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/group/AknFepUiAvkonPlugin.mmp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/group/AknFepUiAvkonPlugin.mmp	Wed Oct 13 14:55:58 2010 +0300
@@ -67,10 +67,10 @@
 SOURCE          AknFepUiAvkonCtrlContainerChinese.cpp
 SOURCE          AknFepUiAvkonCtrlInputPane.cpp
 SOURCE          AknFepUiAvkonCtrlCandidatePane.cpp
+SOURCE          AknFepUiAvkonCtrlCandidateSelected.cpp
 SOURCE          AknFepUiAvkonCtrlPinyinPopup.cpp
 SOURCE          aknfepuilayoutdatamgr.cpp
 SOURCE          aknfepchineseuidataconv.cpp
-SOURCE          AknFepUIAvkonCtrlCandidateCharacter.cpp
 // for phrase creation
 SOURCE          aknfepuictrleepcontrol.cpp 
 SOURCE          aknfepuictrlpinyineep.cpp 
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h	Wed Oct 13 14:55:58 2010 +0300
@@ -104,8 +104,6 @@
 		// From MEikMenuObserver
 		virtual void DynInitMenuPaneL( TInt aResourceId, 
 		                               CEikMenuPane* aMenuPane );
-		// Process the key events
-		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
 	    
 	protected:
         /**
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidateCharacter.h	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:           
-*       Provides the CAknFepUICtrlCandidateCharacter definition.
-*
-*/
-
-
-
-
-
-
-
-
-
-
-
-
-#ifndef __AKN_FEP_CANDIDATE_CHARACTER_PANE_H__
-#define __AKN_FEP_CANDIDATE_CHARACTER_PANE_H__
-
-#include <e32std.h>
-#include <coecntrl.h>
-
-#include "AknFepUICtrlCandidatePane.h"
-
-class CEikLabel;
-class MAknFepUIEventObserver;
-
-/**
- * Control representing the selected candidate. Is a window owning control,
- * that appears over the candidate pane such that it obscures the labels
- * beneath. Can be hidden, for example if there is no visible selection, 
- * or if highlighting is disabled.
- */
-NONSHARABLE_CLASS(CAknFepUICtrlCandidateCharacter) : public CCoeControl
-    {
-public:
-    enum
-        {
-		EOneCandidate = 1,
-        EMaxSelectedCandidateLength = 10 // extend buffer for phrase input
-        };
-public:
-
-    /**
-     * first phase construction
-     */
-    static CAknFepUICtrlCandidateCharacter* NewL( RWindowTreeNode& aParent, 
-    		                                      MAknFepUIEventObserver* aObserver );
-
-    /**
-     * destructor
-     */
-    ~CAknFepUICtrlCandidateCharacter();
-
-    /**
-     * Set the text buffer of the character.
-     *
-     * @param aCharacter, the label will be filled with the characters from aCharacter
-     */
-    void SetText( const TDesC& aCharacter );
-
-    /**
-     * Get the text of the character
-     *
-     */
-	const TDesC* Text() const;
-
-public: // from CCoeControl
-    /**
-     * size changed
-     */
-    virtual void SizeChanged();
-
-    /**
-     * count component controls
-     *
-     * @return number of contained controls
-     */
-    TInt CountComponentControls() const;
-
-    /**
-     * Component control
-     *
-     * @param aIndex the control to return, must be between 0 and the number of controls
-     * @return pointer to contained control, ownership is not passed
-     */
-    CCoeControl* ComponentControl(TInt aIndex) const;
-
-    /**
-     * draw
-     *
-     * @param aRect rectangle
-     */
-    virtual void Draw( const TRect& aRect ) const;
-    
-    /**
-     * Set character highlight state
-     *
-     * @param bHighlight highlight or not
-     */
-    void SetHighlight( TBool bHightlight );
-
-protected:
-    /**
-     * second phase construction
-     */
-    void ConstructL( RWindowTreeNode& aParent, MAknFepUIEventObserver* aObserver );
-
-     /**
-      * constructor
-      */
-    CAknFepUICtrlCandidateCharacter();
-
-    /**
-     * layout the rectangles
-     */
-    void LayoutRects();
-
-    /**
-     * layout contained controls
-     */
-    void LayoutContainedControls();
-
-    /**
-     * layout the background frames
-     *
-     * @param aOuterRect filled with outer rect coords
-     * @param aInnerRect filled with inner rect coords
-     *
-     */
-    void CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const;
-    
-private:
-    TAknLayoutRect iRectShadow;
-    TAknLayoutRect iRectHighlight;
-	TBufC<EMaxSelectedCandidateLength> iBuffer;
-	
-private: // the following are owned
-    CEikLabel* iCandidateLabel;
-	TBool iIsHighligt;
-    };
-
-#endif //__AKN_FEP_CANDIDATE_CHARACTER_PANE_H__
-
-// End of file
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidatePane.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidatePane.h	Wed Oct 13 14:55:58 2010 +0300
@@ -36,222 +36,18 @@
 #include "AknFepUICtrlCandidatePane.h"
 #include "AknFepUIAvkonCtrlContainerChinese.h"
 
-class CAknFepUICtrlCandidateCharacter;
-class MAknFepUIEventObserver;
-
-/**
- * Pane which displays the preview character.
- */
-NONSHARABLE_CLASS(CAknFepPreview) : public CCoeControl
-	{
-public:
-	/**
-	 * first phase construction
-	 */
-	static CAknFepPreview* NewL( RWindowTreeNode& aParent );
-	
-	/**
-	 * Destruction function
-	 *
-	 */
-	~CAknFepPreview();	
-		
-	/**
-	 * draw
-	 *
-	 * @param aRect rectangle
-	 */
-	virtual void Draw( const TRect& aRect ) const;
-	
-	/**
-	 * size changed
-	 */
-	virtual void SizeChanged();
-	
-	/**
-	 * Show preview lable
-	 * @param aRect rectangle
-	 * @param aCharacter preview text
-	 */
-	void ShowL( TRect& aRect, const TDesC& aCharacter );
-	
-	/**
-	 * Hide preview lable
-	 */
-	void HideL();
-	
-	/**
-	 * count component controls
-	 *
-	 * @return number of contained controls
-	 */
-	TInt CountComponentControls() const;
-
-	/**
-	 * Component control
-	 *
-	 * @param aIndex the control to return, must be between 0 and the number of controls
-	 * @return pointer to contained control, ownership is not passed
-	 */
-	CCoeControl* ComponentControl(TInt aIndex) const;
-	
-protected:
-	/**
-	 * Construction function
-	 *
-	 */
-	CAknFepPreview();
-	
-	/**
-	 * second phase construction
-	 */
-	void ConstructL( RWindowTreeNode& aParent );
-	
-	/**
-	 * layout the background frames
-	 *
-	 * @param aOuterRect filled with outer rect coords
-	 * @param aInnerRect filled with inner rect coords
-	 *
-	 */
-    void CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const;
-
-private:
-    // Preview lable
-	CEikLabel* iPreviewLabel;
-	};
-
-/**
- * Pane which displays the Up arrow & Down arrow & close.
- */
-NONSHARABLE_CLASS(CAknFepUICtrlCandidateScroll) : public CCoeControl
-	{
-public:
-	/**
-	 * first phase construction
-	 */
-	static CAknFepUICtrlCandidateScroll* NewL( RWindowTreeNode& aParent, 
-		                                       MAknFepUIEventObserver* aObserver );
-
-	/**
-	 * destructor
-	 */
-	~CAknFepUICtrlCandidateScroll();
-
-	/**
-	 * size changed
-	 */
-	virtual void SizeChanged();	
-
-	/**
-	 * draw
-	 *
-	 * @param aRect rectangle
-	 */
-	virtual void Draw( const TRect& aRect ) const;	
-	
-    /**
-     * Handle pointer event
-     * @param aPointerEvent pointer event
-     */
-    void HandlePointerEventL( const TPointerEvent & aPointerEvent );
-    
-    /**
-     * enable/disable the rendering of the Up Scroll Arrows. 
-     *
-     * @param aValue if ETrue, enable the arrows
-     *  if EFalse, disable the arrrows
-     */
-	void ShowUpScrollArrows( TBool aValue );
-	
-    /**
-     * enable/disable the rendering of the down Scroll Arrows. 
-     *
-     * @param aValue if ETrue, enable the arrows
-     *  if EFalse, disable the arrrows
-     */
-	void ShowDownScrollArrows( TBool aValue );
-	
-    /**
-     * enable/disable the rendering of the Vertical Scroll Arrows. 
-     *
-     * @param aValue if ETrue, enable the arrows
-     *                          if EFalse, disable the arrrows
-     */
-	void ShowVerticalScrollArrows( TBool aValue );
-	
-    /**
-     * are the Vertical Scroll Arrows enabled
-     *
-     * @return if arrows not enabled, returns EFalse
-     */
-	TBool IsShowVerticalScrollArrows() const;
-		
-    
-protected:
-	/**
-	 * second phase construction
-	 */
-	void ConstructL( RWindowTreeNode& aParent, MAknFepUIEventObserver* aObserver );
-	
-    /**
-     * Construct all the bitmap classes
-     */
-    void ConstructBitmapsL();
-    
-	/**
-	  * constructor
-	  */
-	CAknFepUICtrlCandidateScroll();
-	
-	/**
-	 * layout contained controls
-	 */
-	void LayoutIcon();
-	
-	/**
-	 * Calculate the close rect
-	 *
-	 * @param aOuterRect filled with outer rect coords
-	 * @param aInnerRect filled with inner rect coords
-	 *
-	 */
-	void CalculateCloseRects(TRect& aOuterRect, TRect& aInnerRect) const;
-
-private:
-    CFbsBitmap* iScrollCloseBitmap;
-    CFbsBitmap* iScrollCloseBitmapMask;
-    CFbsBitmap* iNaviArrowBitmapUp;
-    CFbsBitmap* iNaviArrowBitmapUpMask;
-    CFbsBitmap* iNaviArrowBitmapDown;
-    CFbsBitmap* iNaviArrowBitmapDownMask;
-    
-    TAknLayoutRect iIndiFepClose;
-    TAknLayoutRect iIndiFepArrowUp;
-    TAknLayoutRect iIndiFepArrowDown;
-    
-    TBool iShowVerticalScrollArrows;
-    TBool iShowUpScrollArrows;
-    TBool iShowDownScrollArrows;
-    TBool iShowClose;
-    
-    MAknFepUIEventObserver* iObServer;
-	};
+class CAknFepUICtrlCandidateSelected;
 
 /**
  * Pane which displays the Chinese Candidates.
  */
-NONSHARABLE_CLASS(CAknFepUICtrlCandidatePane) : 
-				public CCoeControl,
-				public MAknFepUICtrlCandidatePane,
-				public MAknFepUIEventObserver
+NONSHARABLE_CLASS(CAknFepUICtrlCandidatePane) : public CCoeControl, public MAknFepUICtrlCandidatePane
     {
 public:
     /**
      * first phase construction
      */
-    static CAknFepUICtrlCandidatePane* NewL( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr, 
-											 MAknFepChineseUiMgr* aMgr );
+    static CAknFepUICtrlCandidatePane* NewL(RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr);
     /**
      * destructor
      */
@@ -264,12 +60,6 @@
      * @output the text buffer of the Pane
      */
     const TDesC& TextBuffer() const;
-    
-    /**
-     * Handle pointer event
-     * @param aPointerEvent pointer event
-     */
-    void HandlePointerEventL( const TPointerEvent & aPointerEvent );
 
     /**
      * Allows the client to set a descriptor pointer into an existing buffer of 
@@ -379,7 +169,7 @@
      * @return if arrows not enabled, returns EFalse
      */
     TBool IsShowVerticalScrollArrows() const;
-		
+
     /**
      * enable/disable the rendering of the Vertical Scroll Arrows. 
      *
@@ -387,15 +177,22 @@
      *                          if EFalse, disable the arrrows
      */
     void ShowVerticalScrollArrows(TBool aValue);
-    
+
     /**
-     * This function is not needed.
+     * enable/disable the rendering of the candidate ordinal numbers
      *
      * @param aValue if ETrue, enable the ordinals
      *                          if EFalse, disable the ordinals
      *
      */
-    void ShowCandidateOrdinals(TBool /*aValue*/){};
+    void ShowCandidateOrdinals(TBool aValue);
+
+    /**
+     * enable/disable the rendering of the candidate ordinal numbers
+     *
+     * @return if not shown, return EFalse
+     */
+    TBool IsShowCandidateOrdinals() const;
 
     /**
      * This function returns the number of Candidates that are visible in the pane 
@@ -560,21 +357,6 @@
 	 */
 	TBool NeedGetNewCandidatePage();
 	
-	/**
-	 *	Close button is pressed
-	 */
-	void FepUIClosePressed();
-
-	/**
-	 *	Set MAknFepUiStateCtrl pointer
-	 */
-	void SetFepUiState(MAknFepUiStateCtrl* aFepUiState);	
-	
-	/**
-	 *	Hide preview
-	 */
-	void HidePreviewL();
-
 public: // from CCoeControl
     /**
      * size changed
@@ -596,20 +378,38 @@
      * 
      */
     CCoeControl* ComponentControl(TInt aIndex) const;
+
+    /**
+     * draw
+     *
+     * @param aRect rectangle
+     *
+     */
+    virtual void Draw(const TRect& aRect) const;
+    
     
     void Enable(TBool aEnable);
 
 protected:
-    
     /**
      * second phase construction
      */
     void ConstructL(RWindow& aParent);
 
     /**
-     * Construct function
+     * Construct all the bitmap classes
+     */
+    void ConstructBitmapsL();
+
+    /**
+     * constructor
      */
-    CAknFepUICtrlCandidatePane( CAknFepUiLayoutDataMgr* aLafDataMgr, MAknFepChineseUiMgr* aMgr );
+    CAknFepUICtrlCandidatePane( CAknFepUiLayoutDataMgr* aLafDataMgr );
+
+    /**
+     * layout the rectangles
+     */
+    void LayoutRects();
 
     /**
      * layout contained controls
@@ -620,16 +420,22 @@
      * layout the labels for a single candidate
      */
     void LayoutLabel(TInt aIndex);
-    
+
     /**
      * layout the labels for all the candidates (even those that are not currently visible)
      */
     void LayoutLabels();
 
     /**
-     * layout the scroll pane
+     * layout selected candidate
+     * <p> Note that there is only one instance, as there can 
+     * only be one selected candidate at a time. Therefore, the control
+     * is placed in the position that is correct based on the current selection
+     *
+     * @param aIndex the index of the new position of the selected candidate
+     *
      */
-    void LayoutScroll();
+    void LayoutCandidateSelected();
 
     /**
      * set label vilisibilty, according to the current pane layout
@@ -650,26 +456,44 @@
      */
     void InternalSpilitPhraseCandidate();
 
+private: // the following are owned
+    CAknFepUICtrlCandidateSelected* iCandidateSelected;
+    CFbsBitmap* iNaviArrowBitmapLeft;
+    CFbsBitmap* iNaviArrowBitmapLeftMask;
+    CFbsBitmap* iNaviArrowBitmapRight;
+    CFbsBitmap* iNaviArrowBitmapRightMask;
+    CFbsBitmap* iNaviArrowBitmapUp;
+    CFbsBitmap* iNaviArrowBitmapUpMask;
+    CFbsBitmap* iNaviArrowBitmapDown;
+    CFbsBitmap* iNaviArrowBitmapDownMask;
 private: // the following need resetting
-    RPointerArray<CAknFepUICtrlCandidateCharacter> iCandidateLabelArray;
+    RPointerArray<CEikLabel> iCandidateLabelArray;
+    RPointerArray<CEikLabel> iOrdinalLabelArray;
     RArray<TCandidateMode> iCandidateModeArray;
 private: // the following are members
     CAknFepUiLayoutDataMgr* iLafDataMgr;
+    TAknLayoutRect iIndiFepArrowLeft;
+    TAknLayoutRect iIndiFepArrowRight;
+    TAknLayoutRect iIndiFepArrowUp;
+    TAknLayoutRect iIndiFepArrowDown;
     TBufC<EMaxCandidates> iBuffer;
     CAknFepUICtrlContainerChinese::TPaneLayout iPaneLayout;
     TInt iVisibleCount;
     TInt iSelected;
     TBool iHighlighted;
+    TBool iShowHorizontalScrollArrows;
+    TBool iShowVerticalScrollArrows;
+    TBool iShowUpScrollArrows;
+    TBool iShowDownScrollArrows;
+    TBool iShowLeftScrollArrows;
+    TBool iShowRightScrollArrows;
+    TBool iShowCandidateOrdinals;
     RArray<TPage> iPages;
     //next paging candidate index
     TInt iUnpagedIndex;
     TInt iCurDisplayPage;
     CDesCArrayFlat* iCandidateArray;
-    MAknFepChineseUiMgr* iChineseUiMgr;
-    MAknFepUiStateCtrl* iFepUiState;
-    CAknFepUICtrlCandidateScroll* iCtrlScroll;
-    CAknFepPreview* iPreview;
-    TBool iPointDown;
+    TInt iOrdinalLableWidth;
     };
 
 #endif //__AKN_FEP_AVKON_CANDIDATE_PANE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlCandidateSelected.h	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,176 @@
+/*
+* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:           
+*       Provides the CAknFepUICtrlCandidateSelected definition.
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+
+#ifndef __AKN_FEP_CANDIDATE_SELECTED_PANE_H__
+#define __AKN_FEP_CANDIDATE_SELECTED_PANE_H__
+
+#include <e32std.h>
+#include <coecntrl.h>
+
+#include "AknFepUICtrlCandidatePane.h"
+
+class CEikLabel;
+
+/**
+ * Control representing the selected candidate. Is a window owning control,
+ * that appears over the candidate pane such that it obscures the labels
+ * beneath. Can be hidden, for example if there is no visible selection, 
+ * or if highlighting is disabled.
+ */
+NONSHARABLE_CLASS(CAknFepUICtrlCandidateSelected) : public CCoeControl
+    {
+public:
+    enum
+        {
+		EOneCandidate = 1,
+        EMaxSelectedCandidateLength = 10 // extend buffer for phrase input
+        };
+public:
+
+    /**
+     * first phase construction
+     */
+    static CAknFepUICtrlCandidateSelected* NewL(RWindowTreeNode& aParent);
+
+    /**
+     * destructor
+     */
+    ~CAknFepUICtrlCandidateSelected();
+
+    /**
+     * Set the text buffer of the Pane.
+     *
+     * @param aCharacter, the label will be filled with the characters from aCharacter
+     */
+    void SetText(TPtrC aCharacter);
+    
+    /**
+     * Set the ordinal of the Pane.
+     *
+     * @param aOrdinal
+     */
+    void SetOrdinal(TInt aOrdinal);
+
+    /**
+     * This function sets the candidate mode of the pane for rendering purposes.
+     *
+     * @param aMode the new mode
+     */
+    void SetCandidateMode(MAknFepUICtrlCandidatePane::TCandidateMode aMode);
+
+	/**
+	* Set layout
+	* @param aLayout the new layout
+	*/
+	void SetLayout(MAknFepUICtrlContainerChinese::TPaneLayout aLayout);
+	/**
+	* Set ordinal status
+	* @param aValue the new status
+	*/
+	void ShowOrdinal(TBool aValue);
+
+public: // from CCoeControl
+    /**
+     * size changed
+     */
+    virtual void SizeChanged();
+
+    /**
+     * count component controls
+     *
+     * @return number of contained controls
+     */
+    TInt CountComponentControls() const;
+
+    /**
+     * Component control
+     *
+     * @param aIndex the control to return, must be between 0 and the number of controls
+     * @return pointer to contained control, ownership is not passed
+     */
+    CCoeControl* ComponentControl(TInt aIndex) const;
+
+    /**
+     * draw
+     *
+     * @param aRect rectangle
+     */
+    virtual void Draw(const TRect& aRect) const;
+
+protected:
+    /**
+     * second phase construction
+     */
+    void ConstructL(RWindowTreeNode& aParent);
+
+     /**
+      * constructor
+      */
+    CAknFepUICtrlCandidateSelected();
+
+    /**
+     * layout the rectangles
+     */
+    void LayoutRects();
+
+    /**
+     * layout contained controls
+     */
+    void LayoutContainedControls();
+
+    /**
+     * layout the background frames
+     *
+     * @param aOuterRect filled with outer rect coords
+     * @param aInnerRect filled with inner rect coords
+     *
+     */
+    void CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const;
+
+    /**
+     * set label vilisibilty, according to the current pane layout
+     */
+    void UpdateLabelVisibility();
+
+private:
+    TAknLayoutRect iRectShadow;
+    TAknLayoutRect iRectHighlight;
+	TBufC<EMaxSelectedCandidateLength> iBuffer;
+    MAknFepUICtrlCandidatePane::TCandidateMode iCandidateMode;
+    TInt iIndex;
+    MAknFepUICtrlContainerChinese::TPaneLayout iPaneLayout;
+	TBool iShowOrdinal;
+private: // the following are owned
+    CEikLabel* iCandidateLabel;
+    CEikLabel* iOrdinalLabel;
+    };
+
+#endif //__AKN_FEP_CANDIDATE_SELECTED_PANE_H__
+
+// End of file
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlContainerChinese.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlContainerChinese.h	Wed Oct 13 14:55:58 2010 +0300
@@ -40,32 +40,6 @@
 class CAknFepUICtrlPinyinEEP;
 class MAknFepManagerUIInterface;
 class CAknFepUiLayoutDataMgr;
-class MCoeFocusObserver;
-class MAknFepUiStateCtrl;
-
-class MAknFepUIEventObserver
-	{
-public:
-    /**
-     * Click close pane to close
-     */
-	virtual void FepUIClosePressed() = 0;
-	};
-
-class MAknFepChineseUiMgr
-	{
-public:
-    /**
-     * Submit text
-     * @param aText committed text
-     */
-	virtual void SubmitSelectedTextL( const TDesC& aText ) = 0;
-	
-    /**
-     * Close container
-     */
-	virtual void CloseContainer() = 0;
-	};
 
 class MAknFepUICtrlPinyinPopupSizeChangedObserver
     {
@@ -81,8 +55,7 @@
     : 
     public CCoeControl, 
     public MAknFepUICtrlPinyinPopupSizeChangedObserver,
-    public MAknFepUICtrlContainerChinese,
-    public MAknFepChineseUiMgr
+    public MAknFepUICtrlContainerChinese
 {
 public:
     /**
@@ -218,31 +191,6 @@
      * @return if not enabled, return EFalse
      */
     void SetFepMan( MAknFepManagerUIInterface* aFepMan );
-    
-    /**
-     * Handle pointer event
-     * @param aPointerEvent pointer event
-     * 
-     */
-    void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-    
-    /**
-     * Set observer
-     * @param aObserver Obsever object
-     * 
-     */
-    void SetFepUiStateCtrl( MAknFepUiStateCtrl* aFepUiState );
-        
-    /**
-     * Submit text
-     * @param aText committed text
-     */
-    void SubmitSelectedTextL(const TDesC& aText);
-    
-    /**
-     * Close container
-     */
-    void CloseContainer();	
 
 public: // from CCoeControl
 
@@ -276,7 +224,6 @@
     virtual void Draw(const TRect& aRect) const;
 
     virtual void HandleResourceChange(TInt aType); 
-   
 	
 protected: // From CCoeControl
     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
@@ -364,12 +311,6 @@
      */
 	void CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const;    
 
-    /**
-     * Close UI
-	 *
-     */
-	void CloseUI();
-	
 private:
     CAknFepUiLayoutDataMgr* iLafDataMgr;
     CAknFepUICtrlInputPane* iInputPane;
@@ -377,8 +318,6 @@
 	CAknFepUICtrlPinyinPopup* iPinyinPopupWindow;
 	CAknFepUICtrlPinyinEEP* iEditPane;
 	CAknsFrameBackgroundControlContext* iBgContext; 
-	
-	
 
 private:
 	TBool iEnabled;
@@ -398,7 +337,6 @@
     
     TInt iPhraseCreation;
     MAknFepManagerUIInterface* iFepMan;
-    MAknFepUiStateCtrl* iFepUiState;
 };
 #endif  // __AKN_FEP_UI_AVKON_CONTAINER_CHINESE_H__
 
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlPinyinPopup.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlPinyinPopup.h	Wed Oct 13 14:55:58 2010 +0300
@@ -504,7 +504,10 @@
      * second phase construction
      */
     void ConstructL(RWindow& aParent);
-
+	/**
+     * Construct arrow bitmap class
+     */
+	void ConstructBitmapsL();
     /**
      * layout the rectangles
      */
@@ -588,8 +591,14 @@
     MAknFepUICtrlPinyinPopupSizeChangedObserver* iSizeChangedObserver;
 private: // the following are owned
     CAknsFrameBackgroundControlContext* iBgContext; 
+    CFbsBitmap* iNaviArrowBitmapLeft;
+    CFbsBitmap* iNaviArrowBitmapLeftMask;
+    CFbsBitmap* iNaviArrowBitmapRight;
+    CFbsBitmap* iNaviArrowBitmapRightMask;
 
 private:
+	TAknLayoutRect iIndiFepArrowLeft;
+    TAknLayoutRect iIndiFepArrowRight;
     TInt iSelected;
     TInt iEnabled;
     TToneMark iToneMark;
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/aknfepuilayoutdatamgr.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/aknfepuilayoutdatamgr.h	Wed Oct 13 14:55:58 2010 +0300
@@ -37,6 +37,13 @@
     ECandidatePaneWindowLine,
     EEEPWindowLayout,
     EEEPWindowRect,
+    ECandidatePaneTextLine,
+    EOrdinalCandidateTextLayout,
+    ECandidateWindowLine1,
+    ECandidateWindowLine2,
+    ECandidateWindowLine3,
+    ECandidateWindowLine4,
+    ELayoutCandidateItem,
     ELayoutEntryItem,
     ERectCoverMainPaneInputEntry,
     ERectFirstShadowInputEntry,
@@ -54,6 +61,8 @@
     ELayoutLineRectEntryPane,
     EEntryTextLayout,
     EEntryPaneRect,
+    EIndiFepArrowLeft,
+    EIndiFepArrowRight,   	
     ERectCoverMainPaneInput,
     ERectFirstShadowInput,
     ERectOutlineFrameInput,
@@ -66,23 +75,8 @@
     EEEPSecondHorizLine,
     EEntryHorizLineWindow,
     EEEPSecondHorizLineWindow,
-    EEEPFirstHorizLineWindow,
-    EECPLayout,
-    ECandidateLayout,
-    EECandidateLayout,
-    EEPCandidateLayout,
-    ECharacterLayout,
-    ECharacterTextLayout,
-    EPopupHeightEP,
-    EUpArrowLayout,
-    EDownArrowLayout,
-    ECloseLayout,
-    EScrollLayout,
-    EEntryCLayout,
-    EEntryCPLayout,
-    EECWindowLayout,
-    EInputLayout,
-    EInputTextLayout
+    EEEPFirstHorizLineWindow
+    
     };
 //class CAknFepUiLayoutDataMgr;
 /**
@@ -111,7 +105,7 @@
      * @return None.
      */
     void ReadLafInfo();
-
+    
     /**
      * Get LAF info 
      */
@@ -144,15 +138,21 @@
     TAknWindowLineLayout iCandidatePaneWindowLine;
     
     TAknWindowLineLayout iEEPWindowLayout;
-    TAknWindowLineLayout iECWindowLayout;
     TRect iEEPWindowRect;
-    TRect iECWindowRect;
     TRect iEntryPaneRect;
-
+    
+    TAknTextLineLayout iCandidatePaneTextLine;
+    TAknWindowLineLayout iCandidateWindowLine1;
+    TAknWindowLineLayout iCandidateWindowLine2;
+    TAknWindowLineLayout iCandidateWindowLine3;
+    TAknWindowLineLayout iCandidateWindowLine4;
+    TAknWindowLineLayout iLayoutCandidateItem;
     TAknWindowLineLayout iLayoutEntryItem;
-
+    
+    TAknTextLineLayout iOrdinalCandidateTextLayout;
     TAknTextLineLayout iEntryTextLayout;
     
+    //
     TAknLayoutRect iRectCoverMainPaneInputEntry;
     TAknLayoutRect iRectFirstShadowInputEntry;
     TAknLayoutRect iRectOutlineFrameInputEntry;
@@ -178,33 +178,17 @@
     TAknLayoutText iLayoutInputPaneText;
     TAknLayoutRect iLayoutLineRectEntryPane;
     
+	TAknLayoutRect iIndiFepArrowLeft;
+    TAknLayoutRect iIndiFepArrowRight;
+    
    	TAknLayoutRect iRectCoverMainPaneInput;
     TAknLayoutRect iRectFirstShadowInput;
     TAknLayoutRect iRectOutlineFrameInput;
     TAknLayoutRect iRectInsideAreaInput;
     
-    TAknWindowLineLayout iEntryWithCandidateAndPopUp;    
-    
-    TAknWindowLineLayout iCandidate;
-    TAknWindowLineLayout iECandidate;
-    TAknWindowLineLayout iEPCandidate;
-    TAknWindowLineLayout iCharacterLineLayout;
-    TAknTextLineLayout iCharacterTextLayout;
-    TAknWindowLineLayout iUpArrowLayout;
-    TAknWindowLineLayout iDownArrowLayout;
-    TAknWindowLineLayout iCloseLayout;
-    TAknWindowLineLayout iScrollLayout;
-    TAknWindowLineLayout iEntryCLayout;
-    TAknWindowLineLayout iEntryCPLayout;
-    
-    TAknTextLineLayout iInputTextLayout;
-    TAknWindowLineLayout iInputLayout;
-    
     TAknTextLineLayout iEEPTextLine;
     TInt iEEPCursorHeight;
     TRgb iEEPTextColor;
-    
-    TInt iPopupRectCandidateHeight;
     };
 
 #endif // C_PHRASECREATIONLAYOUTDATAMGR_H
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -779,14 +779,6 @@
     }
 
 /**
- *process the key events
- */
-TKeyResponse CAknFepPredictiveSettingDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
-	{
-	return iSettingsList->OfferKeyEventL(aKeyEvent, aType);
-	}
-    
-/**
  *From MEikCommandObserver
  */
 void CAknFepPredictiveSettingDialog::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane) 
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -79,15 +79,7 @@
                 {
                 underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
                 }
-            }        
-        else if (FeatureManager::FeatureSupported(KFeatureIdKorean))
-            {
-            // Use the special sct resource file for Korean variant.
-            if (!underlyingEditorSCTResId || underlyingEditorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
-                {
-                underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
-                }
-            }        
+            }
         else if (!underlyingEditorSCTResId)
             {
             underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidateCharacter.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:           
-*       Provides the CAknFepUICtrlCandidateCharacter methods.
-*
-*/
-
-
-
-
-
-
-
-
-
-
-
-#include <AknUtils.h>
-#include <AknsDrawUtils.h>
-#include <eiklabel.h>
-#include <skinlayout.cdl.h>
-#include <aknlayoutscalable_avkon.cdl.h>
-
-#include "AknFepUiInputStateBase.h"
-#include "AknFepUIAvkonCtrlCandidateCharacter.h"
-#include "AknFepUIAvkonCtrlPinyinPopup.h"
-#include "AknFepUiInterfacePanic.h"
-#include "AknFepUIAvkonCtrlCandidatePane.h"
-
-
-CAknFepUICtrlCandidateCharacter* CAknFepUICtrlCandidateCharacter::NewL( RWindowTreeNode& aParent,
-																		MAknFepUIEventObserver* aObserver )
-    {
-    CAknFepUICtrlCandidateCharacter* self = new(ELeave) CAknFepUICtrlCandidateCharacter;
-    CleanupStack::PushL(self);
-    self->ConstructL( aParent, aObserver );
-    CleanupStack::Pop();
-    return self;
-    }
-
-CAknFepUICtrlCandidateCharacter::~CAknFepUICtrlCandidateCharacter()
-    {
-    delete iCandidateLabel;
-    }
-
-const TDesC* CAknFepUICtrlCandidateCharacter::Text() const
-	{
-	return iCandidateLabel->Text();
-	}
-
-void CAknFepUICtrlCandidateCharacter::SetText( const TDesC& aCharacter )
-    {
-    // make sure that we only copy as many characters as we can show
-    TInt textLen = aCharacter.Length();
-    TInt textLength = textLen > EMaxSelectedCandidateLength? EMaxSelectedCandidateLength:textLen;
-    TPtrC newText = aCharacter.Left( textLength );
-    TPtr ptr = iBuffer.Des();
-    if ( ptr.Compare( newText ) != 0 )
-        {
-        ptr.Copy( newText );
-        
-        // ignore any errors... we have guaranteed that the descriptor already has sufficient characters to avoid a realloc
-        TRAP_IGNORE( iCandidateLabel->SetTextL( iBuffer )); 
-        }
-    }
-
-void CAknFepUICtrlCandidateCharacter::SizeChanged()
-    {
-    LayoutRects();
-    LayoutContainedControls();
-    }
-
-TInt CAknFepUICtrlCandidateCharacter::CountComponentControls() const
-    {
-    CCoeControl* controls[] = 
-        {
-        iCandidateLabel
-        } ;
-
-    TInt count = 0 ;
-    for ( TUint ii = 0; ii < ( sizeof(controls) / sizeof(CCoeControl*)) ;ii++ )
-    	{
-        if(controls[ii])
-        	{
-            count++;
-        	}
-    	}
-    return count ;
-    }
-
-CCoeControl* CAknFepUICtrlCandidateCharacter::ComponentControl( TInt aIndex ) const 
-    {
-    CCoeControl* controls[] = 
-        {
-        iCandidateLabel
-        } ;
-
-    for (TUint ii = 0; ( ii < sizeof(controls) / sizeof(CCoeControl*)); ii++ )
-    	{
-        if ( controls[ii] && aIndex-- == 0 )
-        	{
-            return controls[ii];
-        	}
-    	}
-    // shouldn't be called while no components.
-    return NULL ;
-    }
-
-void CAknFepUICtrlCandidateCharacter::Draw( const TRect& /*aRect*/ ) const
-    {
-    CWindowGc& gc = SystemGc();
-
-    TBool skinnedDraw = EFalse;
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    TRect outerRect;
-    TRect innerRect;
-    CalculateFrameRects( outerRect, innerRect );
-
-    // draw the whole frame background according to the containing context, which in this case
-    // is the candidate pane, to avoid corner drawing mess and to cope with masked grid frame centre
-    MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
-    
-    // Set highlight color to gray
-    if( iIsHighligt )
-    	{
-        
-        skinnedDraw = AknsDrawUtils::DrawFrame( skin, gc, outerRect, innerRect,
-												KAknsIIDQsnFrKeypadButtonFrPressed, 
-												KAknsIIDDefault ); 
-    	}
-    else
-    	{  
-
-		skinnedDraw = AknsDrawUtils::DrawFrame( skin, gc, outerRect, innerRect,
-												KAknsIIDQsnFrKeypadButtonFrNormal, 
-												KAknsIIDDefault );
-    	}
-
-    if ( !skinnedDraw )
-        {
-        iRectShadow.DrawRect( gc );
-        iRectHighlight.DrawRect( gc );
-        }
-    }
-
-void CAknFepUICtrlCandidateCharacter::ConstructL( RWindowTreeNode& aParent, MAknFepUIEventObserver* aObserver )
-    {
-    CreateWindowL( aParent );
-
-    iCandidateLabel = new(ELeave) CEikLabel;
-    iCandidateLabel->SetBufferReserveLengthL( EMaxSelectedCandidateLength ); // this will do a realloc now, so no need to later
-    iCandidateLabel->SetContainerWindowL( *this );
-	iCandidateLabel->SetLabelAlignment( ELayoutAlignCenter );
-    }
-
-CAknFepUICtrlCandidateCharacter::CAknFepUICtrlCandidateCharacter()
-    {
-    }
-
-void CAknFepUICtrlCandidateCharacter::LayoutRects()
-    {
-    TRect rect = Rect();
-    iRectShadow.LayoutRect( rect, AKN_LAYOUT_WINDOW_Candidate_selection_highlight_Line_1(rect));
-    iRectHighlight.LayoutRect( rect, AKN_LAYOUT_WINDOW_Candidate_selection_highlight_Line_2(rect));
-    iRectShadow.LayoutRect( rect, AknLayoutScalable_Avkon::cell_hyb_candi_pane_g1( 0 ));
-    }
-
-
-void CAknFepUICtrlCandidateCharacter::LayoutContainedControls()
-    {
-    TRect rect = Rect();
- 
-    TAknTextLineLayout candidateLayout = AknLayoutScalable_Avkon::cell_hyb_candi_pane_t1(0);
-        
-    TAknLayoutText layoutText;
-    layoutText.LayoutText( rect, candidateLayout );
-    TRect rectText = layoutText.TextRect();
-    const CFont* font = layoutText.Font();
-
-    iCandidateLabel->SetRect( rectText );
-    iCandidateLabel->SetFont( font );
-
-    // override with skin text color
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    TRgb labelTextColor;
-
-    AknsUtils::GetCachedColor( skin, labelTextColor, 
-                               KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 );
-
-    TRAP_IGNORE( 
-	    iCandidateLabel->OverrideColorL(EColorLabelText, labelTextColor);	   
-	    );
-    }
-
-void CAknFepUICtrlCandidateCharacter::CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const
-    {
-    TRect windowRect = Rect();
-
-    TAknLayoutRect topLeft;
-    topLeft.LayoutRect( windowRect, SkinLayout::Highlight_skin_placing__grid__Line_2());
-
-    TAknLayoutRect bottomRight;
-    bottomRight.LayoutRect( windowRect, SkinLayout::Highlight_skin_placing__grid__Line_5());
-
-    aOuterRect = TRect( topLeft.Rect().iTl, bottomRight.Rect().iBr );
-    aInnerRect = TRect( topLeft.Rect().iBr, bottomRight.Rect().iTl );
-    }
-
-void CAknFepUICtrlCandidateCharacter::SetHighlight( TBool bHighlight )
-	{
-	iIsHighligt = bHighlight;
-	DrawDeferred();
-	}
-
-// End of file
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidatePane.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidatePane.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -35,31 +35,24 @@
 #include <AknBidiTextUtils.h> 
 #include <AknsUtils.h>
 #include <AknIconUtils.h>
-#include <coecntrl.h>
+
 #include <aknfepuictrls.mbg>
-#include <skinlayout.cdl.h>
-#include <aknlayoutscalable_avkon.cdl.h>
-
 #include "AknFepUiInterfacePanic.h"
 #include "AknFepUIAvkonCtrlCandidatePane.h"
+#include "AknFepUIAvkonCtrlCandidateSelected.h"
 #include "aknfepchineseuidataconv.h"
 #include "aknfepuilayoutdatamgr.h"
-#include "AknFepUiInputStateBase.h"
-#include "AknFepUIAvkonCtrlCandidateCharacter.h"
+
+
 #include "data_caging_path_literals.hrh"
 
 const TInt CandidateCountLeft = 10;
-const TInt DibertHeight = 480;
-const TInt ShowAboveCharacter = -1;
-const TInt ShowBellowCharacter = 1;
 
 _LIT(KFepUiControlsBitmapFile, "aknfepuictrls.mbm");
 
-CAknFepUICtrlCandidatePane* CAknFepUICtrlCandidatePane::NewL( RWindow& aParent, 
-															  CAknFepUiLayoutDataMgr* aLafDataMgr, 
-															  MAknFepChineseUiMgr* aMgr )
+CAknFepUICtrlCandidatePane* CAknFepUICtrlCandidatePane::NewL(RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr)
     {
-    CAknFepUICtrlCandidatePane* self = new(ELeave) CAknFepUICtrlCandidatePane( aLafDataMgr, aMgr );
+    CAknFepUICtrlCandidatePane* self = new(ELeave) CAknFepUICtrlCandidatePane( aLafDataMgr );
     CleanupStack::PushL(self);
     self->ConstructL(aParent);
     CleanupStack::Pop();
@@ -68,14 +61,22 @@
 
 CAknFepUICtrlCandidatePane::~CAknFepUICtrlCandidatePane()
     {
-    delete iCtrlScroll;
-    delete iPreview;
+    delete iCandidateSelected;
+    delete iNaviArrowBitmapLeft;
+    delete iNaviArrowBitmapLeftMask;
+    delete iNaviArrowBitmapRight;
+    delete iNaviArrowBitmapRightMask;
+    delete iNaviArrowBitmapUp;
+    delete iNaviArrowBitmapUpMask;
+    delete iNaviArrowBitmapDown;
+    delete iNaviArrowBitmapDownMask;
     if(iCandidateArray)
     	{
     	iCandidateArray->Reset();
 		delete iCandidateArray;
     	}
     iCandidateLabelArray.ResetAndDestroy();
+    iOrdinalLabelArray.ResetAndDestroy();
     iCandidateModeArray.Reset();
     iPages.Reset();
     }
@@ -98,7 +99,7 @@
         // as far as the client is concerned, they have removed the character that was selected
         // therefore we must now hide the selected candidate, although the highlighting
         // state remains unchanged
-		iCandidateLabelArray[iSelected]->SetHighlight( EFalse );
+        iCandidateSelected->MakeVisible(EFalse);
         }
     else
         {
@@ -107,7 +108,7 @@
             // make sure that the candidate is visible, as the selection is now
             // within a visible range (it might have been hidden last time
             // the buffer was set)
-			iCandidateLabelArray[iSelected]->SetHighlight( ETrue );
+            iCandidateSelected->MakeVisible(ETrue);
             }
         }
 
@@ -131,12 +132,27 @@
             if(valueChanged)
                 {
                 // we have already allocated enough memory for this
-				CAknFepUICtrlCandidateCharacter* candidateLabel = iCandidateLabelArray[i];
-                candidateLabel->SetText( newChar );
+                CEikLabel* candidateLabel = iCandidateLabelArray[i];
+                TRAP_IGNORE(candidateLabel->SetTextL(newChar));
+
+                // need to update the character if it is in the current selected candidate
+                if(i == iSelected)
+                    {
+                    iCandidateSelected->SetText(newChar);
+                    iCandidateSelected->SetOrdinal(i + 1);
+                    DrawDeferred();
+                    }
+                if(i < iVisibleCount)
+                    {
+                    // only redraw characters that are visible
+                    TRect rect = candidateLabel->Rect();
+                    Window().Invalidate(rect);
+                    }
                 }
             }
         ptr.Copy(newText);
         LayoutLabels();
+        LayoutCandidateSelected();
         iVisibleCount = newLength;
         UpdateLabelVisibility();
         }
@@ -158,13 +174,13 @@
 
     if(iVisibleCount - 1 < iSelected)
         {
-		iCandidateLabelArray[iSelected]->SetHighlight( EFalse );
+        iCandidateSelected->MakeVisible(EFalse);
         }
     else
         {
         if(iHighlighted)
             {
-			iCandidateLabelArray[iSelected]->SetHighlight( ETrue );
+            iCandidateSelected->MakeVisible(ETrue);
             }
         }
 
@@ -173,24 +189,32 @@
 
     for(TInt i = 0; i < iVisibleCount; i ++)
         {
-		CAknFepUICtrlCandidateCharacter* candidateLabel = iCandidateLabelArray[i];
+        CEikLabel* candidateLabel = iCandidateLabelArray[i];
         const TDesC* txtLabel = candidateLabel->Text();
         newText = (*iCandidateArray)[curPage.iStartIndex + i];
 
-        if (( txtLabel->Compare(newText) != 0 ))
+        if((txtLabel->Compare(newText) != 0) )
             {
             // we have already allocated enough memory for this
-            TRAP_IGNORE( candidateLabel->SetText( newText ));
+            TRAP_IGNORE( candidateLabel->SetTextL(newText));
             }
-
-        if ( i < iVisibleCount )
-            {
-            // only redraw labels that are visible
-            TRect rect = candidateLabel->Rect();
-            Window().Invalidate( rect );
+            
+            // need to update the character if it is in the current selected candidate
+            if(i == iSelected)
+                {
+                iCandidateSelected->SetText(newText);
+                iCandidateSelected->SetOrdinal(i + 1);
+                DrawDeferred();
+                }
+            if(i < iVisibleCount)
+                {
+                // only redraw labels that are visible
+                TRect rect = candidateLabel->Rect();
+                Window().Invalidate(rect);
             }
         }
     LayoutLabels();
+    LayoutCandidateSelected();
     DrawDeferred();
     UpdateLabelVisibility();
     }
@@ -200,7 +224,9 @@
     if(!COMPARE_BOOLS(iHighlighted, aHighlighted))
         {
         iHighlighted = aHighlighted;
-        iCandidateLabelArray[iSelected]->SetHighlight( aHighlighted );
+        iCandidateSelected->MakeVisible(aHighlighted);
+
+        iCandidateSelected->DrawDeferred();
         }
     }
 
@@ -218,17 +244,21 @@
     if(oldMode != aMode)
         {
         iCandidateModeArray[aIndex] = aMode;
-        
+        if(iSelected == aIndex)
+            {
+            LayoutCandidateSelected();
+            }
         // only do drawing if visible
         if(aIndex < iVisibleCount)
             {
             LayoutLabel(aIndex);
             if(iSelected == aIndex && iHighlighted)
                 {
+                iCandidateSelected->DrawDeferred();
                 }
             else
                 {
-				CAknFepUICtrlCandidateCharacter* candidateLabel = iCandidateLabelArray[aIndex];
+                CEikLabel* candidateLabel = iCandidateLabelArray[aIndex];
                 TRect rect = candidateLabel->Rect();
                 Window().Invalidate(rect);
                 }
@@ -248,41 +278,89 @@
 
 void CAknFepUICtrlCandidatePane::ShowHorizontalScrollArrows(TBool /*aValue*/)
     {
-    // Left & right arrow are not need, so do nothing.
+    // If the state is changed, the arrows will be redrawn in the new state.
+    //    if(!COMPARE_BOOLS(iShowHorizontalScrollArrows, aValue))
+    //        {
+    //        iShowHorizontalScrollArrows = aValue;
+    //        TRect rect = iIndiFepArrowLeft.Rect();
+    //        Window().Invalidate(rect);
+    //        rect = iIndiFepArrowRight.Rect();
+    //        Window().Invalidate(rect);
+    //        }
     }
 
 void CAknFepUICtrlCandidatePane::ShowUpScrollArrows(TBool aValue)
     {
-	// call function of scroll pane to show/hide up arrow.
-	iCtrlScroll->ShowUpScrollArrows( aValue );
+    if (iShowUpScrollArrows != aValue)
+        {
+        iShowUpScrollArrows = aValue;
+        TRect rect = iIndiFepArrowUp.Rect();
+        Window().Invalidate(rect);
+        }
     }
     
 void CAknFepUICtrlCandidatePane::ShowDownScrollArrows(TBool aValue)
     {
-	// call function of scroll pane to show/hide down arrow.
-	iCtrlScroll->ShowDownScrollArrows( aValue );
+    if (iShowDownScrollArrows != aValue)
+        {
+        iShowDownScrollArrows = aValue;
+        TRect rect = iIndiFepArrowDown.Rect();
+        Window().Invalidate(rect);
+        }
+        
     }
     
 void CAknFepUICtrlCandidatePane::ShowLeftScrollArrows(TBool /*aValue*/)
     {
-	// Left arrow is not need, so do nothing.
+    //    if (iShowLeftScrollArrows != aValue)
+    //        {
+    //        iShowLeftScrollArrows = aValue;
+    //        TRect rect = iIndiFepArrowLeft.Rect();
+    //        Window().Invalidate(rect);
+    //        }
     }
         
 void CAknFepUICtrlCandidatePane::ShowRightScrollArrows(TBool /*aValue*/)
     {
-	// Right arrow is not need, so do nothing.
+    //    if (iShowRightScrollArrows != aValue)
+    //        {
+    //        iShowRightScrollArrows = aValue;
+    //        TRect rect = iIndiFepArrowRight.Rect();
+    //        Window().Invalidate(rect);
+    //        }
     }
 
 TBool CAknFepUICtrlCandidatePane::IsShowVerticalScrollArrows() const
     {
-	// call function of scroll pane to get scroll state
-    return iCtrlScroll->IsShowVerticalScrollArrows();
+    return iShowVerticalScrollArrows;
     }
 
 void CAknFepUICtrlCandidatePane::ShowVerticalScrollArrows(TBool aValue)
     {
-	// call function of scroll pane to set scroll state
-	iCtrlScroll->ShowVerticalScrollArrows( aValue );
+    // If the state is changed, the arrows will be redrawn in the new state.
+    if(!COMPARE_BOOLS(iShowVerticalScrollArrows, aValue))
+        {
+        iShowVerticalScrollArrows = aValue;
+        TRect rect = iIndiFepArrowUp.Rect();
+        Window().Invalidate(rect);
+        rect = iIndiFepArrowDown.Rect();
+        Window().Invalidate(rect);
+        }
+    }
+
+void CAknFepUICtrlCandidatePane::ShowCandidateOrdinals(TBool aValue)
+    {
+    if(!COMPARE_BOOLS(iShowCandidateOrdinals, aValue))
+        {
+        iShowCandidateOrdinals = aValue;
+        iCandidateSelected->ShowOrdinal(aValue);
+        UpdateLabelVisibility();
+        }
+    }
+
+TBool CAknFepUICtrlCandidatePane::IsShowCandidateOrdinals() const
+    {
+    return iShowCandidateOrdinals;
     }
 
 TInt CAknFepUICtrlCandidatePane::VisibleCandidateCount() const
@@ -363,10 +441,6 @@
         {
         return SelectIndex(iSelected + 1);
         }
-    else if( iSelected == iVisibleCount - 1 )
-    	{
-		return SelectIndex(0);
-    	}
     else
         {
         return EFalse;
@@ -379,35 +453,41 @@
         {
         return SelectIndex(iSelected - 1);
         }
-    else if( iSelected == 0 )
-    	{
-        return SelectIndex( iVisibleCount - 1 );
-        }
     else
         {
         return EFalse;
         }
     }
 
-TBool CAknFepUICtrlCandidatePane::SelectIndex(TInt aIndex, TBool /*selected*/ )
+TBool CAknFepUICtrlCandidatePane::SelectIndex(TInt aIndex, TBool selected)
     {
-    if( aIndex + 1 > iVisibleCount || aIndex < 0 )
+    if(aIndex + 1 > iVisibleCount || aIndex < 0)
         {
         return EFalse;
         }
+    if(iSelected != aIndex)
+        {
+        if(iSelected + 1 > iVisibleCount && iHighlighted)
+            {
+            // candidate selection is currently hidden, as the current 
+            // selection is outside the range of valid candidates, therefore 
+            // show it again
+            iCandidateSelected->MakeVisible(ETrue);
+            }
+        iSelected = aIndex;
+        // move and repopulate the selected candidate control
+        const TDesC* txtLabel = iCandidateLabelArray[aIndex]->Text();
+        iCandidateSelected->SetText(*txtLabel);
+        iCandidateSelected->SetOrdinal(iSelected + 1);
+        
+        LayoutCandidateSelected();
+        if( selected )
+           {
 
-    if ( iSelected != aIndex )
-    	{
-		iCandidateLabelArray[iSelected]->SetHighlight( EFalse );
-    	}
-    
-    if ( iPointDown || iHighlighted )
-    	{
-		iCandidateLabelArray[aIndex]->SetHighlight( ETrue );
-		
-    	}
-        iSelected = aIndex;
-
+           DrawDeferred();
+           }
+        
+		}
     return ETrue;
     }
 
@@ -446,7 +526,7 @@
     {
     TAknLayoutText layoutText;
     TAknTextLineLayout candidatePaneLayoutText = 
-        CAknFepChineseUIDataConv::AnyToTextLine(iLafDataMgr->RequestData( ECharacterTextLayout ));
+        CAknFepChineseUIDataConv::AnyToTextLine(iLafDataMgr->RequestData( ECandidatePaneTextLine ));
        
     layoutText.LayoutText(Rect(), candidatePaneLayoutText);
 
@@ -509,7 +589,6 @@
     // the previous page of the last page. And then select the last character of 
     // the previous page of the last page, and select next page. First of the last 
     // page is not refreshed.
-    iCandidateLabelArray[iSelected]->SetHighlight( EFalse );
     iSelected = 0;
     }
 
@@ -527,6 +606,7 @@
 
 void CAknFepUICtrlCandidatePane::SizeChanged()
     {
+    LayoutRects();
     LayoutContainedControls();
     }
 
@@ -534,11 +614,11 @@
     {
     TInt count = 0;
     count += iCandidateLabelArray.Count();
+    count += iOrdinalLabelArray.Count();
 
     CCoeControl* controls[] =
         {
-        iCtrlScroll,
-        iPreview
+        iCandidateSelected
         } ;
 
     for (TUint ii = 0 ; ii < (sizeof(controls) / sizeof(CCoeControl*)) ; ii++)
@@ -554,21 +634,29 @@
 CCoeControl* CAknFepUICtrlCandidatePane::ComponentControl(TInt aIndex) const
     {
     TInt candidateCount = iCandidateLabelArray.Count();
+    TInt ordinalCount = iOrdinalLabelArray.Count();
 
     if(aIndex < candidateCount)
         {
         // because this method is const, the const [] operator is selected
         // which means that the pointer is const, so have to cast away constness
         // - a possible alternative is to make the array mutable?
-        return CONST_CAST(CAknFepUICtrlCandidateCharacter*, iCandidateLabelArray[aIndex]);
+        return CONST_CAST(CEikLabel*, iCandidateLabelArray[aIndex]);
         }
     aIndex -= candidateCount;
 
+    if(aIndex < ordinalCount)
+        {
+        // because this method is const, the const [] operator is selected
+        // which means that the pointer is const, so have to cast away constness
+        // - a possible alternative is to make the array mutable?
+        return CONST_CAST(CEikLabel*, iOrdinalLabelArray[aIndex]);
+        }
+    aIndex -= ordinalCount;
+
     CCoeControl* controls[] =
         {
-       // iCandidateSelected,
-        iCtrlScroll,
-        iPreview
+        iCandidateSelected
         } ;
 
     for (TUint ii = 0; (ii < sizeof(controls) / sizeof(CCoeControl*)) ; ii++)
@@ -582,48 +670,182 @@
     return NULL ;
     }
 
+void CAknFepUICtrlCandidatePane::Draw(const TRect& /* aRect */) const
+    {
+    CWindowGc& gc = SystemGc();
+
+    if(iShowHorizontalScrollArrows)
+        {
+        if (iShowLeftScrollArrows)
+            {
+            iIndiFepArrowLeft.DrawImage(gc, 
+                                        iNaviArrowBitmapLeft, 
+                                        iNaviArrowBitmapLeftMask);     
+            }
+        
+        if (iShowRightScrollArrows)
+            {
+            iIndiFepArrowRight.DrawImage(gc, 
+                                         iNaviArrowBitmapRight, 
+                                         iNaviArrowBitmapRightMask);
+            }
+        }
+    if(iShowVerticalScrollArrows)
+        {
+        if (iShowUpScrollArrows)
+            {
+            iIndiFepArrowUp.DrawImage(gc,
+                                      iNaviArrowBitmapUp, 
+                                      iNaviArrowBitmapUpMask);
+            }
+            
+        if (iShowDownScrollArrows)
+            {
+            iIndiFepArrowDown.DrawImage(gc, 
+                                        iNaviArrowBitmapDown, 
+                                        iNaviArrowBitmapDownMask);
+            }
+        }
+    }
+
 void CAknFepUICtrlCandidatePane::ConstructL(RWindow& aParent)
     {
     SetContainerWindowL(aParent);
+    ConstructBitmapsL();
 
     TBuf<EOneCandidate> ordinal;
     for(TInt i = 0; i < EMaxCandidates; i++)
         {
-        CAknFepUICtrlCandidateCharacter* candidateLabel = CAknFepUICtrlCandidateCharacter::NewL( aParent, this );
+        CEikLabel* candidateLabel = new(ELeave) CEikLabel;
         CleanupStack::PushL(candidateLabel);
         candidateLabel->SetContainerWindowL(aParent);
+        candidateLabel->SetBufferReserveLengthL(EPhraseLength);
         // ownership is passed, unless allocation is unsuccessful, in which case we still have it on the stack
         User::LeaveIfError(iCandidateLabelArray.Append(candidateLabel));
         CleanupStack::Pop(); // candidateLabel
 
+        CEikLabel* ordinalLabel = new(ELeave) CEikLabel;
+        CleanupStack::PushL(ordinalLabel);
+        ordinalLabel->SetContainerWindowL(aParent);
+        ordinalLabel->SetBufferReserveLengthL(EOneCandidate);
+        ordinal.Num((i+1)%10); // digits are [1, 2,,, 9, 0] - only want the last digit in the case of 10!
+        ordinalLabel->SetTextL(ordinal);
+        // ownership is passed, unless allocation is unsuccessful, in which case we still have it on the stack
+        User::LeaveIfError(iOrdinalLabelArray.Append(ordinalLabel));
+        CleanupStack::Pop(); // ordinalLabel
+
         User::LeaveIfError(iCandidateModeArray.Append(ECandidateModeNormal));
         }
 
+    iCandidateSelected = CAknFepUICtrlCandidateSelected::NewL(aParent);
+    iCandidateSelected->MakeVisible(iHighlighted);
+    iCandidateSelected->SetMopParent(this);
     iCandidateArray = new(ELeave) CDesCArrayFlat(1);
-    
-    // scroll part
-    iCtrlScroll = CAknFepUICtrlCandidateScroll::NewL( aParent, this );
-    iCtrlScroll->SetMopParent(this);
-    
-    // character preview
-    iPreview = CAknFepPreview::NewL( aParent );
     }
 
-CAknFepUICtrlCandidatePane::CAknFepUICtrlCandidatePane(CAknFepUiLayoutDataMgr* aLafDataMgr, MAknFepChineseUiMgr* aMgr )
+void CAknFepUICtrlCandidatePane::ConstructBitmapsL()
+    {    
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();  
+    
+    TFileName bmpFile;
+    bmpFile.Copy(_L("z:"));
+    bmpFile.Append(KDC_BITMAP_DIR);
+    bmpFile.Append(KFepUiControlsBitmapFile);  
+
+    AknsUtils::CreateColorIconL( skin,
+                                 KAknsIIDQgnIndiFepArrowLeft,
+                                 KAknsIIDQsnIconColors,
+                                 EAknsCIQsnIconColorsCG20,
+                                 iNaviArrowBitmapLeft,
+                                 iNaviArrowBitmapLeftMask,
+                                 bmpFile,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_left,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_left_mask,
+                                 AKN_LAF_COLOR( 0 )
+                             );    
+    AknsUtils::CreateColorIconL( skin,
+                                 KAknsIIDQgnIndiFepArrowRight,
+                                 KAknsIIDQsnIconColors,
+                                 EAknsCIQsnIconColorsCG20,
+                                 iNaviArrowBitmapRight,
+                                 iNaviArrowBitmapRightMask,
+                                 bmpFile,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_right,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_right_mask,
+                                 AKN_LAF_COLOR( 0 )
+                             );    
+
+    AknsUtils::CreateColorIconL( skin,
+                                 KAknsIIDQgnIndiFepArrowUp,
+                                 KAknsIIDQsnIconColors,
+                                 EAknsCIQsnIconColorsCG20,
+                                 iNaviArrowBitmapUp,
+                                 iNaviArrowBitmapUpMask,
+                                 bmpFile,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_up,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_up_mask,
+                                 AKN_LAF_COLOR( 0 )
+                             );    
+    AknsUtils::CreateColorIconL( skin,
+                                 KAknsIIDQgnIndiFepArrowDown,
+                                 KAknsIIDQsnIconColors,
+                                 EAknsCIQsnIconColorsCG20,
+                                 iNaviArrowBitmapDown,
+                                 iNaviArrowBitmapDownMask,
+                                 bmpFile,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_down,
+                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_down_mask,
+                                 AKN_LAF_COLOR( 0 )
+                             );    
+    }
+
+CAknFepUICtrlCandidatePane::CAknFepUICtrlCandidatePane(CAknFepUiLayoutDataMgr* aLafDataMgr)
     :
     iPaneLayout(CAknFepUICtrlContainerChinese::ELayoutCandidate),
     iHighlighted(EFalse),
+    iShowHorizontalScrollArrows(EFalse),
+    iShowVerticalScrollArrows(EFalse),
+    iShowUpScrollArrows(ETrue),
+    iShowDownScrollArrows(ETrue),
+    iShowLeftScrollArrows(ETrue),
+    iShowRightScrollArrows(ETrue),
+    iShowCandidateOrdinals(ETrue),
     iCurDisplayPage(0),
-    iChineseUiMgr(aMgr),
-    iPointDown( EFalse )
+    iOrdinalLableWidth(0)
     {
     iLafDataMgr = aLafDataMgr;
     }
 
+void CAknFepUICtrlCandidatePane::LayoutRects()
+    {
+    TRect rect = Rect();
+    
+    TAknWindowLineLayout candidateWindowLine1 = 
+      CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ECandidateWindowLine1));
+    TAknWindowLineLayout candidateWindowLine2 = 
+      CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ECandidateWindowLine2));
+    TAknWindowLineLayout candidateWindowLine3 = 
+      CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ECandidateWindowLine3));
+    TAknWindowLineLayout candidateWindowLine4 = 
+      CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ECandidateWindowLine4));
+
+    iIndiFepArrowLeft.LayoutRect(rect, candidateWindowLine1); 
+    AknIconUtils::SetSize(iNaviArrowBitmapLeft, iIndiFepArrowLeft.Rect().Size());
+
+    iIndiFepArrowRight.LayoutRect(rect, candidateWindowLine2); 
+    AknIconUtils::SetSize(iNaviArrowBitmapRight, iIndiFepArrowRight.Rect().Size());
+
+    iIndiFepArrowUp.LayoutRect(rect, candidateWindowLine3);
+    AknIconUtils::SetSize(iNaviArrowBitmapUp, iIndiFepArrowUp.Rect().Size());
+
+    iIndiFepArrowDown.LayoutRect(rect, candidateWindowLine4);
+    AknIconUtils::SetSize( iNaviArrowBitmapDown, iIndiFepArrowDown.Rect().Size() );
+    }
+
 void CAknFepUICtrlCandidatePane::LayoutContainedControls()
     {
     LayoutLabels();
-    LayoutScroll();
+    LayoutCandidateSelected();
     }
 
 void CAknFepUICtrlCandidatePane::LayoutLabel(TInt aIndex)
@@ -631,43 +853,80 @@
     __ASSERT_DEBUG(aIndex >= 0, AknFepUiInterfacePanic(EAknFepUiInterfacePanicAttemptedLayoutOutsideVisibleCount));
     __ASSERT_DEBUG(aIndex < iVisibleCount, AknFepUiInterfacePanic(EAknFepUiInterfacePanicAttemptedLayoutOutsideVisibleCount));
     TRect rect = Rect();
-    CAknFepUICtrlCandidateCharacter* candidateLabel = iCandidateLabelArray[aIndex];
+    CEikLabel* candidateLabel = iCandidateLabelArray[aIndex];
+    CEikLabel* ordinalLabel = iOrdinalLabelArray[aIndex];
     TAknWindowLineLayout layoutCandidateItem = 
-        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ECharacterLayout));
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutCandidateItem));
     TAknTextLineLayout candidateLayout = 
-        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(ECharacterTextLayout));
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(ECandidatePaneTextLine));
     
     // layout candidate label
     TAknLayoutRect layoutRectCandidateItem;
-    layoutRectCandidateItem.LayoutRect( rect,layoutCandidateItem );
+    layoutRectCandidateItem.LayoutRect(rect,layoutCandidateItem);
     TRect rectCandidateItem = layoutRectCandidateItem.Rect();
-    if ( aIndex > 0 )
+    
+    if(aIndex > 0)
 	    {
 	    rectCandidateItem.iTl.iX = iCandidateLabelArray[aIndex - 1]->Rect().iBr.iX;
         }
+    TAknLayoutText layoutText;
+    layoutText.LayoutText(rectCandidateItem,candidateLayout);
+    TRect rectText = layoutText.TextRect();
+    rectText.SetWidth(LabelTextWidthInPixels(aIndex));
 
-    TAknLayoutText layoutText;
-    layoutText.LayoutText( rectCandidateItem, candidateLayout );
-    TInt interval = candidateLayout.il + candidateLayout.ir;
+    candidateLabel->SetRect(rectText);
+    candidateLabel->SetFont(layoutText.Font());
 
-    TInt width = LabelTextWidthInPixels( aIndex );
-    TInt minwidth = layoutRectCandidateItem.Rect().Width() - interval ;    
-    if ( width < minwidth )
-    	{
-		width = minwidth;
-    	}    
-    rectCandidateItem.SetWidth( width + interval );
-    candidateLabel->SetRect( rectCandidateItem );
+    // layout ordinal label
+    TAknTextLineLayout ordinalLayout = 
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EOrdinalCandidateTextLayout));
+    TBufC16<1> buf;
+    TAknLayoutText layoutOrdinal;
+    TPtr16 ptr = buf.Des();
+    ptr = (*(ordinalLabel->Text())).Left(EOneCandidate);
+    
+    layoutOrdinal.LayoutText(rectCandidateItem,ordinalLayout);
+    
+    const CFont* font = layoutOrdinal.Font();
+    
+    TRect rectOrdinal = layoutOrdinal.TextRect();
+    // align ordinal label and candidate label 
+    
+    /* removed in 2006.03.29
+    rectOrdinal.iTl.iY = rectText.iTl.iY;
+    rectOrdinal.SetWidth(font->TextWidthInPixels(ptr));
+    rectOrdinal.SetHeight(font->HeightInPixels());
+    */
+    
+    // inserted in 2006.03.29
+    TPoint ordinalPosition;
+    TInt ordinalWidth = font->TextWidthInPixels(ptr);
+    ordinalPosition.iX = rectText.iTl.iX - ordinalWidth;
+    ordinalPosition.iY = rectText.iTl.iY;
+    
+    rectOrdinal = TRect(ordinalPosition,
+                        TPoint(ordinalPosition.iX + rectOrdinal.Width(),
+                               ordinalPosition.iY + rectOrdinal.Height()));
+    // end inserting                               
+
+    ordinalLabel->SetRect(rectOrdinal);
+    ordinalLabel->SetFont(font);
+    iOrdinalLableWidth = rectOrdinal.Width();
 
     // override colours if skin data present
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     TRgb candidateLabelTextColor = layoutText.Color();
+    TRgb ordinalLabelTextColor = layoutOrdinal.Color();
 
     AknsUtils::GetCachedColor(skin, candidateLabelTextColor, 
                               KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19);
 
+    AknsUtils::GetCachedColor(skin, ordinalLabelTextColor,
+        KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19);
+
     TRAP_IGNORE(
         candidateLabel->OverrideColorL(EColorLabelText, candidateLabelTextColor);
+        ordinalLabel->OverrideColorL(EColorLabelText, ordinalLabelTextColor);
         );
     }
 
@@ -678,10 +937,32 @@
         LayoutLabel(i);
         }
     }
-void CAknFepUICtrlCandidatePane::LayoutScroll()
+
+void CAknFepUICtrlCandidatePane::LayoutCandidateSelected()
     {
-    TAknWindowLineLayout scrolllayout =  CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(EScrollLayout));
-    AknLayoutUtils::LayoutControl( iCtrlScroll, Rect(), scrolllayout );
+    TCandidateMode candidateMode = iCandidateModeArray[iSelected];
+    iCandidateSelected->SetCandidateMode(candidateMode);
+    iCandidateSelected->SetLayout(iPaneLayout);
+
+    TRect ordinalRect = iOrdinalLabelArray[iSelected]->Rect();
+
+    TAknLayoutRect layoutRect;
+    TAknWindowLineLayout layoutCandidateItem = 
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutCandidateItem));
+    layoutRect.LayoutRect(Rect(),layoutCandidateItem);
+    
+    TRect rectLayoutCandidateItem = layoutRect.Rect();
+    rectLayoutCandidateItem.iTl.iX = ordinalRect.iTl.iX;
+
+    TAknTextLineLayout candidateLayout = 
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(ECandidatePaneTextLine));
+    TAknTextLineLayout ordinalLayout = 
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EOrdinalCandidateTextLayout));
+    rectLayoutCandidateItem.SetWidth(iCandidateLabelArray[iSelected]->Rect().Width() + candidateLayout.il - ordinalLayout.il);
+
+    rectLayoutCandidateItem.SetHeight(rectLayoutCandidateItem.Height() - 1);
+    
+    iCandidateSelected->SetRect(rectLayoutCandidateItem);
     }
 
 void CAknFepUICtrlCandidatePane::UpdateLabelVisibility()
@@ -703,14 +984,17 @@
         }
     for(TInt i = 0; i < EMaxCandidates; i++)
         {
-        CAknFepUICtrlCandidateCharacter* candidateLabel = iCandidateLabelArray[i];
+        CEikLabel* candidateLabel = iCandidateLabelArray[i];
+        CEikLabel* ordinalLabel = iOrdinalLabelArray[i];
         if(i < number)
             {
             candidateLabel->MakeVisible(ETrue);
+            ordinalLabel->MakeVisible(iShowCandidateOrdinals); // only show if needed
             }
         else
             {
             candidateLabel->MakeVisible(EFalse);
+            ordinalLabel->MakeVisible(EFalse); // don't show it as there is no character to go with it
             }
         }
     }
@@ -743,7 +1027,7 @@
         
     TPage curPage;
     TInt index = iUnpagedIndex;
-    CAknFepUICtrlCandidateCharacter* candidateLabel;
+    CEikLabel* candidateLabel;
     
     curPage.iStartIndex = index;
     curPage.iEndIndex = index;
@@ -751,24 +1035,23 @@
                             EMaxCandidates : phraseCandidateNum - index;
 
     TAknWindowLineLayout layoutCandidateItem = 
-        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ECharacterLayout));
-    TAknWindowLineLayout candidateRect = 
-        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(EScrollLayout));
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutCandidateItem));
+    TAknTextLineLayout candidateLayout = 
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(ECandidatePaneTextLine));
     
-    TAknTextLineLayout candidateLayout = 
-        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(ECharacterTextLayout));
-    
-    TInt interval = candidateLayout.il + candidateLayout.ir;
     // avoid accessing layout data member
     TAknLayoutRect layoutRect;
     layoutRect.LayoutRect(Rect(),layoutCandidateItem);
     TRect rectLayoutCandidateItem = layoutRect.Rect();
+
     TAknLayoutText layoutText;
     layoutText.LayoutText(rectLayoutCandidateItem,candidateLayout);
-    TRect rectText = Rect();  
-    TInt distance = rectText.iTl.iX - rectLayoutCandidateItem.iTl.iX + rectText.iBr.iX - rectLayoutCandidateItem.iBr.iX;
-    rectLayoutCandidateItem.iBr.iX += distance - candidateRect.iW;
+    TRect rectText = layoutText.TextRect();
+            
+    TInt distance = rectText.iTl.iX - rectLayoutCandidateItem.iTl.iX + rectLayoutCandidateItem.iBr.iX - rectText.iBr.iX;
+    rectLayoutCandidateItem.iTl.iX += distance;
 
+    TInt width = 0;
     TInt i = 0;     
 
     const TInt candidateWidth = rectLayoutCandidateItem.Width();
@@ -780,7 +1063,6 @@
         const CFont* font = layoutText.Font();
         TPtrC newText = (*iCandidateArray)[iUnpagedIndex + i];
         TInt labelWidth = font->TextWidthInPixels( newText );
-        labelWidth = interval + ( labelWidth > layoutText.TextRect().Width() ? labelWidth : layoutText.TextRect().Width());
         if ( labelWidth > candidateWidth )
             {
             TBufC<EPhraseLength+10> buf1;
@@ -794,16 +1076,17 @@
             TRAP_IGNORE(
             {
             iCandidateArray->InsertL( iUnpagedIndex + i, text );
-            candidateLabel->SetText(text);
+            candidateLabel->SetTextL(text);
             });
             	
             }
         else
             {
-            TRAP_IGNORE( candidateLabel->SetText(newText));
-            rectLayoutCandidateItem.iTl.iX += labelWidth;
+            TRAP_IGNORE( candidateLabel->SetTextL(newText));
+            width = LabelTextWidthInPixels(i)+ iOrdinalLableWidth; 
+            rectLayoutCandidateItem.iTl.iX += width;
             }
-        if (rectLayoutCandidateItem.iTl.iX > rectLayoutCandidateItem.iBr.iX)
+        if (rectLayoutCandidateItem.iTl.iX >= rectLayoutCandidateItem.iBr.iX)
             {
             if (index>0)
                 {
@@ -847,11 +1130,7 @@
 
 TBool CAknFepUICtrlCandidatePane::IsLastPage()
     {
-	if( iPages.Count() == 0 )
-		{
-		return ETrue;
-		}
-	else if( iCandidateArray->Count() == iUnpagedIndex )
+    if( iCandidateArray->Count() == iUnpagedIndex )
         {
         return iCurDisplayPage == iPages.Count() - 1;
         }
@@ -860,13 +1139,14 @@
 
 void CAknFepUICtrlCandidatePane::SetInVisiable()
     {
-	iCandidateLabelArray[iSelected]->SetHighlight( EFalse );
-	TRAP_IGNORE( iPreview->HideL());
     for (TInt i = 0; i < EMaxCandidates; i ++)
         {
-		CAknFepUICtrlCandidateCharacter* candidateLabel = iCandidateLabelArray[i];
+        CEikLabel* candidateLabel = iCandidateLabelArray[i];
+        CEikLabel* ordinalLabel = iOrdinalLabelArray[i];
         candidateLabel->MakeVisible(EFalse);
+        ordinalLabel->MakeVisible(EFalse);
         }
+    iCandidateSelected->MakeVisible(EFalse);
     }
 
 TBool CAknFepUICtrlCandidatePane::NeedGetNewCandidatePage()
@@ -881,515 +1161,11 @@
 		{
 		for (TInt i=0; i<iVisibleCount; i++)
 			{
-			iCandidateLabelArray[i]->SetText( KNullDesC );
+			TRAP_IGNORE(iCandidateLabelArray[i]->SetTextL(KNullDesC));
 			}
-		TRAP_IGNORE( HidePreviewL();)
 		iCandidateArray->Reset();
 		iVisibleCount = 0;
 		DrawNow();
 		}
 	}
-
-void CAknFepUICtrlCandidatePane::FepUIClosePressed()
-	{
-	// Click close to close container
-	if ( iChineseUiMgr )
-		{
-		iChineseUiMgr->CloseContainer();
-		}
-	}
-
-void CAknFepUICtrlCandidatePane::SetFepUiState( MAknFepUiStateCtrl* aFepUiState )
-    {
-	iFepUiState = aFepUiState;
-    }
-
-void CAknFepUICtrlCandidatePane::HidePreviewL()
-	{
-	if( iPreview && iPreview->IsVisible())
-		{
-		iPreview->HideL();
-		}
-	}
-void CAknFepUICtrlCandidatePane::HandlePointerEventL( const TPointerEvent & aPointerEvent )
-	{
-	CCoeControl::HandlePointerEventL( aPointerEvent );
-    // Press will pop up preview
-	if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
-		{
-		for ( TInt i = 0; i < iVisibleCount; i++ )
-            {
-	        if ( iCandidateLabelArray[i]->Rect().Contains( aPointerEvent.iPosition ))
-		        {
-				iPointDown = ETrue;
-                SelectIndex( i );
-	            const TDesC* txtLabel = iCandidateLabelArray[i]->Text();
-	            TPoint point = iCandidateLabelArray[i]->PositionRelativeToScreen();
-	            TRect rect( point, iCandidateLabelArray[i]->Size());
-	            // if container is show on top, the preview should show bellow the character
-	            // else the preview should show above the character.
-	            TInt bottom = ShowAboveCharacter;
-	            if ( point.iY < iCandidateLabelArray[i]->Rect().iBr.iY )
-	                {
-				    bottom = ShowBellowCharacter;
-	                }
-	            rect.Move( 0, (iCandidateLabelArray[i]->Size().iHeight ) * bottom );
-	            iPreview->ShowL( rect, *txtLabel );
-	            break;
-	    	    }	        
-            }
-        }
-	// Up will submit text
-	else if ( aPointerEvent.iType == TPointerEvent::EButton1Up && iPointDown )
-		{
-		iPointDown = EFalse;
-	    for ( TInt i = 0; i < iVisibleCount; i++ )
-	        {
-		    if ( iCandidateLabelArray[i]->Rect().Contains( aPointerEvent.iPosition ))
-			    {
-			    if ( iChineseUiMgr )
-			        {
-			        const TDesC* text = iCandidateLabelArray[i]->Text();	    
-			        iChineseUiMgr->SubmitSelectedTextL( *text );			        
-			        }
-			    break;
-			    }
-	        }
-	    if( iPreview->IsVisible())
-	    	{
-			iPreview->HideL();
-	    	}
-	    
-	    if( !iHighlighted )
-	    	{
-			iCandidateLabelArray[iSelected]->SetHighlight( iHighlighted );
-	    	}
-		}
-	// Drag out of candidate pane, hide preview
-	else if ( aPointerEvent.iType == TPointerEvent::EDrag && iPointDown )
-		{
-	    TBool bContain = EFalse;
-		for ( TInt i = 0; ( !bContain ) && ( i < iVisibleCount ); i++ )
-		    {
-			if ( iCandidateLabelArray[i]->Rect().Contains( aPointerEvent.iPosition ))
-				{
-				TBool bSameIndex = ( i == iSelected );
-				SelectIndex( i );
-				if ( !bSameIndex )
-					{
-					const TDesC* txtLabel = iCandidateLabelArray[i]->Text();
-					TPoint point = iCandidateLabelArray[i]->PositionRelativeToScreen();
-					TRect rect( point, iCandidateLabelArray[i]->Size());
-					TInt bottom = ShowAboveCharacter;
-					// If container is moved to top,
-					// then pop up preview below the character
-					if ( point.iY < iCandidateLabelArray[i]->Rect().iBr.iY )
-						{
-						bottom = ShowBellowCharacter;
-						}
-					rect.Move( 0, (iCandidateLabelArray[i]->Size().iHeight ) * bottom );
-					iPreview->ShowL( rect, *txtLabel );
-					}
-				bContain = ETrue;
-				break;
-			    }
-		    }
-		if ( !bContain )
-			{
-			iPreview->HideL();
-			iCandidateLabelArray[iSelected]->SetHighlight( iHighlighted );	
-			if( !iHighlighted )
-				{
-				iSelected = 0;
-				}
-			}
-		else if( bContain && !iPreview->IsVisible())
-			{
-			const TDesC* txtLabel = iCandidateLabelArray[iSelected]->Text();
-			TPoint point = iCandidateLabelArray[iSelected]->PositionRelativeToScreen();
-			TRect rect( point, iCandidateLabelArray[iSelected]->Size());
-			TInt bottom = ShowAboveCharacter;
-			// If container is moved to top,
-			// then pop up preview below the character
-			if ( point.iY < iCandidateLabelArray[iSelected]->Rect().iBr.iY )
-				{
-				bottom = ShowBellowCharacter;
-				}
-			rect.Move( 0, (iCandidateLabelArray[iSelected]->Size().iHeight ) * bottom );
-			iPreview->ShowL( rect, *txtLabel );
-			}
-		}
-	else
-		{
-		// do nothing
-		}
-	}
-
-CAknFepPreview* CAknFepPreview::NewL( RWindowTreeNode& aParent )
-	{
-	CAknFepPreview* self = new(ELeave) CAknFepPreview;
-    CleanupStack::PushL(self);
-    self->ConstructL( aParent );
-    CleanupStack::Pop();
-    return self;
-	}
-
-CAknFepPreview::~CAknFepPreview()
-	{
-	delete iPreviewLabel;
-	}
-
-void CAknFepPreview::Draw( const TRect& /*aRect*/ ) const
-	{
-    CWindowGc& gc = SystemGc();
-	
-	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-	TRect outerRect;
-	TRect innerRect;
-	CalculateFrameRects( outerRect, innerRect );
-	gc.SetBrushColor( KRgbGray );
-	// draw the whole frame background according to the containing context, which in this case
-	// is the candidate pane, to avoid corner drawing mess and to cope with masked grid frame centre
-	MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
-	AknsDrawUtils::DrawFrame( skin, gc, outerRect, innerRect,
-							  KAknsIIDQsnFrInputCharPreview, KAknsIIDDefault ); 	
-	}
-
-void CAknFepPreview::SizeChanged()
-	{
-    TRect rect = Rect();
-    TAknTextLineLayout candidateLayout = AknLayoutScalable_Avkon::cell_hyb_candi_pane_t1(0);
-    // Get preview rect and font. 
-    TAknLayoutText layoutText;
-    layoutText.LayoutText( rect, candidateLayout );
-    TRect rectText = layoutText.TextRect();
-    const CFont* font = layoutText.Font();
-
-    iPreviewLabel->SetRect( rectText );
-    iPreviewLabel->SetFont( font );
-    // override with skin text color
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    
-    TRgb labelTextColor;
-    AknsUtils::GetCachedColor( skin, labelTextColor, 
-                               KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 );
-
-    TRAP_IGNORE( 
-    		iPreviewLabel->OverrideColorL(EColorLabelText, labelTextColor);	 )
-	}
-
-void CAknFepPreview::ShowL( TRect& aRect, const TDesC& aCharacter )
-	{
-	SetRect( aRect );
-
-	iPreviewLabel->SetTextL( aCharacter );
-	MakeVisible( ETrue );
-	RWindow& window = Window();
-	window.SetOrdinalPosition( 0, ECoeWinPriorityAlwaysAtFront + 100 );
-	DrawNow();
-	}
-
-void CAknFepPreview::HideL()
-	{
-	MakeVisible( EFalse );
-	iPreviewLabel->SetTextL( KNullDesC );
-	DrawNow();
-	}
-
-TInt CAknFepPreview::CountComponentControls() const
-	{
-    CCoeControl* controls[] = 
-        {
-        iPreviewLabel
-        };
-    TInt count = 0;
-    for ( TUint ii = 0 ; ii < (sizeof(controls) / sizeof(CCoeControl*)); ii++ )
-        {
-        if ( controls[ii] )
-            {
-            count++;
-            }   
-        }
-
-    return count ;
-	}
-
-CCoeControl* CAknFepPreview::ComponentControl(TInt aIndex) const
-	{
-    CCoeControl* controls[] = 
-        {
-        iPreviewLabel
-        };
-
-    for ( TUint ii = 0; (ii < sizeof(controls) / sizeof(CCoeControl*)); ii++ )
-        {
-        if ( controls[ii] && aIndex-- == 0 )
-            {
-            return controls[ii];
-            }
-        }
-    // shouldn't be called while no components.
-    return NULL ;
-	}
-
-CAknFepPreview::CAknFepPreview()
-	{
-	}
-
-void CAknFepPreview::ConstructL( RWindowTreeNode& /*aParent */)
-	{
-	RWindowGroup& wg = CCoeEnv::Static()->RootWin();
-	CreateWindowL( wg );
-	RWindow& window = Window();
-	iPreviewLabel = new( ELeave ) CEikLabel;
-	iPreviewLabel->SetContainerWindowL( window );
-	iPreviewLabel->SetLabelAlignment( ELayoutAlignCenter );	
-	iPreviewLabel->SetMopParent( this );
-	window.SetRequiredDisplayMode( EColor16MA );
-	window.SetTransparencyAlphaChannel();
-	window.SetOrdinalPosition( 0, ECoeWinPriorityAlwaysAtFront + 100 );
-	window.SetFaded( EFalse, RWindowTreeNode::EFadeIncludeChildren ); 
-	// Enable receive drag event.
-	Window().PointerFilter( EPointerFilterDrag, 0 );
-	MakeVisible( EFalse );
-	ActivateL();
-	}
-
-void CAknFepPreview::CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const
-	{
-	TRect windowRect = Rect();
-
-	TAknLayoutRect topLeft;
-	topLeft.LayoutRect( windowRect, SkinLayout::Highlight_skin_placing__grid__Line_2());
-
-	TAknLayoutRect bottomRight;
-	bottomRight.LayoutRect( windowRect, SkinLayout::Highlight_skin_placing__grid__Line_5());
-
-	aOuterRect = TRect( topLeft.Rect().iTl, bottomRight.Rect().iBr );
-	aInnerRect = TRect( topLeft.Rect().iBr, bottomRight.Rect().iTl );
-	}
-
-CAknFepUICtrlCandidateScroll* CAknFepUICtrlCandidateScroll::NewL(
-							RWindowTreeNode& aParent, MAknFepUIEventObserver* aObserver )
-	{
-	CAknFepUICtrlCandidateScroll* self = new(ELeave) CAknFepUICtrlCandidateScroll;
-    CleanupStack::PushL(self);
-    self->ConstructL( aParent, aObserver );
-    CleanupStack::Pop();
-    return self;
-	}
-
-CAknFepUICtrlCandidateScroll::~CAknFepUICtrlCandidateScroll()
-	{
-	// delete bitmaps
-	delete iScrollCloseBitmap;
-	delete iScrollCloseBitmapMask; 
-    delete iNaviArrowBitmapUp;
-    delete iNaviArrowBitmapUpMask;
-    delete iNaviArrowBitmapDown;
-    delete iNaviArrowBitmapDownMask;
-	}
-
-void CAknFepUICtrlCandidateScroll::SizeChanged()
-	{
-	LayoutIcon();
-	}
-
-void CAknFepUICtrlCandidateScroll::Draw( const TRect& /*aRect*/ ) const
-	{
-    CWindowGc& gc = SystemGc();
-	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-
-	// draw the whole frame background according to the containing context, which in this case
-	// is the candidate pane, to avoid corner drawing mess and to cope with masked grid frame centre
-	MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
-	TRect rect = Rect();
-	
-	// Draw scroll background
-	AknsDrawUtils::DrawBackground( skin, cc, this, gc,
-								   rect.iTl, rect, KAknsDrawParamDefault );
-
-	// Draw close Rects
-	if ( iShowClose )
-		{
-		TRect outerRect;
-		TRect innerRect;
-		CalculateCloseRects( outerRect, innerRect );
-		AknsDrawUtils::DrawFrame( skin, gc, outerRect, innerRect,
-								  KAknsIIDQsnFrKeypadButtonFrNormal, KAknsIIDDefault ); 
-		// Draw close bitmap
-		iIndiFepClose.DrawImage( gc, 
-								 iScrollCloseBitmap, 
-								 iScrollCloseBitmapMask );
-		}
-	
-	// Draw Up arrow & Down arrow
-	if ( iShowVerticalScrollArrows )
-	    {
-	    if ( iShowUpScrollArrows )
-	        {
-	        iIndiFepArrowUp.DrawImage( gc,
-	                                   iNaviArrowBitmapUp, 
-	                                   iNaviArrowBitmapUpMask );
-	        }
-	            
-	    if ( iShowDownScrollArrows )
-	        {
-	        iIndiFepArrowDown.DrawImage( gc, 
-	                                     iNaviArrowBitmapDown, 
-	                                     iNaviArrowBitmapDownMask );
-	        }
-	    }
-	}
-
-void CAknFepUICtrlCandidateScroll::HandlePointerEventL( const TPointerEvent & aPointerEvent )
-	{
-	// Close area is click will close the container
-	if ( iObServer != NULL && iIndiFepClose.Rect().Contains( aPointerEvent.iPosition ))
-		{
-		iObServer->FepUIClosePressed();
-		}
-	}
-
-void CAknFepUICtrlCandidateScroll::ShowUpScrollArrows(TBool aValue)
-    {
-	// Update the up arrow if needed
-    if ( iShowUpScrollArrows != aValue )
-        {
-        iShowUpScrollArrows = aValue;
-        TRect rect = iIndiFepArrowUp.Rect();
-        Window().Invalidate(rect);
-        }
-    }
-    
-void CAknFepUICtrlCandidateScroll::ShowDownScrollArrows( TBool aValue )
-    {
-	// Update the down arrow if needed
-    if ( iShowDownScrollArrows != aValue )
-        {
-        iShowDownScrollArrows = aValue;
-        TRect rect = iIndiFepArrowDown.Rect();
-        Window().Invalidate(rect);
-        }        
-    }
-
-void CAknFepUICtrlCandidateScroll::ShowVerticalScrollArrows( TBool aValue )
-    {
-    // If the state is changed, the arrows will be redrawn in the new state.
-    if(!COMPARE_BOOLS(iShowVerticalScrollArrows, aValue))
-        {
-        iShowVerticalScrollArrows = aValue;
-        //TRect rect = iIndiFepArrowUp.Rect();
-        DrawDeferred();
-        //rect = iIndiFepArrowDown.Rect();
-        //Window().Invalidate(rect);
-        }
-    }
-
-TBool CAknFepUICtrlCandidateScroll::IsShowVerticalScrollArrows() const
-    {
-    return iShowVerticalScrollArrows;
-    }
-
-void CAknFepUICtrlCandidateScroll::ConstructL( RWindowTreeNode& aParent, 
-											   MAknFepUIEventObserver* aObserver )
-	{
-    CreateWindowL( aParent );
-    ConstructBitmapsL();    
-    iObServer = aObserver; 
-    
-    TRect rect;
-    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, rect );
-    // Dibert will not need close button
-    iShowClose = rect.Height() == DibertHeight ? EFalse : ETrue;
-    
-	}
-
-void CAknFepUICtrlCandidateScroll::ConstructBitmapsL()
-	{
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();  
-    
-    TFileName bmpFile;
-    bmpFile.Copy(_L("z:"));
-    bmpFile.Append( KDC_BITMAP_DIR );
-    bmpFile.Append( KFepUiControlsBitmapFile );  
-
-    // Create close bitmap
-    AknsUtils::CreateColorIconL( skin,
- 							     KAknsIIDQgnGrafFepCandiListClose,
- 							     KAknsIIDQsnIconColors,
- 							     EAknsCIQsnIconColorsCG20,
- 							     iScrollCloseBitmap,
- 							     iScrollCloseBitmapMask,
- 							     bmpFile,
- 							     EMbmAknfepuictrlsQgn_indi_input_candi_list_close,
- 							     EMbmAknfepuictrlsQgn_indi_input_candi_list_close_mask,
- 							     AKN_LAF_COLOR( 0 )); 
-    
-    // Create Up bitmap
-    AknsUtils::CreateColorIconL( skin,
-                                 KAknsIIDQgnIndiFepArrowUp,
-                                 KAknsIIDQsnIconColors,
-                                 EAknsCIQsnIconColorsCG20,
-                                 iNaviArrowBitmapUp,
-                                 iNaviArrowBitmapUpMask,
-                                 bmpFile,
-                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_up,
-                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_up_mask,
-                                 AKN_LAF_COLOR( 0 ));
-    
-    // Create Down bitmap
-    AknsUtils::CreateColorIconL( skin,
-                                 KAknsIIDQgnIndiFepArrowDown,
-                                 KAknsIIDQsnIconColors,
-                                 EAknsCIQsnIconColorsCG20,
-                                 iNaviArrowBitmapDown,
-                                 iNaviArrowBitmapDownMask,
-                                 bmpFile,
-                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_down,
-                                 EMbmAknfepuictrlsQgn_indi_fep_arrow_down_mask,
-                                 AKN_LAF_COLOR( 0 )); 
-	}
-
-CAknFepUICtrlCandidateScroll::CAknFepUICtrlCandidateScroll()
-: iShowVerticalScrollArrows(EFalse),
-  iShowUpScrollArrows(ETrue),
-  iShowDownScrollArrows(ETrue),
-  iShowClose(ETrue)
-	{	
-	}
-
-void CAknFepUICtrlCandidateScroll::LayoutIcon()
-	{
-    TRect rect = Rect();
-    // layout arrow up
-    TAknWindowLineLayout arrowUpLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane_g1(0);
-    iIndiFepArrowUp.LayoutRect( rect, arrowUpLayout );    
-    AknIconUtils::SetSize(iNaviArrowBitmapUp, iIndiFepArrowUp.Rect().Size());
-    
-    // layout arrow down
-    TAknWindowLineLayout arrowDownLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane_g2(0);
-    iIndiFepArrowDown.LayoutRect( rect, arrowDownLayout );    
-    AknIconUtils::SetSize( iNaviArrowBitmapDown, iIndiFepArrowDown.Rect().Size());
-    
-    // layout close
-    TAknWindowLineLayout closeLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane_g3(0);
-    iIndiFepClose.LayoutRect( rect, closeLayout );
-    AknIconUtils::SetSize( iScrollCloseBitmap, iIndiFepClose.Rect().Size());   
-    }
-
-void CAknFepUICtrlCandidateScroll::CalculateCloseRects(TRect& aOuterRect, TRect& aInnerRect) const
-	{
-	TRect windowRect = iIndiFepClose.Rect();
-
-	TAknLayoutRect topLeft;
-	topLeft.LayoutRect( windowRect, SkinLayout::Highlight_skin_placing__grid__Line_2());
-
-	TAknLayoutRect bottomRight;
-	bottomRight.LayoutRect( windowRect, SkinLayout::Highlight_skin_placing__grid__Line_5());
-
-	aOuterRect = TRect( topLeft.Rect().iTl, bottomRight.Rect().iBr );
-	aInnerRect = TRect( topLeft.Rect().iBr, bottomRight.Rect().iTl );
-	}
-
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlCandidateSelected.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,309 @@
+/*
+* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:           
+*       Provides the CAknFepUICtrlCandidateSelected methods.
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include <uikon/eikdefmacros.h>
+#endif
+#include <eiklabel.h>
+#include <AknUtils.h>
+#include <AknsDrawUtils.h>
+#include "AknFepUIAvkonCtrlCandidateSelected.h"
+#include "AknFepUIAvkonCtrlPinyinPopup.h"
+#include "AknFepUiInterfacePanic.h"
+#include <skinlayout.cdl.h>
+
+class CEikLabel;
+
+CAknFepUICtrlCandidateSelected* CAknFepUICtrlCandidateSelected::NewL(RWindowTreeNode& aParent)
+    {
+    CAknFepUICtrlCandidateSelected* self = new(ELeave) CAknFepUICtrlCandidateSelected;
+    CleanupStack::PushL(self);
+    self->ConstructL(aParent);
+    CleanupStack::Pop();
+    return self;
+    }
+
+CAknFepUICtrlCandidateSelected::~CAknFepUICtrlCandidateSelected()
+    {
+    delete iOrdinalLabel;
+    delete iCandidateLabel;
+    }
+
+void CAknFepUICtrlCandidateSelected::SetText(TPtrC aCharacter)
+    {
+    // make sure that we only copy as many characters as we can show
+    TInt textLen = aCharacter.Length();
+    TInt textLength = textLen > EMaxSelectedCandidateLength? EMaxSelectedCandidateLength:textLen;
+    TPtrC newText = aCharacter.Left(textLength);
+    TPtr ptr = iBuffer.Des();
+    if(ptr != newText)
+        {
+        ptr.Copy(newText);
+        // ignore any errors... we have guaranteed that the descriptor already has sufficient characters to avoid a realloc
+        TRAP_IGNORE( iCandidateLabel->SetTextL(iBuffer)); 
+        }
+    }
+
+void CAknFepUICtrlCandidateSelected::SetOrdinal(TInt aOrdinal)
+    {
+    __ASSERT_DEBUG(aOrdinal < CAknFepUICtrlPinyinPopup::EMaxPhraseCandidate, AknFepUiInterfacePanic(EAknFepUiInterfacePanicNewVisibleCountExceedsRange));
+    __ASSERT_DEBUG(aOrdinal >= 0, AknFepUiInterfacePanic(EAknFepUiInterfacePanicNewVisibleCountExceedsRange));
+
+    TBuf<2> buf;
+    buf.Format(_L("%d"), aOrdinal);
+    TRAP_IGNORE(iOrdinalLabel->SetTextL(buf));
+    }
+
+void CAknFepUICtrlCandidateSelected::SetCandidateMode(CAknFepUICtrlCandidatePane::TCandidateMode aMode)
+    {
+    if(iCandidateMode != aMode)
+        {
+        iCandidateMode = aMode;
+        
+        LayoutRects();
+        LayoutContainedControls();
+        DrawDeferred();
+        }
+    }
+
+void CAknFepUICtrlCandidateSelected::SetLayout(CAknFepUICtrlContainerChinese::TPaneLayout aLayout)
+    {
+    iPaneLayout = aLayout;
+    }
+
+void CAknFepUICtrlCandidateSelected::ShowOrdinal(TBool aValue)
+	{
+	if(!COMPARE_BOOLS(iShowOrdinal,aValue))
+		{
+		iShowOrdinal = aValue;
+		UpdateLabelVisibility();
+		}
+	}
+
+void CAknFepUICtrlCandidateSelected::SizeChanged()
+    {
+    LayoutRects();
+    LayoutContainedControls();
+    }
+
+TInt CAknFepUICtrlCandidateSelected::CountComponentControls() const
+    {
+    CCoeControl* controls[] = 
+        {
+        iOrdinalLabel,
+        iCandidateLabel
+        } ;
+
+    TInt count = 0 ;
+    for (TUint ii = 0 ; ii < (sizeof(controls) / sizeof(CCoeControl*)) ; ii++)
+        if(controls[ii])
+            count++ ;
+    return count ;
+    }
+
+CCoeControl* CAknFepUICtrlCandidateSelected::ComponentControl(TInt aIndex) const 
+    {
+    CCoeControl* controls[] = 
+        {
+        iOrdinalLabel,
+        iCandidateLabel
+        } ;
+
+    for (TUint ii = 0; (ii < sizeof(controls) / sizeof(CCoeControl*)) ; ii++)
+        if (controls[ii] && aIndex-- == 0)
+            return controls[ii] ;
+    // shouldn't be called while no components.
+    return NULL ;
+    }
+
+void CAknFepUICtrlCandidateSelected::Draw(const TRect& /*aRect*/) const
+    {
+    CWindowGc& gc = SystemGc();
+
+    TBool skinnedDraw = EFalse;
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    TRect outerRect;
+    TRect innerRect;
+    CalculateFrameRects(outerRect, innerRect);
+
+    // draw the whole frame background according to the containing context, which in this case
+    // is the candidate pane, to avoid corner drawing mess and to cope with masked grid frame centre
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
+    AknsDrawUtils::DrawBackground(skin, cc, this, gc, 
+        outerRect.iTl, outerRect, KAknsDrawParamDefault);
+
+    skinnedDraw = AknsDrawUtils::DrawFrame(skin, gc, outerRect, innerRect,
+        KAknsIIDQsnFrGrid, KAknsIIDQsnFrGridCenter); 
+
+    if(!skinnedDraw)
+        {
+        iRectShadow.DrawRect(gc);
+        iRectHighlight.DrawRect(gc);
+        }
+    }
+
+void CAknFepUICtrlCandidateSelected::ConstructL(RWindowTreeNode& aParent)
+    {
+    CreateWindowL(aParent);
+
+    iOrdinalLabel = new(ELeave) CEikLabel;
+    iOrdinalLabel->SetBufferReserveLengthL(EOneCandidate);
+    iOrdinalLabel->SetContainerWindowL(*this);
+
+    // force label to contain required number of characters from the outset
+    iCandidateLabel = new(ELeave) CEikLabel;
+    iCandidateLabel->SetBufferReserveLengthL(EMaxSelectedCandidateLength); // this will do a realloc now, so no need to later
+    iCandidateLabel->SetContainerWindowL(*this);
+    }
+
+CAknFepUICtrlCandidateSelected::CAknFepUICtrlCandidateSelected()
+    : 
+    iCandidateMode(CAknFepUICtrlCandidatePane::ECandidateModeNormal),
+    iPaneLayout(CAknFepUICtrlContainerChinese::ELayoutCandidate),
+    iShowOrdinal(ETrue)
+    {
+    }
+
+void CAknFepUICtrlCandidateSelected::LayoutRects()
+    {
+    TRect rect = Rect();
+    iRectShadow.LayoutRect(rect, AKN_LAYOUT_WINDOW_Candidate_selection_highlight_Line_1(rect));
+    iRectHighlight.LayoutRect(rect, AKN_LAYOUT_WINDOW_Candidate_selection_highlight_Line_2(rect));
+    }
+
+void CAknFepUICtrlCandidateSelected::LayoutContainedControls()
+    {
+    TRect rect = Rect();
+
+    // layout candidate label
+    TAknTextLineLayout candidateLayout = AKN_LAYOUT_TEXT_Chinese_universal_FEP_candidate_pane_texts_Line_1;
+    TAknTextLineLayout ordinalLayout = AKN_LAYOUT_TEXT_Chinese_universal_FEP_candidate_pane_texts_Line_3; 
+    candidateLayout.il = candidateLayout.il - ordinalLayout.il;
+
+    TAknLayoutText layoutCandidate;
+    layoutCandidate.LayoutText(rect,candidateLayout);
+    
+    const CFont* font = layoutCandidate.Font();
+    TInt labelWidthInPixels = 0;
+    if(font)
+	    {
+	    TInt bufLength = iBuffer.Length();
+	    if(bufLength != 0)
+		    {
+		    TPtrC newChars = iBuffer.Left(bufLength);
+		    labelWidthInPixels = font->TextWidthInPixels(newChars);
+		    }
+	    }
+    TRect rectCandidate = layoutCandidate.TextRect();
+    if(labelWidthInPixels == 0)
+	    {
+	    rectCandidate.iTl.iX = 0;
+	    }
+    rectCandidate.SetWidth(labelWidthInPixels);
+    iCandidateLabel->SetRect(rectCandidate);
+    iCandidateLabel->SetFont(font);
+    
+    // layout ordinal label
+    TBufC16<1> buf;
+    TPtr16 ptr = buf.Des();
+    ptr = (*(iOrdinalLabel->Text())).Left(EOneCandidate);
+
+    TAknLayoutText layoutOrdinal;
+    ordinalLayout.il = 0;
+	
+    layoutOrdinal.LayoutText(rect,ordinalLayout);
+    
+    const CFont* fontOrdinal = layoutOrdinal.Font();
+    
+    TRect ordinalRect = layoutOrdinal.TextRect();
+
+    // inserted in 2006.03.29
+    TPoint ordinalPosition;
+    // end inserting
+    TInt ordinalWidth = fontOrdinal->TextWidthInPixels(ptr);
+    
+    /* removing in 2006.03.29
+    ordinalRect.iTl.iX = rectCandidate.iTl.iX - ordinalWidth;
+    ordinalRect.iTl.iY = rectCandidate.iTl.iY;
+
+    ordinalRect.SetWidth(ordinalWidth);
+    ordinalRect.SetHeight(fontOrdinal->HeightInPixels());
+    */ // end removing
+
+    // inserted in 2006.03.29
+    ordinalPosition.iX = rectCandidate.iTl.iX - ordinalWidth;
+    ordinalPosition.iY = rectCandidate.iTl.iY;
+
+    ordinalRect = TRect(ordinalPosition,
+                        TPoint(ordinalPosition.iX + ordinalRect.Width(),
+                               ordinalPosition.iY + ordinalRect.Height()));
+    // end inserting
+
+    iOrdinalLabel->SetRect(ordinalRect);
+    iOrdinalLabel->SetFont(fontOrdinal);
+
+    // override with skin text color
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    TRgb labelTextColor;
+
+    AknsUtils::GetCachedColor(skin, labelTextColor, 
+                              KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11);
+
+    TRAP_IGNORE( 
+	    iCandidateLabel->OverrideColorL(EColorLabelText, labelTextColor);
+	    iOrdinalLabel->OverrideColorL(EColorLabelText, labelTextColor);
+	    );
+    }
+
+void CAknFepUICtrlCandidateSelected::CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const
+    {
+    TRect windowRect = Rect();
+
+    TAknLayoutRect topLeft;
+    topLeft.LayoutRect(windowRect, SkinLayout::Highlight_skin_placing__grid__Line_2());
+
+    TAknLayoutRect bottomRight;
+    bottomRight.LayoutRect(windowRect, SkinLayout::Highlight_skin_placing__grid__Line_5());
+
+    aOuterRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
+    aInnerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
+    }
+
+void CAknFepUICtrlCandidateSelected::UpdateLabelVisibility()
+	{
+	if(iShowOrdinal)
+		{
+		iOrdinalLabel->MakeVisible(ETrue);
+		}
+	else
+		{
+		iOrdinalLabel->MakeVisible(EFalse);
+		}
+	}
+
+// End of file
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlContainerChinese.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlContainerChinese.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -42,8 +42,6 @@
 #include <AknsFrameBackgroundControlContext.h>
 #include <skinlayout.cdl.h>
 #include <AknDef.h>
-#include <coemain.h>
-#include "AknFepUiInputStateBase.h"
 
 #include "AknFepUiInterfacePanic.h"
 #include "AknFepUIAvkonCtrlContainerChinese.h"
@@ -112,9 +110,6 @@
             Window().SetOrdinalPosition(0, ECoeWinPriorityFep); // right at the front
             // make sure we are not faded even if a query has appeared
             Window().SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren); 
-            ClaimPointerGrab(ETrue);
-            // Set enable to capture outside pointer down event to close UI.
-            SetPointerCapture( ETrue );
             }
         else
             {
@@ -123,9 +118,6 @@
             iPinyinPopupWindow->Enable(aEnable);
             iEditPane->Enable(aEnable);
             iCandidatePane->Enable(aEnable);
-            ClaimPointerGrab(EFalse);
-        	// Set disable to capture outside pointer event
-            SetPointerCapture( EFalse );
             }
         MakeVisible(aEnable);
         }
@@ -147,10 +139,6 @@
 	    iEditPane->SetChangeState( EFalse );
 #endif
         }
-    else
-    	{
-		Window().Invalidate();
-    	}
     }  
   
 void CAknFepUICtrlContainerChinese::ConstructL()
@@ -158,9 +146,6 @@
     CreateWindowL();
     SetNonFocusing();
     RWindow& window=Window();
-        
-    // Need receive drag events.
-    window.PointerFilter( EPointerFilterDrag, 0 );
     window.SetOrdinalPosition(0, ECoeWinPriorityFep); // right at the front
     MakeVisible(EFalse);
 
@@ -168,7 +153,7 @@
 
     iLafDataMgr = CAknFepUiLayoutDataMgr::NewL();
     iInputPane = CAknFepUICtrlInputPane::NewL(window, CAknFepUICtrlInputPane::ELayoutPhraseInputPane, iLafDataMgr);
-    iCandidatePane = CAknFepUICtrlCandidatePane::NewL(window, iLafDataMgr, this );
+    iCandidatePane = CAknFepUICtrlCandidatePane::NewL(window, iLafDataMgr);
     iPinyinPopupWindow = CAknFepUICtrlPinyinPopup::NewL(window , iLafDataMgr);
     iEditPane = CAknFepUICtrlPinyinEEP::NewL( window, iLafDataMgr );
     iInputPane->SetMopParent(this);
@@ -178,7 +163,6 @@
     iInputPane->SetSizeChangedObserver(this);
     iPinyinPopupWindow->SetSizeChangedObserver(this);
     iPinyinPopupWindow->MakeVisible(EFalse);
-    iPinyinPopupWindow->SetMopParent( this );
     iEditPane->Enable(EFalse);
 
     iCandidatePane->SetPaneLayout(iPaneLayout); // set pane layout
@@ -206,7 +190,7 @@
 
 CAknFepUICtrlContainerChinese::~CAknFepUICtrlContainerChinese()
     {
-    iEikonEnv->EikAppUi()->RemoveFromStack( this );
+    iEikonEnv->EikAppUi()->RemoveFromStack(this);
     delete iLafDataMgr;
     delete iInputPane;
     delete iCandidatePane;
@@ -388,7 +372,7 @@
 
 void CAknFepUICtrlContainerChinese::FocusCandidatePane(TBool aValue)
     {
-    //iInputPane->SetHighlighted(!aValue);
+    iInputPane->SetHighlighted(!aValue);
     iCandidatePane->SetHighlighted(aValue);
     }
 
@@ -413,40 +397,56 @@
 
 void CAknFepUICtrlContainerChinese::LayoutPinyinPopupWindow()
     {
-	// Use the same rect in Zhuyin input & Phrase creation mode.
-	TRect rect = Rect();
-	TAknWindowLineLayout popupRect;
-	TInt index = ConvertLayoutToIndex();
-    switch ( index )
+    TRect popupRect(Position(), Size()); 
+    TRect pinyinRect = popupRect;
+    TAknWindowLineLayout entryHorizLine = 
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEntryHorizLineWindow ));
+    TAknWindowLineLayout entryPaneLine = 
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEntryPaneWindowLine ));
+    TAknWindowLineLayout eepFirstHorizLine = 
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEEPFirstHorizLineWindow ));
+    TAknWindowLineLayout eepSecondHorizLine = 
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEEPSecondHorizLineWindow ));
+    TAknLayoutRect layoutLineEntry, layoutLineEntryPane, layoutLineFirstHorizEEP, layoutLineSecondHorizEEP;
+    TRect layoutLineRectEntry, layoutLineRectEntryPane, layoutLineRectFirstHorizEEP, layoutLineRectSecondHorizEEP;
+    TInt index = ConvertLayoutToIndex();
+    if ( 2 == index )
         {
-        case 0:
-        	popupRect = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EECWindowLayout ));
-            break;
-        case 2:
-        	popupRect = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EECPLayout ));
-            break;
-        default:        	
-            break;
+        layoutLineFirstHorizEEP.LayoutRect( popupRect, eepFirstHorizLine );
+        layoutLineRectFirstHorizEEP = layoutLineFirstHorizEEP.Rect();
+        layoutLineSecondHorizEEP.LayoutRect( popupRect, eepSecondHorizLine );
+        layoutLineRectSecondHorizEEP = layoutLineSecondHorizEEP.Rect();
+        
+        pinyinRect.iTl.iY = layoutLineRectFirstHorizEEP.iBr.iY;
+        pinyinRect.iBr.iY = layoutLineRectSecondHorizEEP.iTl.iY;
         }
-	
-    AknLayoutUtils::LayoutControl( iPinyinPopupWindow, rect, popupRect );
+    else
+        {
+        layoutLineEntry.LayoutRect( popupRect, entryHorizLine );
+        layoutLineRectEntry = layoutLineEntry.Rect();
+        layoutLineEntryPane.LayoutRect( popupRect, entryPaneLine );
+        layoutLineRectEntryPane = layoutLineEntryPane.Rect();
+        pinyinRect.iTl.iY = layoutLineRectEntryPane.iTl.iY;
+        pinyinRect.SetHeight(layoutLineRectEntry.iTl.iY - pinyinRect.iTl.iY);
+        }
+    iPinyinPopupWindow->SetRect(pinyinRect);
     }
 
 void CAknFepUICtrlContainerChinese::LayoutPinyinEEPWindow()
     {
     TRect rect = Rect();  
-    TAknWindowLineLayout layoutEEPWindow;
+    TAknWindowLineLayout EEPWindowLayout;
     if ( iPaneLayout == ELayoutPhraseCreation )
     	{
-		layoutEEPWindow =
-    	    CAknFepChineseUIDataConv::AnyToWindowLine(iLafDataMgr->RequestData(EEntryCPLayout));
+    	EEPWindowLayout =
+    	    CAknFepChineseUIDataConv::AnyToWindowLine(iLafDataMgr->RequestData(EEEPWindowLayout));
     	}
     else
     	{
-		layoutEEPWindow =
-    	    	    CAknFepChineseUIDataConv::AnyToWindowLine(iLafDataMgr->RequestData(EEntryCLayout));
+    	EEPWindowLayout =
+    	    	    CAknFepChineseUIDataConv::AnyToWindowLine(iLafDataMgr->RequestData(EEntryPaneWindowLine));
     	}       
-    AknLayoutUtils::LayoutControl(iEditPane, rect, layoutEEPWindow);
+    AknLayoutUtils::LayoutControl(iEditPane, rect, EEPWindowLayout);
     }
 
 void CAknFepUICtrlContainerChinese::SetControlVisibility()
@@ -496,35 +496,40 @@
 
 void CAknFepUICtrlContainerChinese::SetContainerPosition(TPoint aCurPos, TInt aHeight)
     {
-    TRect rect;
-    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
+    TRect parentRect;
+    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, parentRect);
     TInt windowHeight = 0;
     TInt index = ConvertLayoutToIndex();
-    switch ( index )
+    
+    if ( index != 2 )
+        {
+        windowHeight = 
+            CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEntry ));
+        isPCLPosed = EFalse;
+        }
+    else
         {
-    	// Zhuyin input & phrase creation use the same rect
-        case 2:
-        	windowHeight = CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEEP ));
-        	isPCLPosed = ETrue;
-            break;
-        case 1:
-        	windowHeight = CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEntry ));
-        	isPCLPosed = EFalse;
-            break;
-        default:
-        	windowHeight = CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEP ));
-        	isPCLPosed = EFalse;
-            break;
+        windowHeight = CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEEP ));
+        isPCLPosed = ETrue;
+        }
+    // Laf comments: In case there is enough space on the main pane to show the window under the entry,
+    // the window is placed 3 pixels below the text baseline of the entry. In case there is no space on 
+    // the main pane to show the window fully under the entry, the window is placed 17(16 pixel font) or
+    // 13(12 pixel font) pixels above the baseline of the entry.
+    if(aCurPos.iY + 3 + windowHeight < parentRect.iBr.iY) 
+        {
+        iContainerPosition.iY = aCurPos.iY + 3; 
         }
-    // If cursor is covered by the container, move it to the top
-    if( aCurPos.iY > rect.iBr.iY - windowHeight )
-    	{
-        iContainerPosition.iY = aCurPos.iY - windowHeight - aHeight;
-    	}
     else
-    	{
-        iContainerPosition.iY = rect.iBr.iY - windowHeight ;
-    	}
+        {
+        iContainerPosition.iY = aCurPos.iY - windowHeight - (aHeight + 1); 
+        }
+    if ((( iContainerPosition.iY + windowHeight ) > parentRect.iBr.iY ) ||
+        ( iContainerPosition.iY < parentRect.iTl.iY ))
+    {
+    iContainerPosition.iY = parentRect.iBr.iY - ( parentRect.iBr.iY - 
+                            parentRect.iTl.iY ) / 2 - windowHeight / 2;
+    }
     LayoutContainer();
     }
 
@@ -541,62 +546,47 @@
 void CAknFepUICtrlContainerChinese::LayoutInputPane()
     {
     TRect rect = Rect();
-    TAknWindowLineLayout entryPaneWindowLine;
+    TAknWindowLineLayout entryPaneWindowLine = 
+        CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEntryPaneWindowLine ));
     TInt index = ConvertLayoutToIndex();
-    switch ( index )
+    if ( index == 2)
         {
-        case 2:
-        	entryPaneWindowLine = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EECPLayout ));
-            break;
-        case 1:
-        	entryPaneWindowLine = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EECWindowLayout ));
-            break;
-        default:
-        	entryPaneWindowLine = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EECWindowLayout ));
-            break;
+        TInt eepPopupHeight = CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEEP ));
+        TInt entryPopupHeight = CAknFepChineseUIDataConv::AnyToInt( iLafDataMgr->RequestData( EPopupHeightEntry ));
+        rect.iTl.iY = rect.iTl.iY + eepPopupHeight - entryPopupHeight;
         }
-    AknLayoutUtils::LayoutControl(iInputPane, rect, entryPaneWindowLine );
+    AknLayoutUtils::LayoutControl(iInputPane, rect, entryPaneWindowLine);
     }
 
 void CAknFepUICtrlContainerChinese::LayoutContainedControls()
     {
     LayoutInputPane();
     // layout candidate pane
-    TAknWindowLineLayout candidatePaneWindowLine ;    
-    TInt index = ConvertLayoutToIndex();    
-    switch ( index )
-        {
-        case 2:
-        	candidatePaneWindowLine = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEPCandidateLayout ));
-            break;
-        case 1:
-        	candidatePaneWindowLine = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( ECandidateLayout ));
-            break;
-        default:
-        	candidatePaneWindowLine = CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EECandidateLayout ));
-            break;
-        }
-    // Layout candidate pane.
-    AknLayoutUtils::LayoutControl( iCandidatePane, Rect(), candidatePaneWindowLine );
-    
+    TAknWindowLineLayout candidatePaneWindowLine = 
+                CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( ECandidatePaneWindowLine ));
+    TInt index = ConvertLayoutToIndex();
     if (index == 2)
         {
         if ( isPCLPosed )
             {
-            iEditPane->Enable( ETrue ); 
+            iEditPane->Enable( ETrue );      
+            AknLayoutUtils::LayoutControl( iCandidatePane, Rect(), candidatePaneWindowLine );
             LayoutPinyinPopupWindow();
             LayoutPinyinEEPWindow();
             }
         }
     else if ( index == 0 || index == 1 ) 
         {
+        TRect rect = Rect();
         iEditPane->Enable(EFalse);
+        AknLayoutUtils::LayoutControl(iCandidatePane, rect, candidatePaneWindowLine);
         LayoutPinyinPopupWindow();
         }
     else
         {
         iEditPane->Enable(ETrue);
         iPinyinPopupWindow->Enable(EFalse);
+        AknLayoutUtils::LayoutControl(iCandidatePane, Rect(), candidatePaneWindowLine);
         LayoutPinyinEEPWindow();
         }
     }
@@ -611,16 +601,15 @@
             rect = CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectEEP ));
             break;
         case 1:
-            rect = CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectEntry ));
-            break;
-        default:
             rect = CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectCandatate ));
             break;
+        default:
+            rect = CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectEntry ));
+            break;
         }
-
-    // Set container rect.
-    rect.iBr.iY = iContainerPosition.iY + rect.Height();
-    rect.iTl.iY = iContainerPosition.iY;    
+    TInt rectHeight = rect.iBr.iY - rect.iTl.iY;
+    rect.iTl.iY = iContainerPosition.iY;
+    rect.iBr.iY = iContainerPosition.iY + rectHeight;
     SetRect(rect); 
     }
 
@@ -701,58 +690,3 @@
     {
     iFepMan = aFepMan;
     }
-
-void CAknFepUICtrlContainerChinese::HandlePointerEventL(const TPointerEvent& aPointerEvent)
-	{	
-	CCoeControl::HandlePointerEventL(aPointerEvent);
-	TRect rect = Rect();
-	// If click out of the container, close container.
-	if (( aPointerEvent.iType == TPointerEvent::EButton1Down )  
-	 && ( !rect.Contains( aPointerEvent.iPosition )))
-		{
-		CloseUI();
-		// simulation pointer event to application.
-		Window().SetOrdinalPosition(-1);
-		User::After(50000);
-		TRawEvent eventDown;   
-		eventDown.Set( TRawEvent::EButton1Down, 
-				       aPointerEvent.iParentPosition.iX, 
-				       aPointerEvent.iParentPosition.iY );
-		CCoeEnv::Static()->WsSession().SimulateRawEvent( eventDown );
-		User::After(1000);
-		TRawEvent eventUp; 
-		eventUp.Set( TRawEvent::EButton1Up, 
-				     aPointerEvent.iParentPosition.iX, 
-				     aPointerEvent.iParentPosition.iY );
-		CCoeEnv::Static()->WsSession().SimulateRawEvent( eventUp );		
-		}	
-	return;
-	}
-
-void CAknFepUICtrlContainerChinese::CloseUI()
-	{
-	// Hide container
-	if( iFepUiState )
-		{
-		iFepUiState->CloseUI();
-		}
-	}
-
-void CAknFepUICtrlContainerChinese::SetFepUiStateCtrl( MAknFepUiStateCtrl* aFepUiState )
-    {
-    iFepUiState = aFepUiState;
-    }
-
-void CAknFepUICtrlContainerChinese::SubmitSelectedTextL(const TDesC& aText)
-    {
-	// Commit text
-    if ( iFepUiState )
-        {
-		iFepUiState->SubmitTextL( aText );
-        }
-    }
-
-void CAknFepUICtrlContainerChinese::CloseContainer()
-	{
-	CloseUI();
-	}
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlInputPane.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlInputPane.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -41,7 +41,6 @@
 #include "aknfepchineseuidataconv.h"
 #include "aknfepuilayoutdatamgr.h"
 
-
 CAknFepUICtrlInputPane* CAknFepUICtrlInputPane::NewL(RWindow& aParent, 
                                                      TInputPaneLayout aPaneLayout,
                                                      CAknFepUiLayoutDataMgr* aLafDataMgr )
@@ -71,7 +70,7 @@
     // make sure that we only copy as many characters as we can show
     if(iLayout == ELayoutPhraseInputPane)
         {
-        TPtrC newText = aDes.Right( EMaxInputCharsInputPane );        
+        TPtrC newText = aDes.Right(CalculateMaxTextLength(aDes));        
         TPtr ptr = iBuffer->Des();
 
         if(ptr != newText)
@@ -117,7 +116,7 @@
         iHighlighted = aHighlighted;
         // need to change highlight colors
         LayoutContainedControls();
-        DrawNow();
+        DrawDeferred();
         }
     }
 
@@ -199,27 +198,12 @@
 
 TInt CAknFepUICtrlInputPane::LabelTextWidthInPixels() const
     {
-    TAknTextLineLayout textLayout;
-    if ( iLayout == ELayoutPhraseInputPane )
-		{
-		textLayout = 
-		        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EEEPTextLine ));
-        
-        }
-    else if( iLayout == ELayoutPhrasePinyinPopupPane ) 
-		{
-		textLayout = 
-		        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EInputTextLayout ));
-		}
-    
-    TAknLayoutText layoutText;
-    layoutText.LayoutText( Rect(), textLayout );
-    
-    // Get the text font
+    TAknLayoutText layoutText = 
+            CAknFepChineseUIDataConv::AnyToLayoutText( iLafDataMgr->RequestData( ELayoutInputPaneText ));
     const CFont* font = layoutText.Font();
 
     TInt labelWidthInPixels = 0;
-    if ( font )
+    if(font)
         {
         TBufC<EMaxInputCharsInputPane> buf1;
         TPtr ptr1 = buf1.Des();
@@ -230,6 +214,8 @@
         labelWidthInPixels = font->TextWidthInPixels(ptr1); 
         labelWidthInPixels += font->TextWidthInPixels(ptr2);
         }
+    TInt maxWidth = layoutText.TextRect().Width(); 
+    labelWidthInPixels = labelWidthInPixels > maxWidth? maxWidth:labelWidthInPixels;
     return labelWidthInPixels;
     }
 
@@ -282,20 +268,18 @@
     CWindowGc& gc = SystemGc();
 
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    TRect outerRect;
-    TRect innerRect;
-    CalculateFrameRects(outerRect, innerRect);
-    if ( iHighlighted )
+    if(iHighlighted)
         {
-		// Highlight state
-        skinnedDraw = AknsDrawUtils::DrawFrame( skin, gc, outerRect, innerRect, 
-												KAknsIIDQsnFrKeypadButtonFrPressed, KAknsIIDDefault ); // or KAknsIIDDefault?
+        TRect outerRect;
+        TRect innerRect;
+        CalculateFrameRects(outerRect, innerRect);
+        skinnedDraw = AknsDrawUtils::DrawFrame(
+            skin, gc, outerRect, innerRect, KAknsIIDQsnFrList, KAknsIIDQsnFrListCenter); // or KAknsIIDDefault?
         }
     else
         {
-		// Normal state
-        skinnedDraw = AknsDrawUtils::DrawFrame( skin, gc, outerRect, innerRect, 
-												KAknsIIDQsnFrKeypadButtonFrNormal, KAknsIIDDefault );
+        MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
+        skinnedDraw = AknsDrawUtils::Background(skin, cc, this, gc, Rect());
         }
 
     if(!skinnedDraw)
@@ -360,20 +344,28 @@
     combinedPtr.Copy(*iBuffer);
     combinedPtr.Append(iToneMarkBuffer);
 
-    TRect layoutRect = CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectCandatate ));
-    TAknWindowLineLayout layoutLineRectEntryPane = 
-                    CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEntryCLayout ));
-    TAknLayoutRect layoutRectEntryPane;
-    layoutRectEntryPane.LayoutRect( layoutRect, layoutLineRectEntryPane );
+    TRect rect = Rect();
+    if(iLayout == ELayoutPhrasePinyinPopupPane)
+        {
+        TAknLayoutRect layoutLineRectEntryPane = 
+                CAknFepChineseUIDataConv::AnyToLayoutRect( iLafDataMgr->RequestData( ELayoutLineRectEntryPane ));
+        rect = layoutLineRectEntryPane.Rect();
+        }
+    // avoid accessing text layout member data
+    TAknLayoutRect labelRect;
     
-    TAknTextLineLayout layoutLineText = 
-                        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EEEPTextLine ));    
-   
+    TAknWindowLineLayout layoutEntryItem = 
+            CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutEntryItem));
+    labelRect.LayoutRect(rect, layoutEntryItem);
     TAknLayoutText layoutText;
-    layoutText.LayoutText( layoutRectEntryPane.Rect(), layoutLineText );
+    TAknTextLineLayout entryTextLine = 
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EEntryTextLayout));
+    layoutText.LayoutText(labelRect.Rect(),entryTextLine);
+    TInt maxWidth = layoutText.TextRect().Width(); 
     
-    TInt maxWidth = layoutText.TextRect().Width();    
-    const CFont* font = layoutText.Font();
+    TAknLayoutText layoutText1 = 
+            CAknFepChineseUIDataConv::AnyToLayoutText( iLafDataMgr->RequestData( ELayoutInputPaneText ));
+    const CFont* font = layoutText1.Font();
 
     TInt labelWidthInPixels = 0;
     if(font)
@@ -415,42 +407,36 @@
 void CAknFepUICtrlInputPane::LayoutContainedControls()
     {
     TRect rect = Rect();
-    TAknWindowLineLayout layoutEntryItem;
-    TAknTextLineLayout textLayout;
     if(iLayout == ELayoutPhraseInputPane)
 		{
-		layoutEntryItem = 
-	            CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EEntryCLayout ));
-		
-		textLayout = 
-		        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EEEPTextLine ));
-        
+	    TAknWindowLineLayout layoutEntryItem = 
+	            CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutEntryItem));
+        iUnselectedStringHighlight.LayoutRect(rect, layoutEntryItem);
         }
     else if(iLayout == ELayoutPhrasePinyinPopupPane) 
 		{
-		layoutEntryItem = 
-    	            CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EInputLayout ));
-		textLayout = 
-		        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EInputTextLayout ));
-		}
-    
-    iUnselectedStringHighlight.LayoutRect(rect, layoutEntryItem);
-    
+        iUnselectedStringHighlight.LayoutRect(rect, AKN_LAYOUT_WINDOW_Input_highlight_Line_1(rect));
+        }
+
+    // layout spelling label    
+    TAknTextLineLayout textLayout = 
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EEntryTextLayout));
     TAknLayoutText layoutText;
+    TRect rectHighlight = iUnselectedStringHighlight.Rect();
     TRect textRect;
     
-    layoutText.LayoutText(rect,textLayout);
+    layoutText.LayoutText(rectHighlight,textLayout);
     textRect = layoutText.TextRect();
     TRgb labelTextColor = layoutText.Color();
 
     TInt labelWidth = LabelTextWidthInPixels();
-    if ( textRect.Width() < labelWidth )
+    if(textRect.Width() > labelWidth)
         {
-        textRect.SetWidth( labelWidth );
+        textRect.SetWidth(labelWidth);
         }
-    iLabel->SetRect( textRect );
+    iLabel->SetRect(textRect);
     const CFont* font = layoutText.Font();
-    iLabel->SetFont( font );
+    iLabel->SetFont(font);
     
     // layout tone mark label
     TRgb labelToneMarkTextColor = labelTextColor;
@@ -463,8 +449,8 @@
     toneMarkRect.iTl.iY = textRect.iTl.iY;
     toneMarkRect.iBr.iY = textRect.iBr.iY;
     toneMarkRect.SetWidth(labelWidth - toneMarkOffset);
-    iLabelToneMark->SetRect( toneMarkRect );
-    iLabelToneMark->SetFont( font );
+    iLabelToneMark->SetRect(toneMarkRect);
+    iLabelToneMark->SetFont(font);
     
     // once we have layed out the labels from LAF, override the colours from the skin if necessary
     // as the skin utils will only return RGB values, not colour ids.
@@ -500,22 +486,23 @@
 void CAknFepUICtrlInputPane::CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const
     {
     TRect windowRect = Rect();
-    TAknTextLineLayout textLayout;
-    if ( iLayout == ELayoutPhraseInputPane )
-		{
-		textLayout = 
-		        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EEEPTextLine ));
-        
+    TRect entryRect = 
+        CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData(EEntryPaneRect));
+    
+    windowRect.SetHeight(entryRect.iBr.iY - entryRect.iTl.iY);
+    
+    TAknLayoutRect topLeft;
+    topLeft.LayoutRect(windowRect,SkinLayout::Submenu_skin_placing_Line_2());
+
+    TAknLayoutRect bottomRight;
+    bottomRight.LayoutRect(windowRect, SkinLayout::Submenu_skin_placing_Line_5());
+
+    aOuterRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
+    aInnerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
+    if (aInnerRect.Width() <= 4)
+        {
+        aInnerRect.SetWidth(5);
         }
-    else if( iLayout == ELayoutPhrasePinyinPopupPane ) 
-		{
-		textLayout = 
-		        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EInputTextLayout ));
-		}
-    TAknLayoutText layoutInputPaneText;
-    layoutInputPaneText.LayoutText( windowRect, textLayout );
-    aInnerRect = layoutInputPaneText.TextRect();
-    aOuterRect = windowRect;
     }
 
 TInt CAknFepUICtrlInputPane::CalculateMaxTextLength(const TDesC& aDes) const
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlPinyinPopup.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlPinyinPopup.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -45,6 +45,8 @@
 
 #include "data_caging_path_literals.hrh"
 
+_LIT(KFepUiControlsBitmapFile, "aknfepuictrls.mbm");
+
 CAknFepUICtrlPinyinPopup* CAknFepUICtrlPinyinPopup::NewL(RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr )
     {
     CAknFepUICtrlPinyinPopup* self = new(ELeave) CAknFepUICtrlPinyinPopup( aLafDataMgr );
@@ -60,6 +62,10 @@
     iPages.Reset();
     delete iSpellingArray;
     delete iSpellingIndexArray;
+    delete iNaviArrowBitmapLeft;
+    delete iNaviArrowBitmapLeftMask;
+    delete iNaviArrowBitmapRight;
+    delete iNaviArrowBitmapRightMask;
     delete iBgContext;
     delete iKeystrokeArray;
     delete iInEffectKeystrokeArray;
@@ -207,7 +213,7 @@
         TAknWindowLineLayout layoutEntryItem = 
                 CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutEntryItem));
         TAknTextLineLayout entryTextLine = 
-            CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EEEPTextLine));
+            CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EEntryTextLayout));
         TInt layoutLinePrevLeft = 0;
         TInt layoutLinePrevWidth = 0;
 
@@ -219,7 +225,7 @@
         layoutText.LayoutText(rectEntryItem,entryTextLine);
         TRect rectText = layoutText.TextRect();
         
-        TInt rightLimit = rectText.iBr.iX;
+        TInt rightLimit = iIndiFepArrowRight.Rect().iTl.iX;
         // value is 3 for 176*208 resolution
         TInt distance = rectText.iTl.iX - rectEntryItem.iTl.iX + rectEntryItem.iBr.iX - rectText.iBr.iX;
         
@@ -285,9 +291,9 @@
         TInt spellingLeftNum = aCount - index > EMaxCandidates? EMaxCandidates:aCount - index;
  
         TAknWindowLineLayout layoutEntryItem = 
-                CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EInputLayout ));
+                CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutEntryItem));
         TAknTextLineLayout entryTextLine = 
-            CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EInputTextLayout ));
+            CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EEntryTextLayout));
         TInt layoutLinePrevLeft = 0;
         TInt layoutLinePrevWidth = 0;
 
@@ -697,6 +703,19 @@
         iRectOutlineFrameInput.DrawRect(gc);
         iRectInsideAreaInput.DrawRect(gc);
         }
+
+    if((iVisibleCount >= 1) && (iPages.Count() > 1))
+        {
+        if(iCurDisplayPage != 0)
+            {
+            iIndiFepArrowLeft.DrawImage(gc, iNaviArrowBitmapLeft, iNaviArrowBitmapLeftMask);
+            }
+
+        if (iPages.Count() > iCurDisplayPage + 1)
+            {
+            iIndiFepArrowRight.DrawImage(gc, iNaviArrowBitmapRight, iNaviArrowBitmapRightMask);
+            }
+	    }
     }
 
 TTypeUid::Ptr CAknFepUICtrlPinyinPopup::MopSupplyObject(TTypeUid aId)
@@ -706,14 +725,16 @@
     return CCoeControl::MopSupplyObject(aId);
     }
 
-void CAknFepUICtrlPinyinPopup::ConstructL( RWindow& aParent )
+void CAknFepUICtrlPinyinPopup::ConstructL(RWindow& /*aParent*/)
     {
-    CreateWindowL( aParent );
+    CreateWindowL();
+    ConstructBitmapsL();
+    RWindow& window = Window();
 
     for(TInt i = 0; i < EMaxPhraseCandidate; i++)
         {
         CAknFepUICtrlInputPane* inputPane = 
-            CAknFepUICtrlInputPane::NewL(aParent, CAknFepUICtrlInputPane::ELayoutPhrasePinyinPopupPane, iLafDataMgr);
+            CAknFepUICtrlInputPane::NewL(window, CAknFepUICtrlInputPane::ELayoutPhrasePinyinPopupPane, iLafDataMgr);
         inputPane->SetMopParent(this);
         CleanupStack::PushL(inputPane);
         // ownership is passed, unless allocation is unsuccessful, in which case we still have it on the stack
@@ -745,6 +766,8 @@
     iZhuyinSymbolsForChineseCharsDisped = new(ELeave)CDesCArrayFlat(1);
     
     SetNonFocusing();
+    window.SetOrdinalPosition(0, ECoeWinPriorityFep); // right at the front
+    window.SetNonFading(ETrue);
 
     TRect outerRect = TRect();
     TRect innerRect = TRect();
@@ -755,6 +778,40 @@
     MakeVisible(EFalse);
     }
 
+void CAknFepUICtrlPinyinPopup::ConstructBitmapsL()
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();    
+    
+    TFileName bmpFile;
+    bmpFile.Copy(_L("z:"));
+    bmpFile.Append(KDC_BITMAP_DIR);
+    bmpFile.Append(KFepUiControlsBitmapFile);      
+    
+    AknsUtils::CreateColorIconL( skin,
+                                     KAknsIIDQgnIndiFepArrowLeft,
+                                     KAknsIIDQsnIconColors,
+                                     EAknsCIQsnIconColorsCG20,
+                                     iNaviArrowBitmapLeft,
+                                     iNaviArrowBitmapLeftMask,
+                                     bmpFile,
+                                     EMbmAknfepuictrlsQgn_indi_fep_arrow_left,
+                                     EMbmAknfepuictrlsQgn_indi_fep_arrow_left_mask,
+                                     AKN_LAF_COLOR( 0 )
+                                 );  
+
+    AknsUtils::CreateColorIconL( skin,
+                                     KAknsIIDQgnIndiFepArrowRight,
+                                     KAknsIIDQsnIconColors,
+                                     EAknsCIQsnIconColorsCG20,
+                                     iNaviArrowBitmapRight,
+                                     iNaviArrowBitmapRightMask,
+                                     bmpFile,
+                                     EMbmAknfepuictrlsQgn_indi_fep_arrow_right,
+                                     EMbmAknfepuictrlsQgn_indi_fep_arrow_right_mask,
+                                     AKN_LAF_COLOR( 0 )
+                                 );    
+    }
+
 CAknFepUICtrlPinyinPopup::CAknFepUICtrlPinyinPopup( CAknFepUiLayoutDataMgr* aLafDataMgr )
     : 
     iSelected(0),
@@ -778,6 +835,16 @@
 
 void CAknFepUICtrlPinyinPopup::LayoutRects()
     {
+    // left arrow
+    iIndiFepArrowLeft = 
+        CAknFepChineseUIDataConv::AnyToLayoutRect( iLafDataMgr->RequestData( EIndiFepArrowLeft ));
+    AknIconUtils::SetSize( iNaviArrowBitmapLeft, iIndiFepArrowLeft.Rect().Size());
+
+    // right arrow
+    iIndiFepArrowRight = 
+        CAknFepChineseUIDataConv::AnyToLayoutRect( iLafDataMgr->RequestData( EIndiFepArrowRight ));
+    AknIconUtils::SetSize( iNaviArrowBitmapRight, iIndiFepArrowRight.Rect().Size());
+
     // cover main pane
     iRectCoverMainPaneInput = 
         CAknFepChineseUIDataConv::AnyToLayoutRect( iLafDataMgr->RequestData( ERectCoverMainPaneInput ));
@@ -811,41 +878,30 @@
 
     CAknFepUICtrlInputPane* inputPane = iInputPaneArray[aIndex];
     TAknWindowLineLayout layoutEntryItem = 
-           CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData( EInputLayout ));
+            CAknFepChineseUIDataConv::AnyToWindowLine( iLafDataMgr->RequestData(ELayoutEntryItem));
     TAknTextLineLayout layoutLineText = 
-        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EInputTextLayout ));
+        CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData(EEntryTextLayout));
     TAknLayoutRect layoutRectEntryItem;
-    layoutRectEntryItem.LayoutRect( rect, layoutEntryItem );
+    layoutRectEntryItem.LayoutRect(rect,layoutEntryItem);
     TRect rectEntryItem = layoutRectEntryItem.Rect();
     
     TAknLayoutText layoutText;
-    layoutText.LayoutText( rectEntryItem, layoutLineText );
-    
-    // Get text rect
+    layoutText.LayoutText(rectEntryItem,layoutLineText);
     TRect rectText = layoutText.TextRect();
-    TInt minWidth = rectText.Width();
     
     // value is 3 for 176*208 resolution
     TInt distance = rectText.iTl.iX - rectEntryItem.iTl.iX + rectEntryItem.iBr.iX - rectText.iBr.iX;
     
-    if ( aIndex > 0 )
+    if( aIndex > 0)
         {
         CAknFepUICtrlInputPane* inputPanePrev = iInputPaneArray[aIndex - 1];
         rectText.iTl.iX = inputPanePrev->Rect().iBr.iX;
         }
-    
-    TInt width = inputPane->LabelTextWidthInPixels();
-    // Only there has text that need the distance.
-    if ( width > 0 ) 
-    	{
-		width = width > minWidth ? width : minWidth;
-		width += distance;
-    	}
-    rectText.SetWidth( width );
-    rectText.SetHeight( rect.Height());
+    rectText.SetWidth(inputPane->LabelTextWidthInPixels() + distance);
+    rectText.SetHeight(rect.Height());
 
-    inputPane->SetRect( rectText );
-    inputPane->SetHighlighted( aIndex == iSelected );
+    inputPane->SetRect(rectText);
+    inputPane->SetHighlighted(aIndex == iSelected);
     }
 
 void CAknFepUICtrlPinyinPopup::SetInputPaneVisibility()
@@ -889,7 +945,7 @@
 void CAknFepUICtrlPinyinPopup::CalculateFrameRects(TRect& aOuterRect, TRect& aInnerRect) const
     {
     TRect windowRect = 
-        CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectEEP ));
+        CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectEntry ));
     TInt rectHeight = windowRect.iBr.iY - windowRect.iTl.iY;
     TInt rectWidth = windowRect.Width();
     windowRect.iTl.iX = 0;
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -131,6 +131,18 @@
 
 void CAknFepUIAvkonImpl::DeleteDialogs()
     {
+    // If there is no dialog displayed, do not need delete the dialog, 
+    // but set all dialog pointer to null and return
+	if( !CEikonEnv::Static()->EikAppUi()->IsDisplayingMenuOrDialog())
+		{
+		iDialog = NULL;
+		iCharMapDialog = NULL;
+		iListQueryDialog = NULL;
+		iTextQueryDialog = NULL;
+        iPredictiveSettingDialog = NULL;
+		return;
+		}
+	
     if(iDialog)
         {
         delete iDialog;
@@ -332,13 +344,12 @@
                 TInt commandId;
                 if (version == KAknCbaVersion)
                     {
-                    TUint32 shortCommandId = reader.ReadUint16();
-                    TUint32 longCommandId = reader.ReadUint16();
-                    commandId = (longCommandId << 16) | shortCommandId;
+                    commandId = reader.ReadInt16();
+                    reader.ReadInt16(); //long press id
                     }
                 else
                     {
-                    commandId = TInt(TUint(reader.ReadUint16()));
+                    commandId =reader.ReadInt16();
                     }
                 TPtrC text=reader.ReadTPtrC();
                 reader.ReadTPtrC(); // bmp filename
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuictrleepcontrol.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuictrleepcontrol.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -112,8 +112,9 @@
     textrect.SetWidth( Rect().Width( )- Rect().Width( )*KLROffset/KDenominator * 2 ) ;
 
         TAknLayoutText layoutText;
-        TAknTextLineLayout textLayout = 
-                    CAknFepChineseUIDataConv::AnyToTextLine( iLafDataMgr->RequestData( EEEPTextLine ));
+        TAknTextLineLayout
+            textLayout=
+            AKN_LAYOUT_TEXT_Chinese_universal_FEP_entry_pane_texts_Line_1( 0);
         layoutText.LayoutText( textrect, textLayout ) ;
         const CFont* font = layoutText.Font( );
         gc.UseFont( font ) ;
@@ -705,9 +706,31 @@
 void CAknFepUICtrlEEPControl::CalculateFrameRects( TRect& aOuterRect,
     TRect& aInnerRect ) const
     {
-	aOuterRect = Rect();
-	aInnerRect = aOuterRect;
-	aInnerRect.Shrink( 3, 3 );
+    TRect windowRect = CAknFepChineseUIDataConv::AnyToRect( iLafDataMgr->RequestData( EPopupRectEEP ));
+    TAknLayoutRect eepFirstHorizLineLayoutRect = CAknFepChineseUIDataConv::AnyToLayoutRect( iLafDataMgr->RequestData( EEEPFirstHorizLine ));
+    TAknLayoutRect eepSecondHorizLineLayoutRect = CAknFepChineseUIDataConv::AnyToLayoutRect( iLafDataMgr->RequestData( EEEPSecondHorizLine ));
+    TRect eepFirstHorizLineRect = eepFirstHorizLineLayoutRect.Rect();
+    TRect eepSecondHorizLineRect = eepSecondHorizLineLayoutRect.Rect();
+    TInt rectHeight = eepFirstHorizLineRect.iTl.iY - windowRect.iTl.iY;
+    //TInt rectHeight = eepSecondHorizLineRect.iTl.iY - windowRect.iTl.iY - 1;
+    TInt rectWidth = windowRect.Width( );
+    windowRect.iTl.iX = 0;
+    windowRect.iTl.iY = 0;
+    windowRect.SetHeight( rectHeight ) ;
+    windowRect.SetWidth( rectWidth ) ;
+    TAknLayoutRect topLeft;
+    topLeft.LayoutRect( windowRect,
+        SkinLayout::Submenu_skin_placing_Line_2( ) ) ;
+
+    TAknLayoutRect bottomRight;
+    bottomRight.LayoutRect( windowRect,
+        SkinLayout::Submenu_skin_placing_Line_5( ) ) ;
+   
+    aOuterRect = TRect( topLeft.Rect().iTl, bottomRight.Rect().iBr ) ;
+    aInnerRect = TRect( topLeft.Rect().iBr, bottomRight.Rect().iTl ) ;
+//    aOuterRect.SetHeight();
+//    aInnerRect = aOuterRect;
+    aInnerRect.iBr.iY = aOuterRect.iBr.iY;
     }
 
 // End of file
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuictrlpinyineep.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuictrlpinyineep.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -846,6 +846,9 @@
 //
 void CAknFepUICtrlPinyinEEP::LayoutContainedControls()
     {
+    TRect outerRect;
+    TRect innerRect;
+    CalculateFrameRects( outerRect, innerRect );
     TRect rect = Rect();
     iEditableEntryPane->SetRect( rect );
     }
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuilayoutdatamgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/aknfepuilayoutdatamgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -50,85 +50,58 @@
     }
 
 void CAknFepUiLayoutDataMgr::ReadLafInfo()
-    {	
-	// Screen
+    {
+    // Screen
     TRect rect;
-    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, rect );
+    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
     iScreenSize = rect.Size();
 
     iLandScape = iScreenSize.iWidth < iScreenSize.iHeight ? EFalse : ETrue;
     
-    // 1. Container With Candidate list
-    TAknWindowLineLayout layoutLineEntry;
-    TAknLayoutRect layoutRectEntry;
-      
-    // Get container Rect & height
-    layoutLineEntry = AknLayoutScalable_Avkon::popup_hyb_candi_window(0);
-    layoutRectEntry.LayoutRect( rect, layoutLineEntry );    
-    iPopupRectEntry = layoutRectEntry.Rect();
+    TAknWindowLineLayout layoutLineEntry, layoutLineCandidate, layoutLineEEP;
+    TAknLayoutRect layoutRectEntry, layoutRectCandidate, layoutRectEEP;
+    
+    layoutLineEntry = AKN_LAYOUT_WINDOW_popup_fep_china_uni_window(0,0);
+    layoutRectEntry.LayoutRect(iScreenSize,layoutLineEntry);
+    iPopupRectEntry = layoutLineEntry.Rect();
     iPopupHeightEntry = layoutLineEntry.iH;
     
-    // Candidate layout
-    iCandidate = AknLayoutScalable_Avkon::grid_hyb_candi_pane(0);
-    
-    // Scroll layout
-    iScrollLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane(0); 
-   
-    // Up arrow & down arrow & close in scroll pane
-    iUpArrowLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane_g1_aid(0);   
-    iDownArrowLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane_g2_aid(0);    
-    iCloseLayout = AknLayoutScalable_Avkon::cell_hyb_candi_scroll_pane_g3(0);
+    //PinyinPopupWindowRect
+    iEntryPaneWindowLine = AKN_LAYOUT_WINDOW_fep_china_uni_entry_pane;
+    iLayoutEntryItem = AKN_LAYOUT_WINDOW_fep_entry_item_pane;
     
-    // Character in candidate pane
-    iCharacterLineLayout = AknLayoutScalable_Avkon::cell_hyb_candi_pane(0);    
-    iCharacterTextLayout = AknLayoutScalable_Avkon::cell_hyb_candi_pane_t1(0);
-    iEntryPaneWindowLine = AknLayoutScalable_Avkon::input_focus_pane_cp06( 0 );
-    iEntryPaneWindowLine.il = 3;
-    iEntryPaneWindowLine.it = 3;
-    iEntryPaneWindowLine.ir = 5;
-    iEntryPaneWindowLine.iH = 30;
-    iLayoutEntryItem = AKN_LAYOUT_WINDOW_fep_entry_item_pane;    
-    iLayoutLineRectEntryPane.LayoutRect( iPopupRectEntry, iEntryPaneWindowLine );
+    iLayoutLineRectEntryPane.LayoutRect(iPopupRectEntry, iEntryPaneWindowLine);
     
-    // 2. EC( With Candidate list & Entry )
-    TAknWindowLineLayout layoutLineCandidate;
-    TAknLayoutRect layoutRectCandidate, layoutEC;
-    
-    // Container Rect & height
-    layoutLineCandidate = AknLayoutScalable_Avkon::popup_hyb_candi_window(1);
-    layoutRectCandidate.LayoutRect( rect,layoutLineCandidate );
-    iPopupRectCandidate = layoutRectCandidate.Rect();
-    iPopupRectCandidateHeight = layoutLineCandidate.iH;
+    layoutLineCandidate = AKN_LAYOUT_WINDOW_popup_fep_china_uni_window(0,1);
+    layoutRectCandidate.LayoutRect(iScreenSize,layoutLineCandidate);
+    iPopupRectCandidate = layoutLineCandidate.Rect();
     
-    // Candidate layout
-    iECandidate = AknLayoutScalable_Avkon::grid_hyb_candi_pane(1);    
-    iEntryCLayout = AknLayoutScalable_Avkon::entry_hyb_candi_pane(0);
-    
-    // Phrase pane layout
-    iECWindowLayout = AknLayoutScalable_Avkon::grid_hyb_phrase_pane(0);     
-       
-    // 3. ECP( With Candidate list & Entry & PopUp )
-    TAknWindowLineLayout layoutLineEEP;
-    TAknLayoutRect layoutEEP, layoutRectEEP;
-    
-    // Container Rect & height
-    layoutLineEEP = AknLayoutScalable_Avkon::popup_hyb_candi_window(2);
-    layoutRectEEP.LayoutRect(rect,layoutLineEEP);
-    iPopupRectEEP = layoutRectEEP.Rect();
+    layoutLineEEP = AKN_LAYOUT_WINDOW_popup_fep_china_uni_window(0,2);//need updated
+    layoutRectEEP.LayoutRect(iScreenSize,layoutLineEEP);
+    iPopupRectEEP = layoutLineEEP.Rect();
     iPopupHeightEEP = layoutLineEEP.iH;
     
-    //Entry
-    iEntryCPLayout = AknLayoutScalable_Avkon::entry_hyb_candi_pane(1);
-    iEntryWithCandidateAndPopUp = AknLayoutScalable_Avkon::grid_hyb_phrase_pane(1);
-
-    // Candidate layout
-    iEPCandidate = AknLayoutScalable_Avkon::grid_hyb_candi_pane(2);
-       
-    //EEP
-    iEEPWindowLayout = AknLayoutScalable_Avkon::grid_hyb_phrase_pane(1);     
-    layoutEEP.LayoutRect( iPopupRectEEP, iEEPWindowLayout );
-    iEEPWindowRect = layoutEEP.Rect();
+    
+    iCandidatePaneWindowLine = AKN_LAYOUT_WINDOW_fep_china_uni_candidate_pane( 0 );
+    
+    //Candidate
     
+    iCandidatePaneTextLine = AKN_LAYOUT_TEXT_Chinese_universal_FEP_candidate_pane_texts_Line_1;
+    iOrdinalCandidateTextLayout = AKN_LAYOUT_TEXT_Chinese_universal_FEP_candidate_pane_texts_Line_3;
+    iCandidateWindowLine1 = AKN_LAYOUT_WINDOW_Chinese_universal_FEPcandidate_pane_elements_Line_1;
+    iCandidateWindowLine2 = AKN_LAYOUT_WINDOW_Chinese_universal_FEPcandidate_pane_elements_Line_2;
+    iCandidateWindowLine3 = AKN_LAYOUT_WINDOW_Chinese_universal_FEPcandidate_pane_elements_Line_3;
+    iCandidateWindowLine4 = AKN_LAYOUT_WINDOW_Chinese_universal_FEPcandidate_pane_elements_Line_4;
+    
+    iLayoutCandidateItem = AKN_LAYOUT_WINDOW_fep_candidate_item_pane;
+    
+    //EEP   
+    TAknWindowComponentLayout EEPWindowComponentLayout = AknLayoutScalable_Avkon::fep_china_uni_eep_pane();     
+    iEEPWindowLayout = EEPWindowComponentLayout.LayoutLine();
+    TAknLayoutRect EEPLayout;
+    EEPLayout.LayoutRect( iPopupRectEEP, iEEPWindowLayout );
+    iEEPWindowRect = EEPLayout.Rect();
+    //
     iRectCoverMainPaneInputEntry.LayoutRect(iPopupRectEntry, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_1(iPopupRectEntry));
     iRectFirstShadowInputEntry.LayoutRect(iPopupRectEntry, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_2(iPopupRectEntry));
     iRectOutlineFrameInputEntry.LayoutRect(iPopupRectEntry, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_3(iPopupRectEntry));
@@ -143,53 +116,59 @@
     iRectInsideAreaInputCandidate.LayoutRect(iPopupRectCandidate, 
                                              AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_4(iPopupRectCandidate));
     
-  
     iRectCoverMainPaneInputEEP.LayoutRect(iPopupRectEEP, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_1(iPopupRectEEP));
     iRectFirstShadowInputEEP.LayoutRect(iPopupRectEEP, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_2(iPopupRectEEP));
     iRectOutlineFrameInputEEP.LayoutRect(iPopupRectEEP, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_3(iPopupRectEEP));
     iRectInsideAreaInputEEP.LayoutRect(iPopupRectEEP, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_4(iPopupRectEEP));    
-    
+       
+    //HorizLine
+
     iEntryHorizLineWindow = AknLayoutScalable_Avkon::popup_fep_china_uni_window_g(0,0).LayoutLine();
     iEEPSecondHorizLineWindow = AknLayoutScalable_Avkon::popup_fep_china_uni_window_g(0,1).LayoutLine();
     iEEPFirstHorizLineWindow = AknLayoutScalable_Avkon::popup_fep_china_uni_window_g(1,0).LayoutLine();
     iHorizLine.LayoutRect(iPopupRectEntry, iEntryHorizLineWindow);
     iEEPFirstHorizLine.LayoutRect(iPopupRectEEP, iEEPFirstHorizLineWindow);
     iEEPSecondHorizLine.LayoutRect(iPopupRectEEP, iEEPSecondHorizLineWindow);
+
     iEntryPaneRect = iLayoutLineRectEntryPane.Rect( );
-
+    iEntryTextLayout
+        = AKN_LAYOUT_TEXT_Chinese_universal_FEP_entry_pane_texts_Line_1(0);
     TAknLayoutRect labelRect;
-    labelRect.LayoutRect( iEntryPaneRect, AknLayoutScalable_Avkon::entry_hyb_candi_pane(0));
-    iEntryTextLayout = AknLayoutScalable_Avkon::entry_hyb_candi_pane_t1( 0 );
+    labelRect.LayoutRect( iEntryPaneRect,
+        AKN_LAYOUT_WINDOW_fep_entry_item_pane );
     iLayoutInputPaneText.LayoutText( labelRect.Rect( ), iEntryTextLayout );
 
     TRect windowRect = layoutRectEntry.Rect();    
     TInt height = windowRect.Height();
     TInt width = windowRect.Width();
-    
     windowRect.iTl.iY = 0;
     windowRect.iTl.iX = 0;
     windowRect.SetHeight(height);
     windowRect.SetWidth(width);
-      
+    
     TAknLayoutRect layoutLineRectEntryPane;
     layoutLineRectEntryPane.LayoutRect(windowRect, iEntryPaneWindowLine);
     TRect entryPane = layoutLineRectEntryPane.Rect();
-     
+    // left and right arrow
+    TAknWindowLineLayout leftArrowLayoutLine, rithgArrowLayoutLine;	
+    leftArrowLayoutLine = AKN_LAYOUT_WINDOW_Chinese_universal_FEP_entry_pane_elements_Line_1;
+    iIndiFepArrowLeft.LayoutRect(entryPane,leftArrowLayoutLine);
+    rithgArrowLayoutLine = AKN_LAYOUT_WINDOW_Chinese_universal_FEP_entry_pane_elements_Line_2;
+    iIndiFepArrowRight.LayoutRect(entryPane,rithgArrowLayoutLine);   	
+    
     iRectCoverMainPaneInput.LayoutRect(windowRect, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_1(windowRect));
     iRectFirstShadowInput.LayoutRect(windowRect, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_2(windowRect));
     iRectOutlineFrameInput.LayoutRect(windowRect, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_3(windowRect));
     iRectInsideAreaInput.LayoutRect(windowRect, AKN_LAYOUT_WINDOW_Chinese_universal_FEP_pop_up_window_graphics_Line_4(windowRect));
-      
+    
     //eep text
-    TAknTextComponentLayout textLayout = AknLayoutScalable_Avkon::entry_hyb_candi_pane_t1(0);
+    TAknTextComponentLayout textLayout = AknLayoutScalable_Avkon::fep_china_uni_eep_pane_t1();
     iEEPTextLine = textLayout.LayoutLine();
     TAknLayoutText eepTextLayout;
     eepTextLayout.LayoutText( iEEPWindowRect, iEEPTextLine );
     iEEPTextColor = eepTextLayout.Color();
     const CFont* font = AknLayoutUtils::FontFromId(iEEPTextLine.FontId());
     iEEPCursorHeight = font->HeightInPixels();    
-    iInputLayout = AknLayoutScalable_Avkon::cell_hyb_phrase_pane(0);
-    iInputTextLayout = AknLayoutScalable_Avkon::cell_hyb_phrase_pane_t1(0);
     }
 
 TAny* CAknFepUiLayoutDataMgr::RequestData(TInt aDataType)
@@ -210,8 +189,22 @@
             return &iEntryPaneWindowLine;
         case ECandidatePaneWindowLine:
             return &iCandidatePaneWindowLine;
+        case ECandidatePaneTextLine:
+            return &iCandidatePaneTextLine;
+        case ECandidateWindowLine1:
+            return &iCandidateWindowLine1;
+        case ECandidateWindowLine2:
+            return &iCandidateWindowLine2;
+        case ECandidateWindowLine3:
+            return &iCandidateWindowLine3;
+        case ECandidateWindowLine4:
+            return &iCandidateWindowLine4;
+        case ELayoutCandidateItem:
+            return &iLayoutCandidateItem;
         case ELayoutEntryItem:
             return &iLayoutEntryItem;
+        case EOrdinalCandidateTextLayout:
+            return &iOrdinalCandidateTextLayout;
         case EEEPWindowRect:
             return &iEEPWindowRect;
         case EEEPWindowLayout:
@@ -248,6 +241,10 @@
             return &iEntryTextLayout;
         case EEntryPaneRect:
             return &iEntryPaneRect;
+        case EIndiFepArrowLeft:
+            return &iIndiFepArrowLeft;
+        case EIndiFepArrowRight:
+            return &iIndiFepArrowRight;
         case ERectCoverMainPaneInput:
             return &iRectCoverMainPaneInput;
         case ERectFirstShadowInput:
@@ -274,38 +271,6 @@
             return &iEEPFirstHorizLineWindow;
         case EEEPTextColor:
             return &iEEPTextColor;
-        case EECPLayout:
-        	return &iEntryWithCandidateAndPopUp;//Rect;
-        case ECandidateLayout:
-        	return &iCandidate;
-        case EECandidateLayout:
-        	return &iECandidate;
-        case EEPCandidateLayout:
-        	return &iEPCandidate;
-        case ECharacterLayout:
-        	return &iCharacterLineLayout;
-        case ECharacterTextLayout:
-        	return &iCharacterTextLayout;
-        case EPopupHeightEP:
-        	return &iPopupRectCandidateHeight;
-        case EUpArrowLayout:
-        	return &iUpArrowLayout;
-        case EDownArrowLayout:
-        	return &iDownArrowLayout;
-        case EScrollLayout:
-        	return &iScrollLayout;
-        case EEntryCLayout:
-        	return &iEntryCLayout;
-        case EEntryCPLayout:
-        	return &iEntryCPLayout;
-        case EECWindowLayout:
-        	return &iECWindowLayout;
-        case ECloseLayout:
-        	return &iCloseLayout;
-        case EInputLayout:
-        	return &iInputLayout;
-        case EInputTextLayout:
-        	return &iInputTextLayout;
         default:
             break;
         }
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/inc/AknFepUiCtrlContainerChinese.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/inc/AknFepUiCtrlContainerChinese.h	Wed Oct 13 14:55:58 2010 +0300
@@ -36,7 +36,7 @@
 class MAknFepUICtrlPinyinPopup;
 class MAknFepUICtrlEditPane;
 class MAknFepManagerUIInterface;
-class MAknFepUiStateCtrl;
+
 class MAknFepUICtrlContainerChinese
 {
 
@@ -181,8 +181,6 @@
      * @return if not enabled, return EFalse
      */
     virtual void SetFepMan( MAknFepManagerUIInterface* aFepMan ) = 0;
-    
-    virtual void SetFepUiStateCtrl( MAknFepUiStateCtrl* aFepUiState ) = 0;
 
 	};
 #endif  // __AKN_FEP_UI_CONTAINER_CHINESE_H__
Binary file fep/aknfep/conf/aknfep.confml has changed
Binary file fep/aknfep/conf/aknfep_101F876D.crml has changed
--- a/fep/aknfep/group/AknFep.mmp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/group/AknFep.mmp	Wed Oct 13 14:55:58 2010 +0300
@@ -215,8 +215,6 @@
 SOURCE          AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp
 SOURCE          AknFepUIInputStateEntryMiniQwertyCangJie.cpp
 SOURCE          aknfepuiinputminiqwertypinyinphrasebase.cpp 
-SOURCE          aknfepuiinputminiqwertysogoupinyinphraseplugin.cpp
-SOURCE          aknfepuiinputminiqwertysogoustrokephraseplugin.cpp
 SOURCE          aknfepuiinputminiqwertystrokephrasebase.cpp 
 SOURCE          aknfepuiinputstateminiqwertystrokephrase.cpp
 SOURCE          aknfepinputstateminiqwertyzhuyinkeymap.cpp  
--- a/fep/aknfep/group/Iconlist.txt	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/group/Iconlist.txt	Wed Oct 13 14:55:58 2010 +0300
@@ -2,4 +2,3 @@
 /c8,1 qgn_indi_fep_arrow_right.bmp
 /c8,1 qgn_indi_fep_arrow_up.bmp
 /c8,1 qgn_indi_fep_arrow_down.bmp
-/c8,8 qgn_indi_input_candi_list_close.svg
--- a/fep/aknfep/group/bld.inf	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/group/bld.inf	Wed Oct 13 14:55:58 2010 +0300
@@ -104,6 +104,6 @@
 START EXTENSION s60/mifconv
 OPTION TARGETFILE aknfepuictrls.mif
 OPTION HEADERFILE aknfepuictrls.mbg
-OPTION SOURCEFILE iconlist.txt
+OPTION SOURCES -c8,1 qgn_indi_fep_arrow_left.bmp -c8,1 qgn_indi_fep_arrow_right.bmp -c8,1 qgn_indi_fep_arrow_up.bmp -c8,1 qgn_indi_fep_arrow_down.bmp
 END
 // End of file
--- a/fep/aknfep/inc/AknFepLanguageManager.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepLanguageManager.h	Wed Oct 13 14:55:58 2010 +0300
@@ -89,7 +89,6 @@
                                          CAknFepCaseManager* aCaseMan,
                                          CAknFepSharedDataInterface* aSharedData = NULL );
 
-
     /**
      * Destructor.
      *
@@ -262,7 +261,7 @@
      * @since S60 v3.2
      */	
     TBool iIsSplitView;
-   
+
     /**
      * Shared data manager
      */
--- a/fep/aknfep/inc/AknFepManager.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepManager.h	Wed Oct 13 14:55:58 2010 +0300
@@ -269,7 +269,9 @@
         /* Flag to specify that pointer event type EDrag has happened */ 
         EExtendedFlagPointerEventTypeEDrag                =0x00000040,
         /* Flag to specify that Fn key will be set as lock mode when long press occurs*/ 
-        EExtendedFlagFnKeyNeedLockMode                    =0x00000080
+        EExtendedFlagFnKeyNeedLockMode                    =0x00000080,
+        /* Flag to specify point in editor when EFlagNoMatches flag is set*/ 
+        EExtendedFlagPointInNoMatchEditor                 =0x00000100
     	};		
 
     //public constants
@@ -624,15 +626,6 @@
     */
     virtual void HandleIndicCaseL();
 #endif
-    /*
-     * This function judge whether the texts inputted 
-     * exceed the max length of the editor. 
-     * 
-     * @since Symbian^3
-     * @param aNewInlineTextLenght the length of the current inline texts
-     * @return ETrue if the texts inputted exceed the max length of the editor. 
-     */ 
-    TBool IsTextExceedLeghthEditor(TInt aNewInlineTextLenght);
 
 public: //interface to the key catcher
     /**
@@ -924,6 +917,11 @@
 	
 	void HandleChangeInFocusForSettingFep();
 
+    /**
+    * Returns initial rectangle used for the top-left point of split candidate.
+    */
+    TRect InitRectForSplitCandL();
+
 private:
 
     /**
@@ -2474,8 +2472,6 @@
     
     inline TBool IsMfneEditor() const;
     
-    inline TBool IsNoT9Editor() const;
-    
     inline TBool IsFindPaneEditor() const;
     inline TBool IsSupportedAdaptiveSearch() const;
     //for japanese
@@ -2943,7 +2939,7 @@
     /**
     * Notify mfne editor to toggle AM or PM for 12-hour time
     */
-    void ChangeMfneAmPmL();
+    void ChangeMfneAmPm();
 private:        
     TBool NumericResourceMultiTapTimerTimeoutL();    
     
@@ -2977,19 +2973,6 @@
      *      aMenuPane : pointer to the menu pane to be checked for the resource id
      */
     void AddInputOptionsMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane );
-    
-    /**
-     * CAknFepManager::MenuItemExist
-     * To check if the menuitem with the CascadeId exist in menupane
-     * Params -
-     *      aMenuPane : the current menu pane
-     *      aCascadeId : the menuitem cascadeID
-     *      aPosition : if the menuitem exist, this is the index
-     * return -
-     *      exist : true
-     *      not exist : false
-     */
-    TBool MenuItemExistL( CAknFepUiInterfaceMenuPane* aMenuPane, TInt aCascadeId, TInt &aPosition );
         
 private:        
     CChrMultiTapTimer* iNumericResourceTimer;
@@ -3169,11 +3152,6 @@
     return EditorType() == CAknExtendedInputCapabilities::EMFNEBased;
     }
 
-inline TBool CAknFepManager::IsNoT9Editor() const
-    {
-    return iAknEditorFlags & EAknEditorFlagNoT9;
-    }
-
 inline TBool CAknFepManager::IsFindPaneEditor() const
     {
     return iAknEditorFlags & EAknEditorFlagFindPane;
--- a/fep/aknfep/inc/AknFepManagerUIInterface.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepManagerUIInterface.h	Wed Oct 13 14:55:58 2010 +0300
@@ -401,13 +401,6 @@
      * An editor of unlimited length will return its maximum size as zero
      */
     virtual TBool EditorHasFreeSpace( TInt aNumberOfCharacter = 0 ) const = 0;
-    
-    /**
-     * Check whether the editor is a Java number editor
-     * Return ETrue if the editor is a Java number editor 
-     */
-    virtual TBool IsSpecialNumericEditor() = 0;
-
 
     virtual void RedecorateAfterDeletionL( const TDesC& aTextThatWasDeleted ) = 0;
 
--- a/fep/aknfep/inc/AknFepPluginManager.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepPluginManager.h	Wed Oct 13 14:55:58 2010 +0300
@@ -113,8 +113,7 @@
     public CBase,
     public MAknFepPenSupportInterface,
     public MPeninputServerEventHandler,
-    public MEikEdwinObserver,
-    public MPenUiActivationHandler
+    public MEikEdwinObserver
     { 
 public:
 	
@@ -320,6 +319,8 @@
      */
     void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor);
     
+    void VietSyncToneMarkerL(const TDesC& aEditorContent, const TCursorSelection& aCursorPos);
+    
     HBufC*  GetNumberKeymapResource(TInt aCaseMode);
     
     HBufC*  DoGetNumberKeymapResourceL(TInt aCaseMode);
@@ -1140,28 +1141,6 @@
      * Indicate whether portrait FSQ feature is enabled
      */    
     TBool iPortraitFSQEnabled;
-
-    private:
-    // From MPenUiActivationHandler
-        
-        /** 
-         * From MPenUiActivationHandler
-         * Called when pen input UI is about to be closed
-         */    
-        void OnPeninputUiDeactivated();
-        
-        /** 
-         * From MPenUiActivationHandler
-         * Called when pen input UI is about to be open
-         */        
-        void OnPeninputUiActivated();  
-    private:
-        /**
-         * Indicate if plugin manager initiate to close input ui.
-         * This flag is used to avoid incursive calling 
-         */                 
-        TBool iInitiateCloseInputUi;
-    
     };
 
 class CConnectAo : public CActive
--- a/fep/aknfep/inc/AknFepSharedDataInterface.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepSharedDataInterface.h	Wed Oct 13 14:55:58 2010 +0300
@@ -584,6 +584,7 @@
      * @param Replace value of KAknFepLastUsedPortraitInput value.
      */
     void SetPluginPortraitInputMode( TPluginInputMode aLastUsedPortraitInputMode );
+
 private:
     /**
      * C++ Constructor
--- a/fep/aknfep/inc/AknFepUIInputStateEntryMiniQwertyCangJie.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUIInputStateEntryMiniQwertyCangJie.h	Wed Oct 13 14:55:58 2010 +0300
@@ -48,9 +48,6 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-
-    void SubmitTextL( const TDesC& aText );
-
     };
 
 
--- a/fep/aknfep/inc/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -69,10 +69,6 @@
       * @param aCommandId Command ID value
       */
      void HandleCommandL( TInt aCommandId );
-     
-     
-     void SubmitTextL( const TDesC& aText );
-
     };
 
 /**
@@ -111,9 +107,6 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-    
-    void SubmitTextL( const TDesC& aText );
-    
     };
 
 #endif __AKN_FEP_UI_INPUT_STATE_ENTRY_MINIQWERTY_PINYINPHRASE_H__
\ No newline at end of file
--- a/fep/aknfep/inc/AknFepUiInputStateBase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateBase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -39,14 +39,6 @@
 
 #include <PtiObserver.h> // MPtiObserver
 
-class MAknFepUiStateCtrl 
-	{
-public:
-    virtual void SubmitTextL( const TDesC& aText ) = 0;
-    
-    virtual void CloseUI() = 0;
-	};
-
 // CONSTANTS
 
 // MACROS
@@ -66,8 +58,7 @@
  *  @lib AknFep.lib
  *  @since 2.6
  */
-class TAknFepInputStateBase : public MPtiObserver,
-							  public MAknFepUiStateCtrl
+class TAknFepInputStateBase : public MPtiObserver
     {
 public: // Constructors and destructor
     /**
@@ -102,10 +93,6 @@
      * @since 2.6
      */
     virtual void FirstWordInSelectionList();
-    
-    virtual void SubmitTextL( const TDesC& aText );
-    
-    virtual void CloseUI();
 
 public: // New functions
     /**
@@ -136,6 +123,11 @@
      */
     virtual TUIState State() const;
 
+    /**
+     * Processing of Closeing UI
+     * @since 2.6
+     */
+    virtual void CloseUI();
 
     /**
      * Initialize state
--- a/fep/aknfep/inc/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -71,8 +71,6 @@
      */
     void HandleCommandL( TInt aCommandId );
     
-    void SubmitTextL( const TDesC& aText );
-
 protected:
 
     /**
--- a/fep/aknfep/inc/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -63,8 +63,6 @@
      */
     void HandleCommandL( TInt aCommandId );
     
-    void SubmitTextL( const TDesC& aText );
-    
 protected:
 
     /**
@@ -119,8 +117,6 @@
      * 
      */
     TInt GetIndexOfToneMark( const TDesC& aText);
-    
-    void RefreshUI( TBool aRefresh );
     };
 
 #endif __AKN_FEP_UI_INPUT_STATE_CANDIDATE_MINIQWERTY_ZHUYINPHRASE_H__
--- a/fep/aknfep/inc/AknFepUiInputStateChineseBase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateChineseBase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -38,9 +38,6 @@
 #include "AknFepUiInputStateBase.h"
 #include "AknFepUiCtrlContainerChinese.h"
 
-#include "aknfepuiinputminiqwertysogoupinyinphraseplugin.h"
-#include "aknfepuiinputminiqwertysogoustrokephraseplugin.h"
-
 // CONSTANTS
 
 // FORWARD DECLARATIONS
@@ -91,33 +88,12 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-    
-    /**
-     * Set plugin to state machine.
-     * This Method is called by CAknFepUIManagerChinese.
-     *
-     * @param aPlugin the plugin for sogou core
-     */
-    void SetPlugin( TAknFepInputMiniQwertySogouPinyinPhrasePlugin aPlugin );
-    
-    /**
-     * Set stroke plugin to state machine.
-     * This Method is called by CAknFepUIManagerChinese.
-     *
-     * @param aPlugin the stroke plugin for sogou core
-     */
-    void SetStrokePlugin( TAknFepInputMiniQwertySogouStrokePhrasePlugin aPlugin );
 
 protected:
     MAknFepUICtrlContainerChinese* iUIContainer;
     
    TBool iUseforResourcechange;    
-   
-   // The plugin for sogou core.
-   TAknFepInputMiniQwertySogouPinyinPhrasePlugin iPlugin;
-   
-   // The stroke plugin for sogou core
-   TAknFepInputMiniQwertySogouStrokePhrasePlugin iStrokePlugin;
+      
     };
 #endif//__AKN_FEP_UI_INPUTSTATE_CHINESE_BASE_H__
 // End of file
--- a/fep/aknfep/inc/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -53,9 +53,6 @@
     
     TBool HandleKeyForHalfAndCustomQwertyL( TInt aKey,
         TKeyPressLength aLength );
-
-    void SubmitTextL( const TDesC& aText );
-
 public: // Functions from MPtiObserver interface
     void KeyTimerExpired();
 private:
--- a/fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h	Wed Oct 13 14:55:58 2010 +0300
@@ -93,6 +93,7 @@
     * @param    aLength The key press length.
     */
     TBool HandleNaviKeysL(TInt aKey, TKeyPressLength aLength);
+    
 private:
 	
 	/**
@@ -111,6 +112,7 @@
 	* @Return   ETrue : yes it is on the key; EFalse : No it is not on the Key
     */
     TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const;
+
 };
 
 #endif //__AKN_FEP_UI_INPUT_STATE_ENTRY_QWERTY_WESTERN_PREDICTIVE_H__
--- a/fep/aknfep/inc/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -58,9 +58,6 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-    
-    void SubmitTextL( const TDesC& aText );
-
 protected:
 
     /**
--- a/fep/aknfep/inc/AknFepUiInputStatePredictiveInputMiniQwertyChinesePhrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStatePredictiveInputMiniQwertyChinesePhrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -47,9 +47,6 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-     
-    void SubmitTextL( const TDesC& aText );
-
     };
 
 #endif T_AKNFEPUIINPUTSTATEPREDINPUTCHINESEPHRASE_H_
--- a/fep/aknfep/inc/AknFepUiInputStateQwertyKorean.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiInputStateQwertyKorean.h	Wed Oct 13 14:55:58 2010 +0300
@@ -38,7 +38,9 @@
 private:
 
     virtual TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
-        
+    
+    void KeyTimerExpired();
+    
 private:
     
     };
--- a/fep/aknfep/inc/AknFepUiManagerBase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiManagerBase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -145,8 +145,6 @@
      * @since 2.6
      */
     void CloseUI();
-    
-    void CloseUIIn();
 
     /**
      * From MAknFepManagerInterface
@@ -444,7 +442,8 @@
     * @since 3.2
     */
     virtual TBool RollbackPreviousCharL();
-	
+    
+    	
 	/**
     * Check whether the character mapped on given key
     * @param    aKey    The scancode of the key to be checked.
@@ -455,6 +454,7 @@
     */
     TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const;
 
+
 #endif //RD_INTELLIGENT_TEXT_INPUT
 #endif // __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__
 
--- a/fep/aknfep/inc/AknFepUiManagerChinese.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/AknFepUiManagerChinese.h	Wed Oct 13 14:55:58 2010 +0300
@@ -104,8 +104,6 @@
      * @since 2.6
      */
     void CloseUI();
-    
-    void CloseUIIn();
 
     /**
      * From CAknFepUIManagerBase
@@ -276,8 +274,8 @@
      * @since 2.6
      */
     void ConstructL(TLanguage aLanguage);
-
-	/**
+    
+   /**
 	* Tell whether this key mapped valid zhuyin, pinyin, or cangjie symbol
 	*/
     TBool IsValidChineseInputSymbol(TInt aKey, TPtiEngineInputMode aMode) const;
@@ -287,6 +285,7 @@
 	*/
     TBool IsValidChineseToneMarkKey(TInt aKey, TPtiEngineInputMode aMode) const;
 
+
 private: // Data
     TAknFepInputStateChineseBase iFepUiState;
     MAknFepUICtrlContainerChinese* iContainerPane;
--- a/fep/aknfep/inc/aknfepuiinputminiqwertysogoupinyinphraseplugin.h	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:           
-*      Provides the TAknFepInputMiniQwertySogouPinyinPhrasePlugin declaration.
-*
-*/
-
-
-#ifndef T_AKNFEPUIINPUTMINIQWERTYSOGOUPINYINPHRASEPLUGIN_H
-#define T_AKNFEPUIINPUTMINIQWERTYSOGOUPINYINPHRASEPLUGIN_H
-
-class TAknFepInputMiniQwertySogouPinyinPhrasePlugin
-    {
-public:
-    
-    /**
-     * C++ default constructor
-     *
-     * @since S60 v3.2.3
-     * @param aOwner Pointer to UI manager state interface
-     * @param aUIContainer Pointer to Chinese UI container
-     * @param aState current state machine
-     */
-    TAknFepInputMiniQwertySogouPinyinPhrasePlugin(
-        MAknFepUIManagerStateInterface* aOwner,
-        MAknFepUICtrlContainerChinese* aUIContainer,
-        TUIState aState
-        );
-    
-    /**
-     * A patch to force the vtable to be copied during an assignment.
-     * 
-     * @param aState
-     */
-    void operator=(const TAknFepInputMiniQwertySogouPinyinPhrasePlugin& aPlugin);
-    
-public:       
-        /**
-         * Add phrase pinyin to the core.
-         *  
-         * @since S60 v3.2.3.
-         * @param aPhraseAdd that need to be added to the UDB.
-         * @return None.
-         */ 
-        void AddPhrasePinyinToPti(); 
-        
-        /**
-         * Analyse spelling after user press key.
-         * 
-         * @since S60 v3.2.3
-         * @param None.
-         * @return None.
-         */
-        void AnalyseL();
-        
-        /**
-         * Commint text to EEP or editor
-         *
-         * @since S60 V3.2.3
-         * @param aDes Text had been select from candidate pane
-         * @return ETrue if keep state, otherwise need to change to pridictive or editor
-         */
-        TBool CommitInlineEEPL( const TDesC& aDes );    
-        
-        /**
-         * Enable or disable the plugin.
-         *
-         * @since S60 v3.2.3
-         * @param aValid ETrue: enable the plugin, EFalse: disable the plugin.
-         * @return None
-         */
-        void Enable( TBool aValid );
-        
-        /**
-         * Detect whether the plugin enable or not.
-         *
-         * @since S60 v3.2.3
-         * @param None
-         * @return ETrue if the plugin is enable, others return EFalse.
-         */
-        TBool IsEnable();    
-        
-        /**
-         * Get the candidate info.
-         * 
-         * @since S60 v3.2.3.
-         * @param None.
-         * @return none.
-         */            
-        void GetCandidateL();
-        
-        /**
-         * Set whether to convert all stroke.
-         * 
-         * @since S60 v3.2.3.
-         * @param None.
-         * @return none.
-         */            
-        void CanConvertAll( TBool aEnable );
-        
-        /**
-         * Set the convert count.
-         * 
-         * @since S60 v3.2.3.
-         * @param None.
-         * @return none.
-         */            
-        void ConvertCount( TInt aCount );
-        
-private:
-        /**
-         * Check the delimiter of spelling.
-         * 
-         * @since S60 v3.2.3.
-         * @param aKeystroke the keystroke.
-         * @return ETrue if the param is delimiter, EFalse others.
-         */         
-        TBool CheckSpellingDLT( const TDesC& aKeystroke );
-        
-        /**
-         * Clear Keystroke of PtiEngine.
-         *
-         * @since S60 v3.2.3.
-         * @param None.
-         * @return None.
-         */
-        void ClearPtiEngineKeystroke();
-        
-        /**
-         * Get pinyin tone mark.
-         * 
-         * @since S60 v3.2.3.
-         * @param aKeystroke,The tone mark.
-         * @return pinyin tone mark.
-         */         
-        TInt ToneMark( const TDesC& aKeystroke );
-        
-        /**
-         * Check the spelling after add tone mark to the PTI.
-         * 
-         * @since S60 v3.2.3.
-         * @param aToneMark,The tone mark.
-         * @return ETue,if the splling is not phrase spelling,EFalse others.
-         */         
-        TBool CheckSpellingAddToneMarkToPTIL( const TInt aToneMark );        
-        
-        /**
-         * get the key code.
-         * 
-         * @since S60 v3.2.3
-         * @param aKey, the keycode.
-         * @param aKeystroke, the show keystroke.
-         * @return none.
-         */
-        void GetKeystrokeCode( TInt& aKey, const TDesC& aKeystroke );
-        
-        /**
-         * get the spell of least delimiter
-         *
-         * @since S60 v3.2.3
-         * @return the spell of least delimiter
-         */
-        TPtrC getCurrentLeastDLTSpell();    
-        
-        /**
-         * check result of tonemark.
-         *
-         * @since S60 v3.2.3
-         * @param aDes The result of tonemark
-         * @param aIndex The index
-         * @return NULL
-         */
-        void CheckResultOfToneMark( const TDesC16& aDes,
-                                    TInt& aIndex );
-        
-private:
-        /**
-         * The ui manager
-         */        
-        MAknFepUIManagerStateInterface* iOwner;
-                
-        /**
-         * The ui container.
-         */
-        MAknFepUICtrlContainerChinese* iUIContainer;
-        
-        /**
-         * The machine state
-         */           
-        TUIState iState;
-        
-        /**
-         * The flag for judge the plugin enable or not
-         */               
-        TBool iValid;
-        
-        /**
-         * The flag for adding DLT at the first index.
-         */ 
-        TBool iNeedAddDLT;
-        
-        /**
-         * The flag for convert all stroke.
-         */ 
-        TBool iCanConvertAll;
-        
-        /**
-         * The count of stroke need to be convert.
-         */ 
-        TInt iConvertCount;
-    };		
-
-#endif //T_AKNFEPUIINPUTMINIQWERTYSOGOUPINYINPHRASEPLUGIN_H
-
-// End of file
--- a/fep/aknfep/inc/aknfepuiinputminiqwertysogoustrokephraseplugin.h	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:           
-*      Provides the TAknFepInputMiniQwertySogouStrokePhrasePlugin declaration.
-*
-*/
-
-
-#ifndef T_AKNFEPUIINPUTMINIQWERTYSOGOUSTROKEPHRASEPLUGIN_H
-#define T_AKNFEPUIINPUTMINIQWERTYSOGOUSTROKEPHRASEPLUGIN_H
-
-class TAknFepInputMiniQwertySogouStrokePhrasePlugin
-    {
-public:
-    
-    /**
-     * C++ default constructor
-     *
-     * @since S60 v3.2.3
-     * @param aOwner Pointer to UI manager state interface
-     * @param aUIContainer Pointer to Chinese UI container
-     * @param aState current state machine
-     */
-    TAknFepInputMiniQwertySogouStrokePhrasePlugin(
-        MAknFepUIManagerStateInterface* aOwner,
-        MAknFepUICtrlContainerChinese* aUIContainer,
-        TUIState aState
-        );
-    
-    /**
-     * A patch to force the vtable to be copied during an assignment.
-     * 
-     * @param aState
-     */
-    void operator=(const TAknFepInputMiniQwertySogouStrokePhrasePlugin& aPlugin);
-    
-public:       
-        
-        /**
-         * Add phrase pinyin to the core.
-         *  
-         * @since S60 v3.2.3.
-         * @param aPhraseAdd that need to be added to the UDB.
-         * @return None.
-         */ 
-        void AddPhrasePinyinToPti(); 
-        
-        /**
-         * Commint text to EEP or editor
-         *
-         * @since S60 V3.2.3
-         * @param aDes Text had been select from candidate pane
-         * @return ETrue if keep state, otherwise need to change to pridictive or editor
-         */
-        TBool CommitInlineEEPL( const TDesC& aDes );        
-        
-        /**
-         * Enable or disable the plugin.
-         *
-         * @since S60 v3.2.3
-         * @param aValid ETrue: enable the plugin, EFalse: disable the plugin.
-         * @return None
-         */
-        void Enable( TBool aValid );
-        
-        /**
-         * Detect whether the plugin enable or not.
-         *
-         * @since S60 v3.2.3
-         * @param None
-         * @return ETrue if the plugin is enable, others return EFalse.
-         */
-        TBool IsEnable();        
-        
-private:
-        /**
-         * The ui manager
-         */        
-        MAknFepUIManagerStateInterface* iOwner;
-        
-        /**
-         * The ui container.
-         */
-        MAknFepUICtrlContainerChinese* iUIContainer;
-        
-        /**
-         * The machine state
-         */           
-        TUIState iState;
-        
-        /**
-         * The flag for judge the plugin enable or not
-         */               
-        TBool iValid;
-    };		
-
-#endif //T_AKNFEPUIINPUTMINIQWERTYSOGOUSTROKEPHRASEPLUGIN_H
-
-// End of file
--- a/fep/aknfep/inc/aknfepuiinputstateminiqwertystrokephrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/aknfepuiinputstateminiqwertystrokephrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -72,9 +72,6 @@
       * @param aCommandId Command ID value
       */
      void HandleCommandL( TInt aCommandId );
-     
-     void SubmitTextL( const TDesC& aText );
-
     };
 
 /**
@@ -115,8 +112,6 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-    
-    void SubmitTextL( const TDesC& /*aText*/ );
     };
 
 /**
@@ -148,9 +143,6 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-    
-    void SubmitTextL( const TDesC& aText );
-
 protected:
 
     /**
@@ -163,7 +155,6 @@
      * @return ETrue if handle, otherwise this class do not handle this key
      */
     TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
-
     };
 
 #endif /*__AKN_FEP_UI_INPUT_STATE_MINIQWERTY_STROKEPHRASECREATION_H__*/
--- a/fep/aknfep/inc/aknfepuiinputstateminiqwertyzhuyinphrase.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/inc/aknfepuiinputstateminiqwertyzhuyinphrase.h	Wed Oct 13 14:55:58 2010 +0300
@@ -174,18 +174,6 @@
       * @return None.
       */
      void ShowEEPInfo();
-     
-     /**
-       * Submit text
-       * @param aText text
-       */
-     void SubmitTextL( const TDesC& aText );
-     
-protected:
-     void CommitCandidateL();
-     
-     TInt GetIndexOfToneMark( const TDesC& aText);
-
     };
 
 /**
@@ -218,18 +206,8 @@
      * @param aCommandId Command ID value
      */
     void HandleCommandL( TInt aCommandId );
-    
-    /**
-      * Submit text
-      * @param aText text
-      */
-    void SubmitTextL( const TDesC& aText );
-    
+
 private:
-    
-    void CommitCandidateL();
-    
-    TInt GetIndexOfToneMark( const TDesC& aText);
     /**
      * From TAknFepInputStateCandidateBasePhrase
      * Handle system key press
@@ -310,12 +288,6 @@
      * @since S60 v3.2
      */
     TInt GetIndexOfToneMark( const TDesC& aText);
-    
-    /**
-      * Submit text
-      * @param aText text
-      */
-    void SubmitTextL( const TDesC& aText );
     };
 
 #endif /*AKNFEPUIINPUTSTATEMINIQWERTYZHUYINPHRASE_H_*/
--- a/fep/aknfep/peninputplugins/PeninputPluginKr/src/PluginKrFepManagerBase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/src/PluginKrFepManagerBase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -539,9 +539,13 @@
     // Not derived from edwin
     if ( aPermittedMode == EAknEditorNumericInputMode ) 
         {
-        // Only number range is supported in Korean Variant
-        iPermittedRange = ERangeNumber;
+        if ( SupportNativeNumberRange() )
+            {
+            iPermittedRange = ERangeNativeNumber;
+            }
+        iPermittedRange |= ERangeNumber;
         }
+        
     else if ( aPermittedMode & EAknEditorTextInputMode )
         {
         // Derived from edwin and EAknEditorTextInputMode
--- a/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -295,6 +295,7 @@
                                              + sizeof(TInt) // for langcode
                                              + sizeof(TInt)*( itemArray->Count() ) // For the size of each item
                                              + sumSize// For all of char data 
+                                             + 4*sizeof(TInt) // For the Rect
                                              );
                 TPtr8 buf8Ptr = buf8->Des();
                 RDesWriteStream writeStream;
@@ -309,6 +310,12 @@
                     writeStream.WriteInt32L( (*itemArray)[i].Size() );
                     writeStream.WriteL( (*itemArray)[i].Ptr(), (*itemArray)[i].Length() );
                     }
+                
+                writeStream.WriteInt32L( candidatelist->iRect.iTl.iX);
+                writeStream.WriteInt32L( candidatelist->iRect.iTl.iY );
+                writeStream.WriteInt32L( candidatelist->iRect.iBr.iX);
+                writeStream.WriteInt32L( candidatelist->iRect.iBr.iY );
+                
                 writeStream.CommitL();                 
                 CleanupStack::PopAndDestroy( &writeStream );
                 SendCommandToServer( aCommandId, buf8Ptr );
--- a/fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -220,10 +220,11 @@
             RArray<TInt> sizeArray;
             for (TInt i = 0; i < count; i++)
                 {
-				TInt size = (*listArray)[i].Size();
+                TInt size = (*listArray)[i].Size();
                 sizeArray.Append(size);
                 transferSize += size + sizeof(TInt);
                 }
+            transferSize += 4 * sizeof( TInt );
 
             HBufC8* buf = HBufC8::NewLC(transferSize);
             TPtr8 bufPtr = buf->Des();
@@ -242,14 +243,19 @@
                 const TUint16* piData = (*listArray)[i].Ptr();
                 writeStream.WriteL(piData, sizeArray[i] / 2);
                 }
-			
+            
+            writeStream.WriteInt32L( pCanData->iRect.iTl.iX );
+            writeStream.WriteInt32L( pCanData->iRect.iTl.iY );
+            writeStream.WriteInt32L( pCanData->iRect.iBr.iX );
+            writeStream.WriteInt32L( pCanData->iRect.iBr.iY );            
+            
             writeStream.CommitL();
         
             SendCommandToServer( aCommandId, bufPtr );
 
             sizeArray.Close();    
-			CleanupStack::PopAndDestroy(&writeStream);
-			CleanupStack::PopAndDestroy(buf);
+            CleanupStack::PopAndDestroy(&writeStream);
+            CleanupStack::PopAndDestroy(buf);
             
             }
             break;
--- a/fep/aknfep/src/AknFepKeyCatcher.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepKeyCatcher.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -456,8 +456,7 @@
 	// block the subsequent long key press also	
 	if ( length == EShortKeyPress && !iFepMan.EditorHasFreeSpace() 
 		&& iFepMan.PtiEngine()->IsValidKey((TPtiKey)aKeyEvent.iScanCode)   
-		&& !iFepMan.IsFlagSet(CAknFepManager::EFlagInsideMultitapInlineEditingTransaction)
-        && (iFepMan.InputMode() != EHangul ) ) 
+		&& !iFepMan.IsFlagSet(CAknFepManager::EFlagInsideMultitapInlineEditingTransaction) ) 
     	{
     	SetFlag(EFlagBlockAllLongKeyPressEvents); // block the subsequent long key press also
     	return EKeyWasNotConsumed;
--- a/fep/aknfep/src/AknFepManager.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepManager.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -239,6 +239,9 @@
 // The passwd timeout is same as defined on CEikSecretEditor.
 const TInt KSyncPasswdTimeout = 1000000;
 
+// The offset to show underline
+const TInt KUnderlineHeight = 4;
+
 #ifdef RD_SCALABLE_UI_V2
 TUid AppUidFromWndGroupId(TInt aWndGrpId);
 extern TUid GetCurAppUid();
@@ -1692,34 +1695,13 @@
                     //This condition is added for Hindi language in case of multitapping of EKey1 to get 
                     //a numeral value "1" because of a clasical case of Halant and ZWS getting added 
                     //before numeral 1 which may affect incase of limited space in editor   
-                    
-
-
-
-
-                    // Is the language Indic?
-                    TBool isIndicLanguage = TAknFepUiIndicInputManager::IsIndicLangauge(
-                                               TLanguage(iLanguageCapabilities.iInputLanguageCode)); 
-
-                    // Is the state in Multitap of the Inline Text   
-                    TBool  isFlagInsideMultitapInlineEditingTransaction = 
-                                                 IsFlagSet(EFlagInsideMultitapInlineEditingTransaction);
-
-                    // Is the state of the text inline when long pressing key event occurs
-                    TBool  isInlineEditorTransactionLongKeyPress = IsFlagSet(EFlagInsideInlineEditingTransaction)
-                                                               && ( aLength == ELongKeyPress );
-
-                    // Is the state of the text inline when current mode is Koeran.
-                    TBool isInlineEditorTranscationKoreanMode = IsFlagSet(EFlagInsideInlineEditingTransaction)
-                                                                && ( iMode == EHangul ); 
-
-                    // Don't check the free space of the editor 
-                    // when current mode is Hangul and current editor state is inline state.
-                    if ( EditorHasFreeSpace()
-                        || (!WesternPredictive() && !EditorHasFreeSpace() && isIndicLanguage )
-                        || isFlagInsideMultitapInlineEditingTransaction
-                        || isInlineEditorTransactionLongKeyPress  
-                        || isInlineEditorTranscationKoreanMode )
+                        
+                    if (( EditorHasFreeSpace()
+                        || (!WesternPredictive() && !EditorHasFreeSpace() && 
+                           (TAknFepUiIndicInputManager::IsIndicLangauge(
+                            TLanguage(iLanguageCapabilities.iInputLanguageCode)))) 
+                        || IsFlagSet(EFlagInsideMultitapInlineEditingTransaction)
+                        || (IsFlagSet(EFlagInsideInlineEditingTransaction) && aLength == ELongKeyPress)))
                         {
                         ClearFlag(EFlagEditorFull);
 
@@ -3150,7 +3132,7 @@
     	{
     	FepUI()->HandleKeyL(EKeyLeftCtrl, EShortKeyPress);    
    	}*/
-
+    
     //The default value of response is EKeyWasConsumed. So in some case, fep don¡¯t 
     //do anything, but it return Consumed.
     //This make app miss the event EEventKeyUp. 
@@ -3561,6 +3543,32 @@
 	HandleChangeInFocus();
 	}
 
+// -----------------------------------------------------------------------------
+// CAknFepManager::InitRectForSplitCandL
+// Returns initial rectangle used for the top-left point of split candidate.
+// -----------------------------------------------------------------------------
+//
+TRect CAknFepManager::InitRectForSplitCandL()
+    {
+    //  Popup Position was not right for RTL
+    TInt documentOffset = iLanguageCapabilities.iRightToLeftLanguage ?
+                            0 : iPtiEngine->CurrentWord().Length();
+    
+    // Determine the place where to spawn the candidate popup.
+    TPoint  inlineEditorTl;
+    TPoint  inlineEditorBr;
+    TInt    height;
+    TInt    ascent;
+    GetScreenCoordinatesL( inlineEditorTl, height, ascent, documentOffset );
+    GetScreenCoordinatesL( inlineEditorBr, height, ascent );
+        
+    // move 4 pixeles down to show underline when pops up candidate.
+    inlineEditorTl.iY += KUnderlineHeight;
+    inlineEditorBr.iY += KUnderlineHeight;
+    
+    return TRect( inlineEditorTl, inlineEditorBr );
+    }
+
 void CAknFepManager::HandleDestructionOfFocusedItem()
     {
     if (iInputCapabilities.FepAwareTextEditor())
@@ -3918,21 +3926,27 @@
             if( IsFlagSet( EFlagInsideInlineEditingTransaction ) )
                 {
                 if (IsFeatureSupportedJapanese())
-			        {
-			        TryCloseUiL();
-			        }
-			    else
-			        {
-#ifdef RD_INTELLIGENT_TEXT_INPUT			        
-			        iPtiEngine->CommitCurrentWord();
-					CommitInlineEditL();
-			        TryCloseUiL();
+                    {
+                    TryCloseUiL();
+                    }
+                else
+                    {
+#ifdef RD_INTELLIGENT_TEXT_INPUT                    
+                    iPtiEngine->CommitCurrentWord();
+                    CommitInlineEditL();
+                    TryCloseUiL();
 
 #else
-					CommitInlineEditL();
-#endif			        
-			        }
-                }
+                    CommitInlineEditL();
+#endif                    
+                    }
+                }
+            
+            // The flag should be removed when touch input is not launched. 
+            if ( IsExtendedFlagSet( EExtendedFlagPointInNoMatchEditor ) )
+            	{
+                ClearExtendedFlag( EExtendedFlagPointInNoMatchEditor );
+            	}
             break;      
         case CAknExtendedInputCapabilities::MAknEventObserver::EControlContentUpdatedInternally:
             SendEventsToPluginManL( EPluginSyncFepAwareText, EPluginSyncAll );
@@ -3942,6 +3956,8 @@
             // to be displayed.        
             LaunchStylusCcpuMenuL(iClickPoint);
             break;
+        default:
+            break;
         }    
     }
     
@@ -4272,9 +4288,7 @@
         // Edit mode menu commands
         //The soft CBA event from touch screen. 
         case EAknSoftkeyCancel:
-      //  case (TUint16)EAknSoftkeyCancel:
         case EAknSoftkeySelect:
-     //   case (TUint16)EAknSoftkeySelect:
         currentFepUI = FepUI();
         if (currentFepUI)
             currentFepUI->HandleCommandL( aCommandId );
@@ -5599,29 +5613,6 @@
         AddInputLanguageItemL(aMenuPane, posToInsertItem);
         }
     }
-
-// -----------------------------------------------------------------------------
-// To check if the menu with the CascadeId exist in menupane
-// -----------------------------------------------------------------------------
-TBool CAknFepManager::MenuItemExistL( CAknFepUiInterfaceMenuPane* aMenuPane, 
-									 TInt aCascadeId, TInt &aPosition )
-    {
-    TInt numOfMenuItems = aMenuPane->NumberOfItemsInPane();
-    CEikMenuPane* menuPane = aMenuPane->GetMenuPane();
-
-    TInt index;
-    for( index = 0; index < numOfMenuItems ; ++index )
-        {
-        CEikMenuPaneItem::SData& itemData = menuPane->ItemDataByIndexL( index );
-        if( itemData.iCascadeId == aCascadeId )
-            {
-            aPosition = index;
-            return ETrue;
-            }
-        }
-    return EFalse;
-    }
-
 #endif // RD_INTELLIGENT_TEXT_INPUT
 
 
@@ -5658,10 +5649,7 @@
     if (iRememberLength > 0 || (iEditorCcpuStatus & ECcpuStatusFlagCanPaste))
         {
 		if (aMenuPane->MenuItemExists(EAknCmdEditItemPlaceHolder, index) ||
-#ifdef RD_INTELLIGENT_TEXT_INPUT
-            MenuItemExistL( aMenuPane, R_AKNFEP_PRED_INPUT_OPTIONS_SUBMENU, index ) ||
-#endif //RD_INTELLIGENT_TEXT_INPUT 
-            aMenuPane->MenuItemExists(EAknCmdInputLanguage, index) ||
+				aMenuPane->MenuItemExists(EAknCmdInputLanguage, index) ||
 		    aMenuPane->MenuItemExists(EAknCmdHelp, index) || 
             aMenuPane->MenuItemExists(EAknCmdExit, index))  
             {
@@ -6473,6 +6461,14 @@
         aMenuPane->SetItemDimmed(EAknCmdEditModeLatinText, ETrue);
         aMenuPane->SetItemDimmed(EChinFepCmdModeLatinUpper, ETrue);
         aMenuPane->SetItemDimmed(EChinFepCmdModeLatinLower, ETrue);
+        if( iMode == EHangul || inputLanguage == ELangKorean)
+            {
+            TInt index;
+            if ( aMenuPane->MenuItemExists( EAknCmdEditModeKorean, index ) )
+                {
+                aMenuPane->SetItemDimmed(EAknCmdEditModeKorean, EFalse);
+                }
+            }
         }
 
     if ( IsModePermitted(ENumber) )
@@ -7081,6 +7077,38 @@
 
 void CAknFepManager::HandlePointerEventInInlineTextL(TPointerEvent::TType /*aType*/, TUint /*aModifiers*/, TInt /*aPositionInInlineText*/)
     {
+    if( iFepPluginManager && iLangMan && iLangMan->IsSplitView() )
+        {
+        switch ( iFepPluginManager->PluginInputMode() )
+            {
+            case EPluginInputModeFSQ:
+            //case EPluginInputModePortraitFSQ:
+                {
+                if ( iExactWordPopupContent )
+                	{
+                    iExactWordPopupContent->HidePopUp();
+                	}
+                
+                iFepPluginManager->HandleServerEventL( ESignalShowCandidate );
+                }
+                break;
+            case EPluginInputModeItut:
+                {
+                if( IsExtendedFlagSet( EExtendedFlagPointInNoMatchEditor ) )
+                    {
+                    ClearExtendedFlag( EExtendedFlagPointInNoMatchEditor );
+                    iFepPluginManager->HandleServerEventL( ESignalEnterSpellMode );
+                    }
+                else
+                    {
+                    iFepPluginManager->EnterMatchSelectionState();
+                    }
+                }
+                break;
+            default:
+                break;
+            }
+        }
     }
 
 void CAknFepManager::GetFormatOfFepInlineText(TCharFormat& aFormat, 
@@ -10052,8 +10080,7 @@
 	                }
                 else
                     {
-                    if(IsKoreanInputLanguage( ) && !IsQwerty() &&
-                    		IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
+                    if(IsKoreanInputLanguage( ) && IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
                         {
                         showCursor = EFalse;
                         }
@@ -10727,13 +10754,12 @@
             // Any latin input mode is not permitted by the editor.
             // For compatibility permitted japanese input modes are checked and
             // corresponding latin input modes are allowed.
-            if ( iPermittedInputModes & ( EAknEditorKatakanaInputMode |
+            if ( iPermittedInputModes & (EAknEditorKatakanaInputMode |
                                     EAknEditorHalfWidthTextInputMode |
                                     EAknEditorFullWidthTextInputMode |
                                     EAknEditorFullWidthKatakanaInputMode |
                                     EAknEditorHiraganaKanjiInputMode |
-                                    EAknEditorHiraganaInputMode
-                                    | EAknEditorHangulInputMode ) )
+                                    EAknEditorHiraganaInputMode))
                 {
                 iPermittedInputModes |= EAknEditorTextInputMode;
                 }
@@ -10744,13 +10770,12 @@
 
             if ( !(defaultInputMode & (EAknEditorTextInputMode | EAknEditorNumericInputMode)))
                 {
-                if ( defaultInputMode & ( EAknEditorKatakanaInputMode |
+                if (defaultInputMode & (EAknEditorKatakanaInputMode |
                                     EAknEditorHalfWidthTextInputMode|
                                     EAknEditorFullWidthTextInputMode |
                                     EAknEditorFullWidthKatakanaInputMode |
                                     EAknEditorHiraganaKanjiInputMode |
-                                    EAknEditorHiraganaInputMode
-                                    | EAknEditorHangulInputMode ) )
+                                    EAknEditorHiraganaInputMode))
                     {
                     defaultInputMode = EAknEditorTextInputMode;
                     }
@@ -10838,7 +10863,7 @@
             {        
             if (IsKoreanInputLanguage())
             	{
-                if( iMode == EAknEditorNullInputMode )
+                if(iMode == EHangul || iMode == ENumber || iMode == EAknEditorNullInputMode )
             		{
             		SetWesternPredictive(EFalse);
          			TryChangeModeL(EHangul);
@@ -10854,12 +10879,6 @@
             	TryChangeModeL(ELatin); 
             	}
             }
-        else if ( editorMode == EAknEditorHangulInputMode )
-        	{
-            // Choose EHangul as the current fep mode 
-            // if the editor mode stored in editor state is EAknEditorHangulInputMode. 
-            TryChangeModeL(EHangul);        
-        	}        
         else if (!iStrokeUsedInQWERTY)
         	{
         	if (editorMode == EStroke && sharedDataMode == ECangJie)
@@ -11470,7 +11489,7 @@
                 }
             break;
     	case EHangul: 
-       		editorMode = EAknEditorHangulInputMode;       	
+       		editorMode = EAknEditorTextInputMode;       	
        		break;
         default:
             if (IsFeatureSupportedJapanese())
@@ -12343,30 +12362,31 @@
 	        }
   
         if (!iLanguageCapabilities.iLocalInputLanguageInUse)
-            {
-            switch (iSharedDataInterface->InputTextLanguage())
-                {
-                case ELangPrcChinese:
-                    {
-                    iSharedDataInterface->SetInputMode(EPinyin);
-                    SetFlag(EFlagNewSharedDataInputMode);
-                    break;
-                    }
+        	{
+        	switch (iSharedDataInterface->InputTextLanguage())
+            	{
+            	case ELangPrcChinese:
+            		{
+            		iSharedDataInterface->SetInputMode(EPinyin);
+            		SetFlag(EFlagNewSharedDataInputMode);
+            		break;            		
+            		}
             	case ELangTaiwanChinese:
-                    {
-                    iSharedDataInterface->SetInputMode(EZhuyin);
-                    SetFlag(EFlagNewSharedDataInputMode);
-                    break;
-                    }
-                case ELangHongKongChinese:
-                    {
-                    iSharedDataInterface->SetInputMode(EStroke);
-                    SetFlag(EFlagNewSharedDataInputMode);
-                    break;
-                    }
-                default:
-                    break;
-                }
+            		{
+            	    iSharedDataInterface->SetInputMode(EZhuyin);
+            	    SetFlag(EFlagNewSharedDataInputMode);
+            	    break;
+            		}
+            	case ELangHongKongChinese:
+            		{
+            	    iSharedDataInterface->SetInputMode(EStroke);
+            	    iSharedDataInterface->SetCangJieMode(ECangJieNormal);
+            	    SetFlag(EFlagNewSharedDataInputMode);
+            	    break;
+            		}
+            	default:
+            		break;
+            	}
             }
 
     	SetHashKeyStyle();
@@ -13911,16 +13931,6 @@
         	    }        
             }
         }
-
-    if ( FeatureManager::FeatureSupported(KFeatureIdKorean) )
-        {
-        // Use the special sct resource file for Korean variant.
-        if (currentEditorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
-            {
-            currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
-            }
-        }
-    
     if (currentEditorSCTResId == EDefaultSCTResourceId) // -1 forces the default in SCT resource definition
         {
         if (iAknEditorFlags & EAknEditorFlagLatinInputModesOnly)
@@ -13955,12 +13965,7 @@
                 if ( FeatureManager::FeatureSupported(KFeatureIdChinese) )
                     {    
                     currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
-                    }                
-                else if( FeatureManager::FeatureSupported(KFeatureIdKorean) )
-                    {    
-                    // Use the special sct resource file for Korean variant.
-                    currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
-                    }               
+                    }
                 else
                     {                    
                     currentEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
@@ -15275,26 +15280,6 @@
         {
         return response;
         }
-    
-    // You will not understand the flowing lines, 
-    // for it is just a "hole stem" than normal logic.
-    //
-    // Let me explain: 
-    // In HWR, 4x12 keyboard is used, and predictive should be disabled for it.
-    // unfortunately, the existed codes enable predictive in some special case.
-    // when you switch from FSQ to HWR, with ITI on, you will get that.
-    // then if you press arrow key, 
-    // the code blow of "HandlePredictiveNaviEventOutsideInlineEditL" will be called.
-    // which is writen for FSQ, not HWR, that finally cause navi-event being consumed.
-    // No navigation action being performed.
-    //
-    // It is not a complete fix, just for simplicity. 
-    if (iFepPluginManager && 
-        iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
-        {
-        return EKeyWasNotConsumed;
-        }
-
     if (WesternPredictive())
         {
         response = HandlePredictiveNaviEventOutsideInlineEditL(aCode, aLength);
@@ -15648,24 +15633,7 @@
             // we have text selected - set cursor to start/end of current selection
             TTmDocPosSpec newPos;
             aResponse = NavigateFromSelectionL( currentEditorSelection, naviEvent, newPos );
-            
-            // You will not understand the following lines, 
-            // for it is just a "hole stem" than normal logic.
-            //
-            // Let me explain: 
-            // In HWR, 4x12 keyboard is used, and predictive should be disabled for it.
-            // unfortunately, the existing codes enable predictive in some special case.
-            // when you switch from FSQ to HWR, with ITI on, you will get that.
-            // then if you select some words and press arrow key, 
-            // the if bratch of the code blow will be excuted.
-            // which is writen for FSQ, not HWR, 
-            // MoveCursorToEndOfWordL or MoveCursorToStartOfWordL is called unexpected
-            //
-            // It is not a complete fix, just for simplicity.
-            TBool isFingerHwr = ( iFepPluginManager != NULL ) && 
-								( iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr );
-
-            if ( aCode != EKeyBackspace && !isFingerHwr && WesternPredictive() )
+            if ( aCode != EKeyBackspace && WesternPredictive() )
                 {
                 if (CursorInsideWord())
                     {
@@ -18437,14 +18405,6 @@
             charMap = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
             }
         }
-    else if ( FeatureManager::FeatureSupported(KFeatureIdKorean) )
-        {     
-        // Use the special sct resource file for Korean variant.
-        if (charMap == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
-            {
-            charMap = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
-            }
-        }
     if (!charMap)
         {
         // override numeric keymap if necessary. flag is for non standard charmaps
@@ -18464,7 +18424,10 @@
         {
     	currentEditorSCTResId = charMap;
         }
-    if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap)
+    if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap && 
+       ( R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY == currentEditorSCTResId || 
+         R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId || 
+         R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId) )
         {
         TBool isEmpty = ETrue;
         TRAP_IGNORE(isEmpty = GetSctLengthL(charMap));
@@ -18578,7 +18541,7 @@
                 {
                 SetStopProcessFocus(ETrue, EFalse);
                 iFepPluginManager->SetMenuState();            
-                }                      
+                }            
              else if (!iFepPluginManager->IsGlobleNotes())
                 {
                 iFepPluginManager->ClosePluginInputUiL( ETrue );
@@ -18636,9 +18599,10 @@
                      iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
                      iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr ||
                      iFepPluginManager->PluginInputMode() == EPluginInputModePortraitFSQ )
+
                     {
                     SetStopProcessFocus(EFalse);
-                    }                      
+                    }            
                  else
                     {
                     HandleChangeInFocus();
@@ -19016,9 +18980,11 @@
     }   
 void CAknFepManager::HandlePointerEventL(const TPointerEvent& aPointerEvent)
     {
-    if (IsFlagSet(CAknFepManager::EFlagNoMatches))
-        {
-        ClearFlag(CAknFepManager::EFlagNoMatches); 
+    if ( IsFlagSet( CAknFepManager::EFlagNoMatches ) )
+        {
+	    // Set this flag to launch spell mode on split itut 
+        SetExtendedFlag( EExtendedFlagPointInNoMatchEditor );
+		ClearFlag(CAknFepManager::EFlagNoMatches); 
         }
    
     if(aPointerEvent.iType == TPointerEvent::EDrag)
@@ -20870,7 +20836,7 @@
     	}       
     return EFalse;    
     }    
-void CAknFepManager::ChangeMfneAmPmL()
+void CAknFepManager::ChangeMfneAmPm()
     {
 	//trigger when touch at "AM" or "PM" in ICF
     if (iInputCapabilities.FepAwareTextEditor() && IsMfneEditor() )
@@ -21042,47 +21008,6 @@
 	TRAP_IGNORE( SendEventsToPluginManL( EPluginHideTooltip ));
 	}
 
-//========================================================================
-//
-// This function judge whether the texts inputted exceed 
-// the max length of the editor. 
-// 
-//========================================================================
-TBool CAknFepManager::IsTextExceedLeghthEditor( TInt aNewInlineTextLenght )
-	{
-    
-    // Get the length of the newest text that contains uncommitted texts 
-	TInt curPos = iUncommittedText.iAnchorPos + aNewInlineTextLenght;
-    
-    // Get the length of the text that is newly increased in uncommitted texts.
-	TInt deltaCur = curPos - iUncommittedText.iCursorPos;
-	
-    // Get the max length of the editor
-	TInt maxEdSize = iInputCapabilities.FepAwareTextEditor()->DocumentMaximumLengthForFep();
-
-    // Get the length of current the texts in the editor. The texts contain committed and uncomitted.    
-	TInt docLength = iInputCapabilities.FepAwareTextEditor()->DocumentLengthForFep();
-	
-      // DeltaCur is greater than zero.
-      if((maxEdSize > 0) && ( deltaCur > 0 ) 
-							&& (( docLength + deltaCur) > maxEdSize ) )
-         {
-         return ETrue;
-         }
-      // DeltaCur is negative. For example uncommitted texts contain candidate words.
-      else if ( (maxEdSize > 0) && (curPos > maxEdSize) )
-          {
-          return ETrue;
-          }
-        else
-          {
-
-          // Not exceeding the max length of editor
-          return EFalse;
-          }
-	}
-
-
 TBool CAknFepManager::IsExactWordPopUpShown()
 	{
 #ifdef RD_SCALABLE_UI_V2 
@@ -21351,12 +21276,12 @@
 // ---------------------------------------------------------------------------
 //
 void CAknFepManager::HandleFnKeyPressMonitor()
-	{	
+	{
 	 DeactivateFnkeyPressMonitor();
 	 if (IsExtendedFlagSet ( EExtendedFlagFnKeyNeedLockMode ) )
 		 {
 	      iFnKeyManager->SetFnKeyState(CAknFepFnKeyManager::EFnKeyLock);
-		 }
+		}
 	}
 
 // ---------------------------------------------------------------------------
@@ -21371,8 +21296,7 @@
 	      if ( iFnKeypressMonitor->IsActive() )
 	    	  {
 	           iFnKeypressMonitor->Cancel();
-	    	  }
-	      
+	    	  }	      
 		  iFnKeypressMonitor->Start(KFnKeyLongPressTimeout, KFnKeyLongPressTimeout, 
 							   TCallBack(HandleFnKeyPressMonitorCallback, this));
 		 }
--- a/fep/aknfep/src/AknFepPluginManager.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepPluginManager.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -60,6 +60,7 @@
 #include <AknFepGlobalEnums.h>
 #include <AknFepInternalCRKeys.h>
 #include <AknFepInternalPSKeys.h>
+#include <aknFepVietnameseInputTables.h>
 
 // User includes
 #include "AknFepManagerInterface.h" // MAknFepManagerInterface
@@ -221,7 +222,6 @@
     
     if( iPenInputSvrConnected )
         {
-        iPenInputServer.RemovePenUiActivationHandler( this );
         iPenInputServer.Close();
         iPenInputSvrConnected = EFalse;
         }
@@ -317,10 +317,7 @@
     if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() )
         {
         if( iFepMan.FepAwareTextEditor() )
-            {
-            // Enable transition effect when close pen ui 
-            // by pressing close button.
-            iPenInputServer.EnableGfxTransEffect( ETrue );
+            {            
   			iPreferredUiMode = ETrue;	
             TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()),
                                             EPenInputOpenManually,
@@ -532,7 +529,7 @@
                 break;  
             case ESignalChangeAmPm:
                 {
-                iFepMan.ChangeMfneAmPmL();
+                iFepMan.ChangeMfneAmPm();
                 }
                 break;
             case ESignalSetAppEditorCursor:
@@ -578,8 +575,6 @@
                 }
                 break;
             case ESignalLayoutClosed:
-            	// Enable transition effect when close pen ui by pressing close button.
-            	iPenInputServer.EnableGfxTransEffect( ETrue );
                 if(iPluginInputMode == EPluginInputModeItut)
                 	{
 					iFepMan.PtiEngine()->CancelTimerActivity();
@@ -679,17 +674,21 @@
                 TInt activeIdx = 0;
                 CDesCArray* candidates = new (ELeave) CDesCArrayFlat
                                                  ( KDefaultCandidateArraySize );
-        		CleanupStack::PushL( candidates );
-        		iFepMan.GetCandidatesL(*candidates, activeIdx);
-
-        		TFepITICandidateList candidateListData;
-        		candidateListData.iItemArray = candidates;
-        		candidateListData.iActiveIndex 
-        		            = ( candidates->Count() >= 2 ) ? 1 : activeIdx;  
-        		candidateListData.iLangCode = iFepMan.CurrentInputLangCode();
-        		
-        		ShowCandidateListL( candidateListData );        		
-        		CleanupStack::PopAndDestroy( candidates );                
+                CleanupStack::PushL( candidates );
+                iFepMan.GetCandidatesL(*candidates, activeIdx);
+
+                TFepITICandidateList candidateListData;
+                candidateListData.iItemArray = candidates;
+                candidateListData.iActiveIndex 
+                            = ( candidates->Count() >= 2 ) ? 1 : activeIdx;  
+                candidateListData.iLangCode = iFepMan.CurrentInputLangCode();
+                if ( iLangMan.IsSplitView() )
+                    {
+                    candidateListData.iRect = iFepMan.InitRectForSplitCandL();
+                    }
+                
+                ShowCandidateListL( candidateListData );                
+                CleanupStack::PopAndDestroy( candidates );                
                 }
                 break;
                 
@@ -924,7 +923,7 @@
 	
 	return edwinState;
 	}
-
+	
 // -----------------------------------------------------------------------------
 // CAknFepPluginManager::HandleEventsFromFepL
 // Handle events from FEP
@@ -1007,12 +1006,6 @@
             {
             iForegroundChange = ETrue;   
             iLaunchHelp = EFalse;    
-
-            // Remove pen ui activation observer
-            if (iPenInputSvrConnected && !aEventData )
-                {
-                iPenInputServer.RemovePenUiActivationHandler( this );
-                }            
             
             if (!aEventData && IsInGlobleNoteEditor())
                 {
@@ -1339,21 +1332,6 @@
             }
         }
 
-    if(aSuggestMode == EPluginInputModeFingerHwr 
-            && iSharedData.InputTextLanguage() == ELangArabic)
-        {
-        if(IsEditorSupportSplitIme())
-            {
-            if(landscape)
-                {
-                aSuggestMode = EPluginInputModeFSQ;
-                }
-            else
-                {
-                aSuggestMode = iSharedData.PluginPortraitInputMode();                
-                }
-            }
-        }
 
     if ( aSuggestMode == EPluginInputModeFSQ)
         {
@@ -1409,15 +1387,6 @@
                 }
             }
         }
-    else if( aSuggestMode == EPluginInputModePortraitFSQ  )
-    	{
-		// If current input languge is Chinese or Korean, use EPluginInputModeItut instead.
-		if ( iPortraitFSQEnabled && 
-				( iFepMan.IsChineseInputLanguage() || iFepMan.IsKoreanInputLanguage() ))
-			{
-			  aSuggestMode = EPluginInputModeItut;
-			}
-    	}
     else if ( iOrientationChanged )
         {
         iFepMan.SetNotifyPlugin( EFalse );
@@ -1426,9 +1395,6 @@
         iOrientationChanged = EFalse;
         }
     
-    // Add pen ui activation observer
-    iPenInputServer.AddPenUiActivationHandler( this, EPluginInputModeAll );    
-    
     TBool isSplit = IsEditorSupportSplitIme();
     TInt inputLang = iFepMan.InputLanguageCapabilities().iInputLanguageCode;
     // temp code for Chinese split view
@@ -1515,6 +1481,15 @@
 		
         // Notify application touch window state
         NotifyAppUiImeTouchWndStateL( ETrue );
+        if (iPluginInputMode == EPluginInputModeItut)
+            {
+            RProperty::Set( KPSUidAknFep, KAknFepVirtualKeyboardType, EPtiKeyboard12Key );
+            if(iFepMan.PtiEngine())
+                {
+                iFepMan.PtiEngine()->SetKeyboardType(EPtiKeyboard12Key);
+                }
+            iFepMan.SetQwertyMode( EFalse );    
+            }
 
         rtn = ETrue;
         }
@@ -1612,8 +1587,6 @@
 //
 void CAknFepPluginManager::ClosePluginInputUiL(TBool aResetState)
     {
-    iInitiateCloseInputUi = ETrue;
-    
     // For addition of ITI features on FSQ, 
     // need to restore some values stored before opening FSQ    
     
@@ -1638,7 +1611,6 @@
                 }
             else
                 {
-                NotifyAppUiImeTouchWndStateL( EFalse ); //this change is under testing 
                 iCurrentPluginInputFepUI->CloseUI();
                 }
             if( aResetState )
@@ -1681,15 +1653,13 @@
         } 
         
     // Notify editor the touch window has been closed
-    //NotifyAppUiImeTouchWndStateL( EFalse );//this change is under testing
+    NotifyAppUiImeTouchWndStateL( EFalse );
     
     iCharStartPostion = KInvalidValue;
     
     // Set the KAknFepTouchInputActive PS to 0, 
     // it means that touch input is inactive now.
     RProperty::Set( KPSUidAknFep, KAknFepTouchInputActive, 0 );
-    
-    iInitiateCloseInputUi = EFalse;    
     }
 
 // ---------------------------------------------------------------------------
@@ -1898,24 +1868,17 @@
                     }
                     break;
                 case EPeninputCmdFSQ:
-                	{
-                	if ( iPortraitFSQEnabled )
-                		{
-                        TPixelsTwipsAndRotation size; 
-                        CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size);
-                        TBool landscape = size.iPixelSize.iWidth > size.iPixelSize.iHeight;
-                        ProcessChangingInputModeCmdL( landscape ? EPluginInputModeFSQ : EPluginInputModePortraitFSQ );
-                		}
-                	else
-                		{
-                	    ProcessChangingInputModeCmdL(EPluginInputModeFSQ);
-                		}
-                	}
-                	break;
                 // "Edit portrait" menu - switch to portrait FSQ
                 case EPeninputCmdPortraitEditor:
                     {
-                    ProcessChangingInputModeCmdL(EPluginInputModePortraitFSQ);          
+                    if ( iPortraitFSQEnabled )
+                        {
+                        ProcessChangingInputModeCmdL(EPluginInputModePortraitFSQ);          
+                        }
+                    else 
+                        {
+                        ProcessChangingInputModeCmdL(EPluginInputModeFSQ);
+                        }
                     }
                     break;
                 // "Edit landscape" menu - switch to landscape FSQ
@@ -2282,9 +2245,6 @@
     	TInt disabledInputMode = iPenInputServer.DisabledLayout();
     	TInt curInputMode = iLangMan.CurrentImePlugin()->CurrentMode();
     	TBool isChinese = iFepMan.IsChineseInputLanguage();
-    	TBool isKorean = iFepMan.IsKoreanInputLanguage();
-    	// similar with chinese layout, there is a switching button,so when writing language is korean
-    	// no need to insert 'Qwerty' or 'Alphabet keypad' item into option menu 
     	
     /* US2/US4/US5
     1. Orientation sensor off
@@ -2325,34 +2285,21 @@
         {
         // "QWERTY keyboard" - EPeninputCmdFSQ menu is shown in these conditions
         // if portrait FSQ feature flag is enabled
-        if ( !isKorean && !isChinese )
-        	{
-            // 1) Non-Chinese language and non-Korean language   
-            if ( isPortrait )
-            	{
-                // 2) On portrait screen, current input mode is not portrait FSQ 
-                //    and also the mode is not disabled
-                if ( curInputMode != EPluginInputModePortraitFSQ 
-                	 && !( disabledInputMode & EPluginInputModePortraitFSQ ) )
-                	{
-                    aMenuPane->SetItemDimmed( EPeninputCmdFSQ, EFalse );
-                	}                	
-            	}
-            else
-            	{
-                // 3) On landscape screen, current input mode is not FSQ 
-                // and also the mode is not disabled
-                if ( curInputMode != EPluginInputModeFSQ 
-                   	 && !( disabledInputMode & EPluginInputModeFSQ ) )
-                	{
-                    aMenuPane->SetItemDimmed( EPeninputCmdFSQ, EFalse );
-                	}
-            	}        
-        	}
+        // 1) Non-Chinese language
+        // 2) Current input mode is not portrait FSQ and also the mode is not disabled
+        // 3) Current orientation is portrait
+        if ( !isChinese
+            && ( curInputMode != EPluginInputModePortraitFSQ ) 
+            && !( disabledInputMode & EPluginInputModePortraitFSQ ) 
+            && isPortrait )
+        {
+        aMenuPane->SetItemDimmed( EPeninputCmdFSQ, EFalse );
+        }
+        
         }
     else
         {
-        if ( !isKorean && !isChinese && ( curInputMode != EPluginInputModeFSQ ) 
+        if ( !isChinese && ( curInputMode != EPluginInputModeFSQ ) 
             && !( disabledInputMode & EPluginInputModeFSQ ) 
             && FeatureManager::FeatureSupported( KFeatureIdVirtualFullscrQwertyInput ) )
             {
@@ -2364,7 +2311,7 @@
     // 1) Non-Chinese language
     // 2) Current input mode is not ITU-T and also the mode is not disabled
     // 3) ITU-T feature flag is enabled
-    if ( !isKorean && !isChinese 
+    if ( !isChinese 
         && ( curInputMode != EPluginInputModeItut ) 
         && !( disabledInputMode & EPluginInputModeItut ) 
         && FeatureManager::FeatureSupported( KFeatureIdVirtualItutInput ) )
@@ -2377,7 +2324,7 @@
     // 3) Current input mode is not portrait FSQ and also the mode is not disabled
     // 4) Current orientation is landscape
     if ( iPortraitFSQEnabled
-        && !isKorean && !isChinese 
+        && !isChinese 
         && ( curInputMode != EPluginInputModePortraitFSQ ) 
         && !( disabledInputMode & EPluginInputModePortraitFSQ ) 
         && !isPortrait )
@@ -2394,7 +2341,7 @@
     // 5) Current orientation is portrait
     if ( iPortraitFSQEnabled
         && FeatureManager::FeatureSupported( KFeatureIdVirtualFullscrQwertyInput ) 
-        && !isKorean && !isChinese 
+        && !isChinese 
         && ( curInputMode != EPluginInputModeFSQ ) 
         && !( disabledInputMode & EPluginInputModeFSQ ) 
         && isPortrait )
@@ -2464,31 +2411,15 @@
 	//Show number mode menu item.
 	if(iFepMan.InputMode() == ENumber || iFepMan.InputMode() == ENativeNumber)
 	    {
-        CAknEdwinState* editorState = iFepMan.EditorState();
-        TUint permittedInputModes;
-        if( editorState )
+        if(iSharedData.DefaultArabicNumberMode())
             {
-            permittedInputModes= editorState->PermittedInputModes();
+            aMenuPane->SetItemDimmed(EAknCmdEditModeNumber, EFalse);
             }
         else
             {
-            permittedInputModes = EAknEditorNumericInputMode;
-            }   
-        TBool IsOnlyNumericPermitted = !(permittedInputModes 
-                &(EAknEditorTextInputMode | EAknEditorSecretAlphaInputMode));
-        if(IsOnlyNumericPermitted)
-            {
-            if(iSharedData.DefaultArabicNumberMode())
-                {
-                aMenuPane->SetItemDimmed(EAknCmdEditModeNumber, EFalse);
-                }
-            else
-                {
-                aMenuPane->SetItemDimmed(EAknCmdEditModeArabicIndicNumber, EFalse);
-                }
+            aMenuPane->SetItemDimmed(EAknCmdEditModeArabicIndicNumber, EFalse);
             }
 	    }
-
 	// add the writing speed menu
 	index = 0;
 	if(aMenuPane->MenuItemExists(EPenInputCmdWritingSpeed, index))
@@ -2543,11 +2474,8 @@
         return;
         }
         
-    // if pen ui is being opened on a non-global editor, which popped by capserver or notify server,    
-    // and also other global notes from capserver or notify server pop up at the moment,
-    // pen ui should be dimmed as the definitino of dim feature.
-    // Set bClose = EFalse is used to prevent from closing pen ui later.  
-	if( !iLaunchMenu && IsGlobalNotesApp(focusAppId) && !IsInGlobleNoteEditor() )
+    if( !iLaunchMenu && IsGlobalNotesApp(focusAppId)) 
+
         {
         if ( iPluginInputMode == EPluginInputModeItut ||
              iPluginInputMode == EPluginInputModeFSQ ||
@@ -2770,6 +2698,11 @@
             icfData.iCmd = EPeninputICFInitial;
     	    icfData.iText.Set(*iLastEditorContentBuf);
     	    icfData.iCurSel = iCurSelPre;
+    	    // special case for vietnamese, we need en/disable tone marker
+    	    // when the text in editor changes, 
+    	    // by checking whether the character before insertion point is vowel or not
+    	    VietSyncToneMarkerL(*iLastEditorContentBuf, icfData.iCurSel);
+    	    
     	    if ( iFepMan.IsFlagSet(CAknFepManager::EFlagNoMatches) )
                 {
                 icfData.iFlag = EFepICFDataInlineNoMatch;
@@ -2893,16 +2826,16 @@
     HBufC* currentEditorContentBuf = HBufC::NewLC( editContentLen );
     TPtr16 currentEditorContent = currentEditorContentBuf->Des();
 	edit->GetEditorContentForFep( currentEditorContent, 0, editContentLen ); 
-	
+    // special case for vietnamese, we need en/disable tone marker
+    // when the text in editor changes, 
+    // by checking whether the character before insertion point is vowel or not
+	VietSyncToneMarkerL(currentEditorContent, icfData.iCurSel);
+
 	if (SetSyncIcfDataL( icfData, lastEditorContent, currentEditorContent))
     	{
 		iCurrentPluginInputFepUI->HandleCommandL
 			(ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData));
-		if ( icfData.iMidPos >= 0 )
-			{
-		    // icfData.iMidPos >= 0 means the text which will be sent to ICF is inline text.
-		    iFepMan.TryPopExactWordInICFL();
-			}		
+		iFepMan.TryPopExactWordInICFL();
     	}
 
     if ( secretEditor ) 
@@ -2922,6 +2855,36 @@
     iPreDocumentLengthForFep = editContentLen;
     }
 
+void CAknFepPluginManager::VietSyncToneMarkerL(
+		const TDesC& aEditorContent, const TCursorSelection& aCursorPos)
+	{
+	if(ELangVietnamese != iLangMan.InputLanguage())
+		{
+		return;
+		}
+	
+	TBool bEnable = EFalse;
+	TInt low = aCursorPos.LowerPos();
+	
+	if(low > 0)
+		{
+		ASSERT(aEditorContent.Length() >= low);
+		TBuf<1> buf = aEditorContent.Mid(low - 1, 1);
+		TBuf<1> vowel; 
+		TInt cnt = sizeof(VietVowelList) / sizeof(VietVowelList[0]);
+		
+		for(TInt i = 0; !bEnable && i < cnt; ++i)
+			{
+			const TText* text = &VietVowelList[i];
+			vowel.SetLength(0);
+			vowel.Append(text, 1);
+			bEnable = (buf.Compare(vowel) == 0);
+			}
+		}
+	
+	iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputVietSyncToneMarker, bEnable);  
+	}
+
 TBool CAknFepPluginManager::SetSyncIcfDataL( TFepInputContextFieldData& aIcfData,
                                             const TDesC& aLastEditorContent,
                                             const TDesC& aCurrentEditorContent )
@@ -4862,15 +4825,19 @@
     }
 
 void CAknFepPluginManager::SendMatchListCmd(const RArray<TPtrC>& aList)
-	{
+    {
     TFepITICandidateList list;
     list.iActiveIndex = 0;
     list.iItemArray2 = &aList;
     list.iLangCode = iFepMan.CurrentInputLangCode();
+    if ( iLangMan.IsSplitView() )
+        {
+        TRAP_IGNORE( list.iRect = iFepMan.InitRectForSplitCandL() );
+        }
 
     TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList, 
                                                          reinterpret_cast<TInt>(&list)));
-	}
+    }
 
 TBool CAknFepPluginManager::GetIndicatorImgID(const TInt IndicatorUID,TInt &aImage, TInt &aMask)
     {
@@ -5140,15 +5107,7 @@
             {
             editorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
             }
-        }    
-    else if (FeatureManager::FeatureSupported(KFeatureIdKorean))
-        {
-        // Use the special sct resource file for Korean variant.
-        if (!editorSCTResId || editorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
-            {
-            editorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_KOREAN;
-            }
-        }    
+        }
     else if (!editorSCTResId)
         {
         editorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
@@ -6027,8 +5986,7 @@
          } 
       
      TInt flags = editorState->Flags();         
-     return ( flags & EAknEditorFlagAvkonSecretEditor ) == EAknEditorFlagAvkonSecretEditor; 
-      
+     return ( flags & EEikEdwinAvkonDisableCursor ) == EEikEdwinAvkonDisableCursor; 
      } 
 
 // --------------------------------------------------------------------------- 
@@ -6100,8 +6058,7 @@
          && iFepMan.InputLanguageCapabilities().iSupportsWesternQwertyPredictive
          && !iSharedData.QwertyInputMode()
          // No need to support in dialer application.
-         && RProcess().SecureId().iId != KPhoneSecureId && 
-         !iFepMan.IsNoT9Editor() )
+         && RProcess().SecureId().iId != KPhoneSecureId )
         {
         return ETrue;
         }        
@@ -6126,6 +6083,7 @@
         // Change to input mode to EPtiEngineQwertyPredictive, after that
         // qwerty keymapping can be got
         iFepMan.PtiEngine()->SetInputMode( EPtiEngineQwertyPredictive );
+        iFepMan.PtiEngine()->SetKeyboardType(EPtiKeyboardQwerty4x12);
         // Find scancode by keycode from qwerty keymapping
         TInt retKey = keymapping->KeyForCharacter( aKeyCode );
         // Restore the old input mode
@@ -6218,7 +6176,7 @@
     if ( oldInputMode != EPtiEngineQwertyPredictive ) 
     	{
         // if current input mode isn't EPtiEngineQwertyPredictive, 
-        // current input mode has been set to EPtiEngineQwertyPredictive temporarily before, 
+        // current input mode is set to EPtiEngineQwertyPredictive temporarily before, 
         // now we need to restore it,
         // because state machine is responsible for changing it practically.
         iFepMan.PtiEngine()->SetInputMode( oldInputMode );
@@ -6554,29 +6512,6 @@
     iCurEditor = NULL;
     }
 
-// -----------------------------------------------------------------------------
-// CAknFepPluginManager::OnPeninputUiDeactivated
-// Called when pen input UI is about to be closed
-// -----------------------------------------------------------------------------
-//
-void CAknFepPluginManager::OnPeninputUiDeactivated()
-    {
-    if( !iInitiateCloseInputUi )
-        {
-        TRAP_IGNORE( ClosePluginInputUiL( ETrue ) );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CAknFepPluginManager::OnPeninputUiActivated
-// Called when pen input UI is about to be open
-// -----------------------------------------------------------------------------
-//
-void CAknFepPluginManager::OnPeninputUiActivated()
-    {
-    }
-
-
 CConnectAo::CConnectAo(CAknFepPluginManager* aClient) 
                 : CActive(CActive::EPriorityStandard),
                   iClient(aClient)
--- a/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyCangJie.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyCangJie.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -162,6 +162,7 @@
         {
         if ( candidatePane->VisibleCandidateCount() != 1 )
 	        {
+	        iOwner->ChangeState( ECandidate );  
 	    	candidatePane->SelectNext(); 	
 	    	UpdateIndicator();
 	        }    	
@@ -170,7 +171,8 @@
     	{
     	if ( candidatePane->VisibleCandidateCount()!= 1 )
 	    	{
-	        candidatePane->SelectPrev();	
+	    	iOwner->ChangeState( ECandidate );  
+	        candidatePane->SelectLastPhrase();	
 	        UpdateIndicator();
 	    	}
     	}     
@@ -258,24 +260,4 @@
             break;
         }
     }
-void TAknFepInputStateEntryMiniQwertyCangJie::SubmitTextL( const TDesC& aText )
-	{
-	MAknFepManagerUIInterface* fepMan = iOwner->FepMan( );
-	if ( aText.Length( ) )
-	   {
-	   fepMan->NewTextL( aText );
-	   fepMan->CommitInlineEditL( );
-	   iOwner->PtiEngine()->SetPredictiveChineseChar( aText );
-	   if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
-	      {
-	      fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
-	      iOwner->FepMan()->TryCloseUiL( );
-	      }
-	   else
-	       {
-	       iOwner->ChangeState( EPredictiveCandidate );
-	       }
-	    }
-	}
-
 // End of file
--- a/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -57,8 +57,8 @@
     iOwner->PtiEngine()->SetInputMode( EPtiEnginePinyinPhraseQwerty );
     iOwner->PtiEngine()->SetCase( EPtiCaseLower );
     UIContainer()->SetLayout( MAknFepUICtrlContainerChinese::ELayoutKeystroke );
+    UIContainer()->FocusCandidatePane( ETrue );
     UIContainer()->CandidatePane()->SelectFirstPhrase();
-    UIContainer()->FocusCandidatePane( ETrue );    
     UIContainer()->CandidatePane()->ShowCandidateOrdinals( EFalse );
     UIContainer()->EditPaneWindow()->DeactiveCursor();
     UIContainer()->SetFepMan( iOwner->FepMan() );
@@ -124,6 +124,7 @@
             {
             if ( candidatePane->VisibleCandidateCount()!= 1 )
                 {
+                iOwner->ChangeState( ECandidate );
                 candidatePane->SelectNext();
                 UpdateIndicator();
                 }
@@ -133,7 +134,9 @@
             {
             if ( candidatePane->VisibleCandidateCount()!= 1 )
                 {
-                UIContainer()->CandidatePane()->SelectPrev();
+                iOwner->ChangeState( ECandidate );
+                TInt numbertotal = UIContainer()->CandidatePane()->VisibleCandidateCount();
+                UIContainer()->CandidatePane()->SelectIndex( numbertotal - 1 );
                 UpdateIndicator();
                 }
             break;
@@ -256,7 +259,7 @@
             if ( 0 != candidatePane->VisibleCandidateCount() )
                 {
                 uiContainer->EditPaneWindow()->SetChangeState( ETrue );
-                iOwner->ChangeState( EEntry );
+                iOwner->ChangeState( ECandidate );
                 }
             break;
             }
@@ -305,40 +308,6 @@
         }
     return ret;
     }
-
-void TAknFepInputStateEditinigMiniQwertyPinyinPhrase::SubmitTextL( const TDesC& aText )
-	{
-	 if ( aText.Length() )
-		 {
-		 if ( !CommitInlineEEPL( aText ) )
-			{
-			DoActionAfterCommit();
-			}
-		else
-			{
-			if ( CheckFirstGroupStroke() )
-				{
-				//stroke to be shown
-                if ( iPlugin.IsEnable())
-                    {
-                    iPlugin.AnalyseL();
-                    }
-				RefreshUI( EFalse );
-				UIContainer()->CandidatePane()->SelectFirstPhrase();
-				}
-			else
-				{
-				//stroke to be shown
-                if ( iPlugin.IsEnable())
-                    {
-                    iPlugin.AnalyseL();
-                    }
-				UIContainer()->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromCandidate );
-				iOwner->ChangeState( EMiniQwertyEdit );
-				}
-			}
-		}
-	}
 // ---------------------------------------------------------------------------
 // TAknFepInputStateEntryMiniQwertyPinyinPhrase::HandleCommandL
 // Handling Command
@@ -385,42 +354,5 @@
     {
     TAknFepInputMiniQwertyPinyinPhraseBase::HandleCommandL( aCommandId );
     }
-
-void TAknFepInputStateEntryMiniQwertyPinyinPhrase::SubmitTextL( const TDesC& aText  )
-	{
-    MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    if ( aText.Length() )
-        {
-        if ( !CommitInlineEEPL( aText ) )
-            {
-            DoActionAfterCommit();
-            }
-        else
-            {
-            if ( CheckFirstGroupStroke() )
-               {
-                //stroke to be shown
-                if ( iPlugin.IsEnable())
-                    {
-                    iPlugin.AnalyseL();
-                    }
-               RefreshUI();
-               uiContainer->CandidatePane()->SelectFirstPhrase();
-               }
-           else
-               {
-               //stroke to be shown
-               if ( iPlugin.IsEnable())
-                   {
-                   iPlugin.AnalyseL();
-                   }
-               uiContainer->EditPaneWindow()->SetAutoChangeStateFlag(
-                            EAutoChangeStateFromCandidate );
-               iOwner->ChangeState( EMiniQwertyEdit );
-               }
-            }
-       }
-	}
-
 // End Of File
 
--- a/fep/aknfep/src/AknFepUIInputStatePredictiveInputMiniQwertyChinesePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUIInputStatePredictiveInputMiniQwertyChinesePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -127,25 +127,7 @@
             fepMan->NewTextL(text);
             fepMan->CommitInlineEditL();
             iOwner->PtiEngine()->SetPredictiveChineseChar(text);
-            
-            // For sogou core, the predictive is not endless, so when there
-            // is no predictive candidates, we should call TryCloseUiL().
-            TBool noCandidates = EFalse;
-            if ( iPlugin.IsEnable() || iStrokePlugin.IsEnable())
-                {
-                // Get the predictive candidates.
-                CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat(1);
-                CleanupStack::PushL ( phraseCandidates );
-                phraseCandidates->Reset();
-                iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-                if ( phraseCandidates->Count() == 0 )
-                    {
-                    noCandidates = ETrue;
-                    }
-                CleanupStack::PopAndDestroy( phraseCandidates );
-                }
-            // If no candidates, call TryCloseUiL().
-            if ( fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull) || noCandidates )
+            if (fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull))
                 {
                 fepMan->ClearFlag(CAknFepManager::EFlagEditorFull);
                 iOwner->FepMan()->TryCloseUiL();
@@ -227,44 +209,4 @@
         break;
     }
 }
-
-void TAknFepInputStatePredictiveInputMiniQwertyChinesePhrase::SubmitTextL( const TDesC& aText )
-	{
-	MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-	if ( aText.Length() )
-	   {
-	   fepMan->NewTextL( aText );
-	   fepMan->CommitInlineEditL();
-	   iOwner->PtiEngine()->SetPredictiveChineseChar( aText );
-      
-       // For sogou core, the predictive is not endless, so when there
-       // is no predictive candidates, we should call TryCloseUiL().
-       TBool noCandidates = EFalse;
-       
-       if ( iPlugin.IsEnable() || iStrokePlugin.IsEnable())
-           {
-           // Get the predictive candidates.
-           CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat(1);
-           CleanupStack::PushL ( phraseCandidates );
-           phraseCandidates->Reset();
-           iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-           if ( phraseCandidates->Count() == 0 )
-               {
-               noCandidates = ETrue;
-               }
-           CleanupStack::PopAndDestroy( phraseCandidates );
-           }
-       
-       if (fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull) || noCandidates )
-	      {
-	      fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
-	      iOwner->FepMan()->TryCloseUiL();
-	      }
-	   else
-	      {
-	      iOwner->ChangeState( EPredictiveCandidate );
-	      }
-	    }
-	}
-	
 // End of file
--- a/fep/aknfep/src/AknFepUiInputStateBase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateBase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -30,7 +30,6 @@
 // INCLUDE FILES
 #include "AknFepUiInputStateBase.h"
 #include "AknFepPanic.h"
-#include "AknFepUIManagerStateInterface.h"
 
 // CONSTANTS
 
@@ -122,22 +121,15 @@
     {
     return iState;
     }
-void TAknFepInputStateBase::SubmitTextL( const TDesC& /*aText*/ )
-	{
-	
-	}
+
 // ---------------------------------------------------------------------------
 // TAknFepUiInputStateJapaneseBase::CloseUI
 // 
 // ---------------------------------------------------------------------------
 //
 void TAknFepInputStateBase::CloseUI()
-	{
-	if ( iOwner )
-		{
-		TRAP_IGNORE( iOwner->FepMan()->TryCloseUiL());
-		}
-	}
+    {
+    }
 
 // ---------------------------------------------------------------------------
 // TAknFepUiInputStateJapaneseBase::InitializeStateL
--- a/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -30,7 +30,6 @@
 #include <PtiEngine.h>  
 #include <PtiUserDicEntry.h>
 #include <aknnotewrappers.h> //CAknWarningNote 
-#include "AknFepUiManagerBase.h"
 
 const TInt KMinCandidateCount = 1;
 // User includes
@@ -43,7 +42,6 @@
 #include "AknFepUIManagerStateInterface.h"  
 #include "AknFepManager.h" 
 #include <aknfep.rsg>                 
-#include "AknFepUiManagerChinese.h"
 
 // ---------------------------------------------------------------------------
 // AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase::
@@ -208,21 +206,11 @@
                     {
                     if ( CheckFirstGroupStroke() )
                         {
-                        //stroke to be shown
-                        if ( iPlugin.IsEnable())
-                            {
-                            iPlugin.AnalyseL();
-                            }
                         RefreshUI( EFalse );
                         UIContainer()->CandidatePane()->SelectFirstPhrase();
                         }
                     else
                         {
-                        //stroke to be shown
-                        if ( iPlugin.IsEnable())
-                            {
-                            iPlugin.AnalyseL();
-                            }
                         UIContainer()->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromCandidate );
                         iOwner->ChangeState( EMiniQwertyEdit );
                         }
@@ -290,36 +278,5 @@
             break;
         }
     }
-void TAknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase::SubmitTextL( const TDesC& aText )
-	{
-	 if ( aText.Length() )
-		 {
-		 if ( !CommitInlineEEPL( aText ) )
-			{
-			DoActionAfterCommit();
-			}
-		else
-			{
-			if ( CheckFirstGroupStroke() )
-				{
-                //stroke to be shown
-                if ( iPlugin.IsEnable())
-                    {
-                    iPlugin.AnalyseL();
-                    }
-				RefreshUI( EFalse );
-				UIContainer()->CandidatePane()->SelectFirstPhrase();
-				}
-			else
-				{
-                if ( iPlugin.IsEnable())
-			        {
-			        iPlugin.AnalyseL();
-			        }
-				UIContainer()->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromCandidate );
-				iOwner->ChangeState( EMiniQwertyEdit );
-				}
-			}
-		}
-	}
+
 // End of file
--- a/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -89,23 +89,9 @@
     uiContainer->CandidatePane()->ShowCandidateOrdinals( ETrue );
     uiContainer->CandidatePane()->SelectFirstPhrase();
     UpdateIndicator();
-    RefreshUI( ETrue );
+
     }
 
-void TAknFepUiInputStateCandidateMiniQwertyZhuyinPhrase::RefreshUI( TBool aRefresh )
-	{
-    MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    // get cursor position
-    TPoint baseLine;
-    TInt height(0);
-    TInt ascent(0);
-    TRAPD(ret,iOwner->FepMan()->GetScreenCoordinatesL(baseLine,height,ascent));
-    if (ret == KErrNone)
-        {
-        uiContainer->SetContainerPosition(baseLine, height);    
-        }    
-	}
-
 // ---------------------------------------------------------------------------
 // AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase::HandleKeyL
 // (other items were commented in a header).
@@ -457,19 +443,6 @@
         {
         return ETrue;
         }
-	else if ( iOwner->FepMan()->IsFlagSet( CAknFepManager::EFlagShiftKeyDepressed )
-        || iOwner->FepMan()->IsFlagSet( CAknFepManager::EFlagQwertyChrKeyDepressed )
-        || ((aKey == EStdKeyLeftFunc) && aLength == EShortKeyPress) )
-        {
-        iOwner->FepMan()->TryCloseUiL();
-        return EFalse;
-        }
-    else if ( aKey == EKeyLeftShift || aKey ==EKeyLeftCtrl || aKey
-        == EKeyRightCtrl || aKey ==EKeyRightFunc )
-        {
-        iOwner->FepMan()->TryCloseUiL();
-        return EFalse;
-        } 
     else if ( aKey == EStdKeyDevice1 )
         {
         iOwner->FepMan()->TryCloseUiL();
@@ -546,10 +519,11 @@
         }
     else
         {
-        //TInt index = 0;
-        //TBool isIndex = MapKeyToIndexSelectCandidate( aKey, index );
+        TInt index = 0;
+        TBool isIndex = MapKeyToIndexSelectCandidate( aKey, index );
         if ( aLength == EShortKeyPress && 
-            (   aKey == EStdKeyDevice0 || 
+            ( ( isIndex && UIContainer()->CandidatePane()->SelectIndex( index ) ) ||
+                aKey == EStdKeyDevice0 || 
                 aKey == EStdKeyDevice3 ) )
             {
             editPane->SetNeedClearDeliberateSelection( ETrue );
@@ -601,24 +575,4 @@
         }
     }
 
-void TAknFepUiInputStateCandidateMiniQwertyZhuyinPhrase::SubmitTextL( const TDesC& aText )
-	{
-	if ( aText.Length( ) )
-	   {
-	   MAknFepManagerUIInterface* fepMan = iOwner->FepMan( );
-	   fepMan->NewTextL( aText );
-	   fepMan->CommitInlineEditL( );
-	   iOwner->PtiEngine()->SetPredictiveChineseChar( aText );
-	   if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
-	      {
-	      fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
-	      iOwner->FepMan()->TryCloseUiL( );
-	      }
-	   else
-	      {
-	      iOwner->ChangeState( EPredictiveCandidate );
-	      }
-	    }
-	}
-
 // End of file
--- a/fep/aknfep/src/AknFepUiInputStateCandidateQwertyBaseChinesePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateCandidateQwertyBaseChinesePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -55,6 +55,7 @@
 
     else if(!( HandleVerticalNavigation(aKey) || HandleHorizontalNavigation(aKey) ))
         {
+        TInt index = 0;
 #ifdef RD_INTELLIGENT_TEXT_INPUT
         // it may be one of the 'valid' numbers..
         TPtiKeyboardType keyboardtype = iOwner->FepMan()->KeyboardLayout();
@@ -85,6 +86,7 @@
                     
                        &&(aKey == numKeyBind.iKey))
                     	{
+                    	index = numKeyBind.iChar - EPtiKey0 -1;
                     	validnumkey = ETrue;
                     	break;
                     	}
@@ -99,10 +101,16 @@
             	}
                 
             }
+        else
+            {
+#endif
+            index = MapKeyToIndex(aKey);
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+            }             
 #endif
         MAknFepUICtrlCandidatePane* candidatePane = UIContainer()->CandidatePane();
 
-        if( aKey == EStdKeyDevice3 || aKey == EStdKeyEnter)
+        if(candidatePane->SelectIndex(index) || aKey == EStdKeyDevice3 || aKey == EStdKeyEnter)
             {
             TPtrC text = candidatePane->CurrentPhraseCandidate();
             if(text.Length())
--- a/fep/aknfep/src/AknFepUiInputStateChineseBase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateChineseBase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -53,9 +53,7 @@
 TAknFepInputStateChineseBase::
 TAknFepInputStateChineseBase(MAknFepUIManagerStateInterface* aOwner,
                                 MAknFepUICtrlContainerChinese* aUIContainer)
-    :TAknFepInputStateBase(aOwner),
-     iPlugin( NULL, NULL, ENull ),
-     iStrokePlugin( NULL, NULL, ENull )
+    :TAknFepInputStateBase(aOwner)
     {
     iUIContainer = aUIContainer;
 
@@ -85,10 +83,6 @@
 void TAknFepInputStateChineseBase::operator=(const TAknFepInputStateChineseBase& aState)
     {
     Mem::Copy(this, &aState, sizeof(TAknFepInputStateChineseBase));
-    if( UIContainer())
-    	{
-		UIContainer()->SetFepUiStateCtrl( this );
-    	}
     }
 
 // ---------------------------------------------------------------------------
@@ -125,29 +119,4 @@
 			break;
 		}    	
  	}
-
-// ---------------------------------------------------------------------------
-// TAknFepInputStateChineseBase::SetPlugin
-// Set plugin to state machine
-// ---------------------------------------------------------------------------
-//
-void TAknFepInputStateChineseBase::SetPlugin( 
-            TAknFepInputMiniQwertySogouPinyinPhrasePlugin aPlugin )
-    {
-    iPlugin = aPlugin;
-    iPlugin.Enable( ETrue );
-    }
-
-// ---------------------------------------------------------------------------
-// TAknFepInputStateChineseBase::SetStrokePlugin
-// Set plugin to state machine
-// ---------------------------------------------------------------------------
-//
-void TAknFepInputStateChineseBase::SetStrokePlugin( 
-            TAknFepInputMiniQwertySogouStrokePhrasePlugin aPlugin )
-    {
-    iStrokePlugin = aPlugin;
-    iStrokePlugin.Enable( ETrue );
-    }
-
 // End of file
--- a/fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -509,7 +509,6 @@
     MAknFepUICtrlInputPane* inputPane = uiContainer->InputPane();
     MAknFepUICtrlPinyinPopup* popup = uiContainer->PinyinPopupWindow();
     MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
-    MAknFepUICtrlCandidatePane* candidatePane = uiContainer->CandidatePane();
     CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
     RArray<TInt>* keycodeArray = editPane->KeycodeArray();
     TInt keystrokeLength = keystroke->Count();
@@ -678,7 +677,6 @@
                 {
                 popup->Enable( EFalse );
                 }
-            candidatePane->SelectFirst();
             iOwner->ChangeState( ECandidate );
             }
         else
@@ -1007,43 +1005,5 @@
             break;
         }
     }
-
-void TAknFepInputStateEntryMiniQwertyZhuyinPhrase::SubmitTextL( const TDesC& aText )
-	{
-	MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-	MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
-	MAknFepUICtrlPinyinPopup* popup = uiContainer->PinyinPopupWindow();
-	CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
-	CPtiEngine* ptiengine = iOwner->PtiEngine();
-    
-    TInt keystrokeLength = keystroke->Count();
-    if ( !(editPane->GetEffictiveLength() == keystroke->Count()
-        && ptiengine->PhoneticSpellingCount() > popup->CurrentSelection())
-        && (!( keystrokeLength > 0 && keystroke->MdcaPoint( 0 )[0] == KSai )))
-        {
-		editPane->SetChangeState( ETrue );
-        ClearDeliberateSelection();
-        editPane->SetNeedClearDeliberateSelection( ETrue );
-        iOwner->ChangeState( EZhuyinSpelling );
-        return;
-        }
-	if ( aText.Length( ) )
-	   {
-	   MAknFepManagerUIInterface* fepMan = iOwner->FepMan( );
-	   fepMan->NewTextL( aText );
-	   fepMan->CommitInlineEditL( );
-	   iOwner->PtiEngine()->SetPredictiveChineseChar( aText );
-	   if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
-	      {
-	      fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
-	      iOwner->FepMan()->TryCloseUiL( );
-	      }
-	   else
-	      {
-	      iOwner->ChangeState( EPredictiveCandidate );
-	      }
-	    }
-	}
-
 // End of file   
 
--- a/fep/aknfep/src/AknFepUiInputStateEntryQwertyBaseChinesePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateEntryQwertyBaseChinesePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -56,10 +56,9 @@
     iOwner->PtiEngine()->SetCandidatePageLength(KMaxPhraseCount);
     uiContainer->ShowHorizontalScrollArrows(showHorizontalScrollArrows); 
     uiContainer->ShowVerticalScrollArrows(multiplePages);
-    candidatePane->SelectFirstPhrase();
     uiContainer->FocusCandidatePane(ETrue);
     candidatePane->SetHighlighted(ETrue);
-    
+    candidatePane->SelectFirstPhrase();
     candidatePane->ShowCandidateOrdinals(ETrue);
     uiContainer->SetLayout(MAknFepUICtrlContainerChinese::ELayoutInput);
     UpdateIndicator();
--- a/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -47,7 +47,6 @@
 
 static const TInt KKeyMappingsLength = 63;
 
-
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 TAknFepInputStateEntryQwertyWesternPredictive::
@@ -606,8 +605,6 @@
         // Framework will handle the key event.
        	return EFalse;
     }
-
-
 // use ptiengine's api to tell whether a character mapped on a given key.	
 TBool TAknFepInputStateEntryQwertyWesternPredictive::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const
     {    
@@ -624,8 +621,6 @@
         }
     return EFalse;        
     }
-	
-	
 // Get Scancode from a given character and tell the case at the same time.
 TInt TAknFepInputStateEntryQwertyWesternPredictive::ScanCodeForCharacter( TUint aChar, TPtiTextCase& aCase )
     {
--- a/fep/aknfep/src/AknFepUiInputStateEntryThaiPredictive.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateEntryThaiPredictive.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -111,29 +111,7 @@
             }
         else
             {
-			MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-			TBool isInlineStateOn = EFalse;
-			TBool isInNoMatchState = EFalse;
-			
-			if ( fepMan )
-				{
-			    // Get the editor Inline state
-				isInlineStateOn = fepMan->IsFlagSet( 
-						CAknFepManager::EFlagInsideInlineEditingTransaction );
-				// Get the editor No Matches state
-				isInNoMatchState = fepMan->IsFlagSet( 
-						CAknFepManager::EFlagNoMatches );
-				}
-			
-			// If editor is in inline state and no candidate words are matched
-			if ( isInlineStateOn && isInNoMatchState )
-				{
-				response = HandleStarKeyL( aLength );
-				}
-			else
-				{
-				response = HandleStandardNumericKeysL( aKey, aLength );
-				}
+            response = HandleStandardNumericKeysL(aKey, aLength);
             }
         break;
     case EKeyDownArrow:
--- a/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -778,6 +778,17 @@
     MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
     
     iIsLastWord = ETrue;
+
+#ifdef RD_SCALABLE_UI_V2 
+    // Because this function is a callback function of ptixt9core, 
+    // this function is called when gets last candidate, but for virtual intput,
+    // cba should not be updated.
+    if ( fepMan && fepMan->PluginUIManager()
+    		&& fepMan->PluginUIManager()->PluginInputMode() == EPluginInputModeItut )
+        {
+        return;
+        }
+#endif
     
     if (iMatchState != EWordMatchAfterLast)
         {
--- a/fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -117,7 +117,6 @@
         }
     return number;
     }
-	
 TBool TAknFepInputStateInitialChineseGenericQwerty::HandleKeyL(TInt aKey, TKeyPressLength aLength)
     {
     CPtiEngine* ptiengine = iOwner->PtiEngine();
@@ -320,11 +319,6 @@
     return response;
     }
 
-//--------------------------------------------------------------------------
-// The gate to decide whether it is a character is whether it has valid mapping
-// If return ETrue, the key will pass to ptiengine.
-//--------------------------------------------------------------------------
-//
 TBool TAknFepInputStateInitialChineseGenericQwerty::IsCharacter(TInt aKey)
     {
     TBool response = EFalse;
@@ -340,8 +334,6 @@
         response = ETrue;
             }
         }
-		
-	// exception Z might has no mapping but need to put into ptiengine.
     if(!response && aKey == EPtiKeyQwertyZ)
         {
         response = ETrue;
--- a/fep/aknfep/src/AknFepUiInputStateInitialKoreanMultitap.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateInitialKoreanMultitap.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -89,28 +89,14 @@
             	}
             else
             	{
-                     
             	if (!(fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction)))
                 	{ // 'new' inline edit
              	  	ptiengine->ClearCurrentWord();
                 	fepMan->StartInlineEditL();
                 	fepMan->SetInlineEditingCursorVisibilityL(ETrue);
                 	}
-                 
+                      	   	             
             	TPtrC aText = ptiengine->AppendKeyPress((TPtiKey)aKey);
-            	
-                // Get Fep manager pointer
-            	CAknFepManager* fepManager = static_cast<CAknFepManager*>(fepMan);
-            
-               // When reaching the max length of the editor in the Hangul mode, 
-               // the current texts will be committed.     
-            	if( fepManager->IsTextExceedLeghthEditor(aText.Length()))
-            		{
-					fepMan->CommitInlineEditL();
-					ptiengine->ClearCurrentWord();
-					return ETrue;
-            		}
-            	
             	fepMan->UpdateInlineEditL(aText, aText.Length());	
    						
             	// Force commit	when buffer length is 511. Needs to be commited in order to 
--- a/fep/aknfep/src/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -151,27 +151,7 @@
                 fepMan->NewTextL(text);
                 fepMan->CommitInlineEditL();
                 iOwner->PtiEngine()->SetPredictiveChineseChar(text);
-                
-                // For sogou core, the predictive is not endless, so when there
-                // is no predictive candidates, we should call TryCloseUiL().
-                TBool noCandidates = EFalse;
-                
-                if ( iPlugin.IsEnable() || iStrokePlugin.IsEnable())
-                    {
-                    // Get the predictive candidates.
-                    CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat(1);
-                    CleanupStack::PushL ( phraseCandidates );
-                    phraseCandidates->Reset();
-                    iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-                    if ( phraseCandidates->Count() == 0 )
-                        {
-                        noCandidates = ETrue;
-                        }
-                    CleanupStack::PopAndDestroy( phraseCandidates );
-                    }
-                
-                // If no candidates, call TryCloseUiL().
-                if ( fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull) || noCandidates )
+                if (fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull))
                     {
                     fepMan->ClearFlag(CAknFepManager::EFlagEditorFull);
                     iOwner->FepMan()->TryCloseUiL();
@@ -185,11 +165,13 @@
         }
     else if(aKey == EStdKeyRightArrow )
         {
+    	iOwner->ChangeState(EPredictiveInput);  
     	UIContainer()->CandidatePane()->SelectNext(); 
         }
     else if (aKey == EStdKeyLeftArrow)  
     	{
-        UIContainer()->CandidatePane()->SelectPrev();
+    	iOwner->ChangeState(EPredictiveInput);  
+        UIContainer()->CandidatePane()->SelectLastPhrase();
     	}    
     else if(iOwner->IsValidChineseInputKeyQwerty(aKey))
         {
@@ -299,47 +281,4 @@
             break;
         }
     }
-void TAknFepInputStatePredictiveCandidateMiniQwertyChinesePhrase::SubmitTextL( const TDesC& aText )
-	{
-	if( aText.Length())
-	    {            
-	    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-	    CPtiEngine* engine = iOwner->PtiEngine();
-	    fepMan->NewTextL(aText);
-	    fepMan->CommitInlineEditL();
-	    engine->SetPredictiveChineseChar(aText);
-	                    
-        // For sogou core, the predictive is not endless, so when there
-        // is no predictive candidates, we should call TryCloseUiL().
-        TBool noCandidates = EFalse;
-        
-        if ( iPlugin.IsEnable() || iStrokePlugin.IsEnable())
-            {
-            // Get the predictive candidates.
-            CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat(1);
-            CleanupStack::PushL ( phraseCandidates );
-            phraseCandidates->Reset();
-            iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-            if ( phraseCandidates->Count() == 0 )
-                {
-                noCandidates = ETrue;
-                }
-            CleanupStack::PopAndDestroy( phraseCandidates );
-            }
-	    
-	    if (fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull) || noCandidates )
-	       {
-	        fepMan->ClearFlag(CAknFepManager::EFlagEditorFull);
-	        fepMan->TryCloseUiL();
-	        }
-	    else
-	        {
-	    if( iOwner )
-	    	{
-	        iOwner->ChangeState(EPredictiveCandidate);
-	    	}
-	        }           
-	    }
-	}
-
 // End of file
--- a/fep/aknfep/src/AknFepUiInputStatePredictiveInputQwertyChinesePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStatePredictiveInputQwertyChinesePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -49,16 +49,15 @@
     TPoint baseLine = TPoint(0,0);
     TInt height = 0;
     TInt ascent = 0;
-
-    uiContainer->FocusCandidatePane(ETrue);
-    uiContainer->SetLayout(MAknFepUICtrlContainerChinese::ELayoutCandidate);
-    
     TRAPD(ret,iOwner->FepMan()->GetScreenCoordinatesL(baseLine,height,ascent));
     if (ret == KErrNone)
         {
         uiContainer->SetContainerPosition(baseLine, height);    
         }
 
+    uiContainer->FocusCandidatePane(ETrue);
+    uiContainer->SetLayout(MAknFepUICtrlContainerChinese::ELayoutCandidate);
+
     CPtiEngine* ptiengine = iOwner->PtiEngine();
     MAknFepUICtrlCandidatePane* candidatePane = uiContainer->CandidatePane();
     
--- a/fep/aknfep/src/AknFepUiInputStateQwerty.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateQwerty.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -698,6 +698,7 @@
 
 		
 		CPtiQwertyKeyMappings* maps = static_cast<CPtiQwertyKeyMappings*>(lang->GetQwertyKeymappings());
+        maps->SetKeyboardType(ptiengine->KeyboardType());
         TBool keyNotMapToNumeric(ETrue);
 #ifdef RD_INTELLIGENT_TEXT_INPUT
         if(maps)
@@ -1196,11 +1197,8 @@
                     }
                 }
             // Disable UI framewroks's qwerty iCode conversion for simulated event.	
-            numKey.iModifiers |= EModifierSpecial;		
-            
-            //as the editor is a Java number editor, we did not simulate the number key event  
-            if(!(fepMan->IsHybridAplhaEditor() && !fepMan->IsHybridAlphaModeChangedtoAplhanumeric())
-                 && !fepMan->IsSpecialNumericEditor() )
+            numKey.iModifiers |= EModifierSpecial;					
+            if(!(fepMan->IsHybridAplhaEditor() && !fepMan->IsHybridAlphaModeChangedtoAplhanumeric()))
                 {
                 CCoeEnv::Static()->SimulateKeyEventL(numKey, EEventKey);                        
 #ifdef RD_INTELLIGENT_TEXT_INPUT
--- a/fep/aknfep/src/AknFepUiManagerBase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiManagerBase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -1022,7 +1022,6 @@
     {
     return iFepMan->ZhuyinAnalyser();
     }
-
 TBool CAknFepUIManagerBase::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const
     {
     if(iPtiEngine)
@@ -1037,4 +1036,5 @@
         }
     return EFalse;
     }
+
 // End of file
--- a/fep/aknfep/src/AknFepUiManagerChinese.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiManagerChinese.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -123,9 +123,6 @@
 #include <avkon.rsg>        //phrase creation
 #include <aknfep.rsg>
 
-#include "aknfepuiinputminiqwertysogoupinyinphraseplugin.h"
-#include "aknfepuiinputminiqwertysogoustrokephraseplugin.h"
-
 // CONSTANTS
 const TInt16 KStrokeHorizontalValue = 0x4e00; 
 const TInt16 KStrokeVerticalValue = 0x4e28;
@@ -136,16 +133,12 @@
 const TInt16 KStrokeUnicode = 0x2461;
 const TInt16 KZhuyinIndicator = 0x2462;
 const TInt16 KPinyinIndicator = 0x2460;
-//const TInt16 KStrokeIndicator = 0x2461;
 const TInt16 KCanjieIndicator = 0x2463;
 const TInt16 KChineseTone1 = 0x02c9;
 const TInt16 KChineseTone2 = 0x02ca; 
 const TInt16 KChineseTone3 = 0x02c7; 
 const TInt16 KChineseTone4 = 0x02cb;
 const TInt16 KChineseTone0 = 0x02d9;
-
-const TUid KPtiSogouCoreUid = { 0x20031DD6 };
-
 /**
 *  CAknFepUIManagerChinese class.
 * 
@@ -1174,11 +1167,6 @@
 #ifdef RD_INTELLIGENT_TEXT_INPUT        
     TPtiKeyboardType kbdType = iFepMan->KeyboardLayout();    
 #endif    
-    
-    // Get current core id. It is used to judge whether sogou core is in use.
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-
     switch(aState)
         {
         case EQwerty:
@@ -1311,14 +1299,6 @@
                             {
                             iFepUiState = TAknFepInputStateEntryMiniQwertyStrokePhrase(
                                                                   this, iContainerPane);
-                            // If sogou core is in use, set plugin to the state
-                            // machine and enable the plugin.
-                            if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                                {
-                                TAknFepInputMiniQwertySogouStrokePhrasePlugin plugin( this, iContainerPane, EEntry );
-                                plugin.Enable( ETrue );
-                                iFepUiState.SetStrokePlugin( plugin );
-                                }
                         	}
                         else if (EPtiKeyboardHalfQwerty == kbdType)
                             {
@@ -1421,15 +1401,7 @@
                              EPtiKeyboardCustomQwerty == kbdType)                    	
                         	{
                             iFepUiState = TAknFepUiInputStateCandidateMiniQwertyStrokePhrase(this, iContainerPane);
-                            // If sogou core is in use, set plugin to the state
-                            // machine and enable the plugin.
-                            if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                                {
-                                TAknFepInputMiniQwertySogouStrokePhrasePlugin plugin( this, iContainerPane, ECandidate );
-                                plugin.Enable( ETrue );
-                                iFepUiState.SetStrokePlugin( plugin );
-                                }                        
-                        	}
+                            }
                         else if ( EPtiKeyboardHalfQwerty == kbdType )
                             {
                             iFepUiState=TAknFepUiInputStateCandidateHalfQwertyChinesePhrase( this, iContainerPane);
@@ -1496,15 +1468,6 @@
                         {
                         iFepUiState = TAknFepInputStatePredictiveCandidateMiniQwertyChinesePhrase(
                                                                              this, iContainerPane);
-
-                        // If sogou core is in use, set plugin to the state
-                        // machine and enable the plugin.                        
-                        if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                            {
-                            TAknFepInputMiniQwertySogouPinyinPhrasePlugin plugin( this, iContainerPane, EPredictiveCandidate );
-                            plugin.Enable( ETrue );
-                            iFepUiState.SetPlugin( plugin );
-                            }                       
                         }
 #ifdef __HALF_QWERTY_KEYPAD
                     else if( EPtiKeyboardHalfQwerty == kbdType )
@@ -1526,14 +1489,6 @@
                             iFepUiState = 
                                    TAknFepInputStatePredictiveCandidateMiniQwertyChinesePhrase(
                                                                           this, iContainerPane);
-                            // If sogou core is in use, set plugin to the state
-                            // machine and enable the plugin.
-                            if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                                {
-                                TAknFepInputMiniQwertySogouStrokePhrasePlugin plugin( this, iContainerPane, EPredictiveCandidate );
-                                plugin.Enable( ETrue );
-                                iFepUiState.SetStrokePlugin( plugin );
-                                }                   	
                         	}
 #ifdef __HALF_QWERTY_KEYPAD
                     else if( EPtiKeyboardHalfQwerty == kbdType )
@@ -1574,15 +1529,6 @@
                              EPtiKeyboardCustomQwerty == kbdType)                    	
                             {
                             iFepUiState = TAknFepInputStatePredictiveInputMiniQwertyChinesePhrase/*TAknFepInputStatePredictiveInputQwertyPinyinPhrase*/(this, iContainerPane);
-                            
-                            // If sogou core is in use, set plugin to the state
-                            // machine and enable the plugin.                            
-                            if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                                {
-                                TAknFepInputMiniQwertySogouPinyinPhrasePlugin plugin( this, iContainerPane, EPredictiveInput );
-                                plugin.Enable( ETrue );
-                                iFepUiState.SetPlugin( plugin );
-                                }                         
                             }
                         else
                             {
@@ -1610,15 +1556,7 @@
                       	   {
                            iFepUiState = TAknFepInputStatePredictiveInputMiniQwertyChinesePhrase(
                                                                              this, iContainerPane);
-                           // If sogou core is in use, set plugin to the state
-                           // machine and enable the plugin.
-                           if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                               {
-                               TAknFepInputMiniQwertySogouStrokePhrasePlugin plugin( this, iContainerPane, EPredictiveInput );
-                               plugin.Enable( ETrue );
-                               iFepUiState.SetStrokePlugin( plugin );
-                               }                      	   
-                      	   }
+                       	   }
                         else
          	               {
 #endif
@@ -1733,15 +1671,6 @@
                                 TAknFepInputStateEditingMiniQwertyStrokePhrase(
                                                               this, 
                                                               iContainerPane);
-
-                            // If sogou core is in use, set plugin to the state
-                            // machine and enable the plugin.
-                            if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                                {
-                                TAknFepInputMiniQwertySogouStrokePhrasePlugin plugin( this, iContainerPane, EMiniQwertyEdit );
-                                plugin.Enable( ETrue );
-                                iFepUiState.SetStrokePlugin( plugin );
-                                }                             
                             }
 #endif
                         }
--- a/fep/aknfep/src/AknFepUiManagerKorean.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiManagerKorean.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -219,17 +219,14 @@
             {
             switch(iMode)
                 {
-                case EHangul:
+                case ELatin:
+                    {
                     iFepUiState = TAknFepInputStateQwertyKorean(this);
-                    break;                
-                case ELatin:
-                case ENumber:
-                case ENativeNumber:
-                	iFepUiState = TAknFepInputStateQwerty(this);
-                	break;
+                    break;               
+                    }
                 default:
-					AknFepPanic(EAknFepPanicBadInputState);	
-					break;
+			AknFepPanic(EAknFepPanicBadInputState);	
+           	break;
                 }
                break;
             }
--- a/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -121,8 +121,6 @@
     {0x02D9, 5}
     };
 
-const TUid KPtiSogouCoreUid = { 0x20031DD6 };
-
 // ---------------------------------------------------------------------------
 // TAknFepInputStateStrokePhraseCreationBase::TAknFepInputStateStrokePhraseCreationBase
 // C++ default constructor
@@ -141,18 +139,6 @@
     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
     TBool multiplePages = !(uiContainer->CandidatePane()->IsLastPage() && uiContainer->CandidatePane()->IsFirstPage());
     uiContainer->ShowVerticalScrollArrows(multiplePages);
-    
-    // If sogou core is in use, set plugin to the state
-    // machine and enable the plugin.
-    // Get current core id. It is used to judge whether sogou core is in use.
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        TAknFepInputMiniQwertySogouPinyinPhrasePlugin plugin( aOwner, aUIContainer, iState );
-        plugin.Enable( ETrue );
-        SetPlugin( plugin );
-        }
     }
 
 // ---------------------------------------------------------------------------
@@ -400,42 +386,11 @@
                 }
             }
         GetKeystrokeCode(keyCode, showKeystroke->MdcaPoint(i) );
-        
-        // dltBeforeCount is the dlt count before append the key.
-        // dltAfterCount is the dlt count after append the key.
-        // In sogou core, after appending a new key, the spell length
-        // may be the same, but the dlt count will change.
-        // In this situation, the appended key is valid.
-        TInt dltBeforeCount = 0;
-        TInt dltAfterCount = 0;
-        TPtrC stringBefore = getCurrentLeastDLTSpell();
-        stringBeforeLength = stringBefore.Length();
-        for ( TInt k = 0; k < stringBefore.Length(); k++ )
-            {
-            if ( CheckSpellingDLT( stringBefore.Mid( k )))
-                {
-                dltBeforeCount++;
-                }
-            }
-        
-        // Append the key.
+        stringBeforeLength = getCurrentLeastDLTSpell().Length();
         ptiengine->AppendKeyPress((TPtiKey)keyCode).Length();
-        
-        // Get the dlt count after appending the key.
-        TPtrC stringAfter = getCurrentLeastDLTSpell();
-        stringAfterLength = stringAfter.Length();
-        for ( TInt l = 0; l < stringAfter.Length(); l++ )
-            {
-            if ( CheckSpellingDLT( stringAfter.Mid( l )))
-                {
-                dltAfterCount++;
-                }
-            }
-
-        // If the spell length is the same and the dlt count is 
-        // the same, the keystroke is invalid
-        if (( stringBeforeLength == stringAfterLength ) &&
-            ( dltAfterCount == dltBeforeCount ))
+        stringAfterLength = getCurrentLeastDLTSpell().Length();
+        //the keystroke is invalid.
+        if (stringBeforeLength == stringAfterLength)
             {
             return EFalse;
             }
@@ -460,23 +415,7 @@
     TInt count = 0;
     TBuf<1> autoDLT;
     autoDLT.Append(KAutoDLT);
-    
-    // If this method is called in construction of the state machine,
-    // the plugin is not set. If sogou core is in use now, the phraseCount
-    // should be the same as the phrase characters count.
-    // For Sogou core, maybe one element of PhraseArray() contains two or more characters.
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        CDesCArrayFlat* phraseArray = editPane->PhraseArray();
-        phraseCount = 0;
-        for ( TInt i = 0; i < phraseArray->Count(); i++ )
-            {
-            phraseCount += (*phraseArray)[i].Length();
-            }
-        }
-    
+
     if ( 0 == index)
         {
         pos = phraseCount;
@@ -578,26 +517,6 @@
     manualDLT.Append( KManualDLT );
     autoDLT.Append( KAutoDLT );
     
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        CDesCArrayFlat* phrase = editPane->PhraseArray();
-        phraseCount = 0;
-        for ( TInt j = 0;  j < phrase->Count(); j++ )
-            {
-            phraseCount += phrase->MdcaPoint(j).Length();;
-            }
-        }
-    
-    if ( phraseCount + showKeystrokeCount >= KMaxKeystrokeCount )
-        {
-        iOwner->FepMan()->PlaySound(EAvkonSIDErrorTone);
-        return;
-        }
-    
     TBool firstGroup = CheckFirstGroupStroke();
 
     keystrokeArray->InsertL(index, manualDLT);
@@ -954,12 +873,6 @@
 //
 void TAknFepInputMiniQwertyPinyinPhraseBase::AnalyseL()
     {
-    // If sogou core is actived, use the plugin.
-    if ( iPlugin.IsEnable())
-        {
-        iPlugin.AnalyseL();
-        return;
-        }
     CPtiEngine* ptiengine = iOwner->PtiEngine();
     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
     MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
@@ -1065,7 +978,7 @@
         if ( ( showKeyCount > 0 ) && (cdtCount > 0 ) )
             {
             UIContainer()->EditPaneWindow()->SetChangeState(ETrue);
-            iOwner->ChangeState(EEntry);
+            iOwner->ChangeState(ECandidate);
             return;
             }
 
@@ -1136,15 +1049,17 @@
                 {
                 editPane->SetAutoChangeStateFlag(EAutoChangeStateFromCandidate);
                 }
-            //stroke to be shown
-            if ( iPlugin.IsEnable())
-                {
-                iPlugin.AnalyseL();
-                }
             iOwner->ChangeState(EMiniQwertyEdit);
             return;
             }
-
+        else
+            {
+            if ( iState == EEntry )
+                {
+                UIContainer()->EditPaneWindow()->SetChangeState( ETrue );
+                iOwner->ChangeState( ECandidate );
+                }
+            }
         AnalyseL();
         RefreshUI();
         }
@@ -1305,31 +1220,9 @@
     CDesCArrayFlat* phrase = editPane->PhraseArray();
     TBuf<KMaxKeystrokeCount> showInfo;
     TBuf<KMaxKeystrokeCount> keyBuf;
-    
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    TInt phraseCount = 0;
-    
     for (TInt i = 0; i < phrase->Count(); ++i)
         {
-        // If this method is called in construction of the state machine,
-        // the plugin is not set. If sogou core is in use now, we should append 
-        // each characters to showInfo.
-        // For Sogou core, maybe one element of PhraseArray() contains two or more characters.
-        if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-            {
-            for ( TInt k = 0; k < phrase->MdcaPoint(i).Length(); k++ )
-                {
-                showInfo.Append( phrase->MdcaPoint(i)[k] );
-                }
-            phraseCount += phrase->MdcaPoint(i).Length();
-            }
-        else
-            {
-            // If cpicore is in use, just append the element of phrase
-            showInfo.Append(phrase->MdcaPoint(i) );
-            }
+        showInfo.Append(phrase->MdcaPoint(i) );
         }
 
     for (TInt ii = 0; ii < showKeystroke->Count(); ++ii)
@@ -1341,22 +1234,9 @@
         {
         keyBuf.Append(keystrokeArray->MdcaPoint(j) );
         }
-    
-    // If this method is called in construction of the state machine,
-    // the plugin is not set. If sogou core is in use now, the phraseCount
-    // should be the same as the phrase characters count.
-    // For Sogou core, maybe one element of PhraseArray() contains two or more characters.
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        editPane->SetTextForZhuyin(showInfo, GetCursorPos(), phraseCount,
-                        keyBuf, editPane->GetCursorIndexOfKeystroke() );
-        }
-    else
-        {
-        // If cpicore is in use, phraseCount is the same as phrase->Count()
-        editPane->SetTextForZhuyin(showInfo, GetCursorPos(), phrase->Count(),
+
+    editPane->SetTextForZhuyin(showInfo, GetCursorPos(), phrase->Count(),
         keyBuf, editPane->GetCursorIndexOfKeystroke() );
-        }
 
     if (iState == ECandidate)
         {
@@ -1426,7 +1306,6 @@
         uiContainer->SetControlInVisible( EFalse );
         }
     }
-
 //-------------------------------------------------------------------------------
 // Purpose: to adjust the scancode to make pinyin works
 // Pinyin symbol inheritantly accepts A-Z, any input out of this range will make it crash.
@@ -1447,6 +1326,7 @@
             }
         }
     }
+
 // ---------------------------------------------------------------------------
 // TAknFepInputMiniQwertyPinyinPhraseBase::GetShowKeystroke
 //Handle horizontal navigation.
@@ -1656,11 +1536,6 @@
 void TAknFepInputMiniQwertyPinyinPhraseBase::AddPhraseToDB(
     const TDesC& aPhraseAdd)
     {
-    if ( iPlugin.IsEnable())
-        {
-        iPlugin.AddPhrasePinyinToPti();
-        return;
-        }
     TPtiUserDictionaryEntry addUdbEntry(aPhraseAdd);
     //Add the phrase to the DB by PTI Engine
     iOwner->PtiEngine()->AddUserDictionaryEntry(addUdbEntry);
@@ -1713,12 +1588,6 @@
 TBool TAknFepInputMiniQwertyPinyinPhraseBase::CommitInlineEEPL(
     const TDesC& aDes)
     {
-    // If sogou core is actived, use the plugin.
-    if ( iPlugin.IsEnable())
-        {
-        return iPlugin.CommitInlineEEPL( aDes );
-        }
-
     TInt charCount = aDes.Length();
     MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
     MAknFepUICtrlEditPane* editpane = UIContainer()->EditPaneWindow();
@@ -1826,33 +1695,17 @@
     TInt index = editPane->GetCursorIndexOfKeystroke();
     TBuf<1> keystroke;
     
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        CDesCArrayFlat* phrase = editPane->PhraseArray();
-        phraseCount = 0;
-        for ( TInt j = 0;  j < phrase->Count(); j++ )
-            {
-            phraseCount += phrase->MdcaPoint(j).Length();;
-            }
-        }
-    
     if ( phraseCount + showKeystrokeCount >= KMaxKeystrokeCount )
         {
         return EFalse;
         }
 
     GetShowKeystroke(aKey, keystroke);
-	
 	//Add this condition to avoid crash in case keystroke is empty.
     if(keystroke.Length() == 0)
         {
         return EFalse;
         }
-    
     if ( index >= keystrokeArray->Count() )
         {
         keystrokeArray->AppendL(keystroke);
@@ -1985,12 +1838,6 @@
 //
 void TAknFepInputMiniQwertyPinyinPhraseBase::GetCandidateL()
     {
-    if ( iPlugin.IsEnable())
-        {
-        iPlugin.GetCandidateL();
-        return;
-        }
-    
     CPtiEngine* ptiengine = iOwner->PtiEngine();
     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
     MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
@@ -2012,7 +1859,7 @@
         return;
         }
 
-    if (( phraseCount == 0 ) && CheckAllGroupStroke())
+    if ( CheckAllGroupStroke() && ( phraseCount == 0 ) )
         {
         getCurrentLeastDLTSpell();
         ptiengine->GetChinesePhraseCandidatesL( *phraseCandidates ); 
@@ -2127,13 +1974,7 @@
     keystrokeArray->Compress();
     phrase->Compress();
     phraseStroke->Compress();
-    
-    TInt coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID );
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        // Notify sogoucore that last phrase is cancelled
-        iOwner->PtiEngine()->HandleCommandL( EPtiCommandCancelSelectElement );
-        }
+
     }
 
 // ---------------------------------------------------------
@@ -2159,11 +2000,6 @@
         {
         editPane->SetHighlight(aPhraseCount + aIndex, aPhraseCount
                 + aIndex + aCount - 1 );
-        if ( iPlugin.IsEnable())
-            {
-            iPlugin.CanConvertAll( EFalse );
-            iPlugin.ConvertCount( aIndex );
-            }
         }
     else
         {
@@ -2188,11 +2024,6 @@
             {
             editPane->SetHighlight( aPhraseCount + aIndex, aPhraseCount
                     + aIndex + aCount - 1);
-            if ( iPlugin.IsEnable())
-                {
-                iPlugin.CanConvertAll( EFalse );
-                iPlugin.ConvertCount( aIndex );
-                }
             }
         }
     ClearPtiEngineKeystroke();
@@ -2217,68 +2048,26 @@
     TInt start = 0;
     TInt keyCode = 0;
     TInt toneMark = KInvalidToneMark;
-    
-    if ( iPlugin.IsEnable())
-        {
-        iPlugin.CanConvertAll( ETrue );
-        }
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        CDesCArrayFlat* phrase = editPane->PhraseArray();
-        phraseCount = 0;
-        for ( TInt j = 0;  j < phrase->Count(); j++ )
-            {
-            phraseCount += phrase->MdcaPoint(j).Length();;
-            }
-        }
 
     if (showKeystroke->Count() == 0)
         {
         return;
         }
 
-    if ( TUid::Uid( coreID ) != KPtiSogouCoreUid )
+    if (CheckAllGroupStroke() )
         {
-        if ( CheckAllGroupStroke())
-            {
-            return;
-            }
+        return;
         }
-
     ClearPtiEngineKeystroke();
     if (CheckSpellingDLT(showKeystroke->MdcaPoint( 0) ) || (KInvalidToneMark
             != ToneMark(showKeystroke->MdcaPoint( 0) ) ))
         {
         start = 1;
         editPane->SetHighlight(phraseCount, phraseCount);
-
-        if ( iPlugin.IsEnable())
-            {
-            iPlugin.CanConvertAll( EFalse );
-            iPlugin.ConvertCount( index );
-            }
-        
         index = 1;
         }
-    
-    TInt end = showKeystroke->Count();
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        for ( TInt j = showKeystroke->Count() - 1; j >= 0; j-- )
-            {
-            if ( KAutoDLT == showKeystroke->MdcaPoint(j)[0] )
-                {
-                end = j + 1;
-                break;
-                }
-            }
-        }
 
-    for ( TInt i = start; i < end; ++i )
+    for ( TInt i = start; i < showKeystroke->Count(); ++i )
         {
         count = count + 1;
         // tone mark
@@ -2306,11 +2095,6 @@
                     {
                     editPane->SetHighlight(phraseCount + index, phraseCount
                             + index + count - 1);
-                    if ( iPlugin.IsEnable())
-                        {
-                        iPlugin.CanConvertAll( EFalse );
-                        iPlugin.ConvertCount( index );
-                        }
                     }
                 ClearPtiEngineKeystroke();
                 index = i + 1;
@@ -2322,42 +2106,10 @@
                 if ( valid )
                     {
                     GetKeystrokeCode(keyCode, showKeystroke->MdcaPoint(i) );
-                    
-                    // dltBeforeCount is the dlt count before append the key.
-                    // dltAfterCount is the dlt count after append the key.
-                    // In sogou core, after appending a new key, the spell length
-                    // may be the same, but the dlt count will change.
-                    // In this situation, the appended key is valid.
-                    TInt dltBeforeCount = 0;
-                    TInt dltAfterCount = 0;
-                    TPtrC stringBefore = getCurrentLeastDLTSpell();
-                    stringBeforeLength = stringBefore.Length();
-                    for ( TInt j = 0; j < stringBefore.Length(); j++ )
-                        {
-                        if ( CheckSpellingDLT( stringBefore.Mid( j )))
-                            {
-                            dltBeforeCount++;
-                            }
-                        }
-                    
-                    // Append the key.
-                    ptiengine->AppendKeyPress(( TPtiKey )keyCode ).Length();
-                    
-                    // Get the dlt count after appending the key.
-                    TPtrC stringAfter = getCurrentLeastDLTSpell();
-                    stringAfterLength = stringAfter.Length();
-                    for ( TInt k = 0; k < stringAfter.Length(); k++ )
-                        {
-                        if ( CheckSpellingDLT( stringAfter.Mid( k )))
-                            {
-                            dltAfterCount++;
-                            }
-                        }
-                    
-                    // If the spell length is the same and the dlt count is 
-                    // the same, the keystroke is invalid
-                    if (( stringBeforeLength == stringAfterLength ) && 
-                        ( dltAfterCount == dltBeforeCount ))
+                    stringBeforeLength = getCurrentLeastDLTSpell().Length();
+                    ptiengine->AppendKeyPress((TPtiKey)keyCode).Length();
+                    stringAfterLength = getCurrentLeastDLTSpell().Length();
+                    if ( stringBeforeLength == stringAfterLength )//the keystroke is invalid
                         {
                         ClearPtiEngineKeystroke();
                         valid = EFalse;
@@ -2370,13 +2122,6 @@
             editPane->SetHighlight(
                                 phraseCount + index, 
                                 phraseCount + index + count - 1 );
-
-            if ( iPlugin.IsEnable())
-                {
-                iPlugin.CanConvertAll( EFalse );
-                iPlugin.ConvertCount( index );
-                }
-
             ClearPtiEngineKeystroke();
             }
         }
@@ -2432,28 +2177,8 @@
     CDesCArrayFlat* showKeyStoke = editPane->ShowKeystrokeArray();
     TInt showKeyStokeCount = editPane->ShowKeystrokeArray()->Count();
     TInt indexOfKeystroke = editPane->GetCursorIndexOfKeystroke();
-    
-    TInt cursorPos = 0;
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    TInt phraseCount = 0;
-    
-    // For Sogou core, maybe on element of PhraseArray() contains two or 
-    // more characters.
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        for ( TInt l = 0; l < editPane->PhraseArray()->Count(); l++ )
-            {
-            phraseCount += editPane->PhraseArray()->MdcaPoint( l ).Length();
-            }
-        cursorPos = editPane->GetCursor() - phraseCount;
-        }
-    else
-        {
-        cursorPos = editPane->GetCursor() - editPane->PhraseArray()->Count();
-        }
-    
+    TInt cursorPos = editPane->GetCursor() - editPane->PhraseArray()->Count();
+
     TBuf<1> autoDLT;
     autoDLT.Append(KAutoDLT);
     const TInt offset = 2;
@@ -2507,28 +2232,7 @@
     CDesCArrayFlat* showKeyStoke = editPane->ShowKeystrokeArray();
     TInt showKeyStokeCount = editPane->ShowKeystrokeArray()->Count();
     TInt indexOfKeystroke = editPane->GetCursorIndexOfKeystroke();
-     
-    TInt cursorPos = 0;
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    TInt phraseCount = 0;
-    
-    // For Sogou core, maybe on element of PhraseArray() contains two or 
-    // more characters.
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        for ( TInt l = 0; l < editPane->PhraseArray()->Count(); l++ )
-            {
-            phraseCount += editPane->PhraseArray()->MdcaPoint( l ).Length();
-            }
-        cursorPos = editPane->GetCursor() - phraseCount;
-        }
-    else
-        {
-        cursorPos = editPane->GetCursor() - editPane->PhraseArray()->Count();
-        }
-    
+    TInt cursorPos = editPane->GetCursor() - editPane->PhraseArray()->Count();
     TBuf<1> autoDLT;
     autoDLT.Append(KAutoDLT);
     const TInt offset = 2;
@@ -2779,6 +2483,7 @@
 void TAknFepInputMiniQwertyPinyinPhraseBase::HandleKeyFromCandidateL(
     TInt aKey, TKeyPressLength /*aLength*/)
     {
+    TInt index = 0;
 #ifdef RD_INTELLIGENT_TEXT_INPUT
     // it may be one of the 'valid' numbers..
     TPtiKeyboardType keyboardtype = iOwner->FepMan()->KeyboardLayout();
@@ -2806,6 +2511,7 @@
                 if ( (numKeyBind.iChar >= 0x31 && numKeyBind.iChar <= 0x36)
                         &&(aKey == numKeyBind.iKey))
                     {
+                    index = numKeyBind.iChar - EPtiKey0 -1;
                     validnumkey = ETrue;
                     break;
                     }
@@ -2819,10 +2525,16 @@
             return;
             }
         }
+    else
+        {
+#endif
+        index = MapKeyToIndex(aKey);
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        }
 #endif
     MAknFepUICtrlCandidatePane* candidatePane = UIContainer()->CandidatePane();
 
-    if ( aKey == EStdKeyDevice3 || aKey
+    if (candidatePane->SelectIndex(index) || aKey == EStdKeyDevice3 || aKey
             == EStdKeyEnter)
         {
         TPtrC text = candidatePane->CurrentPhraseCandidate();
@@ -2919,42 +2631,10 @@
                 return EFalse;
                 }
             GetKeystrokeCode(keyCode, keystroke->MdcaPoint(i) );
-            
-            // dltBeforeCount is the dlt count before append the key.
-            // dltAfterCount is the dlt count after append the key.
-            // In sogou core, after appending a new key, the spell length
-            // may be the same, but the dlt count will change.
-            // In this situation, the appended key is valid.
-            TInt dltBeforeCount = 0;
-            TInt dltAfterCount = 0;
-            TPtrC stringBefore = getCurrentLeastDLTSpell();
-            stringBeforeLength = stringBefore.Length();
-            for ( TInt k = 0; k < stringBefore.Length(); k++ )
-                {
-                if ( CheckSpellingDLT( stringBefore.Mid( k )))
-                    {
-                    dltBeforeCount++;
-                    }
-                }
-
-            // Append the key.
-            ptiengine->AppendKeyPress(( TPtiKey )keyCode );
-            
-            // Get the dlt count after appending the key.
-            TPtrC stringAfter = getCurrentLeastDLTSpell();
-            stringAfterLength = stringAfter.Length();
-            for ( TInt l = 0; l < stringAfter.Length(); l++ )
-                {
-                if ( CheckSpellingDLT( stringAfter.Mid( l )))
-                    {
-                    dltAfterCount++;
-                    }
-                }
-            
-            // If the spell length is the same and the dlt count is 
-            // the same, the keystroke is invalid
-            if (( stringBeforeLength == stringAfterLength ) && 
-                ( dltAfterCount == dltBeforeCount ))
+            stringBeforeLength = getCurrentLeastDLTSpell().Length();
+            ptiengine->AppendKeyPress((TPtiKey)keyCode).Length();
+            stringAfterLength = getCurrentLeastDLTSpell().Length();
+            if ( stringBeforeLength == stringAfterLength )
                 {
                 return EFalse;
                 }
@@ -3009,27 +2689,8 @@
             }
         else
             {
-            // For sogou core, the predictive is not endless, so when there
-            // is no predictive candidates, we should call TryCloseUiL().
-            TBool noCandidates = EFalse;
-            
-            TInt coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID );
-            if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-                {
-                // Get the predictive candidates.
-                CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat( 1 );
-                CleanupStack::PushL ( phraseCandidates );
-                phraseCandidates->Reset();
-                iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-                if ( phraseCandidates->Count() == 0 )
-                    {
-                    noCandidates = ETrue;
-                    }
-                CleanupStack::PopAndDestroy( phraseCandidates );
-                }
-        
             UIContainer()->EditPaneWindow()->ResetAllArray();
-            if ( !UIContainer()->EditPaneWindow()->GetPhraseCreationFlag() && !noCandidates )
+            if ( !UIContainer()->EditPaneWindow()->GetPhraseCreationFlag() )
                 {
                 UIContainer()->EditPaneWindow()->SetPhraseCreationFlag(EFalse);
                 UIContainer()->EditPaneWindow()->SetChangeState(ETrue);
--- a/fep/aknfep/src/aknfepuiinputminiqwertysogoupinyinphraseplugin.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,761 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:           
- *      Provides the TAknFepInputMiniQwertySogouPinyinPhrasePlugin definition.
- *
-*/
-
-// System includes
-#include <e32cmn.h>
-#include <PtiEngine.h>
-#include <PtiDefs.h>
-#include <avkon.rsg>
-#include <aknfep.rsg>
-#include <PtiUserDicEntry.h>
-#include <aknnotewrappers.h> //CAknWarningNote 
-// User includes
-#include "AknFepUIManagerStateInterface.h"
-#include "AknFepUICtrlInputPane.h"
-#include "AknFepUICtrlPinyinPopup.h"        //Pinyin phrase
-#include "aknfepuictrleditpane.h"           //pinyin phrase creation
-#include "AknFepUICtrlCandidatePane.h"
-#include "AknFepManager.h"
-
-#include "aknfepuiinputminiqwertysogoupinyinphraseplugin.h"
-#include "AknFepUiInputStateCandidateQwertyBaseChinesePhrase.h"
-
-// Constant definition
-const TInt KMaxPhraseCreationCount = 10;
-const TInt KMaxKeystrokeCount = 31;
-const TInt KMaxShowKeystrokeCount = 255;
-const TInt KInvalidToneMark = -1;
-const TUint16 KAutoDLT = 0x002E;
-const TUint16 KManualDLT = 0x0027;
-const TUint16 KPYa = 0x0061;
-const TUint16 KPYb = 0x0062;
-const TUint16 KPYc = 0x0063;
-const TUint16 KPYd = 0x0064;
-const TUint16 KPYe = 0x0065;
-const TUint16 KPYf = 0x0066;
-const TUint16 KPYg = 0x0067;
-const TUint16 KPYh = 0x0068;
-const TUint16 KPYi = 0x0069;
-const TUint16 KPYj = 0x006A;
-const TUint16 KPYk = 0x006B;
-const TUint16 KPYl = 0x006C;
-const TUint16 KPYm = 0x006D;
-const TUint16 KPYn = 0x006E;
-const TUint16 KPYo = 0x006F;
-const TUint16 KPYp = 0x0070;
-const TUint16 KPYq = 0x0071;
-const TUint16 KPYr = 0x0072;
-const TUint16 KPYs = 0x0073;
-const TUint16 KPYt = 0x0074;
-const TUint16 KPYu = 0x0075;
-const TUint16 KPYv = 0x0076;
-const TUint16 KPYw = 0x0077;
-const TUint16 KPYx = 0x0078;
-const TUint16 KPYy = 0x0079;
-const TUint16 KPYz = 0x007A;
-
-const TMiniQwertyKeyMap StrokeMap[] =
-    {
-    {KPYa, EPtiKeyQwertyA},
-    {KPYb, EPtiKeyQwertyB},
-    {KPYc, EPtiKeyQwertyC},
-    {KPYd, EPtiKeyQwertyD},
-    {KPYe, EPtiKeyQwertyE},
-    {KPYf, EPtiKeyQwertyF},
-    {KPYg, EPtiKeyQwertyG},
-    {KPYh, EPtiKeyQwertyH},
-    {KPYi, EPtiKeyQwertyI},
-    {KPYj, EPtiKeyQwertyJ},
-    {KPYk, EPtiKeyQwertyK},
-    {KPYl, EPtiKeyQwertyL},
-    {KPYm, EPtiKeyQwertyM},
-    {KPYn, EPtiKeyQwertyN},
-    {KPYo, EPtiKeyQwertyO},
-    {KPYp, EPtiKeyQwertyP},
-    {KPYq, EPtiKeyQwertyQ},
-    {KPYr, EPtiKeyQwertyR},
-    {KPYs, EPtiKeyQwertyS},
-    {KPYt, EPtiKeyQwertyT},
-    {KPYu, EPtiKeyQwertyU},
-    {KPYv, EPtiKeyQwertyV},
-    {KPYw, EPtiKeyQwertyW},
-    {KPYx, EPtiKeyQwertyX},
-    {KPYy, EPtiKeyQwertyY},
-    {KPYz, EPtiKeyQwertyZ},
-    {KManualDLT, EPtiKeyQwertySpace}
-    };
-
-const TMiniQwertyToneMap PinyinToneMap[] =
-    {
-    {0x02C9, 1},
-    {0x02CA, 2},
-    {0x02C7, 3},
-    {0x02CB, 4},
-    {0x02D9, 5}
-    };
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::TAknFepInputMiniQwertySogouPinyinPhrasePlugin
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-TAknFepInputMiniQwertySogouPinyinPhrasePlugin::TAknFepInputMiniQwertySogouPinyinPhrasePlugin(
-    MAknFepUIManagerStateInterface* aOwner,
-    MAknFepUICtrlContainerChinese* aUIContainer,
-    TUIState aState )
-    : iOwner( aOwner ),
-      iUIContainer( aUIContainer ),
-      iState( aState ),
-      iValid( EFalse ),
-      iNeedAddDLT( EFalse ),
-      iCanConvertAll( ETrue ),
-      iConvertCount( -1 )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::operator=
-// 
-// ---------------------------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::operator=( const 
-        TAknFepInputMiniQwertySogouPinyinPhrasePlugin& aPlugin )
-    {
-    Mem::Copy( this, &aPlugin, sizeof(TAknFepInputMiniQwertySogouPinyinPhrasePlugin));
-    }
-
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::AnalyseL
-// Analyse key storke.
-// ---------------------------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::AnalyseL()
-    {
-    CPtiEngine* ptiengine = iOwner->PtiEngine();
-    MAknFepUICtrlEditPane* editPane = iUIContainer->EditPaneWindow();
-    
-    //user pressed keystroke sequence
-    CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
-    
-    //stroke to be shown
-    CDesCArrayFlat* showKeystroke = editPane->ShowKeystrokeArray();
-    TInt start = 0;
-    TInt toneMarkCount = KInvalidToneMark;
-//    TInt delimiterPosition = 0;
-    showKeystroke->Reset();
-    TBuf<1> atuoDLT;
-    TBuf<1> manualDLT;
-    atuoDLT.Append( KAutoDLT );
-    manualDLT.Append( KManualDLT );
-    TBuf<KMaxKeystrokeCount> keyTmp;
-
-    if ( keystroke->Count() == 0 )
-        {
-        return;
-        }
-    
-    ClearPtiEngineKeystroke();
-    
-    TInt phraseCount = 0;
-    CDesCArrayFlat* phrase = editPane->PhraseArray();
-    for ( TInt j = 0;  j < phrase->Count(); j++ )
-        {
-        phraseCount += phrase->MdcaPoint(j).Length();;
-        }
-    
-    // Analysis every keystroke
-    TInt firstIsTonemark = EFalse;
-    TBool lastOneIsTonemark = EFalse;
-    for ( TInt i = start; i < keystroke->Count(); ++i )
-        {
-        // Detect which tonemark the keystroke is.
-        toneMarkCount = ToneMark( keystroke->MdcaPoint( i ));
-
-        // current keystroke is tonemark
-        if ( KInvalidToneMark != toneMarkCount )
-            {
-            if ( i == 0 )
-                {
-                firstIsTonemark = ETrue;
-                }
-            // Analysis and add the tonemark
-            TBool checkTonemark = CheckSpellingAddToneMarkToPTIL( toneMarkCount );
-            if ( !checkTonemark || lastOneIsTonemark )
-                {
-                if ( lastOneIsTonemark && checkTonemark )
-                    {
-                    ptiengine->IncrementToneMark( ETrue );
-                    }
-                TPtrC ptr = getCurrentLeastDLTSpell();
-                TBuf<1> tonemark;
-                if ( ptr.Length() > 0 )
-                    {
-                    tonemark.Append( ptr[ ptr.Length() - 1 ] );
-                    if ( lastOneIsTonemark )
-                        {
-                        keystroke->Delete( i - 1, 2 );
-                        keystroke->InsertL( i - 1, tonemark );
-                        i = i - 1;
-                        }
-                    else
-                        {
-                        keystroke->Delete( i );
-                        keystroke->InsertL( i, tonemark );
-                        }
-                    }
-                else if ( lastOneIsTonemark )
-                    {
-                    toneMarkCount = ToneMark( keystroke->MdcaPoint( i )) + 
-                            ToneMark( keystroke->MdcaPoint( i - 1 ));
-                    toneMarkCount = toneMarkCount % 
-                            ( sizeof(PinyinToneMap ) / ( sizeof(PinyinToneMap[0])));
-                    if ( toneMarkCount == 0 )
-                        {
-                        toneMarkCount = 5;
-                        }
-                    tonemark.Append( PinyinToneMap[toneMarkCount - 1].iValue );
-                    keystroke->Delete( i - 1, 2 );
-                    keystroke->InsertL( i - 1, tonemark );
-                    i = i - 1;
-                    }
-                    
-                }
-            lastOneIsTonemark = ETrue;
-            ptiengine->HandleCommandL( EPtiCommandResetToneMark );
-            }
-        else
-            {
-            if ( lastOneIsTonemark )
-                {
-                lastOneIsTonemark = EFalse;
-                }
-            TInt keyCode = 0;
-            GetKeystrokeCode( keyCode, keystroke->MdcaPoint( i ));
-            ptiengine->AppendKeyPress(( TPtiKey )keyCode );
-            }
-        
-        // If the last keystroke is appended, get the spell from core and
-        // add it to show keystroke.
-        if ( i == keystroke->Count() - 1 )
-            {
-            TPtrC spell = getCurrentLeastDLTSpell();
-            TInt dltCount = 0;
-            for ( TInt j = 0; j < spell.Length(); j++ )
-                {
-                showKeystroke->AppendL( spell.Mid( j, 1 ));
-                if ( KAutoDLT == spell[j] )
-                    {
-                    dltCount++;
-                    }
-                }
-            TInt tmp = 0;
-            if ( firstIsTonemark )
-                {
-                tmp = 1;
-                }
-            if ( spell.Length() - dltCount + start + tmp < keystroke->Count())
-                {
-                if ( spell.Length() != 0 )
-                    {
-                    showKeystroke->AppendL( atuoDLT );
-                    }
-                for ( TInt k = spell.Length() - dltCount; k < keystroke->Count(); k++ )
-                    {
-                    showKeystroke->AppendL( keystroke->MdcaPoint( k ));
-                    }
-                }
-            else if ( spell.Length() - dltCount + start < keystroke->Count())
-                {
-                showKeystroke->InsertL( 0, keystroke->MdcaPoint( 0 ));
-                }
-            
-            ClearPtiEngineKeystroke();
-            }
-
-        if ( phraseCount + showKeystroke->Count() > KMaxKeystrokeCount )
-            {
-            showKeystroke->Delete( KMaxKeystrokeCount - phraseCount, 
-                  phraseCount + showKeystroke->Count() - KMaxKeystrokeCount );
-            if ( CheckSpellingDLT( showKeystroke->MdcaPoint( 
-                                      KMaxKeystrokeCount - phraseCount - 1 )))
-                {
-                showKeystroke->Delete( KMaxKeystrokeCount - phraseCount - 1 );
-                }
-            break;
-            }
-        }
-    if ( iNeedAddDLT )
-        {
-        iNeedAddDLT = EFalse;
-        }
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::ClearPtiEngineKeystroke
-// clear the ptiengine keystroke;
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::ClearPtiEngineKeystroke()
-    {
-    iOwner->PtiEngine()->ClearCurrentWord();
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::GetKeystrokeCode
-// get Code of the key stroke. 
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::GetKeystrokeCode( TInt& aKey,
-    const TDesC& aKeystroke )
-    {
-    TInt count = sizeof(StrokeMap) / sizeof(StrokeMap[0]);
-    for ( TInt i = 0; i < count; i++ )
-        {
-        TBuf<1> buf;
-        buf.Append( StrokeMap[i].iValue );
-        if ( 0 == aKeystroke.Compare( buf ))
-            {
-            aKey = StrokeMap[i].iKeyCode;
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::getCurrentLeastDLTSpell
-// get current spell which contains the least DLT.
-// ---------------------------------------------------------
-//
-TPtrC TAknFepInputMiniQwertySogouPinyinPhrasePlugin::getCurrentLeastDLTSpell()
-    {
-    CPtiEngine* ptiengine = iOwner->PtiEngine();
-    CDesC16ArrayFlat* allSpell = new CDesC16ArrayFlat( 1 );
-    TPtrC  currentSpell;
-    TBuf<1> delimiter;
-    TBuf<KMaxKeystrokeCount> preDltPosizeArr;
-    TBuf<KMaxKeystrokeCount> curDltPosizeArr;
-    preDltPosizeArr.FillZ( KMaxKeystrokeCount );
-    preDltPosizeArr.SetLength( KMaxKeystrokeCount );
-    curDltPosizeArr.FillZ( KMaxKeystrokeCount );
-    curDltPosizeArr.SetLength( KMaxKeystrokeCount );
-    
-    TInt index = 1;
-    delimiter.Append( KManualDLT );
-    TRAP_IGNORE( ptiengine->GetPhoneticSpellingsL( *allSpell ));
-    TInt allCount = ptiengine->PhoneticSpellingCount();
-    
-    
-    for( TInt i = 0; i < allCount; i++ )
-        {
-        currentSpell.Set(allSpell->MdcaPoint( i ));
-        TInt dltIndex = 0;
-        curDltPosizeArr.FillZ(KMaxKeystrokeCount);
-        curDltPosizeArr.SetLength(KMaxKeystrokeCount);
-        TInt preIndex = 0;
-        for ( TInt j = 0; j < currentSpell.Length(); j++ )
-            {
-            if ( currentSpell.Mid( j, 1 ).Compare( delimiter ) == 0 )
-                {   
-                curDltPosizeArr[dltIndex] = j - preIndex - 1;
-                preIndex = j;
-                dltIndex++;
-                }
-            else if (( j + 1 ) == currentSpell.Length())
-                {
-                curDltPosizeArr[dltIndex] = j - preIndex;
-                }
-            }
-        
-        for ( TInt k = 0; k < KMaxKeystrokeCount; k++ )
-            {
-            
-            if ( preDltPosizeArr[k] < curDltPosizeArr[k] )
-                {
-                preDltPosizeArr.Copy( curDltPosizeArr );
-                index = i + 1;
-                break;
-                }
-            else if ( preDltPosizeArr[k] > curDltPosizeArr[k] )
-                {
-                break;
-                }
-            }
-        }
-    
-    // Pop and destroy allSpell
-    if ( allSpell )
-        {
-        delete allSpell;
-        }
-    
-    ptiengine->SelectPhoneticSpelling( index );
-    return ptiengine->GetPhoneticSpelling( index ); 
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CheckSpellingDLT
-// Check the delimiter of spelling.
-// ---------------------------------------------------------
-//
-TBool TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CheckSpellingDLT(
-    const TDesC& aKeystroke )
-    {
-    if ( aKeystroke.Length() == 0 )
-        {
-        return EFalse;
-        }
-    
-    if (( KAutoDLT == aKeystroke[0] ) || ( KManualDLT == aKeystroke[0] ))
-        {
-        return ETrue;
-        }
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::ToneMark
-// Get pinyin tone mark.
-// ---------------------------------------------------------
-//
-TInt TAknFepInputMiniQwertySogouPinyinPhrasePlugin::ToneMark( 
-        const TDesC& aKeystroke )
-    {
-    if ( aKeystroke.Length() == 0 )
-        {
-        return KInvalidToneMark;
-        }
-    TInt numOfToneMark = sizeof(PinyinToneMap) / sizeof(PinyinToneMap[0]);
-    for ( TInt i = 0; i < numOfToneMark; i++ )
-        {
-        if ( PinyinToneMap[i].iValue == aKeystroke[0] )
-            {
-            return PinyinToneMap[i].iInputTone;
-            }
-        }
-    return KInvalidToneMark;
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CheckSpellingAddToneMarkToPTIL
-// Check spell after add the tonemark to ptiEngine.
-// ---------------------------------------------------------
-//
-TBool TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CheckSpellingAddToneMarkToPTIL(
-                                                        const TInt aToneMark )
-    {
-    CPtiEngine* ptiengine = iOwner->PtiEngine();
-    MAknFepUICtrlEditPane* editPane = iUIContainer->EditPaneWindow();
-    TBuf<1> toneMark;
-    TBuf<1> delimiter;
-    
-    toneMark.Append( PinyinToneMap[aToneMark - 1].iValue );
-    delimiter.Append( KManualDLT );
-    
-    for ( TInt i = 0; i < aToneMark; ++i )
-        {
-        ptiengine->IncrementToneMark( ETrue );
-        TPtrC ptr = getCurrentLeastDLTSpell();
-        
-        // Some tonemarks are invalid for some pinyin stroke, so we need check
-        // the tonemark.
-        if ( ptr.Length() == 0 )
-            {
-            break;
-            }
-        TBuf<1> tonemarkResult;
-        tonemarkResult.Append( ptr.Mid( ptr.Length() - 1, 1 ));
-        if ( i != aToneMark - 1 )
-            {
-            CheckResultOfToneMark( tonemarkResult , i );
-            }
-
-        if (( 0 == ptr.Mid( ptr.Length() - 1, 1 ).Compare( toneMark )) &&
-            ( KErrNotFound == ptr.Find( delimiter ))
-            )
-            {
-            return ETrue;
-            }
-        }
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CheckResultOfToneMark
-// Check the tonemark result.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CheckResultOfToneMark( 
-                                            const TDesC16& aDes, TInt& aIndex )
-    {
-    TInt tonemarkIndex = 0;
-    TInt num = sizeof(PinyinToneMap )/( sizeof(PinyinToneMap[0]));
-    for ( tonemarkIndex = 0; tonemarkIndex < num; ++tonemarkIndex )
-        {
-        TBuf<1> toneMark;
-        toneMark.Append( PinyinToneMap[tonemarkIndex].iValue );
-        if ( aDes.Compare( toneMark ) == 0 )
-            {
-            break;
-            }
-        }
-    aIndex = tonemarkIndex;
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::Enable
-// Enable or disable the plugin.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::Enable( TBool aValid )
-    {
-    iValid = aValid;
-    }
-        
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::IsEnable
-// Get the state of the plugin.
-// ---------------------------------------------------------
-//
-TBool TAknFepInputMiniQwertySogouPinyinPhrasePlugin::IsEnable()
-    {
-    return iValid;
-    }
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CommitInlineEEPL
-// Commint text to EEP or editor
-// ---------------------------------------------------------------------------
-//
-TBool TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CommitInlineEEPL(
-    const TDesC& aDes )
-    {
-    TInt charCount = aDes.Length();
-    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-    MAknFepUICtrlEditPane* editpane = iUIContainer->EditPaneWindow();
-    CDesCArrayFlat* showkeyStoke = editpane->ShowKeystrokeArray();
-    CDesCArrayFlat* keyStoke = editpane->KeystrokeArray();
-    CDesCArrayFlat* phraseArray = editpane->PhraseArray();
-    CDesCArrayFlat* phraseShowKeyStroke = editpane->PhraseShowKeyStrokeArray();
-    TBuf<KMaxKeystrokeCount> buf;
-    TBuf<1> autoDLT;
-    autoDLT.Append( KAutoDLT );
-
-    if (phraseArray->Count() == 0)
-        {
-        editpane->SetPhraseCreationFlag(EFalse);
-        }
-    phraseArray->AppendL( aDes );
-
-    // Calculate the count of show keystroke which need to be deleted.   
-    TInt delCount = 0;
-    for ( TInt i = 0; i < showkeyStoke->Count() && charCount
-            && keyStoke->Count() != 0; i++ )
-        {
-        TPtrC showptr = showkeyStoke->MdcaPoint(i);
-        TPtrC ptr = keyStoke->MdcaPoint( 0);
-        if ( CheckSpellingDLT( showptr ) || ( KInvalidToneMark
-                != ToneMark( showptr )))
-            {
-            // If the previous show key stroke is DLT or tonemark too, break.
-            if ( i > 0 && 
-                 ( CheckSpellingDLT( showkeyStoke->MdcaPoint( i - 1 )) || 
-                 ( KInvalidToneMark != ToneMark( showkeyStoke->MdcaPoint( i - 1 )))))
-                {
-                break;
-                }
-
-            charCount--;
-            }
-        if ( showptr.Compare( autoDLT ) != 0 )
-            {
-            buf.Append( ptr );
-            keyStoke->Delete( 0 );
-            }
-        delCount++;
-        }
-    
-    // Delete the show keystroke
-    for (TInt j = 0; j < delCount; j++)
-        {
-        showkeyStoke->Delete( 0 );
-        }
-    
-    // Record the keystrokes relative with the commit word
-    phraseShowKeyStroke->AppendL( buf );
-    
-    // For Sogou core, maybe one element of PhraseArray() contains two or
-    // more characters.
-    TInt phraseCount = 0;
-    for ( TInt l = 0; l < phraseArray->Count(); l++ )
-        {
-        phraseCount += phraseArray->MdcaPoint(l).Length();
-        }
-
-    // Tell sogou core which phrase is selected. It is used for phrase creation.
-    TBuf<KMaxPhraseCreationCount> phraseSelected;
-    phraseSelected.FillZ();
-    if ( aDes.Length() <= KMaxPhraseCreationCount )
-        {
-        phraseSelected.Append( aDes );
-        iOwner->PtiEngine()->HandleCommandL( EPtiCommandSelectElement, 
-            ( TAny* )( &phraseSelected ));
-        }
-    
-    // If there is no keystroke left or character count reach the limitation
-    if ( keyStoke->Count() == 0 /*|| phraseCount == KMaxPhraseCreationCount */)
-        {
-        // Though maybe one element of PhraseArray() contains two or more characters,
-        // here we do not need to get the characters count. Because we will handle
-        // the phrase here, not character.
-        HBufC* phraseCreated = HBufC::NewLC( phraseCount );
-        TPtr keyPtr = phraseCreated->Des();
-        phraseCount = phraseArray->Count();
-        
-        for ( TInt ii = 0; ii < phraseCount; ++ii )
-            {
-            TPtrC ptrZi = phraseArray->MdcaPoint( ii );
-            keyPtr.Append( ptrZi );
-            }
-        fepMan->NewTextL( phraseCreated->Des());
-        fepMan->CommitInlineEditL();
-        
-        // Tell sogou core the phrase pinyin
-        AddPhrasePinyinToPti();
-        iOwner->PtiEngine()->SetPredictiveChineseChar( phraseCreated->Des());
-        CleanupStack::PopAndDestroy();
-        return EFalse;
-        }
-
-    editpane->SetCursorIndexOfKeystroke( 0 );
-    editpane->DisableCursor();
-    editpane->SetPhraseCreationFlag( ETrue );
-    return ETrue;
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertyPinyinPhraseBase::AddPhrasePinyinToPti
-// Add phrase to DB.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::AddPhrasePinyinToPti()
-    {
-    MAknFepUICtrlEditPane* editpane = iUIContainer->EditPaneWindow();
-    CDesCArrayFlat* phraseShowKeyStroke = editpane->PhraseShowKeyStrokeArray();
-    TBuf<KMaxShowKeystrokeCount> phraseCreatedPinYin;
-    phraseCreatedPinYin.FillZ();
-    for ( TInt i = 0; i < phraseShowKeyStroke->Count(); i++ )
-        {
-        TPtrC ptrPinYin = phraseShowKeyStroke->MdcaPoint(i);
-        phraseCreatedPinYin.Append(ptrPinYin);
-        }
-    //Add the phrase pinyin to the DB by PTI Engine
-    TRAP_IGNORE( iOwner->PtiEngine()->HandleCommandL( 
-            EPtiCommandSetPinyinForLearnWord, (TAny*)( &phraseCreatedPinYin )));
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::GetCandidateL
-// Get the candidate info.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::GetCandidateL()
-    {
-    CPtiEngine* ptiengine = iOwner->PtiEngine();
-    MAknFepUICtrlEditPane* editPane = iUIContainer->EditPaneWindow();
-    CDesCArrayFlat* phraseCandidates = 
-            iUIContainer->CandidatePane()->CandidateArray();
-    CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
-    CDesCArrayFlat* showKeystroke = editPane->ShowKeystrokeArray();
-    TInt phraseCount = editPane->PhraseArray()->Count();
-    phraseCandidates->Reset();
-    TBuf<KMaxKeystrokeCount> buf;
-    TBuf<1> delimiter;
-    delimiter.Append( KManualDLT );
-    TInt keyCode;
-    TInt count = KInvalidToneMark;
-    ClearPtiEngineKeystroke();
-    
-    if ( showKeystroke->Count() == 0 )
-        {
-        return;
-        }
-    
-    // If all strokes are valid
-    if ( iCanConvertAll )
-        {
-        AnalyseL();
-        ptiengine->GetChinesePhraseCandidatesL( *phraseCandidates ); 
-        return;
-        }
-
-    // If some characters are invalid, we only need to get the candidates of 
-    // the strokes before the invalid character.
-    ClearPtiEngineKeystroke();
-    TInt autoDLT = 0;
-    for ( TInt j = 0; j < iConvertCount; j++ )
-        {
-        if ( showKeystroke->MdcaPoint( j )[0] == KAutoDLT )
-            {
-            autoDLT++;
-            }
-        }
-    for ( TInt i = 0; i < iConvertCount - autoDLT/*showKeystroke->Count()*/; ++i )
-        {
-        count = ToneMark( keystroke->MdcaPoint( i ) );
-        if ( KInvalidToneMark != count )
-            {
-            for ( TInt j = 0; j < count; ++j )
-                {
-                ptiengine->IncrementToneMark( ETrue );
-                }
-            }
-        else
-            {
-            GetKeystrokeCode( keyCode, keystroke->MdcaPoint( i ) );
-            ptiengine->AppendKeyPress((TPtiKey)keyCode);
-            }
-        }
-
-    getCurrentLeastDLTSpell();
-    ptiengine->GetChinesePhraseCandidatesL( *phraseCandidates );
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CanConvertAll
-// Set flag for convert all stroke.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::CanConvertAll( TBool aEnable )
-    {
-    iCanConvertAll = aEnable;
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouPinyinPhrasePlugin::ConvertCount
-// Set convert count.
-// ---------------------------------------------------------
-//           
-void TAknFepInputMiniQwertySogouPinyinPhrasePlugin::ConvertCount( TInt aCount )
-    {
-    iConvertCount = aCount;
-    }
-
-// End of file
--- a/fep/aknfep/src/aknfepuiinputminiqwertysogoustrokephraseplugin.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:           
- *      Provides the TAknFepInputMiniQwertySogouStrokePhrasePlugin definition.
- *
-*/
-
-// System includes
-#include <e32cmn.h>
-#include <PtiEngine.h>
-#include <PtiDefs.h>
-#include <avkon.rsg>
-#include <aknfep.rsg>
-#include <PtiUserDicEntry.h>
-#include <aknnotewrappers.h> //CAknWarningNote 
-// User includes
-#include "AknFepUIManagerStateInterface.h"
-#include "AknFepUICtrlInputPane.h"
-#include "AknFepUICtrlPinyinPopup.h"        //Pinyin phrase
-#include "aknfepuictrleditpane.h"           //pinyin phrase creation
-#include "AknFepUICtrlCandidatePane.h"
-#include "AknFepManager.h"
-
-#include "aknfepuiinputminiqwertysogoustrokephraseplugin.h"
-#include "AknFepUiInputStateCandidateQwertyBaseChinesePhrase.h"
-
-// Constant definition
-const TInt KMaxShowKeystrokeCount = 255;
-const TInt KMaxPhraseCreationCount = 10;
-const TInt KMaxKeystrokeCount = 31;
-const TInt16 KStrokeDelimiter = 0x2022;
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouStrokePhrasePlugin::TAknFepInputMiniQwertySogouStrokePhrasePlugin
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-TAknFepInputMiniQwertySogouStrokePhrasePlugin::TAknFepInputMiniQwertySogouStrokePhrasePlugin(
-    MAknFepUIManagerStateInterface* aOwner,
-    MAknFepUICtrlContainerChinese* aUIContainer,
-    TUIState aState )
-    : iOwner( aOwner ),
-      iUIContainer( aUIContainer ),
-      iState( aState ),
-      iValid( EFalse )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouStrokePhrasePlugin::operator=
-// 
-// ---------------------------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouStrokePhrasePlugin::operator=( const 
-        TAknFepInputMiniQwertySogouStrokePhrasePlugin& aPlugin )
-    {
-    Mem::Copy( this, &aPlugin, sizeof(TAknFepInputMiniQwertySogouStrokePhrasePlugin));
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouStrokePhrasePlugin::Enable
-// Enable or disable the plugin.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouStrokePhrasePlugin::Enable( TBool aValid )
-    {
-    iValid = aValid;
-    }
-        
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertySogouStrokePhrasePlugin::IsEnable
-// Get the state of the plugin.
-// ---------------------------------------------------------
-//
-TBool TAknFepInputMiniQwertySogouStrokePhrasePlugin::IsEnable()
-    {
-    return iValid;
-    }
-
-// ---------------------------------------------------------------------------
-// TAknFepInputMiniQwertySogouStrokePhrasePlugin::CommitInlineEEPL
-// Commint text to EEP or editor
-// ---------------------------------------------------------------------------
-//
-TBool TAknFepInputMiniQwertySogouStrokePhrasePlugin::CommitInlineEEPL(
-    const TDesC& aDes )
-    {
-    TInt charCount = aDes.Length();
-    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-    MAknFepUICtrlEditPane* editpane = iUIContainer->EditPaneWindow();
-    CDesCArrayFlat* keyStoke = editpane->KeystrokeArray();
-    RArray<TInt>* keycode = editpane->KeycodeArray();
-    CDesCArrayFlat* phraseArray = editpane->PhraseArray();
-    CDesCArrayFlat* phraseShowKeyStroke = editpane->PhraseShowKeyStrokeArray();
-    RArray<TInt>* phraseKeycode = editpane->PhraseKeycodeArray();
-    TBuf<KMaxKeystrokeCount> buf;
-    TBuf<1> strokeDLT;
-    strokeDLT.Append( KStrokeDelimiter );
-
-    phraseArray->AppendL( aDes );
-
-    TInt phraseCount = phraseArray->Count();
-    TInt index = 0;
-    TInt isFound = -1;
-    
-    TInt strokeDLTCount = 0;
-    for ( TInt j = 0; j < keyStoke->Count(); j++ )
-        {
-        if ( keyStoke->MdcaPoint( j ) == strokeDLT )
-            {
-            strokeDLTCount++;
-            if ( strokeDLTCount == charCount )
-                {
-                index = j;
-                }
-            isFound = 0;
-            }
-        }
-    
-    TInt phraseCharacterCount = 0;
-    for ( TInt m = 0; m < phraseCount; m++ )
-        {
-        phraseCharacterCount += (*phraseArray)[m].Length();
-        }
-
-    //phrase creation state
-    if ( phraseCount > 1 || ( 0 == isFound && charCount <= strokeDLTCount ))
-        {
-        editpane->SetPhraseCreationFlag( ETrue );
-
-        // Tell sogou core which phrase is selected. It is used for phrase creation.
-        TBuf<KMaxPhraseCreationCount> phraseSelected;
-        phraseSelected.FillZ();
-        if ( aDes.Length() <= KMaxPhraseCreationCount )
-            {
-            phraseSelected.Append( aDes );
-            iOwner->PtiEngine()->HandleCommandL( EPtiCommandSelectElement, 
-                    ( TAny* )( &phraseSelected ));
-            }
-        
-        if ( 0 == isFound && index < keyStoke->Count() - 1 )
-            {
-            for ( TInt i = 0; i <= index; i++ )
-                {
-                TPtrC ptr = keyStoke->MdcaPoint( 0 );
-                buf.Append( ptr );
-                keyStoke->Delete( 0);
-                phraseKeycode->AppendL( (*keycode)[0]);
-                keycode->Remove( 0 );
-                }
-            phraseShowKeyStroke->AppendL( buf );
-            editpane->SetCursorIndexOfKeystroke( 0 );
-            editpane->DisableCursor();          
-            return ETrue;
-            }
-        else
-            {
-            HBufC* phraseCreated = HBufC::NewLC( phraseCharacterCount );
-            TPtr keyPtr = phraseCreated->Des();
-            for ( TInt ii = 0; ii < phraseCount; ++ii )
-                {
-                TPtrC ptrZi = phraseArray->MdcaPoint( ii );
-                keyPtr.Append( ptrZi );
-                }
-
-            AddPhrasePinyinToPti();
-
-            if ( 0 != isFound || ( 0 == isFound && index == keyStoke->Count() - 1 ) )
-                {
-                editpane->ResetAllArray();
-                }
-            fepMan->NewTextL( phraseCreated->Des());
-            fepMan->CommitInlineEditL();
-            fepMan->PtiEngine()->CommitCurrentWord();
-            CleanupStack::PopAndDestroy();
-            return EFalse;
-            }
-        }
-    else
-        {
-        HBufC* phraseCreated = HBufC::NewLC( phraseCharacterCount );
-        TPtr keyPtr = phraseCreated->Des();
-        for ( TInt ii = 0; ii < phraseCount; ++ii )
-            {
-            TPtrC ptrZi = phraseArray->MdcaPoint( ii );
-            keyPtr.Append( ptrZi );
-            }
-        editpane->ResetAllArray();
-        editpane->SetPhraseCreationFlag( EFalse );
-        fepMan->NewTextL( phraseCreated->Des());
-        fepMan->CommitInlineEditL();
-        iOwner->PtiEngine()->SetPredictiveChineseChar( phraseCreated->Des());
-        CleanupStack::PopAndDestroy();
-        return EFalse;
-        }
-    }
-
-// ---------------------------------------------------------
-// TAknFepInputMiniQwertyPinyinPhraseBase::AddPhrasePinyinToPti
-// Add phrase to DB.
-// ---------------------------------------------------------
-//
-void TAknFepInputMiniQwertySogouStrokePhrasePlugin::AddPhrasePinyinToPti()
-    {
-    MAknFepUICtrlEditPane* editpane = iUIContainer->EditPaneWindow();
-    CDesCArrayFlat* phraseShowKeyStroke = editpane->PhraseShowKeyStrokeArray();
-    CDesCArrayFlat* keyStoke = editpane->KeystrokeArray();
-    TBuf<KMaxShowKeystrokeCount> phraseCreatedStroke;
-    phraseCreatedStroke.FillZ();
-    for ( TInt i = 0; i < phraseShowKeyStroke->Count(); i++ )
-        {
-        TPtrC ptrPhraseKeyStroke = phraseShowKeyStroke->MdcaPoint(i);
-        phraseCreatedStroke.Append(ptrPhraseKeyStroke);
-        }
-    for ( TInt j = 0; j < keyStoke->Count(); j++ )
-        {
-        TPtrC ptrKeyStroke = keyStoke->MdcaPoint(j);
-        phraseCreatedStroke.Append(ptrKeyStroke);
-        }
-    //Add the phrase pinyin to the DB by PTI Engine
-    TRAP_IGNORE( iOwner->PtiEngine()->HandleCommandL( 
-            EPtiCommandSetPinyinForLearnWord, (TAny*)( &phraseCreatedStroke )));
-    }
-
-// End of file
--- a/fep/aknfep/src/aknfepuiinputminiqwertystrokephrasebase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/aknfepuiinputminiqwertystrokephrasebase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -55,8 +55,6 @@
 const TInt16 KKey1 = 0x31;
 const TInt16 KKey6 = 0x36;
 
-const TUid KPtiSogouCoreUid = { 0x20031DD6 };
-
 _LIT( KMaxPhraseNote,"\x8BCD\x7EC4\x6700\x957F\x4E3A\x4E03\x5B57" );
 
 // ---------------------------------------------------------------------------
@@ -231,8 +229,6 @@
             ptiengine->GetPhoneticSpelling(1).Length();
         stringAfterLength = 
             ptiengine->AppendKeyPress((TPtiKey)keyCode).Length();
-        stringAfterLength = ptiengine->GetPhoneticSpelling(1).Length();
-
         //the keystroke is invalid.
         if ( stringBeforeLength == stringAfterLength )
             {
@@ -268,7 +264,7 @@
         if ( cdtCount > 0 )
             {
             UIContainer()->EditPaneWindow()->SetChangeState( ETrue );
-            iOwner->ChangeState( EEntry );            
+            iOwner->ChangeState( ECandidate );            
             return;
             }
         
@@ -471,50 +467,17 @@
     TInt index = editPane->GetCursorIndexOfKeystroke();
     TBuf<KMaxKeystrokeCount> showInfo;
     
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    TInt phraseCount = 0;
-    
     for ( TInt i = 0; i < phrase->Count(); ++i )
         {
-        // If this method is called in construction of the state machine,
-        // the plugin is not set. If sogou core is in use now, we should append 
-        // each characters to showInfo.
-        // For Sogou core, maybe one element of PhraseArray() contains two or more characters.
-        if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-            {
-            for ( TInt k = 0; k < phrase->MdcaPoint(i).Length(); k++ )
-                {
-                showInfo.Append( phrase->MdcaPoint(i)[k] );
-                }
-            phraseCount += phrase->MdcaPoint(i).Length();
-            }
-        else
-            {
-            // If cpicore is in use, just append the element of phrase
-            showInfo.Append(phrase->MdcaPoint(i) );
-            }
+        showInfo.Append( phrase->MdcaPoint( i ) );
         }
 
     for ( TInt ii = 0; ii < keystroke->Count(); ++ii )
         {
         showInfo.Append( keystroke->MdcaPoint( ii ) );
         }
-
-    // If this method is called in construction of the state machine,
-    // the plugin is not set. If sogou core is in use now, the phraseCount
-    // should be the same as the phrase characters count.
-    // For Sogou core, maybe one element of PhraseArray() contains two or more characters.
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        editPane->SetText( showInfo, index + phraseCount );
-        }
-    else
-        {
-        // If cpicore is in use, phraseCount is the same as phrase->Count()
-        editPane->SetText( showInfo, index + phrase->Count() );
-        }
+    
+    editPane->SetText( showInfo, index + phrase->Count() );
     
     switch ( iState )
         {
@@ -739,12 +702,6 @@
 void TAknFepInputMiniQwertyStrokePhraseBase::AddPhraseToDB( 
                                                      const TDesC& aPhraseAdd )
     {   
-    // If sogou core is actived, use the plugin.
-    if ( iStrokePlugin.IsEnable())
-        {
-        iStrokePlugin.AddPhrasePinyinToPti();
-        return;
-        }
     TPtiUserDictionaryEntry addUdbEntry( aPhraseAdd );
     //Add the phrase to the DB by PTI Engine
     iOwner->PtiEngine()->AddUserDictionaryEntry( addUdbEntry );
@@ -795,11 +752,6 @@
 //
 TBool TAknFepInputMiniQwertyStrokePhraseBase::CommitInlineEEPL( const TDesC& aDes )
     {
-    // If sogou core is actived, use the plugin.
-    if ( iStrokePlugin.IsEnable())
-        {
-        return iStrokePlugin.CommitInlineEEPL( aDes );
-        }
     TInt charCount = aDes.Length();
 	MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
 	MAknFepUICtrlEditPane* editpane = UIContainer()->EditPaneWindow();
@@ -894,21 +846,7 @@
     TInt phraseCount = editPane->PhraseArray()->Count();
     TInt keystrokeCount = keystrokeArray->Count();
     TInt index = editPane->GetCursorIndexOfKeystroke();
-
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
     
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        CDesCArrayFlat* phrase = editPane->PhraseArray();
-        phraseCount = 0;
-        for ( TInt j = 0;  j < phrase->Count(); j++ )
-            {
-            phraseCount += phrase->MdcaPoint(j).Length();;
-            }
-        }
-
     if ( phraseCount + keystrokeCount >= KMaxKeystrokeCount )
         {
         return EFalse;
@@ -979,17 +917,7 @@
                                                           )
     {
     CPtiEngine* ptiEngine = iOwner->PtiEngine();
-    TBuf<KMaxName> lowerdata;
-    
-    // If the key is EPtiKeyQwertySpace, just append a KStrokeDelimiter.
-    if ( aKey == EPtiKeyQwertySpace )
-        {
-        TBuf<1> strokeDLT;
-        strokeDLT.Append( KStrokeDelimiter );
-        aKeystroke.Copy( strokeDLT );
-        return;
-        }
-
+    TBuf<KMaxName> lowerdata;   
     ptiEngine->MappingDataForKey((TPtiKey)aKey, lowerdata, EPtiCaseLower);  
     TInt StrokeUnicodePosition =0;
    
@@ -1062,13 +990,6 @@
     keystrokeArray->Compress();
     phrase->Compress();
     phraseStroke->Compress();
-
-    TInt coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID );
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        // Notify sogoucore that last phrase is cancelled
-        iOwner->PtiEngine()->HandleCommandL( EPtiCommandCancelSelectElement );
-        }
     }
 
 // ---------------------------------------------------------
@@ -1094,20 +1015,6 @@
     TBuf<1> delimiter;
     delimiter.Append( KStrokeDelimiter );
     
-    // Get the current core id
-    TInt coreID = 0;
-    TRAP_IGNORE( coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID ));
-    
-    if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-        {
-        CDesCArrayFlat* phrase = editPane->PhraseArray();
-        phraseCount = 0;
-        for ( TInt j = 0;  j < phrase->Count(); j++ )
-            {
-            phraseCount += phrase->MdcaPoint(j).Length();;
-            }
-        }
-    
     //set warning color stroke after 7th group when it's more than 7 groups.
     if ( 0 == keystrokeCount )
         {
@@ -1131,29 +1038,22 @@
         if ( EPtiKeyQwertySpace == keyCode )
             {
             delimiterCount = delimiterCount + 1;
-
-            // For Sogou core, there is no need to limit characters count to 
-            // KMaxPhraseCreationCount.
-            if ( TUid::Uid( coreID ) != KPtiSogouCoreUid )
+            if ( delimiterCount == KMaxPhraseCreationCount )
                 {
-                if ( delimiterCount == KMaxPhraseCreationCount )
+                if ( !valid )
                     {
-                    if ( !valid )
-                        {
-                        editPane->SetHighlight( 
-                                phraseCount + index, 
-                                phraseCount + keystrokeCount - 1 );
-                        }
-                    else
-                        {
-                        editPane->SetHighlight( 
-                                phraseCount + i, 
-                                phraseCount + keystrokeCount - 1 );
-                        }
-                    break;
+                    editPane->SetHighlight( 
+                            phraseCount + index, 
+                            phraseCount + keystrokeCount - 1 );
                     }
+                else
+                    {
+                    editPane->SetHighlight( 
+                            phraseCount + i, 
+                            phraseCount + keystrokeCount - 1 );
+                    }
+                break;
                 }
-
             if ( ( !valid ) || ( 0 == i ) )
                 {
                 editPane->SetHighlight( 
@@ -1179,8 +1079,6 @@
             stringBeforeLength = ptiengine->GetPhoneticSpelling(1).Length();
             stringAfterLength = 
                 ptiengine->AppendKeyPress((TPtiKey)keyCode).Length();
-            stringAfterLength = ptiengine->GetPhoneticSpelling(1).Length();
-
             if ( stringBeforeLength == stringAfterLength )
                 {
                 valid = EFalse;
@@ -1462,8 +1360,6 @@
         stringBeforeLength = ptiengine->GetPhoneticSpelling(1).Length();
         stringAfterLength = 
             ptiengine->AppendKeyPress((TPtiKey)keyCode).Length();
-        stringAfterLength = ptiengine->GetPhoneticSpelling(1).Length();
-
         if ( stringBeforeLength == stringAfterLength )
             {
             editPane->SetAllValidFlag( EFalse );
@@ -1516,26 +1412,7 @@
         {
 #ifdef RD_INTELLIGENT_TEXT_INPUT
         TBool isEditorFull = iOwner->FepMan()->IsFlagSet(CAknFepManager::EFlagEditorFull);
-
-        // For sogou core, the predictive is not endless, so when there
-        // is no predictive candidates, we should call TryCloseUiL().
-        TBool noCandidates = EFalse;
-        
-        TInt coreID = iOwner->PtiEngine()->HandleCommandL( EPtiCommandGetCoreID );
-        if ( TUid::Uid( coreID ) == KPtiSogouCoreUid )
-            {
-            // Get the predictive candidates.
-            CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat( 1 );
-            CleanupStack::PushL ( phraseCandidates );
-            phraseCandidates->Reset();
-            iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-            if ( phraseCandidates->Count() == 0 )
-                {
-                noCandidates = ETrue;
-                }
-            CleanupStack::PopAndDestroy( phraseCandidates );
-            }
-        if ( !isEditorFull && !noCandidates )
+        if ( !isEditorFull )
             {
             iOwner->ChangeState( EPredictiveCandidate );
             UIContainer()->EditPaneWindow()->SetChangeState(ETrue);
--- a/fep/aknfep/src/aknfepuiinputstateminiqwertystrokephrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/aknfepuiinputstateminiqwertystrokephrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -127,6 +127,7 @@
             if ( candidatePane->VisibleCandidateCount()!= 1 )
                 {
                 uiContainer->EditPaneWindow()->SetCandidateRefreshFlag( ETrue );
+                iOwner->ChangeState( ECandidate );
                 candidatePane->SelectNext();
                 }
             break;
@@ -136,7 +137,9 @@
             if ( candidatePane->VisibleCandidateCount()!= 1 )
                 {
                 uiContainer->EditPaneWindow()->SetCandidateRefreshFlag( ETrue );
-                candidatePane->SelectPrev();
+                iOwner->ChangeState( ECandidate );
+                TInt numbertotal = UIContainer()->CandidatePane()->VisibleCandidateCount();
+                UIContainer()->CandidatePane()->SelectIndex( numbertotal-1 );
                 }
             break;
             }
@@ -154,7 +157,7 @@
                     {
                     if ( CheckFirstGroupStroke() )
                         {
-                        iOwner->ChangeState( EEntry );
+                        iOwner->ChangeState( ECandidate );
                         }
                     else
                         {
@@ -188,31 +191,6 @@
     return ret;
     }
 
-void TAknFepInputStateEntryMiniQwertyStrokePhrase::SubmitTextL( const TDesC& aText )
-	{
-	MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-
-	if ( aText.Length())
-	   {
-	   if ( !CommitInlineEEPL( aText ) )
-	      {
-	      DoActionAfterCommit();
-	      }
-	      else
-	          {
-	          if  ( CheckFirstGroupStroke() )
-	              {
-	              iOwner->ChangeState( EEntry );
-	              }
-	          else
-	              {
-	              uiContainer->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromInput );
-	              iOwner->ChangeState( EMiniQwertyEdit );
-	              }
-	          }
-	     }
-	}
-
 // ---------------------------------------------------------------------------
 // TAknFepInputStateEditingMiniQwertyStrokePhrase::TAknFepInputStateEditingMiniQwertyStrokePhrase
 // C++ default constructor
@@ -285,7 +263,7 @@
             if ( 0 != candidatePane->VisibleCandidateCount() )
                 {
                 uiContainer->EditPaneWindow()->SetChangeState( ETrue );
-                iOwner->ChangeState( EEntry );
+                iOwner->ChangeState( ECandidate );
                 }
             break;
             }
@@ -339,10 +317,9 @@
     {
     iState = ECandidate;
     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    uiContainer->CandidatePane()->SelectFirstPhrase();
     uiContainer->FocusCandidatePane( ETrue );
     uiContainer->CandidatePane()->ShowCandidateOrdinals( ETrue );
-    
+    uiContainer->CandidatePane()->SelectFirstPhrase();
     if ( uiContainer->EditPaneWindow()->GetCandidateRefreshFlag() )
         {
         uiContainer->EditPaneWindow()->DisableCursor();
@@ -503,31 +480,6 @@
         }
     }
 
-void TAknFepInputStateEditingMiniQwertyStrokePhrase::SubmitTextL( const TDesC& aText )
-	{
-	MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-	if ( aText.Length() )
-	    {
-	    if ( !CommitInlineEEPL( aText ) )
-	        {
-	        DoActionAfterCommit();
-	        }
-	    else
-	        {
-	        if ( CheckFirstGroupStroke() )
-	           {
-	           RefreshUI();
-	           uiContainer->CandidatePane()->SelectFirstPhrase();
-	           }
-	       else
-	           {
-	           uiContainer->EditPaneWindow()->SetAutoChangeStateFlag(
-	                        EAutoChangeStateFromCandidate );
-	           iOwner->ChangeState( EMiniQwertyEdit );
-	           }
-	        }
-	   }
-	}
 
 // ---------------------------------------------------------------------------
 // TAknFepInputStateEntryMiniQwertyStrokePhrase::HandleCommandL
@@ -553,7 +505,7 @@
                     {
                     if ( CheckFirstGroupStroke() )
                         {
-                        iOwner->ChangeState( EMiniQwertyEdit );
+                        iOwner->ChangeState( ECandidate );
                         }
                     else
                         {
@@ -611,29 +563,3 @@
             break;
         }
     }
-
-void TAknFepUiInputStateCandidateMiniQwertyStrokePhrase::SubmitTextL( const TDesC& aText )
-	{
-	MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-	if ( aText.Length() )
-	    {
-	    if ( !CommitInlineEEPL( aText ) )
-	        {
-	        DoActionAfterCommit();
-	        }
-	    else
-	        {
-	        if ( CheckFirstGroupStroke() )
-	           {
-	           RefreshUI();
-	           uiContainer->CandidatePane()->SelectFirstPhrase();
-	           }
-	           else
-	               {
-	               uiContainer->EditPaneWindow()->SetAutoChangeStateFlag(
-	                            EAutoChangeStateFromCandidate );
-	               iOwner->ChangeState( EMiniQwertyEdit );
-	               }
-	            }
-	   }
-	}
--- a/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -513,7 +513,7 @@
         fepMan->NewTextL( currentText );
         fepMan->CommitInlineEditL();
         }
-    
+
     if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
         {
         fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
@@ -688,10 +688,9 @@
     iState = EZhuyinSpelling;
 
     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    
     uiContainer->FocusCandidatePane( EFalse );
+    uiContainer->CandidatePane()->ShowCandidateOrdinals( EFalse );
     uiContainer->CandidatePane()->SelectFirstPhrase();
-    uiContainer->CandidatePane()->ShowCandidateOrdinals( EFalse );
     uiContainer->ShowVerticalScrollArrows( ETrue );
     uiContainer->ShowHorizontalScrollArrows( EFalse );
     uiContainer->InputPane()->SetOverrideFontId( 0 );
@@ -880,114 +879,6 @@
     RefreshSpellingPane( needClearDeliberateSelection );
     }
 
-void TAknFepInputStateSpellingMiniQwertyZhuyin::SubmitTextL( const TDesC& /*aText*/ )
-	{
-    MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
-    editPane->SetChangeState( EFalse );
-    editPane->SetNeedClearDeliberateSelection( ETrue );
-    CommitCandidateL();
-     }
-
-
-void TAknFepInputStateSpellingMiniQwertyZhuyin::CommitCandidateL()
-    {
-    CDesCArrayFlat* keyStrokeArray = UIContainer()->EditPaneWindow()->KeystrokeArray();
-    CDesCArrayFlat* phraseKeyStrokeArray = UIContainer()->EditPaneWindow()->PhraseShowKeyStrokeArray();
-    CDesCArrayFlat* phraseArray = UIContainer()->EditPaneWindow()->PhraseArray();
-    CDesCArrayFlat* phraseZhuYinSpellingArray = UIContainer()->EditPaneWindow()->PhraseZhuYinSpellingArray();
-    TPtrC candidate = UIContainer()->CandidatePane()->CurrentPhraseCandidate();
-    
-    RArray<TInt>* keyCodeArray = UIContainer()->EditPaneWindow()->KeycodeArray();
-    RArray<TInt>* keyCodePhraseArray = UIContainer()->EditPaneWindow()->PhraseKeycodeArray();
-    TBuf<KMaxKeystrokeCount> spellingText;
-    
-    UIContainer()->InputPane()->GetText( spellingText );
-    
-    //phraseZhuYinSpellingArray must keep same count with phraseArray
-    TInt delCount = phraseZhuYinSpellingArray->Count()-phraseArray->Count();//we can sure delCount>=0,impossible <0
-	if(delCount>0)
-		{
-		phraseZhuYinSpellingArray->Delete(phraseArray->Count(),delCount);//delete from tail 
-		}
-	phraseZhuYinSpellingArray->AppendL(spellingText); 
-    phraseArray->AppendL( candidate );
-    
-    TBuf<KMaxKeystrokeCount> keyStoke;
-    TInt replaceCount = 0;
-    TInt delimiterIndex = spellingText.Find( KDelimiter );
-    if ( KErrNotFound ==delimiterIndex )
-        {
-        delimiterIndex = -1;
-        }
-    TInt indexOfToneMark = GetIndexOfToneMark( spellingText );
-    if ( delimiterIndex != KErrNotFound && indexOfToneMark >= 0 )
-        {
-        replaceCount = Min( delimiterIndex, indexOfToneMark );
-        if ( delimiterIndex > indexOfToneMark )
-            {
-            replaceCount++;
-            }
-        }
-    else if ( delimiterIndex != KErrNotFound && indexOfToneMark == -1 )
-        {
-        replaceCount = delimiterIndex;
-        }
-    else if ( delimiterIndex == KErrNotFound && indexOfToneMark != -1 )
-        {
-        replaceCount = indexOfToneMark + 1;
-        }
-    else
-        {
-        replaceCount = spellingText.Length();
-        } 
-    for (TInt i = 0; i < replaceCount; i++ )
-        {
-        TPtrC ptr = keyStrokeArray->MdcaPoint( 0 );
-        keyStoke.Append( ptr );
-        keyStrokeArray->Delete( 0 );
-        // added for the keycode
-        TInt keyCodeValue = ( *keyCodeArray )[0];
-        keyCodePhraseArray->AppendL( keyCodeValue );
-        keyCodeArray->Remove( 0 );
-        }
-    phraseKeyStrokeArray->AppendL( keyStoke );
-
-    if ( GetValidKeystroke() )
-        {
-        iOwner->ChangeState( EZhuyinSpelling );
-        }
-    else
-        {
-        iOwner->ChangeState( EMiniQwertyEdit );
-        }
-    UIContainer()->EditPaneWindow()->SetChangeState(ETrue);
-    RefreshSpellingPane();
-    RefreshCandidatePane();
-    ChangeCbaL();
-    }
-
-
-TInt TAknFepInputStateSpellingMiniQwertyZhuyin::GetIndexOfToneMark( const TDesC& aText)
-    {
-    TInt indexOfToneMark = -1;
-    TInt num = sizeof(ZhuyinToneMap )/( sizeof(ZhuyinToneMap[0]));
-    TInt len = aText.Length();
-    for( TInt j = 0; j< len ;j++ )
-        {
-        indexOfToneMark = j;
-        TBuf<1> keyStorkeBuf = aText.Mid( j ,1 );
-        for (TInt i = 0; i<num; i++ )
-            {
-            if (  keyStorkeBuf[0] == ZhuyinToneMap[i].iValue  )
-                {
-                return indexOfToneMark;
-                }
-            }
-        }
-    return -1;
-    }
-
 // ---------------------------------------------------------
 // TAknFepInputStateSpellingMiniQwertyZhuyin::RefreshUI
 // Refresh vaild key stroke length
@@ -1008,7 +899,6 @@
     TInt currentLength = ptr.Length();
     editPane->SetEffictiveLength( currentLength );
     }
-
 // ---------------------------------------------------------------------------
 // TAknFepInputStateCanindateSelectingMiniQwertyZhuyin::TAknFepInputStateCanindateSelectingMiniQwertyZhuyin
 // C++ default constructor
@@ -1154,8 +1044,17 @@
                 iOwner->FepMan()->PlaySound(EAvkonSIDDefaultSound);
                 break;
                 }
-            return TAknFepInputMiniQwertyZhuyinPhraseBase::HandleKeyL(
+            if ( SelectCandidate( aKey ) ) // is 1-6 key 
+                {
+                editPane->SetNeedClearDeliberateSelection( ETrue );
+                CommitCandidateL();
+                }
+            else
+                {
+                return TAknFepInputMiniQwertyZhuyinPhraseBase::HandleKeyL(
                     aKey, aLength );
+                }
+            break;
         }
     return ret;
     }
@@ -1306,16 +1205,6 @@
     keybinding.Reset();
     return validnumkey;
     }
-
-void TAknFepInputStateCanindateSelectingMiniQwertyZhuyin::SubmitTextL( const TDesC& /*aText*/ )
-	{
-    MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
-    editPane->SetChangeState( EFalse );
-    editPane->SetNeedClearDeliberateSelection( ETrue );
-    CommitCandidateL();
-	}
-
 // ---------------------------------------------------------------------------
 // TAknFepInputStateEditingMiniQwertyZhuyinPhrase::HandleCommandL
 // Handling Command
@@ -1353,118 +1242,6 @@
         }
     }
 
-void TAknFepInputStateEditingMiniQwertyZhuyinPhrase::SubmitTextL( const TDesC& aText )
-	{
-    MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
-    MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
-    editPane->SetChangeState( EFalse );
-	CDesCArrayFlat* phraseZhuYinSpellingArray = UIContainer()->EditPaneWindow()->PhraseZhuYinSpellingArray();
-	if( phraseZhuYinSpellingArray->Count() >= 7 )
-		{
-		HandleCommitL();
-		return;
-		}
-    editPane->SetNeedClearDeliberateSelection( ETrue );
-    CommitCandidateL();
-	}
-
-void TAknFepInputStateEditingMiniQwertyZhuyinPhrase::CommitCandidateL()
-    {
-    CDesCArrayFlat* keyStrokeArray = UIContainer()->EditPaneWindow()->KeystrokeArray();
-    CDesCArrayFlat* phraseKeyStrokeArray = UIContainer()->EditPaneWindow()->PhraseShowKeyStrokeArray();
-    CDesCArrayFlat* phraseArray = UIContainer()->EditPaneWindow()->PhraseArray();
-    CDesCArrayFlat* phraseZhuYinSpellingArray = UIContainer()->EditPaneWindow()->PhraseZhuYinSpellingArray();
-    TPtrC candidate = UIContainer()->CandidatePane()->CurrentPhraseCandidate();
-    
-    RArray<TInt>* keyCodeArray = UIContainer()->EditPaneWindow()->KeycodeArray();
-    RArray<TInt>* keyCodePhraseArray = UIContainer()->EditPaneWindow()->PhraseKeycodeArray();
-    TBuf<KMaxKeystrokeCount> spellingText;
-    
-    UIContainer()->InputPane()->GetText( spellingText );
-    
-    //phraseZhuYinSpellingArray must keep same count with phraseArray
-    TInt delCount = phraseZhuYinSpellingArray->Count()-phraseArray->Count();//we can sure delCount>=0,impossible <0
-	if(delCount>0)
-		{
-		phraseZhuYinSpellingArray->Delete(phraseArray->Count(),delCount);//delete from tail 
-		}
-	phraseZhuYinSpellingArray->AppendL(spellingText); 
-    phraseArray->AppendL( candidate );
-    
-    TBuf<KMaxKeystrokeCount> keyStoke;
-    TInt replaceCount = 0;
-    TInt delimiterIndex = spellingText.Find( KDelimiter );
-    if ( KErrNotFound ==delimiterIndex )
-        {
-        delimiterIndex = -1;
-        }
-    TInt indexOfToneMark = GetIndexOfToneMark( spellingText );
-    if ( delimiterIndex != KErrNotFound && indexOfToneMark >= 0 )
-        {
-        replaceCount = Min( delimiterIndex, indexOfToneMark );
-        if ( delimiterIndex > indexOfToneMark )
-            {
-            replaceCount++;
-            }
-        }
-    else if ( delimiterIndex != KErrNotFound && indexOfToneMark == -1 )
-        {
-        replaceCount = delimiterIndex;
-        }
-    else if ( delimiterIndex == KErrNotFound && indexOfToneMark != -1 )
-        {
-        replaceCount = indexOfToneMark + 1;
-        }
-    else
-        {
-        replaceCount = spellingText.Length();
-        } 
-    for (TInt i = 0; i < replaceCount; i++ )
-        {
-        TPtrC ptr = keyStrokeArray->MdcaPoint( 0 );
-        keyStoke.Append( ptr );
-        keyStrokeArray->Delete( 0 );
-        // added for the keycode
-        TInt keyCodeValue = ( *keyCodeArray )[0];
-        keyCodePhraseArray->AppendL( keyCodeValue );
-        keyCodeArray->Remove( 0 );
-        }
-    phraseKeyStrokeArray->AppendL( keyStoke );
-
-    if ( GetValidKeystroke() )
-        {
-        iOwner->ChangeState( EZhuyinSpelling );
-        }
-    else
-        {
-        iOwner->ChangeState( EMiniQwertyEdit );
-        }
-    UIContainer()->EditPaneWindow()->SetChangeState(ETrue);
-    RefreshSpellingPane();
-    RefreshCandidatePane();
-    ChangeCbaL();
-    }
-
-TInt TAknFepInputStateEditingMiniQwertyZhuyinPhrase::GetIndexOfToneMark( const TDesC& aText)
-    {
-    TInt indexOfToneMark = -1;
-    TInt num = sizeof(ZhuyinToneMap )/( sizeof(ZhuyinToneMap[0]));
-    TInt len = aText.Length();
-    for( TInt j = 0; j< len ;j++ )
-        {
-        indexOfToneMark = j;
-        TBuf<1> keyStorkeBuf = aText.Mid( j ,1 );
-        for (TInt i = 0; i<num; i++ )
-            {
-            if (  keyStorkeBuf[0] == ZhuyinToneMap[i].iValue  )
-                {
-                return indexOfToneMark;
-                }
-            }
-        }
-    return -1;
-    }
-
 // ---------------------------------------------------------------------------
 // TAknFepInputStateSpellingMiniQwertyZhuyin::HandleCommandL
 // Handling Command
--- a/fep/aknfep/src/aknfepuiinputstateqwertykorean.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/aknfepuiinputstateqwertykorean.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -24,9 +24,7 @@
 #include <PtiEngine.h>
 #include <PtiDefs.h>
 #include <PtiKeyMappings.h>
-#include <PtiDefs.h>   
-
-const TInt KMaxPtiTextBufSize = 255;
+#include <PtiDefs.h>        
 
 TAknFepInputStateQwertyKorean::TAknFepInputStateQwertyKorean(
         MAknFepUIManagerStateInterface* aOwner)
@@ -41,113 +39,42 @@
     {
     }
 
-TBool TAknFepInputStateQwertyKorean::HandleKeyL(TInt aKey, TKeyPressLength aLength)
-    {	
-    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-    CPtiEngine* ptiengine = iOwner->PtiEngine();
-    TBool ret = ETrue;
-       
-	switch( aKey )
-		{
-		case EKeyDelete:
-		case EStdKeyDelete:
-		case EKeyBackspace:
-		case EStdKeyBackspace:
-			{
-			if (fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
-				{
-				TPtrC newText = ptiengine->DeleteKeyPress();
-				if( newText.Length() > 0 )
-					{
-					  fepMan->UpdateInlineEditL(newText, newText.Length());
-					}
-				else
-					{
-					fepMan->CancelInlineEdit();
-					ptiengine->ClearCurrentWord();
-					}	      	
-				}
-			else
-				{
-				ret = EFalse;	
-				}
-			}
-			break;
-		case EStdKeyEnter:
-		case EStdKeySpace:
-		case EStdKeyTab:
-		case EStdKeyLeftArrow:
-		case EStdKeyRightArrow:
-		case EStdKeyDownArrow:
-		case EStdKeyUpArrow:
-			{
-			fepMan->CommitInlineEditL();	
-			ptiengine->CommitCurrentWord();
-			ret = EFalse; 
-			}
-			break;
-		default:
-			{
-			//normal character handled here
-			if ( EShortKeyPress == aLength )
-				{
-				if (!(fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction)))
-					{ 
-					// start inline edit
-					ptiengine->ClearCurrentWord();
-					fepMan->StartInlineEditL();
-					fepMan->SetInlineEditingCursorVisibilityL(ETrue);
-					}
-										 
-				TPtrC aText = ptiengine->AppendKeyPress((TPtiKey)aKey);
-				if( aText.Length() > 0 )
-					{
-					 fepMan->UpdateInlineEditL(aText, aText.Length());	
-					 if( aText.Length()  >= KMaxPtiTextBufSize )
-						{
-						// force commit 
-						fepMan->CommitInlineEditL();	
-						ptiengine->CommitCurrentWord();
-						}	
-					}	
-				}
-			else // long press
-				{
-				if (!fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
-					{
-					return ETrue; 			
-					}
-				
-				//delete last input text
-				TPtrC text = ptiengine->DeleteKeyPress();
-				if( text.Length() >0 )
-					{
-				    fepMan->UpdateInlineEditL(text, text.Length());
-					}
-	            
-	            // add new text
-				TPtiTextCase previousCase = ptiengine->Case();
-				switch ( previousCase )
-					{
-					case EPtiCaseLower:
-					case EPtiCaseUpper:
-						ptiengine->SetCase( EPtiCaseFnLower );
-						break;
-					default:
-						break;
-					}
-					   
-				TPtrC newText = ptiengine->AppendKeyPress((TPtiKey)aKey);
-				if( newText.Length() >0 )
-					{
-					 fepMan->UpdateInlineEditL(newText, newText.Length());
-					}
-				ptiengine->SetCase( previousCase );
-				fepMan->CommitInlineEditL();
-				ptiengine->ClearCurrentWord();
-				}
-			}  
-			break;
-		}                                                             	  	                    				   
-    return ret;
+TBool TAknFepInputStateQwertyKorean::HandleKeyL(TInt aKey, TKeyPressLength /*aLength*/)
+    {
+//    LOG2("KO.IS.QWERTY.HandleKeyL %d,%d",aKey,aLength);
+    CPtiEngine& ptiEngine(*(iOwner->PtiEngine()));
+    MAknFepManagerUIInterface& fepMan(*(iOwner->FepMan()));
+    
+    TPtrC text(ptiEngine.AppendKeyPress((TPtiKey)aKey));
+    TBuf<1> chr;            
+    for (TInt jj = 0; jj < text.Length(); jj++)
+        {
+        chr.Zero();
+        chr.Append(text[jj]);
+        fepMan.NewCharacterL(chr);
+        }
+    return ETrue;
     }
+
+void TAknFepInputStateQwertyKorean::KeyTimerExpired()
+    {
+//    LOG1("KO.IS.QWERTY.KeyTimerExpired %d",iData);
+    CPtiEngine& ptiEngine(*(iOwner->PtiEngine()));
+    MAknFepManagerUIInterface& fepMan(*(iOwner->FepMan()));
+    
+    TPtrC text(ptiEngine.CurrentWord());
+    TBuf<1> chr;            
+    for (TInt jj = 0; jj < text.Length(); jj++)
+        {
+        chr.Zero();
+        chr.Append(text[jj]);
+        TRAP_IGNORE( fepMan.NewCharacterL(chr) );
+        }
+    
+    //TRAPD(err, fepMan.CommitInlineEditL())
+    TRAP_IGNORE( fepMan.CommitInlineEditL() )
+    }
+
+//fepMan.StartInlineEditL(text);
+//iFepMan.StartInlineEditL()
+//virtual void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor) = 0;
--- a/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h	Wed Oct 13 14:55:58 2010 +0300
@@ -177,12 +177,14 @@
     ECmdPenInputHideCandidateList,
     ECmdPeninputITIStatus,
     ECmdPeninputSpellLanguageMode,
-	ECmdPeninputSpellICFDisplayContent,
-	ECmdPenInputDimEnterKey,
+    ECmdPeninputSpellICFDisplayContent,
+    ECmdPenInputDimEnterKey,
     ECmdPeninputEnableOwnBitmap,    
-	ECmdPeninputDisableLayoutDrawing,
-	ECmdPeninputArabicNumModeChanged,
+    ECmdPeninputDisableLayoutDrawing,
+    ECmdPeninputArabicNumModeChanged,
     ECmdPeninputEnalbeLayoutReDrawWhenActive,
+    ECmdPeninputVietSyncToneMarker,
+    ECmdPeninputSelectServerCandidate,
     ECmdPenInputImeCmdBase = 2000
     };
 
--- a/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h	Wed Oct 13 14:55:58 2010 +0300
@@ -380,47 +380,6 @@
  * and the default value is EPluginInputModeItut.
  */
 const TUint32 KAknFepLastUsedPortraitInput = 0x00000026;
-
-/**
- * following keys are used for tap accuracy enhancement, default input mode
- */
-const TUint32 KAknFepTapAccuracyDefaultButtonExtMargins         = 0x27;
-const TUint32 KAknFepTapAccuracyDefaultKeyCtrlExtMargins        = 0x28;
-const TUint32 KAknFepTapAccuracyDefaultPointerMoveMaxMovement   = 0x29;
-const TUint32 KAknFepTapAccuracyDefaultPointerMoveTimeout       = 0x2a;
-const TUint32 KAknFepTapAccuracyDefaultPointerUpMaxMovement     = 0x2b;
-const TUint32 KAknFepTapAccuracyDefaultPointerUpTimeout         = 0x2c;
-
-/**
- * following keys are used for tap accuracy enhancement, FSQ
- */
-const TUint32 KAknFepTapAccuracyFsqButtonExtMargins             = 0x2d;
-const TUint32 KAknFepTapAccuracyFsqKeyCtrlExtMargins            = 0x2e;
-const TUint32 KAknFepTapAccuracyFsqPointerMoveMaxMovement       = 0x2f;
-const TUint32 KAknFepTapAccuracyFsqPointerMoveTimeout           = 0x30;
-const TUint32 KAknFepTapAccuracyFsqPointerUpMaxMovement         = 0x31;
-const TUint32 KAknFepTapAccuracyFsqPointerUpTimeout             = 0x32;
-
-/**
- * following keys are used for tap accuracy enhancement, Portrait FSQ
- */
-const TUint32 KAknFepTapAccuracyPFsqButtonExtMargins            = 0x33;
-const TUint32 KAknFepTapAccuracyPFsqKeyCtrlExtMargins           = 0x34;
-const TUint32 KAknFepTapAccuracyPFsqPointerMoveMaxMovement      = 0x35;
-const TUint32 KAknFepTapAccuracyPFsqPointerMoveTimeout          = 0x36;
-const TUint32 KAknFepTapAccuracyPFsqPointerUpMaxMovement        = 0x37;
-const TUint32 KAknFepTapAccuracyPFsqPointerUpTimeout            = 0x38;
-
-/**
- * following keys are used for tap accuracy enhancement, Finger HWR
- */
-const TUint32 KAknFepTapAccuracyFhwrButtonExtMargins            = 0x39;
-const TUint32 KAknFepTapAccuracyFhwrKeyCtrlExtMargins           = 0x3a;
-const TUint32 KAknFepTapAccuracyFhwrPointerMoveMaxMovement      = 0x3b;
-const TUint32 KAknFepTapAccuracyFhwrPointerMoveTimeout          = 0x3c;
-const TUint32 KAknFepTapAccuracyFhwrPointerUpMaxMovement        = 0x3d;
-const TUint32 KAknFepTapAccuracyFhwrPointerUpTimeout            = 0x3e;
-
 #endif
 
 // End of file
--- a/inputmethods_plat/pen_input_server_api/inc/peninputclient.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputclient.h	Wed Oct 13 14:55:58 2010 +0300
@@ -428,7 +428,6 @@
     IMPORT_C TInt ConnectAsyc(TRequestStatus& aStatus);
 	IMPORT_C void SetDataQueryPopped(TBool aFlag);
     IMPORT_C void EnablePriorityChangeOnOriChange(TBool aEnabled);
-    IMPORT_C void EnableGfxTransEffect( TBool aEnable );
 private:    // Data
     /**
      * The singleton client to the input server
--- a/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h	Wed Oct 13 14:55:58 2010 +0300
@@ -75,7 +75,6 @@
     EPeninputOpLastCommand ,
     EPeninputOpRequestDSAState,
 	EPeninputOpChangeFeedbackType,
-	EPeninputOpUpdatePointerSuppressor,
     EPeninputUserCmdBase = 1000
 
     };
@@ -113,7 +112,8 @@
     ESignalDisableUpdating,
     ESignalDrawBackground,
     ESignalEnableLayoutRedrawWhenActive,
-    ESignalUpdatePointerSuppressor,
+    ESignalShowServerCandidate,
+    ESignalHideServerCandidate,
     ESignalFepEventBase = 1500,    //Event base for Fep. All fep event
                                     //is re-directed to Fep.
     ESignalKeyEvent = 1501,        //hwr recongition selection event.
--- a/inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h	Wed Oct 13 14:55:58 2010 +0300
@@ -63,6 +63,21 @@
     EAppMessageTypeChangeMsg
     /* Teleca change begin, 9.09.2009 ssal */
     };
+    
+/**
+ *  The command type of choice canidate list item .
+ */
+enum TPeninputCandItemCommand
+    {
+    ECandItemCmdNone,
+    ECandItemCmdGetNextPage,
+    ECandItemCmdGetPage,
+    ECandItemCmdExisted,
+    ECandItemCmdItemSelected,
+    ECandItemCmdEnterSpellMode,
+    ECandItemCmdArrowUp,
+    ECandItemCmdArrowDown
+    };
         
 //structure for input context field data
 struct TFepInputContextFieldData
@@ -140,6 +155,7 @@
 		};
     TInt iActiveIndex;
     TInt iLangCode;
+    TRect iRect;
     };
 
 class CPtiEngine;
@@ -162,4 +178,23 @@
 	TPtrC iICFText;
 	TPtrC iPromptText;
 	};
+    
+/**
+ * Pen input server candidate data
+ */
+struct TPeninputCandidateData
+    {
+    // The alienment of text in candidate
+    TInt iAlign;
+    // The init rect used for the top-left point of candidate
+    TRect iInitRect;
+    // Enable spell functionality of candidate
+    TBool iSpellEnabled;
+    // Enable minimal text width when calculates item width.
+    TBool iTextWidthEnabled;
+    // The contents to be shown in candidate
+    CDesCArray* iItemArray;
+    // The default index
+    TInt iActiveIndex;
+    };
 #endif
--- a/inputmethods_pub/ptiengine_iti_api/inc/PtiDefs.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/inputmethods_pub/ptiengine_iti_api/inc/PtiDefs.h	Wed Oct 13 14:55:58 2010 +0300
@@ -621,13 +621,7 @@
     EPtiCommandUserActionSetIndexOfActiveCandidate,
     EPtiCommandAddWordToUDBWithoutPunctMark,
     EPtiCommandGetSecondaryCandidate,   
-    EPtiCommandAutoCompletionOnToOff,        //to signify that autocompletion is set from on to off in between typing  
-    EPtiCommandSelectElement,                // Add for sogou learn word
-    EPtiCommandCancelSelectElement,          // Add for sogou learn word
-    EPtiCommandSetPinyinForLearnWord,        // Add for sogou learn word
-    EPtiCommandGetCoreID,                    // Add for get the current core id
-    EPtiCommandSetFuzzy,                     // Add to set fuzzy pinyin
-    EPtiCommandAddPhonebookEntry             // Add to learn phone book entry
+    EPtiCommandAutoCompletionOnToOff        //to signify that autocompletion is set from on to off in between typing  
     };
 
 /**
--- a/textinput/group/bld.inf	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/group/bld.inf	Wed Oct 13 14:55:58 2010 +0300
@@ -50,6 +50,5 @@
 #include "../peninputhwrfscn/group/bld.inf"
 #include "../peninputvkbkr/group/bld.inf"
 #include "../peninputfingerhwr/group/bld.inf"
-#include "../peninputfingerhwrar/group/bld.inf"
 #include "../peninputsplititut/group/bld.inf"
 #include "../peninputsplitqwerty/group/bld.inf"
--- a/textinput/peninputarc/bwins/peninputClientU.DEF	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/bwins/peninputClientU.DEF	Wed Oct 13 14:55:58 2010 +0300
@@ -64,5 +64,4 @@
 	?ConnectAsyc@RPeninputServer@@QAEHAAVTRequestStatus@@@Z @ 63 NONAME ; int RPeninputServer::ConnectAsyc(class TRequestStatus &)
 	?SetDataQueryPopped@RPeninputServer@@QAEXH@Z @ 64 NONAME ; void RPeninputServer::SetDataQueryPopped(int)
 	?EnablePriorityChangeOnOriChange@RPeninputServer@@QAEXH@Z @ 65 NONAME ; void RPeninputServer::EnablePriorityChangeOnOriChange(int)
-        ?EnableGfxTransEffect@RPeninputServer@@QAEXH@Z @ 66 NONAME ; void RPeninputServer::EnableGfxTransEffect(int)
 
--- a/textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF	Wed Oct 13 14:55:58 2010 +0300
@@ -607,13 +607,4 @@
 	?HandleResourceChange@CFepLayoutPopupWnd@@UAEXH@Z @ 606 NONAME ; void CFepLayoutPopupWnd::HandleResourceChange(int)
 	?DisableLayoutDrawing@CFepUiLayout@@QAEXH@Z @ 607 NONAME ; void CFepUiLayout::DisableLayoutDrawing(int)
 	?BkMaskBmp@CFepUiBaseCtrl@@IAEPAVCFbsBitmap@@XZ @ 608 NONAME ; class CFbsBitmap * CFepUiBaseCtrl::BkMaskBmp(void)
-	??0CPopupBubbleCtrl@@IAE@ABVTRect@@PAVCFepUiLayout@@H@Z @ 609 NONAME ; CPopupBubbleCtrl::CPopupBubbleCtrl(class TRect const &, class CFepUiLayout *, int)
-	?SetBitmapParamL@CPopupBubbleCtrl@@QAEXPAVCFbsBitmap@@0VTAknsItemID@@11@Z @ 610 NONAME ; void CPopupBubbleCtrl::SetBitmapParamL(class CFbsBitmap *, class CFbsBitmap *, class TAknsItemID, class TAknsItemID, class TAknsItemID)
-	?Move@CPopupBubbleCtrl@@UAEXABVTPoint@@@Z @ 611 NONAME ; void CPopupBubbleCtrl::Move(class TPoint const &)
-	?SetTextL@CPopupBubbleCtrl@@QAEXABVTDesC16@@@Z @ 612 NONAME ; void CPopupBubbleCtrl::SetTextL(class TDesC16 const &)
-	?Hide@CPopupBubbleCtrl@@UAEXH@Z @ 613 NONAME ; void CPopupBubbleCtrl::Hide(int)
-	?NewL@CPopupBubbleCtrl@@SAPAV1@ABVTRect@@PAVCFepUiLayout@@H@Z @ 614 NONAME ; class CPopupBubbleCtrl * CPopupBubbleCtrl::NewL(class TRect const &, class CFepUiLayout *, int)
-	?SetTextFormat@CPopupBubbleCtrl@@QAEXVTAknTextLineLayout@@@Z @ 615 NONAME ; void CPopupBubbleCtrl::SetTextFormat(class TAknTextLineLayout)
-	?Draw@CPopupBubbleCtrl@@UAEXXZ @ 616 NONAME ; void CPopupBubbleCtrl::Draw(void)
-	??1CPopupBubbleCtrl@@UAE@XZ @ 617 NONAME ; CPopupBubbleCtrl::~CPopupBubbleCtrl(void)
 
--- a/textinput/peninputarc/eabi/peninputClientU.DEF	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/eabi/peninputClientU.DEF	Wed Oct 13 14:55:58 2010 +0300
@@ -73,5 +73,4 @@
 	_ZN15RPeninputServer11ConnectAsycER14TRequestStatus @ 72 NONAME
 	_ZN15RPeninputServer18SetDataQueryPoppedEi @ 73 NONAME
 	_ZN15RPeninputServer31EnablePriorityChangeOnOriChangeEi @ 74 NONAME
-	_ZN15RPeninputServer20EnableGfxTransEffectEi @ 75 NONAME
 
--- a/textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF	Wed Oct 13 14:55:58 2010 +0300
@@ -741,18 +741,4 @@
 	_ZN14CFepUiBaseCtrl9BkMaskBmpEv @ 740 NONAME
 	_ZN16CVirtualKeyboard20HandleResourceChangeEi @ 741 NONAME
 	_ZN18CFepLayoutPopupWnd20HandleResourceChangeEi @ 742 NONAME
-	_ZN16CPopupBubbleCtrl13SetTextFormatE18TAknTextLineLayout @ 743 NONAME
-	_ZN16CPopupBubbleCtrl15SetBitmapParamLEP10CFbsBitmapS1_11TAknsItemIDS2_S2_ @ 744 NONAME
-	_ZN16CPopupBubbleCtrl4DrawEv @ 745 NONAME
-	_ZN16CPopupBubbleCtrl4HideEi @ 746 NONAME
-	_ZN16CPopupBubbleCtrl4MoveERK6TPoint @ 747 NONAME
-	_ZN16CPopupBubbleCtrl4NewLERK5TRectP12CFepUiLayouti @ 748 NONAME
-	_ZN16CPopupBubbleCtrl8SetTextLERK7TDesC16 @ 749 NONAME
-	_ZN16CPopupBubbleCtrlC1ERK5TRectP12CFepUiLayouti @ 750 NONAME
-	_ZN16CPopupBubbleCtrlC2ERK5TRectP12CFepUiLayouti @ 751 NONAME
-	_ZN16CPopupBubbleCtrlD0Ev @ 752 NONAME
-	_ZN16CPopupBubbleCtrlD1Ev @ 753 NONAME
-	_ZN16CPopupBubbleCtrlD2Ev @ 754 NONAME
-	_ZTI16CPopupBubbleCtrl @ 755 NONAME
-	_ZTV16CPopupBubbleCtrl @ 756 NONAME
 
--- a/textinput/peninputarc/group/bld.inf	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/group/bld.inf	Wed Oct 13 14:55:58 2010 +0300
@@ -92,9 +92,6 @@
 
 ../inc/peninputlayoutcontrolinc/peninputaknvkbpreviewbubblerenderer.h   |../../../inc/peninputaknvkbpreviewbubblerenderer.h
 ../inc/peninputlayoutcontrolinc/peninputvkbpreviewbubblerenderer.h      |../../../inc/peninputvkbpreviewbubblerenderer.h
-
-../inc/peninputlayoutcontrolinc/peninputpopupbubble.h                   |../../../inc/peninputpopupbubble.h
-
 //inline file
 ../inc/peninputlayoutcontrolinc/peninputlayout.inl                      |../../../inc/peninputlayout.inl
 ../inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.inl           |../../../inc/peninputlayoutbasecontrol.inl
@@ -151,4 +148,11 @@
 OPTION SOURCES -c8,8 qgn_prop_cp_dev_pen.svg
 END
 
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE peninputserver.mif
+OPTION HEADERFILE peninputserver.mbg
+OPTION SOURCEFILE ../src/peninputserverapp/iconlist.txt
+END
+
 // End of file
--- a/textinput/peninputarc/gsplugin/gspeninputplugin/loc/gspeninputplugin.loc	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/gsplugin/gspeninputplugin/loc/gspeninputplugin.loc	Wed Oct 13 14:55:58 2010 +0300
@@ -313,108 +313,4 @@
 // r:5.0
 //
 #define qtn_tin_option_menu_arabic_wdic "Recognition with dictionary"
-
-// d:Text in Handwriting input setting
-// d:Label's text for handwriting input setting in device view
-// l:list_single_large_graphic_pane_t1
-// r:TB9.2
-#define qtn_cp_folder_handwriting_input "Handwriting input settings"
-
-// d:Text in Handwriting input setting
-// d:It is title text in handwriting input setting view
-// l:title_pane_t2/opt9
-// r:TB9.2
-#define qtn_cp_title_handwriting_input "Handwriting input settings"
-
-// d:Text in Handwriting input setting
-// d:It is caption text for handwriting input settings in general settings
-// l:title_pane_t2/opt9
-// r:TB9.2
-#define qtn_gen_settings_handwriting_input "Handwriting input settings"
-
-// d:Text in Handwriting input setting
-// d:Setting name for handwriting input 
-// l:list_setting_pane_t1 
-// r:TB9.2
-#define qtn_as_settings_simple_hwr "Handwriting input"
-
-// d:Text in Handwriting input setting
-// d:Handwriting input can be actived 
-// l:list_set_graphic_pane_t1 
-// r:TB9.2
-#define qtn_ads_settings_enable_simple_hwr "On"
-
-// d:Text in Handwriting input setting
-// d:Handwriting input can not be actived
-// l:list_set_graphic_pane_t1 
-// r:TB9.2
-#define qtn_ads_settings_disable_simple_hwr "Off"
-
-
-// d:It is text for selecting the fuzzy pinyin input settings 
-// l:list_setting_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_fuzzy_pinyin "Fuzzy Pinyin"
-
-
-// d:It is text for showing fuzzy pinyin value in input settings 
-// l:list_set_graphic_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_fuzzy_pinyin_no_setting "No setting"
-
-
-// d:It is text for selecting the import contacts in input settings 
-// l:list_setting_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name "Import contacts name of Phonebook"
-
-
-// d:It is text for showing the import date in input settings 
-// l:list_set_graphic_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_time "Import date: %U"
-
-
-// d:It is text for showing not import in input settings 
-// l:list_set_graphic_pane_t1
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_not_import_yet "Not imported"
-
-// d:It is text for softkey to stop import dialog
-// l:control_pane_t2/opt7
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_stop "stop"
-
-// d:It is note text for succeed import contacts 
-// l:popup_note_window/opt2
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_note "%0N contact names have been imported."
-
-// d:It is text for no phonebook contacts when import.
-// l:popup_note_window/opt2
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_empty "No contact in Phonebook."
-
-// d:It is text for showing the import process.
-// l:popup_note_wait_window
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_wait "Importing, please wait...\n(%0N/%1N)"
-
-
-// d:text display when we can't access the phonebook data
-// l:popup_note_window/opt2
-// r:9.2
-//
-#define qtn_tin_settings_import_contacts_name_error_access "Can't access phonebook data"
-
-
 // End Of File
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h	Wed Oct 13 14:55:58 2010 +0300
@@ -567,7 +567,7 @@
     /**
      * Get extra response area of virtual key controls.
      * 
-     * @since Symbian^3
+     * since Symbian^3
      * @param aMargins output the margins around the original response area.
      */
     void GetKeyExtResponseArea( TMargins& aMargins );
@@ -575,11 +575,10 @@
     /**
      * Get extra response area of button controls.
      * 
-     * @since Symbian^3
+     * since Symbian^3
      * @param aMargins  output the margins around the original response area.
      */    
     void GetButtonExtResponseArea( TMargins& aMargins );
-
 protected:
     /**
      * Constructor
@@ -647,13 +646,13 @@
     void SendEditorTextAndCursorPosL(TUint8* aData);
 	void SetSelfBmpDeviceFlag(TBool aFlag);
 
-    /**
-     * Load tap accuracy enhancement settings according to the specified input mode.
-     *  
-     * @since Symbian^3
-     * @param alayoutType specifies the input mode(refer to TPluginInputMode) of this layout.
-     */
-    void LoadTapAccuracySettingsL( TInt alayoutType );
+	/**
+	 * Load tap accuracy enhancement settings according to the specified input mode.
+	 *  
+	 * since Symbian^3
+	 * @param aInputMode specifies the input mode(refer to TPluginInputMode) of this layout.
+	 */
+    void LoadTapAccuracySettings( TInt aInputMode );
 
 private:
     NONSHARABLE_CLASS( CFepUiLayoutExt) : public CBase
@@ -675,26 +674,6 @@
             TBool iDisableDrawing;
             
             /**
-             * PointerMove event suppressor parameter: max movement(in pixel)
-             */
-            TSize iPointerMoveSuppressMaxMovement;
-            
-            /**
-             * PointerMove event suppressor parameter: timeout(in microsecond)
-             */
-            TInt iPointerMoveSuppressTimeout;
-
-            /**
-             * PointerUp event suppressor parameter: max movement(in pixel)
-             */
-            TSize iPointerUpSuppressMaxMovement;
-            
-            /**
-             * PointerUp event suppressor parameter: timeout(in microsecond)
-             */
-            TInt iPointerUpSuppressTimeout;
-            
-            /**
              * extra response area of virtual key controls
              */
             TMargins iKeyExtResponseMargins;
@@ -703,8 +682,6 @@
              * extra response area of virtual button controls
              */
             TMargins iButtonExtResponseMargins;
-
-            
         };
  
 private:  
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbubblectrl.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbubblectrl.h	Wed Oct 13 14:55:58 2010 +0300
@@ -177,10 +177,7 @@
 
 inline void CBubbleCtrl::GetText( TDes& aText )
     {
-    if (iText)
-        {
-        aText.Copy( *iText );
-        }
+    aText.Copy( *iText );
     }
 
 inline void CBubbleCtrl::SetLangCode( TInt aLangCode )
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.h	Wed Oct 13 14:55:58 2010 +0300
@@ -455,43 +455,6 @@
     inline void SetKeySkinId(TVirtualKeyBmpType aBmpType, TAknsItemID aSkinId);
     inline TAknsItemID KeySkinId(TVirtualKeyBmpType aBmpType);
     inline void SetTextLineLayout(TAknTextLineLayout aTextLine, TVirtualKeyTextPos aPos);
-    
-    /**
-     * Set the star icon rect
-     *
-     * @since S60 V5.0
-     * @param aRect the rect of the star icon
-     * @return none
-     */
-    inline void SetStarIconRect( const TRect& aRect );
-    
-    /**
-     * Set the shift icon rect
-     *
-     * @since S60 V5.0
-     * @param aRect the rect of the shift icon
-     * @return none
-     */
-    inline void SetShiftIconRect( const TRect& aRect );
-    
-    /**
-     * Get the star icon rect
-     *
-     * @since S60 V5.0
-     * @param none
-     * @return the rect of the star icon
-     */
-    inline TRect StarIconRect();
-    
-    /**
-     * Get the shift icon rect
-     *
-     * @since S60 V5.0
-     * @param none
-     * @return the rect of the shift icon
-     */
-    inline TRect ShiftIconRect();
-    
     inline TAknTextLineLayout TextLineLayout(TVirtualKeyTextPos aPos);
     inline void SetTextLineLayout(TAknTextLineLayout aTextLine);
     inline TAknTextLineLayout TextLineLayout();
@@ -948,16 +911,7 @@
      */    
     CFepUiKeyboardExt* iExt;
 
-    /**
-     * The star icon rect
-     */
-    TRect iStarIconRect;
-    
-    /**
-     * The shift icon rect
-     */
-    TRect iShiftIconRect;
-    
+
 protected:
     //void HandleResourceChange(TInt aType);
     virtual IMPORT_C void HandleResourceChange(TInt aType);
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.inl	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.inl	Wed Oct 13 14:55:58 2010 +0300
@@ -148,50 +148,6 @@
         }
     }
 
-// ---------------------------------------------------------------------------
-// CVirtualKeyboard::SetStarIconRect
-// Set the rect of the star icon
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-inline void CVirtualKeyboard::SetStarIconRect( const TRect& aRect )
-	{
-	iStarIconRect = aRect;
-	}
-
-// ---------------------------------------------------------------------------
-// CVirtualKeyboard::SetShiftIconRect
-// Set the rect of the shift icon
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-inline void CVirtualKeyboard::SetShiftIconRect( const TRect& aRect )
-	{
-	iShiftIconRect = aRect;
-	}
-
-// ---------------------------------------------------------------------------
-// CVirtualKeyboard::StarIconRect
-// Get the rect of the star icon
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-inline TRect CVirtualKeyboard::StarIconRect()
-	{
-	return iStarIconRect;
-	}
-
-// ---------------------------------------------------------------------------
-// CVirtualKeyboard::ShiftIconRect
-// Get the rect of the shift icon
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-inline TRect CVirtualKeyboard::ShiftIconRect()
-	{
-	return iShiftIconRect;
-	}
-
 inline TAknTextLineLayout CVirtualKeyboard::TextLineLayout(TVirtualKeyTextPos aPos)
     {
     if (aPos >= 0 && aPos <= EPosLast)
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputpopupbubble.h	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-/*
-* Copyright (c) 2005-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file of CPopupBubbleCtrl
-*
-*/
-
-#ifndef C_CPOPUPBUBBLECTRL_H
-#define C_CPOPUPBUBBLECTRL_H
-
-#include <peninputlayoutbasecontrol.h>
-#include <AknsConstants.h>
-#include <AknsItemID.h>
-#include <AknLayout2Def.h>
-#include <coecntrl.h>
-#include <aknsskininstance.h>
-#include <e32cmn.h>
-
-class CPopupBubbleCtrl;
-
-/**
- *  CPopupBubbleWnd
- *  
- *  CCoeControl based class used for drawing
- * 
- */
-NONSHARABLE_CLASS(CPopupBubbleWnd) : public CCoeControl
-    {
-public:
-    /**
-     * Destructor.        
-     */
-    virtual ~CPopupBubbleWnd();
-
-    /**
-     * Symbian constructor.        
-     *
-     * @param aRect control rect
-     * @param aParent parent control
-     * @return An instance of CPopupBubbleWnd class        
-     */     
-    static CPopupBubbleWnd* NewL(const TRect& aRect, CPopupBubbleCtrl& aParent);
-    
-    /**
-     * Symbian constructor.       
-     *
-     * @param aRect control rect
-     * @param aParent parent control
-     * @return An instance of CPopupBubbleWnd class        
-     */
-    static CPopupBubbleWnd* NewLC(const TRect& aRect, CPopupBubbleCtrl& aParent);
-
-    /**
-     * Draw control.       
-     *
-     * @param aRect control rect     
-     */    
-    void Draw(const TRect& aRect) const;
-    
-    /**
-     * Test transparency support.       
-     *
-     * @return ETrue if transparency is supported, otherwise EFalse.     
-     */    
-    inline TBool SupportTransparent() const
-        {
-        return iSupportTransparent;
-        };
-    
-    /**
-     * Handle size change.       
-     */  
-    void SizeChanged();
-    
-    /**
-     * Handle resource change.       
-     * @param aType resource change event.
-     */ 
-    void HandleResourceChange(TInt aType);
-    
-protected:
-    
-    /**
-    * Symbian OS 2nd phase constructor 
-    */
-    void ConstructL(const TRect& aRect);
-    
-    /**
-    * C++ constructor
-    * @param aParent CPopupBubbleCtrl parent control
-    */
-    CPopupBubbleWnd(CPopupBubbleCtrl& parent);
- 
-    /**
-    * Size images used for drawing
-    * @param aId Skin item Id
-    * @param aRect Rect to be used for sizing
-    * @param aBitmap Bitmap to be sized 
-    * @param aDevice BitmapDevice to be used for sizing
-    * @param aBitGc BitGc to be used for sizing
-    */    
-    void SizeImage(TAknsItemID aId, TRect aRect, CFbsBitmap* aBitmap, CFbsBitmapDevice* aDevice, CFbsBitGc* aBitGc );
-    
-private:
-    /**
-     * Draw transparent background.       
-     *
-     * @param aRect control rect     
-     */    
-    void DrawTransparentBackground(const TRect& aRect) const;    
-    
-private:
-    
-    enum TItems
-        {
-        ETempItem = 0,
-        ELeftItem,
-        ERightItem,
-        EMiddleItem,
-        ELastItem
-        };
-    
-    RPointerArray<CFbsBitmap> iBitmap;
-    RPointerArray<CFbsBitmapDevice> iDevice;
-    RPointerArray<CFbsBitGc> iBitGc; 
-    TRect iRect[ELastItem];
-    
-    CPopupBubbleCtrl& iParent;
-    TBool iSupportTransparent;
-    };
-
-/**
- *  CPopupBubbleCtrl
- *  
- *  Bubble with own window
- * 
- */
-class CPopupBubbleCtrl: public CFepUiBaseCtrl
-    {
-public: 
-    //constructor and destructor
-    /**
-     * Destructor.        
-     */                  
-    IMPORT_C virtual ~CPopupBubbleCtrl();
-    /**
-     * Symbian constructor.        
-     *
-     * @param aRect The rectangle area for this control
-     * @param aUiLayout Ui layout who contains this control. Ownership not transferred
-     * @param aControlId control Id
-     * @return An instance of CPopupBubbleCtrl class        
-     */
-    IMPORT_C static CPopupBubbleCtrl* NewL(const TRect& aRect,
-                             CFepUiLayout* aUiLayout,
-                             TInt aCtrlId);
-    
-    
-    /**
-     * SetIconOffsetAndSize
-     *
-     * @param aOffset The offset to be moved
-     * @param aOffset The size to be set
-     */    
-    inline void SetIconOffsetAndSize( 
-            const TSize& aOffset, const TSize& aSize );
-    
-    /**
-     * Draw the control
-     *
-     */      
-    IMPORT_C void Draw();
-    
-    
-    /**
-     * Move the control
-     *
-     * @param aOffset The offset to be moved
-     */    
-    IMPORT_C void Move(const TPoint& aOffset);
-
-    /**
-     * Set bitmap parameters
-     *
-     * @param aBmpId Bitmap to be used. Can be NULL
-     * @param aMaskBmpId Mask to be used. Can be NULL
-     * @param aFirstBmpId Skin Bitmap id.
-     * @param aMiddleBmpId Skin Bitmap id.
-     * @param aLastBmpId Skin Bitmap id.
-     */    
-    IMPORT_C void SetBitmapParamL(
-                        CFbsBitmap* aBmpId,
-                        CFbsBitmap* aMaskBmpId,
-                        TAknsItemID aFirstBmpId,
-                        TAknsItemID aMiddleBmpId,
-                        TAknsItemID aLastBmpId);                            
-
-    /**
-     * Hide the control
-     *    
-     * @param aShowFlag visibility flag. ETrue if hidden, otherwise EFalse
-     */
-    IMPORT_C void Hide(TBool aShowFlag); 
-
-    /**
-     * Set text format used for text drawing
-     *    
-     * @param aTextFormat bubble text format
-     */    
-    IMPORT_C void SetTextFormat(TAknTextLineLayout aTextFormat);
-
-    /**
-     * Set bubble text
-     *    
-     * @param aText descriptor containing bubble text
-     */        
-    IMPORT_C void SetTextL(const TDesC& aText );
-
-    /**
-     * Get bubble text
-     *    
-     * @param aText descriptor to be filled in with data
-     */     
-    inline void GetText( TDes& aText );
-    
-    /**
-     * Check if text is set
-     *    
-     * @return ETrue is text was set. Otherwise EFalse.
-     */     
-    inline TBool HasText();
-
-    /**
-     * Set text color index used for drawing
-     *    
-     * @param aTxtClrIndex Color index.
-     */     
-    inline void SetTextColorIndex( TInt aTxtClrIndex );
-
-    /**
-     * Get text color index used for drawing
-     *    
-     * @return Color index.
-     */         
-    inline TInt TextColorIndex() const;
-protected:
-    
-    /**
-     * C++ constructor.        
-     *
-     * @param aRect The rectangle area for this control
-     * @param aUiLayout Ui layout who contains this control. Ownership not transferred
-     * @param aControlId control Id
-     */    
-    IMPORT_C CPopupBubbleCtrl(const TRect& aRect,
-                CFepUiLayout* aUiLayout,
-                TInt aCtrlId);
-private:
-    CFbsBitmap* iForgroundBmp;
-    CFbsBitmap* iForgroundBmpMask;
-    
-    TAknsItemID iFirstBmpId;
-    TAknsItemID iMiddleBmpId;
-    TAknsItemID iLastBmpId;
-      
-    HBufC* iText;
-    TAknTextLineLayout iTextFormat;
-    TInt iTextColorIndex;
-
-    TSize iIconOffset;
-    TSize iIconSize;    
-    
-    friend class CPopupBubbleWnd;
-    };
-   
-inline void CPopupBubbleCtrl::SetTextColorIndex( TInt aTxtClrIndex )
-    {
-    iTextColorIndex = aTxtClrIndex; 
-    }
-
-inline void CPopupBubbleCtrl::SetIconOffsetAndSize( 
-        const TSize& aOffset, const TSize& aSize )
-    {
-    iIconOffset = aOffset;
-    iIconSize = aSize;
-    }
-
-inline void CPopupBubbleCtrl::GetText( TDes& aText )
-    {
-    if (iText)
-        {
-        aText.Copy( *iText );
-        }
-    }
-
-inline TBool CPopupBubbleCtrl::HasText()
-    {
-    TBool ret = EFalse;
-
-    if (iText && iText->Length() > 0)
-        {
-        ret = ETrue;
-        }
-
-    return ret;
-    }
-
-/******************************************************************************/
-
-#endif //C_CPOPUPBUBBLECTRL_H
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputtapsettingmanager.h	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  header file of peninput ui layout
-*
-*/
-
-
-#ifndef PENINPUTTAPSETTINGMANAGER_H
-#define PENINPUTTAPSETTINGMANAGER_H
-
-#include <e32cmn.h>
-#include <e32base.h>
-#include <gdi.h>
-
-NONSHARABLE_CLASS(CPeninputTapSettingManager) : public CBase
-    {
-public: //constructors
-    /**
-     * Symbian constructor.
-     * 
-     * @since Symbian^3
-     * @return Pointer to created object
-     */
-    static CPeninputTapSettingManager* NewL();
-
-    /**
-     * Symbian constructor.
-     * 
-     * @since Symbian^3
-     * @return Pointer to created object
-     */
-    static CPeninputTapSettingManager* NewLC();
-    
-    /*
-     * Standard c++ destructor.
-     * @since Symbian^3
-     */
-    virtual ~CPeninputTapSettingManager();
-
-public:
-    /**
-     * Load all parameters of tap accuracy enhancement for specified layout.
-     * 
-     * @since Symbian^3
-     * @param aLayoutType layout type, refer to TPluginInputMode
-     * @return none
-     */
-    void Load( TInt aLayoutType );
-    
-    /**
-     * Load all parameters of tap accuracy enhancement for specified layout.
-     * 
-     * @since Symbian^3
-     * @param aLayoutType layout type, refer to TPluginInputMode
-     * @param aFileName path name of configuration file
-     * @return none
-     */
-    void Load( TInt aLayoutType, const TDesC& aFileName );
-    
-    /**
-     * Get configuration of PointerMove event suppressor.
-     * 
-     * @since Symbian^3
-     * @param aMaxMovement output max movement of PointerMove event
-     * @param aTimeout output timeout(in microsecond) of PointerMove event
-     * @return none
-     */
-    void GetPointerMoveSuppressor( TSize& aMaxMovement, TInt& aTimeout );
-    
-    /**
-     * Get configuration of PointerUp event suppressor.
-     * 
-     * @since Symbian^3
-     * @param aMaxMovement output max movement of PointerUp event
-     * @param aTimeout output timeout(in microsecond) of PointerUp event
-     * @return none
-     */
-    void GetPointerUpSuppressor( TSize& aMaxMovement, TInt& aTimeout );
-    
-    /**
-     * Get extra response area of virtual key controls.
-     * 
-     * @since Symbian^3
-     * @param aMargins output the margins around the original response area.
-     * @return none
-     */
-    void GetKeyExtResponseArea( TMargins& aMargins );
-    
-    /**
-     * Get extra response area of button controls.
-     * 
-     * @since Symbian^3
-     * @param aMargins output the margins around the original response area.
-     * @return none
-     */
-    void GetButtonExtResponseArea( TMargins& aMargins );
-
-private:
-    /**
-     * C++ constructor
-     * 
-     * @since Symbian^3
-     * @return None
-     */
-    CPeninputTapSettingManager();
-    
-    /**
-     * Symbian second-phase constructor
-     *
-     * @since Symbian^3
-     * @return None
-     */ 
-    void ConstructL();
-private:
-    /**
-     * Load all parameters of tap accuracy enhancement for specified layout.
-     * 
-     * @since Symbian^3
-     * @param aLayoutType layout type, refer to TPluginInputMode
-     * @return none
-     */
-    void LoadFromRepositoryL( TInt aLayoutType );
-    
-    /**
-     * Load all parameters of tap accuracy enhancement for specified layout
-     * 
-     * @since Symbian^3
-     * @param aLayoutType layout type, refer to TPluginInputMode
-     * @param aFileName path name of configuration file
-     * @return none
-     */
-    void LoadFromFileL( TInt aLayoutType, const TDesC& aFileName );
-    
-    /**
-     * Load default parameters
-     * 
-     * @since Symbian^3
-     * @return none
-     */
-    void LoadDefault();
-    
-    /**
-     * parse a TPoint from a comma separated values string.
-     * 
-     * @since Symbian^3
-     * @return number of values in aText
-     */
-    TInt ParsePoints( TPoint& aPoint, const TDesC& aText );
-    
-    /**
-     * parse a TMargins from a comma separated values string.
-     * 
-     * @since Symbian^3
-     * @param aMargins output parse result
-     * @param aText source string
-     * @return number of values in aText
-     */
-    TInt ParseMargins( TMargins& aMargins, const TDesC& aText ); 
-    
-private:
-    /**
-     * max movement of PointerMove event
-     */
-    TSize iPointerMoveMaxMovement;
-    
-    /**
-     * timeout of PointerMove event, microsecond
-     */
-    TInt  iPointerMoveTimeout;
-    
-    /**
-     * max movement of PointerUp event
-     */
-    TSize iPointerUpMaxMovement;
-    
-    /**
-     * timeout of PointerUp event, microsecond
-     */
-    TInt  iPointerUpTimeout;
-    
-    /**
-     * extra response area of virtual key controls
-     */
-    TMargins iKeyMargins;
-    
-    /**
-     * extra response area of button controls
-     */
-    TMargins iButtonMargins;
-    };
-
-#endif // PENINPUTTAPSETTINGMANAGER_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h	Wed Oct 13 14:55:58 2010 +0300
@@ -231,16 +231,6 @@
      * @return ETrue if command added successfully.
      */	    
     TBool SetDiscreetPopArea(const TRect& aArea);
-    
-    /**
-     * Update parameters of pointer event suppressor.
-     * 
-     * @since Symbian^3
-     * @param aParameters parameters of pointer event suppressor
-     * @return none
-     */
-    void UpdatePointerEventSuppressor( const TPointerEventSuppressorParameters& aParameters );
-
 private:
     /**
      * Default constructor.
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h	Wed Oct 13 14:55:58 2010 +0300
@@ -494,37 +494,6 @@
 private:
     TRect iArea;    
     };
-
-//class TAnimUpdatePointerEventSuppressorCmd
-/**
- * Class for handling pointer event suppressor command
- * 
- *
- * @since Symbian^3
- */
-class TAnimUpdatePointerEventSuppressorCmd :  public TAnimCmd
-    {
-public:
-    /**
-     * Default constructor
-     * @param aAnim The animation cliet which executes the command     
-     * @param aParameters parameters of pointer event suppressor
-     */
-    TAnimUpdatePointerEventSuppressorCmd( RPeninputAnim& aAnim, 
-                         const TPointerEventSuppressorParameters& aParameters );
-    
-    /**
-     * Execute the command
-     *
-     * @since Symbian^3
-     * @return ETrue if command has been executed successfully.     
-     */ 
-    virtual TBool ExecuteAnimCommand() const;
-    
-private:
-    TPointerEventSuppressorParameters iParameters;
-    };
-
 #include "peninputanimcommand.inl"
 	
 #endif //C_CPENINPUTANIM_CMD_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h	Wed Oct 13 14:55:58 2010 +0300
@@ -468,15 +468,6 @@
     TBool ServerReady();
     void OnServerStarted(TInt aErr);
     
-    /**
-     * Enable or disable transition effect.
-     * 
-     * @since Symbian^3
-     * @param aEnable, ETrue: enable transition effect
-     *                 EFalse: disable transition effect.     
-     */
-    void EnableGfxTransEffect( TBool aEnable );
-    
 private:
         /**
      * Constructor
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h	Wed Oct 13 14:55:58 2010 +0300
@@ -89,8 +89,7 @@
     EPeninputRequestDimResChangeLayout,
     EPeninputRequestSupportInputMode,
     EPeninputRequestSetInputLanguage,
-	EPeninputEnablePriorityChangeOnOriChange,
-	EPeninputRequestEnableGfxTransEffect
+	EPeninputEnablePriorityChangeOnOriChange
     };
 
 //server error code
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h	Wed Oct 13 14:55:58 2010 +0300
@@ -45,19 +45,4 @@
     // see MAnimSpriteFunctions::UpdateMember
     TBool iFullUpdateFlag;
     };
-
-/**
- * parameters for pointer event suppressor
- */
-struct TPointerEventSuppressorParameters
-    {
-    TBool iMoveEventSuppressEnabled;
-    TSize iMoveEventMaxMovement;
-    TInt  iMoveEventTimeout;
-    
-    TBool iUpEventSuppressEnabled;
-    TSize iUpEventMaxMovement;
-    TInt  iUpEventTimeout;
-    };
-
 #endif //_PENINPUTPARAM_EXT_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputserver.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputserver.h	Wed Oct 13 14:55:58 2010 +0300
@@ -42,6 +42,9 @@
 class CInternalBkCtrl;
 class CKeyRotator;
 class CPenInputCrpServiceClient;
+class CPenUiCandidateWnd;
+class MPenUiWndEventObserver;
+
 // panic code
 enum TPeninputServerPanic
     {
@@ -288,6 +291,13 @@
      * @return a CSharableSession instance
      */
     CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
+
+    /**
+     * Return pen ui layout
+     *
+     * @since Symbian^3     
+     */     
+    inline MPenUiLayoutBase* PenUiLayout() const;
     
 public: // From MRawEventHandler
     /**
@@ -693,15 +703,6 @@
     void CheckSessionValidL(CPeninputServerSession* aSession1,
                             CPeninputServerSession* aSession2) const;
     
-    /**
-     * Update parameters of pointer event suppressor.
-     * 
-     * @since Symbian^3
-     * @param aData parameters of pointer event suppressor
-     * @return none
-     */
-    void UpdatePointerEventSuppressor( const TDesC& aData );
-    
 public:    
     TInt DisabledByDSA(); 
     TInt DisabledByDSAFromAnim();   
@@ -991,9 +992,31 @@
     TRect iDiscreetPopArea;
 	TBool iEnablePriorityChangeOnOriChange;
     TBool iIsLayoutReDrawAllowWhenActive;
+    
+    /**
+     * Pen ui candidate window.
+     *
+     * Owned.
+     */     
+    CPenUiCandidateWnd* iCandidateWnd;
+    
+    /**
+     * Pen ui window event observer.
+     *
+     * Owned.
+     */
+    MPenUiWndEventObserver* iObserver;
     };
 
 /**
+* Return pen ui layout
+*/ 
+inline MPenUiLayoutBase* CPeninputServer::PenUiLayout() const
+    {
+    return iUiLayout;
+    }
+
+/**
  * Class CEventQueue
  * Event message queue. It's an active object.
  *
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputsrvobserver.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputsrvobserver.h	Wed Oct 13 14:55:58 2010 +0300
@@ -105,7 +105,7 @@
     TInt RunError(TInt aError);
 private:
     virtual TBool HandleServerEventL(TInt aEventId);
-
+    
     /**
      * Stop the server
      *
--- a/textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h	Wed Oct 13 14:55:58 2010 +0300
@@ -85,9 +85,8 @@
 	* @param aPointerEvent the pointer event which may need to be suppressed.
 	* @return ETrue if the pointer event should be suppressed, or EFalse if it should be handled.
 	*/
-
-    TBool SuppressPointerEvent( TPointerEvent& aPointerEvent );
-
+	TBool SuppressPointerEvent( TPointerEvent& aPointerEvent );
+	
 	/**
 	* Set the maximum time period that drag events should be
 	* ignored during a pointer interaction.
@@ -111,23 +110,23 @@
 	*/
 	void SetMinInterDragInterval(TTimeIntervalMicroSeconds aInterval);
 
-    /**
-     * Set the maximum pointer movement for up events.
-     * All up events within maximum movement and timeout are moved to the down position.
-     * 
-     * @since Symbian^3
-     * @param aMaxDownUpMove maximum movement(in pixel) of up event
-     */
-    void SetMaxDownUpMove( TSize aMaxDownUpMove );
-
-    /**
-     * Set the maximum time between up and down events.
-     * All up events within maximum movement and timeout are moved to the down position.
-     * 
-     * @since Symbian^3
-     * @param aDuration time between down and up events. 
-     */
-    void SetMaxDownUpDuration( TTimeIntervalMicroSeconds aDuration );
+	/**
+	 * Set the maximum pointer movement for up events.
+	 * All up events within maximum movement and timeout are moved to the down position.
+	 * 
+	 * @since Symbian^3
+	 * @param aMaxDownUpMove maximum movement(in pixel) of up event
+	 */
+	void SetMaxDownUpMove( TSize aMaxDownUpMove );
+	
+	/**
+	 * Set the maximum time between up and down events.
+	 * All up events within maximum movement and timeout are moved to the down position.
+	 * 
+	 * @since Symbian^3
+	 * @param aDuration time between down and up events. 
+	 */
+	void SetMaxDownUpDuration( TTimeIntervalMicroSeconds aDuration );
 
 private:
 	CPenPointerEventSuppressor();
@@ -141,18 +140,18 @@
 	TBool iTap;
 	TTime iLastEventTime;
 	
-
-    /**
-     * The maximum pointer movement for up events.
-     * All up events within maximum movement and timeout are moved to the down position.
-     */
-    TSize iMaxDownUpMove;
+	/**
+	 * The maximum pointer movement for up events.
+	 * All up events within maximum movement and timeout are moved to the down position.
+	 */
+	TSize iMaxDownUpMove;
+	
+	/**
+	 * The maximum time between up and down events.
+	 * All up events within maximum movement and timeout are moved to the down position.
+	 */
+	TTimeIntervalMicroSeconds iMaxDownUpDuration;
 
-    /**
-     * The maximum time between up and down events.
-     * All up events within maximum movement and timeout are moved to the down position.
-     */
-    TTimeIntervalMicroSeconds iMaxDownUpDuration;
-    };
+	};
 
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuicandidatewnd.h	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,688 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef PENUICANDIDATEWND_H
+#define PENUICANDIDATEWND_H
+
+#include <coecntrl.h>
+#include <AknsItemID.h> 
+#include <AknLayoutDef.h>
+
+class MPenUiWndEventObserver;
+
+/**
+ *  The constant for max text length of 
+ *  choice list item title.
+ */
+const TInt KMaxItemTextLength = 100;
+
+/**
+ *  CPenUiCandidateWnd
+ *  
+ *  CCoeControl based class used for candidate list
+ * 
+ */
+class CPenUiCandidateWnd : public CCoeControl
+    {
+public:
+   /**
+    * Store LAF data for candidate list
+    */
+    class TPenUiCandidateLafData
+        {
+    public:
+        TSize iItemSize;    
+        TInt iHorMargin;
+        TInt iVerMargin;
+        TSize iNaviSize;
+        TSize iNaviInnerSize;
+        TAknTextLineLayout iTextLine;
+        TAknTextLineLayout iPageTextLine;
+        const CFont* iFont;
+        };
+
+    /**
+     * Choice list item data structure.
+     */
+    class TPenUiCandidateItem
+        {
+    public:
+        /*
+         * Command of choice list item.
+         */
+        TInt iCommand;        
+        /*
+         * Title of choice list item.
+         */
+        TBuf<KMaxItemTextLength> iText;
+        };
+    
+    /**
+     * Two-phased constructor.
+     * 
+     * @since symbian^3
+     * @param aServer the pointer to the owner of the control     
+     * @return Pointer to CPenUiCandidateWnd's instance
+     */
+    static CPenUiCandidateWnd* NewL( MPenUiWndEventObserver* aObserver );
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @since symbian^3
+     * @param aServer the pointer to the owner of the control     
+     * @return Pointer to CPenUiCandidateWnd's instance
+     */
+    static CPenUiCandidateWnd* NewLC( MPenUiWndEventObserver* aObserver );
+    
+    /**
+     * Destructor
+     */
+    ~CPenUiCandidateWnd();
+    
+    /**
+     * Handle raw events of pen input.
+     *
+     * @since Symbian^3 
+     * @param aEventData The event data.
+     * @return ETrue if layout has processed the event, otherwise EFalse
+     */
+    TBool HandleRawEventL( const TAny* aEventData ); 
+
+    /**
+     * Set window priority.
+     *
+     * @since Symbian^3     
+     * @param aPriority the priority of candidate
+     * @return None     
+     */
+    inline void SetPriority( TInt aPriority );
+    
+    /**
+     * Set the alienment of text in candidate.
+     *
+     * @since Symbian^3     
+     * @param aAlign The alignment to be used.
+     * @return None
+     */  
+    inline void SetAlign( CGraphicsContext::TTextAlign aAlign );
+    
+    /**
+     * Set the init rect used for the top-left point of candidate.
+     *
+     * @since Symbian^3     
+     * @param aInitRect The initial rect used for the top-left position
+     *                  of candidate.
+     * @return None     
+     */  
+    inline void SetInitRect( const TRect& aInitRect );
+    
+    /**
+     * Enable spell functionality of candidate
+     *
+     * @since Symbian^3     
+     * @param aSpellEnabled ETrue: enable spell;
+     *                      EFalse: disable spell.
+     * @return None     
+     */     
+    inline void EnableSpell( TBool aSpellEnabled );
+
+    /**
+     * Enable minimal text width when calculates item width.
+     *
+     * @since Symbian^3     
+     * @param aTextWidthEnabled ETrue: enable text line;
+     *                      EFalse: disable text line.
+     * @return None     
+     */     
+    inline void EnableTextWidth( TBool aTextWidthEnabled );
+    
+    /**
+     * Show candidate list
+     * 
+     * @since Symbain^3
+     * @param aItemArray, the contents to be shown
+     * @param aActiveIndex, the default index
+     * @return None
+     */    
+    void ShowCandidateListL( const CDesCArray* aItemArray, TInt aActiveIndex );
+    
+    /**
+     * Hide candidate list
+     * 
+     * @since Symbian^3
+     * @return None
+     */        
+    void HideCandidateList();
+
+// From CCoeControl    
+    /**
+     * Handles a change to the control's resources.
+     *  
+     * @since symbian^3
+     * @param aType, a message UID value.
+     * @return None
+     */    
+    void HandleResourceChange( TInt aType );
+    
+private:
+
+    /**
+     * C++ Default Constructor 
+     */
+    CPenUiCandidateWnd( MPenUiWndEventObserver* aObserver );
+
+    /**
+     * 2nd phase constructor. 
+     * 
+     * @since Symbain^3
+     * @return None
+     */
+    void ConstructL();
+    
+    /**
+     * Set all kinds of frame ids 
+     * 
+     * @since Symbain^3
+     * @param aBgFrId, background frame id;
+     * @param aNaviFrId, normal navi button frame id;
+     * @param aNaviActiveFrId, pressed navi button frame id;
+     * @param aNaviDimFrId, dimmed navi button frame id;
+     * @param aItemActiveFrId, heightligh item frame id; 
+     * @return None
+     */
+    void SetImgFrId( TAknsItemID aBgFrId, 
+                     TAknsItemID aNaviFrId,
+                     TAknsItemID aNaviActiveFrId,
+                     TAknsItemID aNaviDimFrId,                     
+                     TAknsItemID aItemActiveFrId );
+    
+    /**
+     * Construct candidate list from resource. 
+     * 
+     * @return None
+     */    
+    void ConstructFromResourceL();
+    
+    /**
+     * Construct up / down arrow buttons from resource. 
+     * 
+     * @since Symbain^3
+     * @param aReader: the resource reader;
+     * @param aUpDown, ETrue, construct up button;
+     *             EFalse, construct down button;  
+     * @return None
+     */  
+    void ConstructPageInfoFromResourceL( TResourceReader& aReader, TBool aUpDown );
+    
+    
+    /**
+     * Read LAF data for candidate list 
+     *  
+     * @since Symbian^3     
+     * @return None
+     */    
+    void ReadLafInfo();
+    
+    /**
+     * Set size for bitmaps
+     * 
+     * @since Symbian^3
+     * @return None
+     */    
+    void SetBitmapSize();
+    
+    /**
+     * Create mask bitmap for dimmed icons 
+     *  
+     * @since Symbian^3
+     * @param aDimmedMask, store the generated mask bitmap for dimmed icons.
+     * @param aMask. the source bitmap
+     * @return None
+     */    
+    void CreateDimmedMaskL( CFbsBitmap*& aDimmedMask,
+                            const CFbsBitmap* aMask ); 
+
+    /**
+     * Capture all poninters of full screen when candidate list is opened. 
+     * 
+     * @since Symbain^3
+     * @param aFlag, ETrue: capture all pointers of full screen.
+     *               EFalse: don't capture all pointers of full screen.
+     * @return None
+     */       
+    void SetCapturePointer( TBool aFlag );   
+    
+     /**
+      * Get page info and transfer it to descritor.
+      *
+      * @since Symbian^3      
+      * @return None.     
+      */      
+    void GetPageInfoBufL();
+    
+    /**
+     * Set the text item array to candidate list
+     * 
+     * @since Symbian^3
+     * @param aItemArray: The text item array to be shown.
+     * @return None
+     */        
+    void SetItemArrayL( const CDesCArray* aItemArray );
+    
+    /**
+     * Add spell item
+     * 
+     * @since Symbian^3
+     * @return None
+     */        
+    void AddSpellItemL();
+    
+    /**
+     * Calculate the displaying rect of candidate.
+     * 
+     * @since Symbian^3
+     * @return None
+     */         
+    void ReCalcLayout();
+    
+    /**
+     * Return the dynamical width for displaying text.
+     * 
+     * @since Symbian^3
+     * @return The fittable width of candidate.
+     */            
+    TInt WidthToFitText(); 
+    
+    /**
+     * Return the rect to fit the screen size.
+     * 
+     * @since Symbian^3
+     * @param aRect: the source rect to be checked
+     * @return the rect of fittable to screen size
+     */            
+    TRect RectToFitScreen( const TRect& aRect );
+    
+    /**
+     * Draw each item.
+     * 
+     * @since Symbian^3
+     * @param aGc: the pointer of window gc
+     * @param aIndex: the index of the item to be drawn.
+     * @return None
+     */    
+    void DrawItem( CWindowGc* aGc, TInt aIndex ) const;
+    
+    /**
+     * Draw page down / up arrow button.
+     * 
+     * @since Symbian^3
+     * @param aGc: the pointer of window gc
+     * @param aUpDown: ETrue, the up arrow button,
+     *                 EFalse, the down arrow button
+     * @return None
+     */    
+    void DrawPageButton( CWindowGc* aGc, TBool aUpDown ) const;
+    
+    /**
+     * Draw page into text.
+     * 
+     * @since Symbian^3
+     * @param aGc: the pointer of window gc
+     * @return None
+     */
+    void DrawPageInfo( CWindowGc* aGc ) const;
+  
+    /**
+     * Handle pointer down event
+     *
+     * @since Symbian^3 
+     * @param aPoint The point position relative the layout
+     * @return None.
+     */                                        
+     void HandlePointerDownEvent(const TPoint& aPoint);
+    
+    /**
+     * Handle pointer move event
+     *
+     * @since Symbian^3
+     * @param aPoint The point position relative the layout
+     * @return None.       
+     */                  
+     void HandlePointerMoveEvent(const TPoint& aPoint);
+    
+    /**
+     * Handle pointer up event
+     *
+     * @since Symbian^3
+     * @return None.      
+     */                  
+     void HandlePointerUpEventL();  
+     
+     /**
+      * Check pointer area of pointer event 
+      *
+      * @param aPoint The point position relative the layout
+      * @return None.     
+      */                  
+     void CheckPointerEvent(const TPoint& aPoint);
+      
+     /**
+      * Return the index of pointed text item.
+      *  
+      * @since symbian^3
+      * @param aPoint, the position of pointer down.
+      * @return the index of the pointed text item.
+      */    
+     TInt ItemIndexByPoint( const TPoint& aPoint );
+     
+     /**
+      * Report item selected event to ui layout
+      *
+      * @since Symbian^3
+      * @return None.     
+      */
+     void ReportItemSelectedEventL();
+     
+     /**
+      * Delete all bitmaps.
+      *
+      * @since Symbian^3
+      * @return None.     
+      */ 
+     void DeleteAllBitmaps();
+     
+     /**
+      * Handle skin change.
+      *
+      * @since Symbian^3
+      * @return None.     
+      */ 
+     void HandleSkinChangeL(); 
+     
+ // From CCoeControl
+     /**
+      * Responds to changes to the size and position of the contents of this control.
+      * 
+      * @since Symbian^3
+      * @return None
+      */         
+     void SizeChanged();
+     
+     /**
+      * Draw candidate control.
+      * 
+      * @since Symbian^3
+      * @param aRect: the rect to be drawn.
+      * @return None
+      */    
+     void Draw( const TRect& aRect ) const;       
+     
+private:
+    /**
+     * The alignment of text in candidate list
+     *      
+     */
+    CGraphicsContext::TTextAlign iAlign;
+    
+    /**
+     * The initial rect for the top-left point
+     *      
+     */
+    TRect iInitRect;
+    
+    /**
+     * If enabling the spell functionality
+     *      
+     */
+    TBool iSpellEnabled;
+    
+    /**
+     * If enabling text width
+     *      
+     */
+    TBool iTextWidthEnabled;
+
+    /**
+     * Store Laf Data.
+     *      
+     */
+    CPenUiCandidateWnd::TPenUiCandidateLafData iLafData;
+    
+    /**
+     * Store the item list.
+     *      
+     */
+    RPointerArray<CPenUiCandidateWnd::TPenUiCandidateItem> iItemList;
+    
+    /**
+     * Background frame id.
+     *
+     */
+    TAknsItemID iBgFrId;    
+
+    /**
+     * Hilight frame id.
+     *
+     */
+    TAknsItemID iItemActiveFrId;
+    
+    /**
+     * Navi buttons normal frame id.
+     *
+     */    
+    TAknsItemID iNaviFrId;
+
+    /**
+     * Navi buttons pressed frame id.
+     *
+     */
+    TAknsItemID iNaviActiveFrId;
+    
+    /**
+     * Navi buttons dim frame id.
+     *
+     */    
+    TAknsItemID iNaviDimFrId;
+    
+    /**
+     * The width of text area
+     *
+     */
+    TInt iItemWidth;
+    
+    /**
+     * The rect of list pane
+     *
+     */
+    TRect iListRect;
+    
+    /**
+     * The rect of scroll pane
+     *
+     */
+    TRect iScrollRect;
+
+    /**
+     * The rect of up arrow button
+     *
+     */
+    TRect iPageUpRect;
+
+    /**
+     * The rect of down arrow button
+     *
+     */    
+    TRect iPageDownRect;
+    
+    /**
+     * The rect of each item.
+     *
+     */
+    RArray<TRect> iItemRects;
+    
+    /**
+     * The size of separator line.
+     *
+     */    
+    TSize iSeparatorSize;
+    
+    /**
+     * The index of current page.
+     *
+     */
+    TInt iCurrentPage;
+    
+    /**
+     * The number of total page.
+     *
+     */    
+    TInt iTotalPages;
+
+    /**
+     * The index of focused item.
+     *
+     */ 
+    TInt iFocusItem;
+    
+    /**
+     * The text of page info
+     *
+     * Owned
+     */     
+    HBufC* iPageInfo; 
+    
+    /**
+     * The area type of pointer 
+     *
+     */    
+    TInt iPointerArea;
+    
+    /**
+     * If navi buttons need to be shown
+     *
+     */
+    TBool iNaviBtnShown;
+
+    /**
+     * The bitmap of page up button.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iPageUpBmp;
+    
+    /**
+     * The mask bitmap of page up button.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iPageUpBmpMask;
+
+    /**
+     * The mask bitmap of dimmed page up button.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iPageUpDimBmpMask;
+    
+    /**
+     * The mask bitmap of dimmed page down button.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iPageDownBmp;
+
+    /**
+     * The bitmap of page down button.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iPageDownBmpMask;
+    
+    /**
+     * The mask bitmap of page down button.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iPageDownDimBmpMask;
+    
+    /**
+     * The bitmap of separator.
+     *
+     * Owned.
+     */
+    CFbsBitmap* iSeperationBmp;
+
+    /**
+     * The mask bitmap of separator.
+     *
+     * Owned.
+     */    
+    CFbsBitmap* iSeperationMaskBmp;
+    
+    /**
+     * The observer of the control
+     * 
+     * Now own
+     */
+    MPenUiWndEventObserver* iObserver;    
+    };
+
+
+/**
+* Set window priority.
+*/
+inline void CPenUiCandidateWnd::SetPriority( TInt aPriority )
+    {
+    Window().SetOrdinalPosition( 0, aPriority );    
+    }
+
+/**
+* Set the alienment of text in candidate.
+*/ 
+inline void CPenUiCandidateWnd::SetAlign(CGraphicsContext::TTextAlign aAlign)
+    {
+    iAlign = aAlign;
+    }
+
+/**
+* Set the init rect used for the top-left point of candidate.
+*/ 
+inline void CPenUiCandidateWnd::SetInitRect( const TRect& aInitRect )
+    {
+    iInitRect = aInitRect;
+    }
+    
+/**
+* Enable spell functionality of candidate
+*/ 
+inline void CPenUiCandidateWnd::EnableSpell( TBool aSpellEnabled )
+    {
+    iSpellEnabled = aSpellEnabled;
+    }
+
+/**
+* Enable minimal text width when calculates item width.
+*/ 
+inline void CPenUiCandidateWnd::EnableTextWidth( TBool aTextWidthEnabled )
+    {
+    iTextWidthEnabled = aTextWidthEnabled;
+    }
+
+#endif //R_RPENINPUTANIM_H
+
+// End of File
--- a/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h	Wed Oct 13 14:55:58 2010 +0300
@@ -196,37 +196,8 @@
     void UpdateCursor(TBool aOnFlag,const CFbsBitmap* aCursorBmp,const TRect& aPos);
     void SetPopupArea(const TRect& aRect, TBool aFlag);
     void UpdateICFArea(const CFbsBitmap* aBmp,const TPoint& aPos);
-    
-    /**
-     * Update the bubble area list
-     *
-     * @since S60 v5.0
-     * @param aCtrl the Ctrl's address
-     * @param aBmp the bubble bitmap's address
-     * @param aRect the bubble rect
-     * @param aFlag ETrue means add bubble area and 
-     *              EFalse means remove bubble area
-     * @return void
-     */
-    void UpdateChangedArea( const TUint32 aCtrl, 
-    	const CFbsBitmap* aBmp, const TRect& aRect, TBool aFlag );
-    
-    /**
-     * Update the bubble area list
-     *
-     * @since S60 v5.0
-     * @param aCtrl the Ctrl's address
-     * @param aBmp the bubble bitmap's address
-     * @param aMaskBmp the bubble mask bitmap's address
-     * @param aPos the bubble rect
-     * @param aFlag ETrue means add bubble area and 
-     *              EFalse means remove bubble area
-     * @return void
-     */
-    void UpdateBubble( const TUint32 aCtrl, 
-    	const CFbsBitmap* aBmp, const CFbsBitmap* aMaskBmp, 
-    	const TRect& aPos, TBool aFlag );
-    
+    void UpdateChangedArea(const CFbsBitmap* aBmp,const TRect& aRect,TBool aFlag);
+    void UpdateBubble(const CFbsBitmap* aBmp,const CFbsBitmap* aMaskBmp,const TRect& aPos,TBool aFlag);
     void Clean();
     
     void HandleNGASpecificSignal(TInt aEventType, const TDesC& aEventData);
@@ -241,18 +212,6 @@
      */
     void SetCursorColor();
     
-   /**
-    * Enable or disable transition effect.
-    * 
-    * @since Symbian^3
-    * @param aEnableGfxTransEffect, ETrue: enable transition effect
-    *                               EFalse: disable transition effect.
-    */
-    inline void EnableGfxTransEffect( TBool aEnableGfxTransEffect )
-    	{
-    	iEnableGfxTransEffect = aEnableGfxTransEffect;
-    	};
-    
 public: // Functions from base classes.
 
     /**
@@ -353,12 +312,6 @@
     CFbsBitmap* iChangedBmp;
     RPointerArray<CFbsBitmap> iBubblesArea;
     RPointerArray<CFbsBitmap> iBubblesMaskArea;
-    
-    /**
-     * An array of the Controls' addresses 
-     */
-    RArray<TUint32> iBubblesCtrl;
-    
     RArray<TRect> iBubblesPos;
     
     TPoint iCursorPos;
@@ -397,12 +350,6 @@
      */
     TRgb iCursorColor;
     
-    
-   /**
-    * If transition effect is enabled. 
-    */
-    TBool iEnableGfxTransEffect;
-
 friend class CCursorWindow;
     };
 class CInternalBkCtrl : public CCoeControl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndeventhandler.h	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef PENUIWNDEVENTHANDLER_H_
+#define PENUIWNDEVENTHANDLER_H_
+
+#include "penuiwndeventobserver.h"
+
+class CPeninputServer;
+
+/**
+ *  CPenUiWndEventHandler
+ *  
+ *  The pen ui window event handler
+ * 
+ */
+class CPenUiWndEventHandler : public CBase, public MPenUiWndEventObserver
+    {
+public:
+    /**
+     * Two-phased constructor.
+     * 
+     * @since symbian^3
+     * @param aServer the pointer to the owner of the control     
+     * @return Pointer to CPenUiCandidateWnd's instance
+     */
+    static CPenUiWndEventHandler* NewL( CPeninputServer* aServer );
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @since symbian^3
+     * @param aServer the pointer to the owner of the control     
+     * @return Pointer to CPenUiCandidateWnd's instance
+     */
+    static CPenUiWndEventHandler* NewLC( CPeninputServer* aServer );
+    
+    /**
+     * Destructor
+     */
+    ~CPenUiWndEventHandler();
+
+// From MPenUiWndEventObserver
+    /**
+     * Signal owner that there is an event
+     *
+     * @since symbian^3     
+     * @param aEventType The event type
+     * @param aEventData The event data
+     */
+    virtual void SignalOwner( TInt aEventType, const TDesC& aEventData );
+    
+    /**
+     * Handle layout command event.
+     *
+     * @since symbian^3  
+     * @param aCmd Command Id.
+     * @param aData Data for command.
+     */
+    virtual void HandleCommand( TInt aCmd, TUint8* aData );
+
+private:
+    
+    /**
+     * C++ Default Constructor 
+     */
+    CPenUiWndEventHandler( CPeninputServer* aServer );
+    
+    /**
+     * 2nd phase constructor. 
+     * 
+     * @since Symbain^3
+     * @return None
+     */
+    void ConstructL();
+    
+private:
+    /**
+     * The owner of the control
+     * 
+     * Now own
+     */
+    CPeninputServer* iServer;    
+    };
+
+#endif /* PENUIWNDEVENTHANDLER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndeventobserver.h	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef PENUIWNDEVENTOBSERVER_H_
+#define PENUIWNDEVENTOBSERVER_H_
+
+/**
+ *  MPenUiWndEventObserver
+ *  
+ *  The observer to handle pen ui window event
+ * 
+ */
+class MPenUiWndEventObserver
+    {
+public:
+    /**
+     * Signal owner that there is an event
+     *
+     * @since symbian^3     
+     * @param aEventType The event type
+     * @param aEventData The event data
+     */
+    virtual void SignalOwner( TInt aEventType, const TDesC& aEventData ) = 0;
+    
+    /**
+     * Handle layout command event.
+     *
+     * @since symbian^3  
+     * @param aCmd Command Id.
+     * @param aData Data for command.
+     */    
+    virtual void HandleCommand( TInt aCmd, TUint8* aData ) = 0;
+    };
+
+#endif /* PENUIWNDEVENTOBSERVER_H_ */
--- a/textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h	Wed Oct 13 14:55:58 2010 +0300
@@ -186,16 +186,6 @@
     void GetDSAState(TBool& aState);
 	
     void SetDiscreeptPop(const TRect& aArea);
-    
-    /**
-     * Update parameters of pointer event suppressor.
-     * 
-     * @since Symbian^3
-     * @param aParameters parameters of pointer event suppressor
-     * @return none
-     */
-    void UpdatePointerEventSuppressor( const TPointerEventSuppressorParameters& aParameters );
-
 private:
 
     /**
--- a/textinput/peninputarc/rom/peninputarc.iby	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/rom/peninputarc.iby	Wed Oct 13 14:55:58 2010 +0300
@@ -36,6 +36,7 @@
 
 S60_APP_AIF_RSC(peninputserver)
 data = \EPOC32\DATA\Z\resource\apps\peninputserver.RSC 	"resource\apps\peninputserver.rsc" 
+data = \EPOC32\DATA\Z\resource\apps\peninputserver.mif  "resource\apps\peninputserver.mif"
 
 ECOM_PLUGIN(gspeninputplugin.dll, gspeninputplugin.rsc)
 ECOM_PLUGIN(2000B5E7.dll, 2000B5E7.rss)
--- a/textinput/peninputarc/src/peninputanim/peninputanim.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputanim/peninputanim.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -142,6 +142,13 @@
     
     iFunctions->RegisterForNotifications(EDirectScreenAccess);
     iPointerEventSuppressor = CPenPointerEventSuppressor::NewL();
+    
+    //Setup pointer event suppressor with the parameters provided by UE.
+    //hard code is used here to minimize code changes
+    iPointerEventSuppressor->SetMaxTapMove( TSize( 10, 10 ) );
+    iPointerEventSuppressor->SetMaxTapDuration( 400000 );
+    iPointerEventSuppressor->SetMaxDownUpMove( TSize( 40 , 40 ) );
+    iPointerEventSuppressor->SetMaxDownUpDuration( 400000 );
     }
 
 
@@ -300,7 +307,7 @@
         default:
             {
             return EFalse;
-            }
+            }            
         }
     }
 
@@ -704,18 +711,6 @@
             SetDiscreeptPop(area); 
             }
             break;
-        case EPeninputOpUpdatePointerSuppressor:
-            {
-            TPointerEventSuppressorParameters parameters;
-            TPckg<TPointerEventSuppressorParameters> msgData( parameters );
-            msg->ReadL( KMsgSlot1, msgData );
-            
-            iPointerEventSuppressor->SetMaxTapMove( parameters.iMoveEventMaxMovement );
-            iPointerEventSuppressor->SetMaxTapDuration( parameters.iMoveEventTimeout );
-            iPointerEventSuppressor->SetMaxDownUpMove( parameters.iUpEventMaxMovement );
-            iPointerEventSuppressor->SetMaxDownUpDuration( parameters.iUpEventTimeout );
-            }
-            break;
         default:
             // unsupported opcode, panic the client
             {                
@@ -1072,7 +1067,7 @@
 // 
 void CPeninputAnim::StartTimer()
     {
-    if ( iIsActive && !iFlushTimer->IsActive())
+    if ( iIsActive && !iFlushTimer->IsActive() )
         {
         iFlushTimer->Start(
             KFlushTimerPeriod, 
--- a/textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -21,6 +21,7 @@
 const TInt KPenPointerEventSuppressorDefaultMinInterDragInterval = 0;
 const TInt KPenPointerEventSuppressorDefaultMovement = 6;
 
+
 const TInt KPenPointerEventSuppressorDefaultMaxDownUpDuration = 400000; // 0.4 seconds
 const TInt KPenPointerEventSuppressorDefaultDownUpMovement = 7;
 
@@ -48,6 +49,7 @@
 	iMaxDownUpMove.iHeight = KPenPointerEventSuppressorDefaultDownUpMovement;
   	}
 
+
 TBool CPenPointerEventSuppressor::SuppressPointerEvent( TPointerEvent& aPointerEvent )
 	{
 	switch ( aPointerEvent.iType )
@@ -94,17 +96,18 @@
 			break;
 			}
 		case TPointerEvent::EButton1Up:
-            {
-            TTime now;
-            now.HomeTime();
-            TPoint delta = aPointerEvent.iPosition - iDownPos;
-            if ( now.MicroSecondsFrom( iDownTime ) < iMaxDownUpDuration 
-                 && Abs( delta.iX ) < iMaxDownUpMove.iWidth 
-                 && Abs( delta.iY ) < iMaxDownUpMove.iHeight )
-                {
+		    {
+		    TTime now;
+		    now.HomeTime();
+		    TPoint delta = aPointerEvent.iPosition - iDownPos;
+		    if ( now.MicroSecondsFrom( iDownTime ) < iMaxDownUpDuration 
+		         && Abs( delta.iX ) < iMaxDownUpMove.iWidth 
+		         && Abs( delta.iY ) < iMaxDownUpMove.iHeight )
+		        {               
                 //within maximum movement and timeout, so move to position of down
                 aPointerEvent.iPosition = iDownPos;
-                }
+		        }
+		    
 			iTap = EFalse;
 			break;
 		    }
@@ -135,6 +138,7 @@
 	iMinInterDragInterval = aInterval;
 	}
 
+
 void CPenPointerEventSuppressor::SetMaxDownUpMove( TSize aMaxDownUpMove ) 
     { 
     iMaxDownUpMove = aMaxDownUpMove; 
@@ -144,3 +148,4 @@
     {
     iMaxDownUpDuration = aDuration; 
     }
+
--- a/textinput/peninputarc/src/peninputclient/penclientimpl.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputclient/penclientimpl.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -992,16 +992,6 @@
 TInt RPeninputServerImpl::AddPenUiActivationHandler(
                       MPenUiActivationHandler* aHandler,TInt aType)
     {
-    // To avoid add repeatedly
-    for (TInt i=0; i<iPenUiNotificationHandler.Count(); i++)
-        {
-        TUiNotificationHandler handler = iPenUiNotificationHandler[ i ];
-        if( handler.iHandler == aHandler )
-            {
-            return KErrNone;
-            }
-        }
-    
     iPenUiNotificationHandler.Append(TUiNotificationHandler(aHandler,aType));
     return KErrNone;            
     }
@@ -1336,7 +1326,7 @@
         }
 
     }    
-    
+
 // ---------------------------------------------------------------------------
 // CPeninputServerObserver::RunError
 // ---------------------------------------------------------------------------
@@ -1579,18 +1569,6 @@
     User::RequestComplete(iPendingRequest, aErr);
     }
 
-// ---------------------------------------------------------------------------
-// Enable or disable transition effect.
-// ---------------------------------------------------------------------------
-//
-void RPeninputServerImpl::EnableGfxTransEffect( TBool aEnable)
-    {
-    TPckg<TBool> msg( aEnable );
-    TIpcArgs arg;
-    arg.Set( KMsgSlot0, &msg );    
-    SendReceive(EPeninputRequestEnableGfxTransEffect, arg );  
-    }
-
 CWaitingServerAo::CWaitingServerAo(RPeninputServerImpl* aClient) 
                 : CActive(CActive::EPriorityStandard),
                   iClient(aClient)
--- a/textinput/peninputarc/src/peninputclient/peninputclient.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputclient/peninputclient.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -509,18 +509,5 @@
     {
 	iSingletonServer->EnablePriorityChangeOnOriChange(aEnabled);
 	}	
-
-// ---------------------------------------------------------------------------
-// Enable or disable transition effect.
-// ---------------------------------------------------------------------------
-//  
-EXPORT_C void RPeninputServer::EnableGfxTransEffect( TBool aEnable )
-    {
-    if ( iSingletonServer )
-        {
-        iSingletonServer->EnableGfxTransEffect( aEnable );
-        }
-    }
-
 //end of class RPeninputServer
 // End of File
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -66,8 +66,6 @@
         
 EXPORT_C CBubbleCtrl::~CBubbleCtrl()
     {
-	Close();
-	
     if ( iText )
         delete iText;
     
@@ -102,9 +100,7 @@
 		
     iForgroundBmp = aBmpId;
     iForgroundBmpMask = aMaskBmpId;
-    iBgSkinId = aBgSkinId;
-    
-    iNeedRedraw = ETrue;
+    iBgSkinId = aBgSkinId;    
     }
 
 EXPORT_C void CBubbleCtrl::Popup(const TRect& aRect)
@@ -232,14 +228,12 @@
             {
             struct SData
                 {
-            	TUint32 ctrl;
                 TBool flag;
                 TRect pos;
                 CFbsBitmap* bmp;
                 CFbsBitmap* mask;
                 } data;
                 
-            data.ctrl = (TUint32)this;
             data.flag = ETrue;
             data.pos = Rect();
             data.bmp = iBitmap;
@@ -278,9 +272,7 @@
     iForgroundBmpMask = aMaskBmpId;
     iFirstBmpId = aFirstBmpId;
     iMiddleBmpId =  aMiddleBmpId;
-    iLastBmpId = aLastBmpId;
-    
-    iNeedRedraw = ETrue;    
+    iLastBmpId = aLastBmpId;    
     }
 
 EXPORT_C void CBubbleCtrl::Close()
@@ -321,13 +313,11 @@
             {
             struct SData
                 {
-            	TUint32 ctrl;
                 TBool flag;
                 TRect pos;
                 CFbsBitmap* bmp;
                 } data;
                 
-            data.ctrl = (TUint32)this;
             data.flag = EFalse;
             data.pos = Rect();
             data.bmp = iBitmap;
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -59,7 +59,7 @@
     CFepUiBaseCtrl::BaseConstructL();
     
     //tap accuracy enhancement
-    if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) )
+    if( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
         {
         TMargins margins;
         UiLayout()->GetButtonExtResponseArea( margins );
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp	Wed Oct 13 14:55:58 2010 +0300
@@ -58,8 +58,6 @@
 SOURCE                  peninputfloatctrl.cpp 
 SOURCE                  peninputfloatbubble.cpp 
 SOURCE                  peninputaknvkbpreviewbubblerenderer.cpp
-SOURCE                  peninputtapsettingmanager.cpp
-SOURCE                  peninputpopupbubble.cpp
 
 userinclude             ../../inc/peninputlayoutcontrolinc
 
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -1064,7 +1064,6 @@
         }    
     
     TFontSpec fontSpec;
-    fontSpec = aFont->FontSpecInTwips();
     fontSpec.iHeight = aFont->HeightInPixels();
     CFont*  font;
     iCoeEnv->ScreenDevice()->ReleaseFont(CONST_CAST(CFont*, iFont));
@@ -1083,7 +1082,6 @@
     iCharFormat.iFontSpec.iHeight = iCoeEnv->ScreenDevice()->VerticalPixelsToTwips(iFontHeight);
     iCharFormat.iFontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightNormal);
     iCharFormat.iFontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
-    iCharFormat.iFontSpec.iTypeface = iFont->FontSpecInTwips().iTypeface;
 
     iRichText->ApplyCharFormatL(iCharFormat, iCharFormatMask, 0, iRichText->DocumentLength());    
     if( InlineStateOn() || AutoCompletionStateOn() )
@@ -2703,10 +2701,9 @@
                                                    TInt aMidPos,
                                                    TInt aEndPos)
     {
-    TBool changed = ( iAutoComplete != aAutoComplete );
     // If auto is on, we need draw every time, as grey part is not making the text changed
     // if we use traditional way to check change, auto part is not turn to black when grey part is there.
-    changed = iAutoComplete; 
+    TBool changed = ( aAutoComplete || iAutoComplete != aAutoComplete );
     iAutoComplete = aAutoComplete;
     
     if ( aAutoComplete )
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -106,7 +106,7 @@
     BaseConstructL();
     
     //tap accuracy enhancement
-    if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
+    if( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
         {
         TMargins margins;
         UiLayout()->GetKeyExtResponseArea( margins );
@@ -151,12 +151,10 @@
 				if( iKeyboard->ShiftIcon() &&
 					iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) == KKeyShiftCharacter )
 					{
-				    // Get the rect of the shift icon
-					TRect shiftIconDrawRect = iKeyboard->ShiftIconRect();
-					shiftIconDrawRect.Move( iKeyboard->Rect().iTl );
+					//CFbsBitGc* gc = GetGc();//static_cast<CFbsBitGc*>(BitGc());
 					AknPenInputDrawUtils::DrawColorIcon( iKeyboard->ShiftIcon(),
 														 *aGc,
-														 shiftIconDrawRect );	
+														 textLayout.TextRect() );	
 					}
 				else if(iKeyboard->StarIcon() &&
 						iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) == KKeyStarCharacter )
@@ -164,9 +162,7 @@
 					// Get the size of the icon
 					TSize starIconSize = iKeyboard->StarIcon()->Bitmap()->SizeInPixels();
 					// Get the rect of draw icon area
-					TRect drawIconRect = iKeyboard->StarIconRect();
-					drawIconRect.Move( iKeyboard->Rect().iTl );
-					
+					TRect drawIconRect = textLayout.TextRect();
 					// When the size of icon is different with the size of draw icon area,
 					// because the icon is drew from the left top coordinate of the draw
 					// icon area, so the icon will not be drew in the center. In this case,
@@ -1122,13 +1118,10 @@
     {
     struct SData
         {
-    	TUint32 ctrl;
         TBool flag;
         CFbsBitmap* bmp;
         TRect pos;
         } data;
-        
-    data.ctrl = (TUint32)this;
     data.flag = aFlag;
     data.bmp = Keyboard()->Bitmap();//aFlag ? Keyboard()->iBitmap : 0;
     data.pos = Rect();
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputpopupbubble.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,492 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for CPopupBubbleCtrl
-*
-*/
-
-
-#include <AknIconUtils.h>
-#include <AknsUtils.h>
-#include <AknUtils.h>
-#include <AknsDrawUtils.h> 
-
-#include "peninputpopupbubble.h"
-#include "peninputlayout.h"
-#include <peninputpluginutils.h>
-#include <imageconversion.h> 
-#include "peninputcmd.h"
-
-const TInt KShrinkSize = 10;
-const TInt KDefaultTextColorIndex = EAknsCIQsnTextColorsCG60;
-const TInt KAlpha = 200;
-
-// ======== MEMBER FUNCTIONS ========
-
-/*****************************************************************************/
-// Implementation of Class CPopupBubbleWnd
-
-// ---------------------------------------------------------------------------
-// c++ constructor
-// ---------------------------------------------------------------------------
-//
-CPopupBubbleWnd::CPopupBubbleWnd(CPopupBubbleCtrl& aParent)
-: iParent(aParent),
-iSupportTransparent(EFalse)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// c++ destructor
-// ---------------------------------------------------------------------------
-//
-CPopupBubbleWnd::~CPopupBubbleWnd()
-    {
-    //delete bitmaps    
-    iBitGc.ResetAndDestroy();
-    iDevice.ResetAndDestroy();
-    iBitmap.ResetAndDestroy();       
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian constructor
-// ---------------------------------------------------------------------------
-//
-CPopupBubbleWnd* CPopupBubbleWnd::NewL(const TRect& aRect, CPopupBubbleCtrl& aParent)
-    {
-    CPopupBubbleWnd* self = CPopupBubbleWnd::NewLC(aRect, aParent);
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian constructor
-// ---------------------------------------------------------------------------
-//
-CPopupBubbleWnd* CPopupBubbleWnd::NewLC(const TRect& aRect, CPopupBubbleCtrl& aParent)
-    {
-    CPopupBubbleWnd* self = new ( ELeave ) CPopupBubbleWnd(aParent);
-    CleanupStack::PushL( self );
-    self->ConstructL(aRect);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian second-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CPopupBubbleWnd::ConstructL(const TRect& aRect)
-    {
-    RWindowGroup& wg = CCoeEnv::Static()->RootWin();
-    CreateWindowL( wg );
-    SetComponentsToInheritVisibility();
-    Window().SetRequiredDisplayMode( EColor16MA );
-    TInt err = Window().SetTransparencyAlphaChannel();
-    iSupportTransparent = ( KErrNone == err );
-    Window().SetBackgroundColor( TRgb(0,0,0,0) );
-
-    //create bitmaps
-    for(TInt i = 0; i<ELastItem; i++)
-        {
-        CFbsBitmap* bitmap = new (ELeave) CFbsBitmap(); // Bitmap
-        CleanupStack::PushL(bitmap);
-        iBitmap.AppendL(bitmap); //take ownership
-        CleanupStack::Pop(bitmap);
-        iBitmap[i]->Create(aRect.Size(), EColor16MA);
-        
-        CFbsBitmapDevice* device = CFbsBitmapDevice::NewL(iBitmap[i]); //BitmapDevice
-        CleanupStack::PushL(device);
-        iDevice.AppendL(device); //take ownership
-        CleanupStack::Pop(device);
-        
-        CFbsBitGc* bitgc = CFbsBitGc::NewL(); // GraphicsContext
-        CleanupStack::PushL(bitgc);
-        iBitGc.AppendL(bitgc); //take ownership
-        CleanupStack::Pop(bitgc);
-        }
-    
-    MakeVisible( ETrue );    
-    SetRect(aRect);
-    ActivateL();
-    }
-
-// ---------------------------------------------------------------------------
-// Draw this control
-// ---------------------------------------------------------------------------
-//
-void CPopupBubbleWnd::Draw(const TRect& aRect) const
-    {    
-    if ( !iParent.AbleToDraw() )
-        {
-        return;
-        }
-    
-    CWindowGc& gc = SystemGc();
-
-    if ( !SupportTransparent() )
-        {
-        gc.Clear( aRect ); 
-        }    
-    
-    DrawTransparentBackground( aRect );
-
-    if ( iParent.iForgroundBmp )
-        {
-        TRect innerRect = aRect;
-        innerRect.Shrink( KShrinkSize, 0 );
-        
-        TRect iconRect;
-        iconRect.iTl = TPoint( innerRect.iTl.iX + iParent.iIconOffset.iWidth, 
-                innerRect.iTl.iY + iParent.iIconOffset.iHeight );
-        iconRect.SetWidth( iParent.iIconSize.iWidth );
-        iconRect.SetHeight( iParent.iIconSize.iHeight );
-        
-        if( iParent.iForgroundBmp->SizeInPixels() != iconRect.Size() )
-            {
-            AknIconUtils::SetSize( iParent.iForgroundBmp, iconRect.Size(), EAspectRatioNotPreserved );
-            }
-            
-        TRect srcRect( TPoint( 0, 0 ), iParent.iForgroundBmp->SizeInPixels() );
-        
-        if( iParent.iForgroundBmpMask )
-            {
-            if( iParent.iForgroundBmpMask->SizeInPixels() != iconRect.Size() )
-                {
-                AknIconUtils::SetSize( iParent.iForgroundBmpMask, iconRect.Size(), EAspectRatioNotPreserved);
-                }
-                        
-            gc.SetBrushStyle( CGraphicsContext::ENullBrush );
-            gc.BitBltMasked( iconRect.iTl, 
-                              iParent.iForgroundBmp, 
-                              srcRect,
-                              iParent.iForgroundBmpMask,
-                              EFalse);
-            }
-        else
-            {
-            gc.BitBlt( iconRect.iTl,
-                        iParent.iForgroundBmp,
-                        srcRect );
-            }            
-        }
-    
-    if ( iParent.iText && iParent.iText->Length() > 0 )
-        {
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
-        TAknLayoutText textLayout;
-        textLayout.LayoutText(Rect(), iParent.iTextFormat);
-        TRgb color( KRgbBlack );  // sane default for nonskinned case
-        if ( AknsUtils::AvkonSkinEnabled() )
-            {
-            AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
-                                   color, KAknsIIDQsnTextColors, iParent.iTextColorIndex );
-            }
-         textLayout.DrawText(gc, *(iParent.iText), ETrue, color);
-        }    
-    }
-
-// ---------------------------------------------------------------------------
-// Resize this control
-// ---------------------------------------------------------------------------
-//
-void CPopupBubbleWnd::SizeChanged()
-    {
-    TRect rect = Rect();        
-    
-    iRect[EMiddleItem] = rect;    
-    
-    iRect[EMiddleItem].Shrink( KShrinkSize, 0 );
-      
-    // horizon
-    if( rect.iTl.iY == iRect[EMiddleItem].iTl.iY && rect.iBr.iY == iRect[EMiddleItem].iBr.iY )
-        {
-        iRect[ELeftItem] = TRect( rect.iTl, TPoint( iRect[EMiddleItem].iTl.iX, iRect[EMiddleItem].iBr.iY ) );
-        iRect[ERightItem] = TRect( TPoint( iRect[EMiddleItem].iBr.iX, iRect[EMiddleItem].iTl.iY), rect.iBr );    
-        }
-    else if( rect.iTl.iX == iRect[EMiddleItem].iTl.iX &&  rect.iBr.iX == iRect[EMiddleItem].iBr.iX )
-        {
-        iRect[ELeftItem] = TRect( rect.iTl, TPoint( iRect[EMiddleItem].iBr.iX, iRect[EMiddleItem].iTl.iY ) );
-        iRect[ERightItem] = TRect( TPoint( iRect[EMiddleItem].iTl.iX, iRect[EMiddleItem].iBr.iY), rect.iBr );            
-        }     
-    
-    SizeImage( iParent.iFirstBmpId, iRect[ELeftItem], iBitmap[ELeftItem], iDevice[ELeftItem], iBitGc[ELeftItem] );
-    SizeImage( iParent.iMiddleBmpId, iRect[EMiddleItem], iBitmap[EMiddleItem], iDevice[EMiddleItem], iBitGc[EMiddleItem] );
-    SizeImage( iParent.iLastBmpId, iRect[ERightItem], iBitmap[ERightItem], iDevice[ERightItem], iBitGc[ERightItem] );
-    }
-
-// ---------------------------------------------------------------------------
-// Handle resource change
-// ---------------------------------------------------------------------------
-//
-void CPopupBubbleWnd::HandleResourceChange( TInt aType )
-    {
-    if ( aType == KAknsMessageSkinChange )
-        {
-        // When skin changes, we need to update local bitmaps
-        SizeChanged();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Size images used for drawing
-// ---------------------------------------------------------------------------
-//
-void CPopupBubbleWnd::SizeImage( TAknsItemID aId, TRect aRect, CFbsBitmap* aBitmap, CFbsBitmapDevice* aDevice, CFbsBitGc* aBitGc )
-    {     
-    MAknsSkinInstance* instance = AknsUtils::SkinInstance();
-    TAknsItemType type = instance->GetCachedItemData( aId )->Type();
-    if ( type == EAknsITMaskedBitmap )
-        {
-        CAknsMaskedBitmapItemData* itemData =
-                static_cast<CAknsMaskedBitmapItemData*> ( instance->GetCachedItemData( aId ) );
-
-        AknIconUtils::SetSize( itemData->Bitmap(), aRect.Size(), EAspectRatioNotPreserved );
-        AknIconUtils::SetSize( itemData->Mask(), aRect.Size(), EAspectRatioNotPreserved );
-
-        TDisplayMode bitmapmode = itemData->Bitmap()->DisplayMode();
-        TDisplayMode maskmode = itemData->Mask()->DisplayMode();
-
-        aBitmap->Resize( aRect.Size() );
-        aDevice->Resize( aRect.Size() );
-        aBitGc->Activate( aDevice );
-
-        TRect entireImage( TPoint(0, 0), itemData->Bitmap()->SizeInPixels() );
-        if (itemData->Mask())
-            {
-            aBitGc->BitBltMasked( TPoint(0, 0), itemData->Bitmap(), entireImage,
-                    itemData->Mask(), ETrue );
-            }
-        else
-            {
-            aBitGc->BitBlt( TPoint(0, 0), itemData->Bitmap() );
-            }
-
-        TInt size = aBitmap->DataSize();
-        TUint32* data = aBitmap->DataAddress();
-        TDisplayMode mode = aBitmap->DisplayMode();
-
-        iBitmap[ETempItem]->Resize( aRect.Size() );
-        iDevice[ETempItem]->Resize( aRect.Size() );
-        iBitGc[ETempItem]->Activate( iDevice[ETempItem] );
-        iBitGc[ETempItem]->BitBlt( TPoint(0, 0), itemData->Mask() );
-        
-        TUint32* mask_data = iBitmap[ETempItem]->DataAddress(); 
-         
-         if (mode == EColor16MA)
-             {
-             for (TInt i = 0; i < size/sizeof( TUint32 ); i++)
-                 {
-                 TRgb colour;
-                 colour.SetInternal( *(mask_data + i) );
-                 if (colour != TRgb( 0x00, 0x00, 0x00, 0xFF ))
-                     {
-                     colour.SetInternal( *(data + i) );
-                     colour.SetAlpha( KAlpha ); //semi transparent
-                     *(data + i) = colour.Internal();
-                     }
-                 else
-                     {
-                     colour.SetInternal( *(data + i) );
-                     colour.SetAlpha( 0x00 ); //fully transparent
-                     *(data + i) = colour.Internal();                   
-                     }
-                 }           
-             }
-        }
-    } 
-
-// ---------------------------------------------------------------------------
-// Draw transparent background
-// ---------------------------------------------------------------------------
-//
-
-void CPopupBubbleWnd::DrawTransparentBackground( const TRect& aRect ) const
-{
-    CWindowGc& gc = SystemGc();
-
-    for( TInt i=0; i<ELastItem; i++ )
-        {
-        if ( i == ETempItem )//skip temporary bitmap
-            {
-            continue;
-            }
-        if ( iBitmap[i] )//draw other bitmaps
-            {
-            gc.BitBlt( iRect[i].iTl, iBitmap[i] );
-            }
-        }
-}
-
-/*****************************************************************************/
-// Implementation of Class CPopupBubbleCtrl
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::NewL
-// Symbian constructor
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//               
-EXPORT_C CPopupBubbleCtrl* CPopupBubbleCtrl::NewL( const TRect& aRect,
-                               CFepUiLayout* aUiLayout,
-                               TInt aCtrlId )
-    {
-    CPopupBubbleCtrl* ctrl = new (ELeave)CPopupBubbleCtrl( aRect,aUiLayout,aCtrlId );
-    CleanupStack::PushL( ctrl );
-    ctrl->BaseConstructL();
-    
-    CleanupStack::Pop( ctrl );
-    return ctrl;
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::CPopupBubbleCtrl
-// C++  constructor
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPopupBubbleCtrl::CPopupBubbleCtrl( const TRect& aRect,
-                         CFepUiLayout* aUiLayout,
-                         TInt aCtrlId )
-    :CFepUiBaseCtrl( aRect,aUiLayout,aCtrlId ),
-     iTextColorIndex( KDefaultTextColorIndex )
-    {
-    SetControlType( ECtrlButton );
-    SetHidenFlag( ETrue );
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::CPopupBubbleCtrl
-// C++  destructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CPopupBubbleCtrl::~CPopupBubbleCtrl()
-    {
-    if ( iText )
-        {
-        delete iText;
-        iText = NULL;
-        }      
-    if( iForgroundBmp )
-        {
-        delete iForgroundBmp;
-        iForgroundBmp = NULL;
-        }
-    if( iForgroundBmpMask )
-        {
-        delete iForgroundBmpMask;
-        iForgroundBmpMask = NULL;
-        }        
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::SetBitmapParamL
-// Set bitmap parameters used fot this bubble
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPopupBubbleCtrl::SetBitmapParamL(
-                                    CFbsBitmap* aBmpId,
-                                    CFbsBitmap* aMaskBmpId,     
-                                 TAknsItemID aFirstBmpId,
-                                 TAknsItemID aMiddleBmpId,
-                                 TAknsItemID aLastBmpId)
-    {
-    if( iForgroundBmp )
-        {
-        delete iForgroundBmp;
-        iForgroundBmp = NULL;
-        }
-    if( iForgroundBmpMask )
-        {
-        delete iForgroundBmpMask;
-        iForgroundBmpMask = NULL;
-        }    
-        
-    iForgroundBmp = aBmpId;
-    iForgroundBmpMask = aMaskBmpId;
-    
-    iFirstBmpId = aFirstBmpId;
-    iMiddleBmpId =  aMiddleBmpId;
-    iLastBmpId = aLastBmpId;
-    
-    delete iWndControl;
-    iWndControl = NULL;
-    iWndControl = CPopupBubbleWnd::NewL( Rect(), *this );
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::Hide
-// Hide bubble control
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPopupBubbleCtrl::Hide( TBool aFlag )
-    {
-    if ( iWndControl )
-        {
-        iWndControl->MakeVisible( !aFlag );
-        }
-    CFepUiBaseCtrl::Hide( aFlag );    
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::Draw
-// Draw bubble control
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPopupBubbleCtrl::Draw()
-    {
-    if( !AbleToDraw() )
-        {
-        return;
-        }    
-    
-    if( iWndControl )
-        {
-        iWndControl->DrawDeferred();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::Move
-// Move bubble control
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPopupBubbleCtrl::Move( const TPoint& aOffset )
-    {
-    //leave empty
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::SetTextFormat
-// Set text format used for text drawing
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPopupBubbleCtrl::SetTextFormat( TAknTextLineLayout aTextFormat )
-    {
-    iTextFormat = aTextFormat;                
-    }
-
-// ---------------------------------------------------------------------------
-// CPopupBubbleCtrl::SetTextL
-// Set bubble text
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CPopupBubbleCtrl::SetTextL( const TDesC& aText )
-    {
-    delete iText;
-    iText = NULL;
-    iText = aText.AllocL();
-    }
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputtapsettingmanager.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,385 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for CFepUiLayout
-*
-*/
-
-
-#include "peninputtapsettingmanager.h"
-
-#include <centralrepository.h>
-#include <AknFepGlobalEnums.h>
-#include <AknFepInternalCRKeys.h>
-
-_LIT( KSeparatorComma, "," );
-
-const TInt KTextBufferLength = 128;
-
-const TInt KDefaultMovement = 5;
-const TInt KDefaultTimeout = 200000;
-const TInt KDefaultMargin = 9;
-
-// ---------------------------------------------------------------------------
-//  Symbian Constructor
-// ---------------------------------------------------------------------------
-// 
-CPeninputTapSettingManager* CPeninputTapSettingManager::NewL()
-    {
-    CPeninputTapSettingManager* self = CPeninputTapSettingManager::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//  Symbian Constructor
-// ---------------------------------------------------------------------------
-// 
-CPeninputTapSettingManager* CPeninputTapSettingManager::NewLC()
-    {
-    CPeninputTapSettingManager* self = new ( ELeave ) CPeninputTapSettingManager();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//  c++ destructor
-// ---------------------------------------------------------------------------
-// 
-CPeninputTapSettingManager::~CPeninputTapSettingManager()
-    {
-
-    }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout
-// ---------------------------------------------------------------------------
-// 
-void CPeninputTapSettingManager::Load( TInt aLayoutType )
-    {
-    TRAPD( err, LoadFromRepositoryL( aLayoutType ) );
-    if ( err != KErrNone )
-        {
-        LoadDefault();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::Load( TInt aLayoutType, const TDesC& aFileName )
-    {
-    TRAPD( err, LoadFromFileL( aLayoutType, aFileName ) );
-    if ( err != KErrNone )
-        {
-        LoadDefault();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Get configuration of PointerMove event suppressor
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetPointerMoveSuppressor( TSize& aMaxMovement, 
-                                                           TInt& aTimeout )
-    {
-    aMaxMovement = iPointerMoveMaxMovement;
-    aTimeout = iPointerMoveTimeout; 
-    }
-
-// ---------------------------------------------------------------------------
-// Get configuration of PointerUp event suppressor
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetPointerUpSuppressor( TSize& aMaxMovement, 
-                                                         TInt& aTimeout )
-    {
-    aMaxMovement = iPointerUpMaxMovement;
-    aTimeout = iPointerUpTimeout;
-    }
-
-// ---------------------------------------------------------------------------
-// Get extra response area of virtual key controls.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetKeyExtResponseArea( TMargins& aMargins )
-    {
-    aMargins = iKeyMargins;
-    }
-
-// ---------------------------------------------------------------------------
-// Get extra response area of button controls.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::GetButtonExtResponseArea( TMargins& aMargins )
-    {
-    aMargins = iButtonMargins;
-    }
-
-// ---------------------------------------------------------------------------
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CPeninputTapSettingManager::CPeninputTapSettingManager()
-    {
-    
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian second-phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout.
-// From Repository.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::LoadFromRepositoryL( TInt aLayoutType )
-    {
-    TUint32 uidButtonExtMargins   = 0;
-    TUint32 uidKeyCtrlExtMargins  = 0;
-    TUint32 uidPointerMoveMaxMove = 0;
-    TUint32 uidPointerMoveTimeout = 0;
-    TUint32 uidPointerUpMaxMove   = 0;
-    TUint32 uidPointerUpTimeout   = 0;
-
-    switch( aLayoutType )
-        {
-        case EPluginInputModeFSQ:
-            {
-            uidButtonExtMargins   = KAknFepTapAccuracyFsqButtonExtMargins;
-            uidKeyCtrlExtMargins  = KAknFepTapAccuracyFsqKeyCtrlExtMargins;
-            uidPointerMoveMaxMove = KAknFepTapAccuracyFsqPointerMoveMaxMovement;
-            uidPointerMoveTimeout = KAknFepTapAccuracyFsqPointerMoveTimeout;
-            uidPointerUpMaxMove   = KAknFepTapAccuracyFsqPointerUpMaxMovement;
-            uidPointerUpTimeout   = KAknFepTapAccuracyFsqPointerUpTimeout;
-            }
-            break;
-        case EPluginInputModePortraitFSQ:
-            {
-            uidButtonExtMargins   = KAknFepTapAccuracyPFsqButtonExtMargins;
-            uidKeyCtrlExtMargins  = KAknFepTapAccuracyPFsqKeyCtrlExtMargins;
-            uidPointerMoveMaxMove = KAknFepTapAccuracyPFsqPointerMoveMaxMovement;
-            uidPointerMoveTimeout = KAknFepTapAccuracyPFsqPointerMoveTimeout;
-            uidPointerUpMaxMove   = KAknFepTapAccuracyPFsqPointerUpMaxMovement;
-            uidPointerUpTimeout   = KAknFepTapAccuracyPFsqPointerUpTimeout;
-            }
-            break;
-        case EPluginInputModeFingerHwr:
-            {
-            uidButtonExtMargins   = KAknFepTapAccuracyFhwrButtonExtMargins;
-            uidKeyCtrlExtMargins  = KAknFepTapAccuracyFhwrKeyCtrlExtMargins;
-            uidPointerMoveMaxMove = KAknFepTapAccuracyFhwrPointerMoveMaxMovement;
-            uidPointerMoveTimeout = KAknFepTapAccuracyFhwrPointerMoveTimeout;
-            uidPointerUpMaxMove   = KAknFepTapAccuracyFhwrPointerUpMaxMovement;
-            uidPointerUpTimeout   = KAknFepTapAccuracyFhwrPointerUpTimeout;
-            }
-            break;            
-        default:
-            {
-            uidButtonExtMargins   = KAknFepTapAccuracyDefaultButtonExtMargins;
-            uidKeyCtrlExtMargins  = KAknFepTapAccuracyDefaultKeyCtrlExtMargins;
-            uidPointerMoveMaxMove = KAknFepTapAccuracyDefaultPointerMoveMaxMovement;
-            uidPointerMoveTimeout = KAknFepTapAccuracyDefaultPointerMoveTimeout;
-            uidPointerUpMaxMove   = KAknFepTapAccuracyDefaultPointerUpMaxMovement;
-            uidPointerUpTimeout   = KAknFepTapAccuracyDefaultPointerUpTimeout;
-            }
-        }
-    
-    CRepository* repository = CRepository::NewL( KCRUidAknFep );
-    TBuf<KTextBufferLength> str;
-    TInt num = 0;
-    TPoint point;
-    TMargins margins;
-    
-    //pointer move event
-    repository->Get( uidPointerMoveTimeout, num );
-    repository->Get( uidPointerMoveMaxMove, str );
-    ParsePoints( point, str );
-    
-    iPointerMoveTimeout = num;
-    iPointerMoveMaxMovement.iWidth = point.iX;
-    iPointerMoveMaxMovement.iHeight = point.iY;
-    
-    //pointer up event
-    repository->Get( uidPointerUpTimeout, num );
-    repository->Get( uidPointerUpMaxMove, str );
-    ParsePoints( point, str );
-    
-    iPointerUpTimeout = num;
-    iPointerUpMaxMovement.iWidth = point.iX;
-    iPointerUpMaxMovement.iHeight = point.iY;   
-    
-    //key control
-    repository->Get( uidKeyCtrlExtMargins, str );
-    ParseMargins( margins, str );
-    iKeyMargins = margins;
-    
-    //button control
-    repository->Get( uidButtonExtMargins, str );
-    ParseMargins( margins, str );
-    iButtonMargins = margins;
-    
-    delete repository;
-    }
-
-// ---------------------------------------------------------------------------
-// Load all parameters of tap accuracy enhancement for specified layout.
-// From file.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::LoadFromFileL( TInt /*aLayoutType*/, 
-                                                const TDesC& /*aFileName*/ )
-    {
-    //reserved
-    }
-
-// ---------------------------------------------------------------------------
-// Load default parameters.
-// ---------------------------------------------------------------------------
-//
-void CPeninputTapSettingManager::LoadDefault()
-    {
-    iPointerMoveMaxMovement = TSize( KDefaultMovement, KDefaultMovement );
-    iPointerMoveTimeout     = KDefaultTimeout;
-    
-    iPointerUpMaxMovement   = TSize( KDefaultMovement, KDefaultMovement );
-    iPointerUpTimeout       = KDefaultTimeout;
-    
-    iKeyMargins.iTop        = KDefaultMargin;
-    iKeyMargins.iLeft       = KDefaultMargin;
-    iKeyMargins.iBottom     = KDefaultMargin;
-    iKeyMargins.iRight      = KDefaultMargin;
-    
-    iButtonMargins.iTop     = KDefaultMargin;
-    iButtonMargins.iLeft    = KDefaultMargin;
-    iButtonMargins.iBottom  = KDefaultMargin;
-    iButtonMargins.iRight   = KDefaultMargin;
-    }
-
-// ---------------------------------------------------------------------------
-// parse a TPoint from a comma separated values string.
-// ---------------------------------------------------------------------------
-//
-TInt CPeninputTapSettingManager::ParsePoints( TPoint& aPoint, const TDesC& aText )
-    {
-    TPtrC tokenizer( aText );
-    TInt pos = tokenizer.Find( KSeparatorComma );
-    if ( pos == KErrNotFound )
-        {
-        TInt value = 0;
-        TLex converter( tokenizer );
-        TInt error = converter.Val( value );
-        aPoint.iX = ( KErrNone == error ? value : 0 );
-        aPoint.iY = aPoint.iX;
-        return 0;
-        }
-
-    TInt value = 0;
-   
-    TLex converter( tokenizer.Left( pos ) );
-    TInt error = converter.Val( value );
-    aPoint.iX = ( KErrNone == error ? value : 0 );
-    
-    converter = TLex( tokenizer.Mid( pos + 1 ) );
-    error = converter.Val( value );
-    aPoint.iY = ( KErrNone == error ? value : 0 );
-    
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-// parse a TMargins from a comma separated values string.
-// ---------------------------------------------------------------------------
-//
-TInt CPeninputTapSettingManager::ParseMargins( TMargins& aMargins, const TDesC& aText )
-    {
-    RArray<TInt> values;
-    
-    TPtrC tokenizer( aText );
-    TInt pos = 0;
-    while ( pos != KErrNotFound )
-        {
-        pos = tokenizer.Find( KSeparatorComma );
-            
-        TPtrC substr = ( pos == KErrNotFound ) ? tokenizer : tokenizer.Left( pos );
-        TInt value = 0;
-        TLex converter( substr );
-        TInt error = converter.Val( value );
-        values.Append( KErrNone == error ? value : 0 );
-        
-        if ( pos != KErrNotFound )
-            {
-            TPtrC right = tokenizer.Mid( pos + 1 );
-            tokenizer.Set( right );
-            }
-        }
-    
-    TInt count = values.Count();
-    
-    //one value, applies to all sides
-    if(  count == 1  )
-        {
-        aMargins.iTop    = values[0];
-        aMargins.iLeft   = values[0];
-        aMargins.iBottom = values[0];
-        aMargins.iRight  = values[0];
-        }
-    
-    //two values, first one specifies margins of top and bottom,
-    //the second specifies left and right. 
-    else if(  count == 2 )
-        {
-        aMargins.iTop    = values[0];
-        aMargins.iLeft   = values[1];
-        aMargins.iBottom = values[0];
-        aMargins.iRight  = values[1];
-        }
-
-    //three values, first is top, second is the left and right, last is bottom. 
-    else if(  count == 3 )
-        {
-        aMargins.iTop    = values[0];
-        aMargins.iLeft   = values[1];
-        aMargins.iBottom = values[1];
-        aMargins.iRight  = values[2];
-        }
-    
-    //four values, specify top,left,bottom and right respectively
-    else if ( count >= 4 )
-        {
-        aMargins.iTop    = values[0];
-        aMargins.iLeft   = values[1];
-        aMargins.iBottom = values[2];
-        aMargins.iRight  = values[3];
-        }
-    
-    else
-        {
-        aMargins.iTop    = 0;
-        aMargins.iLeft   = 0;
-        aMargins.iBottom = 0;
-        aMargins.iRight  = 0;
-        }
-    
-    values.Close();
-    return count;
-    }
-
-//end of file
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -38,7 +38,6 @@
 
 #include <AknFepGlobalEnums.h>
 #include <layoutmetadata.cdl.h>
-#include "peninputtapsettingmanager.h"
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -90,20 +89,20 @@
     iExtension->iSkinInstance = AknsUtils::SkinInstance();
     iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance();
 	iExtension->iDisableDrawing = EFalse;
-
-    TInt inputMode = PenInputType();
-    TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported(
-            KFeatureIdFfVirtualFullscrPortraitQwertyInput );
-
-    //detect real type of two qwerty layout
-    if ( inputMode == EPluginInputModeFSQ && isPortraitFSQEnabled
-         && !Layout_Meta_Data::IsLandscapeOrientation() )
-        {
+	
+	TInt inputMode = PenInputType();
+	TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported( 
+	        KFeatureIdFfVirtualFullscrPortraitQwertyInput );
+	
+	//detect real type of two qwerty layout
+	if ( inputMode == EPluginInputModeFSQ && 
+	     isPortraitFSQEnabled && !Layout_Meta_Data::IsLandscapeOrientation() )
+	    {
         inputMode = EPluginInputModePortraitFSQ;
-        }
-
-    //load settings of tap accuracy enhancement
-    LoadTapAccuracySettingsL( inputMode );
+	    }
+	
+	//load settings of tap accuracy enhancement
+	LoadTapAccuracySettings( inputMode );
     }
 
 // ---------------------------------------------------------------------------
@@ -493,22 +492,7 @@
     iRootCtrl->OnActivate();
 #ifdef RD_TACTILE_FEEDBACK  
     iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
-#endif // RD_TACTILE_FEEDBACK
-    
-    //update pointer event suppressor
-    if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) )
-        {
-        TPointerEventSuppressorParameters parameters;
-        parameters.iMoveEventMaxMovement = iExtension->iPointerMoveSuppressMaxMovement;
-        parameters.iMoveEventTimeout = iExtension->iPointerMoveSuppressTimeout;
-        parameters.iUpEventMaxMovement = iExtension->iPointerUpSuppressMaxMovement;
-        parameters.iUpEventTimeout = iExtension->iPointerUpSuppressTimeout;
-        
-        TPtrC data( reinterpret_cast<TUint16*>(&parameters),
-                    sizeof(TPointerEventSuppressorParameters) / 2 );
-        
-        SignalOwner( ESignalUpdatePointerSuppressor, data );
-        }
+#endif // RD_TACTILE_FEEDBACK      
     }
     
 // ---------------------------------------------------------------------------
@@ -979,21 +963,46 @@
 // Load tap accuracy enhancement settings according to the specified input mode.
 // ---------------------------------------------------------------------------
 //
-void CFepUiLayout::LoadTapAccuracySettingsL( TInt alayoutType )
+void CFepUiLayout::LoadTapAccuracySettings( TInt aInputMode )
     {
-    CPeninputTapSettingManager* manager = CPeninputTapSettingManager::NewL();
-    
-    manager->Load( alayoutType );
-    manager->GetPointerMoveSuppressor( iExtension->iPointerMoveSuppressMaxMovement, 
-                                      iExtension->iPointerMoveSuppressTimeout );
-
-    manager->GetPointerUpSuppressor( iExtension->iPointerUpSuppressMaxMovement, 
-                                      iExtension->iPointerUpSuppressTimeout );
-    
-    manager->GetKeyExtResponseArea( iExtension->iKeyExtResponseMargins );
-    manager->GetButtonExtResponseArea( iExtension->iButtonExtResponseMargins );
-    
-    delete manager;
+    //config tap accuracy enhancement with the parameters provided by UE.
+    //hard code is used here to minimize code changes
+    if ( aInputMode == EPluginInputModeFSQ )
+        {
+        iExtension->iKeyExtResponseMargins.iTop    = 20;
+        iExtension->iKeyExtResponseMargins.iLeft   = 20;
+        iExtension->iKeyExtResponseMargins.iBottom = 20;
+        iExtension->iKeyExtResponseMargins.iRight  = 20;
+        
+        iExtension->iButtonExtResponseMargins.iTop    = 20;
+        iExtension->iButtonExtResponseMargins.iLeft   = 20;
+        iExtension->iButtonExtResponseMargins.iBottom = 20;
+        iExtension->iButtonExtResponseMargins.iRight  = 20;
+        }
+    else if ( aInputMode == EPluginInputModePortraitFSQ )
+        {
+        iExtension->iKeyExtResponseMargins.iTop    = 11;
+        iExtension->iKeyExtResponseMargins.iLeft   = 11;
+        iExtension->iKeyExtResponseMargins.iBottom = 11;
+        iExtension->iKeyExtResponseMargins.iRight  = 11;
+        
+        iExtension->iButtonExtResponseMargins.iTop    = 11;
+        iExtension->iButtonExtResponseMargins.iLeft   = 11;
+        iExtension->iButtonExtResponseMargins.iBottom = 11;
+        iExtension->iButtonExtResponseMargins.iRight  = 11;    
+        }
+    else
+        {
+        iExtension->iKeyExtResponseMargins.iTop    = 10;
+        iExtension->iKeyExtResponseMargins.iLeft   = 10;
+        iExtension->iKeyExtResponseMargins.iBottom = 10;
+        iExtension->iKeyExtResponseMargins.iRight  = 10;
+        
+        iExtension->iButtonExtResponseMargins.iTop    = 10;
+        iExtension->iButtonExtResponseMargins.iLeft   = 10;
+        iExtension->iButtonExtResponseMargins.iBottom = 10;
+        iExtension->iButtonExtResponseMargins.iRight  = 10;     
+        }
     }
 
 //end of file
--- a/textinput/peninputarc/src/peninputserverapp/data/peninputserver.rss	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/data/peninputserver.rss	Wed Oct 13 14:55:58 2010 +0300
@@ -26,11 +26,17 @@
 #include <avkon.rh>
 #include <avkon.mbg>
 
+#include <peninputserver.mbg>
+#include <aknsconstants.hrh>
+#include "peninputcommonlayout.rh"
+#include <peninputcommonctrls.loc>
+
 #ifdef RD_SCALABLE_UI
 #include <appinfo.rh>
 #endif
 
 #include <data_caging_paths_strings.hrh>
+#define AKN_SERVER_BMP "z:\\resource\\apps\\peninputserver.mbm" 
 
 //  CONSTANTS
 
@@ -56,6 +62,45 @@
         caption = "peninputserver";
     };
 }
+
+RESOURCE TBUF r_peninput_server_finger_spell {buf = qtn_t9_match_selection_list;}
+
+RESOURCE AKN_FEP_SCROLLABLE_LIST_IMAGE r_peninput_server_candidate_list
+    {
+    bmpfile = AKN_SERVER_BMP;
+    imgmajorskinid = EAknsMajorGeneric;
+    pageup = r_peninput_server_candidate_list_pageup;
+    pagedown = r_peninput_server_candidate_list_pagedown;
+    listsep = EMbmPeninputserverQgn_graf_line_primary_horizontal_dashed;
+    listsepmsk = EMbmPeninputserverQgn_graf_line_primary_horizontal_dashed_mask;
+    listspeskinid = EAknsMinorGenericQgnGrafLinePrimaryHorizontalDashed;
+    }
+
+RESOURCE AKN_FEP_COMMON_BUTTON_IMAGE r_peninput_server_candidate_list_pageup
+    {
+    bmpfile = AKN_SERVER_BMP;
+    imgmajorskinid = EAknsMajorGeneric;
+    
+    forground = EMbmPeninputserverQgn_indi_itut_cursor_up;
+    forgroundmsk = EMbmPeninputserverQgn_indi_itut_cursor_up_mask;
+    forgroundskinid = EAknsMinorGenericQgnIndiItutCursorUp;
+    }
+    
+RESOURCE AKN_FEP_COMMON_BUTTON_IMAGE r_peninput_server_candidate_list_pagedown
+    {
+    bmpfile = AKN_SERVER_BMP;
+    imgmajorskinid = EAknsMajorGeneric;
+    
+    forground = EMbmPeninputserverQgn_indi_itut_cursor_down;
+    forgroundmsk = EMbmPeninputserverQgn_indi_itut_cursor_down_mask;
+    forgroundskinid = EAknsMinorGenericQgnIndiItutCursorDown;
+    }
+
+RESOURCE TBUF r_peninput_server_candidate_list_page_num
+    {
+    buf = "%0N/%1N";
+    }
+
 #endif
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputserverapp/iconlist.txt	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,3 @@
+-c8,8 qgn_indi_itut_cursor_up.svg
+-c8,8 qgn_indi_itut_cursor_down.svg
+-c8,8 qgn_graf_line_primary_horizontal_dashed.svg
\ No newline at end of file
--- a/textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -503,21 +503,4 @@
     AddAnimCommand(cmd);
     return ETrue;		
 	}
-
-// ---------------------------------------------------------------------------
-// CPeninputAnimObj::UpdatePointerEventSuppressor()
-// Update parameters of pointer event suppressor.
-// ---------------------------------------------------------------------------
-//
-void CPeninputAnimObj::UpdatePointerEventSuppressor( 
-        const TPointerEventSuppressorParameters& aParameters )
-    {
-    TAnimUpdatePointerEventSuppressorCmd* cmd = 
-            new TAnimUpdatePointerEventSuppressorCmd( iAnim, aParameters );
-    
-    if ( cmd != NULL )
-        {
-        AddAnimCommand( cmd );
-        }
-    }
 //end of file
--- a/textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -362,17 +362,3 @@
     iAnim.SetDiscreeptPop(iArea);
     return ETrue;
 	}
-
-TAnimUpdatePointerEventSuppressorCmd::TAnimUpdatePointerEventSuppressorCmd( 
-        RPeninputAnim& aAnim, const TPointerEventSuppressorParameters& aParameters )
-        : TAnimCmd( aAnim ), iParameters( aParameters )
-    {
-    
-    }
-
-TBool TAnimUpdatePointerEventSuppressorCmd::ExecuteAnimCommand() const
-    {
-    iAnim.UpdatePointerEventSuppressor( iParameters );
-    return ETrue;
-    }
-
--- a/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -45,15 +45,20 @@
 #include <AknDef.h>
 #include <aknfeppeninputenums.h>
 #include <aknappui.h> 
+#include <peninputcmdparam.h>
 
 #include "peninputcrpclient.h"
 #include <avkondomainpskeys.h>
+#include "penuicandidatewnd.h"
+#include "penuiwndeventobserver.h"
+#include "penuiwndeventhandler.h"
 //#define __WND_TEST_
 
 // CONSTANTS
 const TSize KInitialPeninputSize= TSize( 10, 10 );
 const TInt KMsgQueueLen = 1000;
 const TInt KMsgResponseQueueLen = 10;
+const TInt KLiftupPriority = 10;
 
 const TInt KWsSessionFlushPerioid = 50000;//50ms
 const TInt KInvalidValue = -1;
@@ -62,14 +67,6 @@
 // is used for both orientation in Pen Input server side code.
 const TInt KPenInputSrvPrtFsqUiId = 0x20026837;
 
-// The UID of the PopupClock application
-const TInt KBigClockUid =  0x2000FDC3;
-
-// The UID of the SreenSaver application
-const TInt KScreenSaverUid =  0x100056CF;
-
-// The UID of the AutoLock application
-const TInt KAutoLockUid = 0x100059B5;
 
 enum TActivationFlag
 	{
@@ -226,8 +223,8 @@
 void CPeninputServer::ConstructL( )
     {
 #ifdef RD_TACTILE_FEEDBACK     
-	FeatureManager::InitializeLibL();
-   	iSupportFeedback = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
+    FeatureManager::InitializeLibL();
+    iSupportFeedback = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
 
 #endif //RD_TACTILE_FEEDBACK   
     
@@ -250,24 +247,26 @@
     iHardwareLayoutChangeWatcher->StartWatching();
     iSoftwareLayoutChangeWatcher->StartWatching();
 
-	RWindowGroup& rootWin = CCoeEnv::Static()->RootWin();
-	rootWin.EnableFocusChangeEvents (); // For cover UI/status pane refresh problems
-	rootWin.EnableGroupListChangeEvents();
-	rootWin.EnableReceiptOfFocus(EFalse);
-	rootWin.AutoForeground(EFalse);
+    RWindowGroup& rootWin = CCoeEnv::Static()->RootWin();
+    rootWin.EnableFocusChangeEvents (); // For cover UI/status pane refresh problems
+    rootWin.EnableGroupListChangeEvents();
+    rootWin.EnableReceiptOfFocus(EFalse);
+    rootWin.AutoForeground(EFalse);
 
     ConstructSpriteL();
     
     //create animation object
-	iAnimObj = CPeninputAnimObj::NewL(iSpriteMember);
-	
-	iLayoutOwner = CPeninputUiLayoutOwner::NewL( *this );
-	iPenUiCtrl = new(ELeave) CPenUiWndCtrl(CCoeEnv::Static()->RootWin(),iSpriteMember.iBitmap);
-	iInternalBackgroundCtrl = new(ELeave) CInternalBkCtrl(CCoeEnv::Static()->RootWin());
-    iInternalBackgroundCtrl->ConstructL();	
-	iPenUiCtrl->ConstructL();
-	
-	iCurScreenFocusedWndGrpId = GetFocusAppUid().iUid;
+    iAnimObj = CPeninputAnimObj::NewL(iSpriteMember);
+    
+    iLayoutOwner = CPeninputUiLayoutOwner::NewL( *this );
+    iPenUiCtrl = new(ELeave) CPenUiWndCtrl(CCoeEnv::Static()->RootWin(),iSpriteMember.iBitmap);
+    iInternalBackgroundCtrl = new(ELeave) CInternalBkCtrl(CCoeEnv::Static()->RootWin());
+    iInternalBackgroundCtrl->ConstructL();    
+    iPenUiCtrl->ConstructL();
+    iObserver = CPenUiWndEventHandler::NewL( this );
+    iCandidateWnd = CPenUiCandidateWnd::NewL( iObserver );
+    
+    iCurScreenFocusedWndGrpId = GetFocusAppUid().iUid;
 #ifdef __LOG_WNDGROU__    
     iLogFile.Replace(CCoeEnv::Static()->FsSession(),KLogFile,EFileShareAny|EFileWrite);
     iLogFile.Close();
@@ -350,6 +349,8 @@
 #endif // RD_TACTILE_FEEDBACK    
     delete iPenUiCtrl;
     delete iInternalBackgroundCtrl;
+    delete iCandidateWnd;
+    delete iObserver;
 
     iClientProcess.Close();
     iClientLayouts.Close();
@@ -791,7 +792,10 @@
             RecoverButtonEventState();
             iUiLayout->OnDeActivate(); 
             if(iUseWindowCtrl)
-                iPenUiCtrl->OnDeactivate(); //disable non fading             
+                {
+                iPenUiCtrl->OnDeactivate(); //disable non fading
+                iCandidateWnd->HideCandidateList();
+                }
             }								    	
 
         return ETrue;
@@ -848,7 +852,10 @@
         iForegroundUiHandler->AddDelayedCmd();
 
     if (iUseWindowCtrl)
+        {
         iPenUiCtrl->ClosePenUi(aRotation);
+        iCandidateWnd->HideCandidateList();
+        }
     
     //save current screen mode
     iCurScrMode = CCoeEnv::Static()->ScreenDevice()->CurrentScreenMode();    
@@ -871,17 +878,7 @@
     //message requests UI attribute is always handled.
     switch(aMessage.Function())
         {
-        case EPeninputRequestEnableGfxTransEffect:
-            {
-            if( iUseWindowCtrl && iPenUiCtrl )
-                {
-                TBool enable = EFalse;
-                TPckg<TBool> msg( enable );
-                aMessage.ReadL( 0,msg );
-                iPenUiCtrl->EnableGfxTransEffect( enable );
-                }
-            }
-            break;
+        
         case EPeninputRequestUiIsVisible:
             {                      
             TPckg<TBool> msg(iActive);
@@ -2033,9 +2030,34 @@
 				iIsLayoutReDrawAllowWhenActive = *retVal;
 				}
 				break;	
-            case ESignalUpdatePointerSuppressor:
-                {               
-                UpdatePointerEventSuppressor( aEventData );
+            case ESignalShowServerCandidate:
+                {
+                if ( iUseWindowCtrl )
+                    {
+                    // Lift the priority of candidate list window to higher 
+                    // than pen ui wnd.
+                    TInt priority = iPenUiCtrl->WndPriority();
+                    iCandidateWnd->SetPriority( priority + KLiftupPriority );
+                
+                    TUint16* buf = const_cast<TUint16*>( aEventData.Ptr() );
+                    TPeninputCandidateData* cmd = 
+                          reinterpret_cast< TPeninputCandidateData* >( buf );
+                    iCandidateWnd->SetAlign( 
+                            CGraphicsContext::TTextAlign ( cmd->iAlign ) );
+                    iCandidateWnd->SetInitRect( cmd->iInitRect );
+                    iCandidateWnd->EnableSpell( cmd->iSpellEnabled );
+                    iCandidateWnd->EnableTextWidth( cmd->iTextWidthEnabled );
+                    TRAP_IGNORE( iCandidateWnd->ShowCandidateListL( 
+                                      cmd->iItemArray, cmd->iActiveIndex ) );
+                    }
+                }
+                break;
+            case ESignalHideServerCandidate:
+                {
+                if ( iUseWindowCtrl )
+                    {
+                    iCandidateWnd->HideCandidateList();
+                    }
                 }
                 break;
         	default:
@@ -2148,6 +2170,9 @@
     {
 	// Update the cursor color when resource is changed
 	iPenUiCtrl->SetCursorColor();
+
+    // Update candidate window when resource is changed
+    iCandidateWnd->HandleResourceChange( aType );
 	
 	#ifdef FIX_FOR_NGA 
 	// iEnablePriorityChangeOnOriChange will be set to be EFalse, if some dialog in FEP end were opened and 
@@ -2499,9 +2524,14 @@
             {
             SignalOwner( ESignalLayoutClosed, KNullDesC );    
             }
-                   
-        TBool handled = iUiLayout ? iUiLayout->HandleEventL(ERawEvent,&aEvent)
-        		        : EFalse;
+        
+        // Candidate window handles raw event firstly.
+        TBool handled = iCandidateWnd->HandleRawEventL( &aEvent );
+        if( !handled )
+        	{
+            handled = iUiLayout ? iUiLayout->HandleEventL( ERawEvent,&aEvent )
+        		                : EFalse;
+        	}
 
         if (TRawEvent::EButton1Down == aEvent.Type())
             {
@@ -2583,13 +2613,7 @@
                         {			  
                         //fix for fast swap case
                         iInGlobalNotesState = EFalse;                        
-
-                        // Don't handle switching focus group 
-                        // when current focus of the application is screen saver, auto lock or popup clock.
-                        if ( iPreNonGloebalNotesWndGrpId != focusApp.iUid && 
-                             focusApp.iUid != KScreenSaverUid && 
-                             focusApp.iUid != KAutoLockUid && 
-                             focusApp.iUid != KBigClockUid )
+                        if(iPreNonGloebalNotesWndGrpId != focusApp.iUid )
                             {                            
                             iPreNonGloebalNotesWndGrpId = focusApp.iUid;
                             DeactivateSprite(ETrue);//hide pen ui immediately if switched to another application
@@ -3059,21 +3083,6 @@
 	iDiscreetPopArea = iAknUiSrv.GetInUseGlobalDiscreetPopupRect();
 	iAnimObj->SetDiscreetPopArea(iDiscreetPopArea);
     }
-
-// ---------------------------------------------------------------------------
-// CPeninputServer::UpdatePointerEventSuppressor()
-// Update parameters of pointer event suppressor.
-// ---------------------------------------------------------------------------
-//
-void CPeninputServer::UpdatePointerEventSuppressor( const TDesC& aData )
-    {
-    TUint16* buf = const_cast<TUint16* >( aData.Ptr() );
-    TPointerEventSuppressorParameters* parameters = 
-            reinterpret_cast<TPointerEventSuppressorParameters*> ( buf );
-    
-    iAnimObj->UpdatePointerEventSuppressor( *parameters );
-    }
-
 // ======== class CEventQueue========
 //
 // ---------------------------------------------------------------------------
--- a/textinput/peninputarc/src/peninputserverapp/peninputserver.mmp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserver.mmp	Wed Oct 13 14:55:58 2010 +0300
@@ -43,6 +43,8 @@
 SOURCE				penuiwndctrl.cpp
 SOURCE              keyrotator.cpp
 SOURCE              peninputcrpclient.cpp
+SOURCE              penuicandidatewnd.cpp
+SOURCE              penuiwndeventhandler.cpp
 
 USERINCLUDE             . ../../inc/pensrvcliinc
 
@@ -63,6 +65,7 @@
 LIBRARY                 gdi.lib
 LIBRARY                 peninputlayouteng.lib
 LIBRARY                 centralrepository.lib
+LIBRARY                 CommonEngine.lib 
 
 LIBRARY         apparc.lib
 LIBRARY         cone.lib
--- a/textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -320,7 +320,6 @@
         case EPeninputRequestSupportInputMode:
         case EPeninputRequestSetInputLanguage:
 		case EPeninputEnablePriorityChangeOnOriChange:
-		case EPeninputRequestEnableGfxTransEffect:
             ret = iPenInputSvr.HandleMessageL(aMessage);            
             break;
         case EPeninputRequestUpdateAppInfo:            
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputserverapp/penuicandidatewnd.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,1452 @@
+/*
+* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation for button base and dragbar
+*
+*/
+
+#include <s32mem.h> 
+#include <AknsConstants.h>
+#include <AknUtils.h>
+#include <AknsDrawUtils.h>
+#include <AknBidiTextUtils.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <barsread.h>
+#include <peninputserver.rsg>
+#include <StringLoader.h> 
+#include <peninputcmdparam.h>
+
+#include "aknfeppeninputenums.h"
+#include "penuicandidatewnd.h"
+#include "penuiwndeventobserver.h"
+
+/**
+ *  The capture type of pointing on canidate list.
+ */
+enum TCandWndCaptureType
+    {
+    ECandWndCapNone,
+    ECandWndCapItem,
+    ECandWndCapPageUp,
+    ECandWndCapPageDown,
+    ECandWndCapOther,
+    ECandWndCapOut
+    };
+
+const TInt KInvalidBmp = -1 ;
+const TInt KInvalidColorGroup = -1;
+
+const TInt KOnePageItemCount = 4;
+const TInt KTextRectMargin = 4;
+const TInt KDisplayTextLen = KMaxItemTextLength + KAknBidiExtraSpacePerLine;
+
+const TInt KPaneHorMarginCount = 2;
+const TInt KTotalHorMarginCount = 4;
+
+const TInt KTransparency[256] =
+    { 
+    0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7,
+    8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13,
+    14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19,
+    19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24,
+    24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29,
+    30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35,
+    35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 40, 40, 40,
+    41, 41, 41, 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 46,
+    46, 46, 47, 47, 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 50, 51, 51,
+    51, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 55, 55, 55, 56, 56, 56, 56,
+    57, 57, 57, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62,
+    62, 62, 63, 63, 63, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 67, 67, 67,
+    68, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 71, 72, 72, 72, 73,
+    73, 73, 74, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77 
+    };
+
+const TInt KServerBufferSize = 8;
+
+const TSize KInnerRectOffset = TSize( 4, 4 );
+const TSize KHighlightInnerRectOffset = TSize( 7, 7 );
+const TSize KPageButtonInnerRectOffset = TSize( 10, 10 );
+
+const TInt KSeparatorLineHeight = 2;
+const TInt KSeparatorLineYOffset = -4;
+
+const TInt KLafLandscapeCandidateIndex = 3;
+const TInt KLafPortraitCandidateIndex = 2;
+
+const TInt KHalfNumber = 2;
+const TInt KItemSelIntSize = 2;
+const TInt KPageInfoIntSize = 2;
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd* CPenUiCandidateWnd::NewL( MPenUiWndEventObserver* aObserver )
+    {
+    CPenUiCandidateWnd* self = CPenUiCandidateWnd::NewLC( aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd* CPenUiCandidateWnd::NewLC( MPenUiWndEventObserver* aObserver )
+    {
+    CPenUiCandidateWnd* self = new (ELeave) CPenUiCandidateWnd( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd::~CPenUiCandidateWnd()
+    {
+    iItemRects.Close();
+    iItemList.ResetAndDestroy();
+    
+    DeleteAllBitmaps();
+    
+    delete iPageInfo;
+    }
+
+// ---------------------------------------------------------------------------
+// Handle raw events of pen input.
+// ---------------------------------------------------------------------------
+//
+TBool CPenUiCandidateWnd::HandleRawEventL( const TAny* aEventData )
+    {
+    if( !IsVisible() && iPointerArea == ECandWndCapNone )
+        {
+        return EFalse;
+        }
+    
+    TRawEvent event = *((TRawEvent*)aEventData);
+    switch( event.Type() )                
+        {
+        case TRawEvent::EPointerMove:
+            {
+            TPoint point = event.Pos() - PositionRelativeToScreen(); 
+            HandlePointerMoveEvent( point );
+            return ETrue;
+            }
+        case TRawEvent::EButton1Down:
+            {
+            TPoint point = event.Pos() - PositionRelativeToScreen(); 
+            HandlePointerDownEvent( point );
+            return ETrue;
+            }
+        case TRawEvent::EButton1Up:
+            {
+            HandlePointerUpEventL();
+            return ETrue;
+            }
+        default:
+            break;                    
+        }    
+    return EFalse;
+    }
+
+// --------------------------------------------------------------------------
+// Show candidate list
+// --------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ShowCandidateListL( const CDesCArray* aItemArray,
+                                             TInt /*aActiveIndex*/ )
+    {
+    // Set the current item array.
+    SetItemArrayL( aItemArray );
+    
+    // Set current page to the first page
+    iCurrentPage = 0;
+    
+    // Calculate total page
+    iTotalPages = ( iItemList.Count() + KOnePageItemCount - 1) / KOnePageItemCount;
+    
+    // Set the current page info text
+    GetPageInfoBufL();
+    
+    // Clear focused item by default. 
+    iFocusItem = KErrNotFound;
+
+    // Capture all pointers from full screen.
+    SetCapturePointer( ETrue );
+    
+    // Calculate the displaying rect.
+    ReCalcLayout();
+
+    if( !IsVisible() )
+        {
+        MakeVisible( ETrue );
+        }
+    
+    DrawDeferred();
+    }
+
+// ---------------------------------------------------------------------------
+// Hide candidate list.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HideCandidateList()
+    {
+    if ( IsVisible())
+        {
+        MakeVisible( EFalse );
+        SetCapturePointer( EFalse );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Handles a change to the control's resources. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandleResourceChange( TInt aType )
+    {
+    CCoeControl::HandleResourceChange( aType );
+    HideCandidateList();
+    switch ( aType )
+        {
+        case KEikDynamicLayoutVariantSwitch:
+            {
+            ReadLafInfo();
+            }
+            break;
+        case KAknsMessageSkinChange:
+            {
+            TRAP_IGNORE( HandleSkinChangeL() );
+            }
+            break;
+        default:
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CPenUiCandidateWnd::CPenUiCandidateWnd( MPenUiWndEventObserver* aObserver ) 
+                        : iNaviBtnShown( ETrue ), 
+                          iObserver( aObserver )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// 2nd phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ConstructL()
+    {
+    CreateWindowL();
+    
+    SetImgFrId( KAknsIIDQsnFrPopupSub, 
+                KAknsIIDQsnFrFunctionButtonNormal,
+                KAknsIIDQsnFrFunctionButtonPressed,
+                KAknsIIDQsnFrFunctionButtonInactive,                
+                KAknsIIDQsnFrList );
+
+    ConstructFromResourceL();
+    
+    ReadLafInfo();
+    
+    SetBitmapSize(); 
+     
+    CreateDimmedMaskL( iPageUpDimBmpMask, iPageUpBmpMask );
+    CreateDimmedMaskL( iPageDownDimBmpMask, iPageDownBmpMask );
+    
+    ActivateL();
+    
+    MakeVisible( EFalse );
+    }
+
+// ---------------------------------------------------------------------------
+// Set all kinds of frame ids.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetImgFrId( TAknsItemID aBgFrId, 
+                                     TAknsItemID aNaviFrId,
+                                     TAknsItemID aNaviActiveFrId,
+                                     TAknsItemID aNaviDimFrId,                                    
+                                     TAknsItemID aItemActiveFrId )
+    {
+    iBgFrId = aBgFrId;    
+    iItemActiveFrId = aItemActiveFrId;
+    
+    // Page button
+    iNaviFrId = aNaviFrId;
+    iNaviActiveFrId = aNaviActiveFrId;
+    iNaviDimFrId = aNaviDimFrId;
+    }
+ 
+// ---------------------------------------------------------------------------
+// Construct candidate list from resource.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ConstructFromResourceL()
+    {
+    TResourceReader reader;
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, 
+                                               R_PENINPUT_SERVER_CANDIDATE_LIST );
+    
+    // Get bitmap file name
+    TPtrC bmpFileName = reader.ReadTPtrC();
+    
+    // Get major skin id
+    TInt imgMajorSkinId = reader.ReadInt32();
+    
+    // Get up arrow bitmap resource id
+    TInt32 pageUpId = reader.ReadInt32();
+    
+    // Get down arrow bitmap resource id
+    TInt32 pageDownId = reader.ReadInt32();         
+    
+    // Get seperation line bitmap id and mask id
+    const TInt16 bmpId = reader.ReadInt16();
+    const TInt16 bmpMskId = reader.ReadInt16();
+    
+    // Get seperation line skin item id
+    TAknsItemID id;
+    const TInt skinitemid = reader.ReadInt16();
+    id.Set(TInt(imgMajorSkinId), skinitemid);
+    
+    // Get seperation line bitmap and mask bitmap
+    if (bmpId != KInvalidBmp)
+        {
+        if (bmpMskId != KInvalidBmp)
+            {
+            AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+                                         id,
+                                         KAknsIIDQsnIconColors,
+                                         EAknsCIQsnIconColorsCG30,
+                                         iSeperationBmp,
+                                         iSeperationMaskBmp,
+                                         bmpFileName,
+                                         bmpId,
+                                         bmpMskId,
+                                         AKN_LAF_COLOR( 0 ) );                                 
+            }
+        else
+            {
+            AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+                                    id,
+                                    iSeperationBmp,
+                                    bmpFileName,
+                                    bmpId );
+            }
+        }
+    
+    CleanupStack::PopAndDestroy(); // reader
+    
+    // Construct page up button from resource
+    TResourceReader pageUpReader;
+    CCoeEnv::Static()->CreateResourceReaderLC( pageUpReader, pageUpId );
+    ConstructPageInfoFromResourceL ( pageUpReader, ETrue );
+    CleanupStack::PopAndDestroy(); // pageUpReader
+
+    // Construct page down button from resource
+    TResourceReader pageDownReader;
+    CCoeEnv::Static()->CreateResourceReaderLC( pageDownReader, pageDownId );
+    ConstructPageInfoFromResourceL( pageDownReader, EFalse );
+    CleanupStack::PopAndDestroy(); // pageDownReader
+    }
+
+// -----------------------------------------------------------------------------
+// Construct up / down arrow buttons from resource.
+// -----------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ConstructPageInfoFromResourceL( TResourceReader& aReader, 
+                                                         TBool aUpDown )
+    {
+    // Get bimap file name of arrow buttons
+    TPtrC bmpFileName = aReader.ReadTPtrC();
+    
+    // Get major skin id
+    TInt imgMajorSkinId = aReader.ReadInt32();
+    
+    // Get color index
+    TInt colorIndex = aReader.ReadInt16();    
+    
+    // Get the image ids and mask ids from resource
+    TInt bmpId = aReader.ReadInt16(); 
+    TInt bmpMskId = aReader.ReadInt16();
+    
+    // Get skin item id
+    const TInt skinitemid = aReader.ReadInt16();
+    TAknsItemID id;
+    id.Set( imgMajorSkinId, skinitemid );
+    
+    // Get bitmaps
+    CFbsBitmap* forgroundBmp = NULL;
+    CFbsBitmap* forgroundBmpMask = NULL;
+    if ( bmpId != KInvalidBmp )
+        {
+        if (bmpMskId != KInvalidBmp)
+            {
+            if( colorIndex == KInvalidColorGroup )
+                {
+                AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+                                        id,
+                                        forgroundBmp,
+                                        forgroundBmpMask,
+                                        bmpFileName,
+                                        bmpId,
+                                        bmpMskId );
+                }
+            else
+                {
+                AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+                                             id,
+                                             KAknsIIDQsnIconColors,
+                                             colorIndex,
+                                             forgroundBmp,
+                                             forgroundBmpMask,
+                                             bmpFileName,
+                                             bmpId,
+                                             bmpMskId,
+                                             AKN_LAF_COLOR( 0 ) );       
+                }
+            }
+        else
+            {
+            AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+                                    id,
+                                    forgroundBmp,
+                                    bmpFileName,
+                                    bmpId );
+            }
+        }
+    
+    if ( aUpDown )
+        {
+        iPageUpBmp = forgroundBmp;
+        iPageUpBmpMask = forgroundBmpMask;
+        }
+    else
+        {
+        iPageDownBmp = forgroundBmp;
+        iPageDownBmpMask = forgroundBmpMask;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Read LAF data for candidate list
+// ---------------------------------------------------------------------------
+//        
+void CPenUiCandidateWnd::ReadLafInfo()
+    {
+    // Screen
+    TRect rect, rectcn;
+    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, rect);
+    TBool isLandScape = rect.Size().iWidth < rect.Size().iHeight ? EFalse : ETrue;
+    
+    TAknWindowLineLayout appWnd; 
+    appWnd = AknLayoutScalable_Avkon::application_window(0).LayoutLine();
+    
+    TAknWindowLineLayout parentWnd;
+    TAknWindowLineLayout candidateList;
+    TAknWindowLineLayout listpane;
+    TAknWindowLineLayout scrollpane;
+    if (isLandScape)
+        {
+        parentWnd = AknLayoutScalable_Apps::popup_vitu2_window(1).LayoutLine();
+        candidateList = AknLayoutScalable_Apps::popup_vitu2_match_list_window
+                                                ( KLafLandscapeCandidateIndex )
+                                                .LayoutLine();
+        listpane = AknLayoutScalable_Apps::list_vitu2_match_list_pane(1).LayoutLine();
+        scrollpane = AknLayoutScalable_Apps::vitu2_page_scroll_pane(1).LayoutLine();
+        }
+    else
+        {
+        parentWnd = AknLayoutScalable_Apps::popup_vitu2_window(0).LayoutLine();
+        candidateList = AknLayoutScalable_Apps::popup_vitu2_match_list_window
+                                                ( KLafPortraitCandidateIndex )
+                                                .LayoutLine();
+        listpane = AknLayoutScalable_Apps::list_vitu2_match_list_pane(0).LayoutLine();
+        scrollpane = AknLayoutScalable_Apps::vitu2_page_scroll_pane(0).LayoutLine();
+        }
+    
+    TAknLayoutRect parentRectLayout;
+    parentRectLayout.LayoutRect( appWnd.Rect(), parentWnd );
+    TRect parentRect = parentRectLayout.Rect();
+    
+    // candidate list
+    TAknLayoutRect candidateListRect;
+    candidateListRect.LayoutRect( parentRect, candidateList );    
+ 
+    // list pane, its parent is candidate list
+    TAknLayoutRect listpaneRect;
+    listpaneRect.LayoutRect( candidateListRect.Rect(), listpane );
+    
+    // scroll pane, its parent is candidate list
+    TAknLayoutRect scrollRect;
+    scrollRect.LayoutRect( candidateListRect.Rect(), scrollpane );
+    
+    // Item pane, its parent is list pane
+    TAknWindowLineLayout itemPane 
+          = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane( 0, 0, 0 )
+            .LayoutLine();
+    TAknLayoutRect itemPaneRect;
+    itemPaneRect.LayoutRect( listpaneRect.Rect(), itemPane );
+
+    iLafData.iHorMargin = listpaneRect.Rect().iTl.iX;    
+    iLafData.iVerMargin = listpaneRect.Rect().iTl.iY;        
+    iLafData.iItemSize = itemPaneRect.Rect().Size();
+    
+    // Up button image. its parent is scroll pane
+    TAknWindowLineLayout arrowUpImagePane
+                    = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g1()
+                      .LayoutLine();
+    TAknLayoutRect arrowUpImageRect;
+    arrowUpImageRect.LayoutRect( scrollRect.Rect(), arrowUpImagePane );
+    // Up button, its parent is scroll pane
+    TAknWindowLineLayout arrowUpPane
+              = AknLayoutScalable_Apps::bg_button_pane_cp023().LayoutLine();
+    TAknLayoutRect arrowUpRect;
+    arrowUpRect.LayoutRect( scrollRect.Rect(), arrowUpPane );
+    
+    // Down button image, its parent is scroll pane
+    TAknWindowLineLayout arrowDownImagePane
+            = AknLayoutScalable_Apps::vitu2_page_scroll_pane_g2().LayoutLine();
+    TAknLayoutRect arrowDownImageRect;
+    arrowDownImageRect.LayoutRect( scrollRect.Rect(), arrowDownImagePane );
+    
+    // Down button, its parent is scroll pane
+    TAknWindowLineLayout arrowDownPane 
+                = AknLayoutScalable_Apps::bg_button_pane_cp024().LayoutLine();
+    TAknLayoutRect arrowDownRect;
+    arrowDownRect.LayoutRect( scrollRect.Rect(), arrowDownPane );
+    
+    iLafData.iNaviSize = arrowUpRect.Rect().Size();
+    iLafData.iNaviInnerSize = arrowUpImageRect.Rect().Size();
+    iLafData.iTextLine 
+               = AknLayoutScalable_Apps::list_vitu2_match_list_item_pane_t1()
+                 .LayoutLine();
+    iLafData.iPageTextLine 
+               = AknLayoutScalable_Apps::vitu2_page_scroll_pane_t1()
+                 .LayoutLine();
+            
+    TAknLayoutText list_item_pane_t1_layout_text;
+    list_item_pane_t1_layout_text.LayoutText( itemPaneRect.Rect(), 
+                                              iLafData.iTextLine );
+    iLafData.iFont = list_item_pane_t1_layout_text.Font();
+    }
+
+// ---------------------------------------------------------------------------
+// Set size for bitmaps
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetBitmapSize()
+    {
+    if ( iPageUpBmp )
+        {
+        AknIconUtils::SetSize( iPageUpBmp, 
+                               iLafData.iNaviSize, 
+                               EAspectRatioNotPreserved );        
+        }
+    
+    if ( iPageUpBmpMask )
+        {
+        AknIconUtils::SetSize( iPageUpBmpMask, 
+                               iLafData.iNaviSize, 
+                               EAspectRatioNotPreserved );        
+        }
+    
+    if ( iPageDownBmp )
+        {
+        AknIconUtils::SetSize( iPageDownBmp, 
+                               iLafData.iNaviSize, 
+                               EAspectRatioNotPreserved );
+        }
+    
+    if ( iPageDownBmpMask )
+        {
+        AknIconUtils::SetSize( iPageDownBmpMask,
+                               iLafData.iNaviSize, 
+                               EAspectRatioNotPreserved );
+        }
+    
+    if ( iPageUpDimBmpMask )
+        {
+        AknIconUtils::SetSize( iPageUpDimBmpMask, 
+                               iLafData.iNaviSize, 
+                               EAspectRatioNotPreserved );
+        }
+    
+    if ( iPageDownDimBmpMask )
+        {
+        AknIconUtils::SetSize( iPageDownBmpMask,
+                               iLafData.iNaviSize, 
+                               EAspectRatioNotPreserved );    
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// Create mask bitmap for dimmed icons
+// ---------------------------------------------------------------------------
+//    
+void CPenUiCandidateWnd::CreateDimmedMaskL( CFbsBitmap*& aDimmedMask,
+                                            const CFbsBitmap* aMask )
+    {
+    if (aMask && aMask->DisplayMode() == EGray256 )
+        {
+        if( NULL != aDimmedMask )
+            {
+            delete aDimmedMask;
+            aDimmedMask = NULL;
+            }
+
+        aDimmedMask = new (ELeave) CFbsBitmap;
+        User::LeaveIfError( aDimmedMask->Create( aMask->SizeInPixels(), EGray256 ) ); 
+        CleanupStack::PushL( aDimmedMask );
+        CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL( aDimmedMask );
+        CleanupStack::PushL( bitmapDevice );
+        CFbsBitGc* bitGc( NULL );
+        User::LeaveIfError( bitmapDevice->CreateContext( bitGc ) );
+        CleanupStack::PushL( bitGc );
+        bitGc->SetPenStyle( CGraphicsContext::ESolidPen );
+        bitGc->BitBlt( TPoint( 0, 0 ), aMask );
+        aDimmedMask->LockHeap();
+        TInt w = aMask->SizeInPixels().iWidth; 
+        TInt h = aMask->SizeInPixels().iHeight;
+        TInt dataStride = aMask->DataStride() - w; 
+        unsigned char* address = (unsigned char *)aDimmedMask->DataAddress();  
+        for ( TInt i = 0; i < h; ++i )
+            {
+            for ( TInt j = 0; j < w; ++j )
+                {
+                *address = KTransparency[ *address ];
+                ++address;
+                }
+            address += dataStride;         
+            }
+        aDimmedMask->UnlockHeap();
+        CleanupStack::PopAndDestroy( bitGc ); // bitGc
+        CleanupStack::PopAndDestroy( bitmapDevice ); // bitmapDevice
+        CleanupStack::Pop( aDimmedMask ); // aDimmedMask
+        }
+    }
+
+// --------------------------------------------------------------------------
+// Capture all poninters of full screen when candidate list is opened.
+// --------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetCapturePointer( TBool aFlag )
+    {
+    if ( iObserver )
+        {
+        TBuf<KServerBufferSize> buf;
+        buf.Append( ( const TUint16* )( &aFlag ), sizeof( TBool ) / sizeof( TUint16 ) );
+        buf.Append( ( const TUint16* )( this ), sizeof( TInt ) / sizeof( TUint16 ) );
+        iObserver->SignalOwner( ESignalCapturePointer, buf );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Get page info and transfer it to descritor.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::GetPageInfoBufL()
+    {
+    if( NULL != iPageInfo )
+        {
+        delete iPageInfo;
+        iPageInfo = NULL;
+        }    
+    CArrayFix<TInt>* pageNumbers = 
+            new ( ELeave ) CArrayFixFlat<TInt>( KPageInfoIntSize );
+    CleanupStack::PushL( pageNumbers );
+    pageNumbers->AppendL( iCurrentPage + 1 );
+    pageNumbers->AppendL( iTotalPages );
+    iPageInfo = StringLoader::LoadL( R_PENINPUT_SERVER_CANDIDATE_LIST_PAGE_NUM, 
+                                     *pageNumbers );
+    CleanupStack::PopAndDestroy( pageNumbers ); // pageNumbers    
+    }
+
+// ---------------------------------------------------------------------------
+// Set the text item array to candidate list.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SetItemArrayL( const CDesCArray* aItemArray )
+    {    
+    if ( aItemArray )
+        {
+        iItemList.ResetAndDestroy();
+        for ( TInt i = 0; i < aItemArray->Count(); i++ )
+            {
+            CPenUiCandidateWnd::TPenUiCandidateItem* item 
+                      = new (ELeave) CPenUiCandidateWnd::TPenUiCandidateItem;
+            item->iCommand = ECandItemCmdItemSelected;
+            if ( (*aItemArray)[i].Length() <= item->iText.MaxLength() )
+                {
+                item->iText.Copy( (*aItemArray)[i] );
+                }
+            else
+                {
+                // Given longer than maxlength, display the part of less than max
+                item->iText.Copy( (*aItemArray)[i].Left( item->iText.MaxLength() ) );
+                }            
+            CleanupStack::PushL(item);
+            iItemList.AppendL( item );
+            CleanupStack::Pop( item ); // item
+            }
+        AddSpellItemL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Add spell item
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::AddSpellItemL()
+    {
+    if( iSpellEnabled && iItemList.Count() != 0 )
+        {
+        HBufC* spellText = StringLoader::LoadLC( R_PENINPUT_SERVER_FINGER_SPELL );    
+        CPenUiCandidateWnd::TPenUiCandidateItem* item 
+                    = new (ELeave) CPenUiCandidateWnd::TPenUiCandidateItem;
+        item->iCommand = ECandItemCmdEnterSpellMode;
+        item->iText.Copy( *spellText );        
+        CleanupStack::PushL( item );
+        iItemList.AppendL( item );
+        CleanupStack::Pop( item ); // item        
+        CleanupStack::PopAndDestroy( spellText ); // spellText
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// Calculate the displaying rect of candidate.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ReCalcLayout()
+    {
+    // Dynamically adjust width 
+    TInt width = WidthToFitText();
+
+    // Calculate the height of candidate
+    TInt height = ( KOnePageItemCount + 1 ) * iLafData.iVerMargin 
+                    + KOnePageItemCount * iLafData.iItemSize.iHeight;
+    
+    // Calulate the rect of candidate
+    TRect rtCtrl( iInitRect.iTl, TSize( width, height ) );
+    rtCtrl = RectToFitScreen( rtCtrl );
+        
+    SetRect( rtCtrl );    
+    }
+
+// ---------------------------------------------------------------------------
+// Return the dynamical width for displaying text.
+// ---------------------------------------------------------------------------
+//
+TInt CPenUiCandidateWnd::WidthToFitText()
+    {
+    if ( iLafData.iFont )
+        {
+        // Calculate the maximum of width among all text to be shown    
+        iItemWidth = iTextWidthEnabled ? iLafData.iItemSize.iWidth : 0;    
+        const CFont* font = iLafData.iFont;        
+        CFont::TMeasureTextInput::TFlags flg 
+                                   = CFont::TMeasureTextInput::EFVisualOrder;
+        if( iAlign == CGraphicsContext::ERight )
+            {
+            flg = CFont::TMeasureTextInput::EFVisualOrderRightToLeft;
+            }       
+        for( TInt i = 0; i < iItemList.Count(); ++i )
+            {
+            TInt itemWidth = AknBidiTextUtils::MeasureTextBoundsWidth(
+                                            *font, iItemList[i]->iText, flg );
+            if(itemWidth > iItemWidth)
+                {
+                iItemWidth = itemWidth;
+                }
+            }
+        }
+    
+    // Make sure the total width ( text item + navi width + all horiezental margin )
+    // not to be larger than the screen width.
+    TInt naviWidth = iNaviBtnShown ? iLafData.iNaviSize.iWidth : 0;
+    TInt totalHorMargin = KTotalHorMarginCount * iLafData.iHorMargin;
+    TInt totalWidth = iItemWidth + totalHorMargin + naviWidth;       
+    TPixelsTwipsAndRotation ptScreenSize;             
+    CCoeEnv::Static()->ScreenDevice()->
+                       GetDefaultScreenSizeAndRotation( ptScreenSize ); 
+    if( totalWidth > ptScreenSize.iPixelSize.iWidth )    
+        {
+        iItemWidth = ptScreenSize.iPixelSize.iWidth - naviWidth - totalHorMargin;
+        totalWidth = iItemWidth + totalHorMargin + naviWidth;
+        }
+    return totalWidth;
+    }
+  
+// ---------------------------------------------------------------------------
+// Return the rect to fit the screen size.
+// ---------------------------------------------------------------------------
+//
+TRect CPenUiCandidateWnd::RectToFitScreen( const TRect& aRect )
+    {
+    TPixelsTwipsAndRotation ptScreenSize;             
+    CCoeEnv::Static()->ScreenDevice()->
+                                GetDefaultScreenSizeAndRotation( ptScreenSize) ;    
+    TRect rtScreen ( TPoint( 0, 0 ), ptScreenSize.iPixelSize );
+    if( aRect.Width() > rtScreen.Width() || aRect.Height() > rtScreen.Height() )
+        {
+        // If aRect is larger than the screen area, it is no need to adjust.
+        return aRect;
+        }
+       
+    TRect rect = aRect;
+    if( rect.iBr.iY > rtScreen.iBr.iY )
+        {
+        // There is no enough space below the underline word. 
+        // If there is no enough space at the right and enough space 
+        // at the left, candidate list pops up on the left.
+        // Otherwise, candidate list pops up on the right.
+        TInt verOffset = rtScreen.iBr.iY - rect.iBr.iY;
+        if ( ( iInitRect.iBr.iX + rect.Width() > rtScreen.iBr.iX )
+                && ( rect.iTl.iX - rect.Width() > rtScreen.iTl.iX ) )
+            {
+            rect.Move( -rect.Width(), verOffset );
+            }
+        else
+            {
+            rect.Move( iInitRect.iBr.iX - rect.iTl.iX, verOffset );
+            }
+        }
+    if( rect.iBr.iX > rtScreen.iBr.iX )
+        {
+        rect.Move( rtScreen.iBr.iX - rect.iBr.iX , 0 );
+        }
+    if( rect.iTl.iX < rtScreen.iTl.iX )
+        {
+        rect.Move( rtScreen.iTl.iX - rect.iTl.iX , 0 );
+        }        
+    if( rect.iTl.iY < rtScreen.iTl.iY )
+        {
+        rect.Move( 0, rtScreen.iTl.iY - rect.iTl.iY );
+        }
+    return rect;
+    }
+
+// ---------------------------------------------------------------------------
+// Draw each item.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DrawItem( CWindowGc* aGc, TInt aIndex ) const
+    {
+    if ( aIndex < 0 || aIndex >= iItemRects.Count() )
+        {
+        return;
+        }
+    
+    const CFont* font = iLafData.iFont;
+    if ( !font )
+        {
+        return;   
+        }
+    
+    TInt itemIndex = aIndex + iCurrentPage * iItemRects.Count();
+    if( itemIndex >= iItemList.Count() )
+        {
+        return;
+        }
+    
+    // Get text rect
+    TRect textRect = iItemRects[ aIndex ];
+    textRect.SetWidth( iItemWidth );
+    textRect.Move( iLafData.iHorMargin, 0 );
+    
+    // Draw seperation
+    if ( ( itemIndex == iItemList.Count() - 1) && iSpellEnabled )
+         {
+         // Calculate seperation bmp rect
+         TPoint separatorTl = textRect.iTl;
+         separatorTl.iY += KSeparatorLineYOffset;  
+         
+         // Draw bitmap
+         if( iSeperationBmp )
+             {
+             TRect srcRect( TPoint( 0, 0 ), iSeperationBmp->SizeInPixels() );
+             if( iSeperationMaskBmp )
+                 {
+                 aGc->BitBltMasked( separatorTl, 
+                                  iSeperationBmp, 
+                                  srcRect,
+                                  iSeperationMaskBmp,
+                                  ETrue );
+                 }
+             else
+                 {
+                 aGc->BitBlt( separatorTl,
+                            iSeperationBmp,
+                            srcRect );
+                 }
+             }
+         }     
+
+    TAknsQsnTextColorsIndex clrIndex;
+    clrIndex = ( itemIndex == iFocusItem ) ? EAknsCIQsnTextColorsCG10 
+                                           : EAknsCIQsnTextColorsCG20;     
+    TRgb color = KRgbBlack;
+    if (AknsUtils::AvkonSkinEnabled())
+         {
+         AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+                                    color, 
+                                    KAknsIIDQsnTextColors, 
+                                    clrIndex );
+         }
+    
+    TBuf<KDisplayTextLen> buf;
+    if ( iAlign == CGraphicsContext::ERight )
+        {
+        AknBidiTextUtils::ConvertToVisualAndClip( iItemList[itemIndex]->iText, 
+                                                  buf, 
+                                                  *font,
+                                                  textRect.Width(), 
+                                                  textRect.Width(),
+                                                  AknBidiTextUtils::ERightToLeft );
+        }
+    else
+        {
+        AknBidiTextUtils::ConvertToVisualAndClip( iItemList[itemIndex]->iText, 
+                                                  buf, 
+                                                  *font,
+                                                  textRect.Width(), 
+                                                  textRect.Width());
+        }
+    
+    if ( textRect.Height() - font->FontMaxHeight() < KTextRectMargin )
+        {
+        // Make sure the height of the area for drawing text is larger than 
+        // the max height of font by 4 pixels at least.
+        // The piece of code is used to avoid clipping some characters, like 'g'.
+        textRect.SetHeight( font->FontMaxHeight() + KTextRectMargin );
+        }
+    
+    // Draw highlight item
+    if ( itemIndex == iFocusItem )
+        {                 
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        TRect hightLightRect = iItemRects[ aIndex ];
+        TRect innerHightlightRect = hightLightRect;
+        innerHightlightRect.Shrink( KHighlightInnerRectOffset );
+        AknsDrawUtils::DrawFrame( skin, 
+                                  *aGc, 
+                                  hightLightRect,
+                                  innerHightlightRect,
+                                  iItemActiveFrId,
+                                  KAknsIIDDefault ); 
+        }
+    
+    // Draw text
+    aGc->UseFont( font );
+    aGc->SetPenColor( color );
+    TInt baseLine = textRect.Height() / KHalfNumber 
+                    + font->AscentInPixels() / KHalfNumber;
+    aGc->DrawText( buf, textRect, baseLine, iAlign );
+    aGc->DiscardFont();    
+    }
+
+// ---------------------------------------------------------------------------
+// Draw page down / up arrow button.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DrawPageButton( CWindowGc* aGc, TBool aUpDown ) const
+    {
+    TRect buttonRect;
+    CFbsBitmap* buttonBmp = NULL;
+    CFbsBitmap* buttonBmpMask = NULL;
+    CFbsBitmap* buttonDimBmpMask = NULL;
+    if ( aUpDown )
+        {
+        buttonBmp = iPageUpBmp;
+        buttonBmpMask = iPageUpBmpMask;
+        buttonDimBmpMask = iPageUpDimBmpMask;
+        buttonRect = iPageUpRect;        
+        }
+    else
+        {
+        buttonBmp = iPageDownBmp;
+        buttonBmpMask = iPageDownBmpMask;
+        buttonDimBmpMask = iPageDownDimBmpMask;
+        buttonRect = iPageDownRect;
+        }
+    
+    // Inner rect
+    TRect innerRect = buttonRect;
+    innerRect.Shrink( KPageButtonInnerRectOffset );
+        
+    // Draw arrow buttons
+    CFbsBitmap* bmpMask = NULL;    
+    if( iTotalPages == 1 ) 
+        {
+        // Draw dim page buttons.
+        AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+                                  *aGc, 
+                                  buttonRect, 
+                                  innerRect,
+                                  iNaviDimFrId,
+                                  KAknsIIDDefault );
+
+        bmpMask = buttonDimBmpMask; 
+        }
+    else
+        {
+        // Draw normal state or pressed state
+        TBool isActive = ( aUpDown && iPointerArea == ECandWndCapPageUp ) 
+                         || ( !aUpDown && iPointerArea == ECandWndCapPageDown ); 
+        TAknsItemID ImgID = isActive ? iNaviActiveFrId : iNaviFrId;
+        AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+                                  *aGc, 
+                                  buttonRect, 
+                                  innerRect,
+                                  ImgID,
+                                  KAknsIIDDefault ); 
+        
+        bmpMask = buttonBmpMask;                            
+        }
+    
+    // Draw forground
+    if( buttonBmp )
+        {
+        TRect srcRect( TPoint( 0, 0 ), buttonBmp->SizeInPixels() );
+        if( bmpMask )
+            {
+            aGc->BitBltMasked( buttonRect.iTl, buttonBmp, srcRect,
+                               bmpMask, EFalse );
+            }
+        else
+            {
+            aGc->BitBlt( buttonRect.iTl, buttonBmp, srcRect );    
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Draw page into text.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DrawPageInfo( CWindowGc* aGc ) const
+    {
+    if ( iPageInfo->Length() == 0)
+        {
+        return;    
+        }
+    
+    TRgb color( KRgbBlack );  // sane default for nonskinned case
+    TAknsQsnTextColorsIndex clrIndex;
+    clrIndex = EAknsCIQsnTextColorsCG20;
+    if ( AknsUtils::AvkonSkinEnabled() )
+        {
+        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+                                   color, 
+                                   KAknsIIDQsnTextColors, 
+                                   clrIndex );
+        }
+
+    TAknLayoutText textLayout;
+    textLayout.LayoutText( iScrollRect, iLafData.iPageTextLine );
+    textLayout.DrawText( *aGc, iPageInfo->Des(), EFalse, color );
+    }
+
+// ---------------------------------------------------------------------------
+// Handle pointer down event. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandlePointerDownEvent( const TPoint& aPoint )
+    {
+    if ( Rect().Contains( aPoint ) )
+        {               
+        CheckPointerEvent ( aPoint );
+        }
+    else
+        {
+        iPointerArea = ECandWndCapOut;
+        
+        HideCandidateList();
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// Handle pointer move event. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandlePointerMoveEvent(const TPoint& aPoint)
+    {
+    if( !IsVisible() || iPointerArea == ECandWndCapNone )
+        {
+        return;
+        }
+        
+    if ( !Rect().Contains( aPoint ) )
+        {
+        iPointerArea = ECandWndCapOut;
+        return;
+        }
+    
+    CheckPointerEvent ( aPoint );
+    }
+
+// ---------------------------------------------------------------------------
+// Handle pointer up event. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandlePointerUpEventL()
+    {
+    if( !IsVisible() )
+        {
+        iPointerArea = ECandWndCapNone;
+        return;
+        }
+    
+    TBool needReDraw = EFalse ;
+    switch ( iPointerArea )
+        {
+        case ECandWndCapItem:
+            {            
+            if ( iFocusItem != KErrNotFound 
+                    && iFocusItem < iItemList.Count() )
+                {                        
+                ReportItemSelectedEventL();
+                HideCandidateList();
+                }
+            }
+            break;
+        case ECandWndCapPageUp:
+            {
+            iCurrentPage = ( iCurrentPage == 0 ) ? iTotalPages 
+                                                 : iCurrentPage;
+            iCurrentPage --;            
+            GetPageInfoBufL();
+            
+            needReDraw = ETrue;
+            }
+            break;
+        case ECandWndCapPageDown:
+            {
+            iCurrentPage++;
+            iCurrentPage = ( iCurrentPage == iTotalPages ) ? 0 
+                                                           : iCurrentPage;
+            GetPageInfoBufL();
+            
+            needReDraw = ETrue;
+            }
+            break;
+        default:
+            break;
+        }
+    
+    iPointerArea = ECandWndCapNone;
+    if ( needReDraw )
+        {
+        DrawDeferred();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Check pointer area of pointer event. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::CheckPointerEvent( const TPoint& aPoint )
+    {
+    if( iListRect.Contains( aPoint ) )
+        {
+        TInt focus = ItemIndexByPoint( aPoint );
+        if ( focus != KErrNotFound )
+            {
+            iPointerArea = ECandWndCapItem;
+        
+            // Enter text item
+            if ( focus != iFocusItem  )
+                {
+                iFocusItem = focus;
+                DrawDeferred();
+                }
+            }
+        else
+            {
+            iPointerArea = ECandWndCapOther;
+            }
+        }
+    else 
+        {
+        if ( iTotalPages > 1 )
+            {
+            if ( iPageUpRect.Contains( aPoint) )
+                {
+                // Enter page up button 
+                if ( iPointerArea != ECandWndCapPageUp )
+                    {
+                    iPointerArea = ECandWndCapPageUp;
+                    DrawDeferred();
+                    }
+                }
+            else if ( iPageDownRect.Contains( aPoint ) )
+                {
+                // Enter page down button
+                if ( iPointerArea != ECandWndCapPageDown )
+                    {
+                    iPointerArea = ECandWndCapPageDown;
+                    DrawDeferred();
+                    }
+                }
+            else
+                {
+                iPointerArea = ECandWndCapOther;
+                }
+            }
+        else
+            {
+            iPointerArea = ECandWndCapOther;
+            }
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// Return the index of pointed text item. 
+// ---------------------------------------------------------------------------
+//
+TInt CPenUiCandidateWnd::ItemIndexByPoint( const TPoint& aPoint )
+    {
+    TInt ret = KErrNotFound;
+    for ( TInt i = 0; i < iItemRects.Count(); i++ )
+        {
+        if ( iItemRects[ i ].Contains( aPoint ) )
+            {
+            ret = i  + iCurrentPage * iItemRects.Count();
+            if ( ret >= iItemList.Count() ) 
+                {
+                ret = KErrNotFound;
+                }
+            break;
+            }
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Report item selected event to ui layout. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::ReportItemSelectedEventL()
+    {
+    if ( iObserver && iFocusItem != KErrNotFound 
+            && iFocusItem < iItemList.Count() )
+        {
+        // Report success select item
+        TInt command = iItemList[ iFocusItem ]->iCommand;
+        
+        HBufC8* buf8 = HBufC8::NewLC( KItemSelIntSize * sizeof( TInt ) );
+        TPtr8 buf8Ptr = buf8->Des();
+        
+        RDesWriteStream writeStream;
+        CleanupClosePushL(writeStream);
+        writeStream.Open( buf8Ptr ); 
+        
+        writeStream.WriteInt32L( command );
+        writeStream.WriteInt32L( iFocusItem );
+        
+        writeStream.CommitL();                 
+        CleanupStack::PopAndDestroy( &writeStream );
+        iObserver->HandleCommand( ECmdPeninputSelectServerCandidate, 
+                                  reinterpret_cast< TUint8* >( &buf8Ptr ) );
+        
+        CleanupStack::PopAndDestroy( buf8 );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Delete all bitmaps. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::DeleteAllBitmaps()
+    {
+    delete iPageUpBmp;
+    iPageUpBmp = NULL;
+    
+    delete iPageUpBmpMask;
+    iPageUpBmpMask = NULL;
+    
+    delete iPageUpDimBmpMask;
+    iPageUpDimBmpMask = NULL;
+    
+    delete iPageDownBmp;
+    iPageDownBmp = NULL;
+    
+    delete iPageDownBmpMask;
+    iPageDownBmpMask = NULL;
+    
+    delete iPageDownDimBmpMask;
+    iPageDownDimBmpMask = NULL;
+    
+    delete iSeperationBmp;
+    iSeperationBmp = NULL;
+    
+    delete iSeperationMaskBmp;
+    iSeperationMaskBmp = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// Handle skin change. 
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::HandleSkinChangeL()
+    {
+    // Reconstruct all bitmaps as these bitmaps are based on current skin. 
+    DeleteAllBitmaps();
+    
+    ConstructFromResourceL();
+    
+    SetBitmapSize(); 
+     
+    CreateDimmedMaskL( iPageUpDimBmpMask, iPageUpBmpMask );
+    CreateDimmedMaskL( iPageDownDimBmpMask, iPageDownBmpMask );
+    
+    // Set separator line size if the spell feature is enabled.
+    if ( iSpellEnabled && iItemRects.Count() > 0 )
+        {
+        if( NULL != iSeperationBmp )
+            {
+            AknIconUtils::SetSize( iSeperationBmp, iSeparatorSize, 
+                                   EAspectRatioNotPreserved ); 
+            }
+            
+        if( NULL != iSeperationMaskBmp )
+            {
+            AknIconUtils::SetSize( iSeperationMaskBmp, iSeparatorSize, 
+                                   EAspectRatioNotPreserved );
+            }        
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Responds to changes to the size and position of the contents of this control.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::SizeChanged()
+    {
+    TInt paneHorMargin = KPaneHorMarginCount * iLafData.iHorMargin;    
+    
+    // Calculate list pane rect
+    iListRect = Rect();    
+    iListRect.SetWidth( iItemWidth + paneHorMargin );        
+    
+    if( iNaviBtnShown )
+        {
+        // scroll pane width = naviButton width + 2 horMargin width 
+        TInt scorllPaneWidth = iLafData.iNaviSize.iWidth + paneHorMargin;        
+        TInt scrollPaneTlX = iListRect.Width();
+        if ( iAlign == CGraphicsContext::ERight )
+            {
+            // If the layout is RTL, move list pane to the rightmost,
+            // move scroll pane to the leftmost.
+            iListRect.Move( scorllPaneWidth, 0 );
+            scrollPaneTlX = 0;
+            }
+        
+        // calculate scroll pane rect
+        iScrollRect = TRect( TPoint( scrollPaneTlX, iListRect.iTl.iY ),
+                             TSize( scorllPaneWidth, iListRect.Height() ) );
+        
+        // calculate up button rect
+        TPoint tlPageUp( iScrollRect.iTl.iX + iLafData.iHorMargin, 
+                         iScrollRect.iTl.iY + iLafData.iVerMargin );
+        iPageUpRect = TRect( tlPageUp, iLafData.iNaviSize );
+        
+        // calculate down button rect
+        TPoint tlPageDown( iPageUpRect.iTl.iX, 
+                           iScrollRect.iBr.iY - iLafData.iVerMargin
+                           - iLafData.iNaviSize.iHeight );
+        iPageDownRect = TRect( tlPageDown, iLafData.iNaviSize );
+        }
+    
+    // Calculate each the area of each text, not including the margin
+    iItemRects.Reset();
+    for ( TInt i = 0; i < KOnePageItemCount; i++ )
+        {
+        TPoint point( iListRect.iTl.iX , iListRect.iTl.iY + 
+                      ( i + 1 ) * iLafData.iVerMargin + 
+                      i * iLafData.iItemSize.iHeight );
+        
+        TSize size( iListRect.Width(), iLafData.iItemSize.iHeight );        
+        iItemRects.Append( TRect( point, size ) );
+        }
+
+    // Calculate separator line rect if the spell feature is enabled.
+    if ( iSpellEnabled && iItemRects.Count() > 0 )
+        {
+        TSize newSize ( iItemWidth, KSeparatorLineHeight );
+        if ( newSize != iSeparatorSize )
+            {
+            // Resize seperation bitmaps
+            if( iSeperationBmp )
+                {
+                AknIconUtils::SetSize( iSeperationBmp, newSize, 
+                                        EAspectRatioNotPreserved  );                
+                }
+            
+            if( iSeperationMaskBmp )
+                {
+                AknIconUtils::SetSize( iSeperationMaskBmp, newSize, 
+                                        EAspectRatioNotPreserved  );                    
+                }        
+
+            iSeparatorSize = newSize;
+            }        
+        } 
+    }
+
+// ---------------------------------------------------------------------------
+// Draw candidate control.
+// ---------------------------------------------------------------------------
+//
+void CPenUiCandidateWnd::Draw( const TRect& /*aRect*/ ) const
+    {
+    if ( !IsVisible() || Rect().Size() == TSize(0,0))
+        {
+        return;
+        }
+
+    // Draw background of whole control
+    CWindowGc& gc = SystemGc();       
+    TRect listRect = Rect();
+    gc.Clear( listRect );
+
+    TRect innerRect = listRect;
+    innerRect.Shrink( KInnerRectOffset );
+    AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+                              gc, 
+                              listRect, 
+                              innerRect,
+                              iBgFrId,
+                              KAknsIIDDefault );
+
+    // Draw item
+    for ( TInt i = 0; i < iItemRects.Count(); i++ )
+        {
+        DrawItem( &gc, i );
+        }
+
+    // Draw scroll area
+    if (iNaviBtnShown)
+        {
+        DrawPageButton( &gc, ETrue );
+        DrawPageButton( &gc, EFalse );
+        DrawPageInfo( &gc );
+        }  
+    }
+
+// End Of File
--- a/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -72,10 +72,10 @@
         iAutoRefreshTimer->Cancel();
         }
     delete iAutoRefreshTimer; 
-    
-
-	Clean();
-
+	iPopRegion.Close();
+	iBubblesArea.Close();
+    iBubblesMaskArea.Close();
+	iBubblesPos.Close();
     
 	delete iCursorWnd;   
 }
@@ -126,7 +126,7 @@
         gc.BitBlt(pos, iBitmap, rect);
 #ifdef FIX_FOR_NGA
         //draw bubble
-        for ( TInt i = 0; i < iBubblesCtrl.Count(); ++i )
+        for (TInt i = 0; i < iBubblesArea.Count(); ++i)
             {
             gc.BitBlt(iBubblesPos[i].iTl, iBubblesArea[i]);
             }
@@ -138,7 +138,7 @@
 #ifdef FIX_FOR_NGA
     gc.BitBlt(TPoint(0, 0), iBitmap, Rect());
     //draw bubble
-    for ( TInt i = 0; i < iBubblesCtrl.Count(); ++i )
+    for (TInt i = 0; i < iBubblesArea.Count(); ++i)
         {
         gc.BitBlt(iBubblesPos[i].iTl, iBubblesArea[i]);
         }
@@ -168,9 +168,8 @@
 void CPenUiWndCtrl::Clean()
     {
     iCursorBmp = NULL;
-    iBubblesArea.Close();
-    iBubblesCtrl.Close();
-    iBubblesPos.Close();
+    iBubblesArea.Reset();
+    iBubblesPos.Reset();
 	iBubblesMaskArea.Close();
 	iPopRegion.Close();
     iChangedBmp= NULL;
@@ -276,29 +275,16 @@
         }
     iCursorWnd->SetCursorVisible(aOnFlag);
     }
-
-// ---------------------------------------------------------------------------
-// CPenUiWndCtrl::UpdateBubble
-// ---------------------------------------------------------------------------
-//
-void CPenUiWndCtrl::UpdateBubble( const TUint32 aCtrl, 
-		                          const CFbsBitmap* aBmp,
-		                          const CFbsBitmap* aMask,
-                                  const TRect& aPos,
-                                  TBool aFlag )
+	
+void CPenUiWndCtrl::UpdateBubble(const CFbsBitmap* aBmp,const CFbsBitmap* aMask,
+                                                const TRect& aPos,TBool aFlag)
     {
-
-	// Check whether the Ctrl address is exist
-	TInt idx = iBubblesCtrl.Find( aCtrl );
-
+    TInt idx = iBubblesArea.Find(aBmp);
     
     if(aFlag)
         {
         if(KErrNotFound == idx)
             {
-
-            iBubblesCtrl.Append( aCtrl );
-
             iBubblesArea.Append(aBmp);
             iBubblesMaskArea.Append(aMask);
             iBubblesPos.Append(aPos);
@@ -314,9 +300,6 @@
         //remove
         if(idx != KErrNotFound)
             {
-
-            iBubblesCtrl.Remove( idx );
-
             iBubblesArea.Remove(idx);
             iBubblesMaskArea.Remove(idx);
             iBubblesPos.Remove(idx);            
@@ -330,20 +313,13 @@
     iIcfPos = aPos;
     Invalidate(Rect(), ETrue);   
     }
-
+void CPenUiWndCtrl::UpdateChangedArea(const CFbsBitmap* aBmp,const TRect& aPos,TBool aFlag)
+    {
+    UpdateBubble(aBmp,0,aPos,aFlag);
+    return;
 
-// ---------------------------------------------------------------------------
-// CPenUiWndCtrl::UpdateChangedArea
-// ---------------------------------------------------------------------------
-//
-void CPenUiWndCtrl::UpdateChangedArea( const TUint32 aCtrl, 
-		const CFbsBitmap* aBmp,const TRect& aPos,TBool aFlag)
-    {
-    UpdateBubble( aCtrl, aBmp, 0, aPos, aFlag );
-    return;    
+    
     }
-
-
 void CPenUiWndCtrl::SetPopupArea(const TRect& aRect, TBool aFlag)
     {
     if(aFlag) //add pop area
@@ -397,12 +373,6 @@
     iCursorWnd->SetCursorVisible(EFalse);
     if (iResourceChange)
         {
-        TInt curPriority = iWndGroup.OrdinalPriority();
-        if ( curPriority == -1 )
-            {
-            // Make sure pen ui must be seen.
-            LiftUpPriority();
-            }
         ActivateL();
         iIncallBubble->SetIncallBubbleFlagsL( EAknStatusBubbleInputShow );
         MakeVisible( ETrue );
@@ -425,9 +395,8 @@
 	
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS      
 	
-    if ( iEnableGfxTransEffect && GfxTransEffect::IsRegistered( this ) && !IsVisible())
+    if ( GfxTransEffect::IsRegistered( this ) && !IsVisible())
         {
-        iEnableGfxTransEffect = EFalse;
         this->MakeVisible(EFalse);
         GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort ); 
 
@@ -470,9 +439,9 @@
         return;
         }
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS           
-    if ( iEnableGfxTransEffect && GfxTransEffect::IsRegistered( this ) )
+    if ( GfxTransEffect::IsRegistered( this ))
         {
-        iEnableGfxTransEffect = EFalse;
+
         GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort ); 
 
         //If still visible, do a transition to invisible state.
@@ -754,27 +723,25 @@
             {
             struct SData
                 {
-            	TUint32 ctrl;
                 TBool flag;
                 TRect pos;
                 CFbsBitmap* bmp;
                 CFbsBitmap* mask;
                 } data;
             data = * (reinterpret_cast<SData*>( const_cast<TUint16*>( aEventData.Ptr() )));
-            UpdateBubble( data.ctrl, data.bmp, data.mask, data.pos, data.flag );
+            UpdateBubble(data.bmp,data.mask,data.pos,data.flag);
             }
             break;
         case ESignalUpdateChangedArea:
             {
             struct SData
                 {
-            	TUint32 ctrl;
                 TBool flag;
                 CFbsBitmap* bmp;
                 TRect pos;
                 } data;
             data = * (reinterpret_cast<SData*>( const_cast<TUint16*>( aEventData.Ptr() )));
-            UpdateChangedArea( data.ctrl, data.bmp, data.pos, data.flag );
+            UpdateChangedArea(data.bmp,data.pos,data.flag);
             }
             break;
         case ESignalRegisterBkControl:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputserverapp/penuiwndeventhandler.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation for pen ui window event handler
+*
+*/
+
+#include "peninputserver.h"
+#include "peninputuilayoutowner.h"
+#include "penuiwndeventobserver.h"
+#include "penuiwndeventhandler.h"
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler* CPenUiWndEventHandler::NewL( CPeninputServer* aServer )
+    {
+    CPenUiWndEventHandler* self = CPenUiWndEventHandler::NewLC( aServer );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler* CPenUiWndEventHandler::NewLC( CPeninputServer* aServer )
+    {
+    CPenUiWndEventHandler* self = new (ELeave) CPenUiWndEventHandler( aServer );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler::~CPenUiWndEventHandler()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Signal owner that there is an event
+// ---------------------------------------------------------------------------
+//
+void CPenUiWndEventHandler::SignalOwner( TInt aEventType, 
+                                         const TDesC& aEventData )
+    {
+    if ( iServer )
+        {
+        iServer->SignalOwner( aEventType, aEventData );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Handle layout command event.
+// ---------------------------------------------------------------------------
+//
+void CPenUiWndEventHandler::HandleCommand( TInt aCmd, TUint8* aData )
+    {
+    if ( iServer && iServer->PenUiLayout() )
+        {
+        iServer->PenUiLayout()->HandleCommand( aCmd, aData );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CPenUiWndEventHandler::CPenUiWndEventHandler( CPeninputServer* aServer ) 
+                        : iServer( aServer )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// 2nd phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CPenUiWndEventHandler::ConstructL()
+    {
+    }
+
+// End of File
--- a/textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -336,19 +336,4 @@
     args.Set(KMsgSlot1,&msgData);
     CommandReply(EPeninputOpSetDiscreeptPop,KNullDesC8,args);           
     } 
-
-// ---------------------------------------------------------------------------
-// RPeniputAnim::UpdatePointerEventSuppressor()
-// Update parameters of pointer event suppressor.
-// ---------------------------------------------------------------------------
-//
-void RPeninputAnim::UpdatePointerEventSuppressor( 
-        const TPointerEventSuppressorParameters& aParameters )
-    {
-    TIpcArgs args( TIpcArgs::ENothing );        
-    TPckg<TPointerEventSuppressorParameters> msgData( aParameters );
-    args.Set(KMsgSlot1, &msgData );
-    CommandReply( EPeninputOpUpdatePointerSuppressor, KNullDesC8, args );     
-    }
-
 // End of File
--- a/textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputcommonlayout/BWINS/peninputcommonlayoutU.DEF	Wed Oct 13 14:55:58 2010 +0300
@@ -203,4 +203,4 @@
 	?SetPositionFromOutside@CPeninputCommonLayout@@UAEXABVTPoint@@@Z @ 202 NONAME ; void CPeninputCommonLayout::SetPositionFromOutside(class TPoint const &)
 	?SetPositionFromOutside@CPeninputCommonLayoutExt@@UAEXABVTPoint@@@Z @ 203 NONAME ; void CPeninputCommonLayoutExt::SetPositionFromOutside(class TPoint const &)
 	?HandleShiftAndCapslockBtnClicked@CPeninputLayoutWindowExt@@UAEXXZ @ 204 NONAME ; void CPeninputLayoutWindowExt::HandleShiftAndCapslockBtnClicked(void)
-
+	?EnableToneMarker@CPeninputLayoutWindowExt@@QAEXH@Z @ 205 NONAME ; void CPeninputLayoutWindowExt::EnableToneMarker(int)
--- a/textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputcommonlayout/EABI/peninputcommonlayoutU.DEF	Wed Oct 13 14:55:58 2010 +0300
@@ -316,4 +316,4 @@
 	_ZThn4_N21CPeninputCommonLayout22SetPositionFromOutsideERK6TPoint @ 315 NONAME ; #<thunk>#
 	_ZThn4_N24CPeninputCommonLayoutExt22SetPositionFromOutsideERK6TPoint @ 316 NONAME ; #<thunk>#
 	_ZN24CPeninputLayoutWindowExt32HandleShiftAndCapslockBtnClickedEv @ 317 NONAME
-
+	_ZN24CPeninputLayoutWindowExt16EnableToneMarkerEi @ 318 NONAME
--- a/textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h	Wed Oct 13 14:55:58 2010 +0300
@@ -123,9 +123,6 @@
     //candidate list
     EPentinputHwrCandidateList,    
 	EPeninutWindowCtrlIdMultiRangeBtn,
-	
-	EPeninputWindowCtrlIdSplitIndiBubble,
-	
     EPeninputWindowCtrlIdLastOne,
     
     EPeninutWindowCtrlIdRangeBtn //todo split view
--- a/textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputcommonlayout/inc/peninputlayoutwindowext.h	Wed Oct 13 14:55:58 2010 +0300
@@ -335,15 +335,7 @@
     
     IMPORT_C void CPeninputLayoutWindowExt::SetTextAlignmentL( TInt aAlignment );
        
-    /**
-     * Unlatch the dead key for all kinds of vkb layout
-     *
-     * @since S60 v5.0
-     * @param none
-     * @return void
-     */
-    void CancelDeadKey();
-    
+    IMPORT_C void EnableToneMarker(TBool aEnable);
 protected:
 
     /**
--- a/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -372,82 +372,32 @@
             static_cast<CFepLayoutMultiLineIcf*>( Control(EPeninputWindowCtrlIdMultiLineICF));
             
         multiIcf->SetTextL( aData );
-      
-        if ( iLayoutContext->LayoutType() == EPluginInputModeVkb || 
-             iLayoutContext->LayoutType() == EPluginInputModeFSQ )
-            {
-            TInt lang = CPeninputDataConverter::AnyToInt
-                    ( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) );
-            TInt curRange = CPeninputDataConverter::AnyToInt
-        		    ( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) );
-        		        
-            if ( lang == ELangVietnamese && curRange == ERangeEnglish )  
-                {
-                TBuf<1> preData;
-                multiIcf->ExtractText( preData, aData.iCurSel.LowerPos()-1, 1 );
-                iVowelChar = EFalse;
-                
-                if ( KNullDesC() != preData )
-                    {
-                    for (TUint i = 0; i < sizeof(VietVowelList) / sizeof(TText); ++i)
-                        {
-                        TBuf<1> buf;
-                        buf.Append( VietVowelList[i] );
-                        if (preData == buf)
-                            {
-                            iVowelChar = ETrue;
-                            break;
-                            }
-                        }
-                    }
-                CPeninputVkbCtrlExt* vkbCtrl = static_cast<CPeninputVkbCtrlExt*>
-                    ( Control( EPeninutWindowCtrlIdVkbCtrl ) );
-                vkbCtrl->DimKeySet( iToneSet, !iVowelChar );
-                }
-            }
         }
-    else
-    	{
-        // If in virtual QWERTY mode
-		if ( iLayoutContext->LayoutType() == EPluginInputModeFSQ )
-			{
-			TInt lang = CPeninputDataConverter::AnyToInt
-					( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ));
-			TInt curRange = CPeninputDataConverter::AnyToInt
-					( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ));
-					
-			// When writing language is Vietnamese and range is English
-			if ( lang == ELangVietnamese && curRange == ERangeEnglish )  
-				{
-				TBuf<1> charData;
-				// Get the input character
-				charData.Append( aData.iText );
-				iVowelChar = EFalse;
-				
-                if ( KNullDesC() != charData )
-                    {
-                    // Check whether the input char is in the list of VietVowelList
-                    for ( TUint i = 0; i < sizeof( VietVowelList ) / sizeof( TText ); ++i )
-                        {
-                        TBuf<1> buf;
-                        buf.Append( VietVowelList[i] );
-                        if ( charData == buf )
-                            {
-                            iVowelChar = ETrue;
-                            break;
-                            }
-                        }
-                    }
-                
-                CPeninputVkbCtrlExt* vkbCtrl = static_cast<CPeninputVkbCtrlExt*>
-                    ( Control( EPeninutWindowCtrlIdVkbCtrl ));
-                // Set the dim status of the tone keys
-                vkbCtrl->DimKeySet( iToneSet, !iVowelChar );
-				}
-			}
-    	}
     }  
 
+EXPORT_C void CPeninputLayoutWindowExt::EnableToneMarker(TBool aEnable)
+	{
+    if (iLayoutContext->LayoutType() != EPluginInputModeVkb && 
+    	iLayoutContext->LayoutType() != EPluginInputModeFSQ)
+    	{
+		return;
+    	}
+
+    TInt lang = CPeninputDataConverter::AnyToInt
+			( iLayoutContext->RequestData( EPeninputDataTypeInputLanguage ) );
+	TInt curRange = CPeninputDataConverter::AnyToInt
+			( iLayoutContext->RequestData( EPeninputDataTypeCurrentRange ) );
+
+	if ( lang != ELangVietnamese || curRange != ERangeEnglish )  
+		{
+		return;
+		}
+	
+	iVowelChar = aEnable;
+	CPeninputVkbCtrlExt* vkbCtrl = static_cast<CPeninputVkbCtrlExt*>
+		( Control( EPeninutWindowCtrlIdVkbCtrl ) );
+	vkbCtrl->DimKeySet( iToneSet, !iVowelChar );
+	}
 // ---------------------------------------------------------------------------
 // CPeninputLayoutWindowExt::SetEditorTextL
 // (other items were commented in a header)
@@ -530,57 +480,7 @@
         return ETrue;
         }
     }
-
-// ---------------------------------------------------------------------------
-// CPeninputLayoutWindowExt::CancelDeadKey
-// (other items were commented in a header)
-// ---------------------------------------------------------------------------
-//
-void CPeninputLayoutWindowExt::CancelDeadKey()
-	{
-    // Get the dead key status
-	TInt latchedFlag = CPeninputDataConverter::AnyToInt(
-		iLayoutContext->RequestData( EAkninputDataTypeLatchedSet ));
-	// If the DeadKey is latched, cancel it
-	if ( latchedFlag )
-		{
-		RPointerArray<CPeninputVkbLayoutInfo> vkbListInfo;
-		RPointerArray<CPeninputVkbKeyInfo> keyInfoList;
-		
-		// Get the vkb layout list supportted by current writing language
-		vkbListInfo = iVkbLayout->VkbLayoutInfoList();
-		TInt vkbListNum = vkbListInfo.Count();
-		
-		CVirtualKey* pKey;
-		TBool deadKeyChange = EFalse;
-		
-		// Find the latched DeadKey in all kinds of vkb layout 
-		// which supportted by current writing language
-		for ( TInt i = 0; i < vkbListNum && !deadKeyChange ; i++ )
-			{
-			// Get the key info list in one vkb layout
-			keyInfoList = vkbListInfo[i]->KeyInfoList();
-			TInt keyListNum = keyInfoList.Count();
-			for ( TInt j = 0; j < keyListNum && !deadKeyChange ; j++ )
-				{
-				pKey = keyInfoList[j]->Key();
-				// If the Dead key is latched
-				if ( pKey->Latched())
-					{
-					// Unlatch the DeadKey
-					pKey->SetLatched( EFalse );
-					
-					// Set the DeadKey state
-					iLayoutContext->SetData( 
-						EAkninputDataTypeLatchedSet, &deadKeyChange );
-					
-					deadKeyChange = ETrue;
-					} 
-				}
-			}
-		}	
-	}
-
+  
 // ---------------------------------------------------------------------------
 // CPeninputLayoutWindowExt::ChangeInputLanguageL
 // (other items were commented in a header)
@@ -608,9 +508,6 @@
         
     if ( found ) 
         {
-        // Remove the dead key's latched status
-		CancelDeadKey();
-    
         // Store language
         iLayoutContext->SetData( EPeninputDataTypeInputLanguage, &aLangID );
    
@@ -913,10 +810,45 @@
 //
 EXPORT_C void CPeninputLayoutWindowExt::ChangeVkbLayout( TInt aVkbLayoutId )
     {
-
-	// Remove the dead key's latched status
-	CancelDeadKey();
-
+    TInt latchedFlag = CPeninputDataConverter::AnyToInt(
+                       iLayoutContext->RequestData(EAkninputDataTypeLatchedSet));
+    // If the DeadKey is latched, cancel it and then change the VKB layout
+    if(latchedFlag)
+        {
+        RPointerArray<CPeninputVkbLayoutInfo> vkbListInfo;
+        RPointerArray<CPeninputVkbKeyInfo> keyInfoList;
+        
+        vkbListInfo = iVkbLayout->VkbLayoutInfoList();
+        TInt vkbListNum = vkbListInfo.Count();
+        
+        CVirtualKey* pKey;
+        TBool deadKeyChange = EFalse;
+        // Find the latched DeadKey in all the Vkb layout
+        for(TInt i = 0; i < vkbListNum; i++)
+            {
+            // Get key info list in one VKB layout
+            keyInfoList = vkbListInfo[i]->KeyInfoList();
+            TInt keyListNum = keyInfoList.Count();
+            for(TInt j = 0; j < keyListNum; j++)
+                {
+                pKey = keyInfoList[j]->Key();
+                if(pKey->Latched())
+                    {
+                    // Unlatch the DeadKey
+                    pKey->SetLatched(EFalse);
+                    
+                    // Set the DeadKey state
+                    iLayoutContext->SetData(EAkninputDataTypeLatchedSet, &deadKeyChange);
+                    deadKeyChange = ETrue;
+                    break;
+                    } 
+                }
+            if(deadKeyChange)
+                {
+                break;
+                }
+            }
+        }
     
     TInt curVkbId = CPeninputDataConverter::AnyToInt
         ( iLayoutContext->RequestData( EPeninputDataTypeVkbLayout ) );
--- a/textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss	Wed Oct 13 14:55:58 2010 +0300
@@ -1322,4 +1322,4 @@
             scancode = 0x266B;
             }	
         };
-    }	
+    }	
\ No newline at end of file
--- a/textinput/peninputfingerhwrar/group/iconlist.txt	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/group/iconlist.txt	Wed Oct 13 14:55:58 2010 +0300
@@ -64,3 +64,4 @@
 -c8,8 qgn_indi_input_hwr_arabic_symbol_table.svg
 -c8,8 qgn_indi_input_hwr_arabic_writing_area.svg
 -c8,8 qgn_indi_input_arabic_backspace.svg
+-c8,8 qgn_indi_input_enter.svg
\ No newline at end of file
--- a/textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp	Wed Oct 13 14:55:58 2010 +0300
@@ -43,7 +43,6 @@
 SOURCE    hbufcarrayar.cpp 
 SOURCE    peninputfingerhwrarwritingwnd.cpp
 SOURCE    peninputfingerhwrarnumsymboltable.cpp
-SOURCE    peninputfingerhwarvkbutility.cpp
 
 USERINCLUDE     ../inc
 
@@ -80,9 +79,9 @@
 
 LIBRARY aknlayout.lib
 LIBRARY aknlayout2.lib
-LIBRARY AknLayout2Scalable.lib
-LIBRARY AknIcon.lib
-LIBRARY AKNSKINS.lib
+LIBRARY aknlayout2scalable.lib
+LIBRARY aknicon.lib 
+LIBRARY aknskins.lib
 LIBRARY avkon.lib
 
 LIBRARY centralrepository.lib 
@@ -93,6 +92,6 @@
 LIBRARY peninputpluginutils.lib
 LIBRARY peninputcommonctrls.lib
 LIBRARY peninputcommonlayout.lib
-LIBRARY PtiEngine.lib
+LIBRARY ptiengine.lib
 
 // End Of File
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwarvkbutility.h	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of virtual key ctrl utility for arabic hwr.
-*
-*/
-
-
-#ifndef C_PENINPUTFINGERHWARVKBUTILITY_H
-#define C_PENINPUTFINGERHWARVKBUTILITY_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class TResourceReader;
-class CVirtualKeyboard;
-class CVirtualKey;
-
-// CLASS DECLARATION
-
-/**
- *  The virtual key board utility which implement a set of funtions:
- *  1. create the virutal key
- *  2. load virutal key image
- *  3. load the virtual keys
- * 
- *  @lib peninputfingerhwrar.lib
- *  @since S60 v5.0
- */
-
-class PeninputFingerHwrArVkbUtility
-    {
-public:
-    /**
-	 * Load VKB image
-	 *
-	 */
-    static void LoadVkbKeyImageL(CVirtualKeyboard& aVkbCtrl, TInt aResId, const TSize& aKeySize);
-	
-	/**
-	 * Load virutal Key and set key rects.
-	 *
-	 */
-	static void LoadVirtualKeypadKeyL(CVirtualKeyboard& aVkbCtrl, const TInt aResId, const RArray<TRect>& aCellRects);
-
-    /** 
-	 * create a new virtual key
-	 *
-	 */
-	static CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect& aKeyRect);
-	
-	/**
-	 * update the virtal key
-	 *
-	 */
-	static void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, const TRect& aKeyRect );
-    };
-
-#endif // C_PENINPUTFINGERHWARVKBUTILITY_H
-
-//  End Of File
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h	Wed Oct 13 14:55:58 2010 +0300
@@ -137,6 +137,14 @@
      */
     TInt PrimaryRange();
     
+    /**
+     * Get current range
+     *
+     * @since Symbian TB9.2
+     * @return Current range.
+     */   
+    TFingerHwrRange CurrentRange();
+    
      
     /**
      * Set case
@@ -448,6 +456,11 @@
     RArray<TInt> iPermittedRanges;
     
     /**
+     * Current range
+     */
+    TFingerHwrRange iCurrentRange;
+    
+    /**
      * Permitted range in int format
      */
     TInt iIntRange;
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h	Wed Oct 13 14:55:58 2010 +0300
@@ -153,13 +153,6 @@
      */       
     TInt IcfTextHeight();
     
-    /**
-     * get indicator bubble rect.
-     * 
-     * @since Symbian TB9.2
-     * @return bubble rect.
-     */
-    TRect IndicatorBubbleRect();
 public: //buttons
     
     /**
@@ -499,11 +492,6 @@
     TInt iIcfTextAlignment;
     CFont* iIcfFont;
     
-    /**
-     * Msg indicator bubble.
-     */
-    TRect iRectIndicatorBubble;
-    
 	/**
 	 * Candidate laf
 	 */
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h	Wed Oct 13 14:55:58 2010 +0300
@@ -30,6 +30,8 @@
 class CPeninputFingerHwrArDataStore;
 class CRepository;
 class CPeninputFingerHwrArWnd;
+class CPeninputFingerHwrArCallBack;
+
 // class DECLARATIONS
 
 /**
@@ -509,12 +511,19 @@
      */
     CRepository* iRepositorySetting;
     
+    /**
+     * repository object.
+     */
+//    CRepository* iCommonEngineRepository;    
+    
 	/**
 	 * Check if the stroke of drawing the character on the 
 	 * HWR box is started
 	 */
 	TBool iIsStrokeOfDrawingCharacerStarted;
 	
+	CPeninputFingerHwrArCallBack* iCallBack;
+	
 	/**
 	 * Check if the editor is MFNE
 	 */
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h	Wed Oct 13 14:55:58 2010 +0300
@@ -100,7 +100,8 @@
 	 * sizechanged
 	 *
 	 */
-	void SizeChanged(const TRect& aVirtualKeypadRect);
+	void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects,
+                     const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue);
     
 	/**
 	 * Load VKB image
@@ -121,6 +122,12 @@
 	inline CVirtualKeyboard* KeyPad(){return iNumKeypad;}
     
 	/**
+	 * Navigate page
+	 *
+	 */
+	void UpdateNumSymbolTable(TInt aNumSctType = ENumSCTLatin);
+    
+	/**
 	 * Construct from resource
 	 * This funciton will be called when the resource has changed for example skin was changed
 	 */
@@ -133,7 +140,7 @@
      * @param aNumMapping a string contains numbers and related char. max length is 16.
      * @return none
      */
-    void UpdateTableSymbol( const TDesC& aNumMapping );
+    void SetNumericMapping( const TDesC& aNumMapping );
     
     /*
      * set arabic number mode.
@@ -142,14 +149,6 @@
      * @return none.
      */
     void SetNativeNumMode(const TBool aIsNativeNumMode);
-
-    /**
-     * Update the virtual keys rect.
-     * @since s60 5.2.
-     * @param aCellRects keypad cell rects.
-     * @return None.
-     */
-    void UpdateAllVirtualKeysRect(const RArray<TRect> & aCellRects);
 protected: //virtuals from CControlGroup (CFepUiBaseCtrl)
 
     /**
@@ -208,6 +207,20 @@
      */
 	void CreateVirtualKeypadL();
 	
+	/** 
+	 * create a new virtual key
+	 *
+	 */
+	CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect);
+	
+	/**
+	 * update the virtal key
+	 *
+	 */
+	void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, 
+	                    const TRect aKeyRect );
+    void OnActivate();
+	
 	/**
 	 * Update the virtual key feedback
 	 *
@@ -218,14 +231,7 @@
 	 * Draw group control
 	 */
 	void Draw();
-
-private:
-	/**
-	 * Refresh the symbol table
-	 *
-	 */
-	void RefreshNumSymbolTable();
-		
+	
 	/**
 	 * Load background from resource
 	 *
@@ -236,13 +242,6 @@
 	 * map latin number to arabic number.
 	 */
 	TInt16 MapLatinNumAccordingToNumMode(TInt16 aUnicode);
-	
-	/**
-	 * Generate the char talbe according to the aNumMapping
-	 *
-	 */
-	HBufC* GenerateCharTable(const TDesC& aNumMapping);
-	
 private:
     /**
 	 * multipage viritual keyboard
@@ -255,6 +254,12 @@
      */
     TBool iPopupVisible;
 	
+	/**
+	 * store the layout mode
+	 */
+	TBool iIsLandscape;
+	
+    TInt iCurrentNumSCTType;	
     /*
      * Default number mode.
      */
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h	Wed Oct 13 14:55:58 2010 +0300
@@ -100,7 +100,7 @@
 	 * sizechanged
 	 *
 	 */
-	void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> & aBtnRects,
+	void SizeChanged(const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects,
                      const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue);
     
 	/**
@@ -223,6 +223,20 @@
      */     
     void MoveIconButton( CAknFepCtrlEventButton* aButton, const TRect& aRect, 
             TInt aXPadding=0, TInt aYPadding=0, TBool aReloadImages=ETrue );
+    
+	/** 
+	 * create a new virtual key
+	 *
+	 */
+	CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect);
+	
+	/**
+	 * update the virtal key
+	 *
+	 */
+	void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, 
+	                    const TRect aKeyRect );
+    void OnActivate();
 	
 	/**
 	 * Show the visible page button
--- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h	Wed Oct 13 14:55:58 2010 +0300
@@ -504,8 +504,7 @@
      * @param aCellRects rects of virtual keys.
      * @return None
      */      
-    void LoadNumSymbolVirtualKeysL( const TInt aResId, 
-            const RArray<TRect>& aCellRects, TBool aReload = ETrue );
+    void LoadNumSymbolVirtualKeysL( const TInt aResId, const RArray<TRect>& aCellRects );
     
     /**
      * relayout full ui, reset all controls position. 
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwarvkbutility.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of virtual key ctrl utility for arabic hwr.
-*
-*/
-
-// INCLUDE
-#include <e32std.h>
-#include <barsread.h>
-#include <coemain.h>
-
-#include "peninputfingerhwarvkbutility.h"
-#include "peninputlayoutvkb.h"
-#include "peninputpluginutils.h"
-#include "hbufcarrayar.h"
-#include "peninputfingerhwrarstoreconstants.h"
-
-// ---------------------------------------------------------------------------
-// Load virtual keys image
-// ---------------------------------------------------------------------------
-//
-void PeninputFingerHwrArVkbUtility::LoadVirtualKeypadKeyL(CVirtualKeyboard& aVkbCtrl, const TInt aResId, const RArray<TRect>& aCellRects)        
-    {
-    aVkbCtrl.SetResourceId(aResId);
-	
-	TResourceReader reader;
-    CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
-
-    // construct keys
-    TInt resKeyCount = reader.ReadInt16();
-    TInt existsKeyCount = aVkbCtrl.KeyArray().Count();
-    TInt rectCount = aCellRects.Count();
-    
-    for ( TInt i = 0; i < resKeyCount; i++ )
-        {
-        if ( i < existsKeyCount )
-            {
-            CVirtualKey* vk = aVkbCtrl.KeyArray()[i];
-            UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] );
-            }
-        else
-            {
-            CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] );
-            CleanupStack::PushL( vk );
-            aVkbCtrl.AddKeyL( vk );
-            
-            CleanupStack::Pop( vk );
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( 1 ); // reader
-    
-    aVkbCtrl.Draw();
-    aVkbCtrl.UpdateArea( aVkbCtrl.Rect() );
-    }
-
-// ---------------------------------------------------------------------------
-// Create the virtual key
-// ---------------------------------------------------------------------------
-//
-CVirtualKey* PeninputFingerHwrArVkbUtility::CreateVkbKeyL(TResourceReader& aReader,const TRect& aKeyRect)
-	{
-	CHBufCArray* keytexts = CHBufCArray::NewL();
-    CleanupStack::PushL( keytexts );
-    
-    for ( TInt i = 0; i <= EPosLast; i++ )
-        {
-        HBufC* unicode = aReader.ReadHBufCL();
-        keytexts->Array().AppendL( unicode );
-        }
-
-    TInt keyscancode = aReader.ReadInt16();
-
-    HBufC* text = keytexts->Array()[0];
-    
-    CVirtualKey* vk = NULL;
-    if ( text )
-        {
-        vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 );
-        }
-    else 
-        {
-        vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 );
-        }
-
-    CleanupStack::PopAndDestroy( keytexts ); //keytexts
-
-    
-    TRect innerrect = aKeyRect;
-    innerrect.Shrink( TSize(10, 10) );
-    vk->SetInnerRect( innerrect );
-    
-    return vk;
-	}
-
-// ---------------------------------------------------------------------------
-// Load virtual keys image
-// ---------------------------------------------------------------------------
-//	
-void PeninputFingerHwrArVkbUtility::LoadVkbKeyImageL(CVirtualKeyboard& aVkbCtrl, TInt aResId, const TSize& aKeySize)
-    {
-	TResourceReader reader;    
-    CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );      
-    
-    TPtrC bmpFileName = reader.ReadTPtrC();
-    TInt32 imgMajorSkinId = reader.ReadInt32();
-    TAknsItemID id;
-    
-    TSize keySize = aKeySize;
-    
-    for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 )
-        { 
-        // Get the image ids and mask ids from resource
-        TInt bmpId = reader.ReadInt16(); 
-        TInt bmpMskId = reader.ReadInt16();
-        
-        // read skin item id
-        const TInt skinitemid = reader.ReadInt16();
-        id.Set( TInt( imgMajorSkinId ), skinitemid );
-        
-        if ( bmpId != KInvalidImg )
-            {
-            CFbsBitmap* bmp = NULL;
-            CFbsBitmap* maskbmp = NULL;
-
-            if ( bmpMskId != KInvalidImg )
-                {
-                AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
-                   id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
-                
-                // set maskbmp and size
-                AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved );
-                aVkbCtrl.SetNonIrregularKeyBitmapL(TVirtualKeyBmpType(EKeyBmpNormal + index + 1 ),maskbmp);
-                }
-            else
-                {
-                AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id, 
-                    bmp, bmpFileName, bmpId );
-                }
-            // set bmp and size
-            AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved );
-            aVkbCtrl.SetNonIrregularKeyBitmapL(TVirtualKeyBmpType( EKeyBmpNormal + index ),bmp);
-            }       
-        }
-    // Pop and destroy reader
-    CleanupStack::PopAndDestroy( 1 );        
-	}
-
-// ---------------------------------------------------------------------------
-// update virtual key info.
-// ---------------------------------------------------------------------------
-//
-void PeninputFingerHwrArVkbUtility::UpdateVkbKeyL(CVirtualKey* aVirtualKey, TResourceReader& aReader, const TRect& aKeyRect)
-    {
-    CHBufCArray* keytexts = CHBufCArray::NewL();
-    CleanupStack::PushL( keytexts );
-    
-    for ( TInt i = 0; i <= EPosLast; i++ )
-        {
-        HBufC* unicode = aReader.ReadHBufCL();
-        keytexts->Array().AppendL( unicode );
-        }
-
-    TInt keyscancode = aReader.ReadInt16();
-
-    HBufC* text = keytexts->Array()[0];
-    if ( text )
-        {
-        aVirtualKey->SetKeyData( *text );
-        }
-    else
-        {
-        aVirtualKey->SetKeyData( KNullDesC );
-        }
-    
-    aVirtualKey->SetKeyScancode( keyscancode );
-
-    CleanupStack::PopAndDestroy( keytexts ); //keytexts
-
-    aVirtualKey->SetRect(aKeyRect);
-    TRect innerrect = aKeyRect;
-    innerrect.Shrink( TSize(2,2) );
-    aVirtualKey->SetInnerRect( innerrect );
-    }
-          
-//  End Of File
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -24,7 +24,6 @@
 #include <aknfeppeninputenums.h>
 #include <AknFepGlobalEnums.h>
 #include <AknFepInternalCRKeys.h>
-#include <peninputcommonlayoutglobalenum.h>
 
 //USER INCLUDE
 #include "peninputfingerhwrarlayout.h"
@@ -73,6 +72,7 @@
 
     delete iRepositoryFep;
     delete iCommonEngineRepository;
+//    delete iTriggerStr;   
     delete iHwrEngine;
     delete iUserDefinedResource;
     
@@ -157,10 +157,6 @@
         {
         iPermittedRanges.Append( ERangeNative );
         }
-    if ( aPermittedRanges & ERangeNativeNumber )
-        {
-        iPermittedRanges.Append( ERangeNativeNumber );
-        }
     if ( aPermittedRanges & ERangeEnglish )
         {
         iPermittedRanges.Append( ERangeEnglish );
@@ -203,6 +199,15 @@
 	}
 	
 // ----------------------------------------------------------------------------
+// get current range
+// ----------------------------------------------------------------------------
+//
+TFingerHwrRange CPeninputFingerHwrArDataStore::CurrentRange()
+	{
+	return iCurrentRange;
+	}
+
+// ----------------------------------------------------------------------------
 // Set case
 // ----------------------------------------------------------------------------
 //
@@ -700,7 +705,7 @@
 //  
 TBool CPeninputFingerHwrArDataStore::IsNumberOnlyMode()
     {
-    if(PrimaryRange() == ERangeNumber || PrimaryRange() == ERangeNativeNumber)
+    if(PrimaryRange() == ERangeNumber)
         {
         return ETrue;
         }
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -16,14 +16,12 @@
 */
 
 
-//SYSTEM INCLUDES
+//FEP INCLUDES
 #include <AknFepGlobalEnums.h>
 #include <aknfeppeninputenums.h>
 #include <PtiHwrRecognizer.h>
 #include <e32property.h>
-#include <peninputcommonlayoutglobalenum.h>
-
-#include "PtiDefs.h"
+#include "ptidefs.h"
 
 //USER INCLUDES
 #include "peninputfingerhwrarengine.h"
@@ -369,13 +367,6 @@
             aRecognitionRange.iSubRange = EPtiRangeNumber;
             }
             break;
-        case ERangeNativeNumber:
-            {
-            //convert to ERangeNumber to let engine recognize both native number
-            //and latin number. 
-            aRecognitionRange.iSubRange = EPtiRangeNumber;
-            }
-            break;
         default:
             break;
         }
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -156,18 +156,6 @@
  	
 	// get font for text
     iIcfFont = const_cast<CFont*>(AknLayoutUtils::FontFromId(icfTextLineLayoutRow1.iFont, NULL));
-    
-    //indicator bubble.
-#ifdef ARABIC_LAF
-    if(iIsLandscape)
-        {
-        iRectIndicatorBubble.SetRect(543,17,624,41);
-        }
-    else
-        {
-        iRectIndicatorBubble.SetRect(263,17,344,41);
-        }
-#endif    
 	}
 
 // ---------------------------------------------------------------------------
@@ -1094,14 +1082,6 @@
     return iIcfTextHeight;
     }
        
-// ---------------------------------------------------------------------------
-// get indicator bubble rect.
-// ---------------------------------------------------------------------------
-// 
-TRect CPeninputFingerHwrArLafManager::IndicatorBubbleRect()
-    {
-    return iRectIndicatorBubble;
-    }
 
 // ---------------------------------------------------------------------------
 // get inner padding of buttons.
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -49,6 +49,46 @@
 
 const TInt16 KEmotionKeyMark = 0xFFFE;
 
+class CPeninputFingerHwrArCallBack : public CActive
+    {
+    friend class CPeninputFingerHwrArLayout;
+public:
+    void IssueRequestL();
+private:
+    CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout);
+	void RunL();
+	void DoCancel();
+private:
+    CPeninputFingerHwrArLayout* iHwrArLayout;
+	};
+
+CPeninputFingerHwrArCallBack::CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout)
+    :CActive(EPriorityHigh)
+    {
+	CActiveScheduler::Add(this);
+	iHwrArLayout = aHwrArLayout;
+	}
+void CPeninputFingerHwrArCallBack::IssueRequestL()
+    {
+    if(!IsActive())
+        {
+        iStatus=KRequestPending;
+        SetActive();        
+        TRequestStatus *pS=(&iStatus);
+        
+        User::RequestComplete(pS,0);
+        }
+    }
+void CPeninputFingerHwrArCallBack::RunL()
+    {
+    iHwrArLayout->CallBackL();
+    }
+
+void CPeninputFingerHwrArCallBack::DoCancel()
+    {
+    
+    }
+
 // ============================ MEMBER FUNCTIONS =============================
 
 // ---------------------------------------------------------------------------
@@ -101,7 +141,9 @@
 	
 	//retrieve the settings
     LoadAndPublishDefaultL();
-
+	
+    //iCallBack = new (ELeave) CPeninputFingerHwrArCallBack(this);
+    
     //set screen layout extent
     SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) );
     }
@@ -585,7 +627,17 @@
 
     iRepositorySetting->Get( KSettingsPenInputLang, newValue );
     iDataStore->SetLanguageL( newValue );
-
+    
+//    TInt displayLang = 0;
+//    iCommonEngineRepository->Get(KGSDisplayTxtLang,displayLang);
+//    if(displayLang == ELangArabic)
+//        {
+//        iHwrWnd->SetNativeNumMode(ETrue);
+//        }
+//    else
+//        {
+//        iHwrWnd->SetNativeNumMode(EFalse);
+//        }
     iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode());
     }
 
@@ -622,6 +674,8 @@
 	delete iStateMgr;
     delete iGSRepositoryWatcher;
     delete iRepositorySetting;
+//    delete iCommonEngineRepository;
+    //delete iCallBack;
     }
 
 // ---------------------------------------------------------------------------
@@ -878,6 +932,7 @@
 //                                              
 void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL()
     {
+    //iCallBack->IssueRequestL(); 
 	iHwrWnd->HideIndicator();
 	
 	// The default candidate cell is not highlight
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -28,7 +28,7 @@
 #include <AknLayoutDef.h>
 #include <AknUtils.h>
 #include <AknsUtils.h>
-#include <AknIconUtils.h>
+#include <akniconutils.h>
 #include <aknfeppeninputenums.h>
 #include <AknFepGlobalEnums.h>
 
@@ -41,9 +41,8 @@
 #include "peninputfingerhwrarstoreconstants.h"
 #include "peninputlayoutvkb.h"
 #include "peninputfingerhwrarnumsymboltable.h"
-#include "peninputfingerhwarvkbutility.h"
 
-const TUint16 KInvalidChar = 0xFFFF;
+
 // ---------------------------------------------------------------------------
 // Symbian Constructor
 // ---------------------------------------------------------------------------
@@ -100,25 +99,9 @@
     {
     CapturePointer( ETrue );
     iPopupVisible = ETrue; 
-    UiLayout()->LockArea(UiLayout()->Rect(),this);
-    // signal server to add the pop area        
-    if(UiLayout()->NotDrawToLayoutDevice())
-        {
-        struct SData
-            {
-            TRect rr;
-            TBool flag;
-            } data;
-            
-        data.rr = iNumKeypad->Rect();
-        data.flag = ETrue;
-        TPtrC ptrForAdd;
-        ptrForAdd.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
-
-        UiLayout()->SignalOwner(ESignalPopupArea,ptrForAdd);
-        }
-    
-    RefreshNumSymbolTable();;
+    iCurrentNumSCTType = ENumSCTLatin;
+	UiLayout()->LockArea(UiLayout()->Rect(),this);  
+    UpdateNumSymbolTable(ENumSCTLatin);
 	}
 
 // ---------------------------------------------------------------------------
@@ -129,22 +112,6 @@
     {
     CapturePointer( EFalse );
     iPopupVisible = EFalse;
-    // signal server to remove the pop area        
-    if(UiLayout()->NotDrawToLayoutDevice())
-        {
-        struct SData
-            {
-            TRect rr;
-            TBool flag;
-            } data;
-            
-        data.rr = iNumKeypad->Rect();
-        data.flag = EFalse;
-        TPtrC ptrForRemove;
-        ptrForRemove.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
-
-        UiLayout()->SignalOwner(ESignalPopupArea,ptrForRemove);
-        }    
     UiLayout()->UnLockArea(UiLayout()->Rect(),this);
     }
 
@@ -243,10 +210,15 @@
 // SizeChanged
 // ---------------------------------------------------------------------------
 //	
-void CPeninputArabicFingerHwrNumSymbolTable::SizeChanged(const TRect& aVirtualKeypadRect)
+void CPeninputArabicFingerHwrNumSymbolTable::SizeChanged(
+                     const TRect aVirtualKeypadRect, const RArray<TRect> /*aBtnRects*/,
+                     const TInt /*aKeypadRow*/, const TInt /*aKeypadCol*/, TBool aIsLandscape)
     {
+	iIsLandscape = aIsLandscape;
+	
 	// relayout the virtual key pad
 	iNumKeypad->SetRect(aVirtualKeypadRect);
+	
 	}
 	
 // ---------------------------------------------------------------------------
@@ -275,6 +247,11 @@
     iNumKeypad->SetDrawOpaqueBackground( EFalse );    
     }
 
+void CPeninputArabicFingerHwrNumSymbolTable::OnActivate()
+    {
+    CControlGroup::OnActivate();
+	}
+
 // ---------------------------------------------------------------------------
 //  Read control's background info.
 // ---------------------------------------------------------------------------
@@ -362,7 +339,53 @@
 //	
 void CPeninputArabicFingerHwrNumSymbolTable::LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize)
     {
-    PeninputFingerHwrArVkbUtility::LoadVkbKeyImageL(*iNumKeypad,aResId,aKeySize);
+	TResourceReader reader;    
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );      
+    
+    TPtrC bmpFileName = reader.ReadTPtrC();
+    TInt32 imgMajorSkinId = reader.ReadInt32();
+    TAknsItemID id;
+    
+    TSize keySize = aKeySize;
+    
+    for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 )
+        { 
+        // Get the image ids and mask ids from resource
+        TInt bmpId = reader.ReadInt16(); 
+        TInt bmpMskId = reader.ReadInt16();
+        
+        // read skin item id
+        const TInt skinitemid = reader.ReadInt16();
+        id.Set( TInt( imgMajorSkinId ), skinitemid );
+        
+        if ( bmpId != KInvalidImg )
+            {
+            CFbsBitmap* bmp = NULL;
+            CFbsBitmap* maskbmp = NULL;
+
+            if ( bmpMskId != KInvalidImg )
+                {
+                AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+                   id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
+                
+                // set maskbmp and size
+                AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved );
+                iNumKeypad->SetNonIrregularKeyBitmapL( 
+                TVirtualKeyBmpType( EKeyBmpNormal + index + 1 ), maskbmp );
+                }
+            else
+                {
+                AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id, 
+                    bmp, bmpFileName, bmpId );
+                }
+            // set bmp and size
+            AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved );
+            iNumKeypad->SetNonIrregularKeyBitmapL( 
+                TVirtualKeyBmpType( EKeyBmpNormal + index ), bmp );
+            }       
+        }
+    // Pop and destroy reader
+    CleanupStack::PopAndDestroy( 1 );        
 	}
 
 // ---------------------------------------------------------------------------
@@ -371,57 +394,124 @@
 //	
 void CPeninputArabicFingerHwrNumSymbolTable::LoadVirtualKeypadKeyL(const TInt aResId, const RArray<TRect>& aCellRects)
     {
-	PeninputFingerHwrArVkbUtility::LoadVirtualKeypadKeyL(*iNumKeypad,aResId,aCellRects);
+	iNumKeypad->SetResourceId(aResId);
+	
+	TResourceReader reader;
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
+
+    // construct keys
+    TInt resKeyCount = reader.ReadInt16();
+    TInt existsKeyCount = iNumKeypad->KeyArray().Count();
+    TInt rectCount = aCellRects.Count();
+    
+    for ( TInt i = 0; i < resKeyCount; i++ )
+        {
+        if ( i < existsKeyCount )
+            {
+            CVirtualKey* vk = iNumKeypad->KeyArray()[i];
+            UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] );
+            }
+        else
+            {
+            CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] );
+            CleanupStack::PushL( vk );
+            iNumKeypad->AddKeyL( vk );
+            
+            CleanupStack::Pop( vk );
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( 1 ); // reader
+    
+    iNumKeypad->Draw();
+    iNumKeypad->UpdateArea( iNumKeypad->Rect() );
 	}
 
 // ---------------------------------------------------------------------------
+// create virtual key.
+// ---------------------------------------------------------------------------
+//
+CVirtualKey* CPeninputArabicFingerHwrNumSymbolTable::CreateVkbKeyL( TResourceReader& aReader, 
+    const TRect aKeyRect )
+    {
+    CHBufCArray* keytexts = CHBufCArray::NewL();
+    CleanupStack::PushL( keytexts );
+    
+    for ( TInt i = 0; i <= EPosLast; i++ )
+        {
+        HBufC* unicode = aReader.ReadHBufCL();
+        keytexts->Array().AppendL( unicode );
+        }
+
+    TInt keyscancode = aReader.ReadInt16();
+
+    HBufC* text = keytexts->Array()[0];
+    
+    CVirtualKey* vk = NULL;
+    if ( text )
+        {
+        vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 );
+        }
+    else 
+        {
+        vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 );
+        }
+
+    CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+    
+    TRect innerrect = aKeyRect;
+    innerrect.Shrink( TSize(10, 10) );
+    vk->SetInnerRect( innerrect );
+    
+    return vk;
+    }
+
+// ---------------------------------------------------------------------------
+// update virtual key info.
+// ---------------------------------------------------------------------------
+//
+void CPeninputArabicFingerHwrNumSymbolTable::UpdateVkbKeyL( CVirtualKey* aVirtualKey, 
+    TResourceReader& aReader, const TRect aKeyRect )
+    {
+    CHBufCArray* keytexts = CHBufCArray::NewL();
+    CleanupStack::PushL( keytexts );
+    
+    for ( TInt i = 0; i <= EPosLast; i++ )
+        {
+        HBufC* unicode = aReader.ReadHBufCL();
+        keytexts->Array().AppendL( unicode );
+        }
+
+    TInt keyscancode = aReader.ReadInt16();
+
+    HBufC* text = keytexts->Array()[0];
+    if ( text )
+        {
+        aVirtualKey->SetKeyData( *text );
+        }
+    else
+        {
+        aVirtualKey->SetKeyData( KNullDesC );
+        }
+    
+    aVirtualKey->SetKeyScancode( keyscancode );
+
+    CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+    aVirtualKey->SetRect(aKeyRect);
+    TRect innerrect = aKeyRect;
+    innerrect.Shrink( TSize(10,10) );
+    aVirtualKey->SetInnerRect( innerrect );
+    }
+
+// ---------------------------------------------------------------------------
 // accept editor's number mapping restriction.
 // ---------------------------------------------------------------------------
 //
-void CPeninputArabicFingerHwrNumSymbolTable::UpdateTableSymbol( const TDesC& aNumMapping )
+void CPeninputArabicFingerHwrNumSymbolTable::SetNumericMapping( const TDesC& aNumMapping )
     {
-    HBufC* charTable = GenerateCharTable(aNumMapping);
-    if(charTable)
-    	{
-    	TInt charTalbeCount = charTable->Length();
-     
-	    //numberpad
-	    TInt keyCount = iNumKeypad->KeyArray().Count();
-	    for ( TInt i = 0; i < keyCount; i++ )
-	        {
-	        CVirtualKey* vk = iNumKeypad->KeyArray()[i];
-	        
-	        if(i < charTalbeCount && (*charTable)[i] != KInvalidChar)
-	            {
-	            TBuf<1> keydata;
-                TUint16 keyCode = (*charTable)[i];	            
-	            keydata.Append(keyCode);
-	            vk->SetKeyData(keydata);
-	            vk->SetKeyScancode(keyCode);
-	            vk->SetDimmed( EFalse );
-	            }
-	        else
-	            {
-	            vk->SetKeyData( KNullDesC );
-	            vk->SetKeyScancode( KInvalidChar );
-	            vk->SetDimmed( EFalse );
-	            }
-	        }
-	    
-	    delete charTable;
-	    
-	    //sync feedback
-	    UpdateAllVirtualKeysFeedback();
-    	}
-    }
-
-// ---------------------------------------------------------------------------
-// Get reordered char table for key pad to render them
-// ---------------------------------------------------------------------------
-//
-HBufC* CPeninputArabicFingerHwrNumSymbolTable::GenerateCharTable(const TDesC& aNumMapping)
-	{
-	//format of aNumMapping is "0123456789******"
+    //format of aNumMapping is "0123456789******"
     
     //char offset in aNumMapping
     //cell 0 using aNumMapping[KNumOffsets[0]]
@@ -433,36 +523,49 @@
          14,  7,  8, 9,
          15,  10, 0, 11
         };
-    TInt tableSize = sizeof(KNumOffsets)/sizeof(TInt);
+    
+    TInt maxMappingItemCount = sizeof(KNumOffsets)/sizeof(TInt);
     TInt mappingItemCount = aNumMapping.Length();
     
-    HBufC* reorderedCharTable = HBufC::New(mappingItemCount +1);
-    if(reorderedCharTable)
-    	{
-    	for(TInt i = 0; i < tableSize; i++)
-    	    {    	    
-    	    if(KNumOffsets[i] < mappingItemCount)
-    	    	{
-    	    	TUint16 unicode = aNumMapping[KNumOffsets[i]];
-                TUint16 mappedCode = MapLatinNumAccordingToNumMode(unicode);	
-                reorderedCharTable->Des().Append(mappedCode); 
-    	    	}
-    	    else
-    	    	{
-    	        reorderedCharTable->Des().Append(KInvalidChar);
-    	    	}	
-    	    }
-    	}
+    //numberpad
+    TInt keyCount = iNumKeypad->KeyArray().Count();
+    for ( TInt i = 0; i < keyCount; i++ )
+        {
+        CVirtualKey* vk = iNumKeypad->KeyArray()[i];
+        
+        TInt offset = ( i < maxMappingItemCount ) ? KNumOffsets[i] : -1;
+        
+        if ( offset > -1  && offset < mappingItemCount )
+            {
+            TUint16 unicode = aNumMapping[offset];
+            TUint16 mappedCode = MapLatinNumAccordingToNumMode(unicode);
+            TBuf<1> keydata;
+            keydata.Append(mappedCode);
+            vk->SetKeyData(keydata);
+            vk->SetKeyScancode( mappedCode);
+            vk->SetDimmed( EFalse );
+            }
+        else
+            {
+            vk->SetKeyData( KNullDesC );
+            vk->SetKeyScancode( 0xFFFF );
+            vk->SetDimmed( EFalse );
+            }
+        }
     
-    return reorderedCharTable;	    
-	}
-	
+    
+    //sync feedback
+    UpdateAllVirtualKeysFeedback();
+    }
+
 // ---------------------------------------------------------------------------
 // Navigate the symbol page
 // ---------------------------------------------------------------------------
 //
-void CPeninputArabicFingerHwrNumSymbolTable::RefreshNumSymbolTable()
-    {
+void CPeninputArabicFingerHwrNumSymbolTable::UpdateNumSymbolTable( TInt aNumSctType)
+    {	
+
+    iCurrentNumSCTType = aNumSctType;
 	// Draw the symbol table 
     Draw();
 	
@@ -479,7 +582,7 @@
 //
 void CPeninputArabicFingerHwrNumSymbolTable::UpdateAllVirtualKeysFeedback()
     {
-    //update numpad keys
+    //update sctpad keys
     TInt keyCount = iNumKeypad->KeyArray().Count();
     for ( TInt i = 0; i < keyCount; i++ )
         {
@@ -490,30 +593,6 @@
     }
 
 // ---------------------------------------------------------------------------
-//  update rect of all virtual keys.
-// ---------------------------------------------------------------------------
-//
-void CPeninputArabicFingerHwrNumSymbolTable::UpdateAllVirtualKeysRect(const RArray<TRect> & aCellRects)
-    {
-    //update numpad keys rect
-    TInt keyCount = iNumKeypad->KeyArray().Count();
-    TInt rectCount = aCellRects.Count();
-    if(keyCount != rectCount)
-        {
-        return;
-        }
-    for ( TInt i = 0; i < keyCount; i++ )
-        {
-        CVirtualKey* vk = iNumKeypad->KeyArray()[i];
-        TRect rect = aCellRects[i%rectCount];        
-        vk->SetRect(aCellRects[i%rectCount]);
-        TRect innerrect = rect;
-        innerrect.Shrink( TSize(10,10) );
-        vk->SetInnerRect( innerrect );
-        }    
-    }
-
-// ---------------------------------------------------------------------------
 //  Draw new content to the screen
 // ---------------------------------------------------------------------------
 //
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -28,7 +28,7 @@
 #include <AknLayoutDef.h>
 #include <AknUtils.h>
 #include <AknsUtils.h>
-#include <AknIconUtils.h>
+#include <akniconutils.h>
 #include <aknfeppeninputenums.h>
 #include <AknFepGlobalEnums.h>
 
@@ -41,7 +41,7 @@
 #include "peninputfingerhwrarstoreconstants.h"
 #include "peninputfingerhwrarmultipagevkb.h"
 #include "peninputfingerhwrarsymboltable.h"
-#include "peninputfingerhwarvkbutility.h"
+
 
 //CONST DEFINATION
 const TInt KSymbolButtonInnerPadding = 6;
@@ -216,16 +216,14 @@
 // ---------------------------------------------------------------------------
 //	
 void CPeninputArabicFingerHwrSymbolTable::SizeChanged(
-                     const TRect aVirtualKeypadRect, const RArray<TRect> & aBtnRects,
+                     const TRect aVirtualKeypadRect, const RArray<TRect> aBtnRects,
                      const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape)
     {
-	ASSERT(aBtnRects.Count() > 0);
-	
 	iIsLandscape = aIsLandscape;
 	
 	// relayout the button
-	TRect pageBtnRect = aBtnRects[0];
-    
+	TRect pageBtnRect(aBtnRects[0]);
+
 	if(aIsLandscape)
 	    {
 	    i2Page1Btn->Hide(EFalse);
@@ -255,7 +253,7 @@
 	
 	iMutiPageKeypad->UpdatePaging(aKeypadRow,aKeypadCol);
 	}
-
+	
 // ---------------------------------------------------------------------------
 // create symbol table keypad.
 // ---------------------------------------------------------------------------
@@ -332,6 +330,11 @@
     aButton->SizeChanged( aRect, rcInner, aReloadImages );
     }
 
+void CPeninputArabicFingerHwrSymbolTable::OnActivate()
+    {
+    CControlGroup::OnActivate();
+	}
+
 // ---------------------------------------------------------------------------
 //  Read control's background info.
 // ---------------------------------------------------------------------------
@@ -419,7 +422,53 @@
 //	
 void CPeninputArabicFingerHwrSymbolTable::LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize)
     {
-    PeninputFingerHwrArVkbUtility::LoadVkbKeyImageL(*iMutiPageKeypad,aResId,aKeySize);	    
+	TResourceReader reader;    
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );      
+    
+    TPtrC bmpFileName = reader.ReadTPtrC();
+    TInt32 imgMajorSkinId = reader.ReadInt32();
+    TAknsItemID id;
+    
+    TSize keySize = aKeySize;
+    
+    for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 )
+        { 
+        // Get the image ids and mask ids from resource
+        TInt bmpId = reader.ReadInt16(); 
+        TInt bmpMskId = reader.ReadInt16();
+        
+        // read skin item id
+        const TInt skinitemid = reader.ReadInt16();
+        id.Set( TInt( imgMajorSkinId ), skinitemid );
+        
+        if ( bmpId != KInvalidImg )
+            {
+            CFbsBitmap* bmp = NULL;
+            CFbsBitmap* maskbmp = NULL;
+
+            if ( bmpMskId != KInvalidImg )
+                {
+                AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+                   id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
+                
+                // set maskbmp and size
+                AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved );
+                iMutiPageKeypad->SetNonIrregularKeyBitmapL( 
+                TVirtualKeyBmpType( EKeyBmpNormal + index + 1 ), maskbmp );
+                }
+            else
+                {
+                AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id, 
+                    bmp, bmpFileName, bmpId );
+                }
+            // set bmp and size
+            AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved );
+            iMutiPageKeypad->SetNonIrregularKeyBitmapL( 
+                TVirtualKeyBmpType( EKeyBmpNormal + index ), bmp );
+            }       
+        }
+    // Pop and destroy reader
+    CleanupStack::PopAndDestroy( 1 );        
 	}
 
 // ---------------------------------------------------------------------------
@@ -428,10 +477,118 @@
 //	
 void CPeninputArabicFingerHwrSymbolTable::LoadVirtualKeypadKeyL(const TInt aResId, const RArray<TRect>& aCellRects)
     {
-	PeninputFingerHwrArVkbUtility::LoadVirtualKeypadKeyL(*iMutiPageKeypad,aResId,aCellRects);
+	iMutiPageKeypad->SetResourceId(aResId);
+	
+	TResourceReader reader;
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId );
+
+    // construct keys
+    TInt resKeyCount = reader.ReadInt16();
+    TInt existsKeyCount = iMutiPageKeypad->KeyArray().Count();
+    TInt rectCount = aCellRects.Count();
+    
+    for ( TInt i = 0; i < resKeyCount; i++ )
+        {
+        if ( i < existsKeyCount )
+            {
+            CVirtualKey* vk = iMutiPageKeypad->KeyArray()[i];
+            UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] );
+            }
+        else
+            {
+            CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] );
+            CleanupStack::PushL( vk );
+            iMutiPageKeypad->AddKeyL( vk );
+            
+            CleanupStack::Pop( vk );
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( 1 ); // reader
+    
+    iMutiPageKeypad->Draw();
+    iMutiPageKeypad->UpdateArea( iMutiPageKeypad->Rect() );
 	}
 
 // ---------------------------------------------------------------------------
+// create virtual key.
+// ---------------------------------------------------------------------------
+//
+CVirtualKey* CPeninputArabicFingerHwrSymbolTable::CreateVkbKeyL( TResourceReader& aReader, 
+    const TRect aKeyRect )
+    {
+    CHBufCArray* keytexts = CHBufCArray::NewL();
+    CleanupStack::PushL( keytexts );
+    
+    for ( TInt i = 0; i <= EPosLast; i++ )
+        {
+        HBufC* unicode = aReader.ReadHBufCL();
+        keytexts->Array().AppendL( unicode );
+        }
+
+    TInt keyscancode = aReader.ReadInt16();
+
+    HBufC* text = keytexts->Array()[0];
+    
+    CVirtualKey* vk = NULL;
+    if ( text )
+        {
+        vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 );
+        }
+    else 
+        {
+        vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 );
+        }
+
+    CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+    
+    TRect innerrect = aKeyRect;
+    innerrect.Shrink( TSize(2, 2) );
+    vk->SetInnerRect( innerrect );
+    
+    return vk;
+    }
+
+// ---------------------------------------------------------------------------
+// update virtual key info.
+// ---------------------------------------------------------------------------
+//
+void CPeninputArabicFingerHwrSymbolTable::UpdateVkbKeyL( CVirtualKey* aVirtualKey, 
+    TResourceReader& aReader, const TRect aKeyRect )
+    {
+    CHBufCArray* keytexts = CHBufCArray::NewL();
+    CleanupStack::PushL( keytexts );
+    
+    for ( TInt i = 0; i <= EPosLast; i++ )
+        {
+        HBufC* unicode = aReader.ReadHBufCL();
+        keytexts->Array().AppendL( unicode );
+        }
+
+    TInt keyscancode = aReader.ReadInt16();
+
+    HBufC* text = keytexts->Array()[0];
+    if ( text )
+        {
+        aVirtualKey->SetKeyData( *text );
+        }
+    else
+        {
+        aVirtualKey->SetKeyData( KNullDesC );
+        }
+    
+    aVirtualKey->SetKeyScancode( keyscancode );
+
+    CleanupStack::PopAndDestroy( keytexts ); //keytexts
+
+    aVirtualKey->SetRect(aKeyRect);
+    TRect innerrect = aKeyRect;
+    innerrect.Shrink( TSize(2,2) );
+    aVirtualKey->SetInnerRect( innerrect );
+    }
+
+// ---------------------------------------------------------------------------
 // Navigate the symbol page
 // ---------------------------------------------------------------------------
 //
@@ -534,14 +691,17 @@
     {
 	if(AbleToDraw())
         {
+        //Draw button area background.
+//		DrawOpaqueMaskBackground( Rect() );
+//	    DrawOpaqueMaskBackground();
         DrawOpaqueMaskBackground(iMutiPageKeypad->Rect());
 		if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() )
 			{
 			AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved);
 			}
-        // draw background    
+        // draw background
+//		DrawBackground();    
         DrawBackground(iMutiPageKeypad->Rect());
-        
         // draw group		
 		CControlGroup::Draw();
 		
--- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -24,7 +24,7 @@
 #include <AknLayoutDef.h>
 #include <AknUtils.h>
 #include <AknsUtils.h>
-#include <AknIconUtils.h>
+#include <akniconutils.h>
 #include <AknFepGlobalEnums.h>
 #include <aknfeppeninputenums.h>
 
@@ -87,7 +87,7 @@
 CPeninputFingerHwrArWnd::~CPeninputFingerHwrArWnd()
     {
     #ifdef RD_TACTILE_FEEDBACK
-    if(UiLayout() && iWritingBox)
+    if(UiLayout())
         {
 		UiLayout()->DeRegisterFeedbackArea(reinterpret_cast<TInt>(iWritingBox),
 	                                 iWritingBox->Rect());
@@ -352,10 +352,7 @@
     {
     if ( aInfo.Length() > 0 )
         {
-        TRect rect(iLafManager->IndicatorBubbleRect());
-        iContextField->MsgBubbleCtrl()->SetRect(rect);
-//        iContextField->ShowBubble( aInfo, iContextField->MsgBubbleCtrl()->Rect());
-        iContextField->ShowBubble( aInfo, rect);
+        iContextField->ShowBubble( aInfo, iContextField->MsgBubbleCtrl()->Rect() );
         }
     else
         {
@@ -622,7 +619,6 @@
                                           KAknsIIDQsnFrInputPreviewMiddle,
                                           KAknsIIDQsnFrInputPreviewSideR );  
     iContextField->SetMsgBubbleCtrlSize( TSize( bubbleLineLayout.iW,bubbleLineLayout.iH ) );    
-    iContextField->MsgBubbleCtrl()->SetTextL(KNullDesC);
     
     iContextField->SetLineSeparatorAfterPrompt(ETrue);
     
@@ -825,7 +821,7 @@
 // ---------------------------------------------------------------------------
 //
 void CPeninputFingerHwrArWnd::LoadNumSymbolVirtualKeysL( const TInt aResId, 
-    const RArray<TRect>& aCellRects, TBool aReload)
+    const RArray<TRect>& aCellRects )
     {
     TAknTextLineLayout txtlayout = iLafManager->NumpadKeyTxtLayout();
     iNumSymbolTable->KeyPad()->SetTextLineLayout( txtlayout );
@@ -833,14 +829,8 @@
     TInt fontid = txtlayout.FontId();
     const CFont* font = AknLayoutUtils::FontFromId( fontid );
     iNumSymbolTable->KeyPad()->SetFont( font );
-    if(aReload)
-        {
-        iNumSymbolTable->LoadVirtualKeypadKeyL(aResId,aCellRects);
-        }
-    else
-        {
-        iNumSymbolTable->UpdateAllVirtualKeysRect(aCellRects);
-        }
+    
+    iNumSymbolTable->LoadVirtualKeypadKeyL(aResId,aCellRects);
     }
 
 // ---------------------------------------------------------------------------
@@ -953,7 +943,7 @@
     iLafManager->GetNumVirtualKeyRects( numrects );
     
     // load keys
-    LoadNumSymbolVirtualKeysL(R_FINGER_HWR_NUMPAD, numrects,EFalse);
+    LoadNumSymbolVirtualKeysL(R_FINGER_HWR_NUMPAD, numrects);
         
     CleanupStack::PopAndDestroy();//rects
     
@@ -964,7 +954,9 @@
     rect = iLafManager->CtrlRect(iNumSymbolTable->ControlId());
     iNumSymbolTable->SetRect(rect);
     
-    iNumSymbolTable->SizeChanged(iLafManager->GetVirtualNumKeyRect());
+    iNumSymbolTable->SizeChanged(iLafManager->GetVirtualNumKeyRect(),
+                              iLafManager->GetSymBtnArray(), numpadrows, numpadcols,
+                              iLafManager->IsLandscape());
     }
 
 
@@ -1492,7 +1484,7 @@
 //
 void CPeninputFingerHwrArWnd::SetNumericMapping( const TDesC& aNumMapping )
     {
-    iNumSymbolTable->UpdateTableSymbol(aNumMapping);
+    iNumSymbolTable->SetNumericMapping(aNumMapping);
     }
 // ---------------------------------------------------------------------------
 //  set native number mode on or off.
--- a/textinput/peninputgenericitut/inc/peninputgenericitutdata.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericitut/inc/peninputgenericitutdata.h	Wed Oct 13 14:55:58 2010 +0300
@@ -104,9 +104,7 @@
     ESpellArrowLeft,
     ESpellArrowLeftInner,
     ESpellArrowRight,
-    ESpellArrowRightInner,
-    EStarIconRect,
-    EShiftIconRect
+    ESpellArrowRightInner
     };
 
 enum TControlId
--- a/textinput/peninputgenericitut/inc/peninputgenericitutdatamgr.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericitut/inc/peninputgenericitutdatamgr.h	Wed Oct 13 14:55:58 2010 +0300
@@ -145,15 +145,6 @@
     
     TBool IsChineseSpellMode();
     	
-    /**
-     * Get the size of the screen
-     *
-     * @since S60 v5.0
-     * @param none
-     * @return the size of the screen
-     */
-    TRect screenSize();
-    
 	TPoint iSelectionTl;
     TSize iSelectionItemSize;
     TInt iSelectionItemMargin;
@@ -179,12 +170,6 @@
 	TInt iIcfTextHeightCn;
 	
 	TRect iShiftIconRect;
-	
-    /**
-     * The star icon rect
-     */
-	TRect iStarIconRect;
-	
 	TInt iIcfTextLeftMarginForPrtWest;
     TInt iIcfTextRightMarginForPrtWest;
     TInt iIcfTextTopMarginForPrtWest;
@@ -193,10 +178,6 @@
     TInt iIcfTextHeightForPrtWest;
     TRect iShiftIconRectForPrtWest;
     TRect iStarIconRectForPrtWest;
-    /**
-     * The star icon rect under number mode 
-     */
-    TRect iStarIconRectInNumModeForPrtWest;
     TInt iSpellIcfTextHeightForPrtWest;
     
 	TInt iSpellIcfTextLeftMarginForPrtWest;
--- a/textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -347,13 +347,7 @@
 								cell_ituss_key_pane_g2( 0 ).LayoutLine();
 				TAknLayoutRect starIconRect;
 				starIconRect.LayoutRect( keyrect, starIcon );                
-				iStarIconRectForPrtWest = starIconRect.Rect();
-				
-				// Get the star icon rect under number mode
-				starIcon = AknLayoutScalable_Avkon::
-						cell_ituss_key_pane_g2(4).LayoutLine();
-				starIconRect.LayoutRect( keyrect, starIcon );
-				iStarIconRectInNumModeForPrtWest = starIconRect.Rect();
+				iStarIconRectForPrtWest = starIconRect.Rect();          
 				}			
 			
 			}
@@ -571,17 +565,6 @@
 	iSpellIndiIconWithoutTextForPrtWest = spellIndiIconRect.Rect();
 	}
 
-// ---------------------------------------------------------------------------
-// Get the size of the screen
-// ---------------------------------------------------------------------------
-//
-TRect CGenericItutDataMgr::screenSize()
-	{
-	TRect rect;
-	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, rect );
-	return rect;
-	}
-
 void CGenericItutDataMgr::ReadLafInfo()
     {
     // Screen
@@ -747,17 +730,6 @@
             	shiftIconRect.LayoutRect( cellrect, shiftIcon );				
             	iShiftIconRect = shiftIconRect.Rect();			
             	}
-            
-            // read star icon rect
-            if ( i == 3 &&  j == 0 )
-            	{
-            	TAknWindowLineLayout starIcon =  AknLayoutScalable_Apps::
-            					cell_vitu2_itu_pane_g1( keypadvariety ).LayoutLine();
-            	TAknLayoutRect starIconRect;
-            	starIconRect.LayoutRect( cellrect, starIcon );				
-            	iStarIconRect = starIconRect.Rect();			
-            	}
-            
             itucellrect.LayoutRect(iKeypadRectCn, itucell);
             cellrect = itucellrect.Rect();
             cellrect.Move(-iKeypadRectCn.iTl.iX, -iKeypadRectCn.iTl.iY);
@@ -1406,35 +1378,6 @@
                 return &iKeypadCellRectsForPrtWest;
                 }
             }
-        case EStarIconRect:
-        	{
-        	if ( IsChineseSpellMode())
-        		{
-				return &iStarIconRect;
-        		}
-        	else
-        		{
-				if ( iInputMode == ENumber || iInputMode == ENativeNumber )
-					{
-					return &iStarIconRectInNumModeForPrtWest;
-					}
-				else
-					{
-					return &iStarIconRectForPrtWest;
-					}
-        		}
-        	}
-        case EShiftIconRect:
-        	{
-        	if ( IsChineseSpellMode())
-        		{
-				return &iShiftIconRect;
-        		}
-        	else
-        		{
-				return &iShiftIconRectForPrtWest;
-        		}
-        	}
         case EKeypadLeftTextLine:
             {
             if ( IsChineseSpellMode())
@@ -1877,14 +1820,6 @@
        	        {
        	        return &iImIndiOuterRect;
        	        }
-        case EStarIconRect:
-        	{
-			return &iStarIconRect;
-        	}
-        case EShiftIconRect:
-        	{
-			return &iShiftIconRect;
-        	}
         case EKeypadRect:
         	return IsChinese() ? &iKeypadRectCn : &iKeypadRect;	        	
         case EKeypadCellRects:
--- a/textinput/peninputgenericitut/src/peninputgenericitutwindow.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputgenericitutwindow.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -235,13 +235,6 @@
         TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(EKeypadRightTextLine3)),
         EPosRight3);
 
-    TRect* iconRect = static_cast<TRect*>( iDataMgr->RequestData( EStarIconRect ));
-    // Set the star icon rect
-    iStandardItutKp->SetStarIconRect( *iconRect );
-    iconRect = static_cast<TRect*>( iDataMgr->RequestData( EShiftIconRect ));
-    // Set the shift icon rect
-    iStandardItutKp->SetShiftIconRect( *iconRect );
-    
     TResourceReader reader;
     CCoeEnv::Static()->CreateResourceReaderLC(reader, aResId);
 
@@ -1590,13 +1583,6 @@
         TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(EKeypadRightTextLine3)),
         EPosRight3);
     
-    TRect* iconRect = static_cast<TRect*>( iDataMgr->RequestData( EStarIconRect ));
-    // Set the star icon rect
-    iStandardItutKp->SetStarIconRect( *iconRect );
-    iconRect = static_cast<TRect*>( iDataMgr->RequestData( EShiftIconRect ));
-    // Set the shift icon rect
-    iStandardItutKp->SetShiftIconRect( *iconRect );
-    
     RPointerArray<CVirtualKey>& keys = 
         const_cast<RPointerArray<CVirtualKey>&>(iStandardItutKp->KeyArray());
     RArray<TRect>& cellRects = 
@@ -1793,13 +1779,6 @@
         TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(EKeypadRightTextLine3)),
         EPosRight3);
     
-    TRect* iconRect = static_cast<TRect*>( iDataMgr->RequestData( EStarIconRect ));
-    // Set the star icon rect
-    iStandardItutKp->SetStarIconRect( *iconRect );
-    iconRect = static_cast<TRect*>( iDataMgr->RequestData( EShiftIconRect ));
-    // Set the shift icon rect
-    iStandardItutKp->SetShiftIconRect( *iconRect );
-    
     RPointerArray<CVirtualKey>& keys = 
         const_cast<RPointerArray<CVirtualKey>&>(iStandardItutKp->KeyArray());
     RArray<TRect>& cellRects = 
--- a/textinput/peninputgenericitut/src/peninputitutchnuimgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutchnuimgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -350,16 +350,9 @@
     if(DataMgr()->IsUpdate())  
     	{
     	DataMgr()->SetUpdate(EFalse);
-    	
-    	// Get the screen rect
-    	TRect screenRect = DataMgr()->screenSize();
-    	// If the screen is in portrait mode
-    	if ( screenRect.Width() < screenRect.Height())
-    		{
-			CGenericItutUiLayout* itutLayout = 
-				static_cast<CGenericItutUiLayout*>( LayoutContext()->UiLayout());
-			itutLayout->SizeChanged( NULL );
-    		}
+    	CGenericItutUiLayout* itutLayout = 
+			static_cast<CGenericItutUiLayout*>( LayoutContext()->UiLayout() );
+		itutLayout->SizeChanged( NULL );
     	}
     
     iCurrentState->OnEntryL();
--- a/textinput/peninputgenericitut/src/peninputitutwesternuimgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutwesternuimgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -127,16 +127,9 @@
     if(DataMgr()->IsUpdate())  
     	{
     	DataMgr()->SetUpdate(EFalse);
-    	
-    	// Get the screen rect
-    	TRect screenRect = DataMgr()->screenSize();
-    	// If the screen is in portrait mode
-    	if ( screenRect.Width() < screenRect.Height())
-    		{
-			CGenericItutUiLayout* itutLayout = 
-				static_cast<CGenericItutUiLayout*>( LayoutContext()->UiLayout());
-			itutLayout->SizeChanged( NULL );
-    		}
+    	CGenericItutUiLayout* itutLayout = 
+			static_cast<CGenericItutUiLayout*>( LayoutContext()->UiLayout() );
+		itutLayout->SizeChanged( NULL );
     	}
     iCurrentState->OnEntryL();
     }
--- a/textinput/peninputgenericvkb/inc/peninputgenericvkblayout.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericvkb/inc/peninputgenericvkblayout.h	Wed Oct 13 14:55:58 2010 +0300
@@ -168,15 +168,6 @@
     void HandleVirtualKeyUpL(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData);
 
     /**
-     * Handle virtual key down event
-     *
-     * @since S60 v5.0
-     * @param None
-     * @return None
-     */
-    void HandleVirtualKeyDown();
-    
-    /**
      * Handle show tooltip command
      *
      *     
--- a/textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h	Wed Oct 13 14:55:58 2010 +0300
@@ -309,16 +309,7 @@
     TBool HandleVirtualKeyUpEvent(TInt aEventType, 
                                  CFepUiBaseCtrl* aCtrl, 
                                  const TDesC& aEventData );
-    
-    /**
-     * Handle virtual key down event
-     *
-     * @since S60 v5.0
-     * @param None
-     * @return None
-     */  
-    void HandleVirtualKeyDownEvent();
-    
+  
     virtual void SetLafLayOut(TInt aRows, TInt aColumns);
      /*
      *
--- a/textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -1038,7 +1038,7 @@
     aDataInfo.iQwtRect = aParentWndRect;
     
     TInt v1, v2, gridLayoutVariant;
-
+    
     // Get the variant for Portrait QWERTY
     TInt cellVariantForPortraitQWERTY;
     
@@ -1199,6 +1199,7 @@
             }
         }
     
+    
     if ( !isPortraitFSQEnabled ||
         ( isPortraitFSQEnabled && Layout_Meta_Data::IsLandscapeOrientation() ) )
         {
@@ -1230,7 +1231,7 @@
         
         // the key rect without gap
         rect = keypaneRect.Rect();
-    
+        
         rect.Move( - rectXPane.iTl.iX, - rectXPane.iTl.iY );
         TRect rectXBorder = rect;
         rect = keylabelRect.Rect();
@@ -1243,14 +1244,14 @@
         
         rect = keypadRect.Rect();
         rect.Move( - base.iX, - base.iY );
-    
+        
         TRect rectOfButtons = rect;
         // The gap between the top of the first row key and the top of the keyboard
         gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
         // compute the top left Y coordinate of the function buttons
         rectOfButtons.iTl.iY = rectOfButtons.iTl.iY + 
     		keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue;
-    
+        
         TInt spaceBtnWidth = rectOfButtons.Width() - rectXPane.Width() * 8;
         TInt dx = rectOfButtons.iTl.iX;
         TInt dy = rectOfButtons.iTl.iY;
@@ -1716,7 +1717,7 @@
     TAknLayoutText keyTextLayout; 
 	TAknTextLineLayout keyText;
 	TRect keyRect;
-	// The gap value of keyboard
+    // The gap value of keyboard
 	TInt gapValue;
 
     TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation();
@@ -1791,12 +1792,11 @@
         }
   	    
   	rectVkbCtrl = keypadRect.Rect();
-  	// Compute the gap between first row key's top line and keyboard's top line
+    // Compute the gap between first row key's top line and keyboard's top line
   	gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
   	// Compute keyboard position
   	rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 3 + gapValue;
   	rectVkbCtrl.iTl.iY += gapValue;
-  	
   	dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
 
   	linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(0).LayoutLine();
@@ -1805,6 +1805,7 @@
   	linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(0).LayoutLine();
   	keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
 
+  	
     TRect rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
   	
@@ -1826,7 +1827,7 @@
             dataInfo->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
-            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );       
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
@@ -1944,13 +1945,11 @@
         }
   	    
   	rectVkbCtrl = keypadRect.Rect();
-    
-  	// Compute the gap between first row key's top line and keyboard's top line
+    // Compute the gap between first row key's top line and keyboard's top line
     gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
     // Compute keyboard position
     rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 3 + gapValue;
     rectVkbCtrl.iTl.iY += gapValue;
-    
     dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
 
     linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(2).LayoutLine();
@@ -1959,6 +1958,7 @@
     linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(2).LayoutLine();
     keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
 
+    
     rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
     
@@ -1980,7 +1980,7 @@
             dataInfo->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
-            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );      
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
@@ -2086,14 +2086,12 @@
         keypaneRect.LayoutRect( keypadRect.Rect(), linelayout );
         }
   	    
-    rectVkbCtrl = keypadRect.Rect();
-    
+  	rectVkbCtrl = keypadRect.Rect();
     // Compute the gap between first row key's top line and keyboard's top line
     gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
     // Compute keyboard position
     rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 4 + gapValue;
     rectVkbCtrl.iTl.iY += gapValue;
-    
     dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;    
 
     linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(3).LayoutLine();
@@ -2102,6 +2100,7 @@
     linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(3).LayoutLine();
     keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
 
+    
     rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
     
@@ -2123,7 +2122,7 @@
             dataInfo->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
-            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );    
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
--- a/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -278,6 +278,12 @@
             vkbWindow->DimArrowKeys( IsDimArrowKeys );
             }
             break;
+        case ECmdPeninputVietSyncToneMarker:
+        	{
+        	TBool bDimToneMarker = *aData;
+        	vkbWindow->EnableToneMarker(bDimToneMarker);
+        	}
+        	break;
         case ECmdPenInputDimEnterKey:
             {
             TBool isDimEnterKey = *((TUint16*)( aData ));            
@@ -377,13 +383,6 @@
             SignalOwner(ESignalKeyEvent, KDisplaySpace);            
             }
         	break;
-        case EEventVirtualKeyDown:
-        	{
-        	HandleVirtualKeyDown();
-        	CPeninputCommonLayoutExt::HandleControlEvent( aEventType, 
-        			aCtrl, aEventData );
-        	break;
-        	}
         default:
             {
             CPeninputCommonLayoutExt::HandleControlEvent(aEventType, aCtrl, aEventData);
@@ -540,21 +539,6 @@
         }
     }
 
-// ---------------------------------------------------------------------------
-// Handle virtual key down event
-// ---------------------------------------------------------------------------
-//
-void CPeninputGenericVkbLayout::HandleVirtualKeyDown()
-	{
-	CPeninputGenericVkbWindow* window = 
-			static_cast<CPeninputGenericVkbWindow*>( iLayoutWindow );
-	
-	if ( window )
-		{
-		window->HandleVirtualKeyDownEvent();
-		}
-	}
-
 TBool CPeninputGenericVkbLayout::TranslateMirrorUnicode( TUint16 aInputCode, TUint16& aOutputCode )
     {
     TBool isMirrorChar = EFalse;
--- a/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -2011,26 +2011,7 @@
     iNewDeadKeyBuf = KNullDesC;
     return EFalse;
     } 
-
-// ---------------------------------------------------------------------------
-// CPeninputGenericVkbWindow::HandleVirtualKeyDownEvent
-// (Handle virtual key down event)
-// ---------------------------------------------------------------------------
-//
-void CPeninputGenericVkbWindow::HandleVirtualKeyDownEvent()
-	{
-    // Get DeadKey state
-    TInt latchedFlag = CPeninputDataConverter::AnyToInt(
-				   iLayoutContext->RequestData( EAkninputDataTypeLatchedSet ));
-    
-    if ( latchedFlag )
-    	{
-		UnLatchDeadKey( iNewDeadKeyBuf );
-	    TBool deadKeyChange = ETrue;
-	    iLayoutContext->SetData( EAkninputDataTypeLatchedSet, &deadKeyChange );
-    	}
-	}
-
+ 
  TBool CPeninputGenericVkbWindow::HandleDeadKeyL(TInt aEventType, 
                                                  const TDesC& aEventData )
  	{
@@ -2266,10 +2247,6 @@
         static_cast<CAknFepCtrlEventButton*>
             ( Control( EPeninutWindowCtrlIdMultiRangeBtn ))->SizeChanged( 
               exRect, inRect, ETrue );
-            
-        TRAP_IGNORE( icf->MsgBubbleCtrl()->SetTextL( KEmptyString ));
-        iIndiWithText = EFalse;
-        IndiBubbleWithoutText();
         }
     
     iLafMgr->GetButtonRect(EPeninutWindowCtrlIdOptionBtn,exRect ,inRect);
--- a/textinput/peninputsplititut/inc/peninputsplititutdata.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/inc/peninputsplititutdata.h	Wed Oct 13 14:55:58 2010 +0300
@@ -89,14 +89,9 @@
     EImIndicatorRect,
     ESpellBackSpcae,
     ESpellBackSpcaeInner,    
-    ESpellIndiPaneWithoutTextRect, 
-    ESpellIndiIconWithoutTextRect,
-    ESpellIndiTextLine,
-    ESplitIndiPaneRect,
-    ESplitIndiIconRect,
-    ESplitIndiTextLine,
-    EStarIconRect,
-    EShiftIconRect    
+    EIndiPaneWithoutTextRect, 
+    EIndiIconWithoutTextRect,
+    EIndiTextLine
     };
 
 enum TControlId
@@ -118,8 +113,7 @@
     ECtrlIdICF,
     ECtrlIdOkBtn,
     ECtrlIdCancelBtn,
-    ECtrlIdSplitIndiBubble,
-    ECtrlIdLastStdCtrl
+    ECtrlIdLastStdCtrl = ECtrlIdCancelBtn+ 1
     };
 
 enum TItutCommand
--- a/textinput/peninputsplititut/inc/peninputsplititutdatamgr.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/inc/peninputsplititutdatamgr.h	Wed Oct 13 14:55:58 2010 +0300
@@ -205,34 +205,21 @@
     inline void SetSpellMode(TBool aSpellMode);
     
     /**
-     * Set Spell Indicator Data
+     * Set Indicator Data
      *
+     * @since S60 v5.0
      * @param aIndicatorData Indicator Data
      * @return void
      */
-    inline void SetSpellIndicatorData(TFepIndicatorInfo &aIndicatorData);
-    
-    /**
-     * Get Spell Indicator Data
-     *
-     * @return TFepIndicatorInfo
-     */
-    inline TFepIndicatorInfo SpellIndicatorData();
+    inline void SetIndicatorData(TFepIndicatorInfo &aIndicatorData);
     
     /**
-     * Set Split Indicator Data
+     * Get Indicator Data
      *
-     * @param aIndicatorData Indicator Data
-     * @return void
-     */
-    inline void SetSplitIndicatorData(TFepIndicatorInfo &aIndicatorData);
-    
-    /**
-     * Get Split Indicator Data
-     *
+     * @since S60 v5.0
      * @return TFepIndicatorInfo
      */
-    inline TFepIndicatorInfo SplitIndicatorData();    
+    inline TFepIndicatorInfo IndicatorData();
     
     /**
      * Set update flag
@@ -366,23 +353,9 @@
      */
     inline TBool IsNumericOnly() const;
 	
-    /**
-     * Get the size of the screen
-     *
-     * @since S60 v5.0
-     * @param none
-     * @return the size of the screen
-     */
-    TRect screenSize();
-    
 	TRect iShiftIconRect;
 	TRect iStarIconRect;
 	
-    /**
-     * The star icon rect under number mode
-     */
-	TRect iStarIconRectInNumMode;
-	
 private:
     /**
      * C++ constructor
@@ -590,18 +563,13 @@
 	TRect iSpellArrowRightRectInner;
 	
     //TRect iIndiPaneRectWithTextForPrtWest;
-    TRect iSpellIndiPaneRectWithoutTextForPrtWest;
+    TRect iIndiPaneRectWithoutTextForPrtWest;
     //TRect iIndiIconRectWithTextForPrtWest;
-    TRect iSpellIconRectWithoutTextForPrtWest;
-    TAknTextLineLayout iSpellTextForPrtWest;
-    
-    TRect iSplitIndiPaneRect;
-    TRect iSplitIndiIconRect;    
-    TAknTextLineLayout iSplitIndiText;
+    TRect iIndiIconRectWithoutTextForPrtWest;
+    TAknTextLineLayout iIndiTextForPrtWest;
 
 	TAknTextLineLayout iSpellBtnTextFormat;
-	TFepIndicatorInfo iSpellIndicatorData;
-	TFepIndicatorInfo iSplitIndicatorData;
+	TFepIndicatorInfo iIndicatorData;
     };
 
 // ---------------------------------------------------------------------------
@@ -668,47 +636,27 @@
     }
  
 // ---------------------------------------------------------------------------
-// CSplitItutDataMgr::SetSpellIndicatorData
+// CSplitItutDataMgr::SetIndicatorData
 // ---------------------------------------------------------------------------
 //
-inline void CSplitItutDataMgr::SetSpellIndicatorData(TFepIndicatorInfo &aIndicatorData)
+inline void CSplitItutDataMgr::SetIndicatorData(TFepIndicatorInfo &aIndicatorData)
     {
-    iSpellIndicatorData.iIndicatorImgID = aIndicatorData.iIndicatorImgID;
-    iSpellIndicatorData.iIndicatorMaskID = aIndicatorData.iIndicatorMaskID;
-    iSpellIndicatorData.iIndicatorTextImgID = aIndicatorData.iIndicatorTextImgID;
-    iSpellIndicatorData.iIndicatorTextMaskID = aIndicatorData.iIndicatorTextMaskID;
+    iIndicatorData.iIndicatorImgID = aIndicatorData.iIndicatorImgID;
+    iIndicatorData.iIndicatorMaskID = aIndicatorData.iIndicatorMaskID;
+    iIndicatorData.iIndicatorTextImgID = aIndicatorData.iIndicatorTextImgID;
+    iIndicatorData.iIndicatorTextMaskID = aIndicatorData.iIndicatorTextMaskID;
     }
  
 // ---------------------------------------------------------------------------
-// CSplitItutDataMgr::SplitIndicatorData
-// ---------------------------------------------------------------------------
-//
-inline TFepIndicatorInfo CSplitItutDataMgr::SplitIndicatorData()
-    {
-    return iSplitIndicatorData;
-    } 
-
-// ---------------------------------------------------------------------------
-// CSplitItutDataMgr::SetSplitIndicatorData
+// CSplitItutDataMgr::IndicatorData
 // ---------------------------------------------------------------------------
 //
-inline void CSplitItutDataMgr::SetSplitIndicatorData(TFepIndicatorInfo &aIndicatorData)
+inline TFepIndicatorInfo CSplitItutDataMgr::IndicatorData()
     {
-    iSplitIndicatorData.iIndicatorImgID = aIndicatorData.iIndicatorImgID;
-    iSplitIndicatorData.iIndicatorMaskID = aIndicatorData.iIndicatorMaskID;
-    iSplitIndicatorData.iIndicatorTextImgID = aIndicatorData.iIndicatorTextImgID;
-    iSplitIndicatorData.iIndicatorTextMaskID = aIndicatorData.iIndicatorTextMaskID;
-    }
- 
-// ---------------------------------------------------------------------------
-// CSplitItutDataMgr::SpellIndicatorData
-// ---------------------------------------------------------------------------
-//
-inline TFepIndicatorInfo CSplitItutDataMgr::SpellIndicatorData()
-    {
-    return iSpellIndicatorData;
+    return iIndicatorData;
     } 
 
+
 // ---------------------------------------------------------------------------
 // CSplitItutDataMgr::IsValidLanguage
 // ---------------------------------------------------------------------------
--- a/textinput/peninputsplititut/inc/peninputsplititutlayout.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/inc/peninputsplititutlayout.h	Wed Oct 13 14:55:58 2010 +0300
@@ -309,7 +309,35 @@
      * @return chinese ui mgr
      */
     CSplitItutUiMgrBase* ChineseUiManager();
-   
+    
+    /**
+     * Handle show candidate list command
+     *
+     *     
+     * @aData pointer is sent from FEP, point to a TPtrC
+     * @return None
+     */    
+    void HandleShowMatchListCmdL( TUint8* aData );    
+
+    /**
+     * Read text stored in a block of memory into HBufC
+     *
+     *     
+     * @aData aStartPtr the starting address of a block of memory with a string in it
+     * @aLength The length of the string
+     * @return pointer of a HBufC storing the string in it
+     */ 
+    HBufC* ReadTextInfoHBufCL( TUint16* aStartPtr, TInt aLength );
+    
+    /**
+     * Handle select candidate list item command
+     *
+     *     
+     * @aData pointer is sent from FEP, point to a TPtrC
+     * @return None
+     */    
+    void HandleSelectServerCandItemL( TUint8* aData );
+    
 private:
     /**
      * data manager.
--- a/textinput/peninputsplititut/inc/peninputsplititutwesternuistatespelling.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/inc/peninputsplititutwesternuistatespelling.h	Wed Oct 13 14:55:58 2010 +0300
@@ -21,7 +21,6 @@
 #include "peninputsplititutuistatebase.h"
 
 class CFepLayoutMultiLineIcf;
-class CBubbleCtrl;
 class CAknFepCtrlCommonButton;
 
 class CWesternSplitItutUiStateSpelling : public CSplitItutUiStateBase
@@ -54,7 +53,6 @@
 	void ReCalcLayoutL();
 private:
     CFepLayoutMultiLineIcf* iICF;
-    CBubbleCtrl* iSplitIndiBubble;
     CAknFepCtrlCommonButton* iOk;
     CAknFepCtrlCommonButton* iCancel;
     };
--- a/textinput/peninputsplititut/inc/peninputsplititutwindow.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/inc/peninputsplititutwindow.h	Wed Oct 13 14:55:58 2010 +0300
@@ -33,7 +33,6 @@
 class CFepCtrlDropdownList;
 class CAknFepCtrlCommonBgCtrl;
 class CPeninputSyncBitmapRotator;
-class CBubbleCtrl;
 
 const TInt KUnavailableID = -1;
 
@@ -241,52 +240,36 @@
     void SetPromptTextL( TUint8* aData );
     
     /** 
-     * Set split bubble
+     * Set bubble
      *
+     * @since S60 5.0
      * @return None
      */    
-    void SetSplitIndiBubble();
+    void SetIndiBubble();
     
     /** 
-     * Set spelling bubble
+     * Update bubble prompt text
      *
-     * @return None
-     */    
-    void SetSpellIndiBubble();
-    
-    /** 
-     * Update split bubble prompt text
-     *
+     * @since S60 5.0
      * @param aData text
      * @return None
      */
-    void UpdateSplitIndiBubbleL( TUint8* aData );
-
-    /** 
-     * Update spelling bubble prompt text
-     *
-     * @param aData text
-     * @return None
-     */
-    void UpdateSpellIndiBubbleL( TUint8* aData );    
+    void UpdateIndiBubbleL( TUint8* aData );
     
     /** 
      * Set bubble image
      *
-     * @param aBubble bubble control
-     * @param aRect bubble rect
+     * @since S60 5.0
      * @param aImgID1 image ID1
      * @param aMaskID1 mask image id1
      * @param aImgID2 image ID2
      * @param aMaskID2 mask image id2
      * @return None
      */
-    void SetBubbleImageL( CBubbleCtrl& aBubble,
-                          const TRect& aRect,
-                          const TInt aImgID1,
-						  const TInt aMaskID1,
-                          const TInt aImgID2,
-                          const TInt aMaskID2 );
+    void SetIndiBubbleImageL( const TInt aImgID1,
+						      const TInt aMaskID1,
+                              const TInt aImgID2,
+                              const TInt aMaskID2 );
 private:
     /**
      * C++ constructor
@@ -493,13 +476,6 @@
      * @return None
      */
     void CreateICFL();
-	
-    /**
-     * Create split indicator bubble
-     *
-     * @return None
-     */
-    void CreateSplitIndiBubbleL();
      
     /**
      * Check control size change
@@ -650,7 +626,6 @@
     TSize iIndicatorTextSize;
     TBool iImDimensionSet;
     CFepLayoutMultiLineIcf* iICF;
-    CBubbleCtrl* iSplitIndiBubble;        
     };
    
 // ---------------------------------------------------------------------------
--- a/textinput/peninputsplititut/src/peninputsplititutchnuimgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutchnuimgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -327,16 +327,9 @@
     if(DataMgr()->IsUpdate())  
     	{
     	DataMgr()->SetUpdate(EFalse);
-    	
-    	// Get the screen rect
-    	TRect screenRect = DataMgr()->screenSize();
-    	// If the screen is in portrait mode
-    	if ( screenRect.Width() < screenRect.Height())
-    		{
-			CSplitItutUiLayout* itutLayout = 
-				static_cast<CSplitItutUiLayout*>( LayoutContext()->UiLayout());
-			itutLayout->SizeChanged( NULL );
-    		}
+    	CSplitItutUiLayout* itutLayout = 
+			static_cast<CSplitItutUiLayout*>( LayoutContext()->UiLayout() );
+		itutLayout->SizeChanged( NULL );
     	}
     
     iCurrentState->OnEntryL();
--- a/textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -165,20 +165,9 @@
     splitpanerect.LayoutRect(spliwndtrect.Rect(), splitpane);   
     
     iLayoutRect = spliwndtrect.Rect();
-
-    // split indi layout
-    TAknWindowLineLayout indiPane = AknLayoutScalable_Avkon::icf_edit_indi_pane(2).LayoutLine();
-    TAknWindowLineLayout indiIconPane = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(2).LayoutLine();    
-
-    TAknLayoutRect indiRect, indiIconRect;
-    indiRect.LayoutRect(spliwndtrect.Rect(), indiPane);
-    indiIconRect.LayoutRect(spliwndtrect.Rect(), indiIconPane);
-    
-    iLayoutRect.iTl.iY -= indiRect.Rect().Height();//include non ifc indi bubble
-    
     // spell layout rect
     iLayoutRectSpell = rect;
-    iLayoutOffset = spliwndtrect.Rect().iTl - TPoint(0,indiRect.Rect().Height());//include split indi bubble
+    iLayoutOffset = spliwndtrect.Rect().iTl;
     iBackgroundRect = iLayoutRect;
     iBackgroundRect.Move(-iLayoutOffset);
     
@@ -224,19 +213,13 @@
                 }
             
             // read star icon rect
-            if( i == 3 &&  j == 0 )
+            if( i == 3 &&  j == 2 )
                 {
                 TAknWindowLineLayout starIcon =  AknLayoutScalable_Avkon::
                                 cell_ituss_key_pane_g2( 0 ).LayoutLine();
                 TAknLayoutRect starIconRect;
                 starIconRect.LayoutRect( keyrect, starIcon );                
-                iStarIconRect = starIconRect.Rect();  
-                
-                // Get the star icon rect under number mode
-				starIcon = AknLayoutScalable_Avkon::
-						cell_ituss_key_pane_g2(4).LayoutLine();
-				starIconRect.LayoutRect( keyrect, starIcon );
-				iStarIconRectInNumMode = starIconRect.Rect();
+                iStarIconRect = starIconRect.Rect();          
                 }            
             
             }
@@ -279,9 +262,7 @@
     iCloseInnerRect = funcinnerrect.Rect();
     iCloseInnerRect.Move(0, iKeypadRect.iBr.iY );
     iCloseInnerRect.Move(-iLayoutOffset);
-      
-    iCloseInnerRect.Move(-TPoint(0,indiRect.Rect().Height())); //include split indi bubble            
-        
+    
     // arrow left button
     iArrowLeftRect = iCloseRect;     
     iArrowLeftRect.Move(btnWidth, 0);
@@ -413,24 +394,16 @@
 	
 	icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
 	icfIndiPaneRectWithoutText.LayoutRect( focuspaneRect.Rect(), icfIndiPaneWithoutText );
-	iSpellIndiPaneRectWithoutTextForPrtWest = icfIndiPaneRectWithoutText.Rect();
+	iIndiPaneRectWithoutTextForPrtWest = icfIndiPaneRectWithoutText.Rect();
 	
 	TAknWindowLineLayout spellIndiIcon;
 	TAknLayoutRect spellIndiIconRect;
 	spellIndiIcon = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(0).LayoutLine();
 	spellIndiIconRect.LayoutRect( icfIndiPaneRectWithoutText.Rect(), spellIndiIcon );
-	iSpellIconRectWithoutTextForPrtWest = spellIndiIconRect.Rect();
+	iIndiIconRectWithoutTextForPrtWest = spellIndiIconRect.Rect();
 	
 	indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine();
-    iSpellTextForPrtWest = indiTextLayout;
-	
-    // split indicator
-    iSplitIndiPaneRect = indiRect.Rect();
-    iSplitIndiIconRect = indiIconRect.Rect();
-    iSplitIndiIconRect.Move(0, -iSplitIndiPaneRect.iTl.iY + iKeypadRect.iTl.iY - iSplitIndiPaneRect.Height());
-    iSplitIndiPaneRect.Move(0, -iSplitIndiPaneRect.iTl.iY + iKeypadRect.iTl.iY - iSplitIndiPaneRect.Height());
-    indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(1).LayoutLine();
-    iSplitIndiText = indiTextLayout;  
+	iIndiTextForPrtWest = indiTextLayout;  
     
 	// ICF text line info
     TAknTextLineLayout icftextT1, icftextT2, icftextT3;    
@@ -637,21 +610,6 @@
         		{
 				return &iVkNumText;
         		}
-        case EStarIconRect:
-        	{
-        	if ( iInputMode == ENumber || iInputMode == ENativeNumber )
-				{
-				return &iStarIconRectInNumMode;
-				}
-        	else
-        		{
-				return &iStarIconRect;
-        		}
-        	}
-        case EShiftIconRect:
-        	{
-        	return &iShiftIconRect;
-        	}
         case EKeypadRightTextLine1:
 			if ( iInputMode == ENumber || iInputMode == ENativeNumber )
 				{
@@ -804,18 +762,12 @@
         	return &iSpellBackSpcace;
         case ESpellBackSpcaeInner:
         	return &iSpellBackSpcaceInner;
-        case ESpellIndiPaneWithoutTextRect:
-            return &iSpellIndiPaneRectWithoutTextForPrtWest;
-        case ESpellIndiIconWithoutTextRect:
-            return &iSpellIconRectWithoutTextForPrtWest;
-        case ESpellIndiTextLine:
-            return &iSpellTextForPrtWest;
-        case ESplitIndiPaneRect:
-            return &iSplitIndiPaneRect;
-        case ESplitIndiIconRect:
-            return &iSplitIndiIconRect;            
-        case ESplitIndiTextLine:
-            return &iSplitIndiText;            
+        case EIndiPaneWithoutTextRect:
+            return &iIndiPaneRectWithoutTextForPrtWest;
+        case EIndiIconWithoutTextRect:
+            return &iIndiIconRectWithoutTextForPrtWest;
+        case EIndiTextLine:
+            return &iIndiTextForPrtWest;
         default:
             break;
         }
@@ -1269,15 +1221,4 @@
     return EFalse;
     }
 
-// ---------------------------------------------------------------------------
-// Get the size of the screen
-// ---------------------------------------------------------------------------
-//
-TRect CSplitItutDataMgr::screenSize()
-	{
-	TRect rect;
-	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, rect );
-	return rect;
-	}
-
 // End Of File
--- a/textinput/peninputsplititut/src/peninputsplititutlayout.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutlayout.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -30,10 +30,11 @@
 //#include <peninputdropdownlist.h>
 
 #include <s32mem.h>
-#include <peninputlayoutbubblectrl.h>
+//#include <peninputlayoutbubblectrl.h>
 
 #include <peninputdataprovider.h>      
 #include <peninputcommonlayoutglobalenum.h>
+#include <peninputcmdparam.h>
 
 #include "peninputsplititutlayout.h"
 #include "peninputsplititutdatamgr.h"
@@ -44,6 +45,12 @@
 #include "peninputsplititutconverter.h"
 #include "peninputsplititutwindowmanager.h"
 
+// Buffer size
+const TInt KServerBufferSize = 8;
+
+// TInt number in command, used to show candidate list
+const TInt KStartIntNumber = 3;
+const TInt KEndIntNumber = 4;
 
 // ---------------------------------------------------------------------------
 // CSplitItutUiLayout::NewL
@@ -207,7 +214,6 @@
         case ECmdPenInputFingerKeyPress:
         case ECmdPenInputFingerLongKeyPress:
         case ECmdPenInputCase:
-        case ECmdPenInputFingerMatchSelection:
         case ECmdPenInputFingerSpelling:
             {
             if (UiMgr())
@@ -218,14 +224,18 @@
                 }
             }
             break;
+        case ECmdPenInputFingerMatchSelection:
+            {
+            TBool special = *(reinterpret_cast<TBool*>(aData));
+            if( !special )
+                {
+                SignalOwner( ESignalHideServerCandidate );
+                }
+            }
+            break;
         case ECmdPenInputFingerMatchList:
             {
-            if (UiMgr())
-                {
-                TInt handled = KErrNone;
-                TRAP_IGNORE(handled = UiMgr()->HandleCommandL(aCmd, aData));
-                return handled;
-                }
+            TRAP_IGNORE( HandleShowMatchListCmdL( aData ) );
             }
             break;
         case ECmdPenInputNoFreeSpace:
@@ -291,7 +301,11 @@
 //            iWindowMgr->ShowBubble(*aData);    
             }
             break; 
-            
+        case ECmdPeninputSelectServerCandidate:
+        	{
+        	TRAP_IGNORE( HandleSelectServerCandItemL( aData ) );
+        	}
+        	break;
         default:
             break;
         }
@@ -433,16 +447,6 @@
 //
 void CSplitItutUiLayout::OnDeActivate()
     {
-    CBubbleCtrl* bubble = static_cast<CBubbleCtrl *>(Control(ECtrlIdSplitIndiBubble));
-    if (bubble && NotDrawToLayoutDevice())
-        {
-        TBool flag = EFalse;
-        HandleCommand(ECmdPeninputEnableOwnBitmap,reinterpret_cast<TUint8*>(&flag));
-        bubble->Draw();
-        flag = ETrue;
-        HandleCommand(ECmdPeninputEnableOwnBitmap,reinterpret_cast<TUint8*>(&flag));
-        }
-    
     TRAP_IGNORE(UiMgr()->HandleCommandL(ECmdPenInputDeActive, NULL));
 
     CFepUiLayout::OnDeActivate();
@@ -559,5 +563,141 @@
     return iChnUiMgr;
         
     }
+
+// ---------------------------------------------------------------------------
+// Handle show candidate list command.
+// ---------------------------------------------------------------------------
+//
+void CSplitItutUiLayout::HandleShowMatchListCmdL( TUint8* aData )
+    {
+    RDesReadStream readStream;
+    TPtr8 buf8( aData, KStartIntNumber * sizeof( TInt ),
+                KStartIntNumber * sizeof( TInt ) );
+    readStream.Open(buf8);
+    CleanupClosePushL(readStream);
+
+    TInt candcount = readStream.ReadInt32L();
+    TInt totalsize = readStream.ReadInt32L();
+    TInt langcode = readStream.ReadInt32L();
+    TBidiText::TDirectionality dir = 
+                   TBidiText::ScriptDirectionality( ( TLanguage ) langcode );
+    CGraphicsContext::TTextAlign align = ( dir == TBidiText::ELeftToRight ) ?
+                                           CGraphicsContext::ELeft :
+                                           CGraphicsContext::ERight;
     
+    CleanupStack::PopAndDestroy(&readStream);
+
+    CDesCArray* itemArray = NULL;
+    if ( candcount > 0 )
+        {        
+        TUint8* curPointer = aData + sizeof(TInt) * KStartIntNumber;
+        itemArray = new (ELeave) CDesCArrayFlat( candcount );
+        CleanupStack::PushL( itemArray );
+        for ( TInt i = 0; i < candcount; i++ )
+            {
+            // Get length
+            buf8.Set( curPointer, sizeof( TInt32 ), sizeof( TInt32 ) );
+            readStream.Open( buf8 );
+            CleanupClosePushL( readStream );
+            TInt32 textSize = 0;
+            textSize = readStream.ReadInt32L();            
+            CleanupStack::PopAndDestroy( &readStream );
+            if ( textSize > 0 )
+                {
+                // Get text
+                curPointer += sizeof( TInt32 );
+                HBufC* itemText = ReadTextInfoHBufCL
+                                      ( (TUint16*)curPointer, 
+                                        ( textSize + 1 )/ 2 );
+                if ( itemText )
+                    {
+                    CleanupStack::PushL( itemText );
+                    itemArray->AppendL( *itemText );                    
+                    CleanupStack::PopAndDestroy( itemText ); 
+                    }     
+                curPointer += textSize;
+                }
+            }
+        
+        buf8.Set( curPointer, sizeof( TInt32 ) * KEndIntNumber,
+                  sizeof( TInt32 ) * KEndIntNumber );
+        readStream.Open( buf8 );
+        CleanupClosePushL( readStream );
+        TRect rect;
+        rect.iTl.iX = readStream.ReadInt32L();
+        rect.iTl.iY = readStream.ReadInt32L();
+        rect.iBr.iX = readStream.ReadInt32L();
+        rect.iBr.iY = readStream.ReadInt32L();
+        CleanupStack::PopAndDestroy( &readStream );
+ 
+        TPeninputCandidateData cmd;
+        cmd.iAlign = ( TInt ) align;
+        cmd.iInitRect = rect;
+        cmd.iSpellEnabled = ETrue;
+        cmd.iTextWidthEnabled = ETrue;
+        cmd.iItemArray = itemArray;
+        cmd.iActiveIndex = 0;
+        
+    	TPtrC buf( reinterpret_cast<TUint16*>( &cmd ), sizeof( cmd ) );
+        SignalOwner( ESignalShowServerCandidate, buf );
+        
+        CleanupStack::PopAndDestroy( itemArray );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Read text stored in a block of memory into HBufC.
+// ---------------------------------------------------------------------------
+//
+HBufC* CSplitItutUiLayout::ReadTextInfoHBufCL( TUint16* aStartPtr, 
+                                                      TInt aLength )
+    {
+    HBufC* itemText = NULL;
+    if ( aLength > 0 )
+        {
+        itemText = HBufC::NewLC( aLength );
+        TPtr itemTextPtr = itemText->Des();
+        itemTextPtr.Copy( aStartPtr, aLength ); 
+        CleanupStack::Pop( itemText ); 
+        }    
+    return itemText;
+    }
+
+// ---------------------------------------------------------------------------
+// Handle select candidate list item command.
+// ---------------------------------------------------------------------------
+//
+void CSplitItutUiLayout::HandleSelectServerCandItemL( TUint8* aData )
+	{
+	TPtr8* ptr = reinterpret_cast< TPtr8* > ( aData );
+    RDesReadStream readStream;
+    readStream.Open( *ptr );
+    CleanupClosePushL( readStream );
+    TInt command = readStream.ReadInt32L();
+    TInt focusItem = readStream.ReadInt32L();
+    CleanupStack::PopAndDestroy(&readStream);
+    
+	switch ( command )
+		{
+		case ECandItemCmdItemSelected:
+			{
+            TBool commit = ETrue;
+            TBuf<KServerBufferSize> buf;
+            buf.Append( reinterpret_cast< TUint16* >( &focusItem ), 
+                         sizeof( TInt ) );
+            buf.Append( reinterpret_cast< TUint16* >( &commit ), 
+                         sizeof( TBool ) );
+        	SignalOwner ( ESignalSelectMatchSelectionText, buf );       			
+			}
+			break;
+		case ECandItemCmdEnterSpellMode:
+			{
+		    SignalOwner ( ESignalEnterSpellMode );
+			}
+			break;
+		default:
+			break;
+		}	
+	}
+
 // End Of File
--- a/textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -133,30 +133,14 @@
         }
 
     iCurrentState = newstate;    
-    if ( DataMgr()->IsUpdate() )  
-        {
-        DataMgr()->SetUpdate( EFalse );
-        
-		CSplitItutUiLayout* itutLayout = 
-			static_cast<CSplitItutUiLayout*>( LayoutContext()->UiLayout());
-    	// Get the screen rect
-    	TRect screenRect = DataMgr()->screenSize();
-    	// If the screen is in portrait mode
-    	if ( screenRect.Width() < screenRect.Height())
-    		{
-			itutLayout->SizeChanged( NULL );
-    		}
-
-        iCurrentState->OnEntryL();
-        
-        //redraw layout immediately to minimize flicker
-        itutLayout->DisableLayoutDrawing( EFalse );
-        itutLayout->Draw();
-        }
-    else
-        {
-        iCurrentState->OnEntryL();
-        }
+    if(DataMgr()->IsUpdate())  
+    	{
+    	DataMgr()->SetUpdate(EFalse);
+    	CSplitItutUiLayout* itutLayout = 
+			static_cast<CSplitItutUiLayout*>( LayoutContext()->UiLayout() );
+		itutLayout->SizeChanged( NULL );
+    	}
+    iCurrentState->OnEntryL();
     }
 
 // ---------------------------------------------------------------------------
--- a/textinput/peninputsplititut/src/peninputsplititutwesternuistatespelling.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutwesternuistatespelling.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -19,7 +19,6 @@
 #include <AknFepGlobalEnums.h>
 #include <peninputsplititutnew.rsg>
 #include <peninputlayoutmultilineicf.h>
-#include <peninputlayoutbubblectrl.h>
 #include <StringLoader.h>
 #include <peninputcommonbutton.h>
 #include <peninputlayout.h>
@@ -53,7 +52,6 @@
                                                         :CSplitItutUiStateBase(aOwner)
     {
     iICF = static_cast<CFepLayoutMultiLineIcf*>(iOwner->LayoutContext()->Control(ECtrlIdICF));
-    iSplitIndiBubble = static_cast<CBubbleCtrl*>(iOwner->LayoutContext()->Control(ECtrlIdSplitIndiBubble));    
     }
 
 void CWesternSplitItutUiStateSpelling::ConstructL()
@@ -100,8 +98,7 @@
         }
     //hide bubble in the first place.    
     iICF->HideBubble();
-    iSplitIndiBubble->Hide(ETrue);
-    
+
     // update resource id of keypad    
     iOwner->DataMgr()->NotifyChangeControlLayout(
         MItutPropertySubscriber::EItutPropertyKeypadResourceId, keypadResId);
@@ -142,7 +139,6 @@
     iOwner->DataMgr()->SetSpellMode(EFalse);
     iICF->Hide( ETrue );
     iOwner->LayoutContext()->ShowArrowBtn(0);
-    iSplitIndiBubble->Hide(EFalse); //Show split indi bubble
     }
 
 CSplitItutUiMgrBase::TUiState CWesternSplitItutUiStateSpelling::StateType()
--- a/textinput/peninputsplititut/src/peninputsplititutwindow.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutwindow.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -43,6 +43,7 @@
 #include "peninputcommonbgctrl.h"
 
 _LIT(KBmpFileName, "z:\\resource\\apps\\peninputsplititut.mbm");
+_LIT(KEmptyString, "");
 
 const TInt KImageMajorSkinId = EAknsMajorGeneric;
 const TUint KDefaultSpellTextColor = 0;
@@ -261,13 +262,6 @@
     iStandardItutKp->SetTextLineLayout(
         TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(EKeypadRightTextLine3)),
         EPosRight3);
-    
-    TRect* iconRect = static_cast<TRect*>( iDataMgr->RequestData( EStarIconRect ));
-    // Set the star icon rect
-    iStandardItutKp->SetStarIconRect( *iconRect );
-    iconRect = static_cast<TRect*>( iDataMgr->RequestData( EShiftIconRect ));
-    // Set the shift icon rect
-    iStandardItutKp->SetShiftIconRect( *iconRect );
 
     TResourceReader reader;
     CCoeEnv::Static()->CreateResourceReaderLC(reader, aResId);
@@ -791,7 +785,7 @@
     									   KAknsIIDQsnFrInputPreviewSideR );  
     iICF->SetMsgBubbleCtrlSize(TSize(iBubbleSize.iW,iBubbleSize.iH));
     
-    iICF->MsgBubbleCtrl()->SetTextL( KNullDesC );
+    iICF->MsgBubbleCtrl()->SetTextL( KEmptyString );
     
     iICF->SetTextMargin( iDataMgr->iIcfTextLeftMargin,
             			 iDataMgr->iIcfTextRightMargin,
@@ -800,28 +794,9 @@
             					  
     iICF->SetLineSpace( iDataMgr->iIcfTextLineSpaceMargin );    					  
         	 
-    SetSpellIndiBubble();
+    SetIndiBubble();
     iICF->Hide( ETrue );
     }
-
-// ---------------------------------------------------------------------------
-// CSplitItutWindow::CreateSplitIndiBubbleL
-// ---------------------------------------------------------------------------
-//
-void CSplitItutWindow::CreateSplitIndiBubbleL()
-    {
-    // char count bubble
-    TRect bubbleRect = TItutDataConverter::AnyToRect(iDataMgr->RequestData(ESplitIndiPaneRect));
-    iSplitIndiBubble = CBubbleCtrl::NewL(bubbleRect,iLayoutOwner,ECtrlIdSplitIndiBubble);
-    iSplitIndiBubble->SetTextFormat(TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(ESplitIndiTextLine)));
-    iSplitIndiBubble->SetTextColorIndex( EAknsCIQsnTextColorsCG67 );
-    iSplitIndiBubble->SetBitmapParam(NULL,
-                            NULL,
-                            KAknsIIDQsnFrInputPreviewSideL,
-                            KAknsIIDQsnFrInputPreviewMiddle,
-                            KAknsIIDQsnFrInputPreviewSideR);
-    AddControlL(iSplitIndiBubble);  
-    }
  
     
 // ---------------------------------------------------------------------------
@@ -834,7 +809,6 @@
     CreateAllButtonL();
     CreateItutKeypadL();
     CreateICFL();
-	CreateSplitIndiBubbleL();
     }
 
 // ---------------------------------------------------------------------------
@@ -974,7 +948,6 @@
     {
     // resize all controls
     SetCtrlRect(iStandardItutKp, EKeypadRect);
-    SetCtrlRect(iSplitIndiBubble, ESplitIndiPaneRect);
 
     iStandardItutKp->SetTextLineLayout(
         TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(EKeypadLeftTextLine)),
@@ -989,13 +962,6 @@
         TItutDataConverter::AnyToTextLine(iDataMgr->RequestData(EKeypadRightTextLine3)),
         EPosRight3);
     
-    TRect* iconRect = static_cast<TRect*>( iDataMgr->RequestData( EStarIconRect ));
-    // Set the star icon rect
-    iStandardItutKp->SetStarIconRect( *iconRect );
-    iconRect = static_cast<TRect*>( iDataMgr->RequestData( EShiftIconRect ));
-    // Set the shift icon rect
-    iStandardItutKp->SetShiftIconRect( *iconRect );
-    
     RPointerArray<CVirtualKey>& keys = 
         const_cast<RPointerArray<CVirtualKey>&>(iStandardItutKp->KeyArray());
     RArray<TRect>& cellRects = 
@@ -1490,44 +1456,9 @@
 
     }
 
-void CSplitItutWindow::UpdateSplitIndiBubbleL( TUint8* aData )
+void CSplitItutWindow::UpdateIndiBubbleL( TUint8* aData )
     {  
-    RDesReadStream readStream;
-    TFepIndicatorInfo indicatorData;
-
-    TPtr8 countPtr( aData, 4*sizeof(TInt), 4*sizeof(TInt) );            
-    readStream.Open(countPtr);
-    CleanupClosePushL(readStream);
-
-    indicatorData.iIndicatorImgID = readStream.ReadInt32L();
-    indicatorData.iIndicatorMaskID = readStream.ReadInt32L();
-    indicatorData.iIndicatorTextImgID = readStream.ReadInt32L();
-    indicatorData.iIndicatorTextMaskID = readStream.ReadInt32L();
-
-    CleanupStack::PopAndDestroy(&readStream);
-
-    if ( indicatorData.iIndicatorImgID != 0 && 
-         indicatorData.iIndicatorMaskID != 0 && 
-         indicatorData.iIndicatorTextImgID != 0 &&
-         indicatorData.iIndicatorTextMaskID != 0)
-        {
-        iDataMgr->SetSplitIndicatorData(indicatorData);
-        iImDimensionSet = ETrue;
-
-        SetBubbleImageL(*iSplitIndiBubble, TItutDataConverter::AnyToRect(
-                iDataMgr->RequestData(ESplitIndiIconRect)),
-                indicatorData.iIndicatorImgID,
-                indicatorData.iIndicatorMaskID,
-                indicatorData.iIndicatorTextImgID,
-                indicatorData.iIndicatorTextMaskID);
-        iSplitIndiBubble->Hide(EFalse);
-        }
-    
-    }
-
-void CSplitItutWindow::UpdateSpellIndiBubbleL( TUint8* aData )
-    {  
-    // if icf is hidden, not call updateindibubblel
+	// if icf is hidden, not call updateindibubblel
     if( iICF->Hiden() )     
     	{
         return;
@@ -1551,16 +1482,13 @@
          indicatorData.iIndicatorTextImgID != 0 &&
          indicatorData.iIndicatorTextMaskID != 0)
         {
-        iDataMgr->SetSpellIndicatorData( indicatorData );
+        iDataMgr->SetIndicatorData( indicatorData );
         iImDimensionSet = ETrue;
 
-        SetBubbleImageL(*iICF->MsgBubbleCtrl(),
-                        TItutDataConverter::AnyToRect( 
-                                iDataMgr->RequestData( ESpellIndiIconWithoutTextRect )),
-                        indicatorData.iIndicatorImgID,
-                        indicatorData.iIndicatorMaskID,
-                        indicatorData.iIndicatorTextImgID,
-                        indicatorData.iIndicatorTextMaskID );
+        SetIndiBubbleImageL( indicatorData.iIndicatorImgID,
+                             indicatorData.iIndicatorMaskID,
+                             indicatorData.iIndicatorTextImgID,
+                             indicatorData.iIndicatorTextMaskID );
             
 		TBuf<KTextLength> text;	
         iICF->MsgBubbleCtrl()->GetText( text );
@@ -1674,12 +1602,10 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSplitItutWindow::SetBubbleImageL
+// CSplitItutWindow::SetIndiBubbleImageL
 // ---------------------------------------------------------------------------
 //
-void CSplitItutWindow::SetBubbleImageL( CBubbleCtrl& aBubble,
-                                            const TRect& aRect,
-                                            const TInt aImgID1,
+void CSplitItutWindow::SetIndiBubbleImageL( const TInt aImgID1,
                                             const TInt aMaskID1,
                                             const TInt aImgID2,
                                             const TInt aMaskID2 )
@@ -1724,7 +1650,10 @@
     
     AknIconUtils::GetContentDimensions( bmp2, iIndicatorTextSize );
     
-    TRect boundRect = aRect;
+    TRect boundRect;
+    boundRect = TItutDataConverter::AnyToRect(
+                iDataMgr->RequestData( EIndiIconWithoutTextRect ));
+    
     TRect imgrect, textrect;
     
     CalIndicatorRect( boundRect, imgrect, textrect, EIndiAlignCenter );
@@ -1736,11 +1665,11 @@
     CFbsBitmap* bmp3 = AknPenImageUtils::CombineTwoImagesL(bmp1, bmp2, EColor256);
     CFbsBitmap* mask3 = AknPenImageUtils::CombineTwoImagesL(mask1, mask2, EGray256);
     
-    aBubble.SetBitmapParam( bmp3, mask3, 
-                            KAknsIIDQsnFrInputPreviewSideL,
-                            KAknsIIDQsnFrInputPreviewMiddle,
-                            KAknsIIDQsnFrInputPreviewSideR );
-       
+    iICF->MsgBubbleCtrl()->SetBitmapParam( bmp3, mask3, 
+                    KAknsIIDQsnFrInputPreviewSideL,
+                    KAknsIIDQsnFrInputPreviewMiddle,
+                    KAknsIIDQsnFrInputPreviewSideR );
+    
     CleanupStack::PopAndDestroy( mask2 );
     CleanupStack::PopAndDestroy( bmp2 );
     CleanupStack::PopAndDestroy( mask1 );
@@ -1748,43 +1677,17 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSplitItutWindow::SetSplitIndiBubble
+// CSplitItutWindow::SetIndiBubble
 // ---------------------------------------------------------------------------
 //
-void CSplitItutWindow::SetSplitIndiBubble()
+void CSplitItutWindow::SetIndiBubble()
     {
-    if (iSplitIndiBubble)
-        {
-        TAknTextLineLayout textLine = TItutDataConverter::AnyToTextLine(
-                iDataMgr->RequestData(ESplitIndiTextLine));
-        TRect bubbleRect = TItutDataConverter::AnyToRect(
-                iDataMgr->RequestData(ESplitIndiPaneRect));
-        TRect iconRect = TItutDataConverter::AnyToRect(
-                iDataMgr->RequestData(ESplitIndiIconRect));
-        TSize offset;
-        offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY;
-        offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX;
-        TSize size(iconRect.Width(), iconRect.Height());
-    
-        iSplitIndiBubble->SetRect(bubbleRect);
-        iSplitIndiBubble->SetIconOffsetAndSize(offset, size);
-        iSplitIndiBubble->SetTextFormat(textLine);
-        iSplitIndiBubble->SetTextColorIndex(EAknsCIQsnTextColorsCG67);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CSplitItutWindow::SetSpellIndiBubble
-// ---------------------------------------------------------------------------
-//
-void CSplitItutWindow::SetSpellIndiBubble()
-    {
-    if (iICF)
+    if ( iICF )
         {
         TRect bubbleRect = TItutDataConverter::AnyToRect( 
-                iDataMgr->RequestData( ESpellIndiPaneWithoutTextRect ));
+                iDataMgr->RequestData( EIndiPaneWithoutTextRect ));
         TRect iconRect = TItutDataConverter::AnyToRect( 
-                iDataMgr->RequestData( ESpellIndiIconWithoutTextRect ));
+                iDataMgr->RequestData( EIndiIconWithoutTextRect ));
         
         TSize offset;
         offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY;
--- a/textinput/peninputsplititut/src/peninputsplititutwindowmanager.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutwindowmanager.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -259,18 +259,8 @@
         	break;
         case ECmdPenInputFingerMatchIndicator:
         	{
-            if ( iLayoutOwner->UiMgr()->CurrentState() )
-                {
-                if (iLayoutOwner->UiMgr()->CurrentState()->StateType() == CSplitItutUiMgrBase::EStateSpelling )
-                    {
-                    iWindow->UpdateSpellIndiBubbleL( aData );
-                    }
-                else
-                    {
-                    iWindow->UpdateSplitIndiBubbleL( aData );
-                    }
-                handle = ETrue;
-                }
+        	iWindow->UpdateIndiBubbleL( aData );
+        	handle = ETrue;
         	}
         	break;
         default:
@@ -338,31 +328,8 @@
 // CSplitItutWindowManager::HandleAppInfoChangeL
 // ---------------------------------------------------------------------------
 //
-void CSplitItutWindowManager::HandleAppInfoChangeL(const TDesC& aInfo)
+void CSplitItutWindowManager::HandleAppInfoChangeL(const TDesC& /*aInfo*/)
     {
-    if ( iWindow )
-        {
-        CBubbleCtrl* splitIndibubble = static_cast<CBubbleCtrl*> 
-                                    (iWindow->Control(ECtrlIdSplitIndiBubble)) ;
-
-        if ( splitIndibubble )
-            { 
-            if ( aInfo.Length() > 0 && !iInEditWordQueryDlg)
-                {
-                TRAP_IGNORE(splitIndibubble->SetTextL(aInfo));
-                }
-            else
-                {
-                TRAP_IGNORE(splitIndibubble->SetTextL(KNullDesC));
-                }
-            iWindow->SetSplitIndiBubble();
-            if (splitIndibubble->IsShowing())//make sure we redraw if visible
-                {
-                splitIndibubble->Popup(splitIndibubble->Rect());
-                }
-            }
-        }
-        
     }
 
 // ---------------------------------------------------------------------------
--- a/textinput/peninputsplitqwerty/inc/peninputsplitqwertylafdatamgr.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplitqwerty/inc/peninputsplitqwertylafdatamgr.h	Wed Oct 13 14:55:58 2010 +0300
@@ -105,11 +105,6 @@
     TPeninputButtonLayoutDataEx iSpaceButtonEx;
     TPeninputButtonLayoutData   iEnterButton;
     TPeninputButtonLayoutData   iRangeButton;
-    TRect iSplitIndiPaneRectWithText;
-    TRect iSplitIndiPaneRectWithoutText;
-    TRect iSplitIndiIconRectWithText;
-    TRect iSplitIndiIconRectWithoutText;
-    TAknTextLineLayout iSplitIndiText;    
     TRect iTitlebarRect;
     TRect iClientRect;
     TRect iQwtRect;
@@ -281,40 +276,6 @@
      */
     TBool IsValid() const;
 
-    /**
-     * Get split indicator rect with text
-     *
-     * @return TRect
-     */
-    const TRect& SplitIndiRectWithText() const;
-    
-    /**
-     * Get split indicator rect without text
-     *
-     * @return TRect
-     */
-    const TRect& SplitIndiRectWithoutText() const;
-    
-    /**
-     * Get split indicator icon rect with text
-     *
-     * @return TRect
-     */    
-    const TRect& SplitIndiIconRectWithText() const;
-    
-    /**
-     * Get split indicator icon rect without text
-     *
-     * @return TRect
-     */        
-    const TRect& SplitIndiIconRectWithoutText() const;
-    
-    /**
-     * Get split indicator text layout
-     *
-     * @return TAknTextLineLayout
-     */        
-    const TAknTextLineLayout& SplitIndiText() const;
 protected:
 
     /**
@@ -628,41 +589,6 @@
     void GetSpaceButtonExLayoutInfo( TRect& aIconsFrameRect,
                                      TRect& aMiddleIconRect ) const;
 
-    /**
-     * Get split indicator rect with text
-     *
-     * @return TRect
-     */
-    const TRect& SplitIndiRectWithText() const;
-    
-    /**
-     * Get split indicator rect without text
-     *
-     * @return TRect
-     */
-    const TRect& SplitIndiRectWithoutText() const;
-    
-    /**
-     * Get split indicator icon rect with text
-     *
-     * @return TRect
-     */    
-    const TRect& SplitIndiIconRectWithText() const;
-    
-    /**
-     * Get split indicator icon rect without text
-     *
-     * @return TRect
-     */        
-    const TRect& SplitIndiIconRectWithoutText() const;
-    
-    /**
-     * Get split indicator text layout
-     *
-     * @return TAknTextLineLayout
-     */        
-    const TAknTextLineLayout& SplitIndiText() const;
-    
 private:
 
     /**
--- a/textinput/peninputsplitqwerty/inc/peninputsplitqwertylayout.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplitqwerty/inc/peninputsplitqwertylayout.h	Wed Oct 13 14:55:58 2010 +0300
@@ -267,13 +267,32 @@
                               const TDesC& aEventData );
     
     /**
-     * Handle virtual key down event
-     * 
-     * @since since S60 v5.0
-     * @param none
-     * @return none
-     */
-    void HandleVirtualKeyDown();
+     * Handle show candidate list command
+     *
+     *     
+     * @aData pointer is sent from FEP, point to a TPtrC
+     * @return None
+     */    
+    void HandleShowCandidateListCmdL( TUint8* aData );
+    
+    /**
+     * Read text stored in a block of memory into HBufC
+     *
+     *     
+     * @aData aStartPtr the starting address of a block of memory with a string in it
+     * @aLength The length of the string
+     * @return pointer of a HBufC storing the string in it
+     */ 
+    HBufC* ReadTextInfoHBufCL( TUint16* aStartPtr, TInt aLength );  
+    
+    /**
+     * Handle select candidate list item command
+     *
+     *     
+     * @aData pointer is sent from FEP, point to a TPtrC
+     * @return None
+     */    
+    void HandleSelectServerCandItemL( TUint8* aData );    
 
 private:
 
--- a/textinput/peninputsplitqwerty/inc/peninputsplitqwertywindow.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplitqwerty/inc/peninputsplitqwertywindow.h	Wed Oct 13 14:55:58 2010 +0300
@@ -33,7 +33,6 @@
 class CPeninputSyncBitmapRotator;
 class CRepository;
 class CFepLayoutScrollableList;
-class CPopupBubbleCtrl;
 
 // Constants
 const TInt KMaxFileLength = 80;
@@ -62,13 +61,6 @@
  */
 class CPeninputSplitQwertyWindow : public CPeninputLayoutWindowExt
     {
-private:
-    enum TIndicatorAlign
-        {
-        EIndiAlignLeft,
-        EIndiAlignCenter,
-        EIndiAlignRight 
-        };    
 public:
     /**
      * Symbian constructor
@@ -298,15 +290,6 @@
      */
     TBool HandleVirtualKeyUpEvent( TInt aEventType, CFepUiBaseCtrl* aCtrl,
                                    const TDesC& aEventData );
-    
-    /**
-     * Handle virtual key down event
-     *
-     * @since S60 v5.0
-     * @param None
-     * @return None
-     */
-    void HandleVirtualKeyDownEvent();
 
     /**
      * Submit dead key
@@ -384,70 +367,7 @@
      */
     void UpdateLayoutPosAndSize();
 
-    /**
-     * Set split indicator bubble size with text
-     * 
-     * @return None
-     */
-    void SetSplitIndiBubbleSizeWithText();
 
-    /**
-     * Set split indicator bubble size without text
-     * 
-     * @return None
-     */    
-    void SetSplitIndiBubbleSizeWithoutText();
-
-    /**
-     * Update split indicator bubble
-     * 
-     * @param aData text
-     * @return None
-     */
-    void UpdateSplitIndiBubbleL( TUint8* aData );
-    
-    /** 
-     * Set bubble image
-     *
-     * @param aImgID1 image ID1
-     * @param aMaskID1 mask image id1
-     * @param aImgID2 image ID2
-     * @param aMaskID2 mask image id2
-     * @return None
-     */    
-    void SetSplitIndiBubbleImageL( const TInt aImgID1,
-                            const TInt aMaskID1,
-                            const TInt aImgID2,
-                            const TInt aMaskID2 );
-
-    /**
-     * Calculate indicator bubble rect
-     *
-     * @param aBoundRect
-     * @param aRealRect1
-     * @param aRealRect2
-     * @param aAlign
-     * @return None
-     */     
-    void CalIndicatorRect(const TRect& aBoundRect,
-                          TRect& aRealRect1,
-                          TRect& aRealRect2,
-                          TIndicatorAlign aAlign);    
-    /**
-     * Get indicator data
-     * 
-     * @return TFepIndicatorInfo indicator info
-     */
-    inline TFepIndicatorInfo SplitIndicatorData();
-
-    /**
-     * Set indicator data
-     * 
-     * @param aIndicatorData Indicator Data
-     * @return None
-     */
-    inline void SetSplitIndicatorData( const TFepIndicatorInfo& aIndicatorData );  
-    
 protected: //from base class CPeninputLayoutWindowExt
     /**
      * Set laf layout type
@@ -711,12 +631,6 @@
     CPeninputCommonChoiceList* iPopupWnd;
 
     /**
-     * Indicator bubble
-     * Not own
-     */
-    CPopupBubbleCtrl* iSplitIndiBubble;
-    
-    /**
      * The resource file name
      */
     TBuf<KMaxFileLength> iResourceFilename;
@@ -825,21 +739,6 @@
     RArray<CFepLayoutChoiceList::SItem> iAccentCmdList;
 
     /**
-     * Indicator bubble size
-     */
-    TSize iSplitIndicatorSize;
-
-    /**
-     * Indicator text size
-     */
-    TSize iSplitIndicatorTextSize;
-
-    /**
-     * Indicator data
-     */
-    TFepIndicatorInfo iSplitIndicatorData;
-    
-    /**
      * Range labels for range list
      */
     TAllRangeLabels iRangeLabels;
@@ -861,20 +760,6 @@
     return ( aLanguage != ELangTest && aLanguage != ELangNone );
     }
 
-inline void CPeninputSplitQwertyWindow::SetSplitIndicatorData( 
-        const TFepIndicatorInfo& aIndicatorData )
-    {
-    iSplitIndicatorData.iIndicatorImgID = aIndicatorData.iIndicatorImgID;
-    iSplitIndicatorData.iIndicatorMaskID = aIndicatorData.iIndicatorMaskID;
-    iSplitIndicatorData.iIndicatorTextImgID = aIndicatorData.iIndicatorTextImgID;
-    iSplitIndicatorData.iIndicatorTextMaskID = aIndicatorData.iIndicatorTextMaskID;
-    }
-    
-inline TFepIndicatorInfo CPeninputSplitQwertyWindow::SplitIndicatorData()
-    {
-    return iSplitIndicatorData;
-    }
-
 inline CAknFepCtrlEventButton* CPeninputSplitQwertyWindow::EventButtonCtrl(
                                                                 TInt aCtrlId )
     {
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -202,56 +202,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// Get split indicator rect with text
-// ---------------------------------------------------------------------------
-//
-const TRect& MPeninputLafDataCommon::SplitIndiRectWithText() const
-    {
-    ASSERT( IsValid());
-    return iLayoutDataInfo[iLayoutType]->iSplitIndiPaneRectWithText;
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator rect without text
-// ---------------------------------------------------------------------------
-//
-const TRect& MPeninputLafDataCommon::SplitIndiRectWithoutText() const 
-    {
-    ASSERT( IsValid());
-    return iLayoutDataInfo[iLayoutType]->iSplitIndiPaneRectWithoutText;
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator icon rect with text
-// ---------------------------------------------------------------------------
-//
-const TRect& MPeninputLafDataCommon::SplitIndiIconRectWithText() const
-    {
-    ASSERT( IsValid());
-    return iLayoutDataInfo[iLayoutType]->iSplitIndiIconRectWithText;
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator icon rect without text
-// ---------------------------------------------------------------------------
-//
-const TRect& MPeninputLafDataCommon::SplitIndiIconRectWithoutText() const
-    {
-    ASSERT( IsValid());
-    return iLayoutDataInfo[iLayoutType]->iSplitIndiIconRectWithoutText;
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator text layout
-// ---------------------------------------------------------------------------
-//
-const TAknTextLineLayout& MPeninputLafDataCommon::SplitIndiText() const
-    {
-    ASSERT( IsValid());
-    return iLayoutDataInfo[iLayoutType]->iSplitIndiText;
-    }
-
-// ---------------------------------------------------------------------------
 // Symbian constructor
 // ---------------------------------------------------------------------------
 //        
@@ -429,7 +379,7 @@
             }
         }
     
-    // Compute the gap between first row key's top line and keyboard's top line
+        // Compute the gap between first row key's top line and keyboard's top line
     gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
     // Compute function button's top left Y coordinate
     rectOfButtons.iTl.iY = rectOfButtons.iTl.iY + 
@@ -464,7 +414,7 @@
             data->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
-            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
+            inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );       
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
@@ -476,10 +426,8 @@
 
     //all template rects are relative to TL of buttons row
     rectXPane = keypaneRect.Rect();
-    
     // The key rect without gap
     rectXBorder = RelativeRect( keypaneRect.Rect(), rectXPane.iTl );
-    
     rectXInner = RelativeRect( keylabelRect.Rect(), rectXPane.iTl );
     TRect rect3PicPane = RelativeRect( pic3paneRect.Rect(), rectXPane.iTl );
     rectXPane.Move( - rectXPane.iTl ); 
@@ -543,32 +491,6 @@
     data->iPreviewWndText = keyText;
     data->iPreviewWndRect = layoutrect.Rect();
     data->iPreviewWndInnerRect = layoutInnerect.Rect();
-
-    // bubble indicator
-    TAknWindowLineLayout icfIndiPaneWithText, icfIndiPaneWithoutText, 
-        indiIconWithText, indiIconWithoutText;
-    TAknLayoutRect icfIndiPaneRectWithText, icfIndiPaneRectWithoutText,
-        indiIconRectWithText, indiIconRectWithoutText;
-    TAknTextLineLayout indiTextLayout;
-    
-    icfIndiPaneWithText = AknLayoutScalable_Avkon::icf_edit_indi_pane(1).LayoutLine();
-    icfIndiPaneRectWithText.LayoutRect( rectAppWin, icfIndiPaneWithText );
-    data->iSplitIndiPaneRectWithText = icfIndiPaneRectWithText.Rect();
-    
-    icfIndiPaneWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane(0).LayoutLine();
-    icfIndiPaneRectWithoutText.LayoutRect( rectAppWin, icfIndiPaneWithoutText );
-    data->iSplitIndiPaneRectWithoutText = icfIndiPaneRectWithoutText.Rect();
-    
-    indiIconWithText = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(1).LayoutLine();
-    indiIconRectWithText.LayoutRect( icfIndiPaneRectWithText.Rect(), indiIconWithText );
-    data->iSplitIndiIconRectWithText = indiIconRectWithText.Rect();
-    
-    indiIconWithoutText = AknLayoutScalable_Avkon::icf_edit_indi_pane_g2(0).LayoutLine();
-    indiIconRectWithoutText.LayoutRect( icfIndiPaneRectWithoutText.Rect(), indiIconWithoutText );
-    data->iSplitIndiIconRectWithoutText = indiIconRectWithoutText.Rect();
-    
-    indiTextLayout = AknLayoutScalable_Avkon::icf_edit_indi_pane_t1(0).LayoutLine();
-    data->iSplitIndiText = indiTextLayout;    
     
     return data;
     }
@@ -906,54 +828,4 @@
 void CPeninputSplitQwertyLafMgr::ConstructL()
     {
     }
-
-// ---------------------------------------------------------------------------
-// Get split indicator rect with text
-// ---------------------------------------------------------------------------
-//
-const TRect& CPeninputSplitQwertyLafMgr::SplitIndiRectWithText() const
-    {
-    ASSERT(iLafData);
-    return iLafData->SplitIndiRectWithText();
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator pane rect without text
-// ---------------------------------------------------------------------------
-//
-const TRect& CPeninputSplitQwertyLafMgr::SplitIndiRectWithoutText() const
-    {
-    ASSERT(iLafData);
-    return iLafData->SplitIndiRectWithoutText();
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator icon rect with text
-// ---------------------------------------------------------------------------
-//
-const TRect& CPeninputSplitQwertyLafMgr::SplitIndiIconRectWithText() const
-    {
-    ASSERT(iLafData);
-    return iLafData->SplitIndiIconRectWithText();
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator icon rect without text
-// ---------------------------------------------------------------------------
-//
-const TRect& CPeninputSplitQwertyLafMgr::SplitIndiIconRectWithoutText() const
-    {
-    ASSERT(iLafData);
-    return iLafData->SplitIndiIconRectWithoutText();
-    }
-
-// ---------------------------------------------------------------------------
-// Get split indicator text layout
-// ---------------------------------------------------------------------------
-//
-const TAknTextLineLayout& CPeninputSplitQwertyLafMgr::SplitIndiText() const
-    {
-    ASSERT(iLafData);
-    return iLafData->SplitIndiText();
-    }
 // End Of File
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertylayout.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertylayout.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -31,7 +31,7 @@
 #include <s32mem.h>
 
 #include <peninputrangebar.h>
-#include <peninputpopupbubble.h>
+#include <peninputcmdparam.h>
 
 // User includes
 #include "peninputsplitqwerty.hrh"
@@ -58,6 +58,9 @@
     0xF73A,0xF747,0xF748,0xF749,0xF74A,0xF74B,0xF74C,0xF74D
     }; 
 
+// TInt number in command, used to show candidate list
+const TInt KStartIntNumber = 3;
+const TInt KEndIntNumber = 4;
 // ---------------------------------------------------------------------------
 // Symbian constructor
 // ---------------------------------------------------------------------------
@@ -186,6 +189,12 @@
             vkbWindow->DimArrowKeys( IsDimArrowKeys );
             }
             break;
+        case ECmdPeninputVietSyncToneMarker:
+        	{
+        	TBool bDimToneMarker = *aData;
+        	vkbWindow->EnableToneMarker(bDimToneMarker);
+        	}
+        	break;
         case ECmdPenInputSetPromptText:
             break;
         case ECmdPenInputCharacterPreview:
@@ -198,20 +207,27 @@
             iInEditWordQueryDlg = *aData;
             }
             break;
+        case ECmdPenInputPopupCandidateList:
+            {
+            TRAP_IGNORE( HandleShowCandidateListCmdL( aData ) );
+            }
+            break;
+        case ECmdPenInputHideCandidateList:
+            {
+            SignalOwner( ESignalHideServerCandidate );
+            }
+            break;
         case ECmdPeninputITIStatus:
             {
             // Set the flag to indicate if FSQ with ITI feature is opened
             iITIEnabled = CPeninputDataConverter::AnyToInt( aData );
-            }            
+            }
             break;
-        case ECmdPenInputFingerMatchIndicator:
+        case ECmdPeninputSelectServerCandidate:
             {
-            if ( iLayoutType == EPluginInputModeFSQ )
-                {
-                TRAP_IGNORE( vkbWindow->UpdateSplitIndiBubbleL( aData ));
-                }
+            TRAP_IGNORE( HandleSelectServerCandItemL( aData ) );
             }
-            break;            
+            break;
         default:
             {
             }
@@ -236,13 +252,6 @@
             TRAP_IGNORE( HandleVirtualKeyUpL( aEventType, aCtrl, aEventData ) );
             }
             break;
-        case EEventVirtualKeyDown:
-        	{
-        	HandleVirtualKeyDown();
-        	CPeninputCommonLayoutExt::HandleControlEvent( aEventType, 
-        			aCtrl, aEventData );
-        	break;
-        	}
         default:
             {
             CPeninputCommonLayoutExt::HandleControlEvent( aEventType, 
@@ -259,6 +268,15 @@
 TInt CPeninputSplitQwertyLayout::OnAppEditorTextComing( 
                                       const TFepInputContextFieldData& aData )
     {
+    CPeninputSplitQwertyWindow* 
+        win = static_cast<CPeninputSplitQwertyWindow*>(iLayoutWindow);
+        
+    //Suppress ICF related actions
+    if ( win )
+        {
+        return KErrNone;
+        }
+    
     return CPeninputCommonLayoutExt::OnAppEditorTextComing( aData );
     }
 
@@ -268,16 +286,6 @@
 //
 TInt CPeninputSplitQwertyLayout::SizeChanged( const TAny* aData )
     {
-    CPeninputSplitQwertyWindow* 
-        win = static_cast<CPeninputSplitQwertyWindow*>( iLayoutWindow );
-        
-    if ( win )
-        {      
-        win->UpdateLafData();
-        
-        win->UpdateLayoutPosAndSize();        
-        }
-    
     return CPeninputCommonLayoutExt::SizeChanged( aData );
     }
 
@@ -285,30 +293,10 @@
 // Inform UI that application infomation changed
 // ---------------------------------------------------------------------------
 //
-void CPeninputSplitQwertyLayout::HandleAppInfoChange( const TDesC& aInfo, 
-                                                      TPeninputAppInfo aType )
+void CPeninputSplitQwertyLayout::HandleAppInfoChange( const TDesC& /*aInfo*/, 
+                                                      TPeninputAppInfo /*aType*/ )
     {
-    if ( LayoutWindow() )
-        {
-        CPopupBubbleCtrl* splitIndibubble = static_cast<CPopupBubbleCtrl*> 
-                                    (LayoutWindow()->Control(EPeninputWindowCtrlIdSplitIndiBubble)) ;         
-
-        if ( splitIndibubble && ( aType == EAppIndicatorMsg ) && (iLayoutType == EPluginInputModeFSQ) )
-            {
-            CPeninputSplitQwertyWindow* window = static_cast<CPeninputSplitQwertyWindow*>(iLayoutWindow);           
-            if ( aInfo.Length() > 0 && !iInEditWordQueryDlg)
-                {
-                TRAP_IGNORE(splitIndibubble->SetTextL(aInfo));
-                window->SetSplitIndiBubbleSizeWithText();                
-                }
-            else
-                {
-                TRAP_IGNORE(splitIndibubble->SetTextL(KNullDesC));
-                window->SetSplitIndiBubbleSizeWithoutText();                 
-                }
-            splitIndibubble->Draw();           
-            }
-        }
+    //Suppress ICF related actions
     }
 
 // ---------------------------------------------------------------------------
@@ -452,19 +440,130 @@
         }
     }
 
+
 // ---------------------------------------------------------------------------
-// Handle virtual key down event
+// Handle show candidate list command.
 // ---------------------------------------------------------------------------
 //
-void CPeninputSplitQwertyLayout::HandleVirtualKeyDown()
+void CPeninputSplitQwertyLayout::HandleShowCandidateListCmdL( TUint8* aData )
+    {
+    // Read candidate data from a block of memory staring from aData
+    // The format is activeIndex | count of candiates | 
+    // length 1 | text 1 | length 2 | text 2 |...
+    TPtr8 buf8( aData, sizeof( TInt32 ) * KStartIntNumber, 
+                sizeof( TInt32 ) * KStartIntNumber );
+    RDesReadStream readStream;
+    readStream.Open( buf8 );
+    CleanupClosePushL( readStream );
+    // Get activeIndex
+    TInt activeIndex = readStream.ReadInt32L();
+    // Get coutn of candidates
+    TInt count = readStream.ReadInt32L();    
+    TInt langCode = readStream.ReadInt32L();
+    TBidiText::TDirectionality dir = 
+                    TBidiText::ScriptDirectionality( ( TLanguage )langCode );
+    CGraphicsContext::TTextAlign align = ( dir == TBidiText::ELeftToRight ) ?
+                                           CGraphicsContext::ELeft :
+                                           CGraphicsContext::ERight;
+    CleanupStack::PopAndDestroy( &readStream );
+    
+    CDesCArray* itemArray = NULL;
+    if ( count > 0 )
+        {        
+        TUint8* curPointer = aData + sizeof( TInt ) * KStartIntNumber;
+        itemArray = new ( ELeave ) CDesCArrayFlat( count );
+        CleanupStack::PushL( itemArray );
+        for ( TInt i = 0; i < count; i++ )
+            {
+            // Get length
+            buf8.Set( curPointer, sizeof( TInt32 ), sizeof( TInt32 ) );
+            readStream.Open( buf8 );
+            CleanupClosePushL( readStream );
+            TInt32 textSize = 0;
+            textSize = readStream.ReadInt32L();            
+            CleanupStack::PopAndDestroy( &readStream );
+            if ( textSize > 0 )
+                {
+                // Get text
+                curPointer += sizeof( TInt32 );
+                HBufC* itemText = ReadTextInfoHBufCL
+                                      ( (TUint16*)curPointer, 
+                                        ( textSize + 1 )/ 2 );
+                if ( itemText )
+                    {
+                    CleanupStack::PushL( itemText );
+                    itemArray->AppendL( *itemText );                    
+                    CleanupStack::PopAndDestroy( itemText ); 
+                    }     
+                curPointer += textSize;
+                }
+            }
+        
+        buf8.Set( curPointer, sizeof( TInt32 ) * KEndIntNumber, 
+                  sizeof( TInt32 ) * KEndIntNumber );
+        readStream.Open( buf8 );
+        CleanupClosePushL( readStream );
+        TRect rect;
+        rect.iTl.iX = readStream.ReadInt32L();
+        rect.iTl.iY = readStream.ReadInt32L();
+        rect.iBr.iX = readStream.ReadInt32L();
+        rect.iBr.iY = readStream.ReadInt32L();
+        CleanupStack::PopAndDestroy( &readStream );
+        
+        TPeninputCandidateData cmd;
+        cmd.iAlign = ( TInt ) align;
+        cmd.iInitRect = rect;
+        cmd.iSpellEnabled = EFalse;
+        cmd.iTextWidthEnabled = EFalse;
+        cmd.iItemArray = itemArray;
+        cmd.iActiveIndex = activeIndex;
+        
+    	TPtrC buf( reinterpret_cast<TUint16*>( &cmd ), sizeof( cmd ) );
+        SignalOwner( ESignalShowServerCandidate, buf );
+        
+        CleanupStack::PopAndDestroy( itemArray );
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+// Read text stored in a block of memory into HBufC.
+// ---------------------------------------------------------------------------
+//
+HBufC* CPeninputSplitQwertyLayout::ReadTextInfoHBufCL( TUint16* aStartPtr, 
+                                                      TInt aLength )
+    {
+    HBufC* itemText = NULL;
+    if ( aLength > 0 )
+        {
+        itemText = HBufC::NewLC( aLength );
+        TPtr itemTextPtr = itemText->Des();
+        itemTextPtr.Copy( aStartPtr, aLength ); 
+        CleanupStack::Pop( itemText ); 
+        }    
+    return itemText;
+    }
+
+// ---------------------------------------------------------------------------
+// Handle select candidate list item command.
+// ---------------------------------------------------------------------------
+//
+void CPeninputSplitQwertyLayout::HandleSelectServerCandItemL( TUint8* aData )
 	{
-	CPeninputSplitQwertyWindow* window = 
-			static_cast<CPeninputSplitQwertyWindow*>( iLayoutWindow );
-	
-	if ( window )
-		{
-		window->HandleVirtualKeyDownEvent();
-		}
+	TPtr8* ptr = reinterpret_cast< TPtr8* > ( aData );
+    RDesReadStream readStream;
+    readStream.Open( *ptr );
+    CleanupClosePushL( readStream );
+    TInt command = readStream.ReadInt32L();
+    TInt focusItem = readStream.ReadInt32L();
+    CleanupStack::PopAndDestroy(&readStream);
+    
+    if ( command == ECandItemCmdItemSelected )
+    	{
+        TPtrC buf( reinterpret_cast< TUint16* >( &focusItem ),
+        		   sizeof( TInt ) );
+        SignalOwner ( ESignalSelectCandidate, buf );       			
+		}	
 	}
 
 // End Of File
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -55,7 +55,6 @@
 #include "peninputsplitqwertylafdatamgr.h"
 #include "peninputsplitqwertylangmeritpair.h"
 #include "peninputsplitqwertylayout.h"
-#include "peninputpopupbubble.h"
 
 #include <peninputaknvkbpreviewbubblerenderer.h>
 #include <peninputlongpressbutton.h>
@@ -216,18 +215,7 @@
     {
     // Range bar
     AddRangeBarL();
-    
-    // char count bubble   
-    iSplitIndiBubble = CPopupBubbleCtrl::NewL(TRect(),UiLayout(),EPeninputWindowCtrlIdSplitIndiBubble);
-    iSplitIndiBubble->SetTextColorIndex( EAknsCIQsnTextColorsCG67 );
-    //Change the ID when ID into release
-    iSplitIndiBubble->SetBitmapParamL(NULL,
-                              NULL,
-                              KAknsIIDQsnFrInputPreviewSideL,
-                              KAknsIIDQsnFrInputPreviewMiddle,
-                              KAknsIIDQsnFrInputPreviewSideR);
-    AddControlL(iSplitIndiBubble);
-   
+
     // Vkb control
     iVkbCtrl = CPeninputVkbCtrlExt::NewL( TRect(), 
                                           UiLayout(), 
@@ -879,24 +867,6 @@
     } 
 
 // ---------------------------------------------------------------------------
-// Handle virtual key down event
-// ---------------------------------------------------------------------------
-//
-void CPeninputSplitQwertyWindow::HandleVirtualKeyDownEvent()
-	{
-    // Get DeadKey state
-    TInt latchedFlag = CPeninputDataConverter::AnyToInt(
-				   iLayoutContext->RequestData( EAkninputDataTypeLatchedSet ));
-    
-    if ( latchedFlag )
-    	{
-	    UnLatchDeadKey( iNewDeadKeyBuf );
-	    TBool deadKeyChange = ETrue;
-	    iLayoutContext->SetData( EAkninputDataTypeLatchedSet, &deadKeyChange );
-    	}
-	}
-
-// ---------------------------------------------------------------------------
 // Set dead key
 // ---------------------------------------------------------------------------
 //     
@@ -2136,214 +2106,4 @@
     TRAP_IGNORE( UpdateRangeCtrlsL() );
     }
 
-// ---------------------------------------------------------------------------
-// Set split indicator bubble image
-// ---------------------------------------------------------------------------
-//
-void CPeninputSplitQwertyWindow::SetSplitIndiBubbleImageL( const TInt aImgID1,
-                                              const TInt aMaskID1,
-                                              const TInt aImgID2,
-                                              const TInt aMaskID2 )
-    {
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
-
-    CFbsBitmap* bmp1 = NULL;
-    CFbsBitmap* mask1 = NULL;
-    
-    TInt colorIndex = EAknsCIQsnIconColorsCG30;
-
-    AknsUtils::CreateColorIconL(skininstance,
-                                KAknsIIDQsnIconColors,
-                                KAknsIIDQsnIconColors,
-                                colorIndex,
-                                bmp1,
-                                mask1,
-                                AknIconUtils::AvkonIconFileName(),
-                                aImgID1,
-                                aMaskID1,
-                                KRgbGray);
-    CleanupStack::PushL( bmp1 );
-    CleanupStack::PushL( mask1 );
-                                
-    AknIconUtils::GetContentDimensions(bmp1, iSplitIndicatorSize);
-
-    CFbsBitmap* bmp2 = NULL;
-    CFbsBitmap* mask2 = NULL;
-    AknsUtils::CreateColorIconL(skininstance,
-                                KAknsIIDQsnIconColors,
-                                KAknsIIDQsnIconColors,
-                                colorIndex,
-                                bmp2,
-                                mask2,
-                                AknIconUtils::AvkonIconFileName(),
-                                aImgID2,
-                                aMaskID2,
-                                KRgbGray);
- 
-    CleanupStack::PushL( bmp2 );
-    CleanupStack::PushL( mask2 );
-    
-    AknIconUtils::GetContentDimensions(bmp2, iSplitIndicatorTextSize);
-    
-    TRect boundRect;
-    if (iSplitIndiBubble->HasText())
-        {
-        boundRect = iLafMgr->SplitIndiIconRectWithText();
-        }
-    else
-        {
-        boundRect = iLafMgr->SplitIndiIconRectWithoutText();
-        }
-    TRect imgrect, textrect;
-    
-    CalIndicatorRect(boundRect, imgrect, textrect, EIndiAlignCenter);
-    AknIconUtils::SetSize(bmp1, imgrect.Size(), EAspectRatioNotPreserved);
-    AknIconUtils::SetSize(mask1, imgrect.Size(), EAspectRatioNotPreserved);
-    AknIconUtils::SetSize(bmp2, textrect.Size(), EAspectRatioNotPreserved);
-    AknIconUtils::SetSize(mask2, textrect.Size(), EAspectRatioNotPreserved);
-
-    CFbsBitmap* bmp3 = AknPenImageUtils::CombineTwoImagesL(bmp1, bmp2, bmp1->DisplayMode());
-    CFbsBitmap* mask3 = AknPenImageUtils::CombineTwoImagesL(mask1, mask2, EGray256);
-    
-    iSplitIndiBubble->SetBitmapParamL( bmp3, mask3, 
-                    KAknsIIDQsnFrInputPreviewSideL,
-                    KAknsIIDQsnFrInputPreviewMiddle,
-                    KAknsIIDQsnFrInputPreviewSideR );
-    
-    CleanupStack::PopAndDestroy( mask2 );
-    CleanupStack::PopAndDestroy( bmp2 );
-    CleanupStack::PopAndDestroy( mask1 );
-    CleanupStack::PopAndDestroy( bmp1 );
-    }
-
-// ---------------------------------------------------------------------------
-// Calculate indicator rect
-// ---------------------------------------------------------------------------
-//
-void CPeninputSplitQwertyWindow::CalIndicatorRect(const TRect& aBoundRect,
-                                          TRect& aRealRect1,
-                                          TRect& aRealRect2,
-                                          TIndicatorAlign aAlign) 
-    {
-    TInt imgAspectText = iSplitIndicatorTextSize.iWidth / iSplitIndicatorTextSize.iHeight;
-    TInt imgAspectIndi = iSplitIndicatorSize.iWidth / iSplitIndicatorSize.iHeight;
-    TSize imgSizeText( aBoundRect.Size().iHeight * imgAspectText, 
-                       aBoundRect.Size().iHeight );
-    TSize imgSizeIndi( aBoundRect.Size().iHeight * imgAspectIndi, 
-                               aBoundRect.Size().iHeight );
-    // check if the length of img > bound rect width
-    TInt nTotalWidth = imgSizeText.iWidth + imgSizeIndi.iWidth;
-    if( nTotalWidth > aBoundRect.Size().iWidth )
-        {
-        TReal nAspect = (TReal)imgSizeText.iWidth / nTotalWidth;
-        imgSizeText.iWidth = aBoundRect.Size().iWidth * nAspect;
-        imgSizeIndi.iWidth = aBoundRect.Size().iWidth - imgSizeText.iWidth;
-        imgSizeText.iHeight = imgSizeText.iWidth / imgAspectText;
-        // make sure the height of two rect is equal
-        imgSizeIndi.iHeight = imgSizeText.iHeight;
-        }
-    if( aAlign == EIndiAlignRight )
-        {
-        aRealRect2 = TRect(TPoint( aBoundRect.iBr.iX - imgSizeText.iWidth, aBoundRect.iTl.iY),
-                       imgSizeText);
-        aRealRect1 = TRect(TPoint(aRealRect2.iTl.iX - imgSizeIndi.iWidth, aRealRect2.iTl.iY),
-                       imgSizeIndi);
-        }
-    else if( aAlign == EIndiAlignCenter )
-        {
-        TInt offsetX = ( aBoundRect.Size().iWidth - imgSizeText.iWidth - imgSizeIndi.iWidth ) / 2;
-        TInt offsetY = ( aBoundRect.Size().iHeight - imgSizeText.iHeight ) / 2;
-        aRealRect2 = TRect( TPoint( aBoundRect.iBr.iX - imgSizeText.iWidth - offsetX, 
-                                   aBoundRect.iTl.iY + offsetY),
-                            imgSizeText );
-        aRealRect1 = TRect( TPoint(aRealRect2.iTl.iX - imgSizeIndi.iWidth, aRealRect2.iTl.iY),
-                       imgSizeIndi );
-        }
-    else if( aAlign == EIndiAlignLeft )
-        {
-        aRealRect1 = TRect( aBoundRect.iTl, imgSizeIndi );
-        aRealRect2 = TRect( TPoint( aRealRect1.iBr.iX, aRealRect1.iTl.iY ), imgSizeText );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Set split indicator bubble size with text
-// ---------------------------------------------------------------------------
-//
-void CPeninputSplitQwertyWindow::SetSplitIndiBubbleSizeWithText()
-    {
-    if ( iSplitIndiBubble )
-        {
-        TAknTextLineLayout textLine = iLafMgr->SplitIndiText();
-        TRect bubbleRect = iLafMgr->SplitIndiRectWithText();
-        TRect iconRect = iLafMgr->SplitIndiIconRectWithText();
-        TSize offset;
-        offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY;
-        offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX;
-        TSize size( iconRect.Width(), iconRect.Height());
-        
-        iSplitIndiBubble->SetRect( bubbleRect );
-        iSplitIndiBubble->SetIconOffsetAndSize( offset, size );
-        iSplitIndiBubble->SetTextFormat( textLine );
-        iSplitIndiBubble->SetTextColorIndex( EAknsCIQsnTextColorsCG67 );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Set split indicator bubble size without text
-// ---------------------------------------------------------------------------
-//
-void CPeninputSplitQwertyWindow::SetSplitIndiBubbleSizeWithoutText()
-    {
-    if ( iSplitIndiBubble )
-        {
-        TRect bubbleRect = iLafMgr->SplitIndiRectWithoutText();
-        TRect iconRect = iLafMgr->SplitIndiIconRectWithoutText();
-        TSize offset;
-        offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY;
-        offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX;
-        TSize size( iconRect.Width(), iconRect.Height());
-        
-        iSplitIndiBubble->SetRect( bubbleRect );
-        iSplitIndiBubble->SetIconOffsetAndSize( offset, size );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Update split indicator bubble
-// ---------------------------------------------------------------------------
-//
-void CPeninputSplitQwertyWindow::UpdateSplitIndiBubbleL( TUint8* aData )
-    {
-    RDesReadStream readStream;
-    TFepIndicatorInfo indicatorData;
-
-    TPtr8 countPtr( aData, 4*sizeof(TInt), 4*sizeof(TInt) );            
-    readStream.Open(countPtr);
-    CleanupClosePushL(readStream);
-
-    indicatorData.iIndicatorImgID = readStream.ReadInt32L();
-    indicatorData.iIndicatorMaskID = readStream.ReadInt32L();
-    indicatorData.iIndicatorTextImgID = readStream.ReadInt32L();
-    indicatorData.iIndicatorTextMaskID = readStream.ReadInt32L();
-
-    CleanupStack::PopAndDestroy(&readStream);
-    
-    if ( indicatorData.iIndicatorImgID != 0 && 
-        indicatorData.iIndicatorMaskID != 0 && 
-        indicatorData.iIndicatorTextImgID != 0 &&
-        indicatorData.iIndicatorTextMaskID != 0 )
-        { 
-        SetSplitIndicatorData( indicatorData );
-        
-
-        SetSplitIndiBubbleImageL( indicatorData.iIndicatorImgID,
-                    indicatorData.iIndicatorMaskID,
-                    indicatorData.iIndicatorTextImgID,
-                    indicatorData.iIndicatorTextMaskID );
-                 
-        iSplitIndiBubble->Hide(EFalse);
-        }
-    }
-
 // End Of File
--- a/textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -952,10 +952,10 @@
     TRect compositionRect;
     TRect innerRect;
     
-	// Get composition area rect from laf
+    // Get composition area rect from laf
 	TRect compositionAreaFromLaf = iLafMgr->compositionLayoutData();
 	TInt GapValue = compositionAreaFromLaf.iTl.iX;
-	
+    
     if (range == ERangeNative)
         {
         if ( layoutType == EAknFepVkbImCnZhuyin )
@@ -1011,14 +1011,14 @@
             compositionRect.SetSize(TSize(btnWidth * 3 + iCellAidGap - GapValue, 
             		candidateHeight));
             }
-		else
-			{	
-			compositionRect.iTl = Rect().iTl;
-			// move the composition area rect with gap
+	    else
+	        {
+	        compositionRect.iTl = Rect().iTl;
+	        // move the composition area rect with gap
 			compositionRect.iTl.iX += GapValue;
 			compositionRect.SetSize( 
 					TSize( btnWidth * 3 + iCellAidGap - GapValue * 2, candidateHeight ));
-			}
+	        }
         iCompositionField->SetReady(ETrue);
         iCompositionField->Hide(EFalse);
         iCompositionField->SizeChanged(compositionRect);    
@@ -1057,7 +1057,7 @@
             }
         else
             {
-            // move the gap
+             // move the gap
 			compositionRect.iTl.iX -= GapValue;
             iVkbBoardLeftTop = TPoint(compositionRect.iTl.iX, compositionRect.iBr.iY);
             }
@@ -1080,21 +1080,18 @@
     vkbCtrl->SetTextFormat( iLafMgr->KeyTextLayout() );  //Read laf 
     
     TInt tempHeightForFSQ = btnHeight;
-    // Modify begin
     //if (UiLayout()->PenInputType() == EPluginInputModeFSQ )
     //	{
     //    tempHeightForFSQ = btnHeight + 3;	
     //	}
     
     TPoint rangeBarRefPoint = TPoint(vkbRect.iTl.iX, vkbRect.iBr.iY);
-    // Modify begin
     //rangeBarRefPoint.iY += yAxisOffset;
     
     if (range != ERangeNative)
         {
         TRect shiftRect;
         shiftRect.iTl = TPoint(Rect().iTl.iX, vkbRect.iBr.iY);
-        // Modify begin
         //shiftRect.iTl.iY += yAxisOffset; 
         shiftRect.SetSize(TSize(btnWidth, tempHeightForFSQ)); 
         AknPenImageUtils::CalculateGraphicRect( shiftRect, innerRect );       
--- a/textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h	Wed Oct 13 14:55:58 2010 +0300
@@ -171,8 +171,8 @@
 	* LAF data for tooltip box
 	*/
 	TPeninputCnTooltipBoxLayoutData iTooltipBox;
-	
-	/*
+    
+    /*
 	* LAF data for composition area
 	*/
 	TRect iCompositionRect;
@@ -201,8 +201,8 @@
 	const TPeninputCnKeyLayoutData& KeypadLayoutData() const ;
 	const TPeninputCnRangeBarLayoutData& RangbarLayoutData() const;
 	const CPeninputCnQwtLayoutDataInfo& QwtLayoutData() const;
-	
-	/*
+    
+    /*
 	* Get layout rect for composition area
 	*
 	* @param none 
@@ -445,15 +445,15 @@
 	* @return The layout data for tooltip box	
 	*/	
 	const TPeninputCnTooltipBoxLayoutData& TooltipBoxLayoutData() const;
-	
-	/*
+    
+    /*
 	* Get layout rect for composition area
 	*
 	* @param none 
 	* @return rect of composition area
 	*/
 	const TRect& compositionLayoutData() const;
-	
+    
 protected:
 
 	/**
--- a/textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -233,7 +233,7 @@
 	ASSERT(iLafData);
 	return iLafData->KeypadLayoutData().iKaypadRect;
 	}
-	
+
 // ---------------------------------------------------------------------------
 // CPeninputCnGenericVkbLafMgr::compositionLayoutData
 // (other items were commented in a header)
@@ -243,8 +243,8 @@
 	{
 	ASSERT(iLafData);
 	return iLafData->compositionLayoutData();
-	}
-
+	}    
+    
 // ---------------------------------------------------------------------------
 // CPeninputCnGenericVkbLafMgr::ICFRect
 // (other items were commented in a header)
@@ -698,7 +698,7 @@
 	ASSERT( IsValid());
 	return iLayoutDataInfo[iLayoutType]->iCompositionRect;
 	}
-
+    
 // ---------------------------------------------------------------------------
 // CPeninputLafDataCommon::RangbarLayoutData(TInt aRangbarID)
 // (other items were commented in a header)
@@ -876,13 +876,13 @@
 		aDataInfo.iRightButton.iRect = cellBtnRect.Rect();
 		aDataInfo.iRightButton.iInnerRect = cellBtnRect.Rect();		
 		}
-	
-	// Read composition area laf data
+        
+    // Read composition area laf data
     TAknWindowLineLayout compositionWindowLineLayout = 
     		AknLayoutScalable_Avkon::vkb2_top_candi_pane(0).LayoutLine();
     TAknLayoutRect compositionLayoutRect;
     compositionLayoutRect.LayoutRect( toppaneRect.Rect(), compositionWindowLineLayout );
-    aDataInfo.iCompositionRect = compositionLayoutRect.Rect();
+    aDataInfo.iCompositionRect = compositionLayoutRect.Rect();    
 	
 	// bottom pane
 	const TInt VKBParamBottom2Range[] = { 6, 8, 8 };
--- a/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -490,13 +490,6 @@
     else
         {
         iVkbCtrl->SetIrregularKeyBoard(EFalse);
-
-
-        //Add Skin id to Vkb Control for 9 piece picture.
-        iVkbCtrl->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal );
-        iVkbCtrl->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed );
-        iVkbCtrl->SetKeySkinId( EKeyBmpDim, KAknsIIDQsnFrKeypadButtonFrInactive );
-
         iVkbLayout->SetNonIrregularResourceId(R_AKN_FEP_VKB_NONIRREGULAR_BITMAP);
         iVkbLayout->ConstructFromNonIrregularResourceL();        
         }
@@ -628,7 +621,8 @@
         x = 0;
         y = 0;
         }
-
+        
+        
     for ( TInt i = 0; i < count; i++ )
         {
         controlID = controlList[i]->ControlID();
@@ -693,9 +687,7 @@
                 TRAP_IGNORE(SetRangeBarSizeL(x, y));
                 }
             }
-        }
-    
-    RootControl()->Draw(); 
+        }    
     }
 
 void CPeninputVkbKrWindow::DoCaseChange( TInt aNewCase )
@@ -1203,6 +1195,7 @@
         {
         iTableUpButton->Hide(EFalse);
         iTableUpButton->SizeChanged( exRect, inRect, ETrue );
+        iTableUpButton->Draw();        
         }
 
     iLafMgr->GetButtonRect(
@@ -1265,6 +1258,7 @@
         {
         iTablePageLabel->Hide(EFalse);
         iTablePageLabel->SizeChanged( exRect, inRect, ETrue );
+        iTablePageLabel->Draw();
         }
 
     iLafMgr->GetButtonRect(
@@ -1281,6 +1275,7 @@
         {
         iTableDownButton->Hide(EFalse);
         iTableDownButton->SizeChanged( exRect, inRect, ETrue );
+        iTableDownButton->Draw();
         }
     
     TRect updateArea;
@@ -1476,7 +1471,7 @@
         buf.Format(_L("%d/%d"),SymbolTableUtil::FindIndex(vkbLayoutToUpdate)+1,KMaxSymbolTable);
         //iTablePageLabel->SetCaptionL(buf);
         iTablePageLabel->SetTextL(buf);
-        RootControl()->Draw();
+        iTablePageLabel->Draw();
         }
     }
 
--- a/textinput/ptienginev2/src/PtiEngineImpl.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/ptienginev2/src/PtiEngineImpl.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -747,19 +747,6 @@
 			delete oldTextBuf;
 			}
 		}
-     else
-         {
-         // call CPtiKoreanQwertyCore::LoadKeyboards() by OpenLanguageL() again,
-         // make sure that in hardware Qwerty, product keymappings can be used correctly.
-         if ( aNewMode == EPtiEngineQwertyKorean )
-            {    
-              CPtiCore* core = static_cast<CPtiCore*>(iCurrentLanguage->GetCore( aNewMode ));
-              if ( core )
-                  {
-                  TRAP_IGNORE( core->OpenLanguageL( iCurrentLanguage ) );
-                  }
-            }
-          }
 	}
 
 // ---------------------------------------------------------------------------
@@ -781,7 +768,6 @@
 
 	return KErrNoSuitableCore;
 	}
-
 // ---------------------------------------------------------------------------
 // Group Unicode is that kind of mapping which one visible character with more 
 // than one unicode submitted.
@@ -803,7 +789,7 @@
         {
         aResult.Append(aKey);
         }    
-    }
+	}
 
 		
 // ---------------------------------------------------------------------------
@@ -895,7 +881,7 @@
 			IsGroupUnicodeExist(aKey, mappings, 0);
 			if(mappings.Length() == 1)
 			    {
-				Core()->AppendKeyPress(aKey);
+			Core()->AppendKeyPress(aKey);
 			    }
 			else
 			    {
@@ -1169,7 +1155,7 @@
 TPtrC CPtiEngineImpl::RedirectKeyForChineseQwerty(TPtiKey aKey, TBool& aRedirected)
 	{
 	aRedirected = EFalse;
-    TPtiKeyboardType kbdType = KeyboardType();
+    TPtiKeyboardType kbdType = KeyboardType();	
 	TBuf<KMaxName> data;
 	TInt key;
     
@@ -2473,25 +2459,13 @@
 //
 void CPtiEngineImpl::LoadCoresInDefaultDirL(TBool aUseDefaultUserDictionary)
 	{
-    TUid KPtiSogouCoreUid = { 0x20031DD7 };
-    TInt i = 0;
-    TInt postponed = -1;
-    CArrayFix<TInt>* array = CPtiCore::ListCoresLC();
-    User::LeaveIfNull(array);
-    for (i = 0; i < array->Count(); i++)
-        {
-        if (TUid::Uid(array->At(i)) == KPtiSogouCoreUid )
-            {
-            postponed = i;
-            continue;
-            }
-        AddCoreL(TUid::Uid(array->At(i)), aUseDefaultUserDictionary);
-        }
-    
-    if (postponed >= 0)
-        {
-        AddCoreL(TUid::Uid(array->At(postponed)), aUseDefaultUserDictionary);
-        }
+	TInt i;
+	CArrayFix<TInt>* array = CPtiCore::ListCoresLC();
+	User::LeaveIfNull(array);
+	for (i = 0; i < array->Count(); i++)
+		{
+		AddCoreL(TUid::Uid(array->At(i)), aUseDefaultUserDictionary);
+		}
 
 	CleanupStack::PopAndDestroy(); // array
 	}
--- a/textinput/ptienginev2/src/PtiKeyMappings.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/textinput/ptienginev2/src/PtiKeyMappings.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -19,7 +19,6 @@
 #include "PtiKeyMappings.h"
 #include <PtiKeyMapData.h>
 
-
 // CONSTANTS
 #ifdef _DEBUG
 _LIT(KPtiNoKeyMapDataPanic, "PtiEngine: No ITU-T keymap data set.");