miscellaneous wxFont enhancements (patch 1496606):
- made SetFaceName() bool and return false if the face name is not available - corrected To/FromUserString() to complement each other git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -64,11 +64,9 @@ enum wxXLFDField
|
||||
// functions, the user code can only get the objects of this type from
|
||||
// somewhere and pass it somewhere else (possibly save them somewhere using
|
||||
// ToString() and restore them using FromString())
|
||||
//
|
||||
// NB: it is a POD currently for max efficiency but if it continues to grow
|
||||
// further it might make sense to make it a real class with virtual methods
|
||||
struct WXDLLEXPORT wxNativeFontInfo
|
||||
class WXDLLEXPORT wxNativeFontInfo
|
||||
{
|
||||
public:
|
||||
#if wxUSE_PANGO
|
||||
PangoFontDescription *description;
|
||||
#elif defined(_WX_X_FONTLIKE)
|
||||
@@ -195,10 +193,17 @@ public:
|
||||
void SetStyle(wxFontStyle style);
|
||||
void SetWeight(wxFontWeight weight);
|
||||
void SetUnderlined(bool underlined);
|
||||
void SetFaceName(const wxString& facename);
|
||||
bool SetFaceName(const wxString& facename);
|
||||
void SetFamily(wxFontFamily family);
|
||||
void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
// sets the first facename in the given array which is found
|
||||
// to be valid. If no valid facename is given, sets the
|
||||
// first valid facename returned by wxFontEnumerator::GetFacenames().
|
||||
// Does not return a bool since it cannot fail.
|
||||
void SetFaceName(const wxArrayString &facenames);
|
||||
|
||||
|
||||
// it is important to be able to serialize wxNativeFontInfo objects to be
|
||||
// able to store them (in config file, for example)
|
||||
bool FromString(const wxString& s);
|
||||
|
Reference in New Issue
Block a user