]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/font.h
Replace wxComboBox::IsEmpty() with Is{List,Text}Empty().
[wxWidgets.git] / include / wx / gtk / font.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/gtk/font.h
c801d85f
KB
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 }
03647350 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 wxFontStyle GetStyle() const;
82 virtual wxFontWeight GetWeight() const;
0c5d3e1c
VZ
83 virtual wxString GetFaceName() const;
84 virtual bool GetUnderlined() const;
85 virtual wxFontEncoding GetEncoding() const;
3bf5a59b 86 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
53f6aab7 87 virtual bool IsFixedWidth() const;
0c5d3e1c
VZ
88
89 virtual void SetPointSize( int pointSize );
0c14b6c3
FM
90 virtual void SetFamily(wxFontFamily family);
91 virtual void SetStyle(wxFontStyle style);
92 virtual void SetWeight(wxFontWeight weight);
85ab460e 93 virtual bool SetFaceName( const wxString& faceName );
0c5d3e1c
VZ
94 virtual void SetUnderlined( bool underlined );
95 virtual void SetEncoding(wxFontEncoding encoding);
96
f76c0758 97 wxDECLARE_COMMON_FONT_METHODS();
0c14b6c3 98
0c5d3e1c 99 // implementation from now on
0c5d3e1c
VZ
100 void Unshare();
101
0c5d3e1c
VZ
102 // no data :-)
103
104protected:
9045ad9d
VZ
105 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
106
0c5d3e1c
VZ
107 // common part of all ctors
108 void Init();
109
8f884a0d
VZ
110 virtual wxGDIRefData* CreateGDIRefData() const;
111 virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
fd7a7443 112
59b7da02
VZ
113 virtual wxFontFamily DoGetFamily() const;
114
0c5d3e1c
VZ
115private:
116 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
117};
118
0416c418 119#endif // _WX_GTK_FONT_H_