+ wxNode *node = m_clientWindow->GetChildren().First();
+ while (node)
+ {
+ wxObject *child = node->Data();
+ wxMDIChildFrame *child_frame = wxDynamicCast(child, wxMDIChildFrame);
+ if ( child_frame )
+ {
+ wxMenuBar *menu_bar = child_frame->m_menuBar;
+ if ( menu_bar )
+ {
+ if (child_frame == active_child_frame)
+ {
+ if (menu_bar->Show(TRUE))
+ {
+ menu_bar->m_width = m_width;
+ menu_bar->m_height = wxMENU_HEIGHT;
+ gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
+ menu_bar->m_widget,
+ 0, 0, m_width, wxMENU_HEIGHT );
+ menu_bar->SetInvokingWindow( child_frame );
+ }
+ visible_child_menu = TRUE;
+ }
+ else
+ {
+ if (menu_bar->Show(FALSE))
+ {
+ menu_bar->UnsetInvokingWindow( child_frame );
+ }
+ }
+ }
+ }
+
+ node = node->Next();
+ }
+
+ /* show/hide parent menu bar as required */
+ if ((m_frameMenuBar) &&
+ (m_frameMenuBar->IsShown() == visible_child_menu))
+ {
+ if (visible_child_menu)
+ {
+ m_frameMenuBar->Show( FALSE );
+ m_frameMenuBar->UnsetInvokingWindow( this );
+ }
+ else
+ {
+ m_frameMenuBar->Show( TRUE );
+ m_frameMenuBar->SetInvokingWindow( this );
+
+ m_frameMenuBar->m_width = m_width;
+ m_frameMenuBar->m_height = wxMENU_HEIGHT;
+ gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
+ m_frameMenuBar->m_widget,
+ 0, 0, m_width, wxMENU_HEIGHT );
+ }
+ }
+}
+
+void wxMDIParentFrame::DoGetClientSize(int *width, int *height ) const