]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/tabmdi.cpp
use wxSTRINGIZE instead of redefining a special STRINGIZE in this file
[wxWidgets.git] / src / aui / tabmdi.cpp
index add285982ce9184e27b814601fde908ae424e72c..71f53429d48b23a3c35b42c2761f8f52b32eb003 100644 (file)
@@ -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"
@@ -132,7 +133,7 @@ void wxTabMDIParentFrame::SetWindowMenu(wxMenu* pMenu)
     }
 }
 
-void wxTabMDIParentFrame::SetMenuBar(wxMenuBar *pMenuBar)
+void wxTabMDIParentFrame::SetMenuBar(wxMenuBarpMenuBar)
 {
     // Remove the Window menu from the old menu bar
     RemoveWindowMenu(GetMenuBar());
@@ -154,7 +155,7 @@ void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* pChild)
         SetMenuBar(m_pMyMenuBar);
 
         // Make sure we know our menu bar is in use
-        m_pMyMenuBar = NULL;
+        //m_pMyMenuBar = NULL;
     }
      else
     {
@@ -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
@@ -417,55 +418,6 @@ bool wxTabMDIChildFrame::Destroy()
     return false;
 }
 
-/*
-    wxTabMDIParentFrame* pParentFrame = GetMDIParentFrame();
-    wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame"));
-
-    bool bActive = false;
-    if (pParentFrame->GetActiveChild() == this)
-    {
-        pParentFrame->SetActiveChild(NULL);
-        pParentFrame->SetChildMenuBar(NULL);
-        bActive = true;
-    }
-
-    wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
-
-    // remove page if it is still there
-    size_t pos;
-    for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
-    {
-        if (pClientWindow->GetPage(pos) == this)
-        {
-            if (pClientWindow->RemovePage(pos))
-                pClientWindow->Refresh();
-            break;
-        }
-    }
-
-    if (bActive)
-    {
-        // Set the new selection to the a remaining page
-        if (pos < pClientWindow->GetPageCount())
-        {
-            pClientWindow->SetSelection(pos);
-        }
-         else
-        {
-            if (pClientWindow->GetPageCount() >= 1)
-                pClientWindow->SetSelection(pClientWindow->GetPageCount() - 1);
-        }
-    }
-
-    // delete the child frame with pending delete, as is
-    // customary with frame windows
-    if (!wxPendingDelete.Member(this))
-        wxPendingDelete.Append(this);
-
-    return true;
-*/
-
-
 #if wxUSE_MENUS
 void wxTabMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
 {
@@ -595,9 +547,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)
@@ -724,4 +681,5 @@ void wxTabMDIClientWindow::OnSize(wxSizeEvent& evt)
         ((wxTabMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
 }
 
+#endif //wxUSE_AUI
 #endif // wxUSE_MDI