wxWindows 2 Change Log
----------------------
+2.4.0
+-----
+
+wxBase:
+
+- wxMimeTypesManager now can create file associations too
+
2.3.0
-----
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxFontRefData;
-class WXDLLEXPORT wxNativeFontInfo;
+struct WXDLLEXPORT wxNativeFontInfo;
class WXDLLEXPORT wxFontBase : public wxGDIObject
{
{
Init();
- (void)Create(info.pointSize, info.family, info.style, info.weight,
- info.underlined, info.faceName, info.encoding);
+ Create(info);
}
+ wxFont(const wxString& fontDesc);
+
bool Create(int size,
int family,
int style,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ bool Create(const wxNativeFontInfo& info);
+
virtual ~wxFont();
// assignment
#ifndef WX_PRECOMP
#include "wx/font.h"
- #include "wx/fontutil.h"
#endif // WX_PRECOMP
+#include "wx/fontutil.h" // for wxNativeFontInfo
+
#include "wx/tokenzr.h"
// ============================================================================
#include "wx/app.h"
#include "wx/log.h"
#include "wx/intl.h"
- #include "wx/fontutil.h"
#endif // PCH
+#include "wx/fontutil.h"
#include "wx/fontmap.h"
#if wxUSE_CONFIG
wxPalette wxNullPalette;
wxFont wxNullFont;
wxColour wxNullColour;
-wxNativeFontInfo wxNullNativeFontInfo;
// Default window names
const wxChar *wxControlNameStr = wxT("control");
#endif
#ifndef WX_PRECOMP
- #include <stdio.h>
#include "wx/setup.h"
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/log.h"
#endif // WX_PRECOMP
+#include "wx/fontutil.h"
+
#include "wx/msw/private.h"
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
wxTheFontList->Append(this);
}
+bool wxFont::Create(const wxNativeFontInfo& info)
+{
+ return Create(info.pointSize, info.family, info.style, info.weight,
+ info.underlined, info.faceName, info.encoding);
+}
+
+wxFont::wxFont(const wxString& fontdesc)
+{
+ wxNativeFontInfo info;
+ if ( info.FromString(fontdesc) )
+ (void)Create(info);
+}
+
/* Constructor for a font. Note that the real construction is done
* in wxDC::SetFont, when information is available about scaling etc.
*/
#include "wx/font.h"
#endif
+#include "wx/fontutil.h"
#include "wx/fontenum.h"
#include "wx/fontmap.h"