added wxTextCtrl::AppendText, used by TextCtrl operator <<
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a6e2157322
commit
13c21be5eb
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user