X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c71830c3b63568566cf5f006165e51ffaee0c704..4cb1706ae52c02214a4540c6c4b6882bed5af416:/src/motif/menu.cpp?ds=inline diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index 7fa4d9f93b..964bc73ac8 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -30,6 +30,11 @@ #include "wx/frame.h" #include "wx/settings.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#define XtDisplay XTDISPLAY +#define XtWindow XTWINDOW +#endif #include #include #include @@ -39,16 +44,17 @@ #include #include #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" // other standard headers #include -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) -#endif // ============================================================================ // implementation @@ -162,14 +168,14 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event) { bool processed = FALSE; -#if WXWIN_COMPATIBILITY +#if wxUSE_MENU_CALLBACK // Try a callback if (m_callback) { (void) (*(m_callback)) (*this, event); processed = TRUE; } -#endif // WXWIN_COMPATIBILITY +#endif // wxUSE_MENU_CALLBACK // Try the menu's event handler if ( !processed && GetEventHandler()) @@ -216,7 +222,8 @@ wxMenuBar::~wxMenuBar() void wxMenuBar::EnableTop(size_t WXUNUSED(pos), bool WXUNUSED(flag)) { - wxFAIL_MSG("TODO"); + // wxFAIL_MSG("TODO"); +// wxLogWarning("wxMenuBar::EnableTop not yet implemented."); } void wxMenuBar::SetLabelTop(size_t pos, const wxString& label) @@ -356,7 +363,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent) { 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); @@ -365,7 +372,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent) 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(); @@ -385,6 +392,9 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent) XtVaSetValues(GetWidget(menu), XmNtearOffModel, XmTEAR_OFF_ENABLED, NULL); + Widget tearOff = XmGetTearOffControl(GetWidget(menu)); + wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour); + wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE); #endif } } @@ -393,7 +403,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent) 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);