renamed wxWindow::Clear() to ClearBackground() (fixes bug 783576)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-08-13 14:09:45 +00:00
parent 339963e0d0
commit 5da0803c15
19 changed files with 29 additions and 87 deletions

View File

@@ -531,11 +531,6 @@ bool wxWindow::SetFont(const wxFont& font)
return TRUE;
}
void wxWindow::Clear()
{
// TODO
}
static int CocoaRaiseWindowCompareFunction(id first, id second, void *target)
{
// first should be ordered higher

View File

@@ -977,6 +977,17 @@ bool wxWindowBase::IsExposed(int x, int y, int w, int h) const
return m_updateRegion.Contains(x, y, w, h) != wxOutRegion;
}
void wxWindowBase::ClearBackground()
{
// wxGTK uses its own version, no need to add never used code
#ifndef __WXGTK__
wxClientDC dc((wxWindow *)this);
wxBrush brush(GetBackgroundColour(), wxSOLID);
dc.SetBackground(brush);
dc.Clear();
#endif // __WXGTK__
}
// ----------------------------------------------------------------------------
// find child window by id or name
// ----------------------------------------------------------------------------

View File

@@ -1351,14 +1351,6 @@ void wxWindowMac::OnSetFocus(wxFocusEvent& event)
event.Skip();
}
void wxWindowMac::Clear()
{
wxClientDC dc(this);
wxBrush brush(GetBackgroundColour(), wxSOLID);
dc.SetBackground(brush);
dc.Clear();
}
// Setup background and foreground colours correctly
void wxWindowMac::SetupColours()
{

View File

@@ -1351,14 +1351,6 @@ void wxWindowMac::OnSetFocus(wxFocusEvent& event)
event.Skip();
}
void wxWindowMac::Clear()
{
wxClientDC dc(this);
wxBrush brush(GetBackgroundColour(), wxSOLID);
dc.SetBackground(brush);
dc.Clear();
}
// Setup background and foreground colours correctly
void wxWindowMac::SetupColours()
{

View File

@@ -1577,14 +1577,6 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
XSendEvent(display, thisWindow, False, ExposureMask, (XEvent *)&dummyEvent);
}
void wxWindow::Clear()
{
wxClientDC dc(this);
wxBrush brush(GetBackgroundColour(), wxSOLID);
dc.SetBackground(brush);
dc.Clear();
}
void wxWindow::DoPaint()
{
//TODO : make a temporary gc so we can do the XCopyArea below

View File

@@ -49,19 +49,13 @@ WX_DECLARE_HASH_MAP( long,
wxTimerMap wxTimerList;
void WINAPI _EXPORT wxTimerProc(HWND hwnd, WORD, int idTimer, DWORD);
void WINAPI wxTimerProc(HWND hwnd, WORD, int idTimer, DWORD);
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
#ifdef __WIN32__
#define _EXPORT
#else
#define _EXPORT _export
#endif
// should probably be in wx/msw/private.h
// should probably be in wx/msw/missing.h
#ifdef __WXMICROWIN__
#define MakeProcInstance(proc, hinst) proc
#endif
@@ -149,7 +143,7 @@ void wxProcessTimer(wxTimer& timer)
timer.Notify();
}
void WINAPI _EXPORT wxTimerProc(HWND WXUNUSED(hwnd), WORD, int idTimer, DWORD)
void WINAPI wxTimerProc(HWND WXUNUSED(hwnd), WORD, int idTimer, DWORD)
{
wxTimerMap::iterator node = wxTimerList.find((long)idTimer);
@@ -157,8 +151,7 @@ void WINAPI _EXPORT wxTimerProc(HWND WXUNUSED(hwnd), WORD, int idTimer, DWORD)
wxASSERT_MSG( node != wxTimerList.end(), wxT("bogus timer id in wxTimerProc") );
wxProcessTimer(*(node->second));
// return 0;
}
#endif // wxUSE_TIMER

View File

@@ -1297,14 +1297,6 @@ bool wxWindowMSW::Reparent(wxWindowBase *parent)
return TRUE;
}
void wxWindowMSW::Clear()
{
wxClientDC dc((wxWindow *)this);
wxBrush brush(GetBackgroundColour(), wxSOLID);
dc.SetBackground(brush);
dc.Clear();
}
static inline void SendSetRedraw(HWND hwnd, bool on)
{
#ifndef __WXMICROWIN__

View File

@@ -1385,17 +1385,6 @@ bool wxWindowOS2::Reparent(
return TRUE;
} // end of wxWindowOS2::Reparent
void wxWindowOS2::Clear()
{
wxClientDC vDc((wxWindow*)this);
wxBrush vBrush( GetBackgroundColour()
,wxSOLID
);
vDc.SetBackground(vBrush);
vDc.Clear();
} // end of wxWindowOS2::Clear
void wxWindowOS2::Update()
{
::WinUpdateWindow(GetHwnd());

View File

@@ -1163,14 +1163,6 @@ void wxWindowX11::Update()
}
}
void wxWindowX11::Clear()
{
// wxClientDC dc((wxWindow*) this);
// wxBrush brush(GetBackgroundColour(), wxSOLID);
// dc.SetBackground(brush);
// dc.Clear();
}
void wxWindowX11::SendEraseEvents()
{
if (m_clearRegion.IsEmpty()) return;