+#include "wx/dialog.h"
+#include "wx/menu.h"
+#include <wx/intl.h>
+
+#include "glib.h"
+#include "gdk/gdk.h"
+#include "gtk/gtk.h"
+#include "wx/gtk/win_gtk.h"
+
+//-----------------------------------------------------------------------------
+// constants
+//-----------------------------------------------------------------------------
+
+const int wxMENU_HEIGHT = 27;
+
+//-----------------------------------------------------------------------------
+// globals
+//-----------------------------------------------------------------------------
+
+extern wxList wxPendingDelete;
+
+//-----------------------------------------------------------------------------
+// "size_allocate"
+//-----------------------------------------------------------------------------
+
+static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
+{
+ if ((win->m_x == alloc->x) &&
+ (win->m_y == alloc->y) &&
+ (win->m_width == alloc->width) &&
+ (win->m_height == alloc->height) &&
+ (win->m_sizeSet))
+ {
+ return;
+ }
+
+ win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
+}
+
+//-----------------------------------------------------------------------------
+// page change callback
+//-----------------------------------------------------------------------------
+
+static void gtk_page_change_callback( GtkNotebook *WXUNUSED(widget),
+ GtkNotebookPage *page,
+ gint WXUNUSED(nPage),
+ wxMDIClientWindow *client_win )
+{
+ wxNode *node = client_win->m_children.First();
+ while (node)
+ {
+ wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
+ if (child_frame->m_page == page)
+ {
+ wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)client_win->m_parent;
+ mdi_frame->m_currentChild = child_frame;
+ mdi_frame->SetMDIMenuBar( child_frame->m_menuBar );
+ return;
+ }
+ node = node->Next();
+ }
+}