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_CORE wxDC
;
20 class WXDLLIMPEXP_CORE wxPaintDC
;
21 class WXDLLIMPEXP_CORE wxWindow
;
23 class WXDLLIMPEXP_CORE wxFont
;
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
34 wxFont(const wxFont
& font
) : wxFontBase() { Init(); Ref(font
); }
37 wxFont(const wxString
& fontname
)
44 wxFont(const wxNativeFontInfo
& info
);
50 bool underlined
= false,
51 const wxString
& face
= wxEmptyString
,
52 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
56 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
63 bool underlined
= false,
64 const wxString
& face
= wxEmptyString
,
65 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
68 bool Create(const wxString
& fontname
);
73 wxFont
& operator=(const wxFont
& font
);
75 // implement base class pure virtuals
76 virtual int GetPointSize() const;
77 virtual int GetFamily() const;
78 virtual int GetStyle() const;
79 virtual int GetWeight() const;
80 virtual wxString
GetFaceName() const;
81 virtual bool GetUnderlined() const;
82 virtual wxFontEncoding
GetEncoding() const;
83 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
84 virtual bool IsFixedWidth() const;
86 virtual void SetPointSize( int pointSize
);
87 virtual void SetFamily( int family
);
88 virtual void SetStyle( int style
);
89 virtual void SetWeight( int weight
);
90 virtual void SetFaceName( const wxString
& faceName
);
91 virtual void SetUnderlined( bool underlined
);
92 virtual void SetEncoding(wxFontEncoding encoding
);
94 virtual void SetNoAntiAliasing( bool no
= true );
95 virtual bool GetNoAntiAliasing() const ;
97 // implementation from now on
100 GdkFont
* GetInternalFont(float scale
= 1.0) const;
105 virtual void DoSetNativeFontInfo( const wxNativeFontInfo
& info
);
107 // common part of all ctors
111 DECLARE_DYNAMIC_CLASS(wxFont
)
114 #endif // __GTKFONTH__