m_pWidget = ui::VBox( FALSE,0 );
// Frame for file row
auto frame = ui::Frame( "File" );
- gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 );
+ m_pWidget.pack_start(frame, FALSE, FALSE, 2 );
// hbox for first row
auto hbox = ui::HBox( FALSE,5 );
m_pFileLabel = ui::Label( NO_FILE_MSG );
gtk_label_set_selectable( GTK_LABEL( m_pFileLabel ),TRUE );
//TODO set min size ? done with spaces right now
- gtk_box_pack_start( GTK_BOX( hbox ),m_pFileLabel, TRUE, TRUE, 5 );
+ hbox.pack_start(m_pFileLabel, TRUE, TRUE, 5 );
gtk_widget_show( m_pFileLabel );
w = ui::Button( "Browse..." );
w.connect( "clicked", G_CALLBACK( browse_callback ), ( gpointer ) this );
- gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
+ hbox.pack_start(w, FALSE, FALSE, 5 );
gtk_tooltips_set_tip( pTooltips, w, "Select a file", NULL );
gtk_widget_show( w );
// TODO disable until we have file
// gtk_widget_set_sensitive(w,FALSE);
gtk_tooltips_set_tip( pTooltips, w, "Reload current file", NULL );
- gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
+ hbox.pack_start(w, FALSE, FALSE, 5 );
gtk_widget_show( w );
gtk_widget_show( hbox );
// second row (rendering options)
frame = ui::Frame( "Rendering" );
- gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 );
+ m_pWidget.pack_start(frame, FALSE, FALSE, 2 );
hbox = ui::HBox( FALSE,5 );
gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 );
frame.add(hbox);
w = ui::Label( "Vertex alpha:" );
- gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
+ hbox.pack_start(w, FALSE, FALSE, 5 );
gtk_widget_show( w );
w = ui::HScale( 0.0, 1.0, 0.01 );
gtk_range_set_value( GTK_RANGE( w ),0.5 );
gtk_scale_set_value_pos( GTK_SCALE( w ),GTK_POS_LEFT );
w.connect( "value-changed", G_CALLBACK( alpha_adjust_callback ), ( gpointer ) this );
- gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, TRUE, 5 );
+ hbox.pack_start(w, TRUE, TRUE, 5 );
gtk_tooltips_set_tip( pTooltips, w, "Set image transparancy", NULL );
gtk_widget_show( w );
// Third row (size and position)
frame = ui::Frame( "Size/Position (undefined)" );
m_pPosLabel = gtk_frame_get_label_widget( GTK_FRAME( frame ) );
- gtk_box_pack_start( GTK_BOX( m_pWidget ), frame, FALSE, FALSE, 2 );
+ m_pWidget.pack_start( frame, FALSE, FALSE, 2 );
hbox = ui::HBox( FALSE,5 );
frame.add(hbox);
gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 );
w = ui::Button( "from selection" );
- gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, FALSE, 5 );
+ hbox.pack_start(w, TRUE, FALSE, 5 );
w.connect( "clicked", G_CALLBACK( size_sel_callback ), ( gpointer ) this );
gtk_tooltips_set_tip( pTooltips, w, "Set the size of the image to the bounding rectangle of all selected brushes and entities", NULL );
gtk_widget_show( w );
if ( m_vt == XY ) {
w = ui::Button( "from map mins/maxs" );
- gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, FALSE, 2 );
+ hbox.pack_start(w, TRUE, FALSE, 2 );
w.connect( "clicked", G_CALLBACK( size_mm_callback ), ( gpointer ) this );
gtk_tooltips_set_tip( pTooltips, w, "Set the size of the image using the mapcoordsmins and mapcoordsmaxs keys of the worldspawn entity", NULL );
gtk_widget_show( w );
gtk_widget_show( vbox );
w = ui::Label( lpText );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
auto hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
if ( type == eMB_OK ) {
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default(w, true);
gtk_widget_grab_default( w );
}
else if ( type == eMB_OKCANCEL ) {
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
}
else if ( type == eMB_YESNOCANCEL ) {
w = ui::Button( "Yes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
gtk_widget_show( w );
w = ui::Button( "No" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDNO ) );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
else /* if (mode == MB_YESNO) */
{
w = ui::Button( "Yes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
gtk_widget_show( w );
w = ui::Button( "No" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDNO ) );
gtk_widget_show( w );
ret = eIDNO;
}
EMessageBoxReturn DoIntersectBox( IntersectRS* rs ){
- GtkWidget *hbox;
- GtkWidget *check1, *check2;
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- auto radio1 = gtk_radio_button_new_with_label( NULL, "Use Whole Map" );
- gtk_box_pack_start( GTK_BOX( vbox ), radio1, FALSE, FALSE, 2 );
+ auto radio1 = ui::Widget(gtk_radio_button_new_with_label( NULL, "Use Whole Map" ));
+ vbox.pack_start( radio1, FALSE, FALSE, 2 );
gtk_widget_show( radio1 );
- auto radio2 = gtk_radio_button_new_with_label( gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio1)), "Use Selected Brushes" );
- gtk_box_pack_start( GTK_BOX( vbox ), radio2, FALSE, FALSE, 2 );
+ auto radio2 = ui::Widget(gtk_radio_button_new_with_label( gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio1)), "Use Selected Brushes" ));
+ vbox.pack_start( radio2, FALSE, FALSE, 2 );
gtk_widget_show( radio2 );
auto hsep = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), hsep, FALSE, FALSE, 2 );
+ vbox.pack_start( hsep, FALSE, FALSE, 2 );
hsep.show();
- check1 = ui::CheckButton( "Include Detail Brushes" );
- gtk_box_pack_start( GTK_BOX( vbox ), check1, FALSE, FALSE, 0 );
+ auto check1 = ui::CheckButton( "Include Detail Brushes" );
+ vbox.pack_start( check1, FALSE, FALSE, 0 );
gtk_widget_show( check1 );
- check2 = ui::CheckButton( "Select Duplicate Brushes Only" );
- gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 );
+ auto check2 = ui::CheckButton( "Select Duplicate Brushes Only" );
+ vbox.pack_start( check2, FALSE, FALSE, 0 );
gtk_widget_show( check2 );
- hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ auto hbox = ui::HBox( FALSE, 10 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ---- ok/cancel buttons
auto w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
while ( loop )
gtk_main_iteration();
- if ( gtk_toggle_button_get_active( (GtkToggleButton*)radio1 ) ) {
+ if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radio1) ) ) {
rs->nBrushOptions = BRUSH_OPT_WHOLE_MAP;
}
- else if ( gtk_toggle_button_get_active( (GtkToggleButton*)radio2 ) ) {
+ else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radio2) ) ) {
rs->nBrushOptions = BRUSH_OPT_SELECTED;
}
- rs->bUseDetail = gtk_toggle_button_get_active( (GtkToggleButton*)check1 ) ? true : false;
- rs->bDuplicateOnly = gtk_toggle_button_get_active( (GtkToggleButton*)check2 ) ? true : false;
+ rs->bUseDetail = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(check1) ) ? true : false;
+ rs->bDuplicateOnly = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(check2) ) ? true : false;
gtk_grab_remove( window );
window.destroy();
}
EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){
- GtkWidget *hbox, *vbox2, *hbox2;
-
- GtkWidget *check1, *check2, *check3;
- GtkWidget *text1, *text2;
-
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ auto hbox = ui::HBox( FALSE, 10 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
- vbox2 = ui::VBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( hbox ), vbox2, FALSE, FALSE, 2 );
+ auto vbox2 = ui::VBox( FALSE, 10 );
+ hbox.pack_start( vbox2, FALSE, FALSE, 2 );
gtk_widget_show( vbox2 );
// ---- vbox2 ----
- hbox2 = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox2, FALSE, FALSE, 2 );
+ auto hbox2 = ui::HBox( FALSE, 10 );
+ vbox2.pack_start( hbox2, FALSE, FALSE, 2 );
gtk_widget_show( hbox2 );
// ---- hbox2 ----
- text1 = ui::Entry( 256 );
+ auto text1 = ui::Entry( 256 );
gtk_entry_set_text( (GtkEntry*)text1, "3" );
- gtk_box_pack_start( GTK_BOX( hbox2 ), text1, FALSE, FALSE, 2 );
+ hbox2.pack_start( text1, FALSE, FALSE, 2 );
gtk_widget_show( text1 );
auto l = ui::Label( "Number Of Sides" );
- gtk_box_pack_start( GTK_BOX( hbox2 ), l, FALSE, FALSE, 2 );
+ hbox2.pack_start( l, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( l ), GTK_JUSTIFY_LEFT );
gtk_widget_show( l );
// ---- /hbox2 ----
hbox2 = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox2, FALSE, FALSE, 2 );
+ vbox2.pack_start( hbox2, FALSE, FALSE, 2 );
gtk_widget_show( hbox2 );
// ---- hbox2 ----
- text2 = ui::Entry( 256 );
+ auto text2 = ui::Entry( 256 );
gtk_entry_set_text( (GtkEntry*)text2, "8" );
- gtk_box_pack_start( GTK_BOX( hbox2 ), text2, FALSE, FALSE, 2 );
+ hbox2.pack_start( text2, FALSE, FALSE, 2 );
gtk_widget_show( text2 );
l = ui::Label( "Border Width" );
- gtk_box_pack_start( GTK_BOX( hbox2 ), l, FALSE, FALSE, 2 );
+ hbox2.pack_start( l, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( l ), GTK_JUSTIFY_LEFT );
gtk_widget_show( l );
vbox2 = ui::VBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( hbox ), vbox2, FALSE, FALSE, 2 );
+ hbox.pack_start( vbox2, FALSE, FALSE, 2 );
gtk_widget_show( vbox2 );
// ---- vbox2 ----
- check1 = ui::CheckButton( "Use Border" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), check1, FALSE, FALSE, 0 );
+ auto check1 = ui::CheckButton( "Use Border" );
+ vbox2.pack_start( check1, FALSE, FALSE, 0 );
gtk_widget_show( check1 );
- check2 = ui::CheckButton( "Inverse Polygon" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), check2, FALSE, FALSE, 0 );
+ auto check2 = ui::CheckButton( "Inverse Polygon" );
+ vbox2.pack_start( check2, FALSE, FALSE, 0 );
gtk_widget_show( check2 );
- check3 = ui::CheckButton( "Align Top Edge" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), check3, FALSE, FALSE, 0 );
+ auto check3 = ui::CheckButton( "Align Top Edge" );
+ vbox2.pack_start( check3, FALSE, FALSE, 0 );
gtk_widget_show( check3 );
// ---- /vbox2 ----
// ---- /hbox ----
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
auto w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
dialogError = FALSE;
if ( ret == eIDOK ) {
- rs->bUseBorder = gtk_toggle_button_get_active( (GtkToggleButton*)check1 ) ? true : false;
- rs->bInverse = gtk_toggle_button_get_active( (GtkToggleButton*)check2 ) ? true : false;
- rs->bAlignTop = gtk_toggle_button_get_active( (GtkToggleButton*)check3 ) ? true : false;
+ rs->bUseBorder = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(check1) ) ? true : false;
+ rs->bInverse = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(check2) ) ? true : false;
+ rs->bAlignTop = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(check3) ) ? true : false;
if ( !ValidateTextIntRange( gtk_entry_get_text( (GtkEntry*)text1 ), 3, 32, "Number Of Sides", &rs->nSides ) ) {
dialogError = TRUE;
// for stair builder stuck as close as i could to the MFC version
// obviously feel free to change it at will :)
EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){
- GtkWidget *textStairHeight, *textRiserTex, *textMainTex;
- GtkWidget *radioNorth, *radioSouth, *radioEast, *radioWest; // i'm guessing we can't just abuse 'w' for these if we're getting a value
- GtkWidget *radioOldStyle, *radioBobStyle, *radioCornerStyle;
- GtkWidget *checkUseDetail;
GSList *radioDirection, *radioStyle;
EMessageBoxReturn ret;
int loop = 1;
// dunno if you want this text or not ...
ui::Widget w = ui::Label( text );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); // not entirely sure on all the parameters / what they do ...
+ hbox.pack_start( w, FALSE, FALSE, 0 ); // not entirely sure on all the parameters / what they do ...
gtk_widget_show( w );
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// ------------------------- // indenting == good way of keeping track of lines :)
// new hbox
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- textStairHeight = ui::Entry( 256 );
- gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 );
+ auto textStairHeight = ui::Entry( 256 );
+ hbox.pack_start( textStairHeight, FALSE, FALSE, 1 );
gtk_widget_show( textStairHeight );
w = ui::Label( "Stair Height" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 );
+ hbox.pack_start( w, FALSE, FALSE, 1 );
gtk_widget_show( w );
// ------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Direction:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 5 );
+ hbox.pack_start( w, FALSE, FALSE, 5 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
// radio buttons confuse me ...
// djbob: actually it looks very nice :), slightly better than the way i did it
// edit: actually it doesn't work :P, you must pass the last radio item each time, ugh
- radioNorth = gtk_radio_button_new_with_label( NULL, "North" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioNorth, FALSE, FALSE, 3 );
+ auto radioNorth = ui::Widget(gtk_radio_button_new_with_label( NULL, "North" ));
+ hbox.pack_start( radioNorth, FALSE, FALSE, 3 );
gtk_widget_show( radioNorth );
radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioNorth ) );
- radioSouth = gtk_radio_button_new_with_label( radioDirection, "South" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioSouth, FALSE, FALSE, 2 );
+ auto radioSouth = ui::Widget(gtk_radio_button_new_with_label( radioDirection, "South" ));
+ hbox.pack_start( radioSouth, FALSE, FALSE, 2 );
gtk_widget_show( radioSouth );
radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioSouth ) );
- radioEast = gtk_radio_button_new_with_label( radioDirection, "East" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioEast, FALSE, FALSE, 1 );
+ auto radioEast = ui::Widget(gtk_radio_button_new_with_label( radioDirection, "East" ));
+ hbox.pack_start( radioEast, FALSE, FALSE, 1 );
gtk_widget_show( radioEast );
radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioEast ) );
- radioWest = gtk_radio_button_new_with_label( radioDirection, "West" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioWest, FALSE, FALSE, 0 );
+ auto radioWest = ui::Widget(gtk_radio_button_new_with_label( radioDirection, "West" ));
+ hbox.pack_start( radioWest, FALSE, FALSE, 0 );
gtk_widget_show( radioWest );
// --------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Style:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 5 );
+ hbox.pack_start( w, FALSE, FALSE, 5 );
gtk_widget_show( w );
// --------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- radioOldStyle = gtk_radio_button_new_with_label( NULL, "Original" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioOldStyle, FALSE, FALSE, 0 );
+ auto radioOldStyle = ui::Widget(gtk_radio_button_new_with_label( NULL, "Original" ));
+ hbox.pack_start( radioOldStyle, FALSE, FALSE, 0 );
gtk_widget_show( radioOldStyle );
radioStyle = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioOldStyle ) );
- radioBobStyle = gtk_radio_button_new_with_label( radioStyle, "Bob's Style" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioBobStyle, FALSE, FALSE, 0 );
+ auto radioBobStyle = ui::Widget(gtk_radio_button_new_with_label( radioStyle, "Bob's Style" ));
+ hbox.pack_start( radioBobStyle, FALSE, FALSE, 0 );
gtk_widget_show( radioBobStyle );
radioStyle = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioBobStyle ) );
- radioCornerStyle = gtk_radio_button_new_with_label( radioStyle, "Corner Style" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioCornerStyle, FALSE, FALSE, 0 );
+ auto radioCornerStyle = ui::Widget(gtk_radio_button_new_with_label( radioStyle, "Corner Style" ));
+ hbox.pack_start( radioCornerStyle, FALSE, FALSE, 0 );
gtk_widget_show( radioCornerStyle );
// err, the q3r has an if or something so you need bob style checked before this
// djbob: think we need some button callback functions or smuffin
// FIXME: actually get around to doing what i suggested!!!!
- checkUseDetail = ui::CheckButton( "Use Detail Brushes" );
- gtk_box_pack_start( GTK_BOX( hbox ), checkUseDetail, FALSE, FALSE, 0 );
+ auto checkUseDetail = ui::CheckButton( "Use Detail Brushes" );
+ hbox.pack_start( checkUseDetail, FALSE, FALSE, 0 );
gtk_widget_show( checkUseDetail );
// --------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- textMainTex = ui::Entry( 512 );
+ auto textMainTex = ui::Entry( 512 );
gtk_entry_set_text( GTK_ENTRY( textMainTex ), rs->mainTexture );
- gtk_box_pack_start( GTK_BOX( hbox ), textMainTex, FALSE, FALSE, 0 );
+ hbox.pack_start( textMainTex, FALSE, FALSE, 0 );
gtk_widget_show( textMainTex );
w = ui::Label( "Main Texture" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 );
+ hbox.pack_start( w, FALSE, FALSE, 1 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- textRiserTex = ui::Entry( 512 );
- gtk_box_pack_start( GTK_BOX( hbox ), textRiserTex, FALSE, FALSE, 0 );
+ auto textRiserTex = ui::Entry( 512 );
+ hbox.pack_start( textRiserTex, FALSE, FALSE, 0 );
gtk_widget_show( textRiserTex );
w = ui::Label( "Riser Texture" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 );
+ hbox.pack_start( w, FALSE, FALSE, 1 );
gtk_widget_show( w );
// -------------------------- //
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "OK" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
dialogError = FALSE;
if ( ret == eIDOK ) {
- rs->bUseDetail = gtk_toggle_button_get_active( (GtkToggleButton*)checkUseDetail ) ? true : false;
+ rs->bUseDetail = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(checkUseDetail) ) ? true : false;
strcpy( rs->riserTexture, gtk_entry_get_text( (GtkEntry*)textRiserTex ) );
strcpy( rs->mainTexture, gtk_entry_get_text( (GtkEntry*)textMainTex ) );
- if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioNorth ) ) {
+ if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioNorth) ) ) {
rs->direction = MOVE_NORTH;
}
- else if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioSouth ) ) {
+ else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioSouth) ) ) {
rs->direction = MOVE_SOUTH;
}
- else if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioEast ) ) {
+ else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioEast) ) ) {
rs->direction = MOVE_EAST;
}
- else if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioWest ) ) {
+ else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioWest) ) ) {
rs->direction = MOVE_WEST;
}
dialogError = TRUE;
}
- if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioOldStyle ) ) {
+ if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioOldStyle) ) ) {
rs->style = STYLE_ORIGINAL;
}
- else if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioBobStyle ) ) {
+ else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioBobStyle) ) ) {
rs->style = STYLE_BOB;
}
- else if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioCornerStyle ) ) {
+ else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(radioCornerStyle) ) ) {
rs->style = STYLE_CORNER;
}
}
}
EMessageBoxReturn DoDoorsBox( DoorRS* rs ){
- GtkWidget *hbox;
- GtkWidget *checkScaleMainH, *checkScaleMainV, *checkScaleTrimH, *checkScaleTrimV;
- GtkWidget *radioNS, *radioEW;
GSList *radioOrientation;
TwinWidget tw1, tw2;
EMessageBoxReturn ret;
// -------------------------- //
- hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ auto hbox = ui::HBox( FALSE, 10 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto textFrontBackTex = ui::Entry( 512 );
gtk_entry_set_text( GTK_ENTRY( textFrontBackTex ), rs->mainTexture );
- gtk_box_pack_start( GTK_BOX( hbox ), textFrontBackTex, FALSE, FALSE, 0 );
+ hbox.pack_start( textFrontBackTex, FALSE, FALSE, 0 );
gtk_widget_show( textFrontBackTex );
ui::Widget w = ui::Label( "Door Front/Back Texture" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// ------------------------ //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto textTrimTex = ui::Entry( 512 );
- gtk_box_pack_start( GTK_BOX( hbox ), textTrimTex, FALSE, FALSE, 0 );
+ hbox.pack_start( textTrimTex, FALSE, FALSE, 0 );
gtk_widget_show( textTrimTex );
w = ui::Label( "Door Trim Texture" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// ----------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
// sp: horizontally ????
// djbob: yes mars, u can spell :]
- checkScaleMainH = ui::CheckButton( "Scale Main Texture Horizontally" );
+ auto checkScaleMainH = ui::CheckButton( "Scale Main Texture Horizontally" );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkScaleMainH ), TRUE );
- gtk_box_pack_start( GTK_BOX( hbox ), checkScaleMainH, FALSE, FALSE, 0 );
+ hbox.pack_start( checkScaleMainH, FALSE, FALSE, 0 );
gtk_widget_show( checkScaleMainH );
- checkScaleTrimH = ui::CheckButton( "Scale Trim Texture Horizontally" );
+ auto checkScaleTrimH = ui::CheckButton( "Scale Trim Texture Horizontally" );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkScaleTrimH ), TRUE );
- gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimH, FALSE, FALSE, 0 );
+ hbox.pack_start( checkScaleTrimH, FALSE, FALSE, 0 );
gtk_widget_show( checkScaleTrimH );
// ---------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- checkScaleMainV = ui::CheckButton( "Scale Main Texture Vertically" );
+ auto checkScaleMainV = ui::CheckButton( "Scale Main Texture Vertically" );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkScaleMainV ), TRUE );
- gtk_box_pack_start( GTK_BOX( hbox ), checkScaleMainV, FALSE, FALSE, 0 );
+ hbox.pack_start( checkScaleMainV, FALSE, FALSE, 0 );
gtk_widget_show( checkScaleMainV );
- checkScaleTrimV = ui::CheckButton( "Scale Trim Texture Vertically" );
- gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimV, FALSE, FALSE, 0 );
+ auto checkScaleTrimV = ui::CheckButton( "Scale Trim Texture Vertically" );
+ hbox.pack_start( checkScaleTrimV, FALSE, FALSE, 0 );
gtk_widget_show( checkScaleTrimV );
// --------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
// djbob: lists added
auto comboMain = ui::ComboBox(GTK_COMBO_BOX(gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(listMainTextures))));
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(comboMain), 0);
- gtk_box_pack_start( GTK_BOX( hbox ), comboMain, FALSE, FALSE, 0 );
+ hbox.pack_start( comboMain, FALSE, FALSE, 0 );
gtk_widget_show( comboMain );
tw1.one = textFrontBackTex;
auto buttonSetMain = ui::Button( "Set As Main Texture" );
buttonSetMain.connect( "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw1 );
- gtk_box_pack_start( GTK_BOX( hbox ), buttonSetMain, FALSE, FALSE, 0 );
+ hbox.pack_start( buttonSetMain, FALSE, FALSE, 0 );
gtk_widget_show( buttonSetMain );
// ------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto comboTrim = ui::ComboBox(GTK_COMBO_BOX(gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(listTrimTextures))));
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(comboMain), 0);
- gtk_box_pack_start( GTK_BOX( hbox ), comboTrim, FALSE, FALSE, 0 );
+ hbox.pack_start( comboTrim, FALSE, FALSE, 0 );
gtk_widget_show( comboTrim );
tw2.one = textTrimTex;
auto buttonSetTrim = ui::Button( "Set As Trim Texture" );
buttonSetTrim.connect( "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw2 );
- gtk_box_pack_start( GTK_BOX( hbox ), buttonSetTrim, FALSE, FALSE, 0 );
+ hbox.pack_start( buttonSetTrim, FALSE, FALSE, 0 );
gtk_widget_show( buttonSetTrim );
// ------------------ //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Orientation" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// argh more radio buttons!
- radioNS = gtk_radio_button_new_with_label( NULL, "North - South" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioNS, FALSE, FALSE, 0 );
+ auto radioNS = ui::Widget(gtk_radio_button_new_with_label( NULL, "North - South" ));
+ hbox.pack_start( radioNS, FALSE, FALSE, 0 );
gtk_widget_show( radioNS );
radioOrientation = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioNS ) );
- radioEW = gtk_radio_button_new_with_label( radioOrientation, "East - West" );
- gtk_box_pack_start( GTK_BOX( hbox ), radioEW, FALSE, FALSE, 0 );
+ auto radioEW = ui::Widget(gtk_radio_button_new_with_label( radioOrientation, "East - West" ));
+ hbox.pack_start( radioEW, FALSE, FALSE, 0 );
gtk_widget_show( radioEW );
// ----------------- //
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// ----------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "OK" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// ---- vbox ----
auto hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
auto text1 = ui::Entry( 256 );
gtk_entry_set_text( text1, "25" );
- gtk_box_pack_start( GTK_BOX( hbox ), text1, FALSE, FALSE, 2 );
+ hbox.pack_start( text1, FALSE, FALSE, 2 );
gtk_widget_show( text1 );
w = ui::Label( "Number Of Points" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 );
+ hbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
// ---- /hbox ----
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
auto text2 = ui::Entry( 256 );
gtk_entry_set_text( text2, "3" );
- gtk_box_pack_start( GTK_BOX( hbox ), text2, FALSE, FALSE, 2 );
+ hbox.pack_start( text2, FALSE, FALSE, 2 );
gtk_widget_show( text2 );
w = ui::Label( "Multipler" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 );
+ hbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
// ---- /hbox ----
w = ui::Label( "Path Distance = dist(start -> apex) * multiplier" );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
auto text3 = ui::Entry( 256 );
gtk_entry_set_text( text3, "-800" );
- gtk_box_pack_start( GTK_BOX( hbox ), text3, FALSE, FALSE, 2 );
+ hbox.pack_start( text3, FALSE, FALSE, 2 );
gtk_widget_show( text3 );
w = ui::Label( "Gravity" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 );
+ hbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
// ---- /hbox ----
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
auto check1 = ui::CheckButton( "No Dynamic Update" );
- gtk_box_pack_start( GTK_BOX( vbox ), check1, FALSE, FALSE, 0 );
+ vbox.pack_start( check1, FALSE, FALSE, 0 );
gtk_widget_show( check1 );
auto check2 = ui::CheckButton( "Show Bounding Lines" );
- gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 );
+ vbox.pack_start( check2, FALSE, FALSE, 0 );
gtk_widget_show( check2 );
// ---- /vbox ----
// ----------------- //
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// ----------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "Enable" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
gtk_widget_show( w );
gtk_widget_grab_default( w );
w = ui::Button( "Disable" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDNO ) );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
// ---- vbox ----
auto hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 );
+ vbox.pack_start( hbox, TRUE, TRUE, 0 );
gtk_widget_show( hbox );
// ---- hbox ---- ok/cancel buttons
w = ui::Button( "Red->Blue" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Blue->Red" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// ---- vbox ----
auto hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
texSelected += GetCurrentTexture();
w = ui::Label( texSelected );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 );
+ hbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
auto frame = ui::Frame( "Reset Texture Names" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
auto table = ui::Table( 2, 3, TRUE );
table.show();
frame = ui::Frame( "Reset Scales" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 2, 3, TRUE );
table.show();
frame = ui::Frame( "Reset Shift" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 2, 3, TRUE );
table.show();
frame = ui::Frame( "Reset Rotation" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 1, 3, TRUE );
table.show();
// ---- /frame ----
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
w = ui::Button( "Use Selected Brushes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Use All Brushes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// ---- vbox ----
auto hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- /hbox ----
auto frame = ui::Frame( "Radii" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
auto table = ui::Table( 2, 3, TRUE );
table.show();
frame = ui::Frame( "Angles" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 2, 3, TRUE );
table.show();
frame = ui::Frame( "Height" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 2, 3, TRUE );
table.show();
frame = ui::Frame( "Points" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 2, 3, TRUE );
table.show();
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// dunno if you want this text or not ...
w = ui::Label( text );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
w = ui::Widget(gtk_hseparator_new());
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// ------------------------- //
// new hbox
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
textlinkNum = ui::Entry( 256 );
- gtk_box_pack_start( GTK_BOX( hbox ), textlinkNum, FALSE, FALSE, 1 );
+ hbox.pack_start( textlinkNum, FALSE, FALSE, 1 );
gtk_widget_show( textlinkNum );
w = ui::Label( "Number of elements in chain" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 );
+ hbox.pack_start( w, FALSE, FALSE, 1 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
textlinkName = ui::Entry( 256 );
- gtk_box_pack_start( GTK_BOX( hbox ), textlinkName, FALSE, FALSE, 0 );
+ hbox.pack_start( textlinkName, FALSE, FALSE, 0 );
gtk_widget_show( textlinkName );
w = ui::Label( "Basename for chain's targetnames." );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 );
+ hbox.pack_start( w, FALSE, FALSE, 1 );
gtk_widget_show( w );
w = ui::Button( "OK" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
// created by glade
GtkWidget*
create_w_plugplug2( void ){
- GtkWidget *hbox2;
- GtkWidget *vbox4;
- GtkWidget *r_collapse;
GSList *r_collapse_group = NULL;
- GtkWidget *r_collapsebymaterial;
- GtkWidget *r_nocollapse;
- GtkWidget *vbox3;
- GtkWidget *vbox2;
- GtkWidget *label1;
- GtkWidget *ed_materialname;
- GtkWidget *hbox1;
- GtkWidget *t_limitmatnames;
- GtkWidget *t_objects;
auto w_plugplug2 = ui::Window( ui::window_type::TOP );
gtk_widget_set_name( w_plugplug2, "w_plugplug2" );
w_plugplug2.add(vbox1);
gtk_container_set_border_width( GTK_CONTAINER( vbox1 ), 5 );
- hbox2 = ui::HBox( TRUE, 5 );
+ auto hbox2 = ui::HBox( TRUE, 5 );
gtk_widget_set_name( hbox2, "hbox2" );
gtk_widget_show( hbox2 );
- gtk_box_pack_start( GTK_BOX( vbox1 ), hbox2, FALSE, FALSE, 0 );
+ vbox1.pack_start( hbox2, FALSE, FALSE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( hbox2 ), 5 );
- vbox4 = ui::VBox( TRUE, 0 );
+ auto vbox4 = ui::VBox( TRUE, 0 );
gtk_widget_set_name( vbox4, "vbox4" );
gtk_widget_show( vbox4 );
- gtk_box_pack_start( GTK_BOX( hbox2 ), vbox4, TRUE, FALSE, 0 );
+ hbox2.pack_start( vbox4, TRUE, FALSE, 0 );
- r_collapse = gtk_radio_button_new_with_mnemonic( NULL, "Collapse mesh" );
+ auto r_collapse = ui::Widget(gtk_radio_button_new_with_mnemonic( NULL, "Collapse mesh" ));
gtk_widget_set_name( r_collapse, "r_collapse" );
gtk_widget_set_tooltip_text(r_collapse, "Collapse all brushes into a single group");
gtk_widget_show( r_collapse );
- gtk_box_pack_start( GTK_BOX( vbox4 ), r_collapse, FALSE, FALSE, 0 );
+ vbox4.pack_start( r_collapse, FALSE, FALSE, 0 );
gtk_radio_button_set_group( GTK_RADIO_BUTTON( r_collapse ), r_collapse_group );
r_collapse_group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( r_collapse ) );
- r_collapsebymaterial = gtk_radio_button_new_with_mnemonic( NULL, "Collapse by material" );
+ auto r_collapsebymaterial = ui::Widget(gtk_radio_button_new_with_mnemonic( NULL, "Collapse by material" ));
gtk_widget_set_name( r_collapsebymaterial, "r_collapsebymaterial" );
gtk_widget_set_tooltip_text(r_collapsebymaterial, "Collapse into groups by material");
gtk_widget_show( r_collapsebymaterial );
- gtk_box_pack_start( GTK_BOX( vbox4 ), r_collapsebymaterial, FALSE, FALSE, 0 );
+ vbox4.pack_start( r_collapsebymaterial, FALSE, FALSE, 0 );
gtk_radio_button_set_group( GTK_RADIO_BUTTON( r_collapsebymaterial ), r_collapse_group );
r_collapse_group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( r_collapsebymaterial ) );
- r_nocollapse = gtk_radio_button_new_with_mnemonic( NULL, "Don't collapse" );
+ auto r_nocollapse = ui::Widget(gtk_radio_button_new_with_mnemonic( NULL, "Don't collapse" ));
gtk_widget_set_name( r_nocollapse, "r_nocollapse" );
gtk_widget_set_tooltip_text(r_nocollapse, "Every brush is stored in its own group");
gtk_widget_show( r_nocollapse );
- gtk_box_pack_start( GTK_BOX( vbox4 ), r_nocollapse, FALSE, FALSE, 0 );
+ vbox4.pack_start( r_nocollapse, FALSE, FALSE, 0 );
gtk_radio_button_set_group( GTK_RADIO_BUTTON( r_nocollapse ), r_collapse_group );
r_collapse_group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( r_nocollapse ) );
- vbox3 = ui::VBox( FALSE, 0 );
+ auto vbox3 = ui::VBox( FALSE, 0 );
gtk_widget_set_name( vbox3, "vbox3" );
gtk_widget_show( vbox3 );
- gtk_box_pack_start( GTK_BOX( hbox2 ), vbox3, FALSE, FALSE, 0 );
+ hbox2.pack_start( vbox3, FALSE, FALSE, 0 );
auto b_export = ui::Button(GTK_BUTTON(gtk_button_new_from_stock( "gtk-save" )));
gtk_widget_set_name( b_export, "b_export" );
gtk_widget_show( b_export );
- gtk_box_pack_start( GTK_BOX( vbox3 ), b_export, TRUE, FALSE, 0 );
+ vbox3.pack_start( b_export, TRUE, FALSE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( b_export ), 5 );
auto b_close = ui::Button(GTK_BUTTON(gtk_button_new_from_stock( "gtk-cancel" )));
gtk_widget_set_name( b_close, "b_close" );
gtk_widget_show( b_close );
- gtk_box_pack_start( GTK_BOX( vbox3 ), b_close, TRUE, FALSE, 0 );
+ vbox3.pack_start( b_close, TRUE, FALSE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( b_close ), 5 );
- vbox2 = ui::VBox( FALSE, 5 );
+ auto vbox2 = ui::VBox( FALSE, 5 );
gtk_widget_set_name( vbox2, "vbox2" );
gtk_widget_show( vbox2 );
- gtk_box_pack_start( GTK_BOX( vbox1 ), vbox2, TRUE, TRUE, 0 );
+ vbox1.pack_start( vbox2, TRUE, TRUE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 2 );
- label1 = ui::Label( "Ignored materials:" );
+ auto label1 = ui::Label( "Ignored materials:" );
gtk_widget_set_name( label1, "label1" );
gtk_widget_show( label1 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), label1, FALSE, FALSE, 0 );
+ vbox2.pack_start( label1, FALSE, FALSE, 0 );
auto scrolledwindow1 = ui::ScrolledWindow(ui::New);
gtk_widget_set_name( scrolledwindow1, "scrolledwindow1" );
scrolledwindow1.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), scrolledwindow1, TRUE, TRUE, 0 );
+ vbox2.pack_start( scrolledwindow1, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scrolledwindow1 ), GTK_SHADOW_IN );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( t_materialist ), FALSE );
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( t_materialist ), FALSE );
- ed_materialname = ui::Entry(ui::New);
+ auto ed_materialname = ui::Entry(ui::New);
gtk_widget_set_name( ed_materialname, "ed_materialname" );
gtk_widget_show( ed_materialname );
- gtk_box_pack_start( GTK_BOX( vbox2 ), ed_materialname, FALSE, FALSE, 0 );
+ vbox2.pack_start( ed_materialname, FALSE, FALSE, 0 );
- hbox1 = ui::HBox( TRUE, 0 );
+ auto hbox1 = ui::HBox( TRUE, 0 );
gtk_widget_set_name( hbox1, "hbox1" );
gtk_widget_show( hbox1 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox1, FALSE, FALSE, 0 );
+ vbox2.pack_start( hbox1, FALSE, FALSE, 0 );
auto b_addmaterial = ui::Button(GTK_BUTTON(gtk_button_new_from_stock( "gtk-add" )));
gtk_widget_set_name( b_addmaterial, "b_addmaterial" );
gtk_widget_show( b_addmaterial );
- gtk_box_pack_start( GTK_BOX( hbox1 ), b_addmaterial, FALSE, FALSE, 0 );
+ hbox1.pack_start( b_addmaterial, FALSE, FALSE, 0 );
auto b_removematerial = ui::Button(GTK_BUTTON(gtk_button_new_from_stock( "gtk-remove" )));
gtk_widget_set_name( b_removematerial, "b_removematerial" );
gtk_widget_show( b_removematerial );
- gtk_box_pack_start( GTK_BOX( hbox1 ), b_removematerial, FALSE, FALSE, 0 );
+ hbox1.pack_start( b_removematerial, FALSE, FALSE, 0 );
- t_limitmatnames = gtk_check_button_new_with_mnemonic( "Use short material names (max. 20 chars)" );
+ auto t_limitmatnames = ui::Widget(gtk_check_button_new_with_mnemonic( "Use short material names (max. 20 chars)" ));
gtk_widget_set_name( t_limitmatnames, "t_limitmatnames" );
gtk_widget_show( t_limitmatnames );
- gtk_box_pack_end( GTK_BOX( vbox2 ), t_limitmatnames, FALSE, FALSE, 0 );
+ vbox2.pack_end( t_limitmatnames, FALSE, FALSE, 0 );
- t_objects = gtk_check_button_new_with_mnemonic( "Create (o)bjects instead of (g)roups" );
+ auto t_objects = ui::Widget(gtk_check_button_new_with_mnemonic( "Create (o)bjects instead of (g)roups" ));
gtk_widget_set_name( t_objects, "t_objects" );
gtk_widget_show( t_objects );
- gtk_box_pack_end( GTK_BOX( vbox2 ), t_objects, FALSE, FALSE, 0 );
+ vbox2.pack_end(t_objects, FALSE, FALSE, 0);
auto t_exportmaterials = ui::CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new_with_mnemonic( "Create material information (.mtl file)" )));
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( t_exportmaterials ), true );
gtk_widget_set_name( t_exportmaterials, "t_exportmaterials" );
gtk_widget_show( t_exportmaterials );
- gtk_box_pack_end( GTK_BOX( vbox2 ), t_exportmaterials, FALSE, FALSE, 10 );
+ vbox2.pack_end(t_exportmaterials, FALSE, FALSE, 10);
using namespace callbacks;
w_plugplug2.connect( "destroy", G_CALLBACK( OnDestroy ), NULL );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto frame = ui::Frame( "Type" );
- gtk_box_pack_start( GTK_BOX( hbox ), frame, TRUE, TRUE, 0 );
+ hbox.pack_start( frame, TRUE, TRUE, 0 );
gtk_widget_show( frame );
auto vbox2 = ui::VBox( FALSE, 5 );
// -------------------------- //
fixed = gtk_radio_button_new_with_label( targetTypeRadio, "Fixed" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), fixed, FALSE, FALSE, 3 );
+ vbox2.pack_start( fixed, FALSE, FALSE, 3 );
gtk_widget_show( fixed );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( fixed ) );
interpolated = gtk_radio_button_new_with_label( targetTypeRadio, "Interpolated" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), interpolated, FALSE, FALSE, 3 );
+ vbox2.pack_start( interpolated, FALSE, FALSE, 3 );
gtk_widget_show( interpolated );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( interpolated ) );
spline = gtk_radio_button_new_with_label( targetTypeRadio, "Spline" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), spline, FALSE, FALSE, 3 );
+ vbox2.pack_start( spline, FALSE, FALSE, 3 );
gtk_widget_show( spline );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( spline ) );
// -------------------------- //
w = gtk_hseparator_new();
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_show( w );
gtk_widget_grab_default( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Name:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
name = ui::Entry();
- gtk_box_pack_start( GTK_BOX( hbox ), name, FALSE, FALSE, 0 );
+ hbox.pack_start( name, FALSE, FALSE, 0 );
gtk_widget_show( name );
if ( g_iActiveTarget < 0 ) {
// -------------------------- //
w = gtk_hseparator_new();
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_show( w );
gtk_widget_grab_default( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Name:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
name = ui::Entry();
- gtk_box_pack_start( GTK_BOX( hbox ), name, TRUE, TRUE, 0 );
+ hbox.pack_start( name, TRUE, TRUE, 0 );
gtk_widget_show( name );
sprintf( buf, "target%i", GetCurrentCam()->GetCam()->numTargets() + 1 );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto frame = ui::Frame( "Type" );
- gtk_box_pack_start( GTK_BOX( hbox ), frame, TRUE, TRUE, 0 );
+ hbox.pack_start( frame, TRUE, TRUE, 0 );
gtk_widget_show( frame );
auto vbox2 = ui::VBox( FALSE, 5 );
// -------------------------- //
fixed = gtk_radio_button_new_with_label( targetTypeRadio, "Fixed" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), fixed, FALSE, FALSE, 3 );
+ vbox2.pack_start( fixed, FALSE, FALSE, 3 );
gtk_widget_show( fixed );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( fixed ) );
interpolated = gtk_radio_button_new_with_label( targetTypeRadio, "Interpolated" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), interpolated, FALSE, FALSE, 3 );
+ vbox2.pack_start( interpolated, FALSE, FALSE, 3 );
gtk_widget_show( interpolated );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( interpolated ) );
spline = gtk_radio_button_new_with_label( targetTypeRadio, "Spline" );
- gtk_box_pack_start( GTK_BOX( vbox2 ), spline, FALSE, FALSE, 3 );
+ vbox2.pack_start( spline, FALSE, FALSE, 3 );
gtk_widget_show( spline );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( spline ) );
// -------------------------- //
w = gtk_hseparator_new();
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_show( w );
gtk_widget_grab_default( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto frame = ui::Frame( "Type" );
- gtk_box_pack_start( GTK_BOX( hbox ), frame, TRUE, TRUE, 0 );
+ hbox.pack_start( frame, TRUE, TRUE, 0 );
gtk_widget_show( frame );
auto vbox2 = ui::VBox( FALSE, 5 );
for ( i = 1; i < EVENT_COUNT; i++ ) {
eventWidget[i] = gtk_radio_button_new_with_label( eventTypeRadio, camEventStr[i] );
- gtk_box_pack_start( GTK_BOX( vbox2 ), eventWidget[i], FALSE, FALSE, 3 );
+ vbox2.pack_start( eventWidget[i], FALSE, FALSE, 3 );
gtk_widget_show( eventWidget[i] );
eventTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( eventWidget[i] ) );
if ( camEventFlags[i][1] == false ) {
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Parameters:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
parameters = ui::Entry();
- gtk_box_pack_start( GTK_BOX( hbox ), parameters, TRUE, TRUE, 0 );
+ hbox.pack_start( parameters, TRUE, TRUE, 0 );
gtk_widget_show( parameters );
// -------------------------- //
w = gtk_hseparator_new();
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
gtk_widget_show( w );
gtk_widget_grab_default( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
gtk_widget_show( w );
ret = eIDCANCEL;
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "File:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pCamListCombo = gtk_combo_new();
- gtk_box_pack_start( GTK_BOX( hbox ), g_pCamListCombo, TRUE, TRUE, 0 );
+ hbox.pack_start( g_pCamListCombo, TRUE, TRUE, 0 );
gtk_widget_show( g_pCamListCombo );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Name:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pCamName = ui::Entry();
- gtk_box_pack_start( GTK_BOX( hbox ), g_pCamName, FALSE, FALSE, 0 );
+ hbox.pack_start( g_pCamName, FALSE, FALSE, 0 );
gtk_widget_show( g_pCamName );
w = ui::Label( "Type: " );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
w = ui::Label( "" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pCamType = GTK_LABEL( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Edit:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pPathListCombo = gtk_combo_new();
- gtk_box_pack_start( GTK_BOX( hbox ), g_pPathListCombo, TRUE, TRUE, 0 );
+ hbox.pack_start( g_pPathListCombo, TRUE, TRUE, 0 );
gtk_widget_show( g_pPathListCombo );
RefreshPathListCombo();
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
g_pEditModeEditRadioButton = gtk_radio_button_new_with_label( g_pEditTypeRadio, "Edit Points" );
- gtk_box_pack_start( GTK_BOX( hbox ), g_pEditModeEditRadioButton, FALSE, FALSE, 3 );
+ hbox.pack_start( g_pEditModeEditRadioButton, FALSE, FALSE, 3 );
gtk_widget_show( g_pEditModeEditRadioButton );
g_pEditTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( g_pEditModeEditRadioButton ) );
g_pEditModeEditRadioButton.connect( "clicked", G_CALLBACK( ci_editmode_edit ), NULL );
g_pEditModeAddRadioButton = gtk_radio_button_new_with_label( g_pEditTypeRadio, "Add Points" );
- gtk_box_pack_start( GTK_BOX( hbox ), g_pEditModeAddRadioButton, FALSE, FALSE, 3 );
+ hbox.pack_start( g_pEditModeAddRadioButton, FALSE, FALSE, 3 );
gtk_widget_show( g_pEditModeAddRadioButton );
g_pEditTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( g_pEditModeAddRadioButton ) );
}
w = ui::Label( "Type: " );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
w = ui::Label( "" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pPathType = GTK_LABEL( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Button( "Rename..." );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0 );
+ hbox.pack_start( w, FALSE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( ci_rename ), NULL );
gtk_widget_show( w );
w = ui::Button( "Add Target..." );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0 );
+ hbox.pack_start( w, FALSE, TRUE, 0 );
w.connect( "clicked", G_CALLBACK( ci_add_target ), NULL );
gtk_widget_show( w );
// not available in splines library
/*w = gtk_button_new_with_label( "Delete Selected" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0);
+ hbox.pack_start( w, FALSE, TRUE, 0);
w.connect( "clicked", G_CALLBACK( ci_delete_selected ), NULL );
gtk_widget_show( w );
w = gtk_button_new_with_label( "Select All" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0);
+ hbox.pack_start( w, FALSE, TRUE, 0);
w.connect( "clicked", G_CALLBACK( ci_select_all ), NULL );
gtk_widget_show( w );*/
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Length (seconds):" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pSecondsEntry = ui::Entry();
- gtk_box_pack_start( GTK_BOX( hbox ), g_pSecondsEntry, FALSE, FALSE, 0 );
+ hbox.pack_start( g_pSecondsEntry, FALSE, FALSE, 0 );
gtk_widget_show( g_pSecondsEntry );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Current Time: " );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
w = ui::Label( "0.00" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pCurrentTime = GTK_LABEL( w );
w = ui::Label( " of " );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
w = ui::Label( "0.00" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
g_pTotalTime = GTK_LABEL( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
g_pTimeLine = ui::Adjustment( 0, 0, 30000, 100, 250, 0 );
g_pTimeLine.connect( "value_changed", G_CALLBACK( ci_timeline_changed ), NULL );
w = ui::HScale( g_pTimeLine );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
gtk_widget_show( w );
gtk_scale_set_draw_value( GTK_SCALE( w ), FALSE );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
g_pTrackCamera = ui::CheckButton( "Track Camera" );
- gtk_box_pack_start( GTK_BOX( hbox ), g_pTrackCamera, FALSE, FALSE, 0 );
+ hbox.pack_start( g_pTrackCamera, FALSE, FALSE, 0 );
gtk_widget_show( g_pTrackCamera );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
w = ui::Label( "Events:" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
+ hbox.pack_start( w, FALSE, FALSE, 0 );
gtk_widget_show( w );
// -------------------------- //
hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
auto scr = w = ui::ScrolledWindow();
gtk_widget_set_size_request( w, 0, 150 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( w ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
gtk_widget_show( w );
g_pEventsList = gtk_clist_new( 3 );
gtk_widget_show( g_pEventsList );
vbox = ui::VBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
gtk_widget_show( vbox );
w = ui::Button( "Add..." );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_add ), NULL );
gtk_widget_show( w );
w = ui::Button( "Del" );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_del ), NULL );
gtk_widget_show( w );
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
w = gtk_button_new_with_label( "New..." );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_new ), NULL );
gtk_widget_show( w );
w = gtk_button_new_with_label( "Load..." );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_load ), NULL );
gtk_widget_show( w );
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
w = gtk_button_new_with_label( "Save..." );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_save ), NULL );
gtk_widget_show( w );
w = gtk_button_new_with_label( "Unload" );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_unload ), NULL );
gtk_widget_show( w );
hbox = gtk_hbox_new( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 );
+ vbox.pack_start( hbox, TRUE, TRUE, 0 );
gtk_widget_show( hbox );
w = gtk_button_new_with_label( "Apply" );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_apply ), NULL );
gtk_widget_show( w );
w = gtk_button_new_with_label( "Preview" );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_preview ), NULL );
gtk_widget_show( w );
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
hbox = gtk_hbox_new( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 );
+ vbox.pack_start( hbox, TRUE, TRUE, 0 );
gtk_widget_show( hbox );
w = gtk_button_new_with_label( "Close" );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
+ vbox.pack_start( w, FALSE, FALSE, 0 );
w.connect( "clicked", G_CALLBACK( ci_close ), NULL );
gtk_widget_set_can_default( w, true );
gtk_widget_grab_default( w );
notebook = gtk_notebook_new();
gtk_widget_show( notebook );
- gtk_box_pack_start( GTK_BOX( hbox ), notebook, TRUE, TRUE, 0 );
+ hbox.pack_start( notebook, TRUE, TRUE, 0 );
notebook.connect( "switch_page",
G_CALLBACK( switch_page ), NULL );
gtk_notebook_set_tab_pos( GTK_NOTEBOOK( notebook ), GTK_POS_TOP );
{
radio = gtk_radio_button_new_with_label( group, games[i] );
gtk_widget_show( radio );
- gtk_box_pack_start( GTK_BOX( vbox ), radio, TRUE, TRUE, 0 );
+ vbox.pack_start( radio, TRUE, TRUE, 0 );
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
game_radios[i] = radio;
radio.connect( "toggled", G_CALLBACK( general_game ), GINT_TO_POINTER( i ) );
{
radio = gtk_radio_button_new_with_label( group, waveforms[i] );
gtk_widget_show( radio );
- gtk_box_pack_start( GTK_BOX( vbox ), radio, TRUE, TRUE, 0 );
+ vbox.pack_start( radio, TRUE, TRUE, 0 );
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
wave_radios[i] = radio;
radio.connect( "toggled", G_CALLBACK( general_wave ), GINT_TO_POINTER( i ) );
{
radio = gtk_radio_button_new_with_label( group, orientations[i] );
gtk_widget_show( radio );
- gtk_box_pack_start( GTK_BOX( vbox ), radio, TRUE, TRUE, 0 );
+ vbox.pack_start( radio, TRUE, TRUE, 0 );
group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) );
plane_radios[i] = radio;
radio.connect( "toggled", G_CALLBACK( general_plane ), GINT_TO_POINTER( i ) );
hbox2 = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox2 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox2, FALSE, TRUE, 0 );
+ vbox.pack_start( hbox2, FALSE, TRUE, 0 );
frame = ui::Frame( "Extents" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( hbox2 ), frame, TRUE, TRUE, 0 );
+ hbox2.pack_start( frame, TRUE, TRUE, 0 );
auto table = ui::Table( 3, 4, FALSE );
table.show();
frame = ui::Frame( "Divisions" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( hbox2 ), frame, TRUE, TRUE, 0 );
+ hbox2.pack_start( frame, TRUE, TRUE, 0 );
table = ui::Table( 2, 2, FALSE );
table.show();
check = ui::CheckButton( "Use Bezier patches" );
gtk_widget_show( check );
- gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 );
+ vbox.pack_start( check, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "use_patches", check );
check.connect( "toggled", G_CALLBACK( extents_use_patches ), NULL );
// ^Fishman - Snap to grid, replaced scroll bar with a texbox.
label = ui::Label( "Snap to grid:" );
gtk_widget_show( label );
- gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
+ vbox.pack_start( label, FALSE, TRUE, 0 );
gtk_object_set_data( GTK_OBJECT( dlg ), "snap_text", label );
adj = ui::Adjustment( 8, 0, 256, 1, 10, 0 );
adj.connect( "value_changed", G_CALLBACK( extents_snaptogrid_spin ), &SP );
spin = ui::SpinButton( adj, 1, 0 );
gtk_widget_show( spin );
- gtk_box_pack_start( GTK_BOX( vbox ), spin, FALSE, TRUE, 0 );
+ vbox.pack_start( spin, FALSE, TRUE, 0 );
gtk_widget_set_size_request( spin, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "sp", spin );
// ^Fishman - End of Snap to grid code.
hbox2 = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox2 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox2, FALSE, TRUE, 10 );
+ vbox.pack_start( hbox2, FALSE, TRUE, 10 );
label = ui::Label( "Decimate:" );
gtk_widget_show( label );
- gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
+ hbox2.pack_start( label, FALSE, TRUE, 0 );
adj = ui::Adjustment( 0, 0, 110, 1, 10, 0 );
adj.connect( "value_changed", G_CALLBACK( extents_decimate ), NULL );
g_object_set_data( G_OBJECT( dlg ), "decimate_adj", adj );
scale = ui::HScale( adj );
gtk_widget_show( scale );
- gtk_box_pack_start( GTK_BOX( hbox2 ), scale, TRUE, TRUE, 0 );
+ hbox2.pack_start( scale, TRUE, TRUE, 0 );
gtk_scale_set_value_pos( GTK_SCALE( scale ), GTK_POS_RIGHT );
gtk_scale_set_digits( GTK_SCALE( scale ), 0 );
g_object_set_data( G_OBJECT( dlg ), "decimate", scale );
frame = ui::Frame( "Corner values" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 );
+ vbox.pack_start( frame, FALSE, TRUE, 0 );
table = ui::Table( 3, 4, FALSE );
table.show();
label = ui::Label( "" );
gtk_widget_show( label );
- gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
+ vbox.pack_start( label, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "bmp_note", label );
table = ui::Table( 2, 2, FALSE );
gtk_widget_show( table );
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 );
+ 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 );
button = ui::Button( "Browse..." );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 );
+ hbox2.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_set_size_request( button, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "bmp_file_browse", button );
button.connect( "clicked", G_CALLBACK( bitmap_browse ), NULL );
button = ui::Button( "Reload" );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 );
+ hbox2.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_set_size_request( button, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "bmp_reload", button );
button.connect( "clicked", G_CALLBACK( bitmap_reload ), NULL );
table = ui::Table( 2, 2, TRUE );
gtk_widget_show( table );
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 );
+ 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 );
entry = ui::Entry();
gtk_widget_show( entry );
- gtk_box_pack_start( GTK_BOX( hbox2 ), entry, FALSE, FALSE, 0 );
+ hbox2.pack_start( entry, FALSE, FALSE, 0 );
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "bmp_black", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.black_value );
entry = ui::Entry();
gtk_widget_show( entry );
- gtk_box_pack_start( GTK_BOX( hbox2 ), entry, FALSE, FALSE, 0 );
+ hbox2.pack_start( entry, FALSE, FALSE, 0 );
gtk_widget_set_size_request( entry, 50, -1 );
g_object_set_data( G_OBJECT( dlg ), "bmp_white", entry );
entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.white_value );
"Click \"Free\" to unlock a vertex. Vertices within \"Range\n"
"affected\" will be influenced by this vertex." );
gtk_widget_show( label );
- gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
+ vbox.pack_start( label, FALSE, TRUE, 0 );
table = ui::Table( 3, 3, FALSE );
gtk_widget_show( table );
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
- gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 );
+ 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 );
// ^Fishman - Modified to add more labels and textboxes.
table = ui::Table( 5, 2, FALSE );
gtk_widget_show( table );
- gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 );
+ 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 );
hbox2 = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox2 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox2, FALSE, TRUE, 0 );
+ vbox.pack_start( hbox2, FALSE, TRUE, 0 );
label = ui::Label( "\"Steep\" angle:" );
gtk_widget_show( label );
- gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
+ hbox2.pack_start( label, FALSE, TRUE, 0 );
adj = ui::Adjustment( 60, 0, 90, 1, 10, 0 );
spin = ui::SpinButton( adj, 1, 0 );
gtk_widget_show( spin );
- gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, TRUE, 0 );
+ hbox2.pack_start( spin, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "tex_slant", spin );
table = ui::Table( 2, 4, TRUE );
gtk_widget_show( table );
- gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 );
+ 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 );
check = ui::CheckButton( "Use detail brushes" );
gtk_widget_show( check );
- gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 );
+ vbox.pack_start( check, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "detail", check );
check.connect( "toggled", G_CALLBACK( texture_detail ), NULL );
check = ui::CheckButton( "Detail hint brushes" );
gtk_widget_show( check );
- gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 );
+ vbox.pack_start( check, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "hint", check );
check.connect( "toggled", G_CALLBACK( texture_hint ), NULL );
// ^Fishman - Add terrain key to func_group.
check = ui::CheckButton( "Add terrain key" );
gtk_widget_show( check );
- gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 );
+ vbox.pack_start( check, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "terrain_ent", check );
check.connect( "toggled", G_CALLBACK( texture_terrainent ), NULL );
vbox = ui::VBox( FALSE, 5 );
gtk_widget_show( vbox );
- gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, TRUE, 0 );
+ hbox.pack_start( vbox, FALSE, TRUE, 0 );
button = ui::Button( "OK" );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
+ vbox.pack_start( button, FALSE, TRUE, 0 );
gtk_widget_set_size_request( button, 60, -1 );
g_object_set_data( G_OBJECT( dlg ), "go", button );
button.connect( "clicked", G_CALLBACK( main_go ), NULL );
label = ui::Label( "Settings:" );
gtk_widget_show( label );
- gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
+ vbox.pack_start( label, FALSE, TRUE, 0 );
button = ui::Button( "Open..." );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
+ vbox.pack_start( button, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "open", button );
button.connect( "clicked", G_CALLBACK( main_open ), NULL );
button = ui::Button( "Save as..." );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
+ vbox.pack_start( button, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "save", button );
button.connect( "clicked", G_CALLBACK( main_save ), NULL );
button = ui::Button( "Defaults" );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
+ vbox.pack_start( button, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "defaults", button );
button.connect( "clicked", G_CALLBACK( main_defaults ), NULL );
button = ui::Button( "About..." );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
+ vbox.pack_start( button, FALSE, TRUE, 0 );
button.connect( "clicked", G_CALLBACK( main_about ), NULL );
check = ui::CheckButton( "Preview" );
gtk_widget_show( check );
- gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 );
+ vbox.pack_start( check, FALSE, TRUE, 0 );
check.connect( "toggled", G_CALLBACK( main_preview ), NULL );
g_object_set_data( G_OBJECT( dlg ), "main_preview", check );
// ^Fishman - Antializing for the preview window.
check = ui::CheckButton( "Antialised lines" );
gtk_widget_show( check );
- gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 );
+ vbox.pack_start( check, FALSE, TRUE, 0 );
g_object_set_data( G_OBJECT( dlg ), "main_antialiasing", check );
check.connect( "toggled", G_CALLBACK( main_antialiasing ), NULL );
}
void CreateViewWindow(){
- GtkWidget *hbox, *label, *spin;
+ GtkWidget *label, *spin;
#ifndef ISOMETRIC
elevation = PI / 6.;
dlg.add(vbox);
#ifndef ISOMETRIC
- hbox = ui::HBox( TRUE, 5 );
+ auto hbox = ui::HBox( TRUE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, TRUE, 0 );
+ vbox.pack_start( hbox, FALSE, TRUE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( hbox ), 3 );
label = ui::Label( "Elevation" );
gtk_widget_show( label );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
- gtk_box_pack_start( GTK_BOX( hbox ), label, FALSE, TRUE, 0 );
+ hbox.pack_start( label, FALSE, TRUE, 0 );
auto adj = ui::Adjustment( 30, -90, 90, 1, 10, 0 );
adj.connect( "value_changed", G_CALLBACK( preview_spin ), &elevation );
spin = ui::SpinButton( adj, 1, 0 );
gtk_widget_show( spin );
- gtk_box_pack_start( GTK_BOX( hbox ), spin, FALSE, TRUE, 0 );
+ hbox.pack_start( spin, FALSE, TRUE, 0 );
spin.connect( "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &elevation );
adj = ui::Adjustment( 30, 0, 359, 1, 10, 0 );
spin = ui::SpinButton( adj, 1, 0 );
gtk_widget_show( spin );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( spin ), TRUE );
- gtk_box_pack_end( GTK_BOX( hbox ), spin, FALSE, TRUE, 0 );
+ hbox.pack_end(spin, FALSE, TRUE, 0);
label = ui::Label( "Azimuth" );
gtk_widget_show( label );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
- gtk_box_pack_end( GTK_BOX( hbox ), label, FALSE, TRUE, 0 );
+ hbox.pack_end(label, FALSE, TRUE, 0);
spin.connect( "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &azimuth );
#endif
auto frame = ui::Frame(ui::null);
frame.show();
gtk_frame_set_shadow_type( GTK_FRAME( frame ), GTK_SHADOW_IN );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
g_pPreviewWidget = g_UIGtkTable.m_pfn_glwidget_new( FALSE, NULL );
vbox.show();
w = ui::Label( lpText );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
w = gtk_hseparator_new();
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
if ( mode == MB_OK ) {
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
gtk_widget_set_can_default( w, true );
}
else if ( mode == MB_OKCANCEL ) {
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_show( w );
}
else if ( mode == MB_YESNOCANCEL ) {
w = ui::Button( "Yes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "No" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_show( w );
else /* if (mode == MB_YESNO) */
{
w = ui::Button( "Yes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "No" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
gtk_widget_show( w );
__DATE__;
auto label = ui::Label(label_text);
label.show();
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+ hbox.pack_start( label, TRUE, TRUE, 0);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
auto vbox = ui::VBox(FALSE, 0);
vbox.show();
- gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+ hbox.pack_start( vbox, FALSE, FALSE, 0);
auto button = ui::Button("OK");
button.show();
- gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
+ vbox.pack_start( button, FALSE, FALSE, 0);
button.connect("clicked", G_CALLBACK(dialog_button_callback), GINT_TO_POINTER(IDOK));
button.dimensions(60, -1);
}
void DoConfigDialog(){
- GtkWidget *hbox, *table;
- GtkWidget *lw3slider, *lw3label, *lw2slider, *lw2label, *item;
- GtkWidget *transslider, *translabel, *clipslider, *cliplabel;
int loop = 1, ret = IDCANCEL;
auto dlg = ui::Window( ui::window_type::TOP );
auto frame = ui::Frame( "3D View" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox ), frame, TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
auto vbox2 = ui::VBox( FALSE, 5 );
vbox2.show();
frame.add(vbox2);
gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 );
- hbox = ui::HBox( FALSE, 5 );
+ auto hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, TRUE, 0 );
+ vbox2.pack_start( hbox, TRUE, TRUE, 0 );
auto adj = ui::Adjustment( portals.width_3d, 2, 40, 1, 1, 0 );
- lw3slider = ui::HScale( adj );
+ auto lw3slider = ui::HScale( adj );
gtk_widget_show( lw3slider );
- gtk_box_pack_start( GTK_BOX( hbox ), lw3slider, TRUE, TRUE, 0 );
+ hbox.pack_start( lw3slider, TRUE, TRUE, 0 );
gtk_scale_set_draw_value( GTK_SCALE( lw3slider ), FALSE );
- lw3label = ui::Label( "" );
+ auto lw3label = ui::Label( "" );
gtk_widget_show( lw3label );
- gtk_box_pack_start( GTK_BOX( hbox ), lw3label, FALSE, TRUE, 0 );
+ hbox.pack_start( lw3label, FALSE, TRUE, 0 );
adj.connect( "value_changed", G_CALLBACK( OnScroll3d ), lw3label );
- table = ui::Table( 2, 4, FALSE );
+ auto table = ui::Table( 2, 4, FALSE );
gtk_widget_show( table );
- gtk_box_pack_start( GTK_BOX( vbox2 ), table, TRUE, TRUE, 0 );
+ 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 );
auto zlist = ui::ComboBoxText(ui::New);
gtk_widget_show( zlist );
- gtk_box_pack_start( GTK_BOX( vbox2 ), zlist, TRUE, FALSE, 0 );
+ vbox2.pack_start( zlist, TRUE, FALSE, 0 );
gtk_combo_box_text_append_text(zlist, "Z-Buffer Test and Write (recommended for solid or no polygons)");
gtk_combo_box_text_append_text(zlist, "Z-Buffer Test Only (recommended for transparent polygons)");
table = ui::Table( 2, 2, FALSE );
gtk_widget_show( table );
- gtk_box_pack_start( GTK_BOX( vbox2 ), table, TRUE, TRUE, 0 );
+ 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 );
adj = ui::Adjustment( portals.trans_3d, 0, 100, 1, 1, 0 );
- transslider = ui::HScale( adj );
+ auto transslider = ui::HScale( adj );
gtk_widget_show( transslider );
gtk_table_attach( GTK_TABLE( table ), transslider, 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_scale_set_draw_value( GTK_SCALE( transslider ), FALSE );
- translabel = ui::Label( "" );
+ auto translabel = ui::Label( "" );
gtk_widget_show( translabel );
gtk_table_attach( GTK_TABLE( table ), translabel, 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
adj.connect( "value_changed", G_CALLBACK( OnScrollTrans ), translabel );
adj = ui::Adjustment( portals.clip_range, 1, 128, 1, 1, 0 );
- clipslider = ui::HScale( adj );
+ auto clipslider = ui::HScale( adj );
gtk_widget_show( clipslider );
gtk_table_attach( GTK_TABLE( table ), clipslider, 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_scale_set_draw_value( GTK_SCALE( clipslider ), FALSE );
- cliplabel = ui::Label( "" );
+ auto cliplabel = ui::Label( "" );
gtk_widget_show( cliplabel );
gtk_table_attach( GTK_TABLE( table ), cliplabel, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
hbox = ui::HBox( TRUE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 );
+ vbox2.pack_start( hbox, TRUE, FALSE, 0 );
auto show3check = ui::CheckButton( "Show" );
gtk_widget_show( show3check );
- gtk_box_pack_start( GTK_BOX( hbox ), show3check, TRUE, TRUE, 0 );
+ hbox.pack_start( show3check, TRUE, TRUE, 0 );
show3check.connect( "toggled", G_CALLBACK( OnConfig3d ), NULL );
auto portalcheck = ui::CheckButton( "Portal cubic clipper" );
gtk_widget_show( portalcheck );
- gtk_box_pack_start( GTK_BOX( hbox ), portalcheck, TRUE, TRUE, 0 );
+ hbox.pack_start( portalcheck, TRUE, TRUE, 0 );
portalcheck.connect( "toggled", G_CALLBACK( OnClip ), NULL );
frame = ui::Frame( "2D View" );
gtk_widget_show( frame );
- gtk_box_pack_start( GTK_BOX( vbox ), frame, TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
vbox2 = ui::VBox( FALSE, 5 );
vbox2.show();
hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 );
+ vbox2.pack_start( hbox, TRUE, FALSE, 0 );
adj = ui::Adjustment( portals.width_2d, 2, 40, 1, 1, 0 );
- lw2slider = ui::HScale( adj );
+ auto lw2slider = ui::HScale( adj );
gtk_widget_show( lw2slider );
- gtk_box_pack_start( GTK_BOX( hbox ), lw2slider, TRUE, TRUE, 0 );
+ hbox.pack_start( lw2slider, TRUE, TRUE, 0 );
gtk_scale_set_draw_value( GTK_SCALE( lw2slider ), FALSE );
- lw2label = ui::Label( "" );
+ auto lw2label = ui::Label( "" );
gtk_widget_show( lw2label );
- gtk_box_pack_start( GTK_BOX( hbox ), lw2label, FALSE, TRUE, 0 );
+ hbox.pack_start( lw2label, FALSE, TRUE, 0 );
adj.connect( "value_changed", G_CALLBACK( OnScroll2d ), lw2label );
hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 );
+ vbox2.pack_start( hbox, TRUE, FALSE, 0 );
button = ui::Button( "Color" );
gtk_widget_show( button );
- gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_start( button, FALSE, FALSE, 0 );
button.connect( "clicked", G_CALLBACK( OnColor2d ), NULL );
gtk_widget_set_size_request( button, 60, -1 );
auto aa2check = ui::CheckButton( "Anti-Alias (May not work on some video cards)" );
gtk_widget_show( aa2check );
- gtk_box_pack_start( GTK_BOX( hbox ), aa2check, TRUE, TRUE, 0 );
+ hbox.pack_start( aa2check, TRUE, TRUE, 0 );
aa2check.connect( "toggled", G_CALLBACK( OnAntiAlias2d ), NULL );
hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 );
+ vbox2.pack_start( hbox, TRUE, FALSE, 0 );
auto show2check = ui::CheckButton( "Show" );
gtk_widget_show( show2check );
- gtk_box_pack_start( GTK_BOX( hbox ), show2check, FALSE, FALSE, 0 );
+ hbox.pack_start( show2check, FALSE, FALSE, 0 );
show2check.connect( "toggled", G_CALLBACK( OnConfig2d ), NULL );
hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
button = ui::Button( "OK" );
gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
button.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
gtk_widget_set_size_request( button, 60, -1 );
}
int DoLoadPortalFileDialog(){
- GtkWidget *hbox, *entry, *check2d, *check3d;
int loop = 1, ret = IDCANCEL;
auto dlg = ui::Window( ui::window_type::TOP );
dlg.add(vbox);
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
- entry = ui::Entry(ui::New);
+ auto entry = ui::Entry(ui::New);
gtk_widget_show( entry );
gtk_editable_set_editable( GTK_EDITABLE( entry ), FALSE );
- gtk_box_pack_start( GTK_BOX( vbox ), entry, FALSE, FALSE, 0 );
+ vbox.pack_start( entry, FALSE, FALSE, 0 );
- hbox = ui::HBox( FALSE, 5 );
+ auto hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
- check3d = ui::CheckButton( "Show 3D" );
+ auto check3d = ui::CheckButton( "Show 3D" );
gtk_widget_show( check3d );
- gtk_box_pack_start( GTK_BOX( hbox ), check3d, FALSE, FALSE, 0 );
+ hbox.pack_start( check3d, FALSE, FALSE, 0 );
- check2d = ui::CheckButton( "Show 2D" );
+ auto check2d = ui::CheckButton( "Show 2D" );
gtk_widget_show( check2d );
- gtk_box_pack_start( GTK_BOX( hbox ), check2d, FALSE, FALSE, 0 );
+ hbox.pack_start( check2d, FALSE, FALSE, 0 );
auto button = ui::Button( "Change" );
gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
button.connect( "clicked", G_CALLBACK( change_clicked ), entry );
gtk_widget_set_size_request( button, 60, -1 );
hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
+ vbox.pack_start( hbox, FALSE, FALSE, 0 );
button = ui::Button( "Cancel" );
gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
button.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_set_size_request( button, 60, -1 );
button = ui::Button( "OK" );
gtk_widget_show( button );
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
button.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
gtk_widget_set_size_request( button, 60, -1 );
// About dialog
void about_plugin_window(){
- GtkWidget *label, *button;
-
auto window = ui::Window( ui::window_type::TOP ); // create a window
gtk_window_set_transient_for( GTK_WINDOW( window ), SunPlug::main_window ); // make the window to stay in front of the main window
window.connect( "delete_event", G_CALLBACK( delete_event ), NULL ); // connect the delete event
auto vbox = ui::VBox( FALSE, 10 ); // create a box to arrange new objects vertically
window.add(vbox);
- label = ui::Label( "SunPlug v1.0 for NetRadiant 1.5\nby Topsun" ); // create a label
+ auto label = ui::Label( "SunPlug v1.0 for NetRadiant 1.5\nby Topsun" ); // create a label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // text align left
- gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, FALSE, 2 ); // insert the label in the box
+ vbox.pack_start( label, FALSE, FALSE, 2 ); // insert the label in the box
- button = ui::Button( "OK" ); // create a button with text
+ auto button = ui::Button( "OK" ); // create a button with text
g_signal_connect_swapped( G_OBJECT( button ), "clicked", G_CALLBACK( gtk_widget_destroy ), (void *) window ); // connect the click event to close the window
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 2 ); // insert the button in the box
+ vbox.pack_start( button, FALSE, FALSE, 2 ); // insert the button in the box
gtk_window_set_position( GTK_WINDOW( window ), GTK_WIN_POS_CENTER ); // center the window on screen
// MapCoordinator dialog window
void MapCoordinator(){
- GtkWidget *table, *label, *spinnerMinX, *spinnerMinY, *spinnerMaxX, *spinnerMaxY;
+ GtkWidget *spinnerMinX, *spinnerMinY, *spinnerMaxX, *spinnerMaxY;
Entity *theWorldspawn = NULL;
const char *buffer;
char line[20];
auto button = ui::Button( "Get optimal mapcoords" ); // create button with text
button.connect( "clicked", G_CALLBACK( input_optimal ), NULL ); // connect button with callback function
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 2 ); // insert button into vbox
+ vbox.pack_start( button, FALSE, FALSE, 2 ); // insert button into vbox
- gtk_box_pack_start( GTK_BOX( vbox ), gtk_hseparator_new(), FALSE, FALSE, 2 ); // insert separator into vbox
+ vbox.pack_start( ui::Widget(gtk_hseparator_new()), FALSE, FALSE, 2 ); // insert separator into vbox
- table = ui::Table( 4, 3, TRUE ); // create table
+ 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_box_pack_start( GTK_BOX( vbox ), table, FALSE, FALSE, 2 ); // insert table into vbox
+ vbox.pack_start( table, FALSE, FALSE, 2 ); // insert table into vbox
- label = ui::Label( "x" ); // create label
+ 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
else {
globalOutputStream() << "SunPlug: no worldspawn found!\n"; // output error to console
- label = ui::Label( "ERROR: No worldspawn was found in the map!\nIn order to use this tool the map must have at least one brush in the worldspawn. " ); // create a label
+ auto label = ui::Label( "ERROR: No worldspawn was found in the map!\nIn order to use this tool the map must have at least one brush in the worldspawn. " ); // create a label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // text align left
- gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, FALSE, 2 ); // insert the label in the box
+ vbox.pack_start( label, FALSE, FALSE, 2 ); // insert the label in the box
auto button = ui::Button( "OK" ); // create a button with text
button.connect( "clicked", G_CALLBACK( close_window ), NULL ); // connect the click event to close the window
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 2 ); // insert the button in the box
+ vbox.pack_start( button, FALSE, FALSE, 2 ); // insert the button in the box
}
gtk_window_set_position( GTK_WINDOW( window ), GTK_WIN_POS_CENTER ); // center the window
ui::Alignment alignment = ui::Alignment( 0.5, 0.0, 0.0, 0.0 );
gtk_widget_show( GTK_WIDGET( alignment ) );
- gtk_box_pack_start( GTK_BOX( vbox1 ), GTK_WIDGET( alignment ), FALSE, FALSE, 0 );
+ vbox1.pack_start( alignment, FALSE, FALSE, 0 );
auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &dialog );
alignment.add(button);
{
radio = ui::RadioButton(GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( group, *i ) ));
gtk_widget_show( GTK_WIDGET( radio ) );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( radio ), FALSE, FALSE, 0 );
+ hbox.pack_start( radio, FALSE, FALSE, 0 );
group = gtk_radio_button_get_group( radio );
}
auto entry = ui::Entry(ui::New);
gtk_entry_set_has_frame( entry, FALSE );
gtk_widget_show( GTK_WIDGET( entry ) );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ hbox.pack_start( entry, TRUE, TRUE, 0 );
// browse button
auto button = ui::Button(ui::New);
button_set_icon( button, "ellipsis.bmp" );
gtk_widget_show( GTK_WIDGET( button ) );
- gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
frame.add(hbox);
}
void DialogVBox_packRow( ui::VBox vbox, ui::Widget row ){
- gtk_box_pack_start( GTK_BOX( vbox ), row, FALSE, FALSE, 0 );
+ vbox.pack_start( row, FALSE, FALSE, 0 );
}
#include "dialog.h"
#include "widget.h"
-GtkWidget* create_padding( int width, int height ){
+ui::Widget create_padding( int width, int height ){
ui::Alignment widget = ui::Alignment( 0.0, 0.0, 0.0, 0.0 );
gtk_widget_show( widget );
gtk_widget_set_size_request( widget, width, height );
window.add(vbox);
- GtkHBox* hboxDummy = create_dialog_hbox( 0, 0 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hboxDummy ), FALSE, FALSE, 0 );
+ auto hboxDummy = create_dialog_hbox( 0, 0 );
+ vbox.pack_start( hboxDummy, FALSE, FALSE, 0 );
- gtk_box_pack_start( GTK_BOX( hboxDummy ), create_padding( 0, 50 ), FALSE, FALSE, 0 ); // HACK to force minimum height
+ hboxDummy.pack_start( create_padding( 0, 50 ), FALSE, FALSE, 0 ); // HACK to force minimum height
- GtkHBox* iconBox = create_dialog_hbox( 16, 0 );
- gtk_box_pack_start( GTK_BOX( hboxDummy ), GTK_WIDGET( iconBox ), FALSE, FALSE, 0 );
+ auto iconBox = create_dialog_hbox( 16, 0 );
+ hboxDummy.pack_start( iconBox, FALSE, FALSE, 0 );
- GtkImage* image = GTK_IMAGE( gtk_image_new_from_stock( messagebox_stock_icon( icon ), GTK_ICON_SIZE_DIALOG ) );
+ auto image = ui::Image(GTK_IMAGE( gtk_image_new_from_stock( messagebox_stock_icon( icon ), GTK_ICON_SIZE_DIALOG ) ));
gtk_widget_show( GTK_WIDGET( image ) );
- gtk_box_pack_start( GTK_BOX( iconBox ), GTK_WIDGET( image ), FALSE, FALSE, 0 );
+ iconBox.pack_start( image, FALSE, FALSE, 0 );
- GtkLabel* label = GTK_LABEL( ui::Label( text ) );
+ auto label = ui::Label( text );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
gtk_label_set_line_wrap( label, TRUE );
- gtk_box_pack_start( GTK_BOX( iconBox ), GTK_WIDGET( label ), TRUE, TRUE, 0 );
+ iconBox.pack_start( label, TRUE, TRUE, 0 );
- GtkVBox* vboxDummy = create_dialog_vbox( 0, 0 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( vboxDummy ), FALSE, FALSE, 0 );
+ auto vboxDummy = create_dialog_vbox( 0, 0 );
+ vbox.pack_start( vboxDummy, FALSE, FALSE, 0 );
auto alignment = ui::Alignment( 0.5, 0.0, 0.0, 0.0 );
gtk_widget_show( GTK_WIDGET( alignment ) );
- gtk_box_pack_start( GTK_BOX( vboxDummy ), GTK_WIDGET( alignment ), FALSE, FALSE, 0 );
+ vboxDummy.pack_start( alignment, FALSE, FALSE, 0 );
auto hbox = create_dialog_hbox( 8, 0 );
alignment.add(hbox);
- gtk_box_pack_start( GTK_BOX( vboxDummy ), create_padding( 400, 0 ), FALSE, FALSE, 0 ); // HACK to force minimum width
+ vboxDummy.pack_start( create_padding( 400, 0 ), FALSE, FALSE, 0 ); // HACK to force minimum width
if ( type == eMB_OK ) {
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
widget_make_default( button );
else if ( type == eMB_OKCANCEL ) {
{
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
widget_make_default( button );
button.show();
}
{
- GtkButton* button = create_modal_dialog_button( "OK", cancel_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "OK", cancel_button );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
gtk_widget_show( GTK_WIDGET( button ) );
}
else if ( type == eMB_YESNOCANCEL ) {
{
auto button = create_modal_dialog_button( "Yes", yes_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
widget_make_default( button );
button.show();
}
{
- GtkButton* button = create_modal_dialog_button( "No", no_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "No", no_button );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_show( GTK_WIDGET( button ) );
}
{
- GtkButton* button = create_modal_dialog_button( "Cancel", cancel_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "Cancel", cancel_button );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_show( GTK_WIDGET( button ) );
}
else if ( type == eMB_NOYES ) {
{
auto button = create_modal_dialog_button( "No", no_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
widget_make_default( button );
button.show();
}
{
- GtkButton* button = create_modal_dialog_button( "Yes", yes_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "Yes", yes_button );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_show( GTK_WIDGET( button ) );
}
{
{
auto button = create_modal_dialog_button( "Yes", yes_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
widget_make_default( button );
gtk_widget_show( GTK_WIDGET( button ) );
}
{
- GtkButton* button = create_modal_dialog_button( "No", no_button );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "No", no_button );
+ hbox.pack_start( button, TRUE, FALSE, 0 );
gtk_widget_show( GTK_WIDGET( button ) );
}
dialog.ret = eIDNO;
gtk_scrolled_window_set_policy(this, static_cast<GtkPolicyType>(x), static_cast<GtkPolicyType>(y));
}
+ IMPL(Box, GTK_BOX);
+
+ void IBox::pack_start(ui::Widget child, bool expand, bool fill, unsigned int padding)
+ {
+ gtk_box_pack_start(this, child, expand, fill, padding);
+ }
+
+ void IBox::pack_end(ui::Widget child, bool expand, bool fill, unsigned int padding)
+ {
+ gtk_box_pack_end(this, child, expand, fill, padding);
+ }
+
IMPL(VBox, GTK_VBOX);
VBox::VBox(bool homogenous, int spacing) : VBox(GTK_VBOX(gtk_vbox_new(homogenous, spacing)))
WRAP(Box, Container, _GtkBox, (),
,
+ void pack_start(ui::Widget child, bool expand, bool fill, unsigned int padding);
+ void pack_end(ui::Widget child, bool expand, bool fill, unsigned int padding);
);
WRAP(VBox, Box, _GtkVBox, (),
gtk_widget_show( vbox );
w = ui::Label( lpText );
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT );
gtk_widget_show( w );
w = gtk_hseparator_new();
- gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
+ vbox.pack_start( w, FALSE, FALSE, 2 );
gtk_widget_show( w );
hbox = ui::HBox( FALSE, 10 );
- gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
+ vbox.pack_start( hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
if ( mode == MB_OK ) {
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
gtk_widget_set_can_default( w, true );
}
else if ( mode == MB_OKCANCEL ) {
w = ui::Button( "Ok" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_show( w );
}
else if ( mode == MB_YESNOCANCEL ) {
w = ui::Button( "Yes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "No" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
gtk_widget_show( w );
w = ui::Button( "Cancel" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_show( w );
else /* if (mode == MB_YESNO) */
{
w = ui::Button( "Yes" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
gtk_widget_set_can_default( w, true );
gtk_widget_show( w );
w = ui::Button( "No" );
- gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
+ hbox.pack_start( w, TRUE, TRUE, 0 );
w.connect( "clicked",
G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
gtk_widget_show( w );
auto table1 = create_dialog_table( 2, 2, 4, 4, 4 );
window.add(table1);
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
+ auto vbox = create_dialog_vbox( 4 );
gtk_table_attach( table1, GTK_WIDGET( vbox ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
{
- GtkButton* button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &modal );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &modal );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
}
}
{
{
auto scr = create_scrolled_window( ui::Policy::NEVER, ui::Policy::AUTOMATIC );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( scr ), TRUE, TRUE, 0 );
+ hbox.pack_start( scr, TRUE, TRUE, 0 );
{
ui::ListStore store = ui::ListStore(gtk_list_store_new( 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT ));
}
}
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
- GtkButton* editbutton = create_dialog_button( "Edit", (GCallback) accelerator_edit_button_clicked, &dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( editbutton ), FALSE, FALSE, 0 );
+ auto editbutton = create_dialog_button( "Edit", (GCallback) accelerator_edit_button_clicked, &dialog );
+ vbox.pack_start( editbutton, FALSE, FALSE, 0 );
- GtkButton* clearbutton = create_dialog_button( "Clear", (GCallback) accelerator_clear_button_clicked, &dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( clearbutton ), FALSE, FALSE, 0 );
+ auto clearbutton = create_dialog_button( "Clear", (GCallback) accelerator_clear_button_clicked, &dialog );
+ vbox.pack_start( clearbutton, FALSE, FALSE, 0 );
ui::Widget spacer = ui::Image(ui::New);
spacer.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( spacer ), TRUE, TRUE, 0 );
+ vbox.pack_start( spacer, TRUE, TRUE, 0 );
auto button = create_modal_dialog_button( "Close", dialog.m_close_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_grab_default( GTK_WIDGET( button ) );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
void Dialog::addSlider( ui::Widget vbox, const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment ){
#if 0
if ( draw_value == FALSE ) {
- ui::Widget hbox2 = ui::HBox( FALSE, 0 );
+ auto hbox2 = ui::HBox( FALSE, 0 );
hbox2.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 );
+ vbox.pack_start( GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 );
{
ui::Widget label = ui::Label( low );
label.show();
- gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, FALSE, 0 );
+ hbox2.pack_start( label, FALSE, FALSE, 0 );
}
{
ui::Widget label = ui::Label( high );
label.show();
- gtk_box_pack_end( GTK_BOX( hbox2 ), label, FALSE, FALSE, 0 );
+ hbox2.pack_end(label, FALSE, FALSE, 0);
}
}
#endif
m_hbox = ui::HBox( FALSE, 4 );
m_hbox.show();
- gtk_box_pack_start( GTK_BOX( m_hbox ), GTK_WIDGET( m_radio.m_hbox ), TRUE, TRUE, 0 );
- gtk_box_pack_start( GTK_BOX( m_hbox ), GTK_WIDGET( m_entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( m_radio.m_hbox, TRUE, TRUE, 0 );
+ m_hbox.pack_start( m_entry, TRUE, TRUE, 0 );
}
void release(){
delete this;
m_hbox.show();
{
auto entry = numeric_entry_new();
- gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( entry, TRUE, TRUE, 0 );
m_angles.m_pitch = entry;
m_nonModal.connect( m_angles.m_pitch );
}
{
auto entry = numeric_entry_new();
- gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( entry, TRUE, TRUE, 0 );
m_angles.m_yaw = entry;
m_nonModal.connect( m_angles.m_yaw );
}
{
auto entry = numeric_entry_new();
- gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( entry, TRUE, TRUE, 0 );
m_angles.m_roll = entry;
m_nonModal.connect( m_angles.m_roll );
}
m_hbox.show();
{
auto entry = numeric_entry_new();
- gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( entry, TRUE, TRUE, 0 );
m_vector3.m_x = entry;
m_nonModal.connect( m_vector3.m_x );
}
{
auto entry = numeric_entry_new();
- gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( entry, TRUE, TRUE, 0 );
m_vector3.m_y = entry;
m_nonModal.connect( m_vector3.m_y );
}
{
auto entry = numeric_entry_new();
- gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_hbox.pack_start( entry, TRUE, TRUE, 0 );
m_vector3.m_z = entry;
m_nonModal.connect( m_vector3.m_z );
}
}
ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
- ui::Widget vbox = ui::VBox( FALSE, 2 );
+ auto vbox = ui::VBox( FALSE, 2 );
vbox.show();
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 2 );
vbox.connect( "destroy", G_CALLBACK( EntityInspector_destroyWindow ), 0 );
{
- ui::Widget split1 = ui::VPaned(ui::New);
- gtk_box_pack_start( GTK_BOX( vbox ), split1, TRUE, TRUE, 0 );
+ auto split1 = ui::VPaned(ui::New);
+ vbox.pack_start( split1, TRUE, TRUE, 0 );
split1.show();
g_entity_split1 = split1;
split2.show();
{
- ui::Widget vbox2 = ui::VBox( FALSE, 2 );
+ auto vbox2 = ui::VBox( FALSE, 2 );
vbox2.show();
gtk_paned_pack1( GTK_PANED( split2 ), vbox2, FALSE, FALSE );
{
// Spawnflags (4 colums wide max, or window gets too wide.)
auto table = ui::Table( 4, 4, FALSE );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), FALSE, TRUE, 0 );
+ vbox2.pack_start( table, FALSE, TRUE, 0 );
table.show();
g_spawnflagsTable = table;
// key/value list
auto scr = ui::ScrolledWindow(ui::New);
scr.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), scr, TRUE, TRUE, 0 );
+ vbox2.pack_start( scr, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
// key/value entry
auto table = ui::Table( 2, 2, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), FALSE, TRUE, 0 );
+ vbox2.pack_start( table, FALSE, TRUE, 0 );
gtk_table_set_row_spacings( table, 3 );
gtk_table_set_col_spacings( table, 5 );
{
auto hbox = ui::HBox( TRUE, 4 );
hbox.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
+ vbox2.pack_start( hbox, FALSE, TRUE, 0 );
{
auto button = ui::Button( "Clear All" );
button.show();
button.connect( "clicked", G_CALLBACK( EntityInspector_clearAllKeyValues ), 0 );
- gtk_box_pack_start( hbox, GTK_WIDGET( button ), TRUE, TRUE, 0 );
+ hbox.pack_start( button, TRUE, TRUE, 0 );
}
{
auto button = ui::Button( "Delete Key" );
button.show();
button.connect( "clicked", G_CALLBACK( EntityInspector_clearKeyValue ), 0 );
- gtk_box_pack_start( hbox, GTK_WIDGET( button ), TRUE, TRUE, 0 );
+ hbox.pack_start( button, TRUE, TRUE, 0 );
}
}
}
}
ui::Window FindTextureDialog::BuildDialog(){
- ui::Widget vbox{ui::null}, hbox{ui::null}, table{ui::null}, label{ui::null};
+ ui::Widget table{ui::null}, label{ui::null};
ui::Widget button{ui::null};
ui::Entry entry{ui::null};
auto dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent ));
- hbox = ui::HBox( FALSE, 5 );
+ auto hbox = ui::HBox( FALSE, 5 );
hbox.show();
dlg.add(hbox);
gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 );
- vbox = ui::VBox( FALSE, 5 );
+ auto vbox = ui::VBox( FALSE, 5 );
vbox.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
table = ui::Table( 2, 2, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ 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 );
auto check = ui::CheckButton( "Within selected brushes only" );
check.show();
- gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 );
+ vbox.pack_start( check, TRUE, TRUE, 0 );
AddDialogData( *GTK_TOGGLE_BUTTON(check), m_bSelectedOnly );
vbox = ui::VBox( FALSE, 5 );
vbox.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
button = ui::Button( "Apply" );
button.show();
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
button.connect( "clicked",
G_CALLBACK( OnApply ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
button = ui::Button( "Close" );
button.show();
- gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
button.connect( "clicked",
G_CALLBACK( OnClose ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
auto table1 = create_dialog_table( 1, 2, 4, 4, 4 );
window.add(table1);
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
+ auto vbox = create_dialog_vbox( 4 );
gtk_table_attach( table1, GTK_WIDGET( vbox ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
{
- GtkButton* button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &modal );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &modal );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
}
}
{
{
auto label = ui::Label( "Sides:" );
label.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ hbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 );
+ hbox.pack_start( entry, FALSE, FALSE, 0 );
sides_entry = entry;
gtk_widget_grab_focus( GTK_WIDGET( entry ) );
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &dialog );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
}
}
window.add(vbox);
{
- GtkHBox* hbox = create_dialog_hbox( 4 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
+ auto hbox = create_dialog_hbox( 4 );
+ vbox.pack_start( hbox, FALSE, TRUE, 0 );
{
- GtkVBox* vbox2 = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox2 ), TRUE, FALSE, 0 );
+ auto vbox2 = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox2, TRUE, FALSE, 0 );
{
auto frame = create_dialog_frame( 0, ui::Shadow::IN );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
+ vbox2.pack_start( frame, FALSE, FALSE, 0 );
{
auto image = new_local_image( "logo.png" );
image.show();
auto label = ui::Label( label_text );
label.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ hbox.pack_start( label, FALSE, FALSE, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
}
{
- GtkVBox* vbox2 = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox2 ), FALSE, TRUE, 0 );
+ auto vbox2 = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox2, FALSE, TRUE, 0 );
{
- GtkButton* button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "OK", ok_button );
+ vbox2.pack_start( button, FALSE, FALSE, 0 );
}
{
- GtkButton* button = create_dialog_button( "Credits", G_CALLBACK( about_button_credits ), 0 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Credits", G_CALLBACK( about_button_credits ), 0 );
+ vbox2.pack_start( button, FALSE, FALSE, 0 );
}
{
- GtkButton* button = create_dialog_button( "Changes", G_CALLBACK( about_button_changelog ), 0 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Changes", G_CALLBACK( about_button_changelog ), 0 );
+ vbox2.pack_start( button, FALSE, FALSE, 0 );
}
{
- GtkButton* button = create_dialog_button( "Issues", G_CALLBACK( about_button_issues ), 0 );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Issues", G_CALLBACK( about_button_issues ), 0 );
+ vbox2.pack_start( button, FALSE, FALSE, 0 );
}
}
}
{
auto frame = create_dialog_frame( "OpenGL Properties" );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
+ vbox.pack_start( frame, FALSE, FALSE, 0 );
{
auto table = create_dialog_table( 3, 2, 4, 4, 4 );
frame.add(table);
}
{
auto frame = create_dialog_frame( "OpenGL Extensions" );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
{
auto sc_extensions = create_scrolled_window( ui::Policy::AUTOMATIC, ui::Policy::ALWAYS, 4 );
frame.add(sc_extensions);
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
auto label = ui::Label( "Texture will be fit across the patch based\n"
"on the x and y values given. Values of 1x1\n"
"will \"fit\" the texture. 2x2 will repeat\n"
"it twice, etc." );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), TRUE, TRUE, 0 );
+ vbox.pack_start( label, TRUE, TRUE, 0 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
}
{
auto table = create_dialog_table( 2, 2, 4, 4 );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox.pack_start( table, TRUE, TRUE, 0 );
{
auto label = ui::Label( "Texture x:" );
label.show();
}
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
{
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_modal_dialog_button( "Cancel", cancel_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "Cancel", cancel_button );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
}
}
auto scr = ui::ScrolledWindow(ui::New);
scr.show();
- gtk_box_pack_start( GTK_BOX( vbox ), scr, TRUE, TRUE, 0 );
+ vbox.pack_start( scr, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
auto hbox = ui::HBox( FALSE, 5 );
hbox.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
+ vbox.pack_start( hbox, FALSE, TRUE, 0 );
auto button = ui::Button( "Close" );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
button.connect( "clicked",
G_CALLBACK( editor_close ), dlg );
gtk_widget_set_size_request( button, 60, -1 );
button = ui::Button( "Save" );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
+ hbox.pack_end(button, FALSE, FALSE, 0);
button.connect( "clicked",
G_CALLBACK( editor_save ), dlg );
gtk_widget_set_size_request( button, 60, -1 );
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
auto label = ui::Label( "ESC for default, ENTER to validate" );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ vbox.pack_start( entry, TRUE, TRUE, 0 );
gtk_widget_grab_focus( GTK_WIDGET( entry ) );
}
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
{
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Return, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
{
- GtkButton* button = create_modal_dialog_button( "Cancel", cancel_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "Cancel", cancel_button );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Escape, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
}
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
//GtkLabel* label = GTK_LABEL(gtk_label_new("Enter one ore more tags separated by spaces"));
auto label = ui::Label( "ESC to cancel, ENTER to validate" );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ vbox.pack_start( entry, TRUE, TRUE, 0 );
gtk_widget_grab_focus( GTK_WIDGET( entry ) );
}
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
{
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Return, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
{
- GtkButton* button = create_modal_dialog_button( "Cancel", cancel_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "Cancel", cancel_button );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Escape, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
}
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
{
auto label = ui::Label( "The selected shader" );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto label = ui::Label( name );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto label = ui::Label( "is located in file" );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto label = ui::Label( filename );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
+ vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Return, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
return help_menu_item;
}
-GtkMenuBar* create_main_menu( MainFrame::EViewStyle style ){
+ui::MenuBar create_main_menu( MainFrame::EViewStyle style ){
auto menu_bar = ui::MenuBar(GTK_MENU_BAR( gtk_menu_bar_new() ));
menu_bar.show();
GetPlugInMgr().Init( window );
- ui::Widget vbox = ui::VBox( FALSE, 0 );
+ auto vbox = ui::VBox( FALSE, 0 );
window.add(vbox);
vbox.show();
register_shortcuts();
- GtkMenuBar* main_menu = create_main_menu( CurrentStyle() );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( main_menu ), FALSE, FALSE, 0 );
+ auto main_menu = create_main_menu( CurrentStyle() );
+ vbox.pack_start( main_menu, FALSE, FALSE, 0 );
- GtkToolbar* main_toolbar = create_main_toolbar( CurrentStyle() );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( main_toolbar ), FALSE, FALSE, 0 );
+ auto main_toolbar = create_main_toolbar( CurrentStyle() );
+ vbox.pack_start( main_toolbar, FALSE, FALSE, 0 );
auto plugin_toolbar = create_plugin_toolbar();
if ( !g_Layout_enablePluginToolbar.m_value ) {
plugin_toolbar.hide();
}
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( plugin_toolbar ), FALSE, FALSE, 0 );
+ vbox.pack_start( plugin_toolbar, FALSE, FALSE, 0 );
ui::Widget main_statusbar = create_main_statusbar(reinterpret_cast<ui::Widget *>(m_pStatusLabel));
- gtk_box_pack_end( GTK_BOX( vbox ), main_statusbar, FALSE, TRUE, 2 );
+ vbox.pack_end(main_statusbar, FALSE, TRUE, 2);
GroupDialog_constructWindow( window );
g_page_entity = GroupDialog_addPage( "Entities", EntityInspector_constructWindow( GroupDialog_getWindow() ), RawStringExportCaller( "Entities" ) );
{
ui::Widget vsplit = ui::VPaned(ui::New);
m_vSplit = vsplit;
- gtk_box_pack_start( GTK_BOX( vbox ), vsplit, TRUE, TRUE, 0 );
+ vbox.pack_start( vsplit, TRUE, TRUE, 0 );
vsplit.show();
// console
ui::Widget xz = m_pXZWnd->GetWidget();
- GtkHPaned* split = create_split_views( camera, yz, xy, xz );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( split ), TRUE, TRUE, 0 );
+ auto split = create_split_views( camera, yz, xy, xz );
+ vbox.pack_start( split, TRUE, TRUE, 0 );
{
GtkFrame* frame = create_framed_widget( TextureBrowser_constructWindow( window ) );
window.add(vbox);
{
- GtkHBox* hbox = create_dialog_hbox( 4 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
+ auto hbox = create_dialog_hbox( 4 );
+ vbox.pack_start( hbox, FALSE, TRUE, 0 );
{
- GtkTable* table = create_dialog_table( 2, 2, 4, 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ auto table = create_dialog_table( 2, 2, 4, 4 );
+ hbox.pack_start( table, TRUE, TRUE, 0 );
{
auto entry = ui::Entry(ui::New);
}
}
{
- GtkVBox* vbox2 = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox2 ), FALSE, FALSE, 0 );
+ auto vbox2 = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox2, FALSE, FALSE, 0 );
{
- GtkButton* button = create_dialog_button( "Close", G_CALLBACK( dialog_button_ok ), &dialog );
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Close", G_CALLBACK( dialog_button_ok ), &dialog );
+ vbox2.pack_start( button, FALSE, FALSE, 0 );
}
}
}
{
ui::Widget label = ui::Label( "Entity breakdown" );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, TRUE, 0 );
+ vbox.pack_start( label, FALSE, TRUE, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
auto scr = create_scrolled_window( ui::Policy::NEVER, ui::Policy::AUTOMATIC, 4 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( scr ), TRUE, TRUE, 0 );
+ vbox.pack_start( scr, TRUE, TRUE, 0 );
{
ui::ListStore store = ui::ListStore(gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING ));
auto vbox = create_dialog_vbox( 4, 4 );
window.add(vbox);
{
- GtkTable* table = create_dialog_table( 2, 2, 4, 4 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ auto table = create_dialog_table( 2, 2, 4, 4 );
+ vbox.pack_start( table, TRUE, TRUE, 0 );
{
ui::Widget label = ui::Label( "Entity number" );
label.show();
}
}
{
- GtkHBox* hbox = create_dialog_hbox( 4 );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 );
+ auto hbox = create_dialog_hbox( 4 );
+ vbox.pack_start( hbox, TRUE, TRUE, 0 );
{
auto button = create_dialog_button( "Find", G_CALLBACK( dialog_button_ok ), &dialog );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ hbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Close", G_CALLBACK( dialog_button_cancel ), &dialog );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Close", G_CALLBACK( dialog_button_cancel ), &dialog );
+ hbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
}
}
{
auto hbox = ui::HBox( FALSE, 5 );
hbox.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 );
+ vbox.pack_start( hbox, TRUE, TRUE, 0 );
{
auto vbox2 = ui::VBox( FALSE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 0 );
vbox2.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox2 ), TRUE, TRUE, 0 );
+ hbox.pack_start( vbox2, TRUE, TRUE, 0 );
{
auto frame = ui::Frame( "Details" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ vbox2.pack_start( frame, TRUE, TRUE, 0 );
{
auto vbox3 = ui::VBox( FALSE, 5 );
gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 5 );
{
auto table = ui::Table( 2, 2, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox3.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
}
auto table = ui::Table( 5, 2, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox3.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
if ( g_pGameDescription->mGameType == "doom3" ) {
auto frame = ui::Frame( "Tesselation" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ vbox2.pack_start( frame, TRUE, TRUE, 0 );
{
auto vbox3 = ui::VBox( FALSE, 5 );
gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 5 );
{
auto table = ui::Table( 3, 2, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox3.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
{
auto frame = ui::Frame( "Texturing" );
frame.show();
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ hbox.pack_start( frame, TRUE, TRUE, 0 );
{
auto vbox2 = ui::VBox( FALSE, 5 );
vbox2.show();
{
auto label = ui::Label( "Name:" );
label.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( label ), TRUE, TRUE, 0 );
+ vbox2.pack_start( label, TRUE, TRUE, 0 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
auto entry = ui::Entry(ui::New);
// gtk_editable_set_editable (GTK_ENTRY (entry), false);
entry.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ vbox2.pack_start( entry, TRUE, TRUE, 0 );
AddDialogData( *GTK_ENTRY(entry), m_strName );
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
{
auto table = ui::Table( 5, 4, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox2.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
}
auto hbox2 = ui::HBox( TRUE, 5 );
hbox2.show();
- gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox2 ), TRUE, FALSE, 0 );
+ vbox2.pack_start( hbox2, TRUE, FALSE, 0 );
{
auto button = ui::Button( "Auto Cap" );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox2.pack_end(button, TRUE, FALSE, 0);
button.connect( "clicked", G_CALLBACK( OnBtnPatchAutoCap ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
auto button = ui::Button( "CAP" );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox2.pack_end(button, TRUE, FALSE, 0);
button.connect( "clicked", G_CALLBACK( OnBtnPatchdetails ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
auto button = ui::Button( "Set..." );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox2.pack_end(button, TRUE, FALSE, 0);
button.connect( "clicked", G_CALLBACK( OnBtnPatchreset ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
auto button = ui::Button( "Natural" );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox2.pack_end(button, TRUE, FALSE, 0);
button.connect( "clicked", G_CALLBACK( OnBtnPatchnatural ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
auto button = ui::Button( "Fit" );
button.show();
- gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+ hbox2.pack_end(button, TRUE, FALSE, 0);
button.connect( "clicked", G_CALLBACK( OnBtnPatchfit ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
{
- GtkTable* table = create_dialog_table( 2, 2, 4, 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ auto table = create_dialog_table( 2, 2, 4, 4 );
+ hbox.pack_start( table, TRUE, TRUE, 0 );
{
auto label = ui::Label( "Width:" );
label.show();
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_grab_focus( GTK_WIDGET( button ) );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &dialog );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
}
}
{
auto table = ui::Table( 5, 2, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( radio_vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ radio_vbox.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, FALSE, FALSE, 0 );
{
auto button = create_modal_dialog_button( "OK", ok_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Return, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
{
- GtkButton* button = create_modal_dialog_button( "Cancel", cancel_button );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_modal_dialog_button( "Cancel", cancel_button );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel_group, GDK_KEY_Escape, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
}
}
ui::Window dialog = ui::Window(create_floating_window( "NetRadiant Preferences", m_parent ));
{
- ui::Widget mainvbox = ui::VBox( FALSE, 5 );
+ auto mainvbox = ui::VBox( FALSE, 5 );
dialog.add(mainvbox);
gtk_container_set_border_width( GTK_CONTAINER( mainvbox ), 5 );
mainvbox.show();
{
- ui::Widget hbox = ui::HBox( FALSE, 5 );
+ auto hbox = ui::HBox( FALSE, 5 );
hbox.show();
- gtk_box_pack_end( GTK_BOX( mainvbox ), hbox, FALSE, TRUE, 0 );
+ mainvbox.pack_end(hbox, FALSE, TRUE, 0);
{
- GtkButton* button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &m_modal );
- gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &m_modal );
+ hbox.pack_end(button, FALSE, FALSE, 0);
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &m_modal );
- gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &m_modal );
+ hbox.pack_end(button, FALSE, FALSE, 0);
}
{
- GtkButton* button = create_dialog_button( "Clean", G_CALLBACK( OnButtonClean ), this );
- gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Clean", G_CALLBACK( OnButtonClean ), this );
+ hbox.pack_end(button, FALSE, FALSE, 0);
}
}
{
- ui::Widget hbox = ui::HBox( FALSE, 5 );
- gtk_box_pack_start( GTK_BOX( mainvbox ), hbox, TRUE, TRUE, 0 );
+ auto hbox = ui::HBox( FALSE, 5 );
+ mainvbox.pack_start( hbox, TRUE, TRUE, 0 );
hbox.show();
{
auto sc_win = ui::ScrolledWindow(ui::New);
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( sc_win ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
- gtk_box_pack_start( GTK_BOX( hbox ), sc_win, FALSE, FALSE, 0 );
+ hbox.pack_start( sc_win, FALSE, FALSE, 0 );
sc_win.show();
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( sc_win ), GTK_SHADOW_IN );
m_notebook = ui::Widget(gtk_notebook_new());
// hide the notebook tabs since its not supposed to look like a notebook
gtk_notebook_set_show_tabs( GTK_NOTEBOOK( m_notebook ), FALSE );
- gtk_box_pack_start( GTK_BOX( hbox ), m_notebook, TRUE, TRUE, 0 );
+ hbox.pack_start( m_notebook, TRUE, TRUE, 0 );
m_notebook.show();
auto hbox = create_dialog_hbox( 4, 4 );
g_rotate_dialog.window.add(hbox);
{
- GtkTable* table = create_dialog_table( 3, 2, 4, 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ auto table = create_dialog_table( 3, 2, 4, 4 );
+ hbox.pack_start( table, TRUE, TRUE, 0 );
{
ui::Widget label = ui::Label( " X " );
label.show();
}
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
auto button = create_dialog_button( "OK", G_CALLBACK( rotatedlg_ok ), &g_rotate_dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( rotatedlg_cancel ), &g_rotate_dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( rotatedlg_cancel ), &g_rotate_dialog );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Apply", G_CALLBACK( rotatedlg_apply ), &g_rotate_dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Apply", G_CALLBACK( rotatedlg_apply ), &g_rotate_dialog );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
}
}
}
auto hbox = create_dialog_hbox( 4, 4 );
g_scale_dialog.window.add(hbox);
{
- GtkTable* table = create_dialog_table( 3, 2, 4, 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ auto table = create_dialog_table( 3, 2, 4, 4 );
+ hbox.pack_start( table, TRUE, TRUE, 0 );
{
ui::Widget label = ui::Label( " X " );
label.show();
}
}
{
- GtkVBox* vbox = create_dialog_vbox( 4 );
- gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
+ auto vbox = create_dialog_vbox( 4 );
+ hbox.pack_start( vbox, TRUE, TRUE, 0 );
{
auto button = create_dialog_button( "OK", G_CALLBACK( scaledlg_ok ), &g_scale_dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( scaledlg_cancel ), &g_scale_dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Cancel", G_CALLBACK( scaledlg_cancel ), &g_scale_dialog );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{
- GtkButton* button = create_dialog_button( "Apply", G_CALLBACK( scaledlg_apply ), &g_scale_dialog );
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+ auto button = create_dialog_button( "Apply", G_CALLBACK( scaledlg_apply ), &g_scale_dialog );
+ vbox.pack_start( button, FALSE, FALSE, 0 );
}
}
}
{
// replaced by only the vbox:
- ui::Widget vbox = ui::VBox( FALSE, 5 );
+ auto vbox = ui::VBox( FALSE, 5 );
vbox.show();
window.add(vbox);
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
{
- ui::Widget hbox2 = ui::HBox( FALSE, 5 );
+ auto hbox2 = ui::HBox( FALSE, 5 );
hbox2.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 );
+ vbox.pack_start( hbox2, FALSE, FALSE, 0 );
{
ui::Widget label = ui::Label( "Texture" );
label.show();
- gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
+ hbox2.pack_start( label, FALSE, TRUE, 0 );
}
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ hbox2.pack_start( entry, TRUE, TRUE, 0 );
m_texture = entry;
m_textureEntry.connect( entry );
GlobalTextureEntryCompletion::instance().connect( entry );
{
ui::Widget table = ui::Table( 6, 4, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), FALSE, FALSE, 0 );
+ 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 );
{
{
auto frame = ui::Frame( "Texturing" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
+ vbox.pack_start( frame, FALSE, FALSE, 0 );
{
ui::Widget table = ui::Table( 4, 4, FALSE );
table.show();
{
auto frame = ui::Frame( "Surface Flags" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
{
auto vbox3 = ui::VBox( FALSE, 4 );
//gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
{
auto table = ui::Table( 8, 4, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox3.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 0 );
gtk_table_set_col_spacings( table, 0 );
{
auto frame = ui::Frame( "Content Flags" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
{
auto vbox3 = ui::VBox( FALSE, 4 );
//gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
auto table = ui::Table( 8, 4, FALSE );
table.show();
- gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ vbox3.pack_start( table, TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 0 );
gtk_table_set_col_spacings( table, 0 );
{
auto frame = ui::Frame( "Value" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ vbox.pack_start( frame, TRUE, TRUE, 0 );
{
auto vbox3 = ui::VBox( FALSE, 4 );
gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 4 );
{
auto entry = ui::Entry(ui::New);
entry.show();
- gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ vbox3.pack_start( entry, TRUE, TRUE, 0 );
m_valueEntryWidget = entry;
m_valueEntry.connect( entry );
}
// Shamus: Textool goodies...
ui::Widget frame = ui::Frame( "Textool" );
frame.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
+ vbox.pack_start( GTK_WIDGET( frame ), FALSE, FALSE, 0 );
{
//Prolly should make this a member or global var, so the SI can draw on it...
TexTool::g_textoolWin = glwidget_new( FALSE );
{
ui::Widget hbox = ui::HBox( FALSE, 5 );
hbox.show();
- gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, FALSE, 0 );
+ vbox.pack_start( GTK_WIDGET( hbox ), FALSE, FALSE, 0 );
// Checkboxes go here... (Flip X/Y)
ui::Widget flipX = ui::CheckButton( "Flip X axis" );
ui::Widget flipY = ui::CheckButton( "Flip Y axis" );
flipX.show();
flipY.show();
- gtk_box_pack_start( GTK_BOX( hbox ), flipX, FALSE, FALSE, 0 );
- gtk_box_pack_start( GTK_BOX( hbox ), flipY, FALSE, FALSE, 0 );
+ hbox.pack_start( flipX, FALSE, FALSE, 0 );
+ hbox.pack_start( flipY, FALSE, FALSE, 0 );
//Instead of this, we probably need to create a vbox to put into the frame, then the
//window, then the hbox. !!! FIX !!!
ui::Widget table = ui::Table( 3, 3, FALSE );
ui::Widget frame_table{ui::null};
- ui::Widget vbox = ui::VBox( FALSE, 0 );
+ auto vbox = ui::VBox(FALSE, 0);
gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
vbox.show();
}
{ // Texture/Tag notebook
TextureBrowser_constructTagNotebook();
- gtk_box_pack_start( GTK_BOX( vbox ), g_TextureBrowser.m_tag_notebook, TRUE, TRUE, 0 );
+ vbox.pack_start( g_TextureBrowser.m_tag_notebook, TRUE, TRUE, 0 );
}
{ // Tag search button
TextureBrowser_constructSearchButton();
- gtk_box_pack_end( GTK_BOX( vbox ), g_TextureBrowser.m_search_button, FALSE, FALSE, 0 );
+ vbox.pack_end(g_TextureBrowser.m_search_button, FALSE, FALSE, 0);
}
{ // Tag frame
frame_table = ui::Table( 3, 3, FALSE );
}
}
else { // no tag support, show the texture tree only
- gtk_box_pack_start( GTK_BOX( vbox ), g_TextureBrowser.m_scr_win_tree, TRUE, TRUE, 0 );
+ vbox.pack_start( g_TextureBrowser.m_scr_win_tree, TRUE, TRUE, 0 );
}
// TODO do we need this?