webengine/wmlengine/src/fbox/src/FBOXCEpoc32InputBox.cpp
changeset 1 7c90e6132015
parent 0 dd21522fd290
child 42 a1a5d4e727e8
--- a/webengine/wmlengine/src/fbox/src/FBOXCEpoc32InputBox.cpp	Mon Mar 30 12:54:55 2009 +0300
+++ b/webengine/wmlengine/src/fbox/src/FBOXCEpoc32InputBox.cpp	Fri May 08 08:25:06 2009 +0300
@@ -58,7 +58,6 @@
 // CONSTANTS
 
 static const TInt KNumberOfLines = 1000;
-_LIT(KBlankDesC," ");
 
 // ================= STATIC FUNCTIONS =======================
 TInt CEpoc32InputBox::RefreshContents( TAny* aParam )
@@ -277,7 +276,7 @@
         }
     else
         {
-        CreateWindowL( iParent );
+        SetContainerWindowL( *iParent );
         }
 
     // Create formatted editor
@@ -620,6 +619,13 @@
             }
          }
       }
+    else
+        {
+         if ( iEditor )
+           {
+              iEditor->TextView()->FormatTextL();
+           }
+        }
     }
 
 // ---------------------------------------------------------
@@ -1316,7 +1322,7 @@
             {
             return TCoeInputCapabilities(iEditor->InputCapabilities().Capabilities(),
                     (MCoeFepAwareTextEditor*) this,
-                    (MCoeCaptionRetrieverForFep*) this);
+                    (MCoeCaptionRetrieverForFep*) this, TUid::Uid(KFepUid), (TCoeInputCapabilities::MCoeFepSpecificExtensions*)this );
             }
         else
             {
@@ -1628,7 +1634,7 @@
 // -----------------------------------------------------------------------------
 TInt CEpoc32InputBox::DocumentMaximumLengthForFep() const
 {
-    return KMaxTInt;
+    return iMaxLength;
 }
 
 // -----------------------------------------------------------------------------
@@ -1665,12 +1671,12 @@
 //
 // -----------------------------------------------------------------------------
 void CEpoc32InputBox::GetEditorContentForFep(TDes& aEditorContent,TInt aDocumentPosition,TInt aLengthToRetrieve) const
-{
-    aEditorContent = KBlankDesC;
-    if ( iInlineEditText && aDocumentPosition >= 0 && (aDocumentPosition + aLengthToRetrieve) <= iInlineEditText->Length() )
-        {
-        aEditorContent = iInlineEditText->Des().Mid(aDocumentPosition,aLengthToRetrieve);
-        }
+{    
+    aEditorContent = KNullDesC; 
+	if ( iInlineEditText && aDocumentPosition >= 0 && (aDocumentPosition + aLengthToRetrieve) <= iInlineEditText->Length() ) 
+	    {
+	    aEditorContent = iInlineEditText->Des().Mid(aDocumentPosition,aLengthToRetrieve);
+		}
 }
 
 // -----------------------------------------------------------------------------
@@ -1816,6 +1822,17 @@
     }
 }
 
+// -------------------------------------------------------------------------------
+// IsValidCharacter :: interface method of MCoeFepSpecificExtensions
+// 
+// -------------------------------------------------------------------------------
+TBool CEpoc32InputBox::IsValidCharacter(TInt aChar) 
+    {
+    // Single line input box, enter character need not be taken  
+    if ( aChar == KLineEnterChar )
+        return EFalse; 
+    return ETrue; 
+    }
 
 //  End of File