From 85754fc91cb479979e943a3e450ab7668ea11ff5 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Thu, 22 Aug 2024 22:01:33 +0200 Subject: [PATCH] cleaning + a widget intended to modulate the intensities of the various represented flows --- include/widget.h | 4 ++- src/widget/dispatch.c | 3 ++ src/widget/results/dispatch.c | 2 +- src/widget/results/display.c | 16 +++++++-- src/widget/results/organize.c | 68 ++++++++++++++--------------------- src/widget/state/middle.c | 9 ++--- src/widget/synth/dispatch.c | 2 +- src/widget/synth/time.c | 3 +- 8 files changed, 50 insertions(+), 57 deletions(-) diff --git a/include/widget.h b/include/widget.h index 3a4562d..fadf87b 100644 --- a/include/widget.h +++ b/include/widget.h @@ -65,8 +65,9 @@ void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window /******************************************************************************/ #define W_TREE 160 #define W_DO_UNDO_REDO_BOX 1300 +#define W_XYZ_BOX 62 #define H_XYZ_BOX 200 -#define H_E_COLI 790 +#define H_E_COLI 760 #define H_OBJECTS_SITUATIONS 130 #define W_COMPARATOR 64 #define W_RULES_USE 90 @@ -199,6 +200,7 @@ void *widget_get_selected_rule_images(); void *widget_get_organize_results_box(); void *widget_get_display_results_box(); +void *widget_get_time_results_box (); /******************************************************************************/ diff --git a/src/widget/dispatch.c b/src/widget/dispatch.c index 4fd97b7..31f033c 100644 --- a/src/widget/dispatch.c +++ b/src/widget/dispatch.c @@ -70,3 +70,6 @@ void on_windows_activation (GtkApplication *app) widget_design_text_window (main_window, text_window); } +/******************************************************************************/ +/* M A I N W I N D O W <> see T O P B A R */ +/******************************************************************************/ diff --git a/src/widget/results/dispatch.c b/src/widget/results/dispatch.c index 6ce2ae7..e9c26f8 100644 --- a/src/widget/results/dispatch.c +++ b/src/widget/results/dispatch.c @@ -34,7 +34,7 @@ // "graph", "chart", "plot" and "diagram" are ambiguous terms, sometimes used interchangeably. // https://www.mathsisfun.com/data/data-graph.php -#define H_PARTITION_RESULTS 200 +#define H_PARTITION_RESULTS 140 void *widget_get_data_page() diff --git a/src/widget/results/display.c b/src/widget/results/display.c index 51027b8..41c5aeb 100644 --- a/src/widget/results/display.c +++ b/src/widget/results/display.c @@ -31,6 +31,15 @@ #include "../../../include/signal.h" #include "../../../include/widget.h" +void *widget_get_time_results_box () { + GtkBox *time_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + gtk_box_append (time_box, GTK_WIDGET (gtk_button_new_with_label ("\n a widget\n\ + intended to\n modulate\n the intensities\n of the various\n represented\n flows\n"))); + gtk_box_append (time_box, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/data évolutions parallèles (n > 30) étendu.png"))); + return GTK_WIDGET (time_box); +} + void *widget_get_display_results_box () { GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); @@ -43,13 +52,12 @@ void *widget_get_display_results_box () { ("/home/jean/Gem-Graph/gem-graph-client/data/image/data correlations (4, horizontal).png"))); gtk_box_append (data_box, gtk_button_new_with_label ("evolutions")); - gtk_box_append (data_box, GTK_WIDGET (gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/data évolutions parallèles (n > 30) étendu.png"))); GtkBox *scroll_bar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); gtk_box_append (scroll_bar_box, GTK_WIDGET(gtk_label_new ("\ a scroll bar allowing to detail the data along the time elapsed during the simulation"))); gtk_box_append (scroll_bar_box, GTK_WIDGET (gtk_progress_bar_new ())); GtkAdjustment *adjust = gtk_adjustment_new (30, 0, 100, 1, 0, 0); + gtk_box_append (data_box, GTK_WIDGET (widget_get_time_results_box ())); gtk_box_append (scroll_bar_box, GTK_WIDGET (gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, adjust))); gtk_box_append (data_box, GTK_WIDGET (scroll_bar_box)); @@ -67,7 +75,9 @@ void *widget_get_display_results_box () { /******************************************************************************/ -/* +/* names +(propositions) + "rule effect" "rule topic" "data type" diff --git a/src/widget/results/organize.c b/src/widget/results/organize.c index 9434886..2cd2a7e 100644 --- a/src/widget/results/organize.c +++ b/src/widget/results/organize.c @@ -1,4 +1,4 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Gem-graph client * * * @@ -33,46 +33,30 @@ void *widget_get_organize_results_box () { - GtkBox *organize_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + GtkBox *all_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + GtkBox *ad_hoc_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (ad_hoc_box, gtk_button_new_with_label ("\n\n\n\n\n\n \ + \ + ")); + GtkBox *front_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (front_box, gtk_button_new_with_label ("\n how should \n\ + the sequence \n from measurements\n to results presentation \n\ + be organized\n ?")); - GtkWidget* frame_single_rule = gtk_frame_new ("data based on measurements of a single rule effect"); - GtkBox *rule_basic_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); - GtkBox *rule_topic_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); -// GtkBox *rule_effect_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); - - GtkWidget* frame_two_rules = gtk_frame_new ("data based on measurements of two rules effect"); - GtkBox *rule_observ_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); - gtk_frame_set_child (GTK_FRAME (frame_two_rules), GTK_WIDGET (rule_observ_box)); - - GtkWidget* frame_data_analysis = gtk_frame_new ("data based on analysis of previous measurements"); - GtkBox *rule_analysis_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); - gtk_frame_set_child (GTK_FRAME (frame_data_analysis), GTK_WIDGET (rule_analysis_box)); - - gtk_box_append (rule_basic_box, gtk_button_new_with_label ("count rule exec. occurences")); - gtk_box_append (rule_basic_box, gtk_button_new_with_label ("mem dates rule occurences")); - - gtk_box_append (rule_topic_box, gtk_button_new_with_label ("objects")); - gtk_box_append (rule_topic_box, gtk_button_new_with_label ("situations")); -/* - gtk_box_append (rule_effect_box, gtk_button_new_with_label ("movement")); - gtk_box_append (rule_effect_box, gtk_button_new_with_label ("transport")); - gtk_box_append (rule_effect_box, gtk_button_new_with_label ("transformation")); - - gtk_box_append (rule_observ_box, gtk_button_new_with_label ("elapsed time")); - gtk_box_append (rule_observ_box, gtk_button_new_with_label ("third event occurences count")); - - gtk_box_append (rule_analysis_box, gtk_button_new_with_label ("comparison")); - gtk_box_append (rule_analysis_box, gtk_button_new_with_label ("correlation")); -*/ - gtk_frame_set_child (GTK_FRAME (frame_single_rule), GTK_WIDGET (rule_basic_box)); -// gtk_frame_set_child (GTK_FRAME (frame_single_rule), GTK_WIDGET (rule_topic_box)); -// gtk_frame_set_child (GTK_FRAME (frame_single_rule), GTK_WIDGET (rule_effect_box)); - - gtk_box_append (organize_box, GTK_WIDGET (frame_single_rule)); - gtk_box_append (organize_box, GTK_WIDGET (frame_two_rules)); - gtk_box_append (organize_box, GTK_WIDGET (frame_data_analysis)); - - return GTK_WIDGET (organize_box); + GtkBox *access_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (access_box, gtk_button_new_with_label ("measurements\ + activate or create mesurement tools \ + ")); + gtk_box_append (access_box, gtk_button_new_with_label ("measures\ + apply a mesurement tool to a situation to create a data flow\ + ")); + gtk_box_append (access_box, gtk_button_new_with_label ("results\ + get some results and operate them (filter, concat, analyze, transform, etc.)")); + gtk_box_append (access_box, gtk_button_new_with_label ("presentation\ + display (plot) results and tune the chart (graph, diagram) appearance\ + ")); + gtk_box_append (all_box, GTK_WIDGET (ad_hoc_box)); + gtk_box_append (all_box, GTK_WIDGET (front_box)); + gtk_box_append (all_box, GTK_WIDGET (access_box)); + return GTK_WIDGET (all_box); } - - diff --git a/src/widget/state/middle.c b/src/widget/state/middle.c index 05e8a20..5c3eee7 100644 --- a/src/widget/state/middle.c +++ b/src/widget/state/middle.c @@ -57,7 +57,7 @@ static void *get_XYZ_box() GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust); GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust); GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust); - gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, H_XYZ_BOX); // (provisoire) TODO + gtk_widget_set_size_request (GTK_WIDGET (XYZ_scrollbar_box), W_XYZ_BOX, H_XYZ_BOX); // (provisoire) TODO gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer") gtk_box_append (XYZ_scrollbar_box, scroll_X); @@ -73,7 +73,6 @@ static void *get_XYZ_box() gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("\nX Y Z"))); gtk_box_append (XYZ_labels_box, GTK_WIDGET (XYZ_scrollbar_box)); gtk_box_append (XYZ_labels_box, GTK_WIDGET (btt_reset)); - gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new (""))); return XYZ_labels_box; } @@ -111,13 +110,9 @@ void *widget_get_space_view(int partition_space_vs_camera) gtk_paned_set_shrink_end_child (GTK_PANED (view_space_vs_camera), FALSE); gtk_paned_set_position (GTK_PANED (view_space_vs_camera), partition_space_vs_camera); -/* GtkBox *un_essai = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6)); - gtk_box_append (GTK_BOX (un_essai), GTK_WIDGET (E_coli)); - gtk_box_append (GTK_BOX (un_essai), GTK_WIDGET (camera)); - - return GTK_WIDGET (un_essai); <<< Ça devrait suffire ? */ return GTK_WIDGET (view_space_vs_camera); } + diff --git a/src/widget/synth/dispatch.c b/src/widget/synth/dispatch.c index a94aae3..af3bd24 100644 --- a/src/widget/synth/dispatch.c +++ b/src/widget/synth/dispatch.c @@ -48,7 +48,7 @@ static void *widget_get_non_time_dependent_analysis_elements() // for fun ! } #define H_PARTITION_SYNTH 1600 -#define W_PARTITION_SYNTH 500 +#define W_PARTITION_SYNTH 400 static void *widget_get_space_vs_non_time_dependent_analysis() { diff --git a/src/widget/synth/time.c b/src/widget/synth/time.c index 476c095..791df58 100644 --- a/src/widget/synth/time.c +++ b/src/widget/synth/time.c @@ -35,8 +35,7 @@ void *widget_get_time_dependent_results_and_time_controls() { GtkBox *time_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); gtk_box_append (time_box, GTK_WIDGET(widget_get_sequence_control())); - gtk_box_append (time_box, GTK_WIDGET(gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/data évolutions parallèles (n > 30) étendu.png"))); + gtk_box_append (time_box, GTK_WIDGET (widget_get_time_results_box ())); return time_box; }