]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dfb/font.h
Fix missing documentation for several GDI functions.
[wxWidgets.git] / include / wx / dfb / font.h
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
14 #include "wx/dfb/dfbptr.h"
15
16 wxDFB_DECLARE_INTERFACE(IDirectFBFont);
17
18 // ----------------------------------------------------------------------------
19 // wxFont
20 // ----------------------------------------------------------------------------
21
22 class WXDLLIMPEXP_CORE wxFont : public wxFontBase
23 {
24 public:
25 wxFont() {}
26
27 wxFont(const wxFontInfo& info)
28 {
29 Create(info.GetPointSize(),
30 info.GetFamily(),
31 info.GetStyle(),
32 info.GetWeight(),
33 info.IsUnderlined(),
34 info.GetFaceName(),
35 info.GetEncoding());
36
37 if ( info.IsUsingSizeInPixels() )
38 SetPixelSize(info.GetPixelSize());
39 }
40
41 wxFont(const wxNativeFontInfo& info) { Create(info); }
42 #if FUTURE_WXWIN_COMPATIBILITY_3_0
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 (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
52 }
53 #endif
54
55 wxFont(int size,
56 wxFontFamily family,
57 wxFontStyle style,
58 wxFontWeight weight,
59 bool underlined = false,
60 const wxString& face = wxEmptyString,
61 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
62 {
63 Create(size, family, style, weight, underlined, face, encoding);
64 }
65
66 wxFont(const wxSize& pixelSize,
67 wxFontFamily family,
68 wxFontStyle style,
69 wxFontWeight weight,
70 bool underlined = false,
71 const wxString& face = wxEmptyString,
72 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
73 {
74 Create(10, family, style, weight, underlined, face, encoding);
75 SetPixelSize(pixelSize);
76 }
77
78 bool Create(int size,
79 wxFontFamily family,
80 wxFontStyle style,
81 wxFontWeight weight,
82 bool underlined = false,
83 const wxString& face = wxEmptyString,
84 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
85 bool Create(const wxNativeFontInfo& fontinfo);
86
87 // implement base class pure virtuals
88 virtual int GetPointSize() const;
89 virtual wxFontStyle GetStyle() const;
90 virtual wxFontWeight GetWeight() const;
91 virtual wxString GetFaceName() const;
92 virtual bool GetUnderlined() const;
93 virtual wxFontEncoding GetEncoding() const;
94 virtual bool IsFixedWidth() const;
95 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
96
97 virtual void SetPointSize(int pointSize);
98 virtual void SetFamily(wxFontFamily family);
99 virtual void SetStyle(wxFontStyle style);
100 virtual void SetWeight(wxFontWeight weight);
101 virtual bool SetFaceName(const wxString& faceName);
102 virtual void SetUnderlined(bool underlined);
103 virtual void SetEncoding(wxFontEncoding encoding);
104
105 wxDECLARE_COMMON_FONT_METHODS();
106
107 // implementation from now on:
108 wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
109
110 protected:
111 virtual wxGDIRefData *CreateGDIRefData() const;
112 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
113
114 virtual wxFontFamily DoGetFamily() const;
115
116 private:
117 DECLARE_DYNAMIC_CLASS(wxFont)
118 };
119
120 #endif // _WX_DFB_FONT_H_