/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Gem-graph client * * Widgets management header * * * * Copyright © 2021 Libre en Communs * * Copyright © 2024 Jean Sirmai * * * * 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 publishedby 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 . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #pragma once #include /******************************************************************************/ /* W I N D O W S */ /******************************************************************************/ #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) #define H_TEXT_WINDOW H_MY_SCREEN // 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(); // 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, GtkApplication *app); 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 */ /******************************************************************************/ #define W_TREE 160 #define W_DO_UNDO_REDO_BOX 1300 #define W_XYZ_BOX 62 #define H_XYZ_BOX 200 #define H_E_COLI 760 #define H_OBJECTS_SITUATIONS 130 #define W_COMPARATOR 64 #define W_RULES_USE 90 #define W_IMAGE_800 800 #define W_IMAGE_100 100 /******************************************************************************/ /* T O P B A R */ /******************************************************************************/ // called in widget / topbar / dispatch.c / widget_design_main_window() // defined in topbar / left.c const char *widget_get_btt_synth_label(); const char *widget_get_btt_state_label(); const char *widget_get_btt_rules_label(); const char *widget_get_btt_data_label(); // called in widget / topbar / dispatch.c / widget_design_main_window() // defined in widget / topbar / left.c // - widget / topbar / right.c void window_design_topbar_left (GtkWidget *header_bar); void window_design_topbar_right (GtkWidget *header_bar, GtkApplication *app); // called in signal.c / fsm_get_state_rules_data() // defined in widget / synth / dispatch.c // - widget / state / dispatch.c // - widgetvoid on_windows_activation (GtkApplication *app) / rules / dispatch.c // - widget / data / dispatch.c // - widget / measure / 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_data_page(); // in : widget / data / dispatch.c void *widget_get_measure_page();// in : widget / measure / dispatch.c void *widget_get_engine_page(); // in : fsm / engine / engine.c /* 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 */ #define ALL_VS_SELECTED 340 /******************************************************************************/ /* S Y N T H */ /******************************************************************************/ // call: widget / synth / dispatch.c / widget_get_synth_page() // def: widget / synth / time.c // repartitions.c WIP // correlations.c WIP #define H_PARTITION_SYNTH 1600 #define W_PARTITION_SYNTH 400 void *widget_get_time_dependent_results_and_time_controls(); // *widget_get_space_vs_non_time_dependent_analysis(); WIP // *widget_get_non_time_dependent_analysis_elements(); WIP /******************************************************************************/ /* S T A T E */ /******************************************************************************/ // call: widget / state / dispatch.c / widget_get_state_page() // def: widget / state / middle // def: widget / state / bottom #define PARTITION_STATE_TOP 600 #define PARTITION_SPACE_VS_CONTROLS_1 920 #define PARTITION_SPACE_VS_CONTROLS_2 800 #define PARTITION_SPACE_VS_CAMERA_IN_STATE 1850 #define PARTITION_SPACE_VS_CAMERA_IN_SYNTH 1560 void *widget_get_space_view (int partition_space_vs_camera); // middle void *widget_get_graph_view_control(); // middle void *widget_get_space_edit_control(); // bottom void *widget_get_sequence_control(); // bottom // call: widget / state / top.c / get_situations_box() // call: prefer.c // def: widget / state / top.c void widget_reset_all_situations_transparencies_at_value (int value); // top void widget_set_object_transparency_at_value (int rank, int value); // top int widget_get_object_transparency (int i); // top // call: signal.c // def: widget / state / middle void widget_state_XYZ_reset_all(); /******************************************************************************/ /* A L L R U L E S */ /******************************************************************************/ /******************************************************************************/ /* O N E R U L E */ /******************************************************************************/ // call: widget / rules / dispatch.c / widget_get_rules_page() // def: widget / rules / tree_tools / dispatch.c (= left) // def: widget / rules / selected / dispatch.c (= right) #define LIST_W 190 #define LIST_H 114 void *widget_get_all_rules_left_pane(); void *widget_get_selected_rule_right_pane(); void *widget_get_geometry_algebra(); // call: widget / rules / tree_tools / dispatch.c / widget_get_all_rules_left_pane() // def: widget / rules / tree_tools / pilot_box.c // def: 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 // call: widget / rules / selected / dispatch.c / widget_get_one_rule_right_pane() // def: widget / rules / selected / dispatch.c // def: widget / rules / selected / edit.c // def: widget / rules / selected / enquire.c void *widget_get_selected_rule(); // dispatch.c void *widget_get_rule_edit(); // edit.c void *widget_get_rule_enquire(); // enquire.c // call: widget / rules / selected / dispatch.c / widget_get_selected_rule() // def: widget / rules / selected / text.c // def: widget / rules / selected / image.c void *widget_get_selected_rule_algebra(); void *widget_get_selected_rule_geometry(); void *widget_get_btt_conditions_list(); void *widget_get_btt_assignations_list(); void *widget_get_btt_rule_identity(); // def: widget / rules / selected / wip_menu.c GtkEntry widget_set_item_text (GtkWidget *list_box, const char *text, bool editable); void *widget_get_selected_rule_camera(); void *widget_get_selected_rule_before_after(); /******************************************************************************/ /* D A T A */ /******************************************************************************/ // call: widget / results / dispatch / widget_get_data_page() // def: widget / results / organize.c // display.c #define H_PARTITION_RESULTS 140 void *widget_get_organize_results_box(); void *widget_get_display_results_box(); void *widget_get_time_results_box (); /******************************************************************************/ /* T R E E */ /******************************************************************************/ //struct slist {gchar *text; struct slist *child;}; struct TreeNode_t {gchar *text; struct TreeNode_t *child, *next;}; struct TreeNode_t *widget_create_user_tree_node (const gchar* text); void widget_add_child_node (struct TreeNode_t *parent, struct TreeNode_t *child); 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() /******************************************************************************/ /* T E X T S */ /******************************************************************************/ // called by : widget / topbar / polytext.c // texts in : data / text void *widget_get_text_from_address (gchar *text_name); char *widget_get_text_address_theory (); char *widget_get_text_address_practice (); /******************************************************************************/ /* I M A G E S */ /******************************************************************************/ // images in : data / image / // used by : widget / rules.c void *widget_get_an_impression_of_what_a_rules_comparator_could_be(); /******************************************************************************/ /* L A B O */ /******************************************************************************/ // now in : widget / rules / tree_tools // called by tree.c / widget_get_user_rules_tree() void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_t *tree_root); /******************************************************************************/ /* M E N U */ /******************************************************************************/ /******************************************************************************/ /* M E A S U R E S */ /******************************************************************************/ // called by : signal.c // def: widget / measure / dispatch.c void *widget_measure_new(); // La séquence logique à suivre pour créer une nouvelle mesure void *widget_measure_do_select_rules_first(); 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(); void *widget_measure_do_select_a_second_rules_set(); void *widget_measure_do_choose_an_event_type(); void *widget_measure_do_correlate(); void *widget_measure_do_insert_in_measurements_list(); void *widget_measure_do_end_creation_of_measurement_process(); // Les cinq types de mesures possibles 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();