]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/menuitem.cpp
Last correction for makefile.g95: win32 mkdir does not like forward slashes as directory
[wxWidgets.git] / src / motif / menuitem.cpp
index 2bd43ebf94663326d07f5024199ffae7dff4914e..bb464edeaecfe88deecfcbd700c704511f56fb52 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
+#include "wx/defs.h"
+
 #include "wx/menu.h"
 #include "wx/menuitem.h"
 #include "wx/utils.h"
 #include "wx/frame.h"
 
 #include "wx/menu.h"
 #include "wx/menuitem.h"
 #include "wx/utils.h"
 #include "wx/frame.h"
 
+#ifdef __VMS__
+#pragma message disable nosimpint
+#endif
 #include <Xm/Label.h>
 #include <Xm/LabelG.h>
 #include <Xm/CascadeBG.h>
 #include <Xm/Label.h>
 #include <Xm/LabelG.h>
 #include <Xm/CascadeBG.h>
@@ -35,6 +40,9 @@
 #include <Xm/ToggleB.h>
 #include <Xm/ToggleBG.h>
 #include <Xm/RowColumn.h>
 #include <Xm/ToggleB.h>
 #include <Xm/ToggleBG.h>
 #include <Xm/RowColumn.h>
+#ifdef __VMS__
+#pragma message enable nosimpint
+#endif
 
 #include "wx/motif/private.h"
 
 
 #include "wx/motif/private.h"
 
@@ -54,9 +62,7 @@ static void wxMenuItemDisarmCallback(Widget w, XtPointer clientData, XtPointer p
 // dynamic classes implementation
 // ----------------------------------------------------------------------------
 
 // dynamic classes implementation
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
     IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
-#endif  //USE_SHARED_LIBRARY
 
 // ----------------------------------------------------------------------------
 // wxMenuItem
 
 // ----------------------------------------------------------------------------
 // wxMenuItem
@@ -109,7 +115,7 @@ void wxMenuItem::DeleteSubMenu()
 
 void wxMenuItem::Enable(bool bDoEnable)
 {
 
 void wxMenuItem::Enable(bool bDoEnable)
 {
-    if ( m_isChecked != bDoEnable )
+    if ( m_isEnabled != bDoEnable )
     {
         if ( !IsSubMenu() )
         {
     {
         if ( !IsSubMenu() )
         {
@@ -150,12 +156,12 @@ void wxMenuItem::Check(bool bDoCheck)
     }
 }
 
     }
 }
 
-wxString wxMenuItem::GetLabel() const
+/* static */
+wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
 {
 {
-    return wxStripMenuCodes(m_text);
+    return wxStripMenuCodes(text);
 }
 
 }
 
-
 // ----------------------------------------------------------------------------
 // wxMenuItemBase
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxMenuItemBase
 // ----------------------------------------------------------------------------
@@ -314,7 +320,7 @@ void wxMenuItem::SetText(const wxString& label)
     {
         wxXmString label_str(label2);
         XtVaSetValues ((Widget) m_buttonWidget,
     {
         wxXmString label_str(label2);
         XtVaSetValues ((Widget) m_buttonWidget,
-            XmNlabelString, label_str,
+            XmNlabelString, label_str(),
             NULL);
         if (mnem != 0)
             XtVaSetValues ((Widget) m_buttonWidget, XmNmnemonic, mnem, NULL);
             NULL);
         if (mnem != 0)
             XtVaSetValues ((Widget) m_buttonWidget, XmNmnemonic, mnem, NULL);