]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/font.h
no changes, just remove #if'd out code
[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
34be948f 23 wxFont(const wxString& nativeFontInfoString)
7826e2dd 24 {
34be948f 25 Create(nativeFontInfoString);
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
b5791cc7
FM
54 wxFont(const wxSize& pixelSize,
55 wxFontFamily family,
56 wxFontStyle style,
57 wxFontWeight weight,
58 bool underlined = false,
59 const wxString& face = wxEmptyString,
60 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
61 {
62 Create(10, family, style, weight, underlined, face, encoding);
63 SetPixelSize(pixelSize);
64 }
65
0c5d3e1c 66 bool Create(int size,
0c14b6c3
FM
67 wxFontFamily family,
68 wxFontStyle style,
69 wxFontWeight weight,
dabbc6a5 70 bool underlined = false,
0c5d3e1c 71 const wxString& face = wxEmptyString,
7826e2dd 72 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
30764ab5 73
7826e2dd 74 // wxGTK-specific
409d5a58 75 bool Create(const wxString& fontname);
0c5d3e1c 76
d3c7fc99 77 virtual ~wxFont();
0c5d3e1c
VZ
78
79 // implement base class pure virtuals
80 virtual int GetPointSize() const;
0c14b6c3
FM
81 virtual wxFontFamily GetFamily() const;
82 virtual wxFontStyle GetStyle() const;
83 virtual wxFontWeight GetWeight() const;
0c5d3e1c
VZ
84 virtual wxString GetFaceName() const;
85 virtual bool GetUnderlined() const;
86 virtual wxFontEncoding GetEncoding() const;
3bf5a59b 87 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
53f6aab7 88 virtual bool IsFixedWidth() const;
0c5d3e1c
VZ
89
90 virtual void SetPointSize( int pointSize );
0c14b6c3
FM
91 virtual void SetFamily(wxFontFamily family);
92 virtual void SetStyle(wxFontStyle style);
93 virtual void SetWeight(wxFontWeight weight);
85ab460e 94 virtual bool SetFaceName( const wxString& faceName );
0c5d3e1c
VZ
95 virtual void SetUnderlined( bool underlined );
96 virtual void SetEncoding(wxFontEncoding encoding);
97
0c14b6c3
FM
98 WXDECLARE_COMPAT_SETTERS
99
dabbc6a5 100 virtual void SetNoAntiAliasing( bool no = true );
5ac2e80c 101 virtual bool GetNoAntiAliasing() const ;
9045ad9d 102
0c5d3e1c 103 // implementation from now on
0c5d3e1c
VZ
104 void Unshare();
105
0c5d3e1c
VZ
106 // no data :-)
107
108protected:
9045ad9d
VZ
109 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
110
0c5d3e1c
VZ
111 // common part of all ctors
112 void Init();
113
8f884a0d
VZ
114 virtual wxGDIRefData* CreateGDIRefData() const;
115 virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
fd7a7443 116
0c5d3e1c
VZ
117private:
118 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
119};
120
0416c418 121#endif // _WX_GTK_FONT_H_