X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0634700a96fb1ad8f808317193f807e3b276b730..51623cc53f350935337e57930eaaf1afe9a48c3b:/include/wx/font.h diff --git a/include/wx/font.h b/include/wx/font.h index 0a7623ee49..b14281221e 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -227,6 +227,7 @@ public: virtual wxFontStyle GetStyle() const = 0; virtual wxFontWeight GetWeight() const = 0; virtual bool GetUnderlined() const = 0; + virtual bool GetStrikethrough() const { return false; } virtual wxString GetFaceName() const = 0; virtual wxFontEncoding GetEncoding() const = 0; virtual const wxNativeFontInfo *GetNativeFontInfo() const = 0; @@ -244,6 +245,7 @@ public: virtual void SetWeight( wxFontWeight weight ) = 0; virtual void SetUnderlined( bool underlined ) = 0; + virtual void SetStrikethrough( bool WXUNUSED(strikethrough) ) {} virtual void SetEncoding(wxFontEncoding encoding) = 0; virtual bool SetFaceName( const wxString& faceName ); void SetNativeFontInfo(const wxNativeFontInfo& info) @@ -316,6 +318,10 @@ protected: return (flags & wxFONTFLAG_UNDERLINED) != 0; } + static bool GetStrikethroughFromFlags(int flags) + { + return (flags & wxFONTFLAG_STRIKETHROUGH) != 0; + } private: // the currently default encoding: by default, it's the default system @@ -356,6 +362,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font); wxFont& MakeBold(); \ wxFont& MakeItalic(); \ wxFont& MakeUnderlined(); \ + wxFont& MakeStrikethrough(); \ wxFont& MakeLarger() { return Scale(1.2f); } \ wxFont& MakeSmaller() { return Scale(1/1.2f); } \ wxFont& Scale(float x); \ @@ -363,6 +370,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font); wxFont Bold() const; \ wxFont Italic() const; \ wxFont Underlined() const; \ + wxFont Strikethrough() const; \ wxFont Larger() const { return Scaled(1.2f); } \ wxFont Smaller() const { return Scaled(1/1.2f); } \ wxFont Scaled(float x) const