if ( g_pWndPreview == NULL ) {
CreateViewWindow();
}
- gtk_widget_show( g_pWndPreview );
+ g_pWndPreview.show();
UpdatePreview( true );
}
#endif
auto dlg = g_pWndPreview = ui::Window( ui::window_type::TOP );
- gtk_window_set_title( GTK_WINDOW( dlg ), "GtkGenSurf Preview" );
+ gtk_window_set_title( dlg, "GtkGenSurf Preview" );
dlg.connect( "delete_event", G_CALLBACK( preview_close ), NULL );
dlg.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
- gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pWnd ) );
- gtk_window_set_default_size( GTK_WINDOW( dlg ), 300, 400 );
+ gtk_window_set_transient_for( dlg, g_pWnd );
+ gtk_window_set_default_size( dlg, 300, 400 );
auto vbox = ui::VBox( FALSE, 5 );
vbox.show();
#ifndef ISOMETRIC
auto hbox = ui::HBox( TRUE, 5 );
- gtk_widget_show( hbox );
+ hbox.show();
vbox.pack_start( hbox, FALSE, TRUE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( hbox ), 3 );
label = ui::Label( "Elevation" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
hbox.pack_start( label, FALSE, TRUE, 0 );
auto adj = ui::Adjustment( 30, -90, 90, 1, 10, 0 );
adj.connect( "value_changed", G_CALLBACK( preview_spin ), &elevation );
spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( spin );
+ spin.show();
hbox.pack_start( spin, FALSE, TRUE, 0 );
spin.connect( "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &elevation );
adj = ui::Adjustment( 30, 0, 359, 1, 10, 0 );
adj.connect( "value_changed", G_CALLBACK( preview_spin ), &azimuth );
spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( spin );
+ spin.show();
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( spin ), TRUE );
hbox.pack_end(spin, FALSE, TRUE, 0);
label = ui::Label( "Azimuth" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
hbox.pack_end(label, FALSE, TRUE, 0);
spin.connect( "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &azimuth );
g_pPreviewWidget.connect( "button_press_event",
G_CALLBACK( button_press ), NULL );
- gtk_widget_show( g_pPreviewWidget );
+ g_pPreviewWidget.show();
frame.add(ui::Widget(g_pPreviewWidget));
if ( Preview ) {
- gtk_widget_show( g_pWndPreview );
+ g_pWndPreview.show();
}
UpdatePreview( true );