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
);
64 wxFont(const wxSize
& pixelSize
,
68 bool underlined
= false,
69 const wxString
& face
= wxEmptyString
,
70 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
72 Create(10, family
, style
, weight
, underlined
, face
, encoding
);
73 SetPixelSize(pixelSize
);
80 bool underlined
= false,
81 const wxString
& face
= wxEmptyString
,
82 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
84 bool Create(const wxNativeFontInfo
& fontinfo
);
88 // implement base class pure virtuals
89 virtual int GetPointSize() const;
90 virtual wxFontFamily
GetFamily() const;
91 virtual wxFontStyle
GetStyle() const;
92 virtual wxFontWeight
GetWeight() const;
93 virtual wxString
GetFaceName() const;
94 virtual bool GetUnderlined() const;
95 virtual wxFontEncoding
GetEncoding() const;
96 virtual bool IsFixedWidth() const;
97 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
99 virtual void SetPointSize(int pointSize
);
100 virtual void SetFamily(wxFontFamily family
);
101 virtual void SetStyle(wxFontStyle style
);
102 virtual void SetWeight(wxFontWeight weight
);
103 virtual bool SetFaceName(const wxString
& faceName
);
104 virtual void SetUnderlined(bool underlined
);
105 virtual void SetEncoding(wxFontEncoding encoding
);
107 wxDECLARE_COMMON_FONT_METHODS();
109 // Unofficial API, don't use
110 virtual void SetNoAntiAliasing(bool no
= true);
111 virtual bool GetNoAntiAliasing() const;
113 struct font_t
*GetMGLfont_t(float scale
, bool antialiased
);
117 virtual wxGDIRefData
*CreateGDIRefData() const;
118 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
121 DECLARE_DYNAMIC_CLASS(wxFont
)
124 #endif // __WX_FONT_H__