From: Robin Dunn Date: Fri, 19 Nov 2004 19:20:01 +0000 (+0000) Subject: Give SendSizeEvent a generic implementation. It can be useful on X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2b022169511792a75b3ae7fed895ea88d30e64af Give SendSizeEvent a generic implementation. It can be useful on non-MSW platforms as well. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/frame.h b/include/wx/frame.h index bd7cc361d6..9b857d9f4b 100644 --- a/include/wx/frame.h +++ b/include/wx/frame.h @@ -78,10 +78,7 @@ public: // sends a size event to the window using its current size -- this has an // effect of refreshing the window layout - // - // currently it is only implemented under MSW but is declared here to make - // it possible to call it in portable code without using #ifdef's - virtual void SendSizeEvent() { } + virtual void SendSizeEvent(); // menu bar functions // ------------------ diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index bdd5dc26d1..0020580068 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -176,6 +176,15 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const return pt; } + +void wxFrameBase::SendSizeEvent() +{ + wxSizeEvent event( GetSize(), GetId() ); + event.SetEventObject( this ); + GetEventHandler()->AddPendingEvent( event ); +} + + // ---------------------------------------------------------------------------- // misc // ----------------------------------------------------------------------------