struct GameCombo
{
- ui::ComboBoxText game_select;
- ui::Entry fsgame_entry;
+ ui::ComboBoxText game_select{ui::null};
+ ui::Entry fsgame_entry{ui::null};
};
gboolean OnSelchangeComboWhatgame( ui::Widget widget, GameCombo* combo ){
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
- dialog.game_combo.game_select = ui::ComboBoxText();
+ dialog.game_combo.game_select = ui::ComboBoxText(ui::New);
gtk_combo_box_text_append_text( dialog.game_combo.game_select, globalGameComboConfiguration().basegame );
if ( globalGameComboConfiguration().known[0] != '\0' ) {
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table2, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
gtk_combo_box_text_append_text( combo, globalMappingMode().sp_mapping_mode );
gtk_combo_box_text_append_text( combo, globalMappingMode().mp_mapping_mode );
auto window = MainFrame_getWindow().create_dialog_window("Arbitrary sides", G_CALLBACK(dialog_delete_callback ), &dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
{
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 );
sides_entry = entry;
auto sc_extensions = create_scrolled_window( ui::Policy::AUTOMATIC, ui::Policy::ALWAYS, 4 );
frame.add(sc_extensions);
{
- auto text_extensions = ui::TextView();
+ auto text_extensions = ui::TextView(ui::New);
gtk_text_view_set_editable( GTK_TEXT_VIEW( text_extensions ), FALSE );
sc_extensions.add(text_extensions);
text_extensions.text(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
ModalDialog dialog;
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
- ui::Entry x;
- ui::Entry y;
+ ui::Entry x{ui::null};
+ ui::Entry y{ui::null};
auto window = MainFrame_getWindow().create_modal_dialog_window("Patch texture layout", dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
{
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
x = entry;
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
// Text Editor dialog
// master window widget
-static ui::Widget text_editor;
-static ui::Widget text_widget; // slave, text widget from the gtk editor
+static ui::Widget text_editor{ui::null};
+static ui::Widget text_widget{ui::null}; // slave, text widget from the gtk editor
static gint editor_delete( ui::Widget widget, gpointer data ){
if ( widget.alert( "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::NO ) {
}
static void CreateGtkTextEditor(){
- ui::Widget vbox, hbox, button, text;
-
auto dlg = ui::Window( ui::window_type::TOP );
dlg.connect( "delete_event",
G_CALLBACK( editor_delete ), 0 );
gtk_window_set_default_size( GTK_WINDOW( dlg ), 600, 300 );
- vbox = ui::VBox( FALSE, 5 );
+ auto vbox = ui::VBox( FALSE, 5 );
vbox.show();
dlg.add(vbox);
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
scr.show();
gtk_box_pack_start( GTK_BOX( vbox ), 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 );
- text = ui::TextView();
+ auto text = ui::TextView(ui::New);
scr.add(text);
text.show();
g_object_set_data( G_OBJECT( dlg ), "text", (gpointer) text );
gtk_text_view_set_editable( GTK_TEXT_VIEW( text ), TRUE );
- hbox = ui::HBox( FALSE, 5 );
+ auto hbox = ui::HBox( FALSE, 5 );
hbox.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
- button = ui::Button( "Close" );
+ auto button = ui::Button( "Close" );
button.show();
gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
button.connect( "clicked",
EMessageBoxReturn DoLightIntensityDlg( int *intensity ){
ModalDialog dialog;
- ui::Entry intensity_entry;
+ ui::Entry intensity_entry{ui::null};
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
ui::Window window = MainFrame_getWindow().create_modal_dialog_window("Light intensity", dialog, -1, -1 );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
auto window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
auto window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{