]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix after wxFont changes (closes #10152)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 Nov 2008 14:30:41 +0000 (14:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 Nov 2008 14:30:41 +0000 (14:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/private/fontmgr.h
src/common/fontmgrcmn.cpp

index 78ab862ae3291e052ad67e938525478748d17a71..c9f4395487ceffe5623a29723e03e642b7072b63 100644 (file)
@@ -205,9 +205,9 @@ class wxFontMgrFontRefData : public wxGDIRefData
 {
 public:
     wxFontMgrFontRefData(int size = wxDEFAULT,
-                  int family = wxDEFAULT,
-                  int style = wxDEFAULT,
-                  int weight = wxDEFAULT,
+                  wxFontFamily family = wxFONTFAMILY_DEFAULT,
+                  wxFontStyle style = wxFONTSTYLE_NORMAL,
+                  wxFontWeight weight = wxFONTWEIGHT_NORMAL,
                   bool underlined = false,
                   const wxString& faceName = wxEmptyString,
                   wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
@@ -223,16 +223,16 @@ public:
 
     int GetPointSize() const { return m_info.pointSize; }
     wxString GetFaceName() const { return m_info.faceName; }
-    int GetFamily() const { return m_info.family; }
-    int GetStyle() const { return m_info.style; }
-    int GetWeight() const { return m_info.weight; }
+    wxFontFamily GetFamily() const { return m_info.family; }
+    wxFontStyle GetStyle() const { return m_info.style; }
+    wxFontWeight GetWeight() const { return m_info.weight; }
     bool GetUnderlined() const { return m_info.underlined; }
     wxFontEncoding GetEncoding() const { return m_info.encoding; }
 
     void SetPointSize(int pointSize);
-    void SetFamily(int family);
-    void SetStyle(int style);
-    void SetWeight(int weight);
+    void SetFamily(wxFontFamily family);
+    void SetStyle(wxFontStyle style);
+    void SetWeight(wxFontWeight weight);
     void SetFaceName(const wxString& faceName);
     void SetUnderlined(bool underlined);
     void SetEncoding(wxFontEncoding encoding);
index 7d7ef9d35d24464cb8dfe70777f1be4afd0fc8ce..86c88d8be2fbf22d85436202692ded2a8f47e0e9 100644 (file)
@@ -225,19 +225,15 @@ void wxFontsManagerBase::AddBundle(wxFontBundle *bundle)
 // ----------------------------------------------------------------------------
 
 wxFontMgrFontRefData::wxFontMgrFontRefData(int size,
-                                           int family,
-                                           int style,
-                                           int weight,
+                                           wxFontFamily family,
+                                           wxFontStyle style,
+                                           wxFontWeight weight,
                                            bool underlined,
                                            const wxString& faceName,
                                            wxFontEncoding encoding)
 {
-    if ( family == wxDEFAULT )
-        family = wxSWISS;
-    if ( style == wxDEFAULT )
-        style = wxNORMAL;
-    if ( weight == wxDEFAULT )
-        weight = wxNORMAL;
+    if ( family == wxFONTFAMILY_DEFAULT )
+        family = wxFONTFAMILY_SWISS;
     if ( size == wxDEFAULT )
         size = 12;
 
@@ -294,21 +290,21 @@ void wxFontMgrFontRefData::SetPointSize(int pointSize)
     m_fontValid = false;
 }
 
-void wxFontMgrFontRefData::SetFamily(int family)
+void wxFontMgrFontRefData::SetFamily(wxFontFamily family)
 {
-    m_info.family = (wxFontFamily)family;
+    m_info.family = family;
     m_fontValid = false;
 }
 
-void wxFontMgrFontRefData::SetStyle(int style)
+void wxFontMgrFontRefData::SetStyle(wxFontStyle style)
 {
-    m_info.style = (wxFontStyle)style;
+    m_info.style = style;
     m_fontValid = false;
 }
 
-void wxFontMgrFontRefData::SetWeight(int weight)
+void wxFontMgrFontRefData::SetWeight(wxFontWeight weight)
 {
-    m_info.weight = (wxFontWeight)weight;
+    m_info.weight = weight;
     m_fontValid = false;
 }