git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47763
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
\membersection{wxFromString}\label{wxfromstring}
\func{bool}{wxFromString}{\param{const wxString\& }{str},
\membersection{wxFromString}\label{wxfromstring}
\func{bool}{wxFromString}{\param{const wxString\& }{str},
- \param{wxColourBase* }{col}}
+ \param{wxColour* }{col}}
+
+\func{bool}{wxFromString}{\param{const wxString\& }{str},
+ \param{wxFont* }{col}}
Converts string to the type of the second argument. Returns \true on success.
See also: \helpref{wxToString}{wxtostring}.
Converts string to the type of the second argument. Returns \true on success.
See also: \helpref{wxToString}{wxtostring}.
\membersection{wxToString}\label{wxtostring}
\membersection{wxToString}\label{wxtostring}
-\func{wxString}{wxToString}{\param{const wxColourBase\& }{col}}
+\func{wxString}{wxToString}{\param{const wxColour\& }{col}}
+
+\func{wxString}{wxToString}{\param{const wxFont\& }{col}}
Converts its argument to string.
See also: \helpref{wxFromString}{wxfromstring}.
Converts its argument to string.
See also: \helpref{wxFromString}{wxfromstring}.
static wxFontEncoding ms_encodingDefault;
};
static wxFontEncoding ms_encodingDefault;
};
+// wxFontBase <-> wxString utilities, used by wxConfig
+WXDLLIMPEXP_CORE wxString wxToString(const wxFontBase& font);
+WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font);
+
+
+
// include the real class declaration
#if defined(__WXPALMOS__)
#include "wx/palmos/font.h"
// include the real class declaration
#if defined(__WXPALMOS__)
#include "wx/palmos/font.h"
}
#endif // generic or wxMSW or wxOS2
}
#endif // generic or wxMSW or wxOS2
+
+
+// wxFont <-> wxString utilities, used by wxConfig
+wxString wxToString(const wxFontBase& font)
+{
+ return font.IsOk() ? font.GetNativeFontInfoDesc()
+ : wxString();
+}
+
+bool wxFromString(const wxString& str, wxFontBase *font)
+{
+ wxCHECK_MSG( font, false, _T("NULL output parameter") );
+
+ if ( str.empty() )
+ {
+ *font = wxNullFont;
+ return true;
+ }
+
+ return font->SetNativeFontInfo(str);
+}
+
+