]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dfb/font.h
split wxControl::Ellipsize() in two functions for better readability of the code...
[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 wxFont(const wxNativeFontInfo& info) { Create(info); }
27 #if FUTURE_WXWIN_COMPATIBILITY_3_0
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)
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)
47 {
48 Create(size, family, style, weight, underlined, face, encoding);
49 }
50
51 bool Create(int size,
52 wxFontFamily family,
53 wxFontStyle style,
54 wxFontWeight weight,
55 bool underlined = false,
56 const wxString& face = wxEmptyString,
57 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
58 bool Create(const wxNativeFontInfo& fontinfo);
59
60 // implement base class pure virtuals
61 virtual int GetPointSize() const;
62 virtual wxFontFamily GetFamily() const;
63 virtual wxFontStyle GetStyle() const;
64 virtual wxFontWeight GetWeight() const;
65 virtual wxString GetFaceName() const;
66 virtual bool GetUnderlined() const;
67 virtual wxFontEncoding GetEncoding() const;
68 virtual bool IsFixedWidth() const;
69 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
70
71 virtual void SetPointSize(int pointSize);
72 virtual void SetFamily(wxFontFamily family);
73 virtual void SetStyle(wxFontStyle style);
74 virtual void SetWeight(wxFontWeight weight);
75 virtual bool SetFaceName(const wxString& faceName);
76 virtual void SetUnderlined(bool underlined);
77 virtual void SetEncoding(wxFontEncoding encoding);
78
79 WXDECLARE_COMPAT_SETTERS
80
81 // Unofficial API, don't use
82 virtual void SetNoAntiAliasing(bool no = true);
83 virtual bool GetNoAntiAliasing() const;
84
85 // implementation from now on:
86 wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
87
88 protected:
89 virtual wxGDIRefData *CreateGDIRefData() const;
90 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
91
92 private:
93 DECLARE_DYNAMIC_CLASS(wxFont)
94 };
95
96 #endif // _WX_DFB_FONT_H_