]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strvararg.cpp
simplify Refresh() and Update()
[wxWidgets.git] / src / common / strvararg.cpp
index b06f3e6cf26a65247e7e86e5b81199f391ba3331..a10cdc26dd39bca1e679895149994eb783930abe 100644 (file)
@@ -611,6 +611,21 @@ const wchar_t* wxFormatString::AsWChar()
 }
 #endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY
 
+wxString wxFormatString::InputAsString() const
+{
+    if ( m_str )
+        return *m_str;
+    if ( m_cstr )
+        return m_cstr->AsString();
+    if ( m_wchar )
+        return wxString(m_wchar);
+    if ( m_char )
+        return wxString(m_char);
+
+    wxFAIL_MSG( "invalid wxFormatString - not initialized?" );
+    return wxString();
+}
+
 // ----------------------------------------------------------------------------
 // wxFormatString::GetArgumentType()
 // ----------------------------------------------------------------------------