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 wxFontStyle
GetStyle() const;
91 virtual wxFontWeight
GetWeight() const;
92 virtual wxString
GetFaceName() const;
93 virtual bool GetUnderlined() const;
94 virtual wxFontEncoding
GetEncoding() const;
95 virtual bool IsFixedWidth() const;
96 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
98 virtual void SetPointSize(int pointSize
);
99 virtual void SetFamily(wxFontFamily family
);
100 virtual void SetStyle(wxFontStyle style
);
101 virtual void SetWeight(wxFontWeight weight
);
102 virtual bool SetFaceName(const wxString
& faceName
);
103 virtual void SetUnderlined(bool underlined
);
104 virtual void SetEncoding(wxFontEncoding encoding
);
106 wxDECLARE_COMMON_FONT_METHODS();
108 struct font_t
*GetMGLfont_t(float scale
, bool antialiased
);
112 virtual wxGDIRefData
*CreateGDIRefData() const;
113 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
115 virtual wxFontFamily
DoGetFamily() const;
118 DECLARE_DYNAMIC_CLASS(wxFont
)
121 #endif // __WX_FONT_H__