]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/font.h
Remove GTK2 specific prototypes from wx/include/gtk1. wx/gtk1/hdr into the header...
[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
20123d49
MW
19class WXDLLIMPEXP_CORE wxDC;
20class WXDLLIMPEXP_CORE wxPaintDC;
21class WXDLLIMPEXP_CORE wxWindow;
c801d85f 22
20123d49 23class WXDLLIMPEXP_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
VZ
32 // ctors and such
33 wxFont() { Init(); }
6788ecb8 34 wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); }
409d5a58
VZ
35
36 // wxGTK-specific
37 wxFont(const wxString& fontname)
7826e2dd
VZ
38 {
39 Init();
0c5d3e1c 40
409d5a58 41 Create(fontname);
7826e2dd
VZ
42 }
43
44 wxFont(const wxNativeFontInfo& info);
0c5d3e1c
VZ
45
46 wxFont(int size,
47 int family,
48 int style,
49 int weight,
dabbc6a5 50 bool underlined = false,
0c5d3e1c
VZ
51 const wxString& face = wxEmptyString,
52 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
53 {
54 Init();
55
56 (void)Create(size, family, style, weight, underlined, face, encoding);
57 }
58
59 bool Create(int size,
60 int family,
61 int style,
62 int weight,
dabbc6a5 63 bool underlined = false,
0c5d3e1c 64 const wxString& face = wxEmptyString,
7826e2dd 65 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
30764ab5 66
7826e2dd 67 // wxGTK-specific
409d5a58 68 bool Create(const wxString& fontname);
0c5d3e1c
VZ
69
70 ~wxFont();
71
7826e2dd
VZ
72 // assignment
73 wxFont& operator=(const wxFont& font);
74
0c5d3e1c
VZ
75 // implement base class pure virtuals
76 virtual int GetPointSize() const;
77 virtual int GetFamily() const;
78 virtual int GetStyle() const;
79 virtual int GetWeight() const;
80 virtual wxString GetFaceName() const;
81 virtual bool GetUnderlined() const;
82 virtual wxFontEncoding GetEncoding() const;
3bf5a59b 83 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
53f6aab7 84 virtual bool IsFixedWidth() const;
0c5d3e1c
VZ
85
86 virtual void SetPointSize( int pointSize );
87 virtual void SetFamily( int family );
88 virtual void SetStyle( int style );
89 virtual void SetWeight( int weight );
90 virtual void SetFaceName( const wxString& faceName );
91 virtual void SetUnderlined( bool underlined );
92 virtual void SetEncoding(wxFontEncoding encoding);
93
dabbc6a5 94 virtual void SetNoAntiAliasing( bool no = true );
5ac2e80c 95 virtual bool GetNoAntiAliasing() const ;
9045ad9d 96
0c5d3e1c 97 // implementation from now on
0c5d3e1c
VZ
98 void Unshare();
99
100 GdkFont* GetInternalFont(float scale = 1.0) const;
101
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
110private:
111 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
112};
113
c801d85f 114#endif // __GTKFONTH__