]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/txtstrm.cpp
Add support for wxSL_INVERSE flag. Also uses new inverse logic to make Mac vertical...
[wxWidgets.git] / src / common / txtstrm.cpp
index 5c53b1f162c76576f5ab1d769cd7ac8b11c0630c..93bc7ad912bffa5f6f9a810c06db73f89698dd23 100644 (file)
@@ -252,6 +252,17 @@ wxTextInputStream& wxTextInputStream::operator>>(char& c)
     return *this;
 }
 
     return *this;
 }
 
+#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE
+
+wxTextInputStream& wxTextInputStream::operator>>(wchar_t& wc)
+{
+    wc = GetChar();
+
+    return *this;
+}
+
+#endif // wxUSE_UNICODE
+
 wxTextInputStream& wxTextInputStream::operator>>(wxInt16& i)
 {
     i = (wxInt16)Read16();
 wxTextInputStream& wxTextInputStream::operator>>(wxInt16& i)
 {
     i = (wxInt16)Read16();
@@ -406,6 +417,16 @@ void wxTextOutputStream::WriteString(const wxString& string)
 #endif
 }
 
 #endif
 }
 
+wxTextOutputStream& wxTextOutputStream::PutChar(wxChar c)
+{
+#if wxUSE_UNICODE
+    WriteString( wxString(&c, m_conv, 1) );
+#else
+    WriteString( wxString(&c, wxConvLocal, 1) );
+#endif
+    return *this;
+}
+
 wxTextOutputStream& wxTextOutputStream::operator<<(const wxChar *string)
 {
     WriteString( wxString(string) );
 wxTextOutputStream& wxTextOutputStream::operator<<(const wxChar *string)
 {
     WriteString( wxString(string) );
@@ -486,7 +507,7 @@ wxTextOutputStream& wxTextOutputStream::operator<<(float f)
 
 wxTextOutputStream &endl( wxTextOutputStream &stream )
 {
 
 wxTextOutputStream &endl( wxTextOutputStream &stream )
 {
-    return stream << wxT('\n');
+    return stream.PutChar(wxT('\n'));
 }
 
 #endif
 }
 
 #endif