- entry = gtk_entry_new();
- gtk_widget_show( entry );
- 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 );
- gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
-
- check3d = gtk_check_button_new_with_label( "Show 3D" );
- gtk_widget_show( check3d );
- gtk_box_pack_start( GTK_BOX( hbox ), check3d, FALSE, FALSE, 0 );
-
- check2d = gtk_check_button_new_with_label( "Show 2D" );
- gtk_widget_show( check2d );
- gtk_box_pack_start( GTK_BOX( hbox ), check2d, FALSE, FALSE, 0 );
-
- button = gtk_button_new_with_label( "Change" );
- gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
- 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 );
- gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
-
- button = gtk_button_new_with_label( "Cancel" );
- gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
- gtk_signal_connect( GTK_OBJECT( button ), "clicked",
- GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
- gtk_widget_set_usize( button, 60, -2 );
-
- button = gtk_button_new_with_label( "OK" );
- gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
- gtk_signal_connect( GTK_OBJECT( button ), "clicked",
- GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
- gtk_widget_set_usize( button, 60, -2 );
+ auto entry = ui::Entry(ui::New);
+ entry.show();
+ gtk_editable_set_editable( GTK_EDITABLE( entry ), FALSE );
+ vbox.pack_start( entry, FALSE, FALSE, 0 );
+
+ auto hbox = ui::HBox( FALSE, 5 );
+ hbox.show();
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
+
+ auto check3d = ui::CheckButton( "Show 3D" );
+ check3d.show();
+ hbox.pack_start( check3d, FALSE, FALSE, 0 );
+
+ auto check2d = ui::CheckButton( "Show 2D" );
+ check2d.show();
+ hbox.pack_start( check2d, FALSE, FALSE, 0 );
+
+ auto button = ui::Button( "Change" );
+ button.show();
+ hbox.pack_end(button, FALSE, FALSE, 0);
+ button.connect( "clicked", G_CALLBACK( change_clicked ), entry );
+ button.dimensions(60, -1);
+
+ hbox = ui::HBox( FALSE, 5 );
+ hbox.show();
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
+
+ button = ui::Button( "Cancel" );
+ button.show();
+ hbox.pack_end(button, FALSE, FALSE, 0);
+ button.connect( "clicked",
+ G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
+ button.dimensions(60, -1);
+
+ button = ui::Button( "OK" );
+ button.show();
+ hbox.pack_end(button, FALSE, FALSE, 0);
+ button.connect( "clicked",
+ G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
+ button.dimensions(60, -1);