From: TimePath Date: Wed, 17 Feb 2016 02:43:00 +0000 (+1100) Subject: Wrap GtkVBox X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a95f121300992ffd496a1e0ad43e300878d0221e;p=xonotic%2Fnetradiant.git Wrap GtkVBox --- diff --git a/contrib/bkgrnd2d/dialog.cpp b/contrib/bkgrnd2d/dialog.cpp index 687efb10..afa934b4 100644 --- a/contrib/bkgrnd2d/dialog.cpp +++ b/contrib/bkgrnd2d/dialog.cpp @@ -196,7 +196,7 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){ break; } // A vbox to hold everything - m_pWidget = gtk_vbox_new( FALSE,0 ); + m_pWidget = ui::VBox( FALSE,0 ); // Frame for file row frame = gtk_frame_new( "File" ); gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 ); diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 3cbc232b..08f1205c 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -225,7 +225,7 @@ EMessageBoxReturn DoMessageBox( const char* lpText, const char* lpCaption, EMess g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); - vbox = ui::Widget(gtk_vbox_new( FALSE, 10 )); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -343,7 +343,7 @@ EMessageBoxReturn DoIntersectBox( IntersectRS* rs ){ - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -441,7 +441,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -454,7 +454,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- hbox ---- - vbox2 = gtk_vbox_new( FALSE, 10 ); + vbox2 = ui::VBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( hbox ), vbox2, FALSE, FALSE, 2 ); gtk_widget_show( vbox2 ); @@ -500,7 +500,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ - vbox2 = gtk_vbox_new( FALSE, 10 ); + vbox2 = ui::VBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( hbox ), vbox2, FALSE, FALSE, 2 ); gtk_widget_show( vbox2 ); @@ -615,7 +615,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ gtk_widget_realize( window ); // new vbox - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -876,7 +876,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ LoadGList( GetFilename( buffer, "plugins/bt/door-tex.txt" ), &listMainTextures ); LoadGList( GetFilename( buffer, "plugins/bt/door-tex-trim.txt" ), &listTrimTextures ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -1086,7 +1086,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -1257,7 +1257,7 @@ EMessageBoxReturn DoCTFColourChangeBox(){ - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -1326,7 +1326,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_realize( window ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -1662,7 +1662,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_realize( window ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -1927,7 +1927,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ gtk_widget_realize( window ); // new vbox - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); diff --git a/contrib/brushexport/interface.cpp b/contrib/brushexport/interface.cpp index ee679ba7..4cd532c0 100644 --- a/contrib/brushexport/interface.cpp +++ b/contrib/brushexport/interface.cpp @@ -47,7 +47,7 @@ create_w_plugplug2( void ){ gtk_window_set_position( GTK_WINDOW( w_plugplug2 ), GTK_WIN_POS_CENTER ); gtk_window_set_destroy_with_parent( GTK_WINDOW( w_plugplug2 ), TRUE ); - vbox1 = gtk_vbox_new( FALSE, 0 ); + vbox1 = ui::VBox( FALSE, 0 ); gtk_widget_set_name( vbox1, "vbox1" ); gtk_widget_show( vbox1 ); gtk_container_add( GTK_CONTAINER( w_plugplug2 ), vbox1 ); @@ -59,7 +59,7 @@ create_w_plugplug2( void ){ gtk_box_pack_start( GTK_BOX( vbox1 ), hbox2, FALSE, FALSE, 0 ); gtk_container_set_border_width( GTK_CONTAINER( hbox2 ), 5 ); - vbox4 = gtk_vbox_new( TRUE, 0 ); + vbox4 = ui::VBox( TRUE, 0 ); gtk_widget_set_name( vbox4, "vbox4" ); gtk_widget_show( vbox4 ); gtk_box_pack_start( GTK_BOX( hbox2 ), vbox4, TRUE, FALSE, 0 ); @@ -88,7 +88,7 @@ create_w_plugplug2( void ){ gtk_radio_button_set_group( GTK_RADIO_BUTTON( r_nocollapse ), r_collapse_group ); r_collapse_group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( r_nocollapse ) ); - vbox3 = gtk_vbox_new( FALSE, 0 ); + vbox3 = ui::VBox( FALSE, 0 ); gtk_widget_set_name( vbox3, "vbox3" ); gtk_widget_show( vbox3 ); gtk_box_pack_start( GTK_BOX( hbox2 ), vbox3, FALSE, FALSE, 0 ); @@ -105,7 +105,7 @@ create_w_plugplug2( void ){ gtk_box_pack_start( GTK_BOX( vbox3 ), b_close, TRUE, FALSE, 0 ); gtk_container_set_border_width( GTK_CONTAINER( b_close ), 5 ); - vbox2 = gtk_vbox_new( FALSE, 5 ); + vbox2 = ui::VBox( FALSE, 5 ); gtk_widget_set_name( vbox2, "vbox2" ); gtk_widget_show( vbox2 ); gtk_box_pack_start( GTK_BOX( vbox1 ), vbox2, TRUE, TRUE, 0 ); diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index 63ccbb9a..a314b974 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -81,7 +81,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ gtk_widget_realize( window ); // fill the window - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -95,7 +95,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ gtk_box_pack_start( GTK_BOX( hbox ), frame, TRUE, TRUE, 0 ); gtk_widget_show( frame ); - vbox2 = gtk_vbox_new( FALSE, 5 ); + vbox2 = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); gtk_widget_show( vbox2 ); @@ -374,7 +374,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ gtk_widget_realize( window ); // fill the window - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -493,7 +493,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ gtk_widget_realize( window ); // fill the window - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -524,7 +524,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ gtk_box_pack_start( GTK_BOX( hbox ), frame, TRUE, TRUE, 0 ); gtk_widget_show( frame ); - vbox2 = gtk_vbox_new( FALSE, 5 ); + vbox2 = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); gtk_widget_show( vbox2 ); @@ -841,7 +841,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ gtk_widget_realize( window ); // fill the window - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); @@ -855,7 +855,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ gtk_box_pack_start( GTK_BOX( hbox ), frame, TRUE, TRUE, 0 ); gtk_widget_show( frame ); - vbox2 = gtk_vbox_new( FALSE, 5 ); + vbox2 = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); gtk_widget_show( vbox2 ); @@ -1020,7 +1020,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // the properties column // -------------------------- // - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1076,7 +1076,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( frame ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); gtk_widget_show( vbox ); @@ -1170,7 +1170,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( frame ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); gtk_widget_show( vbox ); @@ -1268,7 +1268,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_clist_set_column_auto_resize( GTK_CLIST( g_pEventsList ), 2, TRUE ); gtk_widget_show( g_pEventsList ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 ); gtk_widget_show( vbox ); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index d341948a..9cd424bb 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -1390,7 +1390,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 ); - vbox = gtk_vbox_new( TRUE, 5 ); + vbox = ui::VBox( TRUE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( frame ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -1411,7 +1411,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 ); - vbox = gtk_vbox_new( TRUE, 5 ); + vbox = ui::VBox( TRUE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( frame ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -1432,7 +1432,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 ); - vbox = gtk_vbox_new( TRUE, 5 ); + vbox = ui::VBox( TRUE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( frame ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -1524,7 +1524,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_set_usize( spin, 60, -2 ); g_object_set_data( G_OBJECT( dlg ), "random", spin ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -1786,7 +1786,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "linearborder", check ); g_signal_connect( G_OBJECT( check ), "toggled", G_CALLBACK( extents_linearborder ), NULL ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_widget_show( vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -1892,7 +1892,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "bmp_white", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.white_value ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_widget_show( vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -1987,7 +1987,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "fix_freeall", button ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( fix_freeall ), NULL ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_widget_show( vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -2134,7 +2134,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "terrain_ent", check ); g_signal_connect( G_OBJECT( check ), "toggled", G_CALLBACK( texture_terrainent ), NULL ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, TRUE, 0 ); diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index 1b27db56..51f588ec 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -378,7 +378,7 @@ void CreateViewWindow(){ gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pWnd ) ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 300, 400 ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( dlg ), vbox ); diff --git a/contrib/hydratoolz/plugin.cpp b/contrib/hydratoolz/plugin.cpp index f790bf30..76cda55b 100644 --- a/contrib/hydratoolz/plugin.cpp +++ b/contrib/hydratoolz/plugin.cpp @@ -95,7 +95,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_object_set_data( GTK_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index 4b3719d0..dbc16ca6 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -77,7 +77,7 @@ void DoAboutDlg(){ gtk_box_pack_start( GTK_BOX( hbox ), label, TRUE, TRUE, 0 ); gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); - vbox = gtk_vbox_new( FALSE, 0 ); + vbox = ui::VBox( FALSE, 0 ); gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 ); diff --git a/contrib/prtview/ConfigDialog.cpp b/contrib/prtview/ConfigDialog.cpp index be8c3197..3bedca33 100644 --- a/contrib/prtview/ConfigDialog.cpp +++ b/contrib/prtview/ConfigDialog.cpp @@ -256,7 +256,7 @@ void DoConfigDialog(){ g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( dlg ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -265,7 +265,7 @@ void DoConfigDialog(){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, TRUE, TRUE, 0 ); - vbox2 = gtk_vbox_new( FALSE, 5 ); + vbox2 = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox2 ); gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); @@ -415,7 +415,7 @@ void DoConfigDialog(){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, TRUE, TRUE, 0 ); - vbox2 = gtk_vbox_new( FALSE, 5 ); + vbox2 = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox2 ); gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); diff --git a/contrib/prtview/LoadPortalFileDialog.cpp b/contrib/prtview/LoadPortalFileDialog.cpp index f3d4df8d..f91404f0 100644 --- a/contrib/prtview/LoadPortalFileDialog.cpp +++ b/contrib/prtview/LoadPortalFileDialog.cpp @@ -117,7 +117,7 @@ int DoLoadPortalFileDialog(){ g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); - vbox = gtk_vbox_new( FALSE, 5 ); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( dlg ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); diff --git a/contrib/sunplug/sunplug.cpp b/contrib/sunplug/sunplug.cpp index df782bdf..77ef3844 100644 --- a/contrib/sunplug/sunplug.cpp +++ b/contrib/sunplug/sunplug.cpp @@ -265,7 +265,7 @@ void about_plugin_window(){ gtk_window_set_modal( GTK_WINDOW( window ), TRUE ); // force the user not to do something with the other windows gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); // set the border of the window - vbox = gtk_vbox_new( FALSE, 10 ); // create a box to arrange new objects vertically + vbox = ui::VBox( FALSE, 10 ); // create a box to arrange new objects vertically gtk_container_add( GTK_CONTAINER( window ), vbox ); // add the box to the window label = ui::Label( "SunPlug v1.0 for NetRadiant 1.5\nby Topsun" ); // create a label @@ -331,7 +331,7 @@ void MapCoordinator(){ gtk_window_set_modal( GTK_WINDOW( window ), TRUE ); // force the user not to do something with the other windows gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); // set the border of the window - vbox = gtk_vbox_new( FALSE, 10 ); // create a box to arrange new objects vertically + vbox = ui::VBox( FALSE, 10 ); // create a box to arrange new objects vertically gtk_container_add( GTK_CONTAINER( window ), vbox ); // add the box to the window scene::Path path = makeReference( GlobalSceneGraph().root() ); // get the path to the root element of the graph diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 852d06e2..092d7ce0 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -36,7 +36,7 @@ #include "window.h" GtkVBox* create_dialog_vbox( int spacing, int border ){ - GtkVBox* vbox = GTK_VBOX( gtk_vbox_new( FALSE, spacing ) ); + GtkVBox* vbox = ui::VBox( FALSE, spacing ); gtk_widget_show( GTK_WIDGET( vbox ) ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), border ); return vbox; diff --git a/libs/uilib/uilib.cpp b/libs/uilib/uilib.cpp index 08f4b1c7..acb2d65a 100644 --- a/libs/uilib/uilib.cpp +++ b/libs/uilib/uilib.cpp @@ -97,4 +97,7 @@ namespace ui { TreeView::TreeView(TreeModel model) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new_with_model(model))) { } + VBox::VBox(bool homogenous, int spacing) : VBox(GTK_VBOX(gtk_vbox_new(homogenous, spacing))) + { } + } diff --git a/libs/uilib/uilib.h b/libs/uilib/uilib.h index fb726994..50115238 100644 --- a/libs/uilib/uilib.h +++ b/libs/uilib/uilib.h @@ -12,6 +12,7 @@ using ui_modal = struct ModalDialog; using ui_treemodel = struct _GtkTreeModel; using ui_treeview = struct _GtkTreeView; using ui_typeinst = struct _GTypeInstance; +using ui_vbox = struct _GtkVBox; using ui_widget = struct _GtkWidget; using ui_window = struct _GtkWindow; @@ -135,6 +136,10 @@ namespace ui { TreeView(TreeModel model); ); + WRAP(VBox, ui_vbox, + VBox(bool homogenous, int spacing); + ); + #undef WRAP } diff --git a/plugins/textool/TexTool.cpp b/plugins/textool/TexTool.cpp index cebd2359..f8ed360f 100644 --- a/plugins/textool/TexTool.cpp +++ b/plugins/textool/TexTool.cpp @@ -65,7 +65,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); - vbox = gtk_vbox_new( FALSE, 10 ); + vbox = ui::VBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index 7eb95ff1..4d30f8fe 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -1304,7 +1304,7 @@ void EntityInspector_destroyWindow( ui::Widget widget, gpointer data ){ } ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ - ui::Widget vbox = ui::Widget(gtk_vbox_new( FALSE, 2 )); + ui::Widget vbox = ui::VBox( FALSE, 2 ); gtk_widget_show( vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 2 ); @@ -1387,7 +1387,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ gtk_widget_show( split2 ); { - ui::Widget vbox2 = ui::Widget(gtk_vbox_new( FALSE, 2 )); + ui::Widget vbox2 = ui::VBox( FALSE, 2 ); gtk_widget_show( vbox2 ); gtk_paned_pack1( GTK_PANED( split2 ), vbox2, FALSE, FALSE ); @@ -1528,7 +1528,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ gtk_widget_show( viewport ); gtk_viewport_set_shadow_type( GTK_VIEWPORT( viewport ), GTK_SHADOW_NONE ); - g_attributeBox = GTK_VBOX( gtk_vbox_new( FALSE, 2 ) ); + g_attributeBox = ui::VBox( FALSE, 2 ); gtk_widget_show( GTK_WIDGET( g_attributeBox ) ); gtk_container_add( GTK_CONTAINER( viewport ), GTK_WIDGET( g_attributeBox ) ); diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index 36db069f..104f1ee4 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -148,7 +148,7 @@ ui::Window FindTextureDialog::BuildDialog(){ gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( hbox ) ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 ); - vbox = ui::Widget(gtk_vbox_new( FALSE, 5 )); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 ); @@ -197,7 +197,7 @@ ui::Window FindTextureDialog::BuildDialog(){ gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 ); AddDialogData( *GTK_TOGGLE_BUTTON( check ), m_bSelectedOnly ); - vbox = ui::Widget(gtk_vbox_new( FALSE, 5 )); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 ); diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index 1536daf7..e5193439 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -755,7 +755,7 @@ static void CreateGtkTextEditor(){ G_CALLBACK( editor_delete ), 0 ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 600, 300 ); - vbox = ui::Widget(gtk_vbox_new( FALSE, 5 )); + vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( vbox ) ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 447296bd..755d56da 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -2733,7 +2733,7 @@ void MainFrame::Create(){ GetPlugInMgr().Init( window ); - ui::Widget vbox = ui::Widget(gtk_vbox_new( FALSE, 0 )); + ui::Widget vbox = ui::VBox( FALSE, 0 ); gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 98e0894e..6840c6bf 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -573,7 +573,7 @@ ui::Window PatchInspector::BuildDialog(){ { - GtkVBox* vbox = GTK_VBOX( gtk_vbox_new( FALSE, 5 ) ); + GtkVBox* vbox = ui::VBox( FALSE, 5 ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); gtk_widget_show( GTK_WIDGET( vbox ) ); gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( vbox ) ); @@ -582,7 +582,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( hbox ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 ); { - GtkVBox* vbox2 = GTK_VBOX( gtk_vbox_new( FALSE, 0 ) ); + GtkVBox* vbox2 = ui::VBox( FALSE, 0 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 0 ); gtk_widget_show( GTK_WIDGET( vbox2 ) ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox2 ), TRUE, TRUE, 0 ); @@ -591,7 +591,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( frame ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { - GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 5 ) ); + GtkVBox* vbox3 = ui::VBox( FALSE, 5 ); gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 5 ); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); @@ -738,7 +738,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( frame ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { - GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 5 ) ); + GtkVBox* vbox3 = ui::VBox( FALSE, 5 ); gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 5 ); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); @@ -806,7 +806,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( frame ) ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { - GtkVBox* vbox2 = GTK_VBOX( gtk_vbox_new( FALSE, 5 ) ); + GtkVBox* vbox2 = ui::VBox( FALSE, 5 ); gtk_widget_show( GTK_WIDGET( vbox2 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox2 ) ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index f93f6b45..1c02b140 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -666,7 +666,7 @@ ui::Widget PreferencePages_addPage( ui::Widget notebook, const char* name ){ gtk_container_set_border_width( GTK_CONTAINER( pageframe ), 4 ); gtk_widget_show( pageframe ); - ui::Widget vbox = ui::Widget(gtk_vbox_new( FALSE, 4 )); + ui::Widget vbox = ui::VBox( FALSE, 4 ); gtk_widget_show( vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 4 ); gtk_container_add( GTK_CONTAINER( pageframe ), vbox ); @@ -704,7 +704,7 @@ ui::Window PrefsDlg::BuildDialog(){ ui::Window dialog = ui::Window(create_floating_window( "NetRadiant Preferences", m_parent )); { - ui::Widget mainvbox = ui::Widget(gtk_vbox_new( FALSE, 5 )); + ui::Widget mainvbox = ui::VBox( FALSE, 5 ); gtk_container_add( GTK_CONTAINER( dialog ), mainvbox ); gtk_container_set_border_width( GTK_CONTAINER( mainvbox ), 5 ); gtk_widget_show( mainvbox ); diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index ebd828c4..acd1f650 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -599,7 +599,7 @@ ui::Window SurfaceInspector::BuildDialog(){ { // replaced by only the vbox: - ui::Widget vbox = ui::Widget(gtk_vbox_new( FALSE, 5 )); + ui::Widget vbox = ui::VBox( FALSE, 5 ); gtk_widget_show( vbox ); gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( vbox ) ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); @@ -948,7 +948,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( frame ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { - GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) ); + GtkVBox* vbox3 = ui::VBox( FALSE, 4 ); //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); @@ -983,7 +983,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( frame ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { - GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) ); + GtkVBox* vbox3 = ui::VBox( FALSE, 4 ); //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); @@ -1022,7 +1022,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( frame ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { - GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) ); + GtkVBox* vbox3 = ui::VBox( FALSE, 4 ); gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 4 ); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index 7c8808df..65587fd4 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -1951,7 +1951,7 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){ ui::Widget table = ui::Widget(gtk_table_new( 3, 3, FALSE )); ui::Widget frame_table; - ui::Widget vbox = ui::Widget(gtk_vbox_new( FALSE, 0 )); + ui::Widget vbox = ui::VBox( FALSE, 0 ); gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 ); gtk_widget_show( vbox );