+ menu->SetInvokingWindow( win );
+ wxNode *node = menu->GetItems().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->GetParent();
+
+ if (m_menuBar->GetParent() != this)
+ {
+ wxNode *node = m_menuBar->GetMenus().First();
+ while (node)
+ {
+ wxMenu *menu = (wxMenu*)node->Data();
+ SetInvokingWindow( menu, this );
+ node = node->Next();
+ }
+
+ m_menuBar->SetParent( mdi_frame );
+ }
+
+ /* the menu bar of the child window is shown in idle time as needed */
+ gtk_widget_hide( m_menuBar->m_widget );
+
+ /* insert the invisible menu bar into the _parent_ mdi frame */
+ gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_mainWidget),
+ m_menuBar->m_widget,
+ 0, 0, mdi_frame->m_width, wxMENU_HEIGHT );
+ }
+}
+
+wxMenuBar *wxMDIChildFrame::GetMenuBar() const
+{
+ return m_menuBar;
+}
+
+void wxMDIChildFrame::Activate()
+{
+}
+
+void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) )
+{
+}
+
+//-----------------------------------------------------------------------------
+// "size_allocate"
+//-----------------------------------------------------------------------------