]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/private/fontmgr.h
Add wxDataViewRendererBase::PrepareForItem() helper.
[wxWidgets.git] / include / wx / mgl / private / fontmgr.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mgl/private/fontmgr.h
3 // Purpose: font management for MGL
4 // Author: Vaclav Slavik
5 // Created: 2006-11-18
6 // RCS-ID: $Id$
7 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MGL_PRIVATE_FONTMGR_H_
12 #define _WX_MGL_PRIVATE_FONTMGR_H_
13
14 struct font_info_t;
15 struct font_lib_t;
16 struct font_t;
17
18 class wxFontInstance : public wxFontInstanceBase
19 {
20 public:
21 wxFontInstance(float ptSize, bool aa, font_lib_t *fontLib);
22 virtual ~wxFontInstance();
23
24 struct font_t *GetMGLfont_t() const { return m_font; }
25
26 private:
27 font_t *m_font;
28 };
29
30 class wxFontFace : public wxFontFaceBase
31 {
32 public:
33 wxFontFace(const wxString& filename)
34 : m_fontLib(NULL), m_fileName(filename) {}
35
36 virtual void Acquire();
37 virtual void Release();
38
39 virtual wxFontInstance *GetFontInstance(float ptSize, bool aa);
40
41 protected:
42 wxFontInstance *CreateFontInstance(float ptSize, bool aa);
43
44 private:
45 font_lib_t *m_fontLib;
46 wxString m_fileName;
47 };
48
49 class wxFontBundle : public wxFontBundleBase
50 {
51 public:
52 wxFontBundle(const font_info_t *fontInfo);
53
54 virtual wxString GetName() const;
55 virtual bool IsFixed() const;
56
57 const font_info_t *GetInfo() const { return m_fontInfo; }
58
59 private:
60 const font_info_t *m_fontInfo;
61 };
62
63 class wxFontsManager : public wxFontsManagerBase
64 {
65 public:
66 wxFontsManager() { AddAllFonts(); }
67
68 virtual wxString GetDefaultFacename(wxFontFamily family) const;
69
70 private:
71 // adds all fonts using AddBundle()
72 void AddAllFonts();
73 };
74
75 #endif // _WX_MGL_PRIVATE_FONTMGR_H_