ui::Widget create_padding( int width, int height ){
ui::Alignment widget = ui::Alignment( 0.0, 0.0, 0.0, 0.0 );
widget.show();
- gtk_widget_set_size_request( widget, width, height );
+ widget.dimensions(width, height);
return widget;
}
}
}
-EMessageBoxReturn gtk_MessageBox( ui::Widget parent, const char* text, const char* title, EMessageBoxType type, EMessageBoxIcon icon ){
+EMessageBoxReturn gtk_MessageBox( ui::Window parentWindow, const char* text, const char* title, EMessageBoxType type, EMessageBoxIcon icon ){
ModalDialog dialog;
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
ModalDialogButton yes_button( dialog, eIDYES );
ModalDialogButton no_button( dialog, eIDNO );
- ui::Window parentWindow = ui::Window(parent ? GTK_WINDOW( parent ) : 0);
-
ui::Window window = create_fixedsize_modal_dialog_window( parentWindow, title, dialog, 400, 100 );
if ( parentWindow ) {
auto iconBox = create_dialog_hbox( 16, 0 );
hboxDummy.pack_start( iconBox, FALSE, FALSE, 0 );
- auto image = ui::Image(GTK_IMAGE( gtk_image_new_from_stock( messagebox_stock_icon( icon ), GTK_ICON_SIZE_DIALOG ) ));
+ auto image = ui::Image::from( gtk_image_new_from_stock( messagebox_stock_icon( icon ), GTK_ICON_SIZE_DIALOG ) );
image.show();
iconBox.pack_start( image, FALSE, FALSE, 0 );