]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/font.cpp
Fix timeval struct initialization in wxSelectDispatcher.
[wxWidgets.git] / src / dfb / font.cpp
index 206c11b14d600f09f1b2edb14007f34fe62031d0..7f780bdba777552def05581fe870aa1ff6dc66ad 100644 (file)
@@ -48,9 +48,9 @@ bool wxFont::Create(const wxNativeFontInfo& info)
 }
 
 bool wxFont::Create(int pointSize,
-                    int family,
-                    int style,
-                    int weight,
+                    wxFontFamily family,
+                    wxFontStyle style,
+                    wxFontWeight weight,
                     bool underlined,
                     const wxString& face,
                     wxFontEncoding encoding)
@@ -98,23 +98,21 @@ wxString wxFont::GetFaceName() const
     return M_FONTDATA->GetFaceName();
 }
 
-int wxFont::GetFamily() const
+wxFontFamily wxFont::DoGetFamily() const
 {
-    wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
-
     return M_FONTDATA->GetFamily();
 }
 
-int wxFont::GetStyle() const
+wxFontStyle wxFont::GetStyle() const
 {
-    wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+    wxCHECK_MSG( Ok(), wxFONTSTYLE_MAX, wxT("invalid font") );
 
     return M_FONTDATA->GetStyle();
 }
 
-int wxFont::GetWeight() const
+wxFontWeight wxFont::GetWeight() const
 {
-    wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+    wxCHECK_MSG( Ok(), wxFONTWEIGHT_MAX, wxT("invalid font") );
 
     return M_FONTDATA->GetWeight();
 }
@@ -148,13 +146,6 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
     return M_FONTDATA->GetNativeFontInfo();
 }
 
-bool wxFont::GetNoAntiAliasing() const
-{
-    wxCHECK_MSG( Ok(), false, wxT("invalid font") );
-
-    return M_FONTDATA->GetNoAntiAliasing();
-}
-
 // ----------------------------------------------------------------------------
 // change font attributes
 // ----------------------------------------------------------------------------
@@ -165,19 +156,19 @@ void wxFont::SetPointSize(int pointSize)
     M_FONTDATA->SetPointSize(pointSize);
 }
 
-void wxFont::SetFamily(int family)
+void wxFont::SetFamily(wxFontFamily family)
 {
     AllocExclusive();
     M_FONTDATA->SetFamily(family);
 }
 
-void wxFont::SetStyle(int style)
+void wxFont::SetStyle(wxFontStyle style)
 {
     AllocExclusive();
     M_FONTDATA->SetStyle(style);
 }
 
-void wxFont::SetWeight(int weight)
+void wxFont::SetWeight(wxFontWeight weight)
 {
     AllocExclusive();
     M_FONTDATA->SetWeight(weight);
@@ -202,8 +193,3 @@ void wxFont::SetEncoding(wxFontEncoding encoding)
     M_FONTDATA->SetEncoding(encoding);
 }
 
-void wxFont::SetNoAntiAliasing(bool no)
-{
-    AllocExclusive();
-    M_FONTDATA->SetNoAntiAliasing(no);
-}