]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/mnemonics.cpp
Add markup support to wxMSW wxButton and show it in the sample.
[wxWidgets.git] / src / gtk1 / mnemonics.cpp
index 4dd60f9e91bc3d42acf6fb8a70bf496057be7bda..a5da6497ee4ee0e0c577b3bdc94219ccfd400add 100644 (file)
 #endif
 
 #include "wx/log.h"
-#include "wx/private/stattext.h"        // for wxMarkupEntities
-
 #include "wx/gtk1/private/mnemonics.h"
 
+namespace
+{
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// Names of the standard XML entities.
+const char *const entitiesNames[] =
+{
+    "&", "<", ">", "'", """
+};
+
+} // anonymous namespace
+
 // ============================================================================
 // implementation
 // ============================================================================
@@ -67,9 +80,9 @@ static wxString GTKProcessMnemonics(const wxString& label, MnemonicsFlag flag)
                     size_t distanceFromEnd = label.end() - i;
 
                     // is this ampersand introducing a mnemonic or rather an entity?
-                    for (size_t j=0; j < wxMARKUP_ENTITY_MAX; j++)
+                    for (size_t j=0; j < WXSIZEOF(entitiesNames); j++)
                     {
-                        const wxChar *entity = wxMarkupEntities[wxMARKUP_ELEMENT_NAME][j];
+                        const char *entity = entitiesNames[j];
                         size_t entityLen = wxStrlen(entity);
 
                         if (distanceFromEnd >= entityLen &&