// create the window
auto window = ui::Window( ui::window_type::TOP );
- gtk_window_set_title( GTK_WINDOW( window ), "New Camera" );
+ gtk_window_set_title( window, "New Camera" );
window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
- gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
+ gtk_window_set_transient_for( window, g_pCameraInspectorWnd );
g_object_set_data( G_OBJECT( window ), "loop", &loop );
g_object_set_data( G_OBJECT( window ), "ret", &ret );
// -------------------------- //
- gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER );
+ gtk_window_set_position( window, GTK_WIN_POS_CENTER );
window.show();
gtk_grab_add( window );
// create the window
auto window = ui::Window( ui::window_type::TOP );
- gtk_window_set_title( GTK_WINDOW( window ), "Rename Path" );
+ gtk_window_set_title( window, "Rename Path" );
window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
- gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
+ gtk_window_set_transient_for( window, g_pCameraInspectorWnd );
g_object_set_data( G_OBJECT( window ), "loop", &loop );
g_object_set_data( G_OBJECT( window ), "ret", &ret );
// -------------------------- //
- gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER );
+ gtk_window_set_position( window, GTK_WIN_POS_CENTER );
window.show();
gtk_grab_add( window );
// create the window
auto window = ui::Window( ui::window_type::TOP );
- gtk_window_set_title( GTK_WINDOW( window ), "Add Target" );
+ gtk_window_set_title( window, "Add Target" );
window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
- gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
+ gtk_window_set_transient_for( window, g_pCameraInspectorWnd );
g_object_set_data( G_OBJECT( window ), "loop", &loop );
g_object_set_data( G_OBJECT( window ), "ret", &ret );
// -------------------------- //
- gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER );
+ gtk_window_set_position( window, GTK_WIN_POS_CENTER );
window.show();
gtk_grab_add( window );
// Select the last item in the listbox
li = g_list_last( GTK_LIST( GTK_COMBO( g_pPathListCombo )->list )->children );
- gtk_list_select_child( GTK_LIST( GTK_COMBO( g_pPathListCombo )->list ), GTK_WIDGET( li->data ) );
+ gtk_list_select_child( GTK_LIST( GTK_COMBO( g_pPathListCombo )->list ), li->data );
// If this was the first one, refresh the event list
if ( GetCurrentCam()->GetCam()->numTargets() == 1 ) {
combo_cam = firstCam;
while ( li && combo_cam ) {
if ( combo_cam == GetCurrentCam() ) {
- gtk_list_select_child( GTK_LIST( GTK_COMBO( g_pCamListCombo )->list ), GTK_WIDGET( li->data ) );
+ gtk_list_select_child( GTK_LIST( GTK_COMBO( g_pCamListCombo )->list ), li->data );
break;
}
li = li->next;
// create the window
auto window = ui::Window( ui::window_type::TOP );
- gtk_window_set_title( GTK_WINDOW( window ), "Add Event" );
+ gtk_window_set_title( window, "Add Event" );
window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
- gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
+ gtk_window_set_transient_for( window, g_pCameraInspectorWnd );
g_object_set_data( G_OBJECT( window ), "loop", &loop );
g_object_set_data( G_OBJECT( window ), "ret", &ret );
// -------------------------- //
- gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER );
+ gtk_window_set_position( window, GTK_WIN_POS_CENTER );
window.show();
gtk_grab_add( window );
// create the window
auto window = ui::Window( ui::window_type::TOP );
- gtk_window_set_title( GTK_WINDOW( window ), "Camera Inspector" );
+ gtk_window_set_title( window, "Camera Inspector" );
window.connect( "delete_event", G_CALLBACK( ci_close ), NULL );
window.connect( "expose_event", G_CALLBACK( ci_expose ), NULL );
// window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
- gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) );
+ gtk_window_set_transient_for( window, g_pRadiantWnd );
// don't use show, as you don't want to have it displayed on startup ;-)
gtk_widget_realize( window );
table.show();
window.add(table);
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
// the properties column
// -------------------------- //
vbox = ui::VBox( FALSE, 5 );
vbox.show();
- gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(vbox, {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
// -------------------------- //
auto frame = ui::Frame( "Path and Target editing" );
frame.show();
- gtk_table_attach( GTK_TABLE( table ), frame, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(frame, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
auto vbox = ui::VBox( FALSE, 5 );
frame.add(vbox);
frame = ui::Frame( "Time" );
frame.show();
- gtk_table_attach( GTK_TABLE( table ), frame, 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(frame, {0, 1, 2, 3}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
vbox = ui::VBox( FALSE, 5 );
frame.add(vbox);
hbox.show();
auto scr = w = ui::ScrolledWindow();
- gtk_widget_set_size_request( w, 0, 150 );
+ w.dimensions( 0, 150 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( w ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
hbox.pack_start( w, TRUE, TRUE, 0 );
w.show();
vbox = gtk_vbox_new( FALSE, 5 );
vbox.show();
- gtk_table_attach( GTK_TABLE( table ), vbox, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(vbox, {1, 2, 0, 1}, {GTK_FILL, GTK_FILL});
w = gtk_button_new_with_label( "New..." );
vbox.pack_start( w, FALSE, FALSE, 0 );
vbox = gtk_vbox_new( FALSE, 5 );
vbox.show();
- gtk_table_attach( GTK_TABLE( table ), vbox, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach( vbox, {1, 2, 1, 2}, {GTK_FILL, GTK_FILL});
w = gtk_button_new_with_label( "Save..." );
vbox.pack_start( w, FALSE, FALSE, 0 );
vbox = gtk_vbox_new( FALSE, 5 );
vbox.show();
- gtk_table_attach( GTK_TABLE( table ), vbox, 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(vbox, {1, 2, 2, 3}, {GTK_FILL, GTK_FILL});
hbox = gtk_hbox_new( FALSE, 5 );
vbox.pack_start( hbox, TRUE, TRUE, 0 );