textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp
branchRCL_3
changeset 5 a47de9135b21
parent 0 eb1f2e154e89
child 19 ac7e4d1d9209
--- a/textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp	Fri Feb 19 23:09:27 2010 +0200
+++ b/textinput/peninputsplititut/src/peninputsplititutwesternuimgr.cpp	Fri Mar 12 15:44:07 2010 +0200
@@ -20,6 +20,7 @@
 #include "peninputsplititutdata.h"
 #include "peninputsplititutdatamgr.h"
 #include "peninputsplititutwesternuistatenonpredict.h"
+#include "peninputsplititutwesternuistatespelling.h"
 #include "peninputsplititutlayoutcontext.h"
 #include "peninputsplititutlayout.h"
 #include "peninputsplititutwindowmanager.h"
@@ -54,6 +55,7 @@
         }
         
     delete iNormalState;
+    delete iSpellState;
     }
 
 // ---------------------------------------------------------------------------
@@ -77,6 +79,7 @@
     CSplitItutUiMgrBase::ConstructL();
 
     iNormalState = CWesternSplitItutUiStateNonPredict::NewL(this);
+    iSpellState = CWesternSplitItutUiStateSpelling::NewL(this);
     }
 
 // ---------------------------------------------------------------------------
@@ -115,6 +118,11 @@
             newstate = iNormalState;
             }
             break;
+        case CSplitItutUiMgrBase::EStateSpelling:
+            {
+            newstate = iSpellState;
+            }
+            break;
         default:
             return;    
         }
@@ -169,7 +177,8 @@
 //
 TInt CWesternSplitItutUiMgr::HandleCommandL(TInt aCmd, TUint8* aData)
     {
-    if ( aCmd == ECmdPenInputFingerMatchSelection )
+    if ( aCmd == ECmdPenInputFingerMatchSelection ||
+         aCmd == ECmdPenInputFingerSpelling )
         {
         if (!(*(reinterpret_cast<TBool*>(aData))))
             {
@@ -190,7 +199,13 @@
                 return KErrNone;
                 }
             }
-            break;          
+        case ECmdPenInputFingerSpelling:
+            {
+            SetCurrentStateL(CSplitItutUiMgrBase::EStateSpelling);
+            return KErrNone;
+            }    
+            // Modify warning
+            //break;          
         default:
             break;
         }