+ wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
+ wxASSERT_MSG( (m_wxwindow != NULL), _T("invalid frame") );
+
+ m_frameMenuBar = menuBar;
+
+ if (m_frameMenuBar)
+ {
+ m_frameMenuBar->SetInvokingWindow( this );
+
+ if (m_frameMenuBar->GetParent() != this)
+ {
+ m_frameMenuBar->SetParent(this);
+ gtk_myfixed_put( GTK_MYFIXED(m_mainWidget),
+ m_frameMenuBar->m_widget,
+ m_frameMenuBar->m_x,
+ m_frameMenuBar->m_y,
+ m_frameMenuBar->m_width,
+ m_frameMenuBar->m_height );
+
+ if (menuBar->GetWindowStyle() & wxMB_DOCKABLE)
+ {
+ gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_attached",
+ GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
+
+ gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_detached",
+ GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
+ }
+
+ m_frameMenuBar->Show( TRUE );
+ }
+ }
+
+ /* resize window in OnInternalIdle */
+ m_sizeSet = FALSE;
+}
+
+wxMenuBar *wxFrame::GetMenuBar() const
+{
+ return m_frameMenuBar;
+}
+
+void wxFrame::OnMenuHighlight(wxMenuEvent& event)
+{
+#if wxUSE_STATUSBAR
+ if (GetStatusBar())
+ {
+ // if no help string found, we will clear the status bar text
+ wxString helpString;
+
+ int menuId = event.GetMenuId();
+ if ( menuId != -1 )
+ {
+ wxMenuBar *menuBar = GetMenuBar();
+ if (menuBar)
+ {
+ helpString = menuBar->GetHelpString(menuId);
+ }
+ }
+
+ SetStatusText(helpString);
+ }
+#endif // wxUSE_STATUSBAR
+}
+
+#if wxUSE_TOOLBAR
+wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
+{
+ wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
+
+ wxCHECK_MSG( m_frameToolBar == NULL, FALSE, _T("recreating toolbar in wxFrame") );
+
+ m_insertInClientArea = FALSE;
+
+ m_frameToolBar = OnCreateToolBar( style, id, name );
+
+ if (m_frameToolBar) GetChildren().DeleteObject( m_frameToolBar );
+
+ m_insertInClientArea = TRUE;
+
+ m_sizeSet = FALSE;
+
+ return m_frameToolBar;
+}
+
+wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString& name )
+{
+ return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
+}
+
+wxToolBar *wxFrame::GetToolBar() const
+{
+ return m_frameToolBar;
+}
+#endif // wxUSE_TOOLBAR
+
+#if wxUSE_STATUSBAR
+wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
+{
+ wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );