]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mgl/font.h
fixed return value of wxMDIChildFrame::HandleGetMinMaxInfo()
[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)
32b8ec41
VZ
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef __WX_FONT_H__
10#define __WX_FONT_H__
11
12028905 12#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
32b8ec41
VZ
13 #pragma interface "font.h"
14#endif
15
16#include "wx/hash.h"
17
18// ----------------------------------------------------------------------------
19// classes
20// ----------------------------------------------------------------------------
21
22class WXDLLEXPORT wxDC;
23class WXDLLEXPORT wxPaintDC;
24class WXDLLEXPORT wxWindow;
25class WXDLLEXPORT wxFont;
26
27struct font_t;
28
29// ----------------------------------------------------------------------------
30// wxFont
31// ----------------------------------------------------------------------------
32
33class WXDLLEXPORT wxFont : public wxFontBase
34{
35public:
36 // ctors and such
37 wxFont() { Init(); }
38 wxFont(const wxFont& font) { Init(); Ref(font); }
39
40 wxFont(const wxNativeFontInfo& info)
41 {
42 Init();
43
44 (void)Create(info);
45 }
46
47 wxFont(int size,
48 int family,
49 int style,
50 int weight,
51 bool underlined = FALSE,
52 const wxString& face = wxEmptyString,
53 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
54 {
55 Init();
56
57 (void)Create(size, family, style, weight, underlined, face, encoding);
58 }
59
60 bool Create(int size,
61 int family,
62 int style,
63 int weight,
64 bool underlined = FALSE,
65 const wxString& face = wxEmptyString,
66 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
67
68 bool Create(const wxNativeFontInfo& fontinfo);
69
3cdd0895 70 ~wxFont() {}
32b8ec41
VZ
71
72 // assignment
73 wxFont& operator=(const wxFont& font);
74
75 // implement base class pure virtuals
76 virtual int GetPointSize() const;
77 virtual int GetFamily() const;
78 virtual int GetStyle() const;
79 virtual int GetWeight() const;
80 virtual wxString GetFaceName() const;
81 virtual bool GetUnderlined() const;
82 virtual wxFontEncoding GetEncoding() const;
f3437beb 83 virtual bool IsFixedWidth() const;
32b8ec41
VZ
84
85 virtual void SetPointSize(int pointSize);
86 virtual void SetFamily(int family);
87 virtual void SetStyle(int style);
88 virtual void SetWeight(int weight);
89 virtual void SetFaceName(const wxString& faceName);
90 virtual void SetUnderlined(bool underlined);
91 virtual void SetEncoding(wxFontEncoding encoding);
92
32b8ec41
VZ
93 struct font_t *GetMGLfont_t(float scale, bool antialiased);
94
32b8ec41
VZ
95protected:
96 // common part of all ctors
3cdd0895 97 void Init() {}
32b8ec41 98
6d7ee9e8
VS
99 // ref counting code
100 virtual wxObjectRefData *CreateRefData() const;
101 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
102
32b8ec41
VZ
103private:
104 DECLARE_DYNAMIC_CLASS(wxFont)
105};
106
107#endif // __WX_FONT_H__