Add wxItemAttr::HasColours() and IsDefault() accessors

They are trivial but useful to have as testing for HasBackgroundColour() ||
HasTextColour() || HasFont() is too verbose.
This commit is contained in:
Vadim Zeitlin
2016-04-17 17:19:20 +02:00
parent c15f75b81d
commit e84053ed64
2 changed files with 16 additions and 1 deletions

View File

@@ -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; }