wxFONTFLAG_ANTIALIASED = 1 << 4,
wxFONTFLAG_NOT_ANTIALIASED = 1 << 5,
- /// underlined/strikethrough flags (default: no lines)
+ /// Underlined style (not underlined by default).
wxFONTFLAG_UNDERLINED = 1 << 6,
+
+ /// Strike-through style (only supported in wxMSW and wxGTK currently).
wxFONTFLAG_STRIKETHROUGH = 1 << 7,
/// the mask of all currently used flags
wxFont(const wxFont& font);
/**
- Creates a font object with the specified attributes.
+ Creates a font object with the specified attributes and size in points.
@param pointSize
Size in points. See SetPointSize() for more info.
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
/**
- Creates a font object with the specified attributes.
+ Creates a font object with the specified attributes and size in pixels.
@param pixelSize
Size in pixels. See SetPixelSize() for more info.
const wxString& faceName = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ /**
+ Creates a font object using font flags.
+
+ This constructor is similar to the constructors above except it
+ specifies the font styles such as underlined, italic, bold, ... in a
+ single @a flags argument instead of using separate arguments for them.
+ This parameter can be a combination of ::wxFontFlag enum elements.
+ The meaning of the remaining arguments is the same as in the other
+ constructors, please see their documentation for details.
+
+ Notice that this constructor provides the only way of creating fonts
+ with strike-through style.
+
+ @since 2.9.4
+ */
+ wxFont(int pointSize, wxFontFamily family, int flags,
+ const wxString& faceName = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+
/**
Constructor from font description string.
*/
virtual bool GetUnderlined() const;
+ /**
+ Returns @true if the font is stricken-through, @false otherwise.
+
+ @see SetStrikethrough()
+
+ @since 2.9.4
+ */
+ virtual bool GetStrikethrough() const;
+
/**
Gets the font weight. See ::wxFontWeight for a list of valid weight identifiers.
*/
wxFont Underlined() const;
+ /**
+ Returns stricken-through version of this font.
+
+ Currently stricken-through fonts are only supported in wxMSW and wxGTK.
+
+ @see MakeStrikethrough()
+
+ @since 2.9.4
+ */
+ wxFont Strikethrough() const;
+
/**
Changes this font to be bold.
*/
wxFont& MakeUnderlined();
+ /**
+ Changes this font to be stricken-through.
+
+ Currently stricken-through fonts are only supported in wxMSW and wxGTK.
+
+ @see Strikethrough()
+
+ @since 2.9.4
+ */
+ wxFont& MakeStrikethrough();
+
/**
Changes the size of this font.
*/
virtual void SetUnderlined(bool underlined);
+ /**
+ Sets strike-through attribute of the font.
+
+ Currently stricken-through fonts are only supported in wxMSW and wxGTK.
+
+ @param strikethrough
+ @true to add strike-through style, @false to remove it.
+
+ @see GetStrikethrough()
+
+ @since 2.9.4
+ */
+ virtual void SetStrikethrough(bool strikethrough);
+
/**
Sets the font weight.
@see wxSystemSettings
*/
-wxFont wxNORMAL_FONT;
+wxFont* wxNORMAL_FONT;
/**
A font using the @c wxFONTFAMILY_SWISS family and 2 points smaller than
::wxNORMAL_FONT.
*/
-wxFont wxSMALL_FONT;
+wxFont* wxSMALL_FONT;
/**
A font using the @c wxFONTFAMILY_ROMAN family and @c wxFONTSTYLE_ITALIC style and
of the same size of ::wxNORMAL_FONT.
*/
-wxFont wxITALIC_FONT;
+wxFont* wxITALIC_FONT;
/**
A font identic to ::wxNORMAL_FONT except for the family used which is
@c wxFONTFAMILY_SWISS.
*/
-wxFont wxSWISS_FONT;
+wxFont* wxSWISS_FONT;
/**