WIP: cosmétique, cleaning (https://thenounproject.com/icon/train-134324/) < j'aime bien...

This commit is contained in:
Jean Sirmai 2024-06-22 01:00:02 +02:00
parent 80bde12a84
commit 533d1ad387
Signed by: jean
GPG Key ID: FB3115C340E057E3
3 changed files with 108 additions and 4 deletions

View File

@ -180,6 +180,7 @@ void on_toggle_EXEC_EDIT (GtkWidget *btt_XOR_EXEC_EDIT, GtkWidget *btt_MODEL_RUN
set_mode (0);
} else {
gtk_button_set_icon_name (GTK_BUTTON (btt_XOR_EXEC_EDIT), "preferences-system-symbolic");
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "emblem-ok-symbolic"); // Transport Steam Engine !!
gtk_widget_set_sensitive (GTK_WIDGET (btt_MODEL_RUN_STOP), FALSE);
set_mode (1);
}

110
contain.c
View File

@ -185,7 +185,8 @@ void window_header_bar (GtkWindow *window, char *title){
g_signal_connect (btt_MODEL_RUN_STOP, "clicked", G_CALLBACK (on_toggle_MODEL_RUN_STOP), no_local_data);
GtkButton *btt_XOR_EXEC_EDIT = GTK_BUTTON (gtk_toggle_button_new ());
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "system-run-symbolic");
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "system-run-symbolic"); // https://thenounproject.com/icon/train-134324/
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "process-stop-symbolic");
gtk_button_set_icon_name (btt_XOR_EXEC_EDIT, "power-profile-balanced-rtl-symbolic");
g_signal_connect (btt_XOR_EXEC_EDIT, "clicked", G_CALLBACK (on_toggle_EXEC_EDIT), btt_MODEL_RUN_STOP);
@ -226,13 +227,15 @@ void window_header_bar (GtkWindow *window, char *title){
gtk_check_button_get_active (get_GtkButton ("data analysis"))); // (GTK_CHECK_BUTTON (btt_open_DATA)));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_XOR_EXEC_EDIT));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_MODEL_RUN_STOP));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_MODEL_RUN_STOP)); // << pas ici ! TODO
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (any_Label));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_open_STATE));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_open_RULES));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_open_DATA));
icons_for_fun (GTK_HEADER_BAR (header_bar)); // https://iconduck.com/sets/adwaita-icon-theme
// icons_for_fun (GTK_HEADER_BAR (header_bar)); // https://iconduck.com/sets/adwaita-icon-theme
// https://iconduck.com/sets/carbon-icons < pas mal ...
// ma préférée : Transport Steam Engine Icon mais : [ process icon ] semble un bon choix...
}
void window_main_child (GtkWindow *main_window, int selected_page){
@ -258,7 +261,7 @@ void window_main_child (GtkWindow *main_window, int selected_page){
case (RULES) : gtk_window_set_child (main_window, GTK_WIDGET (get_rules_page_new()));
// printf ("SWITCH_TO RULES\n");
break;
case (DATA) : gtk_window_set_child (main_window, GTK_WIDGET (get_measures_page_new()));
case (DATA) : gtk_window_set_child (main_window, GTK_WIDGET (get_window_child_DATA()));
// printf ("SWITCH_TO DATA\n");
break;
case (4) : gtk_window_set_child (main_window, GTK_WIDGET (get_results_page_new())); break;
@ -358,3 +361,102 @@ static void icons_for_fun (GtkHeaderBar *header_bar)
gtk_button_set_icon_name (power_low, "power-profile-power-saver-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (power_low));
}
GtkWidget *get_window_child_DATA (){
GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 32));
GtkWidget* frame_rule_effect = gtk_frame_new ("rule effect\n-----------");
gtk_frame_set_label_align (GTK_FRAME (frame_rule_effect), 0.5);
GtkBox *rule_effect_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_rule_effect), GTK_WIDGET (rule_effect_box));
GtkWidget* frame_rule_topic = gtk_frame_new ("rule topic\n----------");
gtk_frame_set_label_align (GTK_FRAME (frame_rule_topic), 0.5);
GtkBox *rule_topic_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_rule_topic), GTK_WIDGET (rule_topic_box));
GtkWidget* frame_data_type = gtk_frame_new ("data type\n----------");
gtk_frame_set_label_align (GTK_FRAME (frame_data_type), 0.5);
GtkBox *data_type_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_data_type), GTK_WIDGET (data_type_box));
GtkWidget* frame_interpretations = gtk_frame_new ("interpretation\n---------------");
gtk_frame_set_label_align (GTK_FRAME (frame_interpretations), 0.5);
GtkBox *interpretations_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_interpretations), GTK_WIDGET (interpretations_box));
GtkWidget* frame_discussions = gtk_frame_new ("discussion\n------------");
gtk_frame_set_label_align (GTK_FRAME (frame_discussions), 0.5);
GtkBox *discussions_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_discussions), GTK_WIDGET (discussions_box));
GtkWidget* frame_separator = gtk_frame_new ("\n");
GtkWidget* frame_game = gtk_frame_new ("game\n------");
gtk_frame_set_label_align (GTK_FRAME (frame_game), 0.5);
GtkBox *game_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_game), GTK_WIDGET (game_box));
GtkWidget* frame_help = gtk_frame_new ("help\n-----");
gtk_frame_set_label_align (GTK_FRAME (frame_help), 0.5);
GtkBox *help_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
gtk_frame_set_child (GTK_FRAME (frame_help), GTK_WIDGET (help_box));
gtk_box_append (data_box, GTK_WIDGET (frame_rule_effect));
gtk_box_append (data_box, GTK_WIDGET (frame_rule_topic));
gtk_box_append (data_box, GTK_WIDGET (frame_data_type));
gtk_box_append (data_box, GTK_WIDGET (frame_interpretations));
gtk_box_append (data_box, GTK_WIDGET (frame_discussions));
gtk_box_append (data_box, GTK_WIDGET (frame_separator));
gtk_box_append (data_box, GTK_WIDGET (frame_game));
gtk_box_append (data_box, GTK_WIDGET (frame_help));
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_topic_box, gtk_button_new_with_label ("objects"));
gtk_box_append (rule_topic_box, gtk_button_new_with_label ("situations"));
gtk_box_append (rule_topic_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (rule_topic_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (rule_topic_box, gtk_button_new_with_label ("accuracy"));
gtk_box_append (rule_topic_box, gtk_button_new_with_label ("pattern recognition"));
gtk_box_append (data_type_box, gtk_button_new_with_label ("repartitions"));
gtk_box_append (data_type_box, gtk_button_new_with_label ("evolutions"));
gtk_box_append (data_type_box, gtk_button_new_with_label ("correlations"));
gtk_box_append (interpretations_box, gtk_button_new_with_label ("stochastic"));
gtk_box_append (interpretations_box, gtk_button_new_with_label ("deterministic"));
gtk_box_append (interpretations_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (interpretations_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (interpretations_box, gtk_button_new_with_label ("physical"));
gtk_box_append (interpretations_box, gtk_button_new_with_label ("chemical"));
gtk_box_append (interpretations_box, gtk_button_new_with_label ("biological"));
gtk_box_append (interpretations_box, gtk_button_new_with_label ("social"));
gtk_box_append (interpretations_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (discussions_box, gtk_button_new_with_label ("context"));
gtk_box_append (discussions_box, gtk_button_new_with_label ("methodology"));
gtk_box_append (discussions_box, gtk_button_new_with_label ("comparisons"));
gtk_box_append (discussions_box, gtk_button_new_with_label ("to improve"));
gtk_box_append (discussions_box, gtk_button_new_with_label ("summary"));
gtk_box_append (game_box, gtk_button_new_with_label ("single player"));
gtk_box_append (game_box, gtk_button_new_with_label ("multiple players"));
gtk_box_append (game_box, gtk_button_new_with_label ("edition facilities"));
gtk_box_append (help_box, gtk_button_new_with_label ("modelization"));
gtk_box_append (help_box, gtk_button_new_with_label ("measurements"));
gtk_box_append (help_box, gtk_button_new_with_label ("results"));
gtk_box_append (help_box, gtk_button_new_with_label ("data analysis"));
gtk_box_append (help_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (help_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (help_box, gtk_button_new_with_label ("preferences"));
return GTK_WIDGET (data_box);
}

View File

@ -38,3 +38,4 @@ void window_main_child_bottom (GtkBox *page_box);
void window_main_child (GtkWindow *main_window, int selected_page);
void set_check_button_active (GtkButton *button, int active);
GtkButton *get_GtkButton (char *btt_name);
GtkWidget *get_window_child_DATA();