---------------------------------*/
typedef struct {
- ui::Widget cbTexChange;
- ui::Widget editTexOld, editTexNew;
+ ui::Widget cbTexChange{ui::null};
+ ui::Widget editTexOld{ui::null}, editTexNew{ui::null};
- ui::Widget cbScaleHor, cbScaleVert;
- ui::Widget editScaleHor, editScaleVert;
+ ui::Widget cbScaleHor{ui::null}, cbScaleVert{ui::null};
+ ui::Widget editScaleHor{ui::null}, editScaleVert{ui::null};
- ui::Widget cbShiftHor, cbShiftVert;
- ui::Widget editShiftHor, editShiftVert;
+ ui::Widget cbShiftHor{ui::null}, cbShiftVert{ui::null};
+ ui::Widget editShiftHor{ui::null}, editShiftVert{ui::null};
- ui::Widget cbRotation;
- ui::Widget editRotation;
+ ui::Widget cbRotation{ui::null};
+ ui::Widget editRotation{ui::null};
}dlg_texReset_t;
dlg_texReset_t dlgTexReset;
*ret = (EMessageBoxReturn)gpointer_to_int( data );
}
-static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
- int *loop;
-
- gtk_widget_hide( widget );
- loop = (int*)g_object_get_data( G_OBJECT( widget ), "loop" );
+static gint dialog_delete_callback( ui::Widget widget, GdkEvent* event, gpointer data ){
+ widget.hide();
+ int *loop = (int *) g_object_get_data(G_OBJECT(widget), "loop");
*loop = 0;
-
return TRUE;
}
*/
EMessageBoxReturn DoMessageBox( const char* lpText, const char* lpCaption, EMessageBoxType type ){
- ui::Widget w, vbox, hbox;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
g_object_set_data( G_OBJECT( window ), "ret", &ret );
gtk_widget_realize( window );
- vbox = ui::VBox( FALSE, 10 );
+ auto vbox = ui::VBox( FALSE, 10 );
window.add(vbox);
gtk_widget_show( vbox );
gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
gtk_widget_show( w );
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
gtk_main_iteration();
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
rs->bDuplicateOnly = gtk_toggle_button_get_active( (GtkToggleButton*)check2 ) ? true : false;
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
// -djbob
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
//-djbob
}
EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){
- ui::Widget w, hbox;
-
- ui::Entry text1, text2, text3;
- ui::Widget check1, check2;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
- text1 = ui::Entry( 256 );
+ auto text1 = ui::Entry( 256 );
gtk_entry_set_text( text1, "25" );
gtk_box_pack_start( GTK_BOX( hbox ), text1, FALSE, FALSE, 2 );
gtk_widget_show( text1 );
// ---- hbox ----
- text2 = ui::Entry( 256 );
+ auto text2 = ui::Entry( 256 );
gtk_entry_set_text( text2, "3" );
gtk_box_pack_start( GTK_BOX( hbox ), text2, FALSE, FALSE, 2 );
gtk_widget_show( text2 );
// ---- hbox ----
- text3 = ui::Entry( 256 );
+ auto text3 = ui::Entry( 256 );
gtk_entry_set_text( text3, "-800" );
gtk_box_pack_start( GTK_BOX( hbox ), text3, FALSE, FALSE, 2 );
gtk_widget_show( text3 );
gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
gtk_widget_show( w );
- check1 = ui::CheckButton( "No Dynamic Update" );
+ auto check1 = ui::CheckButton( "No Dynamic Update" );
gtk_box_pack_start( GTK_BOX( vbox ), check1, FALSE, FALSE, 0 );
gtk_widget_show( check1 );
- check2 = ui::CheckButton( "Show Bounding Lines" );
+ auto check2 = ui::CheckButton( "Show Bounding Lines" );
gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 );
gtk_widget_show( check2 );
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
EMessageBoxReturn DoCTFColourChangeBox(){
- ui::Widget w, hbox;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 );
gtk_widget_show( hbox );
gtk_main_iteration();
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){
Str texSelected;
- ui::Widget w, hbox;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){
Str texSelected;
- ui::Widget w, hbox;
+ ui::Widget w{ui::null};
- ui::Widget radiusX, radiusY;
- ui::Widget angleStart, angleEnd;
- ui::Widget heightStart, heightEnd;
- ui::Widget numPoints;
+ ui::Widget radiusX{ui::null}, radiusY{ui::null};
+ ui::Widget angleStart{ui::null}, angleEnd{ui::null};
+ ui::Widget heightStart{ui::null}, heightEnd{ui::null};
+ ui::Widget numPoints{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
// ailmanki
// add a simple input for the MakeChain thing..
EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){
- ui::Widget w;
- ui::Entry textlinkNum, textlinkName;
+ ui::Widget w{ui::null};
+ ui::Entry textlinkNum{ui::null}, textlinkName{ui::null};
EMessageBoxReturn ret;
int loop = 1;
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}