// headers
// ----------------------------------------------------------------------------
+#include "wx/defs.h"
+
#include "wx/menu.h"
#include "wx/menuitem.h"
#include "wx/log.h"
#include "wx/frame.h"
#include "wx/settings.h"
+#ifdef __VMS__
+#pragma message disable nosimpint
+#define XtDisplay XTDISPLAY
+#define XtWindow XTWINDOW
+#endif
#include <Xm/Label.h>
#include <Xm/LabelG.h>
#include <Xm/CascadeBG.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"
// other standard headers
#include <string.h>
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler)
-#endif
// ============================================================================
// implementation
AppendSeparator() ;
}
- m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENU);
- m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENUTEXT);
- m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+ m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_MENU);
+ m_foregroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_MENUTEXT);
+ m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
}
// The wxWindow destructor will take care of deleting the submenus.
{
bool processed = FALSE;
+#if wxUSE_MENU_CALLBACK
// Try a callback
if (m_callback)
{
(void) (*(m_callback)) (*this, event);
processed = TRUE;
}
+#endif // wxUSE_MENU_CALLBACK
// Try the menu's event handler
if ( !processed && GetEventHandler())
m_eventHandler = this;
m_menuBarFrame = NULL;
m_mainWidget = (WXWidget) NULL;
- m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENU);
- m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENUTEXT);
- m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+ m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_MENU);
+ m_foregroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_MENUTEXT);
+ m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
}
wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
menu->SetButtonWidget(w);
}
- menu->SetMenuBar(this);
+ //menu->SetMenuBar(this);
m_titles.Add(title);
{
if (m_mainWidget)
{
- XtVaSetValues((Widget) parent->GetMainWindowWidget(), XmNmenuBar, (Widget) m_mainWidget, NULL);
+ XtVaSetValues((Widget) parent->GetMainWidget(), XmNmenuBar, (Widget) m_mainWidget, NULL);
/*
if (!XtIsManaged((Widget) m_mainWidget))
XtManageChild((Widget) m_mainWidget);
return TRUE;
}
- Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWindowWidget(), "MenuBar", NULL, 0);
+ Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
m_mainWidget = (WXWidget) menuBarW;
size_t menuCount = GetMenuCount();
SetForegroundColour(m_foregroundColour);
SetFont(m_font);
- XtVaSetValues((Widget) parent->GetMainWindowWidget(), XmNmenuBar, (Widget) m_mainWidget, NULL);
+ XtVaSetValues((Widget) parent->GetMainWidget(), XmNmenuBar, (Widget) m_mainWidget, NULL);
XtRealizeWidget ((Widget) menuBarW);
XtManageChild ((Widget) menuBarW);
SetMenuBarFrame(parent);
else
{
char mnem = wxFindMnemonic (title);
- wxStripMenuCodes ((char*) (const char*) title, wxBuffer);
-
menu = XmCreatePulldownMenu ((Widget) parent, "pulldown", args, 2);
wxString title2(wxStripMenuCodes(title));