From: Vadim Zeitlin Date: Mon, 10 May 2010 21:09:50 +0000 (+0000) Subject: No changes, just added comments summarizing the use of style bits. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f16fad90b29dce3b7714b2fe4cf3ecdf77fda308 No changes, just added comments summarizing the use of style bits. Add comments allowing to see more clearly the styles allocation. Please make sure to amend them if you change any style values in the future. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index b3819c09aa..88e0bd9979 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1557,12 +1557,40 @@ enum wxBorder * Some styles are used across more than one group, * so the values mustn't clash with others in the group. * Otherwise, numbers can be reused across groups. - * - * From version 1.66: - * Window (cross-group) styles now take up the first half - * of the flag, and control-specific styles the - * second half. - * + */ + +/* + Summary of the bits used by various styles. + + High word, containing styles which can be used with many windows: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16| + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | \_ wxFULL_REPAINT_ON_RESIZE + | | | | | | | | | | | | | | \____ wxPOPUP_WINDOW + | | | | | | | | | | | | | \_______ wxWANTS_CHARS + | | | | | | | | | | | | \__________ wxTAB_TRAVERSAL + | | | | | | | | | | | \_____________ wxTRANSPARENT_WINDOW + | | | | | | | | | | \________________ wxBORDER_NONE + | | | | | | | | | \___________________ wxCLIP_CHILDREN + | | | | | | | | \______________________ wxALWAYS_SHOW_SB + | | | | | | | \_________________________ wxBORDER_STATIC + | | | | | | \____________________________ wxBORDER_SIMPLE + | | | | | \_______________________________ wxBORDER_RAISED + | | | | \__________________________________ wxBORDER_SUNKEN + | | | \_____________________________________ wxBORDER_{DOUBLE,THEME} + | | \________________________________________ wxCAPTION/wxCLIP_SIBLINGS + | \___________________________________________ wxHSCROLL + \______________________________________________ wxVSCROLL + + + Low word style bits is class-specific meaning that the same bit can have + different meanings for different controls (e.g. 0x10 is wxCB_READONLY + meaning that the control can't be modified for wxComboBox but wxLB_SORT + meaning that the control should be kept sorted for wxListBox, while + wxLB_SORT has a different value -- and this is just fine). */ /* diff --git a/include/wx/dialog.h b/include/wx/dialog.h index bcdbeecaee..d8eba543a1 100644 --- a/include/wx/dialog.h +++ b/include/wx/dialog.h @@ -23,6 +23,8 @@ class WXDLLIMPEXP_FWD_CORE wxDialog; class WXDLLIMPEXP_FWD_CORE wxButton; 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 #ifdef __WXWINCE__ diff --git a/include/wx/frame.h b/include/wx/frame.h index 80c563728f..e39c17f22e 100644 --- a/include/wx/frame.h +++ b/include/wx/frame.h @@ -34,6 +34,8 @@ class WXDLLIMPEXP_FWD_CORE wxToolBar; // ---------------------------------------------------------------------------- // wxFrame-specific (i.e. not for wxDialog) styles +// +// Also see the bit summary table in wx/toplevel.h. #define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only) #define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu #define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index cce46ab1cb..99e7a99345 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -32,6 +32,38 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase; // constants // ---------------------------------------------------------------------------- +/* + Summary of the bits used (some of them are defined in wx/frame.g and + wx/dialog.h and not here): + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | \_ wxDIALOG_NO_PARENT + | | | | | | | | | | | | | | \____ wxFRAME_NO_TASKBAR + | | | | | | | | | | | | | \_______ wxFRAME_TOOL_WINDOW + | | | | | | | | | | | | \__________ wxFRAME_FLOAT_ON_PARENT + | | | | | | | | | | | \_____________ wxFRAME_SHAPED + | | | | | | | | | | \________________ + | | | | | | | | | \___________________ wxRESIZE_BORDER + | | | | | | | | \______________________ wxTINY_CAPTION_VERT + | | | | | | | \_________________________ wxTINY_CAPTION_HORIZ + | | | | | | \____________________________ wxMAXIMIZE_BOX + | | | | | \_______________________________ wxMINIMIZE_BOX + | | | | \__________________________________ wxSYSTEM_MENU + | | | \_____________________________________ wxCLOSE_BOX + | | \________________________________________ wxMAXIMIZE + | \___________________________________________ wxMINIMIZE + \______________________________________________ wxSTAY_ON_TOP + + + Notice that the 8 lower bits overlap with wxCENTRE and the button selection + 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. + */ + // style common to both wxFrame and wxDialog #define wxSTAY_ON_TOP 0x8000 #define wxICONIZE 0x4000