]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/dfb/font.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Author: Vaclav Slavik
4 // Purpose: wxFont declaration
7 // Copyright: (c) 2006 REA Elektronik GmbH
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_DFB_FONT_H_
12 #define _WX_DFB_FONT_H_
14 #include "wx/dfb/dfbptr.h"
16 wxDFB_DECLARE_INTERFACE(IDirectFBFont
);
18 // ----------------------------------------------------------------------------
20 // ----------------------------------------------------------------------------
22 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
27 wxFont(const wxFontInfo
& info
)
29 Create(info
.GetPointSize(),
37 if ( info
.IsUsingSizeInPixels() )
38 SetPixelSize(info
.GetPixelSize());
41 wxFont(const wxNativeFontInfo
& info
) { Create(info
); }
42 #if FUTURE_WXWIN_COMPATIBILITY_3_0
47 bool underlined
= false,
48 const wxString
& face
= wxEmptyString
,
49 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
51 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
59 bool underlined
= false,
60 const wxString
& face
= wxEmptyString
,
61 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
63 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
66 wxFont(const wxSize
& pixelSize
,
70 bool underlined
= false,
71 const wxString
& face
= wxEmptyString
,
72 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
74 Create(10, family
, style
, weight
, underlined
, face
, encoding
);
75 SetPixelSize(pixelSize
);
82 bool underlined
= false,
83 const wxString
& face
= wxEmptyString
,
84 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
85 bool Create(const wxNativeFontInfo
& fontinfo
);
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;
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
);
105 wxDECLARE_COMMON_FONT_METHODS();
107 // implementation from now on:
108 wxIDirectFBFontPtr
GetDirectFBFont(bool antialiased
) const;
111 virtual wxGDIRefData
*CreateGDIRefData() const;
112 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
114 virtual wxFontFamily
DoGetFamily() const;
117 DECLARE_DYNAMIC_CLASS(wxFont
)
120 #endif // _WX_DFB_FONT_H_