]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxSIZE_FORCE flag for SetSize()
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 11 Aug 2005 13:21:45 +0000 (13:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 11 Aug 2005 13:21:45 +0000 (13:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/window.tex
include/wx/defs.h
src/msw/window.cpp

index 7fdb71cc7f7b9bcbe7db185152248cb0077f8c9c..5e6a220f58bded00448d17a278d518d6ace0b49b 100644 (file)
@@ -3133,16 +3133,20 @@ value should be used.}
 
 \docparam{sizeFlags}{Indicates the interpretation of other parameters. It is a bit list of the following:
 
-{\bf wxSIZE\_AUTO\_WIDTH}: a -1 width value is taken to indicate
+{\bf wxSIZE\_AUTO\_WIDTH}: a $-1$ width value is taken to indicate
 a wxWidgets-supplied default width.\\
-{\bf wxSIZE\_AUTO\_HEIGHT}: a -1 height value is taken to indicate
+{\bf wxSIZE\_AUTO\_HEIGHT}: a $-1$ height value is taken to indicate
 a wxWidgets-supplied default width.\\
 {\bf wxSIZE\_AUTO}: -1 size values are taken to indicate
 a wxWidgets-supplied default size.\\
 {\bf wxSIZE\_USE\_EXISTING}: existing dimensions should be used
 if -1 values are supplied.\\
-{\bf wxSIZE\_ALLOW\_MINUS\_ONE}: allow dimensions of -1 and less to be interpreted
+{\bf wxSIZE\_ALLOW\_MINUS\_ONE}: allow dimensions of $-1$ and less to be interpreted
 as real dimensions, not default values.
+{\bf wxSIZE\_FORCE}: normally, if the position and the size of the window are
+already the same as the parameters of this function, nothing is done. but with
+this flag a window resize may be forced even in this case (supported in wx
+2.6.2 and later and only implemented for MSW and ignored elsewhere currently)
 }
 
 \wxheading{Remarks}
index 3bf1cd275e0309985ea435d80e0e5a89768b9fc0..ba94f1e06622f5f79874cd570d106a01ed8da9fa 100644 (file)
@@ -1802,6 +1802,11 @@ enum wxHitTest
 /*  Don't do parent client adjustments (for implementation only) */
 #define wxSIZE_NO_ADJUSTMENTS   0x0008
 
+#if wxABI_VERSION >= 20602
+/*  Change the window position even if it seems to be already correct */
+#define wxSIZE_FORCE            0x0010
+#endif // 2.6.2+
+
 /*  ---------------------------------------------------------------------------- */
 /*  GDI descriptions */
 /*  ---------------------------------------------------------------------------- */
index e01ee082b2c22f496d4b0bf5b724047ff7274dae..50f56cd2a7bb57d6287896044e27b8b2cfdea276 100644 (file)
@@ -1646,9 +1646,11 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
     GetPosition(&currentX, &currentY);
     GetSize(&currentW, &currentH);
 
-    // ... and don't do anything (avoiding flicker) if it's already ok
+    // ... and don't do anything (avoiding flicker) if it's already ok unless
+    // we're forced to resize the window
     if ( x == currentX && y == currentY &&
-         width == currentW && height == currentH )
+         width == currentW && height == currentH &&
+            !(sizeFlags & wxSIZE_FORCE) )
     {
         return;
     }