WIP: get_an_impression_of_what_a_rules_comparator_could_be
After Width: | Height: | Size: 439 KiB |
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 336 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 180 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 568 KiB |
After Width: | Height: | Size: 308 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 491 KiB |
|
@ -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 */
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -29,50 +29,35 @@
|
|||
|
||||
#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);
|
||||
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 (EXEC_CONTROLS_pane, FALSE);
|
||||
gtk_paned_set_shrink_end_child (EXEC_CONTROLS_pane, FALSE);
|
||||
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_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 (widget_get_image_glutamine()));
|
||||
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()));
|
||||
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(){
|
||||
|
@ -82,11 +67,13 @@ static GtkWidget *rec_rules_tree_hpaned_new(){
|
|||
// 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_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);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,8 @@ void *widget_get_space_view()
|
|||
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()));
|
||||
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)));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,8 +116,13 @@ 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);
|
||||
|
||||
// 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));
|
||||
}
|
||||
|
||||
|
|