]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mgl/font.h
Applied patch [ 1255676 ] stc2wx/wx2stc not exported (Win32 Unicode DLL)
[wxWidgets.git] / include / wx / mgl / font.h
CommitLineData
32b8ec41
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: font.h
3// Author: Vaclav Slavik
4// Id: $Id$
52750c2e 5// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
65571936 6// Licence: wxWindows licence
32b8ec41
VZ
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef __WX_FONT_H__
10#define __WX_FONT_H__
11
32b8ec41
VZ
12#include "wx/hash.h"
13
14// ----------------------------------------------------------------------------
15// classes
16// ----------------------------------------------------------------------------
17
18class WXDLLEXPORT wxDC;
19class WXDLLEXPORT wxPaintDC;
20class WXDLLEXPORT wxWindow;
21class WXDLLEXPORT wxFont;
22
23struct font_t;
24
25// ----------------------------------------------------------------------------
26// wxFont
27// ----------------------------------------------------------------------------
28
29class WXDLLEXPORT wxFont : public wxFontBase
30{
31public:
32 // ctors and such
33 wxFont() { Init(); }
34 wxFont(const wxFont& font) { Init(); Ref(font); }
35
36 wxFont(const wxNativeFontInfo& info)
37 {
38 Init();
39
40 (void)Create(info);
41 }
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 Init();
52
53 (void)Create(size, family, style, weight, underlined, face, encoding);
54 }
55
56 bool Create(int size,
57 int family,
58 int style,
59 int weight,
60 bool underlined = FALSE,
61 const wxString& face = wxEmptyString,
62 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
63
64 bool Create(const wxNativeFontInfo& fontinfo);
65
3cdd0895 66 ~wxFont() {}
32b8ec41
VZ
67
68 // assignment
69 wxFont& operator=(const wxFont& font);
70
71 // implement base class pure virtuals
72 virtual int GetPointSize() const;
73 virtual int GetFamily() const;
74 virtual int GetStyle() const;
75 virtual int GetWeight() const;
76 virtual wxString GetFaceName() const;
77 virtual bool GetUnderlined() const;
78 virtual wxFontEncoding GetEncoding() const;
f3437beb 79 virtual bool IsFixedWidth() const;
3bf5a59b 80 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
32b8ec41
VZ
81
82 virtual void SetPointSize(int pointSize);
83 virtual void SetFamily(int family);
84 virtual void SetStyle(int style);
85 virtual void SetWeight(int weight);
86 virtual void SetFaceName(const wxString& faceName);
87 virtual void SetUnderlined(bool underlined);
88 virtual void SetEncoding(wxFontEncoding encoding);
89
32b8ec41
VZ
90 struct font_t *GetMGLfont_t(float scale, bool antialiased);
91
32b8ec41
VZ
92protected:
93 // common part of all ctors
3cdd0895 94 void Init() {}
32b8ec41 95
6d7ee9e8
VS
96 // ref counting code
97 virtual wxObjectRefData *CreateRefData() const;
98 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
99
32b8ec41
VZ
100private:
101 DECLARE_DYNAMIC_CLASS(wxFont)
102};
103
104#endif // __WX_FONT_H__