rules page (une première ébauche)

This commit is contained in:
Jean Sirmai 2024-05-12 21:53:10 +02:00
parent 37c72095b9
commit b80e2a7fb1
Signed by: jean
GPG Key ID: FB3115C340E057E3
7 changed files with 35 additions and 2 deletions

View File

@ -68,6 +68,12 @@ GtkWidget *get_image_AMP(){
return image; 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) // TODO cliquer sur "RUN" --> affiche "STOP" (et inversement)

BIN
display.o

Binary file not shown.

31
hot.c
View File

@ -48,14 +48,41 @@ GtkWidget *get_selected_rules_vpaned_new(){
return GTK_WIDGET (V_selected_1_vs_2); 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(){ GtkWidget *get_rules_tree_hpaned_new(){
GtkPaned *H_tree_vs_comparison = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL)); GtkPaned *H_tree_vs_comparison = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre"); GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre");
GtkWidget *comparaison_des_règles_sélectionnées = gtk_frame_new ("Sélection"); 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_start_child (H_tree_vs_comparison, GTK_WIDGET (get_rules_user_tree_new()));
gtk_paned_set_end_child (H_tree_vs_comparison, GTK_WIDGET (comparaison_des_règles_sélectionnées)); 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_position (H_tree_vs_comparison, 300);
gtk_paned_set_wide_handle (H_tree_vs_comparison, TRUE); gtk_paned_set_wide_handle (H_tree_vs_comparison, TRUE);
gtk_paned_set_shrink_start_child (H_tree_vs_comparison, FALSE); gtk_paned_set_shrink_start_child (H_tree_vs_comparison, FALSE);

BIN
hot.o

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

BIN
image/arbre utilisateur.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
myprogram

Binary file not shown.