]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
fixed typo
[wxWidgets.git] / include / wx / window.h
index fc3f46dbc0d60870762c2b3b3f00bcc64d3c1e0b..73411b216767cde9c3521f0c679e188f7a5c3336 100644 (file)
@@ -131,6 +131,12 @@ enum wxShowEffect
     wxSHOW_EFFECT_MAX
 };
 
+// flags for SendSizeEvent()
+enum
+{
+    wxSEND_EVENT_POST = 1
+};
+
 // ----------------------------------------------------------------------------
 // (pseudo)template list classes
 // ----------------------------------------------------------------------------
@@ -528,8 +534,35 @@ public:
     // stretch over several lines). Parameter availableOtherDir
     // tells the item how much more space there is available in the opposite
     // direction (-1 if unknown).
-    virtual bool InformFirstDirection( int WXUNUSED(direction), int WXUNUSED(size), int WXUNUSED(availableOtherDir) )
-    { return false; }
+    virtual bool
+    InformFirstDirection(int WXUNUSED(direction),
+                         int WXUNUSED(size),
+                         int WXUNUSED(availableOtherDir))
+    {
+        return false;
+    }
+
+    // sends a size event to the window using its current size -- this has an
+    // effect of refreshing the window layout
+    //
+    // by default the event is sent, i.e. processed immediately, but if flags
+    // value includes wxSEND_EVENT_POST then it's posted, i.e. only schedule
+    // for later processing
+    virtual void SendSizeEvent(int flags = 0);
+
+    // this is a safe wrapper for GetParent()->SendSizeEvent(): it checks that
+    // we have a parent window and it's not in process of being deleted
+    //
+    // this is used by controls such as tool/status bars changes to which must
+    // also result in parent re-layout
+    void SendSizeEventToParent(int flags = 0);
+
+    // this is a more readable synonym for SendSizeEvent(wxSEND_EVENT_POST)
+    void PostSizeEvent() { SendSizeEvent(wxSEND_EVENT_POST); }
+
+    // this is the same as SendSizeEventToParent() but using PostSizeEvent()
+    void PostSizeEventToParent() { SendSizeEventToParent(wxSEND_EVENT_POST); }
+
 
     // window state
     // ------------