From 13c21be5eb535c82e53bc64f3a65da1477bbf47a Mon Sep 17 00:00:00 2001 From: Harco de Hilster Date: Tue, 2 Feb 1999 19:01:43 +0000 Subject: [PATCH] added wxTextCtrl::AppendText, used by TextCtrl operator << git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/textctrl.h | 1 + include/wx/qt/textctrl.h | 1 + include/wx/stubs/textctrl.h | 1 + src/mac/carbon/textctrl.cpp | 19 ++++++++++++------- src/mac/textctrl.cpp | 19 ++++++++++++------- src/qt/textctrl.cpp | 19 ++++++++++++------- src/stubs/textctrl.cpp | 19 ++++++++++++------- 7 files changed, 51 insertions(+), 28 deletions(-) diff --git a/include/wx/mac/textctrl.h b/include/wx/mac/textctrl.h index 253491eaa0..675e21bb3f 100644 --- a/include/wx/mac/textctrl.h +++ b/include/wx/mac/textctrl.h @@ -111,6 +111,7 @@ public: virtual bool LoadFile(const wxString& file); virtual bool SaveFile(const wxString& file); virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); virtual void DiscardEdits(); virtual bool IsModified() const; diff --git a/include/wx/qt/textctrl.h b/include/wx/qt/textctrl.h index 26fe6548a3..6b323a9fbe 100644 --- a/include/wx/qt/textctrl.h +++ b/include/wx/qt/textctrl.h @@ -111,6 +111,7 @@ public: virtual bool LoadFile(const wxString& file); virtual bool SaveFile(const wxString& file); virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); virtual void DiscardEdits(); virtual bool IsModified() const; diff --git a/include/wx/stubs/textctrl.h b/include/wx/stubs/textctrl.h index 253491eaa0..675e21bb3f 100644 --- a/include/wx/stubs/textctrl.h +++ b/include/wx/stubs/textctrl.h @@ -111,6 +111,7 @@ public: virtual bool LoadFile(const wxString& file); virtual bool SaveFile(const wxString& file); virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); virtual void DiscardEdits(); virtual bool IsModified() const; diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 4171b868b6..a2b5e7d38e 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -220,6 +220,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 @@ -345,7 +350,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; } @@ -399,7 +404,7 @@ int wxTextCtrl::underflow() wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) { - WriteText(s); + AppendText(s); return *this; } @@ -407,7 +412,7 @@ wxTextCtrl& wxTextCtrl::operator<<(float f) { wxString str; str.Printf("%.2f", f); - WriteText(str); + AppendText(str); return *this; } @@ -415,7 +420,7 @@ wxTextCtrl& wxTextCtrl::operator<<(double d) { wxString str; str.Printf("%.2f", d); - WriteText(str); + AppendText(str); return *this; } @@ -423,7 +428,7 @@ wxTextCtrl& wxTextCtrl::operator<<(int i) { wxString str; str.Printf("%d", i); - WriteText(str); + AppendText(str); return *this; } @@ -431,7 +436,7 @@ wxTextCtrl& wxTextCtrl::operator<<(long i) { wxString str; str.Printf("%ld", i); - WriteText(str); + AppendText(str); return *this; } @@ -441,7 +446,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c) buf[0] = c; buf[1] = 0; - WriteText(buf); + AppendText(buf); return *this; } diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index 4171b868b6..a2b5e7d38e 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -220,6 +220,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 @@ -345,7 +350,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; } @@ -399,7 +404,7 @@ int wxTextCtrl::underflow() wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) { - WriteText(s); + AppendText(s); return *this; } @@ -407,7 +412,7 @@ wxTextCtrl& wxTextCtrl::operator<<(float f) { wxString str; str.Printf("%.2f", f); - WriteText(str); + AppendText(str); return *this; } @@ -415,7 +420,7 @@ wxTextCtrl& wxTextCtrl::operator<<(double d) { wxString str; str.Printf("%.2f", d); - WriteText(str); + AppendText(str); return *this; } @@ -423,7 +428,7 @@ wxTextCtrl& wxTextCtrl::operator<<(int i) { wxString str; str.Printf("%d", i); - WriteText(str); + AppendText(str); return *this; } @@ -431,7 +436,7 @@ wxTextCtrl& wxTextCtrl::operator<<(long i) { wxString str; str.Printf("%ld", i); - WriteText(str); + AppendText(str); return *this; } @@ -441,7 +446,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c) buf[0] = c; buf[1] = 0; - WriteText(buf); + AppendText(buf); return *this; } diff --git a/src/qt/textctrl.cpp b/src/qt/textctrl.cpp index fb522df053..ce3459256d 100644 --- a/src/qt/textctrl.cpp +++ b/src/qt/textctrl.cpp @@ -212,6 +212,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 +342,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 +396,7 @@ int wxTextCtrl::underflow() wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) { - WriteText(s); + AppendText(s); return *this; } @@ -399,7 +404,7 @@ wxTextCtrl& wxTextCtrl::operator<<(float f) { wxString str; str.Printf("%.2f", f); - WriteText(str); + AppendText(str); return *this; } @@ -407,7 +412,7 @@ wxTextCtrl& wxTextCtrl::operator<<(double d) { wxString str; str.Printf("%.2f", d); - WriteText(str); + AppendText(str); return *this; } @@ -415,7 +420,7 @@ wxTextCtrl& wxTextCtrl::operator<<(int i) { wxString str; str.Printf("%d", i); - WriteText(str); + AppendText(str); return *this; } @@ -423,7 +428,7 @@ wxTextCtrl& wxTextCtrl::operator<<(long i) { wxString str; str.Printf("%ld", i); - WriteText(str); + AppendText(str); return *this; } @@ -433,7 +438,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c) buf[0] = c; buf[1] = 0; - WriteText(buf); + AppendText(buf); return *this; } diff --git a/src/stubs/textctrl.cpp b/src/stubs/textctrl.cpp index 6083ace113..a9ede8a5a4 100644 --- a/src/stubs/textctrl.cpp +++ b/src/stubs/textctrl.cpp @@ -211,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 @@ -336,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; } @@ -390,7 +395,7 @@ int wxTextCtrl::underflow() wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) { - WriteText(s); + AppendText(s); return *this; } @@ -398,7 +403,7 @@ wxTextCtrl& wxTextCtrl::operator<<(float f) { wxString str; str.Printf("%.2f", f); - WriteText(str); + AppendText(str); return *this; } @@ -406,7 +411,7 @@ wxTextCtrl& wxTextCtrl::operator<<(double d) { wxString str; str.Printf("%.2f", d); - WriteText(str); + AppendText(str); return *this; } @@ -414,7 +419,7 @@ wxTextCtrl& wxTextCtrl::operator<<(int i) { wxString str; str.Printf("%d", i); - WriteText(str); + AppendText(str); return *this; } @@ -422,7 +427,7 @@ wxTextCtrl& wxTextCtrl::operator<<(long i) { wxString str; str.Printf("%ld", i); - WriteText(str); + AppendText(str); return *this; } @@ -432,7 +437,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c) buf[0] = c; buf[1] = 0; - WriteText(buf); + AppendText(buf); return *this; } -- 2.45.2