]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/font.h
make wxTmemchr() return (and take) char* instead of void* in ANSI build too
[wxWidgets.git] / include / wx / gtk / font.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: font.h
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
0416c418
PC
10#ifndef _WX_GTK_FONT_H_
11#define _WX_GTK_FONT_H_
c801d85f 12
0c5d3e1c 13// ----------------------------------------------------------------------------
c801d85f 14// wxFont
0c5d3e1c 15// ----------------------------------------------------------------------------
c801d85f 16
20123d49 17class WXDLLIMPEXP_CORE wxFont : public wxFontBase
c801d85f 18{
358fc25c 19public:
f8855e47 20 wxFont() { }
409d5a58
VZ
21
22 // wxGTK-specific
23 wxFont(const wxString& fontname)
7826e2dd 24 {
409d5a58 25 Create(fontname);
7826e2dd
VZ
26 }
27
28 wxFont(const wxNativeFontInfo& info);
0c5d3e1c
VZ
29
30 wxFont(int size,
31 int family,
32 int style,
33 int weight,
dabbc6a5 34 bool underlined = false,
0c5d3e1c
VZ
35 const wxString& face = wxEmptyString,
36 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
37 {
0c5d3e1c
VZ
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,
dabbc6a5 45 bool underlined = false,
0c5d3e1c 46 const wxString& face = wxEmptyString,
7826e2dd 47 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
30764ab5 48
7826e2dd 49 // wxGTK-specific
409d5a58 50 bool Create(const wxString& fontname);
0c5d3e1c 51
d3c7fc99 52 virtual ~wxFont();
0c5d3e1c
VZ
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;
3bf5a59b 62 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
53f6aab7 63 virtual bool IsFixedWidth() const;
0c5d3e1c
VZ
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 );
85ab460e 69 virtual bool SetFaceName( const wxString& faceName );
0c5d3e1c
VZ
70 virtual void SetUnderlined( bool underlined );
71 virtual void SetEncoding(wxFontEncoding encoding);
72
dabbc6a5 73 virtual void SetNoAntiAliasing( bool no = true );
5ac2e80c 74 virtual bool GetNoAntiAliasing() const ;
9045ad9d 75
0c5d3e1c 76 // implementation from now on
0c5d3e1c
VZ
77 void Unshare();
78
0c5d3e1c
VZ
79 // no data :-)
80
81protected:
9045ad9d
VZ
82 virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
83
0c5d3e1c
VZ
84 // common part of all ctors
85 void Init();
86
fd7a7443
PC
87 virtual wxObjectRefData* CreateRefData() const;
88 virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
89
0c5d3e1c
VZ
90private:
91 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
92};
93
0416c418 94#endif // _WX_GTK_FONT_H_