]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/font.h
give a name to the enum to make it easier to reference it in docs
[wxWidgets.git] / include / wx / gtk / font.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: font.h
3// Purpose:
4// Author: Robert Roebling
58614078 5// Id: $Id$
371a5b4e 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
0416c418
PC
10#ifndef _WX_GTK_FONT_H_
11#define _WX_GTK_FONT_H_
c801d85f 12
0c5d3e1c 13// ----------------------------------------------------------------------------
c801d85f 14// wxFont
0c5d3e1c 15// ----------------------------------------------------------------------------
c801d85f 16
20123d49 17class WXDLLIMPEXP_CORE wxFont : public wxFontBase
c801d85f 18{
358fc25c 19public:
f8855e47 20 wxFont() { }
409d5a58
VZ
21
22 // wxGTK-specific
23 wxFont(const wxString& fontname)
7826e2dd 24 {
409d5a58 25 Create(fontname);
7826e2dd
VZ
26 }
27
28 wxFont(const wxNativeFontInfo& info);
0c5d3e1c 29
0c14b6c3 30#if FUTURE_WXWIN_COMPATIBILITY_3_0
0c5d3e1c
VZ
31 wxFont(int size,
32 int family,
33 int style,
34 int weight,
dabbc6a5 35 bool underlined = false,
0c5d3e1c
VZ
36 const wxString& face = wxEmptyString,
37 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
38 {
0c14b6c3
FM
39 (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
40 }
41#endif
42
43 wxFont(int size,
44 wxFontFamily family,
45 wxFontStyle style,
46 wxFontWeight weight,
47 bool underlined = false,
48 const wxString& face = wxEmptyString,
49 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
50 {
51 Create(size, family, style, weight, underlined, face, encoding);
0c5d3e1c
VZ
52 }
53
54 bool Create(int size,
0c14b6c3
FM
55 wxFontFamily family,
56 wxFontStyle style,
57 wxFontWeight weight,
dabbc6a5 58 bool underlined = false,
0c5d3e1c 59 const wxString& face = wxEmptyString,
7826e2dd 60 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
30764ab5 61
7826e2dd 62 // wxGTK-specific
409d5a58 63 bool Create(const wxString& fontname);
0c5d3e1c 64
d3c7fc99 65 virtual ~wxFont();
0c5d3e1c
VZ
66
67 // implement base class pure virtuals
68 virtual int GetPointSize() const;
0c14b6c3
FM
69 virtual wxFontFamily GetFamily() const;
70 virtual wxFontStyle GetStyle() const;
71 virtual wxFontWeight GetWeight() const;
0c5d3e1c
VZ
72 virtual wxString GetFaceName() const;
73 virtual bool GetUnderlined() const;
74 virtual wxFontEncoding GetEncoding() const;
3bf5a59b 75 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
53f6aab7 76 virtual bool IsFixedWidth() const;
0c5d3e1c
VZ
77
78 virtual void SetPointSize( int pointSize );
0c14b6c3
FM
79 virtual void SetFamily(wxFontFamily family);
80 virtual void SetStyle(wxFontStyle style);
81 virtual void SetWeight(wxFontWeight weight);
85ab460e 82 virtual bool SetFaceName( const wxString& faceName );
0c5d3e1c
VZ
83 virtual void SetUnderlined( bool underlined );
84 virtual void SetEncoding(wxFontEncoding encoding);
85
0c14b6c3
FM
86 WXDECLARE_COMPAT_SETTERS
87
dabbc6a5 88 virtual void SetNoAntiAliasing( bool no = true );
5ac2e80c 89 virtual bool GetNoAntiAliasing() const ;
9045ad9d 90
0c5d3e1c 91 // implementation from now on
0c5d3e1c
VZ
92 void Unshare();
93
0c5d3e1c
VZ
94 // no data :-)
95
96protected:
9045ad9d
VZ
97 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
98
0c5d3e1c
VZ
99 // common part of all ctors
100 void Init();
101
8f884a0d
VZ
102 virtual wxGDIRefData* CreateGDIRefData() const;
103 virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
fd7a7443 104
0c5d3e1c
VZ
105private:
106 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
107};
108
0416c418 109#endif // _WX_GTK_FONT_H_