git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53398
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(int i);
wxTextCtrl& operator<<(long i);
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(int i);
wxTextCtrl& operator<<(long i);
- wxTextCtrl& operator<<(float f);
+ wxTextCtrl& operator<<(float f) { return *this << double(f); }
wxTextCtrl& operator<<(double d);
wxTextCtrl& operator<<(double d);
- wxTextCtrl& operator<<(const wxChar c);
+ wxTextCtrl& operator<<(char c) { return *this << wxString(c); }
+ wxTextCtrl& operator<<(wchar_t c) { return *this << wxString(c); }
// insert the character which would have resulted from this key event,
// return true if anything has been inserted
// insert the character which would have resulted from this key event,
// return true if anything has been inserted
- Operator definitions for appending to a text control, for example:
- */
- wxTextCtrl operator(const wxString& s);
- wxTextCtrl operator(int i);
- wxTextCtrl operator(long i);
- wxTextCtrl operator(float f);
- wxTextCtrl operator(double d);
- wxTextCtrl operator(char c);
+ Operator definitions for appending to a text control.
+ */
+ wxTextCtrl& operator<<(const wxString& s);
+ wxTextCtrl& operator<<(int i);
+ wxTextCtrl& operator<<(long i);
+ wxTextCtrl& operator<<(float f);
+ wxTextCtrl& operator<<(double d);
+ wxTextCtrl& operator<<(char c);
+ wxTextCtrl& operator<<(wchar_t c);
return *TEXTCTRL(this);
}
return *TEXTCTRL(this);
}
-wxTextCtrl& wxTextCtrlBase::operator<<(float f)
-{
- wxString str;
- str.Printf(wxT("%.2f"), f);
- AppendText(str);
- return *TEXTCTRL(this);
-}
-
wxTextCtrl& wxTextCtrlBase::operator<<(double d)
{
wxTextCtrl& wxTextCtrlBase::operator<<(double d)
{
- wxString str;
- str.Printf(wxT("%.2f"), d);
- AppendText(str);
- return *TEXTCTRL(this);
+ return *this << wxString::Format("%.2f", d);
}
wxTextCtrl& wxTextCtrlBase::operator<<(int i)
{
}
wxTextCtrl& wxTextCtrlBase::operator<<(int i)
{
- wxString str;
- str.Printf(wxT("%d"), i);
- AppendText(str);
- return *TEXTCTRL(this);
-}
-
-wxTextCtrl& wxTextCtrlBase::operator<<(long i)
-{
- wxString str;
- str.Printf(wxT("%ld"), i);
- AppendText(str);
- return *TEXTCTRL(this);
+ return *this << wxString::Format("%d", i);
-wxTextCtrl& wxTextCtrlBase::operator<<(const wxChar c)
+wxTextCtrl& wxTextCtrlBase::operator<<(long l)
- return operator<<(wxString(c));
+ return *this << wxString::Format("%ld", l);
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------