WIP: secure before a little bit tricky touchy point...

This commit is contained in:
Jean Sirmai 2024-06-08 15:59:09 +02:00
parent 545e1cb146
commit bbac7d71da
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 24 additions and 10 deletions

View File

@ -2,6 +2,7 @@
#include <gtk-4.0/gtk/gtk.h> #include <gtk-4.0/gtk/gtk.h>
#include "callback.h" #include "callback.h"
#include "in_depth.h"
#include "display.h" #include "display.h"
#include "tree.h" #include "tree.h"
#include "texts.h" #include "texts.h"
@ -139,14 +140,16 @@ GtkWidget *get_SPACE_VIEW_box(){
return GTK_WIDGET (middle_box); return GTK_WIDGET (middle_box);
} }
GtkWidget *get_space_page_new(){ GtkWidget *get_SPACE_EDIT_controls_box() {
GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); GtkWidget *label_ad_hoc = gtk_label_new ("_____________\n\
gtk_box_append (page_box, GTK_WIDGET (get_OBJECTS_and_SITUATIONS())); SPACE EDIT\n controls\n_____________");
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); return GTK_WIDGET (label_ad_hoc);
gtk_box_append (page_box, GTK_WIDGET (get_SPACE_VIEW_box())); }
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box()));
return GTK_WIDGET (page_box); void window_main_child_bottom (GtkBox *page_box){
if (get_exec_edit_mode ()) gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box()));
else gtk_box_append (page_box, GTK_WIDGET (get_SPACE_EDIT_controls_box()));
} }
static void icons_for_fun (GtkHeaderBar *header_bar); static void icons_for_fun (GtkHeaderBar *header_bar);
@ -186,13 +189,23 @@ void window_header_bar (GtkWindow *window, char *title){
void window_main_child (GtkWindow *main_window, int selected_page){ void window_main_child (GtkWindow *main_window, int selected_page){
// in_depth.c : enum { STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIGURE }; // in_depth.c : enum { STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIGURE };
switch (selected_page) { switch (selected_page) {
case (0) : gtk_window_set_child (main_window, GTK_WIDGET (get_space_page_new())); break; case (0) : // STATE
GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
gtk_box_append (page_box, GTK_WIDGET (get_OBJECTS_and_SITUATIONS()));
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (page_box, GTK_WIDGET (get_SPACE_VIEW_box()));
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
window_main_child_bottom (page_box);
// if (get_exec_edit_mode ()) gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box()));
// else gtk_box_append (page_box, GTK_WIDGET (get_SPACE_EDIT_controls_box()));
gtk_window_set_child (main_window, GTK_WIDGET (page_box));
break;
case (1) : gtk_window_set_child (main_window, GTK_WIDGET (get_rules_page_new())); break; case (1) : gtk_window_set_child (main_window, GTK_WIDGET (get_rules_page_new())); break;
case (2) : gtk_window_set_child (main_window, GTK_WIDGET (get_measures_page_new())); break; case (2) : gtk_window_set_child (main_window, GTK_WIDGET (get_measures_page_new())); break;
case (3) : gtk_window_set_child (main_window, GTK_WIDGET (get_results_page_new())); break; case (3) : gtk_window_set_child (main_window, GTK_WIDGET (get_results_page_new())); break;
case (4) : gtk_window_set_child (main_window, GTK_WIDGET (get_discuss_page_new())); break; case (4) : gtk_window_set_child (main_window, GTK_WIDGET (get_discuss_page_new())); break;
case (5) : gtk_window_set_child (main_window, GTK_WIDGET (get_help_page_new())); break; case (5) : gtk_window_set_child (main_window, GTK_WIDGET (get_help_page_new())); break;
default : gtk_window_set_child (main_window, GTK_WIDGET (get_space_page_new())); default : gtk_window_set_child (main_window, GTK_WIDGET (get_SPACE_VIEW_box())); // + un "help message"
} }
} }

View File

@ -35,4 +35,5 @@ void window_main_child (GtkWindow *window, int selected_page);
void two_notebooks_in_two_panes (GtkWindow *window); void two_notebooks_in_two_panes (GtkWindow *window);
GtkWidget *get_selected_rules_vpaned_new(); GtkWidget *get_selected_rules_vpaned_new();
GtkFrame *get_frame_with_label(); GtkFrame *get_frame_with_label();
void window_main_child_bottom (GtkBox *page_box);