From 8cfa09bdab8259c656927f80d7ff918c2482c537 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Jan 2005 16:56:15 +0000 Subject: [PATCH] added eraseBg argument to RefreshRect() too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/window.tex | 8 +++++--- include/wx/window.h | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 5fd8e56ab2..70971eeb88 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -2228,12 +2228,14 @@ be treated as damaged.} \membersection{wxWindow::RefreshRect}\label{wxwindowrefreshrect} -\func{void}{RefreshRect}{\param{const wxRect\& }{rect}} +\func{void}{RefreshRect}{\param{const wxRect\& }{rect}, \param{bool }{eraseBackground = \true}} -Redraws the contents of the given rectangle: the area inside it will be +Redraws the contents of the given rectangle: only the area inside it will be repainted. -This is the same as \helpref{Refresh}{wxwindowrefresh} but has a nicer syntax. +This is the same as \helpref{Refresh}{wxwindowrefresh} but has a nicer syntax +as it can be called with a temporary wxRect object as argument like this +\texttt{RefreshRect(wxRect(x, y, w, h))}. \membersection{wxWindow::RegisterHotKey}\label{wxwindowregisterhotkey} diff --git a/include/wx/window.h b/include/wx/window.h index 50fae004cd..5396fe59ee 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -692,7 +692,10 @@ public: const wxRect *rect = (const wxRect *) NULL ) = 0; // a less awkward wrapper for Refresh - void RefreshRect(const wxRect& rect) { Refresh(true, &rect); } + void RefreshRect(const wxRect& rect, bool eraseBackground = true) + { + Refresh(eraseBackground, &rect); + } // repaint all invalid areas of the window immediately virtual void Update() { } -- 2.45.2