2024-06-30 11:53:03 +02:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* *
|
2024-07-04 08:04:58 +02:00
|
|
|
* Gem-graph client *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-07-22 15:42:24 +02:00
|
|
|
* Widgets header *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-07-01 00:42:25 +02:00
|
|
|
* 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> *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
|
|
|
* This file is part of Gem-graph. *
|
|
|
|
* *
|
2024-07-01 00:42:25 +02:00
|
|
|
* 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. *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-07-01 00:42:25 +02:00
|
|
|
* This program is distributed in the hope that it will be useful, *
|
2024-07-01 07:26:16 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; *
|
2024-07-01 00:42:25 +02:00
|
|
|
* without even the implied warranty of MERCHANTABILITY *
|
2024-07-01 07:26:16 +02:00
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. *
|
2024-07-01 00:42:25 +02:00
|
|
|
* See the GNU Affero General Public License for more details. *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
2024-07-01 00:42:25 +02:00
|
|
|
* 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/>. *
|
2024-06-30 11:53:03 +02:00
|
|
|
* *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
2024-04-22 18:40:30 +02:00
|
|
|
|
2024-07-18 23:51:04 +02:00
|
|
|
#pragma once
|
2024-04-22 18:40:30 +02:00
|
|
|
#include <gtk-4.0/gtk/gtk.h>
|
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
/******************************************************************************/
|
2024-07-22 18:02:14 +02:00
|
|
|
/* W I N D O W S */
|
2024-07-08 07:52:27 +02:00
|
|
|
/******************************************************************************/
|
2024-08-05 16:22:43 +02:00
|
|
|
#define W_MY_SCREEN 1920 // 1920 x 960 = ad hoc (pour mon écran))
|
|
|
|
#define H_MY_SCREEN 1000 // Full HD (1920 x 1080 pixels)
|
|
|
|
|
|
|
|
#define W_TEXT_WINDOW 550 // ad hoc (mais sans conséquences ici)
|
2024-08-06 04:49:28 +02:00
|
|
|
#define H_TEXT_WINDOW H_MY_SCREEN
|
|
|
|
|
|
|
|
|
2024-08-06 16:29:41 +02:00
|
|
|
// called in signal.c / switch_state_rules_data() / gtk_window_set_child()
|
|
|
|
// defined in widget / dispatch.c
|
|
|
|
|
|
|
|
void *widget_get_main_window();
|
|
|
|
void *widget_get_dialog_window();
|
|
|
|
void *widget_get_text_window();
|
|
|
|
|
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
// called in widget / dispatch.c / on_windows_activation()
|
|
|
|
// defined in widget / topbar / dispatch.c
|
|
|
|
// - widget / topbar / dialog.c
|
|
|
|
// - widget / topbar / polytext.c
|
2024-08-06 16:29:41 +02:00
|
|
|
// (after gtk_application_window_new (app) x 3)
|
2024-08-04 23:23:12 +02:00
|
|
|
|
2024-07-21 12:33:29 +02:00
|
|
|
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);
|
2024-04-22 18:40:30 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* W I D G E T S */
|
|
|
|
/******************************************************************************/
|
|
|
|
#define W_TREE 160
|
|
|
|
#define W_DO_UNDO_REDO_BOX 1300
|
|
|
|
#define H_XYZ_BOX 200
|
|
|
|
#define H_E_COLI 790
|
|
|
|
#define H_OBJECTS_SITUATIONS 130
|
|
|
|
#define W_COMPARATOR 64
|
|
|
|
#define W_RULES_USE 90
|
2024-08-02 13:10:12 +02:00
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
#define W_IMAGE_800 800
|
|
|
|
#define W_IMAGE_100 100
|
2024-08-02 13:10:12 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
|
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
/* T O P B A R */
|
2024-07-08 07:52:27 +02:00
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// called in widget / topbar / dispatch.c / widget_design_main_window()
|
|
|
|
// defined in topbar / left.c
|
|
|
|
|
|
|
|
void *widget_get_btt_synth(); // {return btt_SYNTH;}
|
|
|
|
void *widget_get_btt_state(); // {return btt_STATE;}
|
|
|
|
void *widget_get_btt_rules(); // {return btt_RULES;}
|
|
|
|
void *widget_get_btt_data(); // {return btt_DATA;}
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
// called in widget / topbar / dispatch.c / widget_design_main_window()
|
|
|
|
// defined in widget / topbar / left.c
|
|
|
|
// - widget / topbar / right.c
|
2024-08-03 22:37:45 +02:00
|
|
|
|
2024-08-07 10:40:24 +02:00
|
|
|
void window_design_topbar_left (GtkWidget *header_bar);
|
|
|
|
void window_design_topbar_right (GtkWidget *header_bar);
|
2024-08-04 23:23:12 +02:00
|
|
|
|
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
// called in signal.c / fsm_get_state_rules_data()
|
|
|
|
// defined in widget / synth / dispatch.c
|
|
|
|
// - widget / state / dispatch.c
|
|
|
|
// - widget / rules / dispatch.c
|
2024-08-06 16:29:41 +02:00
|
|
|
// - widget / data / dispatch.c
|
|
|
|
// - widget / measure / dispatch.c
|
2024-08-06 04:49:28 +02:00
|
|
|
|
|
|
|
void *widget_get_synth_page(); // in : widget / synth / dispatch.c
|
|
|
|
void *widget_get_state_page(); // in : widget / state / dispatch.c
|
|
|
|
void *widget_get_rules_page(); // in : widget / rules / dispatch.c
|
2024-08-06 16:29:41 +02:00
|
|
|
void *widget_get_data_page(); // in : widget / data / dispatch.c
|
|
|
|
void *widget_get_measure_page();// in : widget / measure / dispatch.c
|
2024-08-04 23:23:12 +02:00
|
|
|
|
2024-07-22 17:18:40 +02:00
|
|
|
|
2024-08-04 19:02:00 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* S Y N T H */
|
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// called by : widget / synth / dispatch.c / widget_get_synth_page()
|
|
|
|
// defined in : widget / synth / time.c
|
|
|
|
// repartitions.c WIP
|
|
|
|
// correlations.c WIP
|
2024-08-04 19:02:00 +02:00
|
|
|
|
|
|
|
void *widget_get_time_dependent_results_and_time_controls();
|
2024-08-06 04:49:28 +02:00
|
|
|
// *widget_get_space_vs_non_time_dependent_analysis(); WIP
|
|
|
|
// *widget_get_non_time_dependent_analysis_elements(); WIP
|
|
|
|
|
2024-08-04 19:02:00 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* S T A T E */
|
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// called by : widget / state / dispatch.c / widget_get_state_page()
|
|
|
|
// defined in : widget / state / middle
|
|
|
|
// defined in : widget / state / bottom
|
2024-07-19 23:02:27 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
void *widget_get_space_view(); // middle
|
|
|
|
void *widget_get_graph_view_control(); // middle
|
|
|
|
|
|
|
|
void *widget_get_space_edit_control(); // bottom
|
|
|
|
void *widget_get_sequence_control(); // bottom
|
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
|
|
|
|
// called by : widget / state / top.c / get_situations_box()
|
|
|
|
// called by : prefer.c
|
|
|
|
// defined in : widget / state / top.c
|
2024-07-04 22:29:34 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
void widget_reset_all_situations_transparencies_to_value (int value); // top
|
2024-07-26 12:26:24 +02:00
|
|
|
void widget_set_object_transparency_to_value (int rank, int value); // top
|
2024-08-06 04:49:28 +02:00
|
|
|
int widget_get_object_transparency (int i); // top
|
2024-07-22 18:02:14 +02:00
|
|
|
|
2024-07-26 22:18:03 +02:00
|
|
|
|
2024-08-06 05:25:41 +02:00
|
|
|
// called by : signal.c
|
|
|
|
// defined in : widget / state / middle
|
|
|
|
|
|
|
|
void widget_state_XYZ_reset_all();
|
|
|
|
|
2024-07-26 22:18:03 +02:00
|
|
|
|
2024-07-27 12:34:32 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* R U L E S */
|
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// called by : widget / rules / dispatch.c / widget_get_rules_page()
|
|
|
|
// defined in : widget / rules / tree_tools / dispatch.c (= left)
|
|
|
|
// defined in : widget / rules / selected / dispatch.c (= right)
|
|
|
|
|
|
|
|
void *widget_get_rules_tree_tools_pane();
|
|
|
|
void *widget_get_rules_selected_pane();
|
|
|
|
|
|
|
|
|
|
|
|
// called by : widget / rules / tree_tools / dispatch.c / widget_get_rules_tree_tools_pane()
|
|
|
|
// defined in : widget / rules / tree_tools / pilot_box.c
|
|
|
|
// defined in : widget / rules / tree_tools / freq.c
|
|
|
|
|
|
|
|
void *widget_get_rules_pilot_box(); // pilot_box.c
|
|
|
|
void *widget_get_rules_tree_tools(); // pilot_box.c
|
|
|
|
void *widget_get_rules_use(); // freq.c
|
|
|
|
|
|
|
|
|
|
|
|
// called by : widget / rules / selected / dispatch.c / widget_get_rules_selected_pane()
|
|
|
|
// defined in : widget / rules / selected / dispatch.c
|
|
|
|
// defined in : widget / rules / selected / edit.c
|
|
|
|
// defined in : widget / rules / selected / analyse.c
|
|
|
|
|
|
|
|
void *widget_get_selected_rule(); // dispatch.c
|
|
|
|
void *widget_get_rule_edit(); // edit.c
|
|
|
|
void *widget_get_rule_analyse(); // analyse.c
|
|
|
|
|
|
|
|
// called by : widget / rules / selected / dispatch.c / widget_get_selected_rule()
|
|
|
|
// defined in : widget / rules / selected / text.c
|
|
|
|
// defined in : widget / rules / selected / image.c
|
|
|
|
|
2024-07-30 13:17:16 +02:00
|
|
|
void *widget_get_selected_rule_texts();
|
|
|
|
void *widget_get_selected_rule_images();
|
2024-07-27 12:34:32 +02:00
|
|
|
|
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
/******************************************************************************/
|
2024-08-02 22:47:38 +02:00
|
|
|
/* D A T A */
|
2024-07-22 18:02:14 +02:00
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// called by : widget / data / dispatch / widget_get_data_page()
|
|
|
|
// defined in : widget / data / measures.c
|
|
|
|
// operations.c
|
|
|
|
// results.c
|
2024-07-22 18:02:14 +02:00
|
|
|
|
2024-08-02 22:47:38 +02:00
|
|
|
void *widget_get_measures_page();
|
2024-08-03 22:37:45 +02:00
|
|
|
void *widget_get_results_page();
|
|
|
|
void *widget_get_operations_on_results_page();
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-13 07:48:46 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* T R E E */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-07-01 07:26:16 +02:00
|
|
|
struct TreeNode_t {gchar *text; struct TreeNode_t *child, *next;};
|
2024-07-18 23:51:04 +02:00
|
|
|
struct TreeNode_t *widget_create_user_tree_node (const gchar* text);
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-18 23:51:04 +02:00
|
|
|
void widget_add_child_node (struct TreeNode_t *parent, struct TreeNode_t *child);
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
void *widget_get_user_rules_tree (); // see "labo.c" for specification of the tree
|
2024-06-30 12:47:34 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-05 10:23:19 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* T E X T S */
|
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// called by : widget / topbar / polytext.c
|
2024-08-06 05:25:41 +02:00
|
|
|
// texts in : data / text
|
2024-07-05 10:23:19 +02:00
|
|
|
|
2024-08-05 16:22:43 +02:00
|
|
|
void *widget_get_text_from_address (gchar *text_name);
|
|
|
|
|
2024-07-21 23:17:01 +02:00
|
|
|
char *widget_get_text_address_theory ();
|
2024-08-05 16:22:43 +02:00
|
|
|
char *widget_get_text_address_practice ();
|
2024-07-04 08:04:58 +02:00
|
|
|
|
|
|
|
|
2024-07-27 06:10:34 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* I M A G E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
// images in : data / image /
|
|
|
|
// used by : widget / rules.c
|
|
|
|
|
2024-08-02 13:25:23 +02:00
|
|
|
void *widget_get_an_impression_of_what_a_rules_comparator_could_be();
|
2024-07-27 06:10:34 +02:00
|
|
|
|
2024-07-06 08:27:05 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* L A B O */
|
|
|
|
/******************************************************************************/
|
2024-08-06 04:49:28 +02:00
|
|
|
// now in : widget / rules / tree_tools
|
2024-08-06 05:25:41 +02:00
|
|
|
// called by tree.c / widget_get_user_rules_tree()
|
2024-07-06 08:27:05 +02:00
|
|
|
|
2024-07-21 23:17:01 +02:00
|
|
|
void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_t *tree_root);
|
2024-07-06 08:27:05 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* M E N U */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-08-06 16:29:41 +02:00
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* M E A S U R E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
// called by : signal.c
|
|
|
|
// defined in : widget / measure / dispatch.c
|
|
|
|
|
2024-08-06 18:43:15 +02:00
|
|
|
void *widget_measure_new();
|
|
|
|
void *widget_measure_do_select_rules_first();
|
2024-08-07 13:18:58 +02:00
|
|
|
void *widget_measure_do_depends_on_one_or_two_events();
|
|
|
|
void *widget_measure_do_depends_on_a_single_event();
|
|
|
|
void *widget_measure_do_depends_on_two_events();
|
2024-08-08 00:10:12 +02:00
|
|
|
void *widget_measure_single_event_occurences_nb();
|
|
|
|
void *widget_measure_single_event_occurences_dates();
|