diff --git a/include/wx/itemattr.h b/include/wx/itemattr.h index 90ae149d85..3a77cdaded 100644 --- a/include/wx/itemattr.h +++ b/include/wx/itemattr.h @@ -39,6 +39,9 @@ public: bool HasBackgroundColour() const { return m_colBack.IsOk(); } bool HasFont() const { return m_font.IsOk(); } + bool HasColours() const { return HasTextColour() || HasBackgroundColour(); } + bool IsDefault() const { return !HasColours() && !HasFont(); } + const wxColour& GetTextColour() const { return m_colText; } const wxColour& GetBackgroundColour() const { return m_colBack; } const wxFont& GetFont() const { return m_font; } diff --git a/interface/wx/itemattr.h b/interface/wx/itemattr.h index 49e72bd510..d47c618e68 100644 --- a/interface/wx/itemattr.h +++ b/interface/wx/itemattr.h @@ -17,7 +17,7 @@ @see @ref overview_listctrl - @since 3.1.1 (previous versions had the identical wxListItemAttr class) + @since 3.1.1 (previous versions had a similar wxListItemAttr class) */ class wxItemAttr { @@ -55,6 +55,13 @@ public: */ bool HasBackgroundColour() const; + /** + Returns @true if either text or background colour is set. + + @see HasBackgroundColour(), HasTextColour() + */ + bool HasColours() const; + /** Returns @true if the currently set font is valid. */ @@ -65,6 +72,11 @@ public: */ bool HasTextColour() const; + /** + Returns @true if this object has no custom attributes set. + */ + bool IsDefault() const; + /** Sets a new background color. */