]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/utils.h
compilation fix: remove wxRegionContain enum which is now defined in wx/region.h...
[wxWidgets.git] / include / wx / utils.h
index 1141a3004e16f6aa1fdbc0e14e20912793b49390..237793b05d91610f38f9774c8fa783ce80008a18 100644 (file)
@@ -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;