Introducing the measuring process (click on the new icon in the top right-hand bar)
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.5 KiB |
|
@ -121,7 +121,7 @@ void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
|
||||||
|
|
||||||
void on_clicked_home (GtkWidget *btt_reset, gpointer data);
|
void on_clicked_home (GtkWidget *btt_reset, gpointer data);
|
||||||
void on_clicked_search (GtkWidget *btt_menu, gpointer list_box);
|
void on_clicked_search (GtkWidget *btt_menu, gpointer list_box);
|
||||||
|
void on_clicked_measure (GtkWidget *btt_measure, gpointer data);
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -41,17 +41,6 @@
|
||||||
#define H_TEXT_WINDOW H_MY_SCREEN
|
#define H_TEXT_WINDOW H_MY_SCREEN
|
||||||
|
|
||||||
|
|
||||||
// called in widget / dispatch.c / on_windows_activation()
|
|
||||||
// defined in widget / topbar / dispatch.c
|
|
||||||
// - widget / topbar / dialog.c
|
|
||||||
// - widget / topbar / polytext.c
|
|
||||||
// after gtk_application_window_new (app) x 3
|
|
||||||
|
|
||||||
void widget_design_main_window (GtkWindow *main_window);
|
|
||||||
void widget_design_dialog_window (GtkWindow *main_window, GtkWindow *dialog_window);
|
|
||||||
void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window);
|
|
||||||
|
|
||||||
|
|
||||||
// called in signal.c / switch_state_rules_data() / gtk_window_set_child()
|
// called in signal.c / switch_state_rules_data() / gtk_window_set_child()
|
||||||
// defined in widget / dispatch.c
|
// defined in widget / dispatch.c
|
||||||
|
|
||||||
|
@ -60,6 +49,17 @@ void *widget_get_dialog_window();
|
||||||
void *widget_get_text_window();
|
void *widget_get_text_window();
|
||||||
|
|
||||||
|
|
||||||
|
// called in widget / dispatch.c / on_windows_activation()
|
||||||
|
// defined in widget / topbar / dispatch.c
|
||||||
|
// - widget / topbar / dialog.c
|
||||||
|
// - widget / topbar / polytext.c
|
||||||
|
// (after gtk_application_window_new (app) x 3)
|
||||||
|
|
||||||
|
void widget_design_main_window (GtkWindow *main_window);
|
||||||
|
void widget_design_dialog_window (GtkWindow *main_window, GtkWindow *dialog_window);
|
||||||
|
void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window);
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* W I D G E T S */
|
/* W I D G E T S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -99,11 +99,13 @@ void window_design_header_bar_right (GtkWidget *header_bar);
|
||||||
// - widget / state / dispatch.c
|
// - widget / state / dispatch.c
|
||||||
// - widget / rules / dispatch.c
|
// - widget / rules / dispatch.c
|
||||||
// - widget / data / dispatch.c
|
// - widget / data / dispatch.c
|
||||||
|
// - widget / measure / dispatch.c
|
||||||
|
|
||||||
void *widget_get_synth_page(); // in : widget / synth / dispatch.c
|
void *widget_get_synth_page(); // in : widget / synth / dispatch.c
|
||||||
void *widget_get_state_page(); // in : widget / state / dispatch.c
|
void *widget_get_state_page(); // in : widget / state / dispatch.c
|
||||||
void *widget_get_rules_page(); // in : widget / rules / dispatch.c
|
void *widget_get_rules_page(); // in : widget / rules / dispatch.c
|
||||||
void *widget_get_data_page(); // in : widget / data / dispatch.c
|
void *widget_get_data_page(); // in : widget / data / dispatch.c
|
||||||
|
void *widget_get_measure_page();// in : widget / measure / dispatch.c
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -243,3 +245,11 @@ void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_
|
||||||
/* M E N U */
|
/* M E N U */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* M E A S U R E S */
|
||||||
|
/******************************************************************************/
|
||||||
|
// called by : signal.c
|
||||||
|
// defined in : widget / measure / dispatch.c
|
||||||
|
|
||||||
|
void *widget_measure_new ();
|
||||||
|
|
10
src/signal.c
|
@ -359,3 +359,13 @@ void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrol
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* M E A S U R E S */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
void on_clicked_measure (GtkWidget *btt_measure, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_get_measure_page()));
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* *
|
||||||
|
* Gem-graph client *
|
||||||
|
* *
|
||||||
|
* Windows && Headers *
|
||||||
|
* *
|
||||||
|
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
|
||||||
|
* Copyright © 2021 Adrien Bourmault <neox@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"
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* M E A S U R E S */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
#define PARTITION_MEASURE 500
|
||||||
|
|
||||||
|
void *widget_measure_new ()
|
||||||
|
{
|
||||||
|
printf("on_clicked_measure() >> dispatch.c / widget_measure_new()\n");
|
||||||
|
GtkBox *results_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
|
gtk_box_append (results_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure caliper icon.png")));
|
||||||
|
return results_box;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *widget_measure_II ()
|
||||||
|
{
|
||||||
|
printf("on_clicked_measure() >> dispatch.c / widget_measure_II()\n");
|
||||||
|
GtkBox *measure_II_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
|
gtk_box_append (measure_II_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure pressure icon.png")));
|
||||||
|
return measure_II_box;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *widget_get_measure_page()
|
||||||
|
{
|
||||||
|
printf("dispatch.c / widget_measure_new() >> dispatch.c / widget_get_measure_page()\n");
|
||||||
|
GtkWidget *anything = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||||
|
gtk_paned_set_start_child (GTK_PANED (anything),
|
||||||
|
GTK_WIDGET (widget_measure_new()));
|
||||||
|
gtk_paned_set_end_child (GTK_PANED (anything),
|
||||||
|
GTK_WIDGET (widget_measure_II()));
|
||||||
|
gtk_paned_set_position (GTK_PANED (anything), PARTITION_MEASURE);
|
||||||
|
gtk_paned_set_shrink_start_child (GTK_PANED (anything), FALSE);
|
||||||
|
gtk_paned_set_shrink_end_child (GTK_PANED (anything), FALSE);
|
||||||
|
gtk_widget_set_size_request (anything, 0, H_MY_SCREEN); // OK (required))
|
||||||
|
|
||||||
|
return anything;
|
||||||
|
}
|
|
@ -45,7 +45,7 @@ void widget_state_XYZ_reset_all()
|
||||||
gtk_adjustment_set_value (Z_adjust, 0);
|
gtk_adjustment_set_value (Z_adjust, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkBox *rec_XYZ_box()
|
static void *get_XYZ_box()
|
||||||
{
|
{
|
||||||
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
||||||
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
|
@ -77,13 +77,12 @@ static GtkBox *rec_XYZ_box()
|
||||||
return XYZ_labels_box;
|
return XYZ_labels_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkBox *rec_ZOOM_box()
|
static void *get_ZOOM_box()
|
||||||
{
|
{
|
||||||
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
||||||
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
||||||
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
||||||
// gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80);
|
|
||||||
gtk_box_append (ZOOM_box, ZOOM_Label);
|
gtk_box_append (ZOOM_box, ZOOM_Label);
|
||||||
return ZOOM_box;
|
return ZOOM_box;
|
||||||
}
|
}
|
||||||
|
@ -100,9 +99,9 @@ void *widget_get_space_view()
|
||||||
// TODO replace this image by >> ui_setup_glarea (0, GTK_WIDGET (~));
|
// TODO replace this image by >> ui_setup_glarea (0, GTK_WIDGET (~));
|
||||||
|
|
||||||
GtkBox *camera = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *camera = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
gtk_box_append (camera, GTK_WIDGET (rec_XYZ_box()));
|
gtk_box_append (camera, GTK_WIDGET (get_XYZ_box()));
|
||||||
gtk_box_append (camera, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
gtk_box_append (camera, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
gtk_box_append (camera, GTK_WIDGET (rec_ZOOM_box()));
|
gtk_box_append (camera, GTK_WIDGET (get_ZOOM_box()));
|
||||||
|
|
||||||
GtkWidget *view_space_vs_camera = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
GtkWidget *view_space_vs_camera = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_paned_set_start_child (GTK_PANED (view_space_vs_camera), GTK_WIDGET (E_coli));
|
gtk_paned_set_start_child (GTK_PANED (view_space_vs_camera), GTK_WIDGET (E_coli));
|
||||||
|
@ -111,6 +110,11 @@ void *widget_get_space_view()
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (view_space_vs_camera), FALSE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (view_space_vs_camera), FALSE);
|
||||||
gtk_paned_set_position (GTK_PANED (view_space_vs_camera), PARTITION_SPACE_VS_CAMERA);
|
gtk_paned_set_position (GTK_PANED (view_space_vs_camera), PARTITION_SPACE_VS_CAMERA);
|
||||||
|
|
||||||
|
/* GtkBox *un_essai = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6));
|
||||||
|
gtk_box_append (GTK_BOX (un_essai), GTK_WIDGET (E_coli));
|
||||||
|
gtk_box_append (GTK_BOX (un_essai), GTK_WIDGET (camera));
|
||||||
|
|
||||||
|
return GTK_WIDGET (un_essai); <<< Ça devrait suffire ? */
|
||||||
return GTK_WIDGET (view_space_vs_camera);
|
return GTK_WIDGET (view_space_vs_camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ static void *widget_get_space_vs_non_time_dependent_analysis()
|
||||||
gtk_paned_set_end_child (GTK_PANED (space_vs_non_time_dependent_analysis),
|
gtk_paned_set_end_child (GTK_PANED (space_vs_non_time_dependent_analysis),
|
||||||
GTK_WIDGET (widget_get_non_time_dependent_analysis_elements()));
|
GTK_WIDGET (widget_get_non_time_dependent_analysis_elements()));
|
||||||
gtk_paned_set_position (GTK_PANED (space_vs_non_time_dependent_analysis), PARTITION_SYNTH);
|
gtk_paned_set_position (GTK_PANED (space_vs_non_time_dependent_analysis), PARTITION_SYNTH);
|
||||||
gtk_paned_set_shrink_start_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
gtk_paned_set_shrink_start_child (GTK_PANED (space_vs_non_time_dependent_analysis), FALSE);
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (space_vs_non_time_dependent_analysis), FALSE); // TRUE
|
||||||
|
|
||||||
return space_vs_non_time_dependent_analysis;
|
return space_vs_non_time_dependent_analysis;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ void widget_design_main_window (GtkWindow *main_window)
|
||||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (widget_get_btt_data()), TRUE);
|
gtk_check_button_set_active (GTK_CHECK_BUTTON (widget_get_btt_data()), TRUE);
|
||||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (widget_get_btt_synth()), TRUE);
|
gtk_check_button_set_active (GTK_CHECK_BUTTON (widget_get_btt_synth()), TRUE);
|
||||||
|
|
||||||
// THE LAST ONE IS THE WINNER (AND THE WINNER TAKES IT ALL !...)
|
// THE LAST ONE IS THE WINNER (AND THE WINNER TAKES IT ALL !...)
|
||||||
|
|
||||||
gtk_window_present (GTK_WINDOW (main_window));
|
gtk_window_present (GTK_WINDOW (main_window));
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,11 @@ void window_design_header_bar_right (GtkWidget *header_bar)
|
||||||
g_signal_connect (search, "clicked", G_CALLBACK (on_clicked_search), no_local_data);
|
g_signal_connect (search, "clicked", G_CALLBACK (on_clicked_search), no_local_data);
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), GTK_WIDGET (search));
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), GTK_WIDGET (search));
|
||||||
|
|
||||||
|
GtkButton *measure = GTK_BUTTON (gtk_button_new ());
|
||||||
|
gtk_button_set_icon_name (measure, "color-select-symbolic");
|
||||||
|
g_signal_connect (measure, "clicked", G_CALLBACK (on_clicked_measure), no_local_data);
|
||||||
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), GTK_WIDGET (measure));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|