]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/gtkgensurf/gendlgs.cpp
GTK: wrap GTK_WIDGET
[xonotic/netradiant.git] / contrib / gtkgensurf / gendlgs.cpp
index 14ccf40b9f8d9f43e12ac75c8fae54a53fbc741c..a6545f34ea13c88ac02adb8c353571e32965f7f3 100644 (file)
@@ -32,7 +32,7 @@
 //#define BUFF_SIZE    32768
 
 #define ENABLE_WIDGET( name,enable ) \
-       gtk_widget_set_sensitive( GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), ( name ) ) ), ( enable ) )
+       gtk_widget_set_sensitive( g_object_get_data( G_OBJECT( g_pWnd , ( name ) ) ), ( enable ) )
 #define CHECK_WIDGET( name,check ) \
        gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( g_object_get_data( G_OBJECT( g_pWnd ), name ) ), check )
 
@@ -111,12 +111,12 @@ static void SetupControls(){
 
        case EXTENTS_TAB:
                if ( Game != QUAKE3 ) {
-                       gtk_widget_hide( GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "use_patches" ) ) );
+                       gtk_widget_hide( g_object_get_data( G_OBJECT( g_pWnd , "use_patches" ) ) );
                        ENABLE_WIDGET( "use_patches", FALSE );
                }
                else
                {
-                       gtk_widget_show( GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "use_patches" ) ) );
+                       gtk_widget_show( g_object_get_data( G_OBJECT( g_pWnd , "use_patches" ) ) );
                        ENABLE_WIDGET( "use_patches", TRUE );
                }
 
@@ -316,7 +316,7 @@ static void SetDlgValues( int tab ){
                                                                  Decimate );
 
                if ( Game == QUAKE3 && UsePatches ) {
-                       gtk_widget_set_sensitive( GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "decimate" ) ), FALSE );
+                       gtk_widget_set_sensitive( g_object_get_data( G_OBJECT( g_pWnd , "decimate" ) ), FALSE );
 
                        if ( NH % 2 ) {
                                NH++;
@@ -363,7 +363,7 @@ static void SetDlgValues( int tab ){
                }
                else
                {
-                       gtk_widget_set_sensitive( GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "decimate" ) ), TRUE );
+                       gtk_widget_set_sensitive( g_object_get_data( G_OBJECT( g_pWnd , "decimate" ) ), TRUE );
 
                        gpointer spin = g_object_get_data( G_OBJECT( g_pWnd ), "nh" );
                        GtkAdjustment *adj = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
@@ -718,7 +718,7 @@ static void main_about( GtkWidget *widget, gpointer data ){
 }
 
 static void main_go( GtkWidget *widget, gpointer data ){
-       GtkWidget *notebook = GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "notebook" ) );
+       GtkWidget *notebook = g_object_get_data( G_OBJECT( g_pWnd , "notebook" ) );
        char Text[256];
 
        ReadDlgValues( current_tab );
@@ -1100,19 +1100,19 @@ void create_tooltips(){
 
        // Main
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "go" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "go" ) ),
                                                  "Accept all input and generate a surface in Q3Radiant",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "open" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "open" ) ),
                                                  "Open a previously saved GenSurf settings file.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "save" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "save" ) ),
                                                  "Save all settings to a file.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "defaults" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "defaults" ) ),
                                                  "Restore default values from DEFAULTS.SRF. If this file does not exist, GenSurf "
                                                  "initializes all input parameters to reasonable values. You can create your own "
                                                  "default surface by setting all parameters to your liking, then saving a settings "
@@ -1120,105 +1120,105 @@ void create_tooltips(){
                                                  "" );
 
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "main_preview" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "main_preview" ) ),
                                                  "View a wire-frame representation of the surface",
                                                  "" );
 
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "main_antialiasing" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "main_antialiasing" ) ),
                                                  "The lines in the preview window are antialiased for better quality",
                                                  "" );
 
        // General tab
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( wave_radios[0] ),
+                                                 wave_radios[0] ,
                                                  "Builds a surface with alternating hills and valleys. Uses the general form Z=cos(X) "
                                                  "x sin(Y)",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( wave_radios[1] ),
+                                                 wave_radios[1] ,
                                                  "Builds a surface with ridges parallel to the vertical axis.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( wave_radios[2] ),
+                                                 wave_radios[2] ,
                                                  "Builds a surface with ridges parallel to the horizontal axis.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( wave_radios[3] ),
+                                                 wave_radios[3] ,
                                                  "Builds a map from a bitmap image representing a contour plot. Click the \"Bitmap\" "
                                                  "tab to select the image. GenSurf only supports 256-color (8 bit) "
                                                  "bitmaps. GenSurf will work with any 256-color bitmap, but gray scale bitmaps are a bit "
                                                  "more intuitive.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( wave_radios[4] ),
+                                                 wave_radios[4] ,
                                                  "Builds a random surface using the Plasma Cloud technique. Variance is controlled "
                                                  "by the Roughness input. To build a surface with completely random values not "
                                                  "dependent on neighboring vertices, use one of the other waveforms with 0 amplitude.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "wavelength" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "wavelength" ) ),
                                                  "Enter the wavelength (distance between crests). NOTE: Wavelengths equal to the grid "
                                                  "size or 2 times the grid size will result in 0 amplitudes. For best results, the "
                                                  "wavelength value should be at least 4 times the grid size (extents divided by the "
                                                  "number of divisions",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "amplitude" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "amplitude" ) ),
                                                  "Enter the height of hills/ridges.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "roughness" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "roughness" ) ),
                                                  "Enter the roughness value (noise) for the surface. For fractal surfaces, this value "
                                                  "is used as a variance in the fractal calculations.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "random" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "random" ) ),
                                                  "Seed value for the pseudo-random number generator.",
                                                  "" );
        // Extents tab
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "hmin" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "hmin" ) ),
                                                  "Minimum horizontal coordinate of the surface, i.e. X for a surface parallel to "
                                                  "the XY or XZ planes, Y for a surface parallel to the YZ plane. For best results, "
                                                  "the extents (maximum-minimum values) in a given direction should be evenly "
                                                  "divisible by the number of divisions in that direction.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "hmax" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "hmax" ) ),
                                                  "Maximum horizontal coordinate of the surface, i.e. X for a surface parallel to "
                                                  "the XY or XZ planes, Y for a surface parallel to the YZ plane. For best results, "
                                                  "the extents (maximum-minimum values) in a given direction should be evenly "
                                                  "divisible by the number of divisions in that direction.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "vmin" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "vmin" ) ),
                                                  "Minimum vertical coordinate of the surface, i.e. Y for a surface parallel to "
                                                  "the XY plane, Z for a surface parallel to the XZ or YZ planes. For best results, "
                                                  "the extents (maximum-minimum values) in a given direction should be evenly "
                                                  "divisible by the number of divisions in that direction.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "vmax" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "vmax" ) ),
                                                  "Maximum vertical coordinate of the surface, i.e. Y for a surface parallel to "
                                                  "the XY plane, Z for a surface parallel to the XZ or YZ planes. For best results, "
                                                  "the extents (maximum-minimum values) in a given direction should be evenly "
                                                  "divisible by the number of divisions in that direction.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "nh" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "nh" ) ),
                                                  "Number of divisions in the horizontal direction. For best results, the extents "
                                                  "in a given direction should be evenly divisible by the number of divisions in "
                                                  "that direction.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "nv" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "nv" ) ),
                                                  "Number of divisions in the vertical direction. For best results, the extents "
                                                  "in a given direction should be evenly divisible by the number of divisions in "
                                                  "that direction.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "use_patches" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "use_patches" ) ),
                                                  "Produce one or more curved patches in the shape of your selected surface rather "
                                                  "than producing solid brushes. Depending on the size of your surface (and the "
                                                  "user's graphic detail settings, which you cannot control), curved surfaces will "
@@ -1226,7 +1226,7 @@ void create_tooltips(){
                                                  "concerning curved surfaces on the GenSurf web page before using this feature.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "decimate" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "decimate" ) ),
                                                  "Use the slider to control the number of vertices discarded by GenSurf. For many "
                                                  "surfaces, you can produce roughly the same shape surface with a high decimation "
                                                  "value. This will generally result in a map with lower polygon counts (and better "
@@ -1234,71 +1234,71 @@ void create_tooltips(){
                                                  "surfaces in Q3",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z00" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "z00" ) ),
                                                  "Enter the height of the surface at the lower left corner. This value will likely "
                                                  "be modified unless \"Linear Borders\" is checked.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z01" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "z01" ) ),
                                                  "Enter the height of the surface at the upper left corner. This value will likely "
                                                  "be modified unless \"Linear Borders\" is checked.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z10" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "z10" ) ),
                                                  "Enter the height of the surface at the lower right corner. This value will likely "
                                                  "be modified unless \"Linear Borders\" is checked.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z11" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "z11" ) ),
                                                  "Enter the height of the surface at the upper right corner. This value will likely "
                                                  "be modified unless \"Linear Borders\" is checked.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "linearborder" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "linearborder" ) ),
                                                  "Restrict the edges of the surface to a straight line. This will help match up "
                                                  "brush edges if you drop this surface into another map.",
                                                  "" );
        // Bitmap tab
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_file" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "bmp_file" ) ),
                                                  "Type the name of an 8-bit bitmap image file, or click Browse to select an image "
                                                  "from a list of those available on your system.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_file_browse" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "bmp_file_browse" ) ),
                                                  "Select a bitmap image file from a list of those available on your system.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_reload" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "bmp_reload" ) ),
                                                  "Reload the selected bitmap file after making changes in an external image editor.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_black" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "bmp_black" ) ),
                                                  "Enter the value corresponding to color index 0 in the bitmap file. For gray scale "
                                                  "images, color 0 is normally black.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_white" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "bmp_white" ) ),
                                                  "Enter the value corresponding to color index 255 in the bitmap file. For gray scale "
                                                  "images, color 255 is normally white.",
                                                  "" );
        // Fixpoints tab
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_value" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "fix_value" ) ),
                                                  "Enter a value for the selected vertex. This value will not be adjusted when applying "
                                                  "a waveform or roughness to the surface. Unlock this vertex (so that it will be "
                                                  "adjusted normally) by clicking \"Free\". This vertex will influence vertices within "
                                                  "the \"Range affected\" of this vertex.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_range" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "fix_range" ) ),
                                                  "Enter the range away from the selected vertex that other vertices will be affected. "
                                                  "Use 0 if you don't want other vertices to be influenced by the currently selected "
                                                  "one. Note: this box is disabled if you've chosen the fractal generator, as it uses "
                                                  "a completely different method for determining values.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_rate" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "fix_rate" ) ),
                                                  "Enter a rate of change for the surface affected by the fixed value. 0 gives a smooth "
                                                  "sinusoidal curve, values less than 0 give progressively sharper spikes, and values "
                                                  "greater than 0 take on a square shape. Values less than -30 or greater than 30 are "
@@ -1306,32 +1306,32 @@ void create_tooltips(){
                                                  "you also specify a \"range affected\".",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_free" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "fix_free" ) ),
                                                  "Click this to free (unlock the value of) the currently selected vertex.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_freeall" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "fix_freeall" ) ),
                                                  "Click this to free (unlock the values of) all vertices.",
                                                  "" );
        // Texture tab
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "texture1" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "texture1" ) ),
                                                  "Enter the name of the texture or shader used for the surface faces.",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "texture2" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "texture2" ) ),
                                                  "Enter the name of the texture or shader used for faces other than the surface. Under "
                                                  "normal circumstances this should be \"common/caulk\"",
                                                  "" );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "texture3" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "texture3" ) ),
                                                  "Enter the name of the texture or shader used for \"steep\" surface faces, where \"steep\" "
                                                  "is the angle specified below. If this entry is left blank or if the \"steep\" angle is 0, "
                                                  "all surface faces will use the texture specified by \"Surface\".",
                                                  "" );
 
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ),
-                                                 GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "detail" ) ),
+                                                 g_object_get_data( G_OBJECT( g_pWnd , "detail" ) ),
                                                  "Check this box to use the detail content property on the generated brushes. Compile "
                                                  "times will be considerably shorter if the detail property is used, though the surface "
                                                  "will not block visibility at all. If you use the detail property, you should make sure "
@@ -1367,7 +1367,7 @@ GtkWidget* create_main_dialog(){
        gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 );
 
        notebook = gtk_notebook_new();
-       gtk_widget_show( notebook );
+       notebook.show();
        hbox.pack_start( notebook, TRUE, TRUE, 0 );
        notebook.connect( "switch_page",
                                          G_CALLBACK( switch_page ), NULL );
@@ -1375,17 +1375,17 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "notebook", notebook );
 
        table = ui::Table( 2, 2, FALSE );
-       gtk_widget_show( table );
+       table.show();
        gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "General" );
-       gtk_widget_show( label );
+       label.show();
        gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), table, label );
 
        auto frame = ui::Frame( "Game" );
-       gtk_widget_show( frame );
+       frame.show();
        gtk_table_attach( GTK_TABLE( table ), frame, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1398,7 +1398,7 @@ GtkWidget* create_main_dialog(){
        for ( i = 0, group = NULL; i < NUMGAMES; i++ )
        {
                radio = gtk_radio_button_new_with_label( group, games[i] );
-               gtk_widget_show( radio );
+               radio.show();
                vbox.pack_start( radio, TRUE, TRUE, 0 );
                group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
                game_radios[i] = radio;
@@ -1406,7 +1406,7 @@ GtkWidget* create_main_dialog(){
        }
 
        frame = ui::Frame( "Waveform" );
-       gtk_widget_show( frame );
+       frame.show();
        gtk_table_attach( GTK_TABLE( table ), frame, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1419,7 +1419,7 @@ GtkWidget* create_main_dialog(){
        for ( i = 0, group = NULL; i < 5; i++ )
        {
                radio = gtk_radio_button_new_with_label( group, waveforms[i] );
-               gtk_widget_show( radio );
+               radio.show();
                vbox.pack_start( radio, TRUE, TRUE, 0 );
                group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
                wave_radios[i] = radio;
@@ -1427,7 +1427,7 @@ GtkWidget* create_main_dialog(){
        }
 
        frame = ui::Frame( "Orientation" );
-       gtk_widget_show( frame );
+       frame.show();
        gtk_table_attach( GTK_TABLE( table ), frame, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1440,7 +1440,7 @@ GtkWidget* create_main_dialog(){
        for ( i = 0, group = NULL; i < 6; i++ )
        {
                radio = gtk_radio_button_new_with_label( group, orientations[i] );
-               gtk_widget_show( radio );
+               radio.show();
                vbox.pack_start( radio, TRUE, TRUE, 0 );
                group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
                plane_radios[i] = radio;
@@ -1448,7 +1448,7 @@ GtkWidget* create_main_dialog(){
        }
 
        table2 = ui::Table( 4, 2, FALSE );
-       gtk_widget_show( table2 );
+       table2.show();
        gtk_table_set_row_spacings( GTK_TABLE( table2 ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table2 ), 5 );
        gtk_table_attach( GTK_TABLE( table ), table2, 1, 2, 1, 2,
@@ -1456,7 +1456,7 @@ GtkWidget* create_main_dialog(){
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
 
        label = ui::Label( "Wavelength:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table2 ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1464,7 +1464,7 @@ GtkWidget* create_main_dialog(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
 
        label = ui::Label( "Max. amplitude:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table2 ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1472,7 +1472,7 @@ GtkWidget* create_main_dialog(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
 
        label = ui::Label( "Roughness:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table2 ), label, 0, 1, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1480,7 +1480,7 @@ GtkWidget* create_main_dialog(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
 
        label = ui::Label( "Random seed:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table2 ), label, 0, 1, 3, 4,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1488,7 +1488,7 @@ GtkWidget* create_main_dialog(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table2 ), entry, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1497,7 +1497,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &WaveLength );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table2 ), entry, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1506,7 +1506,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Amplitude );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table2 ), entry, 1, 2, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1517,7 +1517,7 @@ GtkWidget* create_main_dialog(){
        adj = ui::Adjustment( 1, 1, 32767, 1, 10, 0 );
        adj.connect( "value_changed", G_CALLBACK( general_random ), NULL );
        spin = ui::SpinButton( adj, 1, 0 );
-       gtk_widget_show( spin );
+       spin.show();
        gtk_table_attach( GTK_TABLE( table2 ), spin, 1, 2, 3, 4,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1525,19 +1525,19 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "random", spin );
 
        vbox = ui::VBox( FALSE, 5 );
-       gtk_widget_show( vbox );
+       vbox.show();
        gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
 
        label = ui::Label( "Extents" );
-       gtk_widget_show( label );
+       label.show();
        gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label );
 
        hbox2 = ui::HBox( FALSE, 5 );
-       gtk_widget_show( hbox2 );
+       hbox2.show();
        vbox.pack_start( hbox2, FALSE, TRUE, 0 );
 
        frame = ui::Frame( "Extents" );
-       gtk_widget_show( frame );
+       frame.show();
        hbox2.pack_start( frame, TRUE, TRUE, 0 );
 
        auto table = ui::Table( 3, 4, FALSE );
@@ -1548,47 +1548,47 @@ GtkWidget* create_main_dialog(){
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "X:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        g_object_set_data( G_OBJECT( dlg ), "hmin_text", label );
 
        label = ui::Label( "X:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        g_object_set_data( G_OBJECT( dlg ), "hmax_text", label );
 
        label = ui::Label( "Y:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        g_object_set_data( G_OBJECT( dlg ), "vmin_text", label );
 
        label = ui::Label( "Y:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 2, 3,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        g_object_set_data( G_OBJECT( dlg ), "vmax_text", label );
 
        label = ui::Label( "Lower-left" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        label = ui::Label( "Upper-right" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 3, 4, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1597,7 +1597,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hll );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1606,7 +1606,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hur );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1615,7 +1615,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vll );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1624,7 +1624,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vur );
 
        frame = ui::Frame( "Divisions" );
-       gtk_widget_show( frame );
+       frame.show();
        hbox2.pack_start( frame, TRUE, TRUE, 0 );
 
        table = ui::Table( 2, 2, FALSE );
@@ -1635,14 +1635,14 @@ GtkWidget* create_main_dialog(){
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "X:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
        g_object_set_data( G_OBJECT( dlg ), "nh_text", label );
 
        label = ui::Label( "Y:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1651,7 +1651,7 @@ GtkWidget* create_main_dialog(){
        adj = ui::Adjustment( 8, 1, MAX_ROWS, 1, 10, 0 );
        adj.connect( "value_changed", G_CALLBACK( extents_nhnv_spin ), &NH );
        spin = ui::SpinButton( adj, 1, 0 );
-       gtk_widget_show( spin );
+       spin.show();
        gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1661,7 +1661,7 @@ GtkWidget* create_main_dialog(){
        adj = ui::Adjustment( 8, 1, MAX_ROWS, 1, 10, 0 );
        adj.connect( "value_changed", G_CALLBACK( extents_nhnv_spin ), &NV );
        spin = ui::SpinButton( adj, 1, 0 );
-       gtk_widget_show( spin );
+       spin.show();
        gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1669,46 +1669,46 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "nv", spin );
 
        check = ui::CheckButton( "Use Bezier patches" );
-       gtk_widget_show( check );
+       check.show();
        vbox.pack_start( check, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "use_patches", check );
        check.connect( "toggled", G_CALLBACK( extents_use_patches ), NULL );
 
        // ^Fishman - Snap to grid, replaced scroll bar with a texbox.
        label = ui::Label( "Snap to grid:" );
-       gtk_widget_show( label );
+       label.show();
        vbox.pack_start( label, FALSE, TRUE, 0 );
        gtk_object_set_data( GTK_OBJECT( dlg ), "snap_text", label );
 
        adj = ui::Adjustment( 8, 0, 256, 1, 10, 0 );
        adj.connect( "value_changed", G_CALLBACK( extents_snaptogrid_spin ), &SP );
        spin = ui::SpinButton( adj, 1, 0 );
-       gtk_widget_show( spin );
+       spin.show();
        vbox.pack_start( spin, FALSE, TRUE, 0 );
        gtk_widget_set_size_request( spin, 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "sp", spin );
        // ^Fishman - End of Snap to grid code.
 
        hbox2 = ui::HBox( FALSE, 5 );
-       gtk_widget_show( hbox2 );
+       hbox2.show();
        vbox.pack_start( hbox2, FALSE, TRUE, 10 );
 
        label = ui::Label( "Decimate:" );
-       gtk_widget_show( label );
+       label.show();
        hbox2.pack_start( label, FALSE, TRUE, 0 );
 
        adj = ui::Adjustment( 0, 0, 110, 1, 10, 0 );
        adj.connect( "value_changed", G_CALLBACK( extents_decimate ), NULL );
        g_object_set_data( G_OBJECT( dlg ), "decimate_adj", adj );
        scale = ui::HScale( adj );
-       gtk_widget_show( scale );
+       scale.show();
        hbox2.pack_start( scale, TRUE, TRUE, 0 );
        gtk_scale_set_value_pos( GTK_SCALE( scale ), GTK_POS_RIGHT );
        gtk_scale_set_digits( GTK_SCALE( scale ), 0 );
        g_object_set_data( G_OBJECT( dlg ), "decimate", scale );
 
        frame = ui::Frame( "Corner values" );
-       gtk_widget_show( frame );
+       frame.show();
        vbox.pack_start( frame, FALSE, TRUE, 0 );
 
        table = ui::Table( 3, 4, FALSE );
@@ -1719,31 +1719,31 @@ GtkWidget* create_main_dialog(){
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "Upper-left:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        label = ui::Label( "Lower-left:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        label = ui::Label( "Upper-right:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        label = ui::Label( "Lower-right:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1752,7 +1752,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z01 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1761,7 +1761,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z00 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1770,7 +1770,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z11 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1779,7 +1779,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z10 );
 
        check = ui::CheckButton( "Linear borders" );
-       gtk_widget_show( check );
+       check.show();
        gtk_table_attach( GTK_TABLE( table ), check, 0, 4, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
@@ -1787,34 +1787,34 @@ GtkWidget* create_main_dialog(){
        check.connect( "toggled", G_CALLBACK( extents_linearborder ), NULL );
 
        vbox = ui::VBox( FALSE, 10 );
-       gtk_widget_show( vbox );
+       vbox.show();
        gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
 
        label = ui::Label( "Bitmap" );
-       gtk_widget_show( label );
+       label.show();
        gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label );
 
        label = ui::Label( "" );
-       gtk_widget_show( label );
+       label.show();
        vbox.pack_start( label, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_note", label );
 
        table = ui::Table( 2, 2, FALSE );
-       gtk_widget_show( table );
+       table.show();
        gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
        vbox.pack_start( table, FALSE, TRUE, 0 );
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "Filename:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_text1", label );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1822,34 +1822,34 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( bitmap_file_entryfocusout ), NULL );
 
        hbox2 = ui::HBox( TRUE, 5 );
-       gtk_widget_show( hbox2 );
+       hbox2.show();
        gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( 0 ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
 
        button = ui::Button( "Browse..." );
-       gtk_widget_show( button );
+       button.show();
        hbox2.pack_start( button, FALSE, FALSE, 0 );
        gtk_widget_set_size_request( button, 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_file_browse", button );
        button.connect( "clicked", G_CALLBACK( bitmap_browse ), NULL );
 
        button = ui::Button( "Reload" );
-       gtk_widget_show( button );
+       button.show();
        hbox2.pack_start( button, FALSE, FALSE, 0 );
        gtk_widget_set_size_request( button, 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_reload", button );
        button.connect( "clicked", G_CALLBACK( bitmap_reload ), NULL );
 
        table = ui::Table( 2, 2, TRUE );
-       gtk_widget_show( table );
+       table.show();
        gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
        vbox.pack_start( table, FALSE, TRUE, 0 );
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "Map color 0 to:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1858,7 +1858,7 @@ GtkWidget* create_main_dialog(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
 
        label = ui::Label( "Map color 255 to:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1867,37 +1867,37 @@ GtkWidget* create_main_dialog(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
 
        hbox2 = ui::HBox( FALSE, 5 );
-       gtk_widget_show( hbox2 );
+       hbox2.show();
        gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        hbox2.pack_start( entry, FALSE, FALSE, 0 );
        gtk_widget_set_size_request( entry, 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_black", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.black_value );
 
        hbox2 = ui::HBox( FALSE, 5 );
-       gtk_widget_show( hbox2 );
+       hbox2.show();
        gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        hbox2.pack_start( entry, FALSE, FALSE, 0 );
        gtk_widget_set_size_request( entry, 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_white", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.white_value );
 
        vbox = ui::VBox( FALSE, 10 );
-       gtk_widget_show( vbox );
+       vbox.show();
        gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
 
        label = ui::Label( "Fix Points" );
-       gtk_widget_show( label );
+       label.show();
        gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label );
 
        label = ui::Label( "Click on a vertex in the lower half of the preview window,\n"
@@ -1906,18 +1906,18 @@ GtkWidget* create_main_dialog(){
                                                   "selection. Use Shift+Click to select a range of vertices.\n\n"
                                                   "Click \"Free\" to unlock a vertex. Vertices within \"Range\n"
                                                   "affected\" will be influenced by this vertex." );
-       gtk_widget_show( label );
+       label.show();
        vbox.pack_start( label, FALSE, TRUE, 0 );
 
        table = ui::Table( 3, 3, FALSE );
-       gtk_widget_show( table );
+       table.show();
        gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
        vbox.pack_start( table, FALSE, TRUE, 0 );
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "Value:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1925,7 +1925,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "fix_value_text", label );
 
        label = ui::Label( "Range affected:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1933,7 +1933,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "fix_range_text", label );
 
        label = ui::Label( "Rate of change:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1943,7 +1943,7 @@ GtkWidget* create_main_dialog(){
        adj = ui::Adjustment( 0, -65536, 65536, 1, 16, 0 );
        adj.connect( "value_changed", G_CALLBACK( fix_value_changed ), NULL );
        spin = ui::SpinButton( adj, 1, 0 );
-       gtk_widget_show( spin );
+       spin.show();
        gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_EXPAND ), 0, 0 );
@@ -1952,7 +1952,7 @@ GtkWidget* create_main_dialog(){
        spin.connect( "focus_out_event", G_CALLBACK( fix_value_entryfocusout ), NULL );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1961,7 +1961,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( fix_range_entryfocusout ), NULL );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1970,7 +1970,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( fix_rate_entryfocusout ), NULL );
 
        button = ui::Button( "Free" );
-       gtk_widget_show( button );
+       button.show();
        gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1979,7 +1979,7 @@ GtkWidget* create_main_dialog(){
        button.connect( "clicked", G_CALLBACK( fix_free ), NULL );
 
        button = ui::Button( "Free All" );
-       gtk_widget_show( button );
+       button.show();
        gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -1988,43 +1988,43 @@ GtkWidget* create_main_dialog(){
        button.connect( "clicked", G_CALLBACK( fix_freeall ), NULL );
 
        vbox = ui::VBox( FALSE, 10 );
-       gtk_widget_show( vbox );
+       vbox.show();
        gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
 
        label = ui::Label( "Texture" );
-       gtk_widget_show( label );
+       label.show();
        gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label );
 
        // ^Fishman - Modified to add more labels and textboxes.
        table = ui::Table( 5, 2, FALSE );
-       gtk_widget_show( table );
+       table.show();
        vbox.pack_start( table, FALSE, TRUE, 0 );
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "Surface:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
 
        label = ui::Label( "Other:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
 
        label = ui::Label( "Steep:" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
        gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2033,7 +2033,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 0 ) );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2042,7 +2042,7 @@ GtkWidget* create_main_dialog(){
        entry.connect( "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 1 ) );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2050,39 +2050,39 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "texture3", entry );
 
        hbox2 = ui::HBox( FALSE, 5 );
-       gtk_widget_show( hbox2 );
+       hbox2.show();
        vbox.pack_start( hbox2, FALSE, TRUE, 0 );
 
        label = ui::Label( "\"Steep\" angle:" );
-       gtk_widget_show( label );
+       label.show();
        hbox2.pack_start( label, FALSE, TRUE, 0 );
 
        adj = ui::Adjustment( 60, 0, 90, 1, 10, 0 );
        spin = ui::SpinButton( adj, 1, 0 );
-       gtk_widget_show( spin );
+       spin.show();
        hbox2.pack_start( spin, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "tex_slant", spin );
 
        table = ui::Table( 2, 4, TRUE );
-       gtk_widget_show( table );
+       table.show();
        vbox.pack_start( table, FALSE, TRUE, 0 );
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
        label = ui::Label( "Offset <h,v>" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 0, 2, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        label = ui::Label( "Scale <h,v>" );
-       gtk_widget_show( label );
+       label.show();
        gtk_table_attach( GTK_TABLE( table ), label, 2, 4, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2090,7 +2090,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "texoffsetx", entry );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2098,7 +2098,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "texoffsety", entry );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 2, 3, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2106,7 +2106,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "texscalex", entry );
 
        entry = ui::Entry();
-       gtk_widget_show( entry );
+       entry.show();
        gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
@@ -2116,71 +2116,71 @@ GtkWidget* create_main_dialog(){
 
 
        check = ui::CheckButton( "Use detail brushes" );
-       gtk_widget_show( check );
+       check.show();
        vbox.pack_start( check, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "detail", check );
        check.connect( "toggled", G_CALLBACK( texture_detail ), NULL );
 
        check = ui::CheckButton( "Detail hint brushes" );
-       gtk_widget_show( check );
+       check.show();
        vbox.pack_start( check, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "hint", check );
        check.connect( "toggled", G_CALLBACK( texture_hint ), NULL );
 
        // ^Fishman - Add terrain key to func_group.
        check = ui::CheckButton( "Add terrain key" );
-       gtk_widget_show( check );
+       check.show();
        vbox.pack_start( check, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "terrain_ent", check );
        check.connect( "toggled", G_CALLBACK( texture_terrainent ), NULL );
 
        vbox = ui::VBox( FALSE, 5 );
-       gtk_widget_show( vbox );
+       vbox.show();
        hbox.pack_start( vbox, FALSE, TRUE, 0 );
 
        button = ui::Button( "OK" );
-       gtk_widget_show( button );
+       button.show();
        vbox.pack_start( button, FALSE, TRUE, 0 );
        gtk_widget_set_size_request( button, 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "go", button );
        button.connect( "clicked", G_CALLBACK( main_go ), NULL );
 
        label = ui::Label( "Settings:" );
-       gtk_widget_show( label );
+       label.show();
        vbox.pack_start( label, FALSE, TRUE, 0 );
 
        button = ui::Button( "Open..." );
-       gtk_widget_show( button );
+       button.show();
        vbox.pack_start( button, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "open", button );
        button.connect( "clicked", G_CALLBACK( main_open ), NULL );
 
        button = ui::Button( "Save as..." );
-       gtk_widget_show( button );
+       button.show();
        vbox.pack_start( button, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "save", button );
        button.connect( "clicked", G_CALLBACK( main_save ), NULL );
 
        button = ui::Button( "Defaults" );
-       gtk_widget_show( button );
+       button.show();
        vbox.pack_start( button, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "defaults", button );
        button.connect( "clicked", G_CALLBACK( main_defaults ), NULL );
 
        button = ui::Button( "About..." );
-       gtk_widget_show( button );
+       button.show();
        vbox.pack_start( button, FALSE, TRUE, 0 );
        button.connect( "clicked", G_CALLBACK( main_about ), NULL );
 
        check = ui::CheckButton( "Preview" );
-       gtk_widget_show( check );
+       check.show();
        vbox.pack_start( check, FALSE, TRUE, 0 );
        check.connect( "toggled", G_CALLBACK( main_preview ), NULL );
        g_object_set_data( G_OBJECT( dlg ), "main_preview", check );
 
        // ^Fishman - Antializing for the preview window.
        check = ui::CheckButton( "Antialised lines" );
-       gtk_widget_show( check );
+       check.show();
        vbox.pack_start( check, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "main_antialiasing", check );
        check.connect( "toggled", G_CALLBACK( main_antialiasing ), NULL );