]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk1/font.h
put grid string in generic/grid.cpp, not common/datacmn.cpp
[wxWidgets.git] / include / wx / gtk1 / font.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk1/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
19class WXDLLIMPEXP_CORE wxDC;
20class WXDLLIMPEXP_CORE wxPaintDC;
21class WXDLLIMPEXP_CORE wxWindow;
22
23class WXDLLIMPEXP_CORE wxFont;
24
25// ----------------------------------------------------------------------------
26// wxFont
27// ----------------------------------------------------------------------------
28
29class WXDLLIMPEXP_CORE wxFont : public wxFontBase
30{
31public:
32 // ctors and such
33 wxFont() { }
34
35 // wxGTK-specific
36 wxFont(const wxString& fontname)
37 {
38 Create(fontname);
39 }
40
41 wxFont(const wxNativeFontInfo& info);
42
43 wxFont(int size,
44 int family,
45 int style,
46 int weight,
47 bool underlined = false,
48 const wxString& face = wxEmptyString,
49 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
50 {
51 (void)Create(size, family, style, weight, underlined, face, encoding);
52 }
53
54 bool Create(int size,
55 int family,
56 int style,
57 int weight,
58 bool underlined = false,
59 const wxString& face = wxEmptyString,
60 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
61
62 // wxGTK-specific
63 bool Create(const wxString& fontname);
64
65 virtual ~wxFont();
66
67 // implement base class pure virtuals
68 virtual int GetPointSize() const;
69 virtual int GetFamily() const;
70 virtual int GetStyle() const;
71 virtual int GetWeight() const;
72 virtual wxString GetFaceName() const;
73 virtual bool GetUnderlined() const;
74 virtual wxFontEncoding GetEncoding() const;
75 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
76 virtual bool IsFixedWidth() const;
77
78 virtual void SetPointSize( int pointSize );
79 virtual void SetFamily( int family );
80 virtual void SetStyle( int style );
81 virtual void SetWeight( int weight );
82 virtual bool SetFaceName( const wxString& faceName );
83 virtual void SetUnderlined( bool underlined );
84 virtual void SetEncoding(wxFontEncoding encoding);
85
86 virtual void SetNoAntiAliasing( bool no = true );
87 virtual bool GetNoAntiAliasing() const ;
88
89 // implementation from now on
90 void Unshare();
91
92 GdkFont* GetInternalFont(float scale = 1.0) const;
93
94 // no data :-)
95
96protected:
97 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
98
99private:
100 DECLARE_DYNAMIC_CLASS(wxFont)
101};
102
103#endif // __GTKFONTH__