diff --git a/data/image/ADP.png b/data/image/ADP.png new file mode 100644 index 0000000..266d70a Binary files /dev/null and b/data/image/ADP.png differ diff --git a/data/image/AMP.png b/data/image/AMP.png index 450dfb7..19a4b6a 100644 Binary files a/data/image/AMP.png and b/data/image/AMP.png differ diff --git a/data/image/acetic acid.png b/data/image/acetic acid.png new file mode 100644 index 0000000..171bcb5 Binary files /dev/null and b/data/image/acetic acid.png differ diff --git a/data/image/ascorbic acid.png b/data/image/ascorbic acid.png new file mode 100644 index 0000000..5fa3ab2 Binary files /dev/null and b/data/image/ascorbic acid.png differ diff --git a/data/image/biotin.png b/data/image/biotin.png new file mode 100644 index 0000000..659589e Binary files /dev/null and b/data/image/biotin.png differ diff --git a/data/image/erythorbic acid.png b/data/image/erythorbic acid.png new file mode 100644 index 0000000..8e883e0 Binary files /dev/null and b/data/image/erythorbic acid.png differ diff --git a/data/image/folic acid.png b/data/image/folic acid.png new file mode 100644 index 0000000..0a4a7b0 Binary files /dev/null and b/data/image/folic acid.png differ diff --git a/data/image/glutathione.png b/data/image/glutathione.png new file mode 100644 index 0000000..c7e74bd Binary files /dev/null and b/data/image/glutathione.png differ diff --git a/data/image/glycerol.png b/data/image/glycerol.png new file mode 100644 index 0000000..f3da398 Binary files /dev/null and b/data/image/glycerol.png differ diff --git a/data/image/lactic acid.png b/data/image/lactic acid.png new file mode 100644 index 0000000..21ed2e0 Binary files /dev/null and b/data/image/lactic acid.png differ diff --git a/data/image/legumin.png b/data/image/legumin.png new file mode 100644 index 0000000..1c54a84 Binary files /dev/null and b/data/image/legumin.png differ diff --git a/data/image/pantothenic acid.png b/data/image/pantothenic acid.png new file mode 100644 index 0000000..1baca2b Binary files /dev/null and b/data/image/pantothenic acid.png differ diff --git a/data/image/pyridoxin.png b/data/image/pyridoxin.png new file mode 100644 index 0000000..46965b1 Binary files /dev/null and b/data/image/pyridoxin.png differ diff --git a/data/image/riboflavin.png b/data/image/riboflavin.png new file mode 100644 index 0000000..2a9ea41 Binary files /dev/null and b/data/image/riboflavin.png differ diff --git a/data/image/ribonuclease.png b/data/image/ribonuclease.png new file mode 100644 index 0000000..bc5f680 Binary files /dev/null and b/data/image/ribonuclease.png differ diff --git a/include/widget.h b/include/widget.h index b3d3a12..58374d4 100644 --- a/include/widget.h +++ b/include/widget.h @@ -100,20 +100,6 @@ void widget_add_child_node (struct TreeNode_t *parent, struct TreeNode_t *child) void *widget_get_user_rules_tree (); // see "labo.c" for specification of the tree -/******************************************************************************/ -/* I M A G E S */ -/******************************************************************************/ -// images in : data / image / -// functions in : widget / stock.c -// used by : widget / rules.c - -void *widget_get_image_E_coli(); -void *widget_get_image_glutamate(); -void *widget_get_image_glutamine(); -void *widget_get_image_ATP(); -void *widget_get_image_AMP(); - - /******************************************************************************/ /* T E X T S */ /******************************************************************************/ @@ -126,6 +112,14 @@ char *widget_get_text_address_about_commands (); char *widget_get_text_address_any (); +/******************************************************************************/ +/* I M A G E S */ +/******************************************************************************/ +// images in : data / image / +// used by : widget / rules.c + +GtkBox *get_an_impression_of_what_a_rules_comparator_could_be(); + /******************************************************************************/ /* L A B O */ /******************************************************************************/ diff --git a/src/widget/labo.c b/src/widget/labo.c index e484850..67aae12 100644 --- a/src/widget/labo.c +++ b/src/widget/labo.c @@ -104,6 +104,110 @@ void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_ struct TreeNode_t *cc = widget_create_user_tree_node("access"); widget_add_child_node(c, cc); } +#define W_IMAGE_ABSURD 1920 / 32 // 1920 x 960 ad hoc (pour mon écran) +#define H_IMAGE_ABSURD 960 + +GtkBox *get_an_impression_of_what_a_rules_comparator_could_be(){ + + GtkBox *compare_left = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_widget_set_size_request (GTK_WIDGET (compare_left), W_IMAGE_ABSURD, H_IMAGE_ABSURD); + + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamate.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamine.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/legumin.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ATP.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/histidine.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/phénylalanine.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/dopamine.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ribonuclease.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ascorbic acid.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/biotin.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/erythorbic acid.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/folic acid.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glycerol.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/insuline.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutathione.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/lactic acid.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/pantothenic acid.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/pyridoxin.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/riboflavin.png"))); + gtk_box_append (compare_left, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/hb.png"))); + + GtkBox *compare_right = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_widget_set_size_request (GTK_WIDGET (compare_right), W_IMAGE_ABSURD, H_IMAGE_ABSURD); + + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ADP.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamate.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamine.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/legumin.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ATP.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/histidine.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/phénylalanine.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/dopamine.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ribonuclease.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ascorbic acid.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/biotin.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/erythorbic acid.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/folic acid.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glycerol.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/insuline.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutathione.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/lactic acid.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/pantothenic acid.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/pyridoxin.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/riboflavin.png"))); + gtk_box_append (compare_right, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/hb.png"))); + + GtkBox *comparator = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + gtk_box_append (comparator, GTK_WIDGET (compare_left)); + gtk_box_append (comparator, GTK_WIDGET (compare_right)); + + return comparator; +} + /* "rule effect" diff --git a/src/widget/rules.c b/src/widget/rules.c index d26c6e4..cd1abde 100644 --- a/src/widget/rules.c +++ b/src/widget/rules.c @@ -29,78 +29,65 @@ #include "../../include/widget.h" -#define W_IMAGE_LOCAL 1920 / 64 // 1920 x 960 ad hoc (pour mon écran) -#define H_IMAGE_LOCAL 960 / 64 +#define W_IMAGE_LOCAL 1920 / 32 // 1920 x 960 ad hoc (pour mon écran) +#define H_IMAGE_LOCAL 960 static GtkWidget *rec_selected_rules_vpaned_new() { - GtkPaned *EXEC_CONTROLS_pane = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_VERTICAL)); - gtk_widget_set_size_request (GTK_WIDGET (EXEC_CONTROLS_pane), W_IMAGE_LOCAL, H_IMAGE_LOCAL); - // if mode EDIT set_shrink FALSE < TODO - gtk_paned_set_shrink_start_child (EXEC_CONTROLS_pane, FALSE); - gtk_paned_set_shrink_end_child (EXEC_CONTROLS_pane, FALSE); + GtkPaned *selected_rule_pane = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_VERTICAL)); + gtk_widget_set_size_request (GTK_WIDGET (selected_rule_pane), W_IMAGE_LOCAL, H_IMAGE_LOCAL); + // if mode EDIT set_shrink FALSE < TODO + gtk_paned_set_shrink_start_child (selected_rule_pane, FALSE); + gtk_paned_set_shrink_end_child (selected_rule_pane, FALSE); - GtkBox *up_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); - gtk_box_append (up_box, GTK_WIDGET (widget_get_image_glutamate())); - gtk_box_append (up_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); - gtk_box_append (up_box, GTK_WIDGET (widget_get_image_glutamine())); + GtkBox *up_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + gtk_box_append (up_box, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamate.png"))); + gtk_box_append (up_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); + gtk_box_append (up_box, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamine.png"))); - GtkBox *bottom_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); - gtk_box_append (bottom_box, GTK_WIDGET (widget_get_image_ATP())); - gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); - gtk_box_append (bottom_box, GTK_WIDGET (widget_get_image_AMP())); + GtkBox *bottom_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); + gtk_box_append (bottom_box, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png"))); + gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); + gtk_box_append (bottom_box, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/ADP.png"))); + gtk_paned_set_start_child (selected_rule_pane, GTK_WIDGET (up_box)); + gtk_paned_set_end_child (selected_rule_pane, GTK_WIDGET (bottom_box)); + gtk_paned_set_position (selected_rule_pane, 50); - gtk_paned_set_start_child (EXEC_CONTROLS_pane, GTK_WIDGET (up_box)); - gtk_paned_set_end_child (EXEC_CONTROLS_pane, GTK_WIDGET (bottom_box)); - - return GTK_WIDGET (EXEC_CONTROLS_pane); -} - -static GtkBox *rec_rules_comparator_new(){ - GtkBox *comparator = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); - gtk_widget_set_size_request (GTK_WIDGET (comparator), W_IMAGE_LOCAL, H_IMAGE_LOCAL); - gtk_box_append (comparator, GTK_WIDGET (widget_get_image_ATP())); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (comparator, GTK_WIDGET (widget_get_image_AMP())); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (comparator, GTK_WIDGET (widget_get_image_glutamate())); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (comparator, GTK_WIDGET (widget_get_image_glutamine())); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (comparator, GTK_WIDGET (gtk_picture_new_for_filename ("/home/jean/Gem-Graph/gem-graph-client/data/image/histidine.png"))); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (comparator, GTK_WIDGET (gtk_picture_new_for_filename ("/home/jean/Gem-Graph/gem-graph-client/data/image/phénylalanine.png"))); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (comparator, GTK_WIDGET (gtk_picture_new_for_filename ("/home/jean/Gem-Graph/gem-graph-client/data/image/dopamine.png"))); - gtk_box_append (comparator, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - return comparator; + return GTK_WIDGET (selected_rule_pane); } static GtkWidget *rec_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 *comparaison_des_règles_sélectionnées = gtk_frame_new ("Sélection"); -// GTK_SCROLLED_WINDOW - gtk_paned_set_start_child (H_tree_vs_comparison, GTK_WIDGET (widget_get_user_rules_tree())); - gtk_paned_set_end_child (H_tree_vs_comparison, GTK_WIDGET (rec_rules_comparator_new())); - gtk_paned_set_position (H_tree_vs_comparison, 300); - gtk_paned_set_wide_handle (H_tree_vs_comparison, TRUE); - gtk_widget_set_size_request (GTK_WIDGET (H_tree_vs_comparison), W_IMAGE_LOCAL, H_IMAGE_LOCAL); - gtk_paned_set_shrink_start_child (H_tree_vs_comparison, FALSE); - gtk_paned_set_shrink_end_child (H_tree_vs_comparison, FALSE); - return GTK_WIDGET (H_tree_vs_comparison); + // GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre"); + // GtkWidget *comparaison_des_règles_sélectionnées = gtk_frame_new ("Sélection"); + // GTK_SCROLLED_WINDOW + gtk_paned_set_start_child (H_tree_vs_comparison, GTK_WIDGET (widget_get_user_rules_tree())); + gtk_paned_set_end_child (H_tree_vs_comparison, GTK_WIDGET + (get_an_impression_of_what_a_rules_comparator_could_be())); + gtk_paned_set_position (H_tree_vs_comparison, 300); + gtk_paned_set_wide_handle (H_tree_vs_comparison, TRUE); + gtk_widget_set_size_request (GTK_WIDGET (H_tree_vs_comparison), W_IMAGE_LOCAL, H_IMAGE_LOCAL); + gtk_paned_set_shrink_start_child (H_tree_vs_comparison, FALSE); + gtk_paned_set_resize_end_child (H_tree_vs_comparison, FALSE); + gtk_paned_set_shrink_end_child (H_tree_vs_comparison, FALSE); + return GTK_WIDGET (H_tree_vs_comparison); } void *widget_get_rules_page() { - GtkPaned *H_tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL)); -// GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre des règles"); -// GtkWidget *édition_de_la_règle_sélectionnée_n_1 = gtk_frame_new ("Inspection"); - gtk_paned_set_start_child (H_tree_vs_selected, GTK_WIDGET (rec_rules_tree_hpaned_new())); - gtk_paned_set_end_child (H_tree_vs_selected, GTK_WIDGET (rec_selected_rules_vpaned_new())); - gtk_paned_set_position (H_tree_vs_selected, 400); // WARNING : c'est une position "absolue" - gtk_paned_set_wide_handle (H_tree_vs_selected, TRUE); - gtk_paned_set_shrink_start_child (H_tree_vs_selected, FALSE); - gtk_paned_set_shrink_end_child (H_tree_vs_selected, FALSE); - return GTK_WIDGET (H_tree_vs_selected); + GtkPaned *H_tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL)); + // GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre des règles"); + // GtkWidget *édition_de_la_règle_sélectionnée_n_1 = gtk_frame_new ("Inspection"); + gtk_paned_set_start_child (H_tree_vs_selected, GTK_WIDGET (rec_rules_tree_hpaned_new())); + gtk_paned_set_end_child (H_tree_vs_selected, GTK_WIDGET (rec_selected_rules_vpaned_new())); + gtk_paned_set_position (H_tree_vs_selected, 400); // WARNING : c'est une position "absolue" + gtk_paned_set_wide_handle (H_tree_vs_selected, TRUE); + gtk_paned_set_shrink_start_child (H_tree_vs_selected, FALSE); + gtk_paned_set_shrink_end_child (H_tree_vs_selected, FALSE); + return GTK_WIDGET (H_tree_vs_selected); } diff --git a/src/widget/state/middle.c b/src/widget/state/middle.c index c6ef777..8b65fa2 100644 --- a/src/widget/state/middle.c +++ b/src/widget/state/middle.c @@ -88,20 +88,21 @@ static GtkBox *rec_ZOOM_box() void *widget_get_space_view() { - GtkBox *right_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); - gtk_box_append (right_box, GTK_WIDGET (rec_XYZ_box())); - gtk_box_append (right_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (right_box, GTK_WIDGET (rec_ZOOM_box())); + GtkBox *right_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (right_box, GTK_WIDGET (rec_XYZ_box())); + gtk_box_append (right_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (right_box, GTK_WIDGET (rec_ZOOM_box())); - GtkBox *central_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + GtkBox *central_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); - // TODO - gtk_box_append (central_box, GTK_WIDGET (widget_get_image_E_coli())); - // ui_setup_glarea (0, GTK_WIDGET (central_box)); + // TODO + gtk_box_append (central_box, GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/E coli by D Goodsell.png"))); + // ui_setup_glarea (0, GTK_WIDGET (central_box)); - gtk_box_append (central_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); - gtk_box_append (central_box, GTK_WIDGET (right_box)); - return GTK_WIDGET (central_box); + gtk_box_append (central_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL))); + gtk_box_append (central_box, GTK_WIDGET (right_box)); + return GTK_WIDGET (central_box); } diff --git a/src/widget/stock.c b/src/widget/stock.c index 82d46c3..522182a 100644 --- a/src/widget/stock.c +++ b/src/widget/stock.c @@ -98,38 +98,3 @@ char *widget_get_text_address_any () { } - -/******************************************************************************/ -/* I M A G E S */ -/******************************************************************************/ - -void *widget_get_image_E_coli(){ - GtkWidget *image = gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/E coli by D Goodsell.png"); - return image; -} - -void *widget_get_image_glutamate(){ - GtkWidget *image = gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamate.png"); - return image; -} - -void *widget_get_image_glutamine(){ - GtkWidget *image = gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/glutamine.png"); - return image; -} - -void *widget_get_image_ATP(){ - GtkWidget *image = gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/ATP.png"); - return image; -} - -void *widget_get_image_AMP(){ - GtkWidget *image = gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png"); - return image; -} - diff --git a/src/widget/topbar.c b/src/widget/topbar.c index 2cc80e5..af56019 100644 --- a/src/widget/topbar.c +++ b/src/widget/topbar.c @@ -113,12 +113,17 @@ static void window_header_bar_right (GtkWidget *header_bar); void widget_design_main_window (GtkWindow *main_window) { - GtkWidget *header_bar = window_header_bar (main_window); - window_header_bar_left (header_bar); - window_header_bar_right (header_bar); - // next line <=> calls.on_toggle_state_rule_data (btt_STATE) - gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE); - gtk_window_present (GTK_WINDOW (main_window)); + GtkWidget *header_bar = window_header_bar (main_window); + window_header_bar_left (header_bar); + window_header_bar_right (header_bar); + + // use the next line to select the page that will be presented first + // it triggers <=> signal.on_toggle_state_rule_data (a btt_NAME) + + // gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE); + gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_RULES), TRUE); + + gtk_window_present (GTK_WINDOW (main_window)); }