]> git.saurik.com Git - wxWidgets.git/commitdiff
Change wxDIALOG_NO_PARENT value to avoid clashing with wxCENTRE.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 May 2010 21:10:03 +0000 (21:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 May 2010 21:10:03 +0000 (21:10 +0000)
Use a bit freed by removing wxTINY_CAPTION_HORIZ for wxDIALOG_NO_PARENT. This
allows to move it out from the lower byte of the style word to avoid conflicts
with the button selection flags which can be commonly combined with the dialog
styles.

More precisely, wxDIALOG_NO_PARENT used to clash with wxCENTRE, meaning that
wxSingleChoiceDialog, for example, was always created without parent because
its default style included wxCENTRE. This commit fixes this particular bug and
probably more similar ones.

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

include/wx/dialog.h
include/wx/toplevel.h

index d8eba543a14a98cdb413cbf0fbc95fd165c59947..d105144618630e754dbe328b2c830bde820c3298 100644 (file)
@@ -25,7 +25,7 @@ class WXDLLIMPEXP_FWD_CORE wxScrolledWindow;
 
 // Also see the bit summary table in wx/toplevel.h.
 
-#define wxDIALOG_NO_PARENT      0x0001  // Don't make owned by apps top window
+#define wxDIALOG_NO_PARENT      0x0100  // Don't make owned by apps top window
 
 #ifdef __WXWINCE__
 #define wxDEFAULT_DIALOG_STYLE  (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER)
index b70a6466a7f79fb88e719ccdd5dc6eeef1ae56d6..8fcb9830d95a4dc431ad2db73c0c7012edf9185c 100644 (file)
@@ -40,7 +40,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
     |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
       |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
-      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  \_ wxDIALOG_NO_PARENT
+      |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  \_ wxCENTRE
       |  |  |  |  |  |  |  |  |  |  |  |  |  |  \____ wxFRAME_NO_TASKBAR
       |  |  |  |  |  |  |  |  |  |  |  |  |  \_______ wxFRAME_TOOL_WINDOW
       |  |  |  |  |  |  |  |  |  |  |  |  \__________ wxFRAME_FLOAT_ON_PARENT
@@ -48,7 +48,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
       |  |  |  |  |  |  |  |  |  |  \________________
       |  |  |  |  |  |  |  |  |  \___________________ wxRESIZE_BORDER
       |  |  |  |  |  |  |  |  \______________________ wxTINY_CAPTION_VERT
-      |  |  |  |  |  |  |  \_________________________
+      |  |  |  |  |  |  |  \_________________________ wxDIALOG_NO_PARENT
       |  |  |  |  |  |  \____________________________ wxMAXIMIZE_BOX
       |  |  |  |  |  \_______________________________ wxMINIMIZE_BOX
       |  |  |  |  \__________________________________ wxSYSTEM_MENU
@@ -62,6 +62,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
     bits (wxYES, wxOK wxNO, wxCANCEL, wxAPPLY, wxCLOSE and wxNO_DEFAULT) which
     can be combined with the dialog style for several standard dialogs and
     hence shouldn't overlap with any styles which can be used for the dialogs.
+    Additionally, wxCENTRE can be used with frames also.
  */
 
 // style common to both wxFrame and wxDialog