From ba21793b144f56c18cf73a69bf7b32ca582e4a35 Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 17 Feb 2016 14:40:22 +1100 Subject: [PATCH] Wrap GtkHBox --- contrib/bkgrnd2d/dialog.cpp | 6 +- contrib/bobtoolz/dialogs/dialogs-gtk.cpp | 70 ++++++++++++------------ contrib/brushexport/interface.cpp | 4 +- contrib/camera/dialogs.cpp | 42 +++++++------- contrib/gtkgensurf/gendlgs.cpp | 14 ++--- contrib/gtkgensurf/view.cpp | 2 +- contrib/hydratoolz/plugin.cpp | 2 +- contrib/prtview/AboutDialog.cpp | 2 +- contrib/prtview/ConfigDialog.cpp | 12 ++-- contrib/prtview/LoadPortalFileDialog.cpp | 4 +- libs/gtkutil/dialog.cpp | 6 +- libs/uilib/uilib.cpp | 5 +- libs/uilib/uilib.h | 40 +++++++++----- plugins/textool/TexTool.cpp | 2 +- radiant/dialog.cpp | 2 +- radiant/entityinspector.cpp | 14 +++-- radiant/findtexturedialog.cpp | 2 +- radiant/gtkdlgs.cpp | 2 +- radiant/patchdialog.cpp | 4 +- radiant/preferences.cpp | 4 +- radiant/surfacedialog.cpp | 4 +- 21 files changed, 129 insertions(+), 114 deletions(-) diff --git a/contrib/bkgrnd2d/dialog.cpp b/contrib/bkgrnd2d/dialog.cpp index afa934b4..ed3ccc15 100644 --- a/contrib/bkgrnd2d/dialog.cpp +++ b/contrib/bkgrnd2d/dialog.cpp @@ -202,7 +202,7 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){ gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 ); // hbox for first row - hbox = gtk_hbox_new( FALSE,5 ); + hbox = ui::HBox( FALSE,5 ); gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 ); gtk_container_add( GTK_CONTAINER( frame ), hbox ); @@ -237,7 +237,7 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){ frame = gtk_frame_new( "Rendering" ); gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 ); - hbox = gtk_hbox_new( FALSE,5 ); + hbox = ui::HBox( FALSE,5 ); gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 ); gtk_container_add( GTK_CONTAINER( frame ), hbox ); @@ -261,7 +261,7 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){ m_pPosLabel = gtk_frame_get_label_widget( GTK_FRAME( frame ) ); gtk_box_pack_start( GTK_BOX( m_pWidget ), frame, FALSE, FALSE, 2 ); - hbox = gtk_hbox_new( FALSE,5 ); + hbox = ui::HBox( FALSE,5 ); gtk_container_add( GTK_CONTAINER( frame ), hbox ); gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 ); diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 0901037f..0e79ae1a 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -238,7 +238,7 @@ EMessageBoxReturn DoMessageBox( const char* lpText, const char* lpCaption, EMess gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 ); gtk_widget_show( w ); - hbox = ui::Widget(gtk_hbox_new( FALSE, 10 )); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -370,7 +370,7 @@ EMessageBoxReturn DoIntersectBox( IntersectRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 ); gtk_widget_show( check2 ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -447,7 +447,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- vbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -460,7 +460,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- vbox2 ---- - hbox2 = gtk_hbox_new( FALSE, 10 ); + hbox2 = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox2, FALSE, FALSE, 2 ); gtk_widget_show( hbox2 ); @@ -478,7 +478,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- /hbox2 ---- - hbox2 = gtk_hbox_new( FALSE, 10 ); + hbox2 = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox2, FALSE, FALSE, 2 ); gtk_widget_show( hbox2 ); @@ -524,7 +524,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- /hbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -619,7 +619,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( vbox ), hbox ); gtk_widget_show( hbox ); @@ -635,7 +635,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // ------------------------- // indenting == good way of keeping track of lines :) // new hbox - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -649,7 +649,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // ------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -659,7 +659,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -693,7 +693,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // --------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -703,7 +703,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // --------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -736,7 +736,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // --------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -751,7 +751,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -768,7 +768,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -882,7 +882,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -897,7 +897,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // ------------------------ // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -911,7 +911,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // ----------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -929,7 +929,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // ---------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -944,7 +944,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // --------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -966,7 +966,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // ------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -986,7 +986,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // ------------------ // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1013,7 +1013,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ // ----------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1092,7 +1092,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ // ---- vbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1110,7 +1110,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ // ---- /hbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1133,7 +1133,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1174,7 +1174,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ // ----------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1263,7 +1263,7 @@ EMessageBoxReturn DoCTFColourChangeBox(){ // ---- vbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 ); gtk_widget_show( hbox ); @@ -1332,7 +1332,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ // ---- vbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1542,7 +1542,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ // ---- /frame ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1668,7 +1668,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ // ---- vbox ---- - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1829,7 +1829,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_show( numPoints ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); @@ -1931,7 +1931,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ gtk_container_add( GTK_CONTAINER( window ), vbox ); gtk_widget_show( vbox ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_container_add( GTK_CONTAINER( vbox ), hbox ); gtk_widget_show( hbox ); @@ -1947,7 +1947,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ // ------------------------- // // new hbox - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1961,7 +1961,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); diff --git a/contrib/brushexport/interface.cpp b/contrib/brushexport/interface.cpp index 28254c79..c1aaa07d 100644 --- a/contrib/brushexport/interface.cpp +++ b/contrib/brushexport/interface.cpp @@ -53,7 +53,7 @@ create_w_plugplug2( void ){ gtk_container_add( GTK_CONTAINER( w_plugplug2 ), vbox1 ); gtk_container_set_border_width( GTK_CONTAINER( vbox1 ), 5 ); - hbox2 = gtk_hbox_new( TRUE, 5 ); + hbox2 = ui::HBox( TRUE, 5 ); gtk_widget_set_name( hbox2, "hbox2" ); gtk_widget_show( hbox2 ); gtk_box_pack_start( GTK_BOX( vbox1 ), hbox2, FALSE, FALSE, 0 ); @@ -135,7 +135,7 @@ create_w_plugplug2( void ){ gtk_widget_show( ed_materialname ); gtk_box_pack_start( GTK_BOX( vbox2 ), ed_materialname, FALSE, FALSE, 0 ); - hbox1 = gtk_hbox_new( TRUE, 0 ); + hbox1 = ui::HBox( TRUE, 0 ); gtk_widget_set_name( hbox1, "hbox1" ); gtk_widget_show( hbox1 ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox1, FALSE, FALSE, 0 ); diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index 0e6a1a68..bf9a952f 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -87,7 +87,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -125,7 +125,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -380,7 +380,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -407,7 +407,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -499,7 +499,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -516,7 +516,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -554,7 +554,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -847,7 +847,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -874,7 +874,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -894,7 +894,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1028,7 +1028,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1042,7 +1042,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1083,7 +1083,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1102,7 +1102,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1137,7 +1137,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1177,7 +1177,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1191,7 +1191,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1215,7 +1215,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1228,7 +1228,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1238,7 +1238,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); @@ -1248,7 +1248,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // -------------------------- // - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index f3faae30..87d8e573 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -1361,7 +1361,7 @@ GtkWidget* create_main_dialog(){ // g_signal_connect (G_OBJECT (dlg), "destroy", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_container_add( GTK_CONTAINER( dlg ), hbox ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 ); @@ -1532,7 +1532,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_show( label ); gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label ); - hbox2 = gtk_hbox_new( FALSE, 5 ); + hbox2 = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox2 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox2, FALSE, TRUE, 0 ); @@ -1689,7 +1689,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "sp", spin ); // ^Fishman - End of Snap to grid code. - hbox2 = gtk_hbox_new( FALSE, 5 ); + hbox2 = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox2 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox2, FALSE, TRUE, 10 ); @@ -1821,7 +1821,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "bmp_file", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( bitmap_file_entryfocusout ), NULL ); - hbox2 = gtk_hbox_new( TRUE, 5 ); + hbox2 = ui::HBox( TRUE, 5 ); gtk_widget_show( hbox2 ); gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 1, 2, (GtkAttachOptions) ( 0 ), @@ -1866,7 +1866,7 @@ GtkWidget* create_main_dialog(){ gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 ); gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT ); - hbox2 = gtk_hbox_new( FALSE, 5 ); + hbox2 = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox2 ); gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1879,7 +1879,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "bmp_black", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.black_value ); - hbox2 = gtk_hbox_new( FALSE, 5 ); + hbox2 = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox2 ); gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2049,7 +2049,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_set_usize( entry, 60, -2 ); g_object_set_data( G_OBJECT( dlg ), "texture3", entry ); - hbox2 = gtk_hbox_new( FALSE, 5 ); + hbox2 = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox2 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox2, FALSE, TRUE, 0 ); diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index 51f588ec..31a6e16c 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -383,7 +383,7 @@ void CreateViewWindow(){ gtk_container_add( GTK_CONTAINER( dlg ), vbox ); #ifndef ISOMETRIC - hbox = gtk_hbox_new( TRUE, 5 ); + hbox = ui::HBox( TRUE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, TRUE, 0 ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 3 ); diff --git a/contrib/hydratoolz/plugin.cpp b/contrib/hydratoolz/plugin.cpp index 76cda55b..c08f7446 100644 --- a/contrib/hydratoolz/plugin.cpp +++ b/contrib/hydratoolz/plugin.cpp @@ -108,7 +108,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 ); gtk_widget_show( w ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index dbc16ca6..6376ec28 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -62,7 +62,7 @@ void DoAboutDlg(){ g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_widget_show( hbox ); gtk_container_add( GTK_CONTAINER( dlg ), hbox ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 10 ); diff --git a/contrib/prtview/ConfigDialog.cpp b/contrib/prtview/ConfigDialog.cpp index f2295d14..31e53e8e 100644 --- a/contrib/prtview/ConfigDialog.cpp +++ b/contrib/prtview/ConfigDialog.cpp @@ -270,7 +270,7 @@ void DoConfigDialog(){ gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, TRUE, 0 ); @@ -397,7 +397,7 @@ void DoConfigDialog(){ gtk_misc_set_alignment( GTK_MISC( cliplabel ), 0.0, 0.0 ); gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnScrollClip ), cliplabel ); - hbox = gtk_hbox_new( TRUE, 5 ); + hbox = ui::HBox( TRUE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 ); @@ -420,7 +420,7 @@ void DoConfigDialog(){ gtk_container_add( GTK_CONTAINER( frame ), vbox2 ); gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 ); @@ -435,7 +435,7 @@ void DoConfigDialog(){ gtk_box_pack_start( GTK_BOX( hbox ), lw2label, FALSE, TRUE, 0 ); gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnScroll2d ), lw2label ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 ); @@ -450,7 +450,7 @@ void DoConfigDialog(){ gtk_box_pack_start( GTK_BOX( hbox ), aa2check, TRUE, TRUE, 0 ); gtk_signal_connect( GTK_OBJECT( aa2check ), "toggled", GTK_SIGNAL_FUNC( OnAntiAlias2d ), NULL ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 ); @@ -459,7 +459,7 @@ void DoConfigDialog(){ gtk_box_pack_start( GTK_BOX( hbox ), show2check, FALSE, FALSE, 0 ); gtk_signal_connect( GTK_OBJECT( show2check ), "toggled", GTK_SIGNAL_FUNC( OnConfig2d ), NULL ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); diff --git a/contrib/prtview/LoadPortalFileDialog.cpp b/contrib/prtview/LoadPortalFileDialog.cpp index 47ebeaec..dbfcdc90 100644 --- a/contrib/prtview/LoadPortalFileDialog.cpp +++ b/contrib/prtview/LoadPortalFileDialog.cpp @@ -127,7 +127,7 @@ int DoLoadPortalFileDialog(){ gtk_entry_set_editable( GTK_ENTRY( entry ), FALSE ); gtk_box_pack_start( GTK_BOX( vbox ), entry, FALSE, FALSE, 0 ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); @@ -145,7 +145,7 @@ int DoLoadPortalFileDialog(){ gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( change_clicked ), entry ); gtk_widget_set_usize( button, 60, -2 ); - hbox = gtk_hbox_new( FALSE, 5 ); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 092d7ce0..af95003d 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -43,7 +43,7 @@ GtkVBox* create_dialog_vbox( int spacing, int border ){ } GtkHBox* create_dialog_hbox( int spacing, int border ){ - GtkHBox* hbox = GTK_HBOX( gtk_hbox_new( FALSE, spacing ) ); + GtkHBox* hbox = ui::HBox( FALSE, spacing ); gtk_widget_show( GTK_WIDGET( hbox ) ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), border ); return hbox; @@ -185,7 +185,7 @@ GtkWindow* create_simple_modal_dialog_window( const char* title, ModalDialog& di } RadioHBox RadioHBox_new( StringArrayRange names ){ - GtkHBox* hbox = GTK_HBOX( gtk_hbox_new( TRUE, 4 ) ); + GtkHBox* hbox = ui::HBox( TRUE, 4 ); gtk_widget_show( GTK_WIDGET( hbox ) ); GSList* group = 0; @@ -209,7 +209,7 @@ PathEntry PathEntry_new(){ gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN ); // path entry - GtkHBox* hbox = GTK_HBOX( gtk_hbox_new( FALSE, 0 ) ); + GtkHBox* hbox = ui::HBox( FALSE, 0 ); gtk_widget_show( GTK_WIDGET( hbox ) ); GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); diff --git a/libs/uilib/uilib.cpp b/libs/uilib/uilib.cpp index 54b7f510..3e636016 100644 --- a/libs/uilib/uilib.cpp +++ b/libs/uilib/uilib.cpp @@ -94,7 +94,7 @@ namespace ui { CheckButton::CheckButton(const char *label) : CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new_with_label(label))) { } - ScrolledWindow::ScrolledWindow() : ScrolledWindow(GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(nullptr, nullptr))) + HBox::HBox(bool homogenous, int spacing) : HBox(GTK_HBOX(gtk_hbox_new(homogenous, spacing))) { } Label::Label(const char *label) : Label(GTK_LABEL(gtk_label_new(label))) @@ -103,6 +103,9 @@ namespace ui { MenuItem::MenuItem(const char *label, bool mnemonic) : MenuItem(GTK_MENU_ITEM((mnemonic ? gtk_menu_item_new_with_mnemonic : gtk_menu_item_new_with_label)(label))) { } + ScrolledWindow::ScrolledWindow() : ScrolledWindow(GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(nullptr, nullptr))) + { } + TreeView::TreeView(TreeModel model) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new_with_model(model))) { } diff --git a/libs/uilib/uilib.h b/libs/uilib/uilib.h index f3d7a5db..d1b9962c 100644 --- a/libs/uilib/uilib.h +++ b/libs/uilib/uilib.h @@ -4,9 +4,11 @@ #include using ui_alignment = struct _GtkAlignment; +using ui_box = struct _GtkBox; using ui_button = struct _GtkButton; using ui_checkbutton = struct _GtkCheckButton; using ui_evkey = struct _GdkEventKey; +using ui_hbox = struct _GtkHBox; using ui_label = struct _GtkLabel; using ui_menuitem = struct _GtkMenuItem; using ui_modal = struct ModalDialog; @@ -78,6 +80,7 @@ namespace ui { class Widget : public Base, public Convertible { public: + using native = ui_widget; explicit Widget(ui_widget *h = nullptr) : Base((void *) h) { } @@ -93,51 +96,58 @@ namespace ui { extern Widget root; -#define WRAP(name, impl, methods) \ - class name : public Widget, public Convertible { \ +#define WRAP(name, super, impl, methods) \ + class name : public super, public Convertible { \ public: \ - explicit name(impl *h) : Widget(reinterpret_cast(h)) {} \ + using native = impl; \ + explicit name(impl *h) : super(reinterpret_cast(h)) {} \ methods \ }; \ - static_assert(sizeof(name) == sizeof(Widget), "object slicing") + static_assert(sizeof(name) == sizeof(super), "object slicing") - WRAP(Alignment, ui_alignment, + WRAP(Alignment, Widget, ui_alignment, Alignment(float xalign, float yalign, float xscale, float yscale); ); - WRAP(Button, ui_button, + WRAP(Box, Widget, ui_box,); + + WRAP(Button, Widget, ui_button, Button(const char *label); ); - WRAP(CheckButton, ui_checkbutton, + WRAP(CheckButton, Widget, ui_checkbutton, CheckButton(const char *label); ); - WRAP(Label, ui_label, + WRAP(HBox, Box, ui_hbox, + HBox(bool homogenous, int spacing); + ); + + WRAP(Label, Widget, ui_label, Label(const char *label); ); - WRAP(MenuItem, ui_menuitem, + WRAP(MenuItem, Widget, ui_menuitem, MenuItem(const char *label, bool mnemonic = false); ); - WRAP(ScrolledWindow, ui_scrolledwindow, + WRAP(ScrolledWindow, Widget, ui_scrolledwindow, ScrolledWindow(); ); - WRAP(SpinButton, ui_widget,); + WRAP(SpinButton, Widget, ui_widget,); - WRAP(TreeModel, ui_treemodel,); + WRAP(TreeModel, Widget, ui_treemodel,); - WRAP(TreeView, ui_treeview, + WRAP(TreeView, Widget, ui_treeview, TreeView(TreeModel model); ); - WRAP(VBox, ui_vbox, + WRAP(VBox, Box, ui_vbox, VBox(bool homogenous, int spacing); ); - WRAP(Window, ui_window, + WRAP(Window, Widget, ui_window, Window() : Window(nullptr) {}; Window create_dialog_window(const char *title, void func(), void *data, int default_w = -1, diff --git a/plugins/textool/TexTool.cpp b/plugins/textool/TexTool.cpp index f8ed360f..eb776255 100644 --- a/plugins/textool/TexTool.cpp +++ b/plugins/textool/TexTool.cpp @@ -78,7 +78,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 ); gtk_widget_show( w ); - hbox = gtk_hbox_new( FALSE, 10 ); + hbox = ui::HBox( FALSE, 10 ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 ); gtk_widget_show( hbox ); diff --git a/radiant/dialog.cpp b/radiant/dialog.cpp index e59174ea..56814c92 100644 --- a/radiant/dialog.cpp +++ b/radiant/dialog.cpp @@ -505,7 +505,7 @@ void Dialog::addCombo( ui::Widget vbox, const char* name, int& data, StringArray void Dialog::addSlider( ui::Widget vbox, const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment ){ #if 0 if ( draw_value == FALSE ) { - ui::Widget hbox2 = gtk_hbox_new( FALSE, 0 ); + ui::Widget hbox2 = ui::HBox( FALSE, 0 ); gtk_widget_show( hbox2 ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 ); { diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index f1b9b434..6aeedb32 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -401,7 +401,7 @@ DirectionAttribute( const char* key ) : m_nonModalRadio.connect( m_radio.m_radio ); - m_hbox = GTK_HBOX( gtk_hbox_new( FALSE, 4 ) ); + m_hbox = ui::HBox( FALSE, 4 ); gtk_widget_show( GTK_WIDGET( m_hbox ) ); gtk_box_pack_start( GTK_BOX( m_hbox ), GTK_WIDGET( m_radio.m_hbox ), TRUE, TRUE, 0 ); @@ -483,12 +483,14 @@ class AnglesAttribute : public EntityAttribute std::string m_key; AnglesEntry m_angles; NonModalEntry m_nonModal; -GtkBox* m_hbox; +ui::HBox m_hbox; public: AnglesAttribute( const char* key ) : m_key( key ), - m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){ - m_hbox = GTK_BOX( gtk_hbox_new( TRUE, 4 ) ); + m_nonModal( ApplyCaller( *this ), + UpdateCaller( *this ) ), + m_hbox(ui::HBox( TRUE, 4 )) +{ gtk_widget_show( GTK_WIDGET( m_hbox ) ); { GtkEntry* entry = numeric_entry_new(); @@ -575,7 +577,7 @@ public: Vector3Attribute( const char* key ) : m_key( key ), m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){ - m_hbox = GTK_BOX( gtk_hbox_new( TRUE, 4 ) ); + m_hbox = ui::HBox( TRUE, 4 ); gtk_widget_show( GTK_WIDGET( m_hbox ) ); { GtkEntry* entry = numeric_entry_new(); @@ -1500,7 +1502,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ } { - GtkBox* hbox = GTK_BOX( gtk_hbox_new( TRUE, 4 ) ); + GtkBox* hbox = ui::HBox( TRUE, 4 ); gtk_widget_show( GTK_WIDGET( hbox ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 ); diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index bf37a1f2..f2126e78 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -143,7 +143,7 @@ ui::Window FindTextureDialog::BuildDialog(){ ui::Window dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent )); - hbox = ui::Widget(gtk_hbox_new( FALSE, 5 )); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( hbox ) ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 ); diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index c1682e5e..e809cf5c 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -772,7 +772,7 @@ static void CreateGtkTextEditor(){ g_object_set_data( G_OBJECT( dlg ), "text", (gpointer) text ); gtk_text_view_set_editable( GTK_TEXT_VIEW( text ), TRUE ); - hbox = ui::Widget(gtk_hbox_new( FALSE, 5 )); + hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 ); diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 6840c6bf..81a936b2 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -578,7 +578,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( vbox ) ); gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( vbox ) ); { - GtkHBox* hbox = GTK_HBOX( gtk_hbox_new( FALSE, 5 ) ); + GtkHBox* hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( GTK_WIDGET( hbox ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 ); { @@ -999,7 +999,7 @@ ui::Window PatchInspector::BuildDialog(){ GTK_WIDGET_UNSET_FLAGS( spin, GTK_CAN_FOCUS ); } } - GtkHBox* hbox2 = GTK_HBOX( gtk_hbox_new( TRUE, 5 ) ); + GtkHBox* hbox2 = ui::HBox( TRUE, 5 ); gtk_widget_show( GTK_WIDGET( hbox2 ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox2 ), TRUE, FALSE, 0 ); { diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 5a3298a6..f6e1704d 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -710,7 +710,7 @@ ui::Window PrefsDlg::BuildDialog(){ gtk_widget_show( mainvbox ); { - ui::Widget hbox = ui::Widget(gtk_hbox_new( FALSE, 5 )); + ui::Widget hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_end( GTK_BOX( mainvbox ), hbox, FALSE, TRUE, 0 ); @@ -729,7 +729,7 @@ ui::Window PrefsDlg::BuildDialog(){ } { - ui::Widget hbox = ui::Widget(gtk_hbox_new( FALSE, 5 )); + ui::Widget hbox = ui::HBox( FALSE, 5 ); gtk_box_pack_start( GTK_BOX( mainvbox ), hbox, TRUE, TRUE, 0 ); gtk_widget_show( hbox ); diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index eb35e56d..a1cdeec5 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -605,7 +605,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); { - ui::Widget hbox2 = ui::Widget(gtk_hbox_new( FALSE, 5 )); + ui::Widget hbox2 = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox2 ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 ); @@ -1063,7 +1063,7 @@ ui::Window SurfaceInspector::BuildDialog(){ g_signal_connect( G_OBJECT( TexTool::g_textoolWin ), "motion_notify_event", G_CALLBACK( TexTool::motion ), NULL ); } { - ui::Widget hbox = gtk_hbox_new( FALSE, 5 ); + ui::Widget hbox = ui::HBox( FALSE, 5 ); gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, FALSE, 0 ); // Checkboxes go here... (Flip X/Y) -- 2.39.2