]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/font.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_FONT_H_
11 #define _WX_GTK_FONT_H_
13 // ----------------------------------------------------------------------------
15 // ----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
23 wxFont(const wxString
& nativeFontInfoString
)
25 Create(nativeFontInfoString
);
28 wxFont(const wxNativeFontInfo
& info
);
30 #if FUTURE_WXWIN_COMPATIBILITY_3_0
35 bool underlined
= false,
36 const wxString
& face
= wxEmptyString
,
37 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
39 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
47 bool underlined
= false,
48 const wxString
& face
= wxEmptyString
,
49 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
51 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
54 wxFont(const wxSize
& pixelSize
,
58 bool underlined
= false,
59 const wxString
& face
= wxEmptyString
,
60 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
62 Create(10, family
, style
, weight
, underlined
, face
, encoding
);
63 SetPixelSize(pixelSize
);
70 bool underlined
= false,
71 const wxString
& face
= wxEmptyString
,
72 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
75 bool Create(const wxString
& fontname
);
79 // implement base class pure virtuals
80 virtual int GetPointSize() const;
81 virtual wxFontFamily
GetFamily() const;
82 virtual wxFontStyle
GetStyle() const;
83 virtual wxFontWeight
GetWeight() const;
84 virtual wxString
GetFaceName() const;
85 virtual bool GetUnderlined() const;
86 virtual wxFontEncoding
GetEncoding() const;
87 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
88 virtual bool IsFixedWidth() const;
90 virtual void SetPointSize( int pointSize
);
91 virtual void SetFamily(wxFontFamily family
);
92 virtual void SetStyle(wxFontStyle style
);
93 virtual void SetWeight(wxFontWeight weight
);
94 virtual bool SetFaceName( const wxString
& faceName
);
95 virtual void SetUnderlined( bool underlined
);
96 virtual void SetEncoding(wxFontEncoding encoding
);
98 wxDECLARE_COMMON_FONT_METHODS();
100 virtual void SetNoAntiAliasing( bool no
= true );
101 virtual bool GetNoAntiAliasing() const ;
103 // implementation from now on
109 virtual void DoSetNativeFontInfo( const wxNativeFontInfo
& info
);
111 // common part of all ctors
114 virtual wxGDIRefData
* CreateGDIRefData() const;
115 virtual wxGDIRefData
* CloneGDIRefData(const wxGDIRefData
* data
) const;
118 DECLARE_DYNAMIC_CLASS(wxFont
)
121 #endif // _WX_GTK_FONT_H_