WIP: beginning work on the DATA page
This commit is contained in:
parent
37fdaa7dfa
commit
78bd3a0d23
|
@ -110,12 +110,15 @@ void *widget_get_selected_rule_images();
|
|||
|
||||
|
||||
/******************************************************************************/
|
||||
/* S T O C K */
|
||||
/* D A T A */
|
||||
/******************************************************************************/
|
||||
// in : stock.c
|
||||
// called by topbar.c.widget_design_text_window()
|
||||
|
||||
void *widget_get_stock_text (gchar *text_name);
|
||||
void *widget_get_measures_page();
|
||||
void *widget_get_stock_page();
|
||||
void *widget_get_analysis_page();
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* Gem-graph client *
|
||||
* *
|
||||
* Stock *
|
||||
* *
|
||||
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
|
||||
* Copyright © 2021 Jean Sirmai <jean@a-lec.org> *
|
||||
* *
|
||||
* This file is part of Gem-graph. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Affero General Public License *
|
||||
* as published by the Free Software Foundation, *
|
||||
* either version 3 of the License, *
|
||||
* or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; *
|
||||
* without even the implied warranty of MERCHANTABILITY *
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
#include "../../../include/base.h"
|
||||
#include "../../../include/signal.h"
|
||||
#include "../../../include/widget.h"
|
||||
|
||||
void *widget_get_analysis_page () {
|
||||
|
||||
GtkWidget *btt_A = gtk_toggle_button_new ();
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_left), "view-refresh-symbolic");
|
||||
|
||||
GtkWidget *btt_B = gtk_toggle_button_new ();
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_left), "view-refresh-symbolic");
|
||||
|
||||
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));
|
||||
|
||||
return GTK_WIDGET (frame_analysis);
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +31,39 @@
|
|||
#include "../../../include/signal.h"
|
||||
#include "../../../include/widget.h"
|
||||
|
||||
#define PARTITION 200
|
||||
|
||||
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_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);
|
||||
|
||||
return stock_and_analyse_horizontal_pane;
|
||||
}
|
||||
|
||||
void *widget_get_data_page()
|
||||
{
|
||||
return widget_get_stock_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_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);
|
||||
|
||||
return measures_and_data_horizontal_pane;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* Gem-graph client *
|
||||
* *
|
||||
* Stock *
|
||||
* *
|
||||
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
|
||||
* Copyright © 2021 Jean Sirmai <jean@a-lec.org> *
|
||||
* *
|
||||
* This file is part of Gem-graph. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Affero General Public License *
|
||||
* as published by the Free Software Foundation, *
|
||||
* either version 3 of the License, *
|
||||
* or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; *
|
||||
* without even the implied warranty of MERCHANTABILITY *
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
#include "../../../include/base.h"
|
||||
#include "../../../include/signal.h"
|
||||
#include "../../../include/widget.h"
|
||||
|
||||
void *widget_get_measures_page () {
|
||||
|
||||
GtkWidget *btt_A = gtk_toggle_button_new ();
|
||||
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_B), "folder-saved-search-symbolic");
|
||||
|
||||
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));
|
||||
|
||||
return GTK_WIDGET (frame_measures);
|
||||
}
|
||||
|
||||
|
|
@ -32,36 +32,37 @@
|
|||
#include "../../../include/widget.h"
|
||||
|
||||
void *widget_get_stock_page () {
|
||||
GtkBox *data_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 32));
|
||||
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_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_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));
|
||||
gtk_frame_set_child (GTK_FRAME (frame_data_type), GTK_WIDGET (data_type_box));
|
||||
GtkWidget* frame_data_type = gtk_frame_new ("data type");
|
||||
GtkBox *data_type_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8));
|
||||
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 (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_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 (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_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"));
|
||||
|
||||
return GTK_WIDGET (data_box);
|
||||
// gtk_widget_set_size_request (GTK_WIDGET (data_box), W_IMAGE_LOCAL * 32, H_IMAGE_LOCAL + 200);
|
||||
return GTK_WIDGET (data_box);
|
||||
}
|
||||
|
||||
void *widget_get_stock_text (gchar *text_address) {
|
||||
|
|
|
@ -53,7 +53,7 @@ void widget_design_main_window (GtkWindow *main_window)
|
|||
// 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 (widget_get_btt_rules()), TRUE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (widget_get_btt_data()), TRUE);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (main_window));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue