+// ----------------------------------------------------------------------------
+// wxTextAttr: a structure containing the visual attributes of a text
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTextAttr
+{
+public:
+ // ctors
+ wxTextAttr() { }
+ wxTextAttr(const wxColour& colText,
+ const wxColour& colBack = wxNullColour,
+ const wxFont& font = wxNullFont)
+ : m_colText(colText), m_colBack(colBack), m_font(font) { }
+
+ // setters
+ void SetTextColour(const wxColour& colText) { m_colText = colText; }
+ void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
+ void SetFont(const wxFont& font) { m_font = font; }
+
+ // accessors
+ bool HasTextColour() const { return m_colText.Ok(); }
+ bool HasBackgroundColour() const { return m_colBack.Ok(); }
+ bool HasFont() const { return m_font.Ok(); }
+
+ // setters
+ const wxColour& GetTextColour() const { return m_colText; }
+ const wxColour& GetBackgroundColour() const { return m_colBack; }
+ const wxFont& GetFont() const { return m_font; }
+
+ // returns false if we have any attributes set, true otherwise
+ bool IsDefault() const
+ {
+ return !HasTextColour() && !HasBackgroundColour() && !HasFont();
+ }
+
+private:
+ wxColour m_colText,
+ m_colBack;
+ wxFont m_font;
+};
+