]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stubs/textctrl.cpp
Correct wrong memset ordering that produced an assert in the printing sample
[wxWidgets.git] / src / stubs / textctrl.cpp
index fb522df053e0a2194d09960b39f1ab56b0692330..a9ede8a5a4ba9488ededcb4b569592d8a8d95b29 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "wx/textctrl.h"
 #include "wx/settings.h"
+#include "wx/filefn.h"
+#include "wx/utils.h"
 
 #if defined(__BORLANDC__) && !defined(__WIN32__)
 #include <alloc.h>
@@ -32,9 +34,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
 
 BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
-       EVT_CHAR(wxTextCtrl::OnChar)
        EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
-       EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
 END_EVENT_TABLE()
 #endif
 
@@ -132,7 +132,6 @@ long wxTextCtrl::GetLastPosition() const
 void wxTextCtrl::Replace(long from, long to, const wxString& value)
 {
     // TODO
-    return 0;
 }
 
 void wxTextCtrl::Remove(long from, long to)
@@ -212,6 +211,11 @@ void wxTextCtrl::WriteText(const wxString& text)
     // TODO write text to control
 }
 
+void wxTextCtrl::AppendText(const wxString& text)
+{
+    // TODO append text to control
+}
+
 void wxTextCtrl::Clear()
 {
     // TODO
@@ -337,7 +341,7 @@ int wxTextCtrl::overflow(int c)
   txt[plen] = (char)c;     // append c
   txt[plen+xtra] = '\0';   // append '\0' or overwrite c
     // If the put area already contained \0, output will be truncated there
-  WriteText(txt);
+  AppendText(txt);
     delete[] txt;
   }
 
@@ -391,7 +395,7 @@ int wxTextCtrl::underflow()
 
 wxTextCtrl& wxTextCtrl::operator<<(const wxString& s)
 {
-    WriteText(s);
+    AppendText(s);
     return *this;
 }
 
@@ -399,7 +403,7 @@ wxTextCtrl& wxTextCtrl::operator<<(float f)
 {
     wxString str;
     str.Printf("%.2f", f);
-    WriteText(str);
+    AppendText(str);
     return *this;
 }
 
@@ -407,7 +411,7 @@ wxTextCtrl& wxTextCtrl::operator<<(double d)
 {
     wxString str;
     str.Printf("%.2f", d);
-    WriteText(str);
+    AppendText(str);
     return *this;
 }
 
@@ -415,7 +419,7 @@ wxTextCtrl& wxTextCtrl::operator<<(int i)
 {
     wxString str;
     str.Printf("%d", i);
-    WriteText(str);
+    AppendText(str);
     return *this;
 }
 
@@ -423,7 +427,7 @@ wxTextCtrl& wxTextCtrl::operator<<(long i)
 {
     wxString str;
     str.Printf("%ld", i);
-    WriteText(str);
+    AppendText(str);
     return *this;
 }
 
@@ -433,7 +437,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c)
 
     buf[0] = c;
     buf[1] = 0;
-    WriteText(buf);
+    AppendText(buf);
     return *this;
 }