+/**
+ @class wxFontInfo
+
+ This class is a helper used for wxFont creation using named parameter
+ idiom: it allows to specify various wxFont attributes using the chained
+ calls to its clearly named methods instead of passing them in the fixed
+ order to wxFont constructors.
+
+ For example, to create an italic font with the given face name and size you
+ could use:
+ @code
+ wxFont font(wxFontInfo(12).FaceName("Helvetica").Italic());
+ @endcode
+
+ Notice that all of the methods of this object return a reference to the
+ object itself, allowing the calls to them to be chained as in the example
+ above.
+
+ All methods taking boolean parameters can be used to turn the specified
+ font attribute on or off and turn it on by default.
+
+ @since 2.9.5
+ */
+class wxFontInfo
+{
+public:
+ /**
+ Default constructor uses the default font size for the current
+ platform.
+ */
+ wxFontInfo();
+
+ /**
+ Constructor setting the font size in points to use.
+
+ @see wxFont::SetPointSize()
+ */
+ explicit wxFontInfo(int pointSize);
+
+ /**
+ Constructor setting the font size in pixels to use.
+
+ @see wxFont::SetPixelSize()
+ */
+ explicit wxFontInfo(const wxSize& pixelSize);
+
+ /**
+ Set the font family.
+
+ The family is a generic portable way of referring to fonts without
+ specifying a precise face name. This parameter must be one of the
+ ::wxFontFamily enumeration values.
+
+ If the FaceName() is used, then it overrides the font family.
+
+ @see wxFont::SetFamily()
+ */
+ wxFontInfo& Family(wxFontFamily family);
+
+ /**
+ Set the font face name to use.
+
+ Face names are not portable, so prefer to use Family() in portable
+ code.
+
+ @see wxFont::SetFaceName()
+ */
+ wxFontInfo& FaceName(const wxString& faceName);
+
+ /**
+ Use a bold version of the font.
+
+ @see ::wxFontWeight, wxFont::SetWeight()
+ */
+ wxFontInfo& Bold(bool bold = true);
+
+ /**
+ Use a lighter version of the font.
+
+ @see ::wxFontWeight, wxFont::SetWeight()
+ */
+ wxFontInfo& Light(bool light = true);
+
+ /**
+ Use an italic version of the font.
+
+ @see ::wxFontStyle, wxFont::SetStyle()
+ */
+ wxFontInfo& Italic(bool italic = true);
+
+ /**
+ Use a slanted version of the font.
+
+ @see ::wxFontStyle, wxFont::SetStyle()
+ */
+ wxFontInfo& Slant(bool slant = true);
+
+ /**
+ Set anti-aliasing flag.
+
+ Force the use of anti-aliasing on or off.
+
+ Currently this is not implemented, i.e. using this method doesn't do
+ anything.
+ */
+ wxFontInfo& AntiAliased(bool antiAliased = true);
+
+ /**
+ Use an underlined version of the font.
+ */
+ wxFontInfo& Underlined(bool underlined = true);
+
+ /**
+ Use a strike-through version of the font.
+
+ Currently this is only implemented in wxMSW and wxGTK.
+ */
+ wxFontInfo& Strikethrough(bool strikethrough = true);
+
+ /**
+ Set the font encoding to use.
+
+ This is mostly unneeded in Unicode builds of wxWidgets.
+
+ @see ::wxFontEncoding, wxFont::SetEncoding()
+ */
+ wxFontInfo& Encoding(wxFontEncoding encoding);
+
+ /**
+ Set all the font attributes at once.
+
+ See ::wxFontFlag for the various flags that can be used.
+ */
+ wxFontInfo& AllFlags(int flags);
+};
+