1 /////////////////////////////////////////////////////////////////////////////
3 // Author: Vaclav Slavik
5 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_FWD_CORE wxDC
;
19 class WXDLLIMPEXP_FWD_CORE wxPaintDC
;
20 class WXDLLIMPEXP_FWD_CORE wxWindow
;
21 class WXDLLIMPEXP_FWD_CORE wxFont
;
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
35 wxFont(const wxNativeFontInfo
& info
)
40 #if FUTURE_WXWIN_COMPATIBILITY_3_0
45 bool underlined
= false,
46 const wxString
& face
= wxEmptyString
,
47 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
49 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
57 bool underlined
= false,
58 const wxString
& face
= wxEmptyString
,
59 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
61 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
68 bool underlined
= false,
69 const wxString
& face
= wxEmptyString
,
70 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
72 bool Create(const wxNativeFontInfo
& fontinfo
);
76 // implement base class pure virtuals
77 virtual int GetPointSize() const;
78 virtual wxFontFamily
GetFamily() const;
79 virtual wxFontStyle
GetStyle() const;
80 virtual wxFontWeight
GetWeight() const;
81 virtual wxString
GetFaceName() const;
82 virtual bool GetUnderlined() const;
83 virtual wxFontEncoding
GetEncoding() const;
84 virtual bool IsFixedWidth() const;
85 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
87 virtual void SetPointSize(int pointSize
);
88 virtual void SetFamily(wxFontFamily family
);
89 virtual void SetStyle(wxFontStyle style
);
90 virtual void SetWeight(wxFontWeight weight
);
91 virtual bool SetFaceName(const wxString
& faceName
);
92 virtual void SetUnderlined(bool underlined
);
93 virtual void SetEncoding(wxFontEncoding encoding
);
95 WXDECLARE_COMPAT_SETTERS
97 // Unofficial API, don't use
98 virtual void SetNoAntiAliasing(bool no
= true);
99 virtual bool GetNoAntiAliasing() const;
101 struct font_t
*GetMGLfont_t(float scale
, bool antialiased
);
105 virtual wxGDIRefData
*CreateGDIRefData() const;
106 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
109 DECLARE_DYNAMIC_CLASS(wxFont
)
112 #endif // __WX_FONT_H__