diff --git a/display.c b/display.c index 81a8665..2804984 100644 --- a/display.c +++ b/display.c @@ -68,6 +68,12 @@ GtkWidget *get_image_AMP(){ return image; } +GtkWidget *get_user_tree(){ + GtkWidget *image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image/arbre utilisateur.png"); + gtk_widget_set_size_request (GTK_WIDGET (image), W_IMAGE_LOCAL, H_IMAGE_LOCAL); + return image; +} + //------------------------------------------------------------------------------ // TODO cliquer sur "RUN" --> affiche "STOP" (et inversement) diff --git a/display.o b/display.o index b2015ba..babc8e9 100644 Binary files a/display.o and b/display.o differ diff --git a/hot.c b/hot.c index 1e32625..35b0d41 100644 --- a/hot.c +++ b/hot.c @@ -48,14 +48,41 @@ GtkWidget *get_selected_rules_vpaned_new(){ return GTK_WIDGET (V_selected_1_vs_2); } +GtkBox *get_rules_user_tree_new(){ + GtkBox *tree_sketch = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (tree_sketch, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (tree_sketch, GTK_WIDGET (get_user_tree())); + gtk_box_append (tree_sketch, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + return tree_sketch; +} + +GtkBox *get_rules_comparator_new(){ + GtkBox *comparator = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (comparator, GTK_WIDGET (get_image_ATP())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (comparator, GTK_WIDGET (get_image_AMP())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (comparator, GTK_WIDGET (get_image_GLUTAMATE())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (comparator, GTK_WIDGET (get_image_GLUTAMINE())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (comparator, GTK_WIDGET (get_image_HISTIDINE())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (comparator, GTK_WIDGET (get_image_PHENYLALANINE())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (comparator, GTK_WIDGET (get_image_DOPAMINE())); + gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + return comparator; +} + GtkWidget *get_rules_tree_hpaned_new(){ GtkPaned *H_tree_vs_comparison = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL)); GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre"); GtkWidget *comparaison_des_règles_sélectionnées = gtk_frame_new ("Sélection"); - gtk_paned_set_start_child (H_tree_vs_comparison, GTK_WIDGET (arbre_des_règles)); - gtk_paned_set_end_child (H_tree_vs_comparison, GTK_WIDGET (comparaison_des_règles_sélectionnées)); + gtk_paned_set_start_child (H_tree_vs_comparison, GTK_WIDGET (get_rules_user_tree_new())); + gtk_paned_set_end_child (H_tree_vs_comparison, GTK_WIDGET (get_rules_comparator_new())); gtk_paned_set_position (H_tree_vs_comparison, 300); gtk_paned_set_wide_handle (H_tree_vs_comparison, TRUE); gtk_paned_set_shrink_start_child (H_tree_vs_comparison, FALSE); diff --git a/hot.o b/hot.o index cb351de..8c00e0f 100644 Binary files a/hot.o and b/hot.o differ diff --git a/image/2024-05-12 rules explorer (first sketch).png b/image/2024-05-12 rules explorer (first sketch).png new file mode 100644 index 0000000..bcafdf7 Binary files /dev/null and b/image/2024-05-12 rules explorer (first sketch).png differ diff --git a/image/arbre utilisateur.png b/image/arbre utilisateur.png new file mode 100644 index 0000000..8ec8756 Binary files /dev/null and b/image/arbre utilisateur.png differ diff --git a/myprogram b/myprogram index c41f53d..64bb7b8 100755 Binary files a/myprogram and b/myprogram differ