- Implement wxDV_ROW_LINES in generic wxDataViewCtrl (RedCAT).
- Added EVT_AUI_PANE_ACTIVATED event (Ronny Krüger).
- Added wxSplitterWindow::SetSashInvisible() (Armel Asselin).
+- Enable/disable "Window" menu items in AUI MDI correctly (wsu).
GTK:
void AddWindowMenu(wxMenuBar *pMenuBar);
void DoHandleMenu(wxCommandEvent &event);
+ void DoHandleUpdateUI(wxUpdateUIEvent &event);
#endif // wxUSE_MENUS
virtual bool ProcessEvent(wxEvent& event);
BEGIN_EVENT_TABLE(wxAuiMDIParentFrame, wxFrame)
#if wxUSE_MENUS
EVT_MENU (wxID_ANY, wxAuiMDIParentFrame::DoHandleMenu)
+ EVT_UPDATE_UI (wxID_ANY, wxAuiMDIParentFrame::DoHandleUpdateUI)
#endif
END_EVENT_TABLE()
event.Skip();
}
}
+
+void wxAuiMDIParentFrame::DoHandleUpdateUI(wxUpdateUIEvent& event)
+{
+ switch (event.GetId())
+ {
+ case wxWINDOWCLOSE:
+ case wxWINDOWCLOSEALL:
+ {
+ wxAuiMDIClientWindow* client_window = GetClientWindow();
+ wxCHECK_RET(client_window, wxS("Missing MDI Client Window"));
+ size_t pages = client_window->GetPageCount();
+ event.Enable(pages >= 1);
+ break;
+ }
+
+ case wxWINDOWNEXT:
+ case wxWINDOWPREV:
+ {
+ wxAuiMDIClientWindow* client_window = GetClientWindow();
+ wxCHECK_RET(client_window, wxS("Missing MDI Client Window"));
+ size_t pages = client_window->GetPageCount();
+ event.Enable(pages >= 2);
+ break;
+ }
+
+ default:
+ event.Skip();
+ }
+}
#endif // wxUSE_MENUS
void wxAuiMDIParentFrame::DoGetClientSize(int* width, int* height) const