auto table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
dlgTexReset.cbTexChange = ui::CheckButton( "Enabled" );
dlgTexReset.cbTexChange.connect( "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL );
dlgTexReset.cbTexChange.show();
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbTexChange, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.cbTexChange, {0, 1, 0, 1}, {GTK_FILL, 0});
w = ui::Label( "Old Name: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 0, 1}, {GTK_FILL, 0});
w.show();
dlgTexReset.editTexOld = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editTexOld ), rs->textureName );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editTexOld, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editTexOld, {2, 3, 0, 1}, {GTK_FILL, 0});
dlgTexReset.editTexOld.show();
w = ui::Label( "New Name: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 1, 2}, {GTK_FILL, 0});
w.show();
dlgTexReset.editTexNew = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editTexNew ), rs->textureName );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editTexNew, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editTexNew, {2, 3, 1, 2}, {GTK_FILL, 0});
dlgTexReset.editTexNew.show();
// ---- /frame ----
table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
dlgTexReset.cbScaleHor = ui::CheckButton( "Enabled" );
dlgTexReset.cbScaleHor.connect( "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL );
dlgTexReset.cbScaleHor.show();
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbScaleHor, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.cbScaleHor, {0, 1, 0, 1}, {GTK_FILL, 0});
w = ui::Label( "New Horizontal Scale: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 0, 1}, {GTK_FILL, 0});
w.show();
dlgTexReset.editScaleHor = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editScaleHor ), "0.5" );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editScaleHor, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editScaleHor, {2, 3, 0, 1}, {GTK_FILL, 0});
dlgTexReset.editScaleHor.show();
dlgTexReset.cbScaleVert = ui::CheckButton( "Enabled" );
dlgTexReset.cbScaleVert.connect( "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL );
dlgTexReset.cbScaleVert.show();
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbScaleVert, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.cbScaleVert, {0, 1, 1, 2}, {GTK_FILL, 0});
w = ui::Label( "New Vertical Scale: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 1, 2}, {GTK_FILL, 0});
w.show();
dlgTexReset.editScaleVert = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editScaleVert ), "0.5" );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editScaleVert, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editScaleVert, {2, 3, 1, 2}, {GTK_FILL, 0});
dlgTexReset.editScaleVert.show();
// ---- /frame ----
table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
dlgTexReset.cbShiftHor = ui::CheckButton( "Enabled" );
dlgTexReset.cbShiftHor.connect( "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL );
dlgTexReset.cbShiftHor.show();
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbShiftHor, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.cbShiftHor, {0, 1, 0, 1}, {GTK_FILL, 0});
w = ui::Label( "New Horizontal Shift: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 0, 1}, {GTK_FILL, 0});
w.show();
dlgTexReset.editShiftHor = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editShiftHor ), "0" );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editShiftHor, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editShiftHor, {2, 3, 0, 1}, {GTK_FILL, 0});
dlgTexReset.editShiftHor.show();
dlgTexReset.cbShiftVert = ui::CheckButton( "Enabled" );
dlgTexReset.cbShiftVert.connect( "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL );
dlgTexReset.cbShiftVert.show();
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbShiftVert, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.cbShiftVert, {0, 1, 1, 2}, {GTK_FILL, 0});
w = ui::Label( "New Vertical Shift: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 1, 2}, {GTK_FILL, 0});
w.show();
dlgTexReset.editShiftVert = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editShiftVert ), "0" );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editShiftVert, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editShiftVert, {2, 3, 1, 2}, {GTK_FILL, 0});
dlgTexReset.editShiftVert.show();
// ---- /frame ----
table = ui::Table( 1, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
dlgTexReset.cbRotation = ui::CheckButton( "Enabled" );
dlgTexReset.cbRotation.show();
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbRotation, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.cbRotation, {0, 1, 0, 1}, {GTK_FILL, 0});
w = ui::Label( "New Rotation Value: " );
- gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {1, 2, 0, 1}, {GTK_FILL, 0});
w.show();
dlgTexReset.editRotation = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editRotation ), "0" );
- gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editRotation, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(dlgTexReset.editRotation, {2, 3, 0, 1}, {GTK_FILL, 0});
dlgTexReset.editRotation.show();
// ---- /frame ----
auto table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
w = ui::Label( "X: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 0, 1}, {GTK_FILL, 0});
w.show();
radiusX = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( radiusX ), "100" );
- gtk_table_attach( GTK_TABLE( table ), radiusX, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(radiusX, {1, 2, 0, 1}, {GTK_FILL, 0});
radiusX.show();
w = ui::Label( "Y: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 1, 2}, {GTK_FILL, 0});
w.show();
radiusY = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( radiusY ), "100" );
- gtk_table_attach( GTK_TABLE( table ), radiusY, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(radiusY, {1, 2, 1, 2}, {GTK_FILL, 0});
radiusY.show();
table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
w = ui::Label( "Start: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 0, 1}, {GTK_FILL, 0});
w.show();
angleStart = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( angleStart ), "0" );
- gtk_table_attach( GTK_TABLE( table ), angleStart, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(angleStart, {1, 2, 0, 1}, {GTK_FILL, 0});
angleStart.show();
w = ui::Label( "End: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 1, 2}, {GTK_FILL, 0});
w.show();
angleEnd = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( angleEnd ), "90" );
- gtk_table_attach( GTK_TABLE( table ), angleEnd, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(angleEnd, {1, 2, 1, 2}, {GTK_FILL, 0});
angleEnd.show();
table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
w = ui::Label( "Start: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 0, 1}, {GTK_FILL, 0});
w.show();
heightStart = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( heightStart ), "0" );
- gtk_table_attach( GTK_TABLE( table ), heightStart, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(heightStart, {1, 2, 0, 1}, {GTK_FILL, 0});
heightStart.show();
w = ui::Label( "End: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 1, 2}, {GTK_FILL, 0});
w.show();
heightEnd = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( heightEnd ), "0" );
- gtk_table_attach( GTK_TABLE( table ), heightEnd, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(heightEnd, {1, 2, 1, 2}, {GTK_FILL, 0});
heightEnd.show();
table = ui::Table( 2, 3, TRUE );
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
// ---- frame ----
w = ui::Label( "Number: " );
- gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(w, {0, 1, 0, 1}, {GTK_FILL, 0});
w.show();
numPoints = ui::Entry( 256 );
gtk_entry_set_text( GTK_ENTRY( numPoints ), "0" );
- gtk_table_attach( GTK_TABLE( table ), numPoints, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(numPoints, {1, 2, 0, 1}, {GTK_FILL, 0});
numPoints.show();
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);
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 );
table = ui::Table( 2, 2, FALSE );
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
label = ui::Label( "General" );
label.show();
auto frame = ui::Frame( "Game" );
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 );
+ table.attach(frame, {0, 1, 0, 1});
auto vbox = ui::VBox( TRUE, 5 );
vbox.show();
frame = ui::Frame( "Waveform" );
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 );
+ table.attach(frame, {1, 2, 0, 1});
vbox = ui::VBox( TRUE, 5 );
vbox.show();
frame = ui::Frame( "Orientation" );
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 );
+ table.attach(frame, {0, 1, 1, 2});
vbox = ui::VBox( TRUE, 5 );
vbox.show();
table2 = ui::Table( 4, 2, FALSE );
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,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
+ gtk_table_set_row_spacings(table2, 5);
+ gtk_table_set_col_spacings(table2, 5);
+ table.attach(table2, {1, 2, 1, 2});
label = ui::Label( "Wavelength:" );
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 );
+ table2.attach(label, {0, 1, 0, 1});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
label = ui::Label( "Max. amplitude:" );
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 );
+ table2.attach(label, {0, 1, 1, 2});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
label = ui::Label( "Roughness:" );
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 );
+ table2.attach(label, {0, 1, 2, 3});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
label = ui::Label( "Random seed:" );
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 );
+ table2.attach(label, {0, 1, 3, 4});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
entry = ui::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 );
+ table2.attach(entry, {1, 2, 0, 1});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "wavelength", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &WaveLength );
entry = ui::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 );
+ table2.attach(entry, {1, 2, 1, 2});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "amplitude", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Amplitude );
entry = ui::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 );
+ table2.attach(entry, {1, 2, 2, 3});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "roughness", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Roughness );
adj.connect( "value_changed", G_CALLBACK( general_random ), NULL );
spin = ui::SpinButton( adj, 1, 0 );
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 );
+ table2.attach(spin, {1, 2, 3, 4});
gtk_widget_set_size_request( spin, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "random", spin );
table.show();
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
frame.add(table);
- 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);
label = ui::Label( "X:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach( label, {0, 1, 1, 2}, {GTK_FILL, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "hmin_text", label );
label = ui::Label( "X:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {2, 3, 1, 2}, {GTK_FILL, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "hmax_text", label );
label = ui::Label( "Y:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_FILL, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "vmin_text", label );
label = ui::Label( "Y:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {2, 3, 2, 3}, {GTK_FILL, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "vmax_text", label );
label = ui::Label( "Lower-left" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {1, 2, 0, 1}, {GTK_FILL, GTK_FILL});
label = ui::Label( "Upper-right" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 3, 4, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {3, 4, 0, 1},, {GTK_FILL, GTK_FILL});
entry = ui::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 );
+ table.attach(entry, {1, 2, 1, 2});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "hmin", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hll );
entry = ui::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 );
+ table.attach(entry, {3, 4, 1, 2});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "hmax", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hur );
entry = ui::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 );
+ table.attach(entry, {1, 2, 2, 3});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "vmin", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vll );
entry = ui::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 );
+ table.attach(entry, {3, 4, 2, 3});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "vmax", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vur );
table.show();
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
frame.add(table);
- 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);
label = ui::Label( "X:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, GTK_EXPAND | GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "nh_text", label );
label = ui::Label( "Y:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, GTK_EXPAND | GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "nv_text", label );
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 );
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 );
+ table.attach(spin, {1, 2, 0, 1});
gtk_widget_set_size_request( spin, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "nh", spin );
adj.connect( "value_changed", G_CALLBACK( extents_nhnv_spin ), &NV );
spin = ui::SpinButton( adj, 1, 0 );
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 );
+ table.attach(spin, {1, 2, 1, 2});
gtk_widget_set_size_request( spin, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "nv", spin );
table.show();
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
frame.add(table);
- 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);
label = ui::Label( "Upper-left:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, GTK_FILL});
label = ui::Label( "Lower-left:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, GTK_FILL});
label = ui::Label( "Upper-right:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {2, 3, 0, 1}, {GTK_FILL, GTK_FILL});
label = ui::Label( "Lower-right:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {2, 3, 1, 2}, {GTK_FILL, GTK_FILL});
entry = ui::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 );
+ table.attach(entry, {1, 2, 0, 1});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "z01", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z01 );
entry = ui::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 );
+ table.attach(entry, {1, 2, 1, 2});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "z00", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z00 );
entry = ui::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 );
+ table.attach(entry, {3, 4, 0, 1});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "z11", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z11 );
entry = ui::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 );
+ table.attach(entry, {3, 4, 1, 2});
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "z10", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z10 );
check = ui::CheckButton( "Linear borders" );
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 );
+ table.attach(check, {0, 4, 2, 3});
g_object_set_data( G_OBJECT( dlg ), "linearborder", check );
check.connect( "toggled", G_CALLBACK( extents_linearborder ), NULL );
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
label = ui::Label( "Filename:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "bmp_text1", label );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "bmp_file", entry );
entry.connect( "focus_out_event", G_CALLBACK( bitmap_file_entryfocusout ), NULL );
hbox2 = ui::HBox( TRUE, 5 );
hbox2.show();
- gtk_table_attach( GTK_TABLE( table ), hbox2, 1, 2, 1, 2,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
+ table.attach(hbox2, {1, 2, 1, 2}, {0, GTK_EXPAND | GTK_FILL});
button = ui::Button( "Browse..." );
button.show();
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
label = ui::Label( "Map color 0 to:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL | GTK_EXPAND, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "bmp_text2", label );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
label = ui::Label( "Map color 255 to:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL | GTK_EXPAND, GTK_FILL});
g_object_set_data( G_OBJECT( dlg ), "bmp_text3", label );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT );
hbox2 = ui::HBox( FALSE, 5 );
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 );
+ table.attach(hbox2, {1, 2, 0, 1});
entry = ui::Entry();
entry.show();
hbox2 = ui::HBox( FALSE, 5 );
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 );
+ table.attach(hbox2, {1, 2, 1, 2});
entry = ui::Entry();
entry.show();
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
label = ui::Label( "Value:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, GTK_FILL});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
g_object_set_data( G_OBJECT( dlg ), "fix_value_text", label );
label = ui::Label( "Range affected:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, GTK_FILL});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
g_object_set_data( G_OBJECT( dlg ), "fix_range_text", label );
label = ui::Label( "Rate of change:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_FILL, GTK_FILL});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
g_object_set_data( G_OBJECT( dlg ), "fix_rate_text", label );
adj.connect( "value_changed", G_CALLBACK( fix_value_changed ), NULL );
spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_EXPAND ), 0, 0 );
+ table.attach(spin, {1, 2, 0, 1}, {GTK_EXPAND, GTK_EXPAND});
gtk_widget_set_size_request( spin, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "fix_value", spin );
spin.connect( "focus_out_event", G_CALLBACK( fix_value_entryfocusout ), NULL );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "fix_range", entry );
entry.connect( "focus_out_event", G_CALLBACK( fix_range_entryfocusout ), NULL );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "fix_rate", entry );
entry.connect( "focus_out_event", G_CALLBACK( fix_rate_entryfocusout ), NULL );
button = ui::Button( "Free" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(button, {2, 3, 0, 1}, {GTK_EXPAND, GTK_FILL});
gtk_widget_set_size_request( button, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "fix_free", button );
button.connect( "clicked", G_CALLBACK( fix_free ), NULL );
button = ui::Button( "Free All" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(button, {2, 3, 1, 2}, {GTK_EXPAND, GTK_FILL});
gtk_widget_set_size_request( button, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "fix_freeall", button );
button.connect( "clicked", G_CALLBACK( fix_freeall ), NULL );
table = ui::Table( 5, 2, FALSE );
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
label = ui::Label( "Surface:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, GTK_FILL});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
label = ui::Label( "Other:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, GTK_FILL});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
label = ui::Label( "Steep:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_FILL, GTK_FILL});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texture1", entry );
entry.connect( "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 0 ) );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texture2", entry );
entry.connect( "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 1 ) );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texture3", entry );
table = ui::Table( 2, 4, TRUE );
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 );
+ gtk_table_set_row_spacings(table, 5);
+ gtk_table_set_col_spacings(table, 5);
label = ui::Label( "Offset <h,v>" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {0, 2, 0, 1}, {GTK_FILL, GTK_FILL});
label = ui::Label( "Scale <h,v>" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 2, 4, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(label, {2, 4, 0, 1}, {GTK_FILL, GTK_FILL});
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texoffsetx", entry );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texoffsety", entry );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {2, 3, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texscalex", entry );
entry = ui::Entry();
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table.attach(entry, {3, 4, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
gtk_widget_set_size_request( entry, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "texscaley", entry );
auto table = ui::Table( 2, 4, FALSE );
table.show();
vbox2.pack_start( table, TRUE, TRUE, 0 );
- 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);
auto button = ui::Button( "Color" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {0, 1, 0, 1}, {GTK_FILL, 0});
button.connect( "clicked", G_CALLBACK( OnColor3d ), NULL );
button = ui::Button( "Depth Color" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {0, 1, 1, 2}, {GTK_FILL, 0});
button.connect( "clicked", G_CALLBACK( OnColorFog ), NULL );
auto aa3check = ui::CheckButton( "Anti-Alias (May not work on some video cards)" );
aa3check.show();
- gtk_table_attach( GTK_TABLE( table ), aa3check, 1, 4, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(aa3check, {1, 4, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
aa3check.connect( "toggled", G_CALLBACK( OnAntiAlias3d ), NULL );
auto depthcheck = ui::CheckButton( "Depth Cue" );
depthcheck.show();
- gtk_table_attach( GTK_TABLE( table ), depthcheck, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(depthcheck, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
depthcheck.connect( "toggled", G_CALLBACK( OnFog ), NULL );
auto linescheck = ui::CheckButton( "Lines" );
linescheck.show();
- gtk_table_attach( GTK_TABLE( table ), linescheck, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(linescheck, {2, 3, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
linescheck.connect( "toggled", G_CALLBACK( OnLines ), NULL );
auto polyscheck = ui::CheckButton( "Polygons" );
polyscheck.show();
- gtk_table_attach( GTK_TABLE( table ), polyscheck, 3, 4, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(polyscheck, {3, 4, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
polyscheck.connect( "toggled", G_CALLBACK( OnPoly ), NULL );
auto zlist = ui::ComboBoxText(ui::New);
table = ui::Table( 2, 2, FALSE );
table.show();
vbox2.pack_start( table, TRUE, TRUE, 0 );
- 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);
adj = ui::Adjustment( portals.trans_3d, 0, 100, 1, 1, 0 );
auto transslider = ui::HScale( adj );
transslider.show();
- gtk_table_attach( GTK_TABLE( table ), transslider, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(transslider, {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_scale_set_draw_value( GTK_SCALE( transslider ), FALSE );
auto translabel = ui::Label( "" );
translabel.show();
- gtk_table_attach( GTK_TABLE( table ), translabel, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(translabel, {1, 2, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( translabel ), 0.0, 0.0 );
adj.connect( "value_changed", G_CALLBACK( OnScrollTrans ), translabel );
adj = ui::Adjustment( portals.clip_range, 1, 128, 1, 1, 0 );
auto clipslider = ui::HScale( adj );
clipslider.show();
- gtk_table_attach( GTK_TABLE( table ), clipslider, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(clipslider, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
gtk_scale_set_draw_value( GTK_SCALE( clipslider ), FALSE );
auto cliplabel = ui::Label( "" );
cliplabel.show();
- gtk_table_attach( GTK_TABLE( table ), cliplabel, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(cliplabel, {1, 2, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( cliplabel ), 0.0, 0.0 );
adj.connect( "value_changed", G_CALLBACK( OnScrollClip ), cliplabel );
// MapCoordinator dialog window
void MapCoordinator(){
- GtkWidget *spinnerMinX, *spinnerMinY, *spinnerMaxX, *spinnerMaxY;
Entity *theWorldspawn = NULL;
const char *buffer;
char line[20];
vbox.pack_start( ui::Widget(gtk_hseparator_new()), FALSE, FALSE, 2 ); // insert separator into vbox
auto table = ui::Table( 4, 3, TRUE ); // create table
- gtk_table_set_row_spacings( GTK_TABLE( table ), 8 ); // set row spacings
- gtk_table_set_col_spacings( GTK_TABLE( table ), 8 ); // set column spacings
+ gtk_table_set_row_spacings(table, 8); // set row spacings
+ gtk_table_set_col_spacings(table, 8); // set column spacings
vbox.pack_start( table, FALSE, FALSE, 2 ); // insert table into vbox
auto label = ui::Label( "x" ); // create label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // align text to the left side
- gtk_table_attach_defaults( GTK_TABLE( table ), label, 1, 2, 0, 1 ); // insert label into table
+ table.attach(label, {1, 2, 0, 1}); // insert label into table
label = ui::Label( "y" ); // create label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // align text to the left side
- gtk_table_attach_defaults( GTK_TABLE( table ), label, 2, 3, 0, 1 ); // insert label into table
+ table.attach(label, {2, 3, 0, 1}); // insert label into table
label = ui::Label( "mapcoordsmins" ); // create label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // align text to the left side
- gtk_table_attach_defaults( GTK_TABLE( table ), label, 0, 1, 1, 2 ); // insert label into table
+ table.attach(label, {0, 1, 1, 2}); // insert label into table
- spinnerMinX = ui::SpinButton( spinner_adj_MinX, 1.0, 0 ); // create textbox wiht value spin, value and value range
- gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMinX, 1, 2, 1, 2 ); // insert spinbox into table
+ auto spinnerMinX = ui::SpinButton(spinner_adj_MinX, 1.0, 0); // create textbox wiht value spin, value and value range
+ table.attach(spinnerMinX, {1, 2, 1, 2}); // insert spinbox into table
- spinnerMinY = ui::SpinButton( spinner_adj_MinY, 1.0, 0 ); // create textbox wiht value spin, value and value range
- gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMinY, 2, 3, 1, 2 ); // insert spinbox into table
+ auto spinnerMinY = ui::SpinButton(spinner_adj_MinY, 1.0, 0); // create textbox wiht value spin, value and value range
+ table.attach(spinnerMinY, {2, 3, 1, 2}); // insert spinbox into table
label = ui::Label( "mapcoordsmaxs" ); // create label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // align text to the left side
- gtk_table_attach_defaults( GTK_TABLE( table ), label, 0, 1, 2, 3 ); // insert label into table
+ table.attach(label, {0, 1, 2, 3}); // insert label into table
- spinnerMaxX = ui::SpinButton( spinner_adj_MaxX, 1.0, 0 ); // create textbox wiht value spin, value and value range
- gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMaxX, 1, 2, 2, 3 ); // insert spinbox into table
+ auto spinnerMaxX = ui::SpinButton(spinner_adj_MaxX, 1.0, 0); // create textbox wiht value spin, value and value range
+ table.attach(spinnerMaxX, {1, 2, 2, 3}); // insert spinbox into table
- spinnerMaxY = ui::SpinButton( spinner_adj_MaxY, 1.0, 0 ); // create textbox wiht value spin, value and value range
- gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMaxY, 2, 3, 2, 3 ); // insert spinbox into table
+ auto spinnerMaxY = ui::SpinButton(spinner_adj_MaxY, 1.0, 0); // create textbox wiht value spin, value and value range
+ table.attach(spinnerMaxY, {2, 3, 2, 3}); // insert spinbox into table
// put the references to the spinboxes and the worldspawn into the global exchange
- msp.spinner1 = GTK_SPIN_BUTTON( spinnerMinX );
- msp.spinner2 = GTK_SPIN_BUTTON( spinnerMinY );
- msp.spinner3 = GTK_SPIN_BUTTON( spinnerMaxX );
- msp.spinner4 = GTK_SPIN_BUTTON( spinnerMaxY );
+ msp.spinner1 = spinnerMinX;
+ msp.spinner2 = spinnerMinY;
+ msp.spinner3 = spinnerMaxX;
+ msp.spinner4 = spinnerMaxY;
msp.worldspawn = theWorldspawn;
button = ui::Button( "Set" ); // create button with text
button.connect( "clicked", G_CALLBACK( set_coordinates ), NULL ); // connect button with callback function
- gtk_table_attach_defaults( GTK_TABLE( table ), button, 1, 2, 3, 4 ); // insert button into table
+ table.attach(button, {1, 2, 3, 4}); // insert button into table
button = ui::Button( "Cancel" ); // create button with text
button.connect( "clicked", G_CALLBACK( close_window ), NULL ); // connect button with callback function
- gtk_table_attach_defaults( GTK_TABLE( table ), button, 2, 3, 3, 4 ); // insert button into table
+ table.attach(button, {2, 3, 3, 4}); // insert button into table
}
else {
globalOutputStream() << "SunPlug: no worldspawn found!\n"; // output error to console
gtk_table_set_col_spacings( table, 4 );
gtk_table_set_row_spacings( table, 0 );
- gtk_table_attach( table, DialogLabel_new( name ), 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(DialogLabel_new(name), {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
- gtk_table_attach( table, widget, 1, 3, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(widget, {1, 3, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
return table;
}
)
{}
+ void ITable::attach(Widget child, TableAttach attach, TableAttachOptions options, TablePadding padding) {
+ gtk_table_attach(this, child,
+ attach.left, attach.right, attach.top, attach.bottom,
+ static_cast<GtkAttachOptions>(options.x), static_cast<GtkAttachOptions>(options.y),
+ padding.x, padding.y
+ );
+ }
+
IMPL(TextView, GTK_TEXT_VIEW);
TextView::TextView(ui::New_t) : TextView(GTK_TEXT_VIEW(gtk_text_view_new()))
,
);
+ struct TableAttach {
+ unsigned int left, right, top, bottom;
+ };
+
+ struct TableAttachOptions {
+ // todo: type safety
+ unsigned int x, y;
+ };
+
+ struct TablePadding {
+ unsigned int x, y;
+ };
+
WRAP(Table, Container, _GtkTable, (),
Table(std::size_t rows, std::size_t columns, bool homogenous);
,
+ // 5 = expand | fill
+ void attach(Widget child, TableAttach attach, TableAttachOptions options = {5, 5}, TablePadding padding = {0, 0});
);
WRAP(TextView, Container, _GtkTextView, (),
window.add(table1);
{
auto vbox = create_dialog_vbox( 4 );
- gtk_table_attach( table1, vbox , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table1.attach(vbox, {1, 2, 0, 1}, {GTK_FILL, GTK_FILL});
{
auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
vbox.pack_start( button, FALSE, FALSE, 0 );
}
{
auto frame = create_dialog_frame( "Build menu" );
- gtk_table_attach( table1, frame , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
+ table1.attach(frame, {0, 1, 0, 1});
{
auto scr = create_scrolled_window( ui::Policy::NEVER, ui::Policy::AUTOMATIC, 4 );
frame.add(scr);
}
{
auto frame = create_dialog_frame( "Commandline" );
- gtk_table_attach( table1, frame , 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
+ table1.attach(frame, {0, 1, 1, 2});
{
auto scr = create_scrolled_window( ui::Policy::NEVER, ui::Policy::AUTOMATIC, 4 );
frame.add(scr);
}
void Dialog::addRadioIcons( ui::VBox vbox, const char* name, StringArrayRange icons, const IntImportCallback& importViewer, const IntExportCallback& exportViewer ){
- ui::Widget table = ui::Table( 2, icons.last - icons.first, FALSE );
- table.show();;
+ auto table = ui::Table(2, icons.last - icons.first, FALSE);
+ table.show();
- 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);
GSList* group = 0;
ui::RadioButton radio{ui::null};
guint pos = static_cast<guint>( icon - icons.first );
auto image = new_local_image( *icon );
image.show();
- gtk_table_attach( GTK_TABLE( table ), image , pos, pos + 1, 0, 1,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(image, {pos, pos + 1, 0, 1}, {0, 0});
radio = ui::RadioButton(GTK_RADIO_BUTTON(gtk_radio_button_new( group )));
radio.show();
- gtk_table_attach( GTK_TABLE( table ), radio, pos, pos + 1, 1, 2,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(radio, {pos, pos + 1, 1, 2}, {0, 0});
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
}
int spawn_table[MAX_FLAGS];
// we change the layout depending on how many spawn flags we need to display
// the table is a 4x4 in which we need to put the comment box g_entityClassComment and the spawn flags..
-GtkTable* g_spawnflagsTable;
+ui::Table g_spawnflagsTable{ui::null};
ui::VBox g_attributeBox{ui::null};
typedef std::vector<EntityAttribute*> EntityAttributes;
g_current_flags = eclass;
- int spawnflag_count = 0;
+ unsigned int spawnflag_count = 0;
{
// do a first pass to count the spawn flags, don't touch the widgets, we don't know in what state they are
g_spawnflag_count = spawnflag_count;
{
- for ( int i = 0; i < g_spawnflag_count; ++i )
+ for (unsigned int i = 0; (int) i < g_spawnflag_count; ++i)
{
auto widget = ui::CheckButton(g_entitySpawnflagsCheck[i] );
widget.show();
StringOutputStream str( 16 );
str << LowerCase( eclass->flagnames[spawn_table[i]] );
- gtk_table_attach( g_spawnflagsTable, widget, i % 4, i % 4 + 1, i / 4, i / 4 + 1,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( GTK_FILL ), 0, 0 );
+ g_spawnflagsTable.attach(widget, {i % 4, i % 4 + 1, i / 4, i / 4 + 1}, {GTK_FILL, GTK_FILL});
widget.unref();
auto label = ui::Label(GTK_LABEL(gtk_bin_get_child(GTK_BIN(widget)) ));
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_events( entry , GDK_KEY_PRESS_MASK );
entry.connect( "key_press_event", G_CALLBACK( EntityEntry_keypress ), 0 );
g_entityKeyEntry = entry;
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_events( entry , GDK_KEY_PRESS_MASK );
entry.connect( "key_press_event", G_CALLBACK( EntityEntry_keypress ), 0 );
g_entityValueEntry = entry;
{
auto label = ui::Label( "Value" );
label.show();
- gtk_table_attach( table, label , 0, 1, 1, 2,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Key" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
}
}
ui::Window FindTextureDialog::BuildDialog(){
- ui::Widget table{ui::null}, label{ui::null};
+ ui::Widget label{ui::null};
ui::Widget button{ui::null};
ui::Entry entry{ui::null};
vbox.show();
hbox.pack_start( vbox, TRUE, TRUE, 0 );
- table = ui::Table( 2, 2, FALSE );
+ auto table = ui::Table(2, 2, FALSE);
table.show();
vbox.pack_start( table, TRUE, TRUE, 0 );
- 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);
label = ui::Label( "Find:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
label = ui::Label( "Replace:" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
entry.connect( "focus_in_event",
G_CALLBACK( find_focus_in ), 0 );
AddDialogData( *GTK_ENTRY(entry), m_strFind );
entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
entry.connect( "focus_in_event",
G_CALLBACK( replace_focus_in ), 0 );
AddDialogData( *GTK_ENTRY(entry), m_strReplace );
window.add(table1);
{
auto vbox = create_dialog_vbox( 4 );
- gtk_table_attach( table1, vbox , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table1.attach(vbox, {1, 2, 0, 1}, {GTK_FILL, GTK_FILL});
{
auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
vbox.pack_start( button, FALSE, FALSE, 0 );
}
{
auto frame = create_dialog_frame( "Project settings" );
- gtk_table_attach( table1, frame , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
+ table1.attach(frame, {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
{
auto table2 = create_dialog_table( ( globalMappingMode().do_mapping_mode ) ? 4 : 3, 2, 4, 4, 4 );
frame.add(table2);
{
auto label = ui::Label( "Select mod" );
label.show();
- gtk_table_attach( table2, label , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table2.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
gtk_combo_box_text_append_text( dialog.game_combo.game_select, globalGameComboConfiguration().custom );
dialog.game_combo.game_select.show();
- gtk_table_attach( table2, dialog.game_combo.game_select , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table2.attach(dialog.game_combo.game_select, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
dialog.game_combo.game_select.connect( "changed", G_CALLBACK( OnSelchangeComboWhatgame ), &dialog.game_combo );
}
{
auto label = ui::Label( "fs_game" );
label.show();
- gtk_table_attach( table2, label , 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table2.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table2, entry , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table2.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
dialog.game_combo.fsgame_entry = entry;
}
if ( globalMappingMode().do_mapping_mode ) {
auto label = ui::Label( "Mapping mode" );
label.show();
- gtk_table_attach( table2, label , 0, 1, 3, 4,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table2.attach(label, {0, 1, 3, 4}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
auto combo = ui::ComboBoxText(ui::New);
gtk_combo_box_text_append_text( combo, globalMappingMode().mp_mapping_mode );
combo.show();
- gtk_table_attach( table2, combo , 1, 2, 3, 4,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table2.attach(combo, {1, 2, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
dialog.gamemode_combo = combo;
}
{
auto label = ui::Label( "Vendor:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Version:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Renderer:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( reinterpret_cast<const char*>( glGetString( GL_VENDOR ) ) );
label.show();
- gtk_table_attach( table, label , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {1, 2, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( reinterpret_cast<const char*>( glGetString( GL_VERSION ) ) );
label.show();
- gtk_table_attach( table, label , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {1, 2, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( reinterpret_cast<const char*>( glGetString( GL_RENDERER ) ) );
label.show();
- gtk_table_attach( table, label , 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {1, 2, 2, 3}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
}
{
auto label = ui::Label( "Texture x:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Texture y:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
x = entry;
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
y = entry;
}
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
gtk_misc_set_padding( GTK_MISC( label ), 4, 2 );
label.show();
- gtk_table_attach_defaults( table, label , 0, 1, 0, 1 );
+ table.attach(label, {0, 1, 0, 1});
pStatusLabel[c_command_status] = ui::Widget(label );
}
- for ( int i = 1; i < c_count_status; ++i )
+ for (unsigned int i = 1; (int) i < c_count_status; ++i)
{
auto frame = ui::Frame();
frame.show();
- gtk_table_attach_defaults( table, frame , i, i + 1, 0, 1 );
+ table.attach(frame, {i, i + 1, 0, 1});
gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
auto label = ui::Label( "Label" );
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_editable_set_editable( GTK_EDITABLE(entry), FALSE );
brushes_entry = entry;
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
gtk_editable_set_editable( GTK_EDITABLE(entry), FALSE );
entities_entry = entry;
{
ui::Widget label = ui::Label( "Total Brushes" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
ui::Widget label = ui::Label( "Total Entities" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
}
{
ui::Widget label = ui::Label( "Entity number" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ (table).attach(label, {0, 1, 0, 1}, {0, 0});
}
{
ui::Widget label = ui::Label( "Brush number" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ (table).attach(label, {0, 1, 1, 2}, {0, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_grab_focus( entry );
entity = entry;
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
brush = entry;
}
{
auto label = ui::Label( "Row:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0)}, {0, 0});
}
{
auto label = ui::Label( "Column:" );
label.show();
- gtk_table_attach( table, label , 1, 2, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {1, 2, 0, 1}, {(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0)}, {0, 0});
}
{
auto combo = ui::ComboBoxText(ui::New);
AddDialogData( *GTK_COMBO_BOX(combo), m_nRow );
combo.show();
- gtk_table_attach( table, combo , 0, 1, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(combo, {0, 1, 1, 2}, {(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0)}, {0, 0});
gtk_widget_set_size_request( combo , 60, -1 );
m_pRowCombo = combo;
}
AddDialogData( *GTK_COMBO_BOX(combo), m_nCol );
combo.show();
- gtk_table_attach( table, combo , 1, 2, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(combo, {1, 2, 1, 2}, {(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0)}, {0, 0});
gtk_widget_set_size_request( combo , 60, -1 );
m_pColCombo = combo;
}
{
auto label = ui::Label( "X:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto label = ui::Label( "Y:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto label = ui::Label( "Z:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 2, 3,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto label = ui::Label( "S:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 3, 4,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto label = ui::Label( "T:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 4, 5,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 4, 5}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
AddDialogData( *GTK_ENTRY(entry), m_fX );
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
AddDialogData( *GTK_ENTRY(entry), m_fY );
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 2, 3,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
AddDialogData( *GTK_ENTRY(entry), m_fZ );
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 3, 4,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
AddDialogData( *GTK_ENTRY(entry), m_fS );
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 4, 5,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 4, 5}, {GTK_EXPAND | GTK_FILL, 0});
AddDialogData( *GTK_ENTRY(entry), m_fT );
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
{
auto label = ui::Label( "Fixed" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto check = ui::CheckButton(GTK_CHECK_BUTTON( gtk_check_button_new() ));
check.show();
- gtk_table_attach( table, check , 1, 2, 0, 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(check, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
m_subdivisions.m_enabled = check;
guint handler_id = check.connect( "toggled", G_CALLBACK( &Subdivisions::applyGtk ), &m_subdivisions );
g_object_set_data( G_OBJECT( check ), "handler", gint_to_pointer( handler_id ) );
{
auto label = ui::Label( "Horizontal" );
label.show();
- gtk_table_attach( table, label , 0, 1, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 1, 2,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
m_subdivisions.m_horizontal = entry;
m_horizontalSubdivisionsEntry.connect( entry );
}
{
auto label = ui::Label( "Vertical" );
label.show();
- gtk_table_attach( table, label , 0, 1, 2, 3,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 1, 2, 2, 3,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
m_subdivisions.m_vertical = entry;
m_verticalSubdivisionsEntry.connect( entry );
}
{
auto label = ui::Label( "Horizontal Shift Step" );
label.show();
- gtk_table_attach( table, label , 2, 4, 0, 1,
- (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {2, 4, 0, 1}, {GTK_FILL | GTK_EXPAND, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Vertical Shift Step" );
label.show();
- gtk_table_attach( table, label , 2, 4, 1, 2,
- (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {2, 4, 1, 2}, {GTK_FILL | GTK_EXPAND, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Horizontal Stretch Step" );
label.show();
- gtk_table_attach( table, label , 2, 3, 2, 3,
- (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 2, 3}, {GTK_FILL | GTK_EXPAND, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto button = ui::Button( "Flip" );
button.show();
- gtk_table_attach( table, button , 3, 4, 2, 3,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(button, {3, 4, 2, 3}, {GTK_FILL, 0});
button.connect( "clicked", G_CALLBACK( OnBtnPatchFlipX ), 0 );
gtk_widget_set_size_request( button , 60, -1 );
}
{
auto label = ui::Label( "Vertical Stretch Step" );
label.show();
- gtk_table_attach( table, label , 2, 3, 3, 4,
- (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 3, 4}, {GTK_FILL | GTK_EXPAND, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto button = ui::Button( "Flip" );
button.show();
- gtk_table_attach( table, button , 3, 4, 3, 4,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(button, {3, 4, 3, 4}, {GTK_FILL, 0});
button.connect( "clicked", G_CALLBACK( OnBtnPatchFlipY ), 0 );
gtk_widget_set_size_request( button , 60, -1 );
}
{
auto label = ui::Label( "Rotate Step" );
label.show();
- gtk_table_attach( table, label , 2, 4, 4, 5,
- (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(label, {2, 4, 4, 5}, {GTK_FILL | GTK_EXPAND, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 0, 1, 0, 1,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
g_object_set_data( G_OBJECT( window ), "hshift_entry", (void *) entry );
// we fill in this data, if no patch is selected the widgets are unmodified when the inspector is raised
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 0, 1,
- (GtkAttachOptions)( 0 ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 0, 1}, {0, 0});
gtk_widget_set_size_request( spin , 10, -1 );
gtk_widget_set_can_focus( spin, false );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 0, 1, 1, 2,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
entry_set_float( entry, g_pi_globals.shift[1] );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 1, 2,
- (GtkAttachOptions)( 0 ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 1, 2}, {0, 0});
gtk_widget_set_size_request( spin , 10, -1 );
gtk_widget_set_can_focus( spin, false );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 0, 1, 2, 3,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {0, 1, 2, 3}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
entry_set_float( entry, g_pi_globals.scale[0] );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 2, 3,
- (GtkAttachOptions)( 0 ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 2, 3}, {0, 0});
gtk_widget_set_size_request( spin , 10, -1 );
gtk_widget_set_can_focus( spin, false );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 0, 1, 3, 4,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {0, 1, 3, 4}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
entry_set_float( entry, g_pi_globals.scale[1] );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 3, 4,
- (GtkAttachOptions)( 0 ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 3, 4}, {0, 0});
gtk_widget_set_size_request( spin , 10, -1 );
gtk_widget_set_can_focus( spin, false );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( table, entry , 0, 1, 4, 5,
- (GtkAttachOptions)( GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(entry, {0, 1, 4, 5}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
entry_set_float( entry, g_pi_globals.rotate );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 4, 5,
- (GtkAttachOptions)( 0 ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 4, 5}, {0, 0});
gtk_widget_set_size_request( spin , 10, -1 );
gtk_widget_set_can_focus( spin, false );
}
{
auto label = ui::Label( "Width:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto label = ui::Label( "Height:" );
label.show();
- gtk_table_attach( table, label , 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
D_ITEM( 31 ); // MAX_PATCH_SIZE is 32, so we should be able to do 31...
#undef D_ITEM
combo.show();
- gtk_table_attach( table, combo , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(combo, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
width = combo;
}
D_ITEM( 31 ); // MAX_PATCH_SIZE is 32, so we should be able to do 31...
#undef D_ITEM
combo.show();
- gtk_table_attach( table, combo , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(combo, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
height = combo;
}
{
auto image = new_local_image( "cap_bevel.png" );
image.show();
- gtk_table_attach( table, image , 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(image, {0, 1, 0, 1}, {GTK_FILL, 0});
}
{
auto image = new_local_image( "cap_endcap.png" );
image.show();
- gtk_table_attach( table, image , 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(image, {0, 1, 1, 2}, {GTK_FILL, 0});
}
{
auto image = new_local_image( "cap_ibevel.png" );
image.show();
- gtk_table_attach( table, image , 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(image, {0, 1, 2, 3}, {GTK_FILL, 0});
}
{
auto image = new_local_image( "cap_iendcap.png" );
image.show();
- gtk_table_attach( table, image , 0, 1, 3, 4,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(image, {0, 1, 3, 4}, {GTK_FILL, 0});
}
{
auto image = new_local_image( "cap_cylinder.png" );
image.show();
- gtk_table_attach( table, image , 0, 1, 4, 5,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(image, {0, 1, 4, 5}, {GTK_FILL, 0});
}
GSList* group = 0;
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Bevel" ));
button.show();
- gtk_table_attach( table, button, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 0, 1}, {GTK_FILL | GTK_EXPAND, 0});
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( button ) );
bevel = button;
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Endcap" ));
button.show();
- gtk_table_attach( table, button, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 1, 2}, {GTK_FILL | GTK_EXPAND, 0});
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( button ) );
endcap = button;
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Inverted Bevel" ));
button.show();
- gtk_table_attach( table, button, 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 2, 3}, {GTK_FILL | GTK_EXPAND, 0});
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( button ) );
ibevel = button;
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Inverted Endcap" ));
button.show();
- gtk_table_attach( table, button, 1, 2, 3, 4,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 3, 4}, {GTK_FILL | GTK_EXPAND, 0});
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( button ) );
iendcap = button;
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Cylinder" ));
button.show();
- gtk_table_attach( table, button, 1, 2, 4, 5,
- (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 4, 5}, {GTK_FILL | GTK_EXPAND, 0});
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( button ) );
cylinder = button;
{
ui::Widget label = ui::Label( " X " );
label.show();
- gtk_table_attach( table, label, 0, 1, 0, 1,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {0, 0});
}
{
ui::Widget label = ui::Label( " Y " );
label.show();
- gtk_table_attach( table, label, 0, 1, 1, 2,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {0, 0});
}
{
ui::Widget label = ui::Label( " Z " );
label.show();
- gtk_table_attach( table, label, 0, 1, 2, 3,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {0, 0});
}
{
auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( spin , 64, -1 );
gtk_spin_button_set_wrap( spin, TRUE );
auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( spin , 64, -1 );
gtk_spin_button_set_wrap( spin, TRUE );
auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 );
auto spin = ui::SpinButton( adj, 1, 0 );
spin.show();
- gtk_table_attach( table, spin , 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( spin , 64, -1 );
gtk_spin_button_set_wrap( spin, TRUE );
{
ui::Widget label = ui::Label( " X " );
label.show();
- gtk_table_attach( table, label, 0, 1, 0, 1,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {0, 0});
}
{
ui::Widget label = ui::Label( " Y " );
label.show();
- gtk_table_attach( table, label, 0, 1, 1, 2,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {0, 0});
}
{
ui::Widget label = ui::Label( " Z " );
label.show();
- gtk_table_attach( table, label, 0, 1, 2, 3,
- (GtkAttachOptions) ( 0 ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {0, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.text("1.0");
entry.show();
- gtk_table_attach( table, entry, 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
g_scale_dialog.x = entry;
}
auto entry = ui::Entry(ui::New);
entry.text("1.0");
entry.show();
- gtk_table_attach( table, entry, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
g_scale_dialog.y = entry;
}
auto entry = ui::Entry(ui::New);
entry.text("1.0");
entry.show();
- gtk_table_attach( table, entry, 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
g_scale_dialog.z = entry;
}
{
- ui::Widget table = ui::Table( 6, 4, FALSE );
+ auto table = ui::Table(6, 4, FALSE);
table.show();
vbox.pack_start( table, FALSE, FALSE, 0 );
- 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);
{
ui::Widget label = ui::Label( "Horizontal shift" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
}
{
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 );
m_hshiftIncrement.m_spin = spin;
m_hshiftSpinner.connect( spin );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin , 1, 2, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( spin , 60, -1 );
}
{
ui::Widget label = ui::Label( "Step" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 0, 1}, {GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry , 3, 4, 0, 1,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {3, 4, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
m_hshiftIncrement.m_entry = entry;
m_hshiftEntry.connect( entry );
ui::Widget label = ui::Label( "Vertical shift" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
}
{
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 );
m_vshiftIncrement.m_spin = spin;
m_vshiftSpinner.connect( spin );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin , 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 1, 2}, {GTK_FILL, 0});
gtk_widget_set_size_request( spin , 60, -1 );
}
{
ui::Widget label = ui::Label( "Step" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 1, 2}, {GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry , 3, 4, 1, 2,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {3, 4, 1, 2}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
m_vshiftIncrement.m_entry = entry;
m_vshiftEntry.connect( entry );
ui::Widget label = ui::Label( "Horizontal stretch" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_FILL, 0});
}
{
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 );
m_hscaleIncrement.m_spin = spin;
m_hscaleSpinner.connect( spin );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin , 1, 2, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 2, 3}, {GTK_FILL, 0});
gtk_widget_set_size_request( spin , 60, -1 );
}
{
ui::Widget label = ui::Label( "Step" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 2, 3 );
+ table.attach(label, {2, 3, 2, 3}, {GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry , 3, 4, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 2, 3 );
+ table.attach(entry, {3, 4, 2, 3}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
m_hscaleIncrement.m_entry = entry;
m_hscaleEntry.connect( entry );
ui::Widget label = ui::Label( "Vertical stretch" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 3, 4,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 3, 4}, {GTK_FILL, 0});
}
{
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 );
m_vscaleIncrement.m_spin = spin;
m_vscaleSpinner.connect( spin );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin , 1, 2, 3, 4,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 3, 4}, {GTK_FILL, 0});
gtk_widget_set_size_request( spin , 60, -1 );
}
{
ui::Widget label = ui::Label( "Step" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 3, 4,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 3, 4}, {GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry , 3, 4, 3, 4,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {3, 4, 3, 4}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
m_vscaleIncrement.m_entry = entry;
m_vscaleEntry.connect( entry );
ui::Widget label = ui::Label( "Rotate" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 4, 5,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 4, 5}, {GTK_FILL, 0});
}
{
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 );
m_rotateIncrement.m_spin = spin;
m_rotateSpinner.connect( spin );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin , 1, 2, 4, 5,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {1, 2, 4, 5}, {GTK_FILL, 0});
gtk_widget_set_size_request( spin , 60, -1 );
gtk_spin_button_set_wrap( spin, TRUE );
}
ui::Widget label = ui::Label( "Step" );
label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 4, 5,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 4, 5}, {GTK_FILL, 0});
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_table_attach( GTK_TABLE( table ), entry , 3, 4, 4, 5,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(entry, {3, 4, 4, 5}, {GTK_FILL, 0});
gtk_widget_set_size_request( entry , 50, -1 );
m_rotateIncrement.m_entry = entry;
m_rotateEntry.connect( entry );
// match grid button
ui::Widget button = ui::Button( "Match Grid" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 2, 4, 5, 6,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {2, 4, 5, 6}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked", G_CALLBACK( OnBtnMatchGrid ), 0 );
}
}
frame.show();
vbox.pack_start( frame, FALSE, FALSE, 0 );
{
- ui::Widget table = ui::Table( 4, 4, FALSE );
+ auto table = ui::Table(4, 4, FALSE);
table.show();
frame.add(table);
- 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);
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
{
ui::Widget label = ui::Label( "Brush" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
}
{
ui::Widget label = ui::Label( "Patch" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {0, 1, 2, 3}, {GTK_FILL, 0});
}
{
ui::Widget label = ui::Label( "Width" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {2, 3, 0, 1}, {GTK_FILL, 0});
}
{
ui::Widget label = ui::Label( "Height" );
label.show();
- gtk_table_attach( GTK_TABLE( table ), label, 3, 4, 0, 1,
- (GtkAttachOptions) ( GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(label, {3, 4, 0, 1}, {GTK_FILL, 0});
}
{
ui::Widget button = ui::Button( "Axial" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked",
G_CALLBACK( OnBtnAxial ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
{
ui::Widget button = ui::Button( "Fit" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked",
G_CALLBACK( OnBtnFaceFit ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
{
ui::Widget button = ui::Button( "CAP" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 3, 4,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {0, 1, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked",
G_CALLBACK( OnBtnPatchdetails ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
{
ui::Widget button = ui::Button( "Set..." );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 3, 4,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {1, 2, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked",
G_CALLBACK( OnBtnPatchreset ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
{
ui::Widget button = ui::Button( "Natural" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 3, 4,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {2, 3, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked",
G_CALLBACK( OnBtnPatchnatural ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
{
ui::Widget button = ui::Button( "Fit" );
button.show();
- gtk_table_attach( GTK_TABLE( table ), button, 3, 4, 3, 4,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(button, {3, 4, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
button.connect( "clicked",
G_CALLBACK( OnBtnPatchFit ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
{
auto spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {2, 3, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( spin, 60, -1 );
AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitHorizontal );
}
{
auto spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 );
spin.show();
- gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2,
- (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions) ( 0 ), 0, 0 );
+ table.attach(spin, {3, 4, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
gtk_widget_set_size_request( spin, 60, -1 );
AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitVertical );
}
GtkCheckButton** p = m_surfaceFlags;
- for ( int c = 0; c != 4; ++c )
+ for (unsigned int c = 0; c != 4; ++c)
{
- for ( int r = 0; r != 8; ++r )
+ for (unsigned int r = 0; r != 8; ++r)
{
auto check = ui::CheckButton( getSurfaceFlagName( c * 8 + r ) );
check.show();
- gtk_table_attach( table, check , c, c + 1, r, r + 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(check, {c, c + 1, r, r + 1}, {GTK_EXPAND | GTK_FILL, 0});
*p++ = check;
guint handler_id = togglebutton_connect_toggled( GTK_TOGGLE_BUTTON( check ), ApplyFlagsCaller( *this ) );
g_object_set_data( G_OBJECT( check ), "handler", gint_to_pointer( handler_id ) );
GtkCheckButton** p = m_contentFlags;
- for ( int c = 0; c != 4; ++c )
+ for (unsigned int c = 0; c != 4; ++c)
{
- for ( int r = 0; r != 8; ++r )
+ for (unsigned int r = 0; r != 8; ++r)
{
auto check = ui::CheckButton( getContentFlagName( c * 8 + r ) );
check.show();
- gtk_table_attach( table, check , c, c + 1, r, r + 1,
- (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
- (GtkAttachOptions)( 0 ), 0, 0 );
+ table.attach(check, {c, c + 1, r, r + 1}, {GTK_EXPAND | GTK_FILL, 0});
*p++ = check;
guint handler_id = togglebutton_connect_toggled( GTK_TOGGLE_BUTTON( check ), ApplyFlagsCaller( *this ) );
g_object_set_data( G_OBJECT( check ), "handler", gint_to_pointer( handler_id ) );
g_TextureBrowser.m_parent = toplevel;
- ui::Widget table = ui::Table( 3, 3, FALSE );
- ui::Widget frame_table{ui::null};
+ auto table = ui::Table(3, 3, FALSE);
auto vbox = ui::VBox(FALSE, 0);
- gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
+ table.attach(vbox, {0, 1, 1, 3}, {GTK_FILL, GTK_FILL});
vbox.show();
ui::Widget menu_bar{ui::null};
gtk_menu_item_set_submenu( GTK_MENU_ITEM( tools_item ), menu_tools );
gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tools_item );
- gtk_table_attach( GTK_TABLE( table ), menu_bar, 0, 3, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0 );
+ table.attach(menu_bar, {0, 3, 0, 1}, {GTK_FILL, GTK_SHRINK});
menu_bar.show();
}
{ // Texture TreeView
}
{ // gl_widget scrollbar
ui::Widget w = ui::Widget(gtk_vscrollbar_new( ui::Adjustment( 0,0,0,1,1,0 ) ));
- gtk_table_attach( GTK_TABLE( table ), w, 2, 3, 1, 2, GTK_SHRINK, GTK_FILL, 0, 0 );
+ table.attach(w, {2, 3, 1, 2}, {GTK_SHRINK, GTK_FILL});
w.show();
g_TextureBrowser.m_texture_scroll = w;
gtk_widget_set_events( g_TextureBrowser.m_gl_widget, GDK_DESTROY | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_SCROLL_MASK );
gtk_widget_set_can_focus( g_TextureBrowser.m_gl_widget, true );
- gtk_table_attach_defaults( GTK_TABLE( table ), g_TextureBrowser.m_gl_widget, 1, 2, 1, 2 );
+ table.attach(g_TextureBrowser.m_gl_widget, {1, 2, 1, 2});
g_TextureBrowser.m_gl_widget.show();
g_TextureBrowser.m_sizeHandler = g_TextureBrowser.m_gl_widget.connect( "size_allocate", G_CALLBACK( TextureBrowser_size_allocate ), &g_TextureBrowser );
TextureBrowser_constructSearchButton();
vbox.pack_end(g_TextureBrowser.m_search_button, FALSE, FALSE, 0);
}
+ auto frame_table = ui::Table(3, 3, FALSE);
{ // Tag frame
- frame_table = ui::Table( 3, 3, FALSE );
g_TextureBrowser.m_tag_frame = ui::Frame( "Tag assignment" );
gtk_frame_set_label_align( GTK_FRAME( g_TextureBrowser.m_tag_frame ), 0.5, 0.5 );
gtk_frame_set_shadow_type( GTK_FRAME( g_TextureBrowser.m_tag_frame ), GTK_SHADOW_NONE );
- gtk_table_attach( GTK_TABLE( table ), g_TextureBrowser.m_tag_frame, 1, 3, 2, 3, GTK_FILL, GTK_SHRINK, 0, 0 );
+ table.attach(g_TextureBrowser.m_tag_frame, {1, 3, 2, 3}, {GTK_FILL, GTK_SHRINK});
frame_table.show();
scrolled_win.show();
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), g_TextureBrowser.m_assigned_tree );
- gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
+ frame_table.attach(scrolled_win, {0, 1, 1, 3}, {GTK_FILL, GTK_FILL});
}
{ // available tag list
ui::Widget scrolled_win = ui::ScrolledWindow(ui::New);
scrolled_win.show();
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), g_TextureBrowser.m_available_tree );
- gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 2, 3, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
+ frame_table.attach(scrolled_win, {2, 3, 1, 3}, {GTK_FILL, GTK_FILL});
}
{ // tag arrow buttons
auto m_btn_left = ui::Button(ui::New);
gtk_widget_set_size_request( m_arrow_left, -1, 68 );
gtk_widget_set_size_request( m_arrow_right, -1, 68 );
- gtk_table_attach( GTK_TABLE( frame_table ), m_btn_left, 1, 2, 1, 2, GTK_SHRINK, GTK_EXPAND, 0, 0 );
- gtk_table_attach( GTK_TABLE( frame_table ), m_btn_right, 1, 2, 2, 3, GTK_SHRINK, GTK_EXPAND, 0, 0 );
+ frame_table.attach(m_btn_left, {1, 2, 1, 2}, {GTK_SHRINK, GTK_EXPAND});
+ frame_table.attach(m_btn_right, {1, 2, 2, 3}, {GTK_SHRINK, GTK_EXPAND});
m_btn_left.connect( "clicked", G_CALLBACK( TextureBrowser_assignTags ), NULL );
m_btn_right.connect( "clicked", G_CALLBACK( TextureBrowser_removeTags ), NULL );
ui::Widget m_lbl_assigned = ui::Label( "Assigned" );
ui::Widget m_lbl_unassigned = ui::Label( "Available" );
- gtk_table_attach( GTK_TABLE( frame_table ), m_lbl_assigned, 0, 1, 0, 1, GTK_EXPAND, GTK_SHRINK, 0, 0 );
- gtk_table_attach( GTK_TABLE( frame_table ), m_lbl_unassigned, 2, 3, 0, 1, GTK_EXPAND, GTK_SHRINK, 0, 0 );
+ frame_table.attach(m_lbl_assigned, {0, 1, 0, 1}, {GTK_EXPAND, GTK_SHRINK});
+ frame_table.attach(m_lbl_unassigned, {2, 3, 0, 1}, {GTK_EXPAND, GTK_SHRINK});
m_lbl_assigned.show();
m_lbl_unassigned.show();