From edb22d6af17ccea7bf6b224cea1547f7e11cf033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 11 Oct 2002 22:22:06 +0000 Subject: [PATCH] added wxHtmlContainerCell::GetBackgroundColour (needed for e.g. widgets rendering) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/htcontnr.tex | 7 +++++++ include/wx/html/htmlcell.h | 3 +++ src/html/htmlcell.cpp | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/docs/latex/wx/htcontnr.tex b/docs/latex/wx/htcontnr.tex index a723a4420d..6739b4d0fd 100644 --- a/docs/latex/wx/htcontnr.tex +++ b/docs/latex/wx/htcontnr.tex @@ -41,6 +41,13 @@ Returns container's horizontal alignment. Returns container's vertical alignment. +\membersection{wxHtmlContainerCell::GetBackgroundColour}\label{wxhtmlcontainercellgetbackgroundcolour} + +\func{wxColour}{GetBackgroundColour}{\void} + +Returns the background colour of the container or {\tt wxNullColour} if no background +colour is set. + \membersection{wxHtmlContainerCell::GetFirstCell}\label{wxhtmlcontainercellgetfirstcell} \func{wxHtmlCell*}{GetFirstCell}{\void} diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h index e2760ab1f8..eb2b4bee51 100644 --- a/include/wx/html/htmlcell.h +++ b/include/wx/html/htmlcell.h @@ -219,6 +219,9 @@ public: void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;} void SetBackgroundColour(const wxColour& clr) {m_UseBkColour = TRUE; m_BkColour = clr;} + // returns background colour (of wxNullColour if none set), so that widgets can + // adapt to it: + wxColour GetBackgroundColour(); void SetBorder(const wxColour& clr1, const wxColour& clr2) {m_UseBorder = TRUE; m_BorderColour1 = clr1, m_BorderColour2 = clr2;} virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const; virtual const wxHtmlCell* Find(int condition, const void* param) const; diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 6a7f93f0c0..d2abdf0862 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -465,6 +465,15 @@ void wxHtmlContainerCell::DrawInvisible(wxDC& dc, int x, int y) } +wxColour wxHtmlContainerCell::GetBackgroundColour() +{ + if (m_UseBkColour) + return m_BkColour; + else + return wxNullColour; +} + + wxHtmlLinkInfo *wxHtmlContainerCell::GetLink(int x, int y) const {