- // default): Set functions return TRUE if colour was changed
- virtual bool SetBackgroundColour( const wxColour &colour );
- virtual bool SetForegroundColour( const wxColour &colour );
+ // default): SetXXX() functions return true if colour was changed,
+ // SetDefaultXXX() reset the "m_inheritXXX" flag after setting the
+ // value to prevent it from being inherited by our children
+ virtual bool SetBackgroundColour(const wxColour& colour);
+ void SetOwnBackgroundColour(const wxColour& colour)
+ {
+ if ( SetBackgroundColour(colour) )
+ m_inheritBgCol = false;
+ }
+ wxColour GetBackgroundColour() const;
+ bool InheritsBackgroundColour() const
+ {
+ return m_inheritBgCol;
+ }
+ bool UseBgCol() const
+ {
+ return m_hasBgCol;
+ }
+
+ virtual bool SetForegroundColour(const wxColour& colour);
+ void SetOwnForegroundColour(const wxColour& colour)
+ {
+ if ( SetForegroundColour(colour) )
+ m_inheritFgCol = false;
+ }
+ wxColour GetForegroundColour() const;
+
+ // Set/get the background style.
+ // Pass one of wxBG_STYLE_SYSTEM, wxBG_STYLE_COLOUR, wxBG_STYLE_CUSTOM
+ virtual bool SetBackgroundStyle(wxBackgroundStyle style) { m_backgroundStyle = style; return true; }
+ virtual wxBackgroundStyle GetBackgroundStyle() const { return m_backgroundStyle; }