diff --git a/include/wx/window.h b/include/wx/window.h index 86a0890f0c..36ef7126dc 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1127,6 +1127,10 @@ public: { return m_hasBgCol; } + bool UseBackgroundColour() const + { + return UseBgCol(); + } virtual bool SetForegroundColour(const wxColour& colour); void SetOwnForegroundColour(const wxColour& colour) @@ -1135,6 +1139,14 @@ public: m_inheritFgCol = false; } wxColour GetForegroundColour() const; + bool UseForegroundColour() const + { + return m_hasFgCol; + } + bool InheritsForgroundColour() const + { + return m_inheritFgCol; + } // Set/get the background style. virtual bool SetBackgroundStyle(wxBackgroundStyle style); diff --git a/interface/wx/window.h b/interface/wx/window.h index 9f57e9fc2f..0fa2a58c50 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -2216,6 +2216,12 @@ public: */ bool UseBgCol() const; + /** + Return @true if a background colour has been set for this window. + Same as @ref UseBgCol() + */ + bool UseBackgroundColour() const; + /** Sets the font of the window but prevents it from being inherited by the children of this window. @@ -2232,6 +2238,18 @@ public: */ void SetOwnForegroundColour(const wxColour& colour); + /** + Return @true if a foreground colour has been set for this window. + */ + bool UseForegroundColour() const; + + /** + Return @true if this window inherits the foreground colour from its parent. + + @see SetOwnForegroundColour(), InheritAttributes() + */ + bool InheritsForegroundColour() const; + /** @deprecated use wxDC::SetPalette instead. */