]> git.saurik.com Git - wxWidgets.git/commitdiff
Give SendSizeEvent a generic implementation. It can be useful on
authorRobin Dunn <robin@alldunn.com>
Fri, 19 Nov 2004 19:20:01 +0000 (19:20 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 19 Nov 2004 19:20:01 +0000 (19:20 +0000)
non-MSW platforms as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/frame.h
src/common/framecmn.cpp

index bd7cc361d6dfdaf00ba18bb755c284cf1658d09d..9b857d9f4b0a76d64728d753915ed48312aa9ad4 100644 (file)
@@ -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
     // ------------------
index bdd5dc26d1649e8c1ee4f40b80a0fb254bad5bca..0020580068af974a7aa254ebdabaffec33cf8ae7 100644 (file)
@@ -176,6 +176,15 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const
     return pt;
 }
 
+
+void wxFrameBase::SendSizeEvent()
+{
+    wxSizeEvent event( GetSize(), GetId() );
+    event.SetEventObject( this );
+    GetEventHandler()->AddPendingEvent( event );
+}
+
+
 // ----------------------------------------------------------------------------
 // misc
 // ----------------------------------------------------------------------------