- GtkMenuBar* menu_bar = GTK_MENU_BAR( gtk_menu_bar_new() );
- gtk_widget_show( GTK_WIDGET( menu_bar ) );
-
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_file_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_edit_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_view_menu( style ) ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_selection_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_bsp_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_grid_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_misc_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_entity_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_brush_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_patch_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_plugins_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_help_menu() ) );
+ auto menu_bar = ui::MenuBar(GTK_MENU_BAR( gtk_menu_bar_new() ));
+ menu_bar.show();
+
+ menu_bar.add(create_file_menu());
+ menu_bar.add(create_edit_menu());
+ menu_bar.add(create_view_menu(style));
+ menu_bar.add(create_selection_menu());
+ menu_bar.add(create_bsp_menu());
+ menu_bar.add(create_grid_menu());
+ menu_bar.add(create_misc_menu());
+ menu_bar.add(create_entity_menu());
+ menu_bar.add(create_brush_menu());
+ menu_bar.add(create_patch_menu());
+ menu_bar.add(create_plugins_menu());
+ menu_bar.add(create_help_menu());