#include #include #include "callback.h" #include "in_depth.h" #include "display.h" #include "tree.h" #include "texts.h" // https://docs.gtk.org/gtk4/visual_index.html < widgets gallery /* doc : see > on_dialog_window_activation (...) in callback.c */ void dialog_window_design (GtkWindow *main_window, GtkWindow *dialog_window){ char *title = " Should I save the current model before editing ? "; GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ()); gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title)); gtk_window_set_titlebar (dialog_window, header_bar); GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); GtkButton *click = GTK_BUTTON (gtk_button_new_with_label ("click me !")); gtk_box_append (page_box, GTK_WIDGET (click)); // gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); gtk_window_set_child (dialog_window, GTK_WIDGET (page_box)); gtk_window_set_transient_for (GTK_WINDOW (dialog_window), GTK_WINDOW (main_window)); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog_window), TRUE); // gtk_window_set_deletable (GTK_WINDOW (dialog_window), FALSE); // FALSE // gtk_window_set_modal (GTK_WINDOW (dialog_window), TRUE); gtk_window_present (GTK_WINDOW (dialog_window)); }