+ wxWindow::GetClientSize( width, height );
+}
+
+void wxMDIChildFrame::AddChild( wxWindow *child )
+{
+ wxWindow::AddChild( child );
+}
+
+static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
+{
+ menu->SetInvokingWindow( win );
+ wxNode *node = menu->m_items.First();
+ while (node)
+ {
+ wxMenuItem *menuitem = (wxMenuItem*)node->Data();
+ if (menuitem->IsSubMenu())
+ SetInvokingWindow( menuitem->GetSubMenu(), win );
+ node = node->Next();
+ }
+}
+
+void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar )
+{
+ m_menuBar = menu_bar;
+
+ if (m_menuBar)
+ {
+ wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent;
+
+ if (m_menuBar->m_parent != this)
+ {
+ wxNode *node = m_menuBar->m_menus.First();
+ while (node)
+ {
+ wxMenu *menu = (wxMenu*)node->Data();
+ SetInvokingWindow( menu, this );
+ node = node->Next();
+ }
+
+ m_menuBar->m_parent = mdi_frame;
+ }
+ mdi_frame->SetMDIMenuBar( m_menuBar );
+
+ gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_mainWindow),
+ m_menuBar->m_widget, m_menuBar->m_x, m_menuBar->m_y );
+ }
+}
+
+wxMenuBar *wxMDIChildFrame::GetMenuBar()
+{
+ return m_menuBar;
+}