]> git.saurik.com Git - wxWidgets.git/blame - include/wx/dfb/font.h
Extract OS X non-GUI event loop in a separate header.
[wxWidgets.git] / include / wx / dfb / font.h
CommitLineData
b3c86150
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/dfb/font.h
3// Author: Vaclav Slavik
4// Purpose: wxFont declaration
5// Created: 2006-08-08
6// RCS-ID: $Id$
7// Copyright: (c) 2006 REA Elektronik GmbH
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_DFB_FONT_H_
12#define _WX_DFB_FONT_H_
13
52c8d32a 14#include "wx/dfb/dfbptr.h"
b3c86150
VS
15
16wxDFB_DECLARE_INTERFACE(IDirectFBFont);
17
18// ----------------------------------------------------------------------------
19// wxFont
20// ----------------------------------------------------------------------------
21
22class WXDLLIMPEXP_CORE wxFont : public wxFontBase
23{
24public:
25 wxFont() {}
26 wxFont(const wxNativeFontInfo& info) { Create(info); }
0c14b6c3 27#if FUTURE_WXWIN_COMPATIBILITY_3_0
b3c86150
VS
28 wxFont(int size,
29 int family,
30 int style,
31 int weight,
32 bool underlined = false,
33 const wxString& face = wxEmptyString,
34 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
0c14b6c3
FM
35 {
36 (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
37 }
38#endif
39
40 wxFont(int size,
41 wxFontFamily family,
42 wxFontStyle style,
43 wxFontWeight weight,
44 bool underlined = false,
45 const wxString& face = wxEmptyString,
46 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
b3c86150
VS
47 {
48 Create(size, family, style, weight, underlined, face, encoding);
49 }
03647350 50
b5791cc7
FM
51 wxFont(const wxSize& pixelSize,
52 wxFontFamily family,
53 wxFontStyle style,
54 wxFontWeight weight,
55 bool underlined = false,
56 const wxString& face = wxEmptyString,
57 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
58 {
59 Create(10, family, style, weight, underlined, face, encoding);
60 SetPixelSize(pixelSize);
61 }
03647350 62
0634700a
VZ
63 wxFont(int pointSize,
64 wxFontFamily family,
65 int flags = wxFONTFLAG_DEFAULT,
66 const wxString& face = wxEmptyString,
67 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
68 {
69 Create(pointSize, family,
70 GetStyleFromFlags(flags),
71 GetWeightFromFlags(flags),
72 GetUnderlinedFromFlags(flags),
73 face, encoding);
74 }
75
b3c86150 76 bool Create(int size,
0c14b6c3
FM
77 wxFontFamily family,
78 wxFontStyle style,
79 wxFontWeight weight,
b3c86150
VS
80 bool underlined = false,
81 const wxString& face = wxEmptyString,
82 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
83 bool Create(const wxNativeFontInfo& fontinfo);
84
85 // implement base class pure virtuals
86 virtual int GetPointSize() const;
0c14b6c3
FM
87 virtual wxFontStyle GetStyle() const;
88 virtual wxFontWeight GetWeight() const;
b3c86150
VS
89 virtual wxString GetFaceName() const;
90 virtual bool GetUnderlined() const;
91 virtual wxFontEncoding GetEncoding() const;
92 virtual bool IsFixedWidth() const;
93 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
94
95 virtual void SetPointSize(int pointSize);
0c14b6c3
FM
96 virtual void SetFamily(wxFontFamily family);
97 virtual void SetStyle(wxFontStyle style);
98 virtual void SetWeight(wxFontWeight weight);
b3c86150
VS
99 virtual bool SetFaceName(const wxString& faceName);
100 virtual void SetUnderlined(bool underlined);
101 virtual void SetEncoding(wxFontEncoding encoding);
102
f76c0758 103 wxDECLARE_COMMON_FONT_METHODS();
0c14b6c3 104
b3c86150 105 // implementation from now on:
d7ae4a62 106 wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
b3c86150
VS
107
108protected:
8f884a0d
VZ
109 virtual wxGDIRefData *CreateGDIRefData() const;
110 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
b3c86150 111
59b7da02
VZ
112 virtual wxFontFamily DoGetFamily() const;
113
b3c86150
VS
114private:
115 DECLARE_DYNAMIC_CLASS(wxFont)
116};
117
118#endif // _WX_DFB_FONT_H_