From a4f25aef35e0fce933eb3600cf68f3a0fc06fe96 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Thu, 22 Aug 2002 17:03:38 +0000
Subject: [PATCH] made wxFrame::SendSizeEvent() public and documented it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/frame.tex | 13 +++++++++++++
 include/wx/frame.h      |  7 +++++++
 include/wx/msw/frame.h  |  2 +-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex
index 000b1fb00d..34da3e6021 100644
--- a/docs/latex/wx/frame.tex
+++ b/docs/latex/wx/frame.tex
@@ -423,6 +423,19 @@ is required (for example, if there are several subwindows).
 
 See \helpref{wxSizeEvent}{wxsizeevent}.
 
+\membersection{wxFrame::SendSizeEvent}\label{wxframesendsizeevent}
+
+\func{void}{SendSizeEvent}{\void}
+
+This function sends a dummy \helpref{size event}{wxsizeevent} to the frame
+forcing it to reevaluate its children positions. It is sometimes useful to call
+this function after adding or deleting a children after the frame creation or
+if a child size changes.
+
+Note that if the frame is using either sizers or constraints for the children
+layout, it is enough to call \helpref{Layout()}{wxwindowlayout} directly and
+this function should not be used in this case.
+
 \membersection{wxFrame::SetIcon}\label{wxframeseticon}
 
 \func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
diff --git a/include/wx/frame.h b/include/wx/frame.h
index 0735c82f8a..bb19f5a4da 100644
--- a/include/wx/frame.h
+++ b/include/wx/frame.h
@@ -71,6 +71,13 @@ public:
     // if the frame has a toolbar) in client coordinates
     virtual wxPoint GetClientAreaOrigin() const;
 
+    // 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() { }
+
     // menu bar functions
     // ------------------
 
diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h
index 4b4b657d2f..109be748ee 100644
--- a/include/wx/msw/frame.h
+++ b/include/wx/msw/frame.h
@@ -100,7 +100,7 @@ public:
 
     // a MSW only function which sends a size event to the window using its
     // current size - this has an effect of refreshing the window layout
-    void SendSizeEvent();
+    virtual void SendSizeEvent();
 
 protected:
     // common part of all ctors
-- 
2.50.0

