]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/utils.h
moved combobox styles from defs.to to combobox.h; added wxTE/wxCB_FILENAME styles...
[wxWidgets.git] / include / wx / utils.h
index c9ee2b6182dfd4dd28030b983bc8dce46d2783f3..237793b05d91610f38f9774c8fa783ce80008a18 100644 (file)
@@ -249,14 +249,14 @@ private:
     wxCoord     m_x;
     wxCoord     m_y;
 
-    bool        m_leftDown;
-    bool        m_middleDown;
-    bool        m_rightDown;
-
-    bool        m_controlDown;
-    bool        m_shiftDown;
-    bool        m_altDown;
-    bool        m_metaDown;
+    bool        m_leftDown : 1;
+    bool        m_middleDown : 1;
+    bool        m_rightDown : 1;
+
+    bool        m_controlDown : 1;
+    bool        m_shiftDown : 1;
+    bool        m_altDown : 1;
+    bool        m_metaDown : 1;
 };
 
 
@@ -532,8 +532,29 @@ WXDLLIMPEXP_BASE bool wxGetDiskSpace(const wxString& path,
 // Menu accelerators related things
 // ----------------------------------------------------------------------------
 
-WXDLLEXPORT wxChar* wxStripMenuCodes(const wxChar *in, wxChar *out = (wxChar *) NULL);
-WXDLLEXPORT wxString wxStripMenuCodes(const wxString& str);
+// flags for wxStripMenuCodes
+enum
+{
+    // strip '&' characters
+    wxStrip_Mnemonics = 1,
+
+    // strip everything after '\t'
+    wxStrip_Accel = 2,
+
+    // strip everything (this is the default)
+    wxStrip_All = wxStrip_Mnemonics | wxStrip_Accel
+};
+
+// strip mnemonics and/or accelerators from the label
+WXDLLEXPORT wxString
+wxStripMenuCodes(const wxString& str, int flags = wxStrip_All);
+
+// obsolete and deprecated version, do not use
+#if WXWIN_COMPATIBILITY_2_6
+wxDEPRECATED(
+    WXDLLEXPORT wxChar* wxStripMenuCodes(const wxChar *in, wxChar *out = NULL)
+);
+#endif
 
 #if wxUSE_ACCEL
 class WXDLLEXPORT wxAcceleratorEntry;