/////////////////////////////////////////////////////////////////////////////
-// Name: font.h
+// Name: wx/cocoa/font.h
// Purpose: wxFont class
// Author: Julian Smart
// Modified by:
(void)Create(size, family, style, weight, underlined, face, encoding);
}
+ wxFont(const wxSize& pixelSize,
+ wxFontFamily family,
+ wxFontStyle style,
+ wxFontWeight weight,
+ bool underlined = false,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
+ {
+ Create(10, family, style, weight, underlined, face, encoding);
+ SetPixelSize(pixelSize);
+ }
+
+ wxFont(int pointSize,
+ wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
+ {
+ Create(pointSize, family,
+ GetStyleFromFlags(flags),
+ GetWeightFromFlags(flags),
+ GetUnderlinedFromFlags(flags),
+ face, encoding);
+ }
+
/*! @abstract Construction with opaque wxNativeFontInfo
*/
wxFont(const wxNativeFontInfo& info)
// implement base class pure virtuals
virtual int GetPointSize() const;
- virtual wxFontFamily GetFamily() const;
virtual wxFontStyle GetStyle() const;
virtual wxFontWeight GetWeight() const;
virtual bool GetUnderlined() const;
virtual void SetUnderlined(bool underlined);
virtual void SetEncoding(wxFontEncoding encoding);
- WXDECLARE_COMPAT_SETTERS
+ wxDECLARE_COMMON_FONT_METHODS();
// implementation only from now on
// -------------------------------
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
+ virtual wxFontFamily DoGetFamily() const;
+
private:
DECLARE_DYNAMIC_CLASS(wxFont)
};