1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/font.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_FWD_CORE wxDC
;
20 class WXDLLIMPEXP_FWD_CORE wxPaintDC
;
21 class WXDLLIMPEXP_FWD_CORE wxWindow
;
23 class WXDLLIMPEXP_FWD_CORE wxFont
;
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
36 wxFont(const wxString
& fontname
)
41 wxFont(const wxNativeFontInfo
& info
);
43 #if FUTURE_WXWIN_COMPATIBILITY_3_0
48 bool underlined
= false,
49 const wxString
& face
= wxEmptyString
,
50 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
52 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
60 bool underlined
= false,
61 const wxString
& face
= wxEmptyString
,
62 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
64 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
71 bool underlined
= false,
72 const wxString
& face
= wxEmptyString
,
73 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
77 bool Create(const wxString
& fontname
);
81 // implement base class pure virtuals
82 virtual int GetPointSize() const;
83 virtual wxFontFamily
GetFamily() const;
84 virtual wxFontStyle
GetStyle() const;
85 virtual wxFontWeight
GetWeight() const;
86 virtual wxString
GetFaceName() const;
87 virtual bool GetUnderlined() const;
88 virtual wxFontEncoding
GetEncoding() const;
89 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
90 virtual bool IsFixedWidth() const;
92 virtual void SetPointSize( int pointSize
);
93 virtual void SetFamily(wxFontFamily family
);
94 virtual void SetStyle(wxFontStyle style
);
95 virtual void SetWeight(wxFontWeight weight
);
96 virtual bool SetFaceName( const wxString
& faceName
);
97 virtual void SetUnderlined( bool underlined
);
98 virtual void SetEncoding(wxFontEncoding encoding
);
100 WXDECLARE_COMPAT_SETTERS
102 virtual void SetNoAntiAliasing( bool no
= true );
103 virtual bool GetNoAntiAliasing() const ;
105 // implementation from now on
108 GdkFont
* GetInternalFont(float scale
= 1.0) const;
111 virtual wxGDIRefData
*CreateGDIRefData() const;
112 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
114 virtual void DoSetNativeFontInfo( const wxNativeFontInfo
& info
);
117 DECLARE_DYNAMIC_CLASS(wxFont
)
120 #endif // __GTKFONTH__