]>
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
26 wxFont(const wxNativeFontInfo
& info
) { Create(info
); }
27 #if FUTURE_WXWIN_COMPATIBILITY_3_0
32 bool underlined
= false,
33 const wxString
& face
= wxEmptyString
,
34 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
36 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
44 bool underlined
= false,
45 const wxString
& face
= wxEmptyString
,
46 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
48 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
51 wxFont(const wxSize
& pixelSize
,
55 bool underlined
= false,
56 const wxString
& face
= wxEmptyString
,
57 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
59 Create(10, family
, style
, weight
, underlined
, face
, encoding
);
60 SetPixelSize(pixelSize
);
65 int flags
= wxFONTFLAG_DEFAULT
,
66 const wxString
& face
= wxEmptyString
,
67 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
69 Create(pointSize
, family
,
70 GetStyleFromFlags(flags
),
71 GetWeightFromFlags(flags
),
72 GetUnderlinedFromFlags(flags
),
80 bool underlined
= false,
81 const wxString
& face
= wxEmptyString
,
82 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
83 bool Create(const wxNativeFontInfo
& fontinfo
);
85 // implement base class pure virtuals
86 virtual int GetPointSize() const;
87 virtual wxFontStyle
GetStyle() const;
88 virtual wxFontWeight
GetWeight() const;
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;
95 virtual void SetPointSize(int pointSize
);
96 virtual void SetFamily(wxFontFamily family
);
97 virtual void SetStyle(wxFontStyle style
);
98 virtual void SetWeight(wxFontWeight weight
);
99 virtual bool SetFaceName(const wxString
& faceName
);
100 virtual void SetUnderlined(bool underlined
);
101 virtual void SetEncoding(wxFontEncoding encoding
);
103 wxDECLARE_COMMON_FONT_METHODS();
105 // implementation from now on:
106 wxIDirectFBFontPtr
GetDirectFBFont(bool antialiased
) const;
109 virtual wxGDIRefData
*CreateGDIRefData() const;
110 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
112 virtual wxFontFamily
DoGetFamily() const;
115 DECLARE_DYNAMIC_CLASS(wxFont
)
118 #endif // _WX_DFB_FONT_H_