2024-10-19 16:05:49 +02:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* widgets hierarchy header
|
|
|
|
*
|
|
|
|
* This file is part of Gem-graph.
|
|
|
|
*
|
|
|
|
* @cond LICENSE
|
|
|
|
* Copyright © 2021 Libre en Communs <contact@a-lec.org>
|
|
|
|
* Copyright © 2021-2024 Adrien Bourmault <neox@a-lec.org>
|
|
|
|
* Copyright © 2021-2024 Jean Sirmai <jean@a-lec.org>
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
* @endcond
|
|
|
|
*/
|
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-10-20 23:03:17 +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) */
|
2024-08-05 16:22:43 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define W_TEXT_WINDOW 550 /**< ad hoc (mais sans conséquences ici) */
|
|
|
|
#define H_TEXT_WINDOW H_MY_SCREEN /**< == */
|
2024-08-06 04:49:28 +02:00
|
|
|
|
|
|
|
|
2024-09-30 18:12:50 +02:00
|
|
|
// called in signal / switch_state_rules_data() / gtk_window_set_child()
|
|
|
|
// defined in widget / dispatch
|
2024-08-06 16:29:41 +02:00
|
|
|
|
2024-10-19 16:05:49 +02:00
|
|
|
GtkWindow *widget_get_main_window();
|
|
|
|
GtkWindow *widget_get_dialog_window();
|
|
|
|
GtkWindow *widget_get_text_window();
|
2024-08-06 16:29:41 +02:00
|
|
|
|
|
|
|
|
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-09-06 11:02:03 +02:00
|
|
|
void widget_design_main_window (GtkWindow *main_window, GtkApplication *app);
|
2024-07-21 12:33:29 +02:00
|
|
|
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 */
|
|
|
|
/******************************************************************************/
|
2024-10-20 23:03:17 +02:00
|
|
|
#define W_TREE 160 /**< arbitrary */
|
|
|
|
#define W_DO_UNDO_REDO_BOX 1300 /**< arbitrary */
|
|
|
|
#define W_XYZ_BOX 62 /**< arbitrary */
|
|
|
|
#define H_XYZ_BOX 200 /**< arbitrary */
|
|
|
|
#define H_E_COLI 760 /**< arbitrary */
|
|
|
|
#define H_OBJECTS_SITUATIONS 130 /**< arbitrary */
|
|
|
|
#define W_COMPARATOR 64 /**< arbitrary */
|
|
|
|
#define W_RULES_USE 90 /**< arbitrary */
|
2024-08-02 13:10:12 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define W_IMAGE_800 800 /**< arbitrary */
|
|
|
|
#define W_IMAGE_100 100 /**< arbitrary */
|
2024-08-02 13:10:12 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-08-23 23:30:39 +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
|
|
|
|
|
2024-09-30 09:10:42 +02:00
|
|
|
const char *widget_get_btt_label_synth();
|
|
|
|
const char *widget_get_btt_label_state();
|
|
|
|
const char *widget_get_btt_label_rules();
|
|
|
|
const char *widget_get_btt_label_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-10-21 23:49:12 +02:00
|
|
|
void window_design_topbar_center (GtkWidget *topbar);
|
2024-08-07 10:40:24 +02:00
|
|
|
void window_design_topbar_left (GtkWidget *header_bar);
|
2024-09-06 11:02:03 +02:00
|
|
|
void window_design_topbar_right (GtkWidget *header_bar, GtkApplication *app);
|
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
|
2024-09-06 11:02:03 +02:00
|
|
|
// - widgetvoid on_windows_activation (GtkApplication *app) / 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
|
|
|
|
2024-10-21 23:49:12 +02:00
|
|
|
GtkWidget *widget_get_topbar(GtkApplication *app);
|
2024-10-07 05:45:38 +02:00
|
|
|
void *widget_get_page_synth(); // in : widget / synth / dispatch.c
|
|
|
|
void *widget_get_page_state(); // in : widget / state / dispatch.c
|
|
|
|
void *widget_get_page_data(); // in : widget / data / dispatch.c
|
|
|
|
void *widget_get_page_measure(); // in : widget / measure / dispatch.c
|
2024-10-20 23:03:17 +02:00
|
|
|
//void *widget_get_page_engine(); // in : fsm / engine / engine.c
|
2024-08-04 23:23:12 +02:00
|
|
|
|
2024-09-10 13:40:57 +02:00
|
|
|
/* The rules page consists of two half-pages in a GtkPaned widget :
|
|
|
|
* - on the left, widgets for controlling or editing all the rules.
|
|
|
|
* - on the right, widgets for controlling or editing the selected rule.
|
|
|
|
* This distribution is therefore moved into signal switch_state_rules_data()
|
|
|
|
* and the previous "widget_get_rules_page()" function which was in:
|
|
|
|
* widget / rules / dispatch.c is replaced (2024-09-10) by the two functions :
|
|
|
|
* - widget_get_all_rules_left_pane() in widget / all_rules / dispatch
|
|
|
|
* - widget_get_selected_rule_right_pane() in widget / one_rule / dispatch */
|
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define ALL_VS_SELECTED 340 /**< arbitrary */
|
2024-07-22 17:18:40 +02:00
|
|
|
|
2024-08-04 19:02:00 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* S Y N T H */
|
|
|
|
/******************************************************************************/
|
2024-09-09 08:14:04 +02:00
|
|
|
// call: widget / synth / dispatch.c / widget_get_synth_page()
|
|
|
|
// def: widget / synth / time.c
|
2024-08-06 04:49:28 +02:00
|
|
|
// repartitions.c WIP
|
|
|
|
// correlations.c WIP
|
2024-08-04 19:02:00 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define H_PARTITION_SYNTH 1600 /**< arbitrary */
|
|
|
|
#define W_PARTITION_SYNTH 400 /**< arbitrary */
|
2024-08-23 23:30:39 +02:00
|
|
|
|
2024-09-30 18:12:50 +02:00
|
|
|
void *widget_get_time_dependent();
|
|
|
|
void *widget_get_space_vs_non_time_dependent();
|
|
|
|
void *widget_get_non_time_dependent();
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-08-04 19:02:00 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* S T A T E */
|
|
|
|
/******************************************************************************/
|
2024-09-09 08:14:04 +02:00
|
|
|
// call: widget / state / dispatch.c / widget_get_state_page()
|
|
|
|
// def: widget / state / middle
|
|
|
|
// def: widget / state / bottom
|
2024-07-19 23:02:27 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define PARTITION_STATE_TOP 600 /**< arbitrary */
|
|
|
|
#define PARTITION_SPACE_VS_CONTROLS_1 920 /**< arbitrary */
|
|
|
|
#define PARTITION_SPACE_VS_CONTROLS_2 800 /**< arbitrary */
|
|
|
|
#define PARTITION_SPACE_VS_CAMERA_IN_STATE 1850 /**< arbitrary */
|
|
|
|
#define PARTITION_SPACE_VS_CAMERA_IN_SYNTH 1560 /**< arbitrary */
|
2024-08-22 00:53:23 +02:00
|
|
|
|
|
|
|
void *widget_get_space_view (int partition_space_vs_camera); // middle
|
|
|
|
void *widget_get_graph_view_control(); // middle
|
2024-07-22 18:02:14 +02:00
|
|
|
|
|
|
|
void *widget_get_space_edit_control(); // bottom
|
|
|
|
void *widget_get_sequence_control(); // bottom
|
|
|
|
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-09-09 08:14:04 +02:00
|
|
|
// call: widget / state / top.c / get_situations_box()
|
|
|
|
// call: prefer.c
|
|
|
|
// def: widget / state / top.c
|
2024-07-04 22:29:34 +02:00
|
|
|
|
2024-10-07 05:45:38 +02:00
|
|
|
void widget_set_situations_value (int value);
|
|
|
|
void widget_set_objects_value (int rank, int value);
|
2024-10-07 21:11:34 +02:00
|
|
|
int widget_get_object_transparency (int i);
|
2024-07-22 18:02:14 +02:00
|
|
|
|
2024-07-26 22:18:03 +02:00
|
|
|
|
2024-09-09 08:14:04 +02:00
|
|
|
// call: signal.c
|
|
|
|
// def: widget / state / middle
|
2024-08-06 05:25:41 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
|
2024-10-05 18:47:32 +02:00
|
|
|
void widget_reset_XYZ_in_state_pane();
|
2024-10-20 23:03:17 +02:00
|
|
|
/*
|
2024-09-30 21:54:33 +02:00
|
|
|
void widget_reset_XYZ_scrollbars_rule();
|
|
|
|
void widget_reset_XYZ_scrollbars_state();
|
|
|
|
void widget_reset_XYZ_scrollbars_synth();
|
2024-10-20 23:03:17 +02:00
|
|
|
*/
|
2024-07-26 22:18:03 +02:00
|
|
|
|
2024-07-27 12:34:32 +02:00
|
|
|
/******************************************************************************/
|
2024-09-10 13:40:57 +02:00
|
|
|
/* A L L R U L E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
/* O N E R U L E */
|
2024-07-27 12:34:32 +02:00
|
|
|
/******************************************************************************/
|
2024-09-09 08:14:04 +02:00
|
|
|
// call: widget / rules / dispatch.c / widget_get_rules_page()
|
|
|
|
// def: widget / rules / tree_tools / dispatch.c (= left)
|
|
|
|
// def: widget / rules / selected / dispatch.c (= right)
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define LIST_W 190 /**< arbitrary */
|
|
|
|
#define LIST_H 114 /**< arbitrary */
|
2024-09-10 13:40:57 +02:00
|
|
|
|
2024-09-30 09:10:42 +02:00
|
|
|
void *widget_get_pane_all_rules_left();
|
|
|
|
void *widget_get_pane_selected_rule_right();
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-09-30 21:54:33 +02:00
|
|
|
//void *widget_get_rule_geometry_and_algebra();
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-09-10 13:40:57 +02:00
|
|
|
// call: widget / rules / tree_tools / dispatch.c / widget_get_all_rules_left_pane()
|
2024-09-09 08:14:04 +02:00
|
|
|
// def: widget / rules / tree_tools / pilot_box.c
|
|
|
|
// def: widget / rules / tree_tools / freq.c
|
2024-08-06 04:49:28 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2024-09-10 13:40:57 +02:00
|
|
|
// call: widget / rules / selected / dispatch.c / widget_get_one_rule_right_pane()
|
2024-09-09 08:14:04 +02:00
|
|
|
// def: widget / rules / selected / dispatch.c
|
|
|
|
// def: widget / rules / selected / edit.c
|
2024-09-09 14:36:50 +02:00
|
|
|
// def: widget / rules / selected / enquire.c
|
2024-08-06 04:49:28 +02:00
|
|
|
|
|
|
|
void *widget_get_selected_rule(); // dispatch.c
|
2024-09-30 21:54:33 +02:00
|
|
|
void *widget_get_rule_edition_tools(); // one_rule/geometry/edit_tools
|
|
|
|
void *widget_get_rule_investigation_tools(); // one_rule/geometry/investigate
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-09-09 08:14:04 +02:00
|
|
|
// call: widget / rules / selected / dispatch.c / widget_get_selected_rule()
|
|
|
|
// def: widget / rules / selected / text.c
|
|
|
|
// def: widget / rules / selected / image.c
|
2024-08-06 04:49:28 +02:00
|
|
|
|
2024-09-09 14:36:50 +02:00
|
|
|
void *widget_get_selected_rule_algebra();
|
|
|
|
void *widget_get_selected_rule_geometry();
|
2024-09-30 21:54:33 +02:00
|
|
|
void *widget_get_selected_rule_conditions_list_btt();
|
|
|
|
void *widget_get_selected_rule_assignations_list_btt();
|
|
|
|
void *widget_get_selected_rule_identity_btt();
|
2024-07-27 12:34:32 +02:00
|
|
|
|
2024-09-09 08:14:04 +02:00
|
|
|
// def: widget / rules / selected / wip_menu.c
|
2024-09-09 22:21:35 +02:00
|
|
|
GtkEntry widget_set_item_text (GtkWidget *list_box, const char *text, bool editable);
|
2024-09-10 13:40:57 +02:00
|
|
|
void *widget_get_selected_rule_camera();
|
|
|
|
void *widget_get_selected_rule_before_after();
|
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-09-30 09:10:42 +02:00
|
|
|
// call: widget / results / dispatch / widget_get_page_data()
|
2024-09-09 08:14:04 +02:00
|
|
|
// def: widget / results / organize.c
|
2024-08-09 14:47:59 +02:00
|
|
|
// display.c
|
2024-07-22 18:02:14 +02:00
|
|
|
|
2024-10-20 23:03:17 +02:00
|
|
|
#define H_PARTITION_RESULTS 140 /**< arbitrary */
|
2024-08-23 23:30:39 +02:00
|
|
|
|
2024-09-30 09:10:42 +02:00
|
|
|
void *widget_get_results_box_organize();
|
|
|
|
void *widget_get_results_box_display();
|
|
|
|
void *widget_get_results_box_time ();
|
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-10-14 15:52:00 +02:00
|
|
|
|
|
|
|
/** phantom documentation used to test the functioning of doxygen */
|
|
|
|
|
|
|
|
struct TreeNode_t {
|
|
|
|
gchar *text; /**< *text phantom documentation */
|
|
|
|
struct TreeNode_t
|
|
|
|
*child, /**< *child phantom documentation */
|
|
|
|
*next; /**< *next phantom documentation */
|
|
|
|
};
|
|
|
|
|
2024-09-30 09:10:42 +02:00
|
|
|
struct TreeNode_t *widget_create_user_rules_tree_node (const gchar* text);
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-09-30 21:54:33 +02:00
|
|
|
void widget_add_tree_child_node (struct TreeNode_t *parent, struct TreeNode_t *child); // def: util/tree
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-09-08 22:09:34 +02:00
|
|
|
void *widget_get_user_rules_tree ();
|
|
|
|
// def: widget/rules/tree_tools/labo.c
|
|
|
|
// call: widget/rules/tree_tools/pilot_box.c widget_get_rules_tree_tools()
|
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-09-30 21:54:33 +02:00
|
|
|
char *widget_get_address_text_theory ();
|
|
|
|
char *widget_get_address_text_practice ();
|
|
|
|
char *widget_get_address_text_alpha_index (); // def: widget/topbar/dispatch
|
|
|
|
// call widget/topbar/modal (47))
|
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
|
2024-09-09 08:14:04 +02:00
|
|
|
// def: widget / measure / dispatch.c
|
2024-08-06 16:29:41 +02:00
|
|
|
|
2024-08-06 18:43:15 +02:00
|
|
|
void *widget_measure_new();
|
2024-08-09 11:33:44 +02:00
|
|
|
// La séquence logique à suivre pour créer une nouvelle mesure
|
2024-08-06 18:43:15 +02:00
|
|
|
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 13:09:47 +02:00
|
|
|
void *widget_measure_do_select_a_second_rules_set();
|
|
|
|
void *widget_measure_do_choose_an_event_type();
|
2024-08-09 09:21:04 +02:00
|
|
|
void *widget_measure_do_correlate();
|
|
|
|
void *widget_measure_do_insert_in_measurements_list();
|
|
|
|
void *widget_measure_do_end_creation_of_measurement_process();
|
|
|
|
|
2024-08-09 11:33:44 +02:00
|
|
|
// Les cinq types de mesures possibles
|
2024-08-08 07:21:34 +02:00
|
|
|
void *widget_measure_event_occurences_nb();
|
|
|
|
void *widget_measure_event_occurences_dates();
|
|
|
|
void *widget_measure_event_occurences_situations();
|
|
|
|
void *widget_measure_time_elapsed_between_two_events();
|
|
|
|
void *widget_measure_third_event_occurences_in_between();
|
2024-08-09 09:21:04 +02:00
|
|
|
|