]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/dfb/font.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Author: Vaclav Slavik
4 // Purpose: wxFont declaration
6 // Copyright: (c) 2006 REA Elektronik GmbH
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_DFB_FONT_H_
11 #define _WX_DFB_FONT_H_
13 #include "wx/dfb/dfbptr.h"
15 wxDFB_DECLARE_INTERFACE(IDirectFBFont
);
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
26 wxFont(const wxFontInfo
& info
)
28 Create(info
.GetPointSize(),
36 if ( info
.IsUsingSizeInPixels() )
37 SetPixelSize(info
.GetPixelSize());
40 wxFont(const wxNativeFontInfo
& info
) { Create(info
); }
41 #if FUTURE_WXWIN_COMPATIBILITY_3_0
46 bool underlined
= false,
47 const wxString
& face
= wxEmptyString
,
48 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
50 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
58 bool underlined
= false,
59 const wxString
& face
= wxEmptyString
,
60 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
62 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
65 wxFont(const wxSize
& pixelSize
,
69 bool underlined
= false,
70 const wxString
& face
= wxEmptyString
,
71 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
73 Create(10, family
, style
, weight
, underlined
, face
, encoding
);
74 SetPixelSize(pixelSize
);
81 bool underlined
= false,
82 const wxString
& face
= wxEmptyString
,
83 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
84 bool Create(const wxNativeFontInfo
& fontinfo
);
86 // implement base class pure virtuals
87 virtual int GetPointSize() const;
88 virtual wxFontStyle
GetStyle() const;
89 virtual wxFontWeight
GetWeight() const;
90 virtual wxString
GetFaceName() const;
91 virtual bool GetUnderlined() const;
92 virtual wxFontEncoding
GetEncoding() const;
93 virtual bool IsFixedWidth() const;
94 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
96 virtual void SetPointSize(int pointSize
);
97 virtual void SetFamily(wxFontFamily family
);
98 virtual void SetStyle(wxFontStyle style
);
99 virtual void SetWeight(wxFontWeight weight
);
100 virtual bool SetFaceName(const wxString
& faceName
);
101 virtual void SetUnderlined(bool underlined
);
102 virtual void SetEncoding(wxFontEncoding encoding
);
104 wxDECLARE_COMMON_FONT_METHODS();
106 // implementation from now on:
107 wxIDirectFBFontPtr
GetDirectFBFont(bool antialiased
) const;
110 virtual wxGDIRefData
*CreateGDIRefData() const;
111 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
113 virtual wxFontFamily
DoGetFamily() const;
116 DECLARE_DYNAMIC_CLASS(wxFont
)
119 #endif // _WX_DFB_FONT_H_