2024-06-11 00:11:50 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <gtk-4.0/gtk/gtk.h>
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
2024-06-11 16:39:40 +02:00
|
|
|
/* doc : see > on_dialog_window_activation (...) in callback.c */
|
2024-06-11 00:11:50 +02:00
|
|
|
|
2024-06-11 16:39:40 +02:00
|
|
|
void dialog_window_design (GtkWindow *main_window, GtkWindow *dialog_window){
|
|
|
|
char *title = " Should I save the current model before editing ? ";
|
2024-06-11 00:11:50 +02:00
|
|
|
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);
|
2024-06-11 16:39:40 +02:00
|
|
|
|
|
|
|
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));
|
2024-06-11 00:11:50 +02:00
|
|
|
}
|
2024-06-11 16:39:40 +02:00
|
|
|
|
|
|
|
|