]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/font.h
Remove apparently unnecessary wxAuiMDIClientWindow dtor.
[wxWidgets.git] / include / wx / gtk1 / font.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/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
c801d85f
KB
10#ifndef __GTKFONTH__
11#define __GTKFONTH__
12
c801d85f 13#include "wx/hash.h"
c801d85f 14
0c5d3e1c 15// ----------------------------------------------------------------------------
c801d85f 16// classes
0c5d3e1c 17// ----------------------------------------------------------------------------
c801d85f 18
b5dbe15d
VS
19class WXDLLIMPEXP_FWD_CORE wxDC;
20class WXDLLIMPEXP_FWD_CORE wxPaintDC;
21class WXDLLIMPEXP_FWD_CORE wxWindow;
c801d85f 22
b5dbe15d 23class WXDLLIMPEXP_FWD_CORE wxFont;
c801d85f 24
0c5d3e1c 25// ----------------------------------------------------------------------------
c801d85f 26// wxFont
0c5d3e1c 27// ----------------------------------------------------------------------------
c801d85f 28
20123d49 29class WXDLLIMPEXP_CORE wxFont : public wxFontBase
c801d85f 30{
358fc25c 31public:
0c5d3e1c 32 // ctors and such
8628b7d4 33 wxFont() { }
409d5a58
VZ
34
35 // wxGTK-specific
36 wxFont(const wxString& fontname)
7826e2dd 37 {
409d5a58 38 Create(fontname);
7826e2dd
VZ
39 }
40
41 wxFont(const wxNativeFontInfo& info);
0c5d3e1c 42
0c14b6c3 43#if FUTURE_WXWIN_COMPATIBILITY_3_0
0c5d3e1c
VZ
44 wxFont(int size,
45 int family,
46 int style,
47 int weight,
dabbc6a5 48 bool underlined = false,
0c5d3e1c
VZ
49 const wxString& face = wxEmptyString,
50 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
51 {
0c14b6c3
FM
52 (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
53 }
54#endif
55
56 wxFont(int size,
57 wxFontFamily family,
58 wxFontStyle style,
59 wxFontWeight weight,
60 bool underlined = false,
61 const wxString& face = wxEmptyString,
62 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
63 {
64 Create(size, family, style, weight, underlined, face, encoding);
0c5d3e1c 65 }
03647350 66
b5791cc7
FM
67 wxFont(const wxSize& pixelSize,
68 wxFontFamily family,
69 wxFontStyle style,
70 wxFontWeight weight,
71 bool underlined = false,
72 const wxString& face = wxEmptyString,
73 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
74 {
75 Create(10, family, style, weight, underlined, face, encoding);
76 SetPixelSize(pixelSize);
77 }
03647350 78
0c5d3e1c 79 bool Create(int size,
0c14b6c3
FM
80 wxFontFamily family,
81 wxFontStyle style,
82 wxFontWeight weight,
dabbc6a5 83 bool underlined = false,
0c5d3e1c 84 const wxString& face = wxEmptyString,
7826e2dd 85 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
30764ab5 86
0c14b6c3 87
7826e2dd 88 // wxGTK-specific
409d5a58 89 bool Create(const wxString& fontname);
0c5d3e1c 90
d3c7fc99 91 virtual ~wxFont();
0c5d3e1c
VZ
92
93 // implement base class pure virtuals
94 virtual int GetPointSize() const;
0c14b6c3
FM
95 virtual wxFontStyle GetStyle() const;
96 virtual wxFontWeight GetWeight() const;
0c5d3e1c
VZ
97 virtual wxString GetFaceName() const;
98 virtual bool GetUnderlined() const;
99 virtual wxFontEncoding GetEncoding() const;
3bf5a59b 100 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
53f6aab7 101 virtual bool IsFixedWidth() const;
0c5d3e1c
VZ
102
103 virtual void SetPointSize( int pointSize );
0c14b6c3
FM
104 virtual void SetFamily(wxFontFamily family);
105 virtual void SetStyle(wxFontStyle style);
106 virtual void SetWeight(wxFontWeight weight);
85ab460e 107 virtual bool SetFaceName( const wxString& faceName );
0c5d3e1c
VZ
108 virtual void SetUnderlined( bool underlined );
109 virtual void SetEncoding(wxFontEncoding encoding);
110
f76c0758 111 wxDECLARE_COMMON_FONT_METHODS();
0c14b6c3 112
0c5d3e1c 113 // implementation from now on
0c5d3e1c
VZ
114 void Unshare();
115
116 GdkFont* GetInternalFont(float scale = 1.0) const;
117
0c5d3e1c 118protected:
8f884a0d
VZ
119 virtual wxGDIRefData *CreateGDIRefData() const;
120 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
121
9045ad9d 122 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
59b7da02 123 virtual wxFontFamily DoGetFamily() const;
9045ad9d 124
0c5d3e1c
VZ
125private:
126 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
127};
128
c801d85f 129#endif // __GTKFONTH__