X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/631f1bfed5d2df0215035207355d838328237578..3f263f4542f0288a9aa2228f27f43e12a888e5a4:/src/gtk1/menu.cpp diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 7f42dd5e94..aff2211922 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -26,6 +26,32 @@ IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow) +wxMenuBar::wxMenuBar( long style ) +{ + m_needParent = FALSE; // hmmm + + PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); + + m_menus.DeleteContents( TRUE ); + + m_menubar = gtk_menu_bar_new(); + + if (style & wxMB_DOCKABLE) + { + m_widget = gtk_handle_box_new(); + gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_menubar) ); + gtk_widget_show( GTK_WIDGET(m_menubar) ); + } + else + { + m_widget = GTK_WIDGET(m_menubar); + } + + PostCreation(); + + Show( TRUE ); +} + wxMenuBar::wxMenuBar() { m_needParent = FALSE; // hmmm @@ -36,7 +62,7 @@ wxMenuBar::wxMenuBar() m_menubar = gtk_menu_bar_new(); - m_widget = GTK_WIDGET(m_menubar); + m_widget = GTK_WIDGET(m_menubar); PostCreation();