// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "windowbase.h"
#endif
{
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
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
// ----------------------------------------------------------------------------
// 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 )
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