Add missing wxUSE_MENUS checks to generic MDI classes

Make mdig.cpp compile with wxUSE_MENUS==0, as it already had many
wxUSE_MENUS checks and only missed a few more of them.

See #9626.
This commit is contained in:
Vadim Zeitlin
2019-08-28 20:11:23 +02:00
parent 2f8b2d9a8e
commit 417eff2bf8
2 changed files with 6 additions and 0 deletions

View File

@@ -199,7 +199,9 @@ protected:
void Init(); void Init();
private: private:
#if wxUSE_MENUS
void OnMenuHighlight(wxMenuEvent& event); void OnMenuHighlight(wxMenuEvent& event);
#endif // wxUSE_MENUS
void OnClose(wxCloseEvent& event); void OnClose(wxCloseEvent& event);
wxDECLARE_DYNAMIC_CLASS(wxGenericMDIChildFrame); wxDECLARE_DYNAMIC_CLASS(wxGenericMDIChildFrame);

View File

@@ -382,7 +382,9 @@ bool wxGenericMDIParentFrame::ProcessEvent(wxEvent& event)
wxIMPLEMENT_DYNAMIC_CLASS(wxGenericMDIChildFrame, wxFrame); wxIMPLEMENT_DYNAMIC_CLASS(wxGenericMDIChildFrame, wxFrame);
wxBEGIN_EVENT_TABLE(wxGenericMDIChildFrame, wxFrame) wxBEGIN_EVENT_TABLE(wxGenericMDIChildFrame, wxFrame)
#if wxUSE_MENUS
EVT_MENU_HIGHLIGHT_ALL(wxGenericMDIChildFrame::OnMenuHighlight) EVT_MENU_HIGHLIGHT_ALL(wxGenericMDIChildFrame::OnMenuHighlight)
#endif // wxUSE_MENUS
EVT_CLOSE(wxGenericMDIChildFrame::OnClose) EVT_CLOSE(wxGenericMDIChildFrame::OnClose)
wxEND_EVENT_TABLE() wxEND_EVENT_TABLE()
@@ -493,6 +495,7 @@ void wxGenericMDIChildFrame::Activate()
parent->WXActivateChild(this); parent->WXActivateChild(this);
} }
#if wxUSE_MENUS
void wxGenericMDIChildFrame::OnMenuHighlight(wxMenuEvent& event) void wxGenericMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
{ {
wxGenericMDIParentFrame * const parent = GetGenericMDIParent(); wxGenericMDIParentFrame * const parent = GetGenericMDIParent();
@@ -503,6 +506,7 @@ void wxGenericMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
parent->OnMenuHighlight(event); parent->OnMenuHighlight(event);
} }
} }
#endif // wxUSE_MENUS
void wxGenericMDIChildFrame::OnClose(wxCloseEvent& WXUNUSED(event)) void wxGenericMDIChildFrame::OnClose(wxCloseEvent& WXUNUSED(event))
{ {