]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/font.h
removed now-unused wxSizer::GetMax/MinWindowSize helpers
[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 _WX_GTK_FONT_H_
11 #define _WX_GTK_FONT_H_
12
13 // ----------------------------------------------------------------------------
14 // wxFont
15 // ----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxFont : public wxFontBase
18 {
19 public:
20 wxFont() { }
21
22 // wxGTK-specific
23 wxFont(const wxString& fontname)
24 {
25 Create(fontname);
26 }
27
28 wxFont(const wxNativeFontInfo& info);
29
30 wxFont(int size,
31 int family,
32 int style,
33 int weight,
34 bool underlined = false,
35 const wxString& face = wxEmptyString,
36 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
37 {
38 (void)Create(size, family, style, weight, underlined, face, encoding);
39 }
40
41 bool Create(int size,
42 int family,
43 int style,
44 int weight,
45 bool underlined = false,
46 const wxString& face = wxEmptyString,
47 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
48
49 // wxGTK-specific
50 bool Create(const wxString& fontname);
51
52 virtual ~wxFont();
53
54 // implement base class pure virtuals
55 virtual int GetPointSize() const;
56 virtual int GetFamily() const;
57 virtual int GetStyle() const;
58 virtual int GetWeight() const;
59 virtual wxString GetFaceName() const;
60 virtual bool GetUnderlined() const;
61 virtual wxFontEncoding GetEncoding() const;
62 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
63 virtual bool IsFixedWidth() const;
64
65 virtual void SetPointSize( int pointSize );
66 virtual void SetFamily( int family );
67 virtual void SetStyle( int style );
68 virtual void SetWeight( int weight );
69 virtual bool SetFaceName( const wxString& faceName );
70 virtual void SetUnderlined( bool underlined );
71 virtual void SetEncoding(wxFontEncoding encoding);
72
73 virtual void SetNoAntiAliasing( bool no = true );
74 virtual bool GetNoAntiAliasing() const ;
75
76 // implementation from now on
77 void Unshare();
78
79 // no data :-)
80
81 protected:
82 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
83
84 // common part of all ctors
85 void Init();
86
87 virtual wxGDIRefData* CreateGDIRefData() const;
88 virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
89
90 private:
91 DECLARE_DYNAMIC_CLASS(wxFont)
92 };
93
94 #endif // _WX_GTK_FONT_H_