WIP: data page < a very, very first taste...

This commit is contained in:
Jean Sirmai 2024-08-02 23:19:58 +02:00
parent 78bd3a0d23
commit 6c04038f85
Signed by: jean
GPG Key ID: FB3115C340E057E3
5 changed files with 36 additions and 43 deletions

BIN
data/image/data charts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}