diff --git a/data/image/data charts.png b/data/image/data charts.png new file mode 100644 index 0000000..5fe2e6a Binary files /dev/null and b/data/image/data charts.png differ diff --git a/src/widget/data/analysis b/src/widget/data/analysis.c similarity index 91% rename from src/widget/data/analysis rename to src/widget/data/analysis.c index b4ac834..01f8561 100644 --- a/src/widget/data/analysis +++ b/src/widget/data/analysis.c @@ -34,15 +34,15 @@ void *widget_get_analysis_page () { GtkWidget *btt_A = gtk_toggle_button_new (); - gtk_button_set_icon_name (GTK_BUTTON (btt_left), "view-refresh-symbolic"); + gtk_button_set_icon_name (GTK_BUTTON (btt_A), "view-refresh-symbolic"); - GtkWidget *btt_B = gtk_toggle_button_new (); - gtk_button_set_icon_name (GTK_BUTTON (btt_left), "view-refresh-symbolic"); + GtkWidget *data_chart = GTK_WIDGET (gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/image/data charts.png")); GtkWidget* frame_analysis = gtk_frame_new ("analysis"); GtkBox *analysis_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8)); gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (btt_A)); - gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (btt_B)); + gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (data_chart)); return GTK_WIDGET (frame_analysis); } diff --git a/src/widget/data/dispatch.c b/src/widget/data/dispatch.c index 9071c0c..a6c6126 100644 --- a/src/widget/data/dispatch.c +++ b/src/widget/data/dispatch.c @@ -31,14 +31,15 @@ #include "../../../include/signal.h" #include "../../../include/widget.h" -#define PARTITION 200 +#define PARTITION_A 700 +#define PARTITION_B 700 static void *widget_get_stock_and_analysis_page() { GtkWidget *stock_and_analyse_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); gtk_paned_set_start_child (GTK_PANED(stock_and_analyse_horizontal_pane), GTK_WIDGET (widget_get_measures_page())); gtk_paned_set_end_child (GTK_PANED(stock_and_analyse_horizontal_pane), GTK_WIDGET (widget_get_stock_page())); - gtk_paned_set_position (GTK_PANED (stock_and_analyse_horizontal_pane), PARTITION); + gtk_paned_set_position (GTK_PANED (stock_and_analyse_horizontal_pane), PARTITION_B); gtk_paned_set_shrink_start_child (GTK_PANED (stock_and_analyse_horizontal_pane), FALSE); gtk_paned_set_shrink_end_child (GTK_PANED (stock_and_analyse_horizontal_pane), FALSE); @@ -47,20 +48,10 @@ static void *widget_get_stock_and_analysis_page() void *widget_get_data_page() { - GtkWidget *btt_left = gtk_toggle_button_new (); - gtk_button_set_icon_name (GTK_BUTTON (btt_left), "view-refresh-symbolic"); - - GtkWidget *stock_and_analyse_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); - gtk_paned_set_start_child (GTK_PANED(stock_and_analyse_horizontal_pane), GTK_WIDGET (widget_get_measures_page())); - gtk_paned_set_end_child (GTK_PANED(stock_and_analyse_horizontal_pane), GTK_WIDGET (widget_get_stock_page())); - gtk_paned_set_position (GTK_PANED (stock_and_analyse_horizontal_pane), PARTITION); - gtk_paned_set_shrink_start_child (GTK_PANED (stock_and_analyse_horizontal_pane), FALSE); - gtk_paned_set_shrink_end_child (GTK_PANED (stock_and_analyse_horizontal_pane), FALSE); - GtkWidget *measures_and_data_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); - gtk_paned_set_start_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (btt_left)); - gtk_paned_set_end_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (stock_and_analyse_horizontal_pane)); - gtk_paned_set_position (GTK_PANED (measures_and_data_horizontal_pane), PARTITION); + gtk_paned_set_start_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_stock_and_analysis_page())); + gtk_paned_set_end_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_analysis_page())); + gtk_paned_set_position (GTK_PANED (measures_and_data_horizontal_pane), PARTITION_A); gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE); gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE); gtk_widget_set_size_request (measures_and_data_horizontal_pane, 1920, 800); diff --git a/src/widget/data/measure.c b/src/widget/data/measure.c index e77959e..dec4148 100644 --- a/src/widget/data/measure.c +++ b/src/widget/data/measure.c @@ -31,18 +31,37 @@ #include "../../../include/signal.h" #include "../../../include/widget.h" -void *widget_get_measures_page () { +void *widget_get_measures_page () +{ + GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 32)); - GtkWidget *btt_A = gtk_toggle_button_new (); - gtk_button_set_icon_name (GTK_BUTTON (btt_A), "view-refresh-symbolic"); + GtkWidget* frame_rule_effect = gtk_frame_new ("rule effect"); + GtkBox *rule_effect_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); + gtk_frame_set_child (GTK_FRAME (frame_rule_effect), GTK_WIDGET (rule_effect_box)); + + GtkWidget* frame_rule_topic = gtk_frame_new ("rule topic"); + GtkBox *rule_topic_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); + gtk_frame_set_child (GTK_FRAME (frame_rule_topic), GTK_WIDGET (rule_topic_box)); + + 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")); GtkWidget *btt_B = gtk_toggle_button_new (); gtk_button_set_icon_name (GTK_BUTTON (btt_B), "folder-saved-search-symbolic"); + gtk_box_append (data_box, GTK_WIDGET (btt_B)); + gtk_box_append (data_box, GTK_WIDGET (frame_rule_effect)); + gtk_box_append (data_box, GTK_WIDGET (frame_rule_topic)); + GtkWidget* frame_measures = gtk_frame_new ("measures"); GtkBox *measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8)); - gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (btt_A)); - gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (btt_B)); + gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (data_box)); + + gtk_widget_set_size_request (GTK_WIDGET (data_box), 600, 0); return GTK_WIDGET (frame_measures); } diff --git a/src/widget/data/stock.c b/src/widget/data/stock.c index 6566be2..a304d59 100644 --- a/src/widget/data/stock.c +++ b/src/widget/data/stock.c @@ -34,34 +34,17 @@ void *widget_get_stock_page () { GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 32)); - GtkWidget* frame_rule_effect = gtk_frame_new ("rule effect"); - GtkBox *rule_effect_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); - gtk_frame_set_child (GTK_FRAME (frame_rule_effect), GTK_WIDGET (rule_effect_box)); - - GtkWidget* frame_rule_topic = gtk_frame_new ("rule topic"); - GtkBox *rule_topic_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); - gtk_frame_set_child (GTK_FRAME (frame_rule_topic), GTK_WIDGET (rule_topic_box)); - GtkWidget* frame_data_type = gtk_frame_new ("data type"); - GtkBox *data_type_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8)); + GtkBox *data_type_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 200)); gtk_frame_set_child (GTK_FRAME (frame_data_type), GTK_WIDGET (data_type_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 (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 (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_widget_set_size_request (GTK_WIDGET (data_box), W_IMAGE_LOCAL * 32, H_IMAGE_LOCAL + 200); + gtk_widget_set_size_request (GTK_WIDGET (data_box), 600, 0); return GTK_WIDGET (data_box); }