X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee6eb8d8ca94f53b78d89494210f1587d6707580..321239b6c4cbb7eb9f5ef1c27f69709f2d762bf4:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index be19ab6146..d38042bda3 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "windowbase.h" #endif @@ -331,9 +331,6 @@ bool wxWindowBase::Close(bool force) { wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); event.SetEventObject(this); -#if WXWIN_COMPATIBILITY - event.SetForce(force); -#endif // WXWIN_COMPATIBILITY event.SetCanVeto(!force); // return FALSE if window wasn't closed because the application vetoed the @@ -977,6 +974,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 // ---------------------------------------------------------------------------- @@ -2141,10 +2149,9 @@ void wxWindowBase::SendDestroyEvent() // event processing // ---------------------------------------------------------------------------- -#if wxUSE_VALIDATORS - bool wxWindowBase::TryValidator(wxEvent& event) { +#if wxUSE_VALIDATORS // Can only use the validator of the window which // is receiving the event if ( event.GetEventObject() == this ) @@ -2152,15 +2159,14 @@ bool wxWindowBase::TryValidator(wxEvent& event) wxValidator *validator = GetValidator(); if ( validator && validator->ProcessEvent(event) ) { - return TRUE; + return true; } } +#endif // wxUSE_VALIDATORS - return FALSE; + return false; } -#endif // wxUSE_VALIDATORS - bool wxWindowBase::TryParent(wxEvent& event) { // carry on up the parent-child hierarchy if the propgation count hasn't