Add FindOrCreateFont overload accepting wxFontInfo
This commit is contained in:
@@ -558,6 +558,12 @@ public:
|
|||||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||||
{ return FindOrCreateFont(pointSize, (wxFontFamily)family, (wxFontStyle)style,
|
{ return FindOrCreateFont(pointSize, (wxFontFamily)family, (wxFontStyle)style,
|
||||||
(wxFontWeight)weight, underline, face, encoding); }
|
(wxFontWeight)weight, underline, face, encoding); }
|
||||||
|
|
||||||
|
wxFont *FindOrCreateFont(const wxFontInfo& fontInfo)
|
||||||
|
{ return FindOrCreateFont(fontInfo.GetPointSize(), fontInfo.GetFamily(),
|
||||||
|
fontInfo.GetStyle(), fontInfo.GetWeight(),
|
||||||
|
fontInfo.IsUnderlined(), fontInfo.GetFaceName(),
|
||||||
|
fontInfo.GetEncoding()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
extern WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList;
|
extern WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList;
|
||||||
|
@@ -1261,6 +1261,14 @@ public:
|
|||||||
wxFontWeight weight, bool underline = false,
|
wxFontWeight weight, bool underline = false,
|
||||||
const wxString& facename = wxEmptyString,
|
const wxString& facename = wxEmptyString,
|
||||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Finds a font of the given specification, or creates one and adds it to the
|
||||||
|
list. See the @ref wxFont "wxFont constructor" for details of the arguments.
|
||||||
|
|
||||||
|
@since 3.1.1
|
||||||
|
*/
|
||||||
|
wxFont* FindOrCreateFont(const wxFontInfo& fontInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user