X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82dc21d343fcdb417d950fa96cce799e13b94524..ac7d3dd1578d298a301638b7ef862f1e308321d0:/src/aui/tabmdi.cpp diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index 0f303edf64..ddbdad83d6 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/generic/tabmdi.cpp +// Name: src/aui/tabmdi.cpp // Purpose: Generic MDI (Multiple Document Interface) classes // Author: Hans Van Leemputten // Modified by: Benjamin I. Williams / Kirix Corporation @@ -24,6 +24,7 @@ #pragma hdrstop #endif +#if wxUSE_AUI #if wxUSE_MDI #include "wx/aui/tabmdi.h" @@ -160,7 +161,7 @@ void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* pChild) { if (pChild->GetMenuBar() == NULL) return; - + // Do we need to save the current bar? if (m_pMyMenuBar == NULL) m_pMyMenuBar = GetMenuBar(); @@ -282,7 +283,7 @@ void wxTabMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar) { if (pMenuBar && m_pWindowMenu) { - int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,false)); + int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,wxSTOCK_NOFLAGS)); if (pos == wxNOT_FOUND) pMenuBar->Append(m_pWindowMenu, _("&Window")); else @@ -399,16 +400,14 @@ bool wxTabMDIChildFrame::Destroy() wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow(); wxASSERT_MSG(pClientWindow, wxT("Missing MDI Client Window")); - bool bActive = false; if (pParentFrame->GetActiveChild() == this) { pParentFrame->SetActiveChild(NULL); pParentFrame->SetChildMenuBar(NULL); - bActive = true; } - size_t pos, page_count = pClientWindow->GetPageCount(); - for (pos = 0; pos < page_count; pos++) + const size_t page_count = pClientWindow->GetPageCount(); + for (size_t pos = 0; pos < page_count; pos++) { if (pClientWindow->GetPage(pos) == this) return pClientWindow->DeletePage(pos); @@ -546,9 +545,14 @@ void wxTabMDIChildFrame::DoShow(bool show) wxWindow::Show(show); } -void wxTabMDIChildFrame::DoSetSize(int x, int y, int width, int height, int WXUNUSED(sizeFlags)) +void wxTabMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags) { m_mdi_newrect = wxRect(x, y, width, height); +#ifdef __WXGTK__ + wxPanel::DoSetSize(x,y,width, height, sizeFlags); +#else + wxUnusedVar(sizeFlags); +#endif } void wxTabMDIChildFrame::DoMoveWindow(int x, int y, int width, int height) @@ -675,4 +679,5 @@ void wxTabMDIClientWindow::OnSize(wxSizeEvent& evt) ((wxTabMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect(); } +#endif //wxUSE_AUI #endif // wxUSE_MDI