]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/font.h
Added wxDataViewProgressCell with native code
[wxWidgets.git] / include / wx / gtk / font.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: font.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKFONTH__
11 #define __GTKFONTH__
12
13 #include "wx/hash.h"
14
15 // ----------------------------------------------------------------------------
16 // classes
17 // ----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxDC;
20 class WXDLLIMPEXP_CORE wxPaintDC;
21 class WXDLLIMPEXP_CORE wxWindow;
22
23 class WXDLLIMPEXP_CORE wxFont;
24
25 // ----------------------------------------------------------------------------
26 // wxFont
27 // ----------------------------------------------------------------------------
28
29 class WXDLLIMPEXP_CORE wxFont : public wxFontBase
30 {
31 public:
32 wxFont() { }
33
34 // wxGTK-specific
35 wxFont(const wxString& fontname)
36 {
37 Create(fontname);
38 }
39
40 wxFont(const wxNativeFontInfo& info);
41
42 wxFont(int size,
43 int family,
44 int style,
45 int weight,
46 bool underlined = false,
47 const wxString& face = wxEmptyString,
48 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
49 {
50 (void)Create(size, family, style, weight, underlined, face, encoding);
51 }
52
53 bool Create(int size,
54 int family,
55 int style,
56 int weight,
57 bool underlined = false,
58 const wxString& face = wxEmptyString,
59 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
60
61 // wxGTK-specific
62 bool Create(const wxString& fontname);
63
64 ~wxFont();
65
66 // implement base class pure virtuals
67 virtual int GetPointSize() const;
68 virtual int GetFamily() const;
69 virtual int GetStyle() const;
70 virtual int GetWeight() const;
71 virtual wxString GetFaceName() const;
72 virtual bool GetUnderlined() const;
73 virtual wxFontEncoding GetEncoding() const;
74 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
75 virtual bool IsFixedWidth() const;
76
77 virtual void SetPointSize( int pointSize );
78 virtual void SetFamily( int family );
79 virtual void SetStyle( int style );
80 virtual void SetWeight( int weight );
81 virtual void SetFaceName( const wxString& faceName );
82 virtual void SetUnderlined( bool underlined );
83 virtual void SetEncoding(wxFontEncoding encoding);
84
85 virtual void SetNoAntiAliasing( bool no = true );
86 virtual bool GetNoAntiAliasing() const ;
87
88 // implementation from now on
89 void Unshare();
90
91 // no data :-)
92
93 protected:
94 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
95
96 // common part of all ctors
97 void Init();
98
99 private:
100 DECLARE_DYNAMIC_CLASS(wxFont)
101 };
102
103 #endif // __GTKFONTH__