]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mgl/private/fontmgr.h
replace use of 'long/int bitmapType' with 'wxBitmapType bitmapType' in richtext and...
[wxWidgets.git] / include / wx / mgl / private / fontmgr.h
... / ...
CommitLineData
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
14struct font_info_t;
15struct font_lib_t;
16struct font_t;
17
18class wxFontInstance : public wxFontInstanceBase
19{
20public:
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
26private:
27 font_t *m_font;
28};
29
30class wxFontFace : public wxFontFaceBase
31{
32public:
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
41protected:
42 wxFontInstance *CreateFontInstance(float ptSize, bool aa);
43
44private:
45 font_lib_t *m_fontLib;
46 wxString m_fileName;
47};
48
49class wxFontBundle : public wxFontBundleBase
50{
51public:
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
59private:
60 const font_info_t *m_fontInfo;
61};
62
63class wxFontsManager : public wxFontsManagerBase
64{
65public:
66 wxFontsManager() { AddAllFonts(); }
67
68 virtual wxString GetDefaultFacename(wxFontFamily family) const;
69
70private:
71 // adds all fonts using AddBundle()
72 void AddAllFonts();
73};
74
75#endif // _WX_MGL_PRIVATE_FONTMGR_H_