169 lines
8.2 KiB
C
169 lines
8.2 KiB
C
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
* Gem-graph client *
|
|
* Events management header *
|
|
* *
|
|
* 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 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 <http://www.gnu.org/licenses/>. *
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
#pragma once
|
|
#include <gtk-4.0/gtk/gtk.h>
|
|
|
|
|
|
// void on_auto_notification (char *message); (see "signal.c")
|
|
|
|
|
|
/******************************************************************************/
|
|
/* W I N D O W S */
|
|
/******************************************************************************/
|
|
|
|
/* "on_windows_activation (app)" is the only function called by "main.c" using :
|
|
* g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL);
|
|
* and the only signal function outside "signals.c".
|
|
|
|
* It is found in [ deprec "init.c" >> now "widget / dispatch.c" ]
|
|
* where all the various windows are declared as static :
|
|
* (static GtkWindow *main_window, *dialog_window, *text_window;)
|
|
* and where are all the functions useful for initiating and designing these windows.
|
|
|
|
* It is called only once in "main.c" and nowhere else.
|
|
*
|
|
* It creates all the windows, using for each of them
|
|
* 1) the "gtk_application_window_new (app)" and
|
|
* 2) a specific "widget_design_name_of_the_window() function
|
|
* which is in "topbar.c" (last one) (see widget.h)
|
|
*/
|
|
void on_windows_activation (GtkApplication *app);
|
|
void on_windows_startup (GtkApplication *app);
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* W I D G E T S */
|
|
/******************************************************************************/
|
|
|
|
/* All the callbacks except "on_windows_activation (app)" are in "signal.c" */
|
|
/* (see details below) */
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* F I N I T E S T A T E M A C H I N E (fsm) */
|
|
/******************************************************************************/
|
|
|
|
/* { EXEC xor EDIT } and { SYNTH xor STATE xor RULES xor DATA }
|
|
* are states of the fsm */
|
|
|
|
void on_toggle_exec_edit (GtkWidget *btt_XOR_EXEC_EDIT, gpointer user_data);
|
|
void on_toggle_state_rules_data (GtkWidget *btt_STATE_RULES_DATA, gpointer user_data);
|
|
// void on_toggle_model_run_stop (GtkWidget *btt_MODEL_RUN_STOP, gpointer data);
|
|
|
|
|
|
|
|
/*************n_objects*****************************************************************/
|
|
/* D I A L O G W I N D O W */
|
|
/******************************************************************************/
|
|
|
|
void on_save_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data);
|
|
void on_discard_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data);
|
|
void on_write_current_model (GtkWidget *btt_WRITE_CURRENT_MODEL, gpointer data);
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* T R E E (in tree.c & rules.c) */
|
|
/******************************************************************************/
|
|
|
|
void on_setup_user_tree_factory (GtkSignalListItemFactory *factory,
|
|
GObject* object, gpointer user_data);
|
|
void on_bind_user_tree_factory (GtkSignalListItemFactory *factory,
|
|
GObject* object, gpointer user_data);
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* G L A R E A (see graphics) */
|
|
/******************************************************************************/
|
|
|
|
gboolean on_glarea_render (GtkGLArea *area, GdkGLContext *context);
|
|
void on_glarea_realize (GtkWidget *widget);
|
|
void on_glarea_unrealize (GtkWidget *widget);
|
|
|
|
void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* M A I N W I N D O W S T A T E P A G E (upper part) */
|
|
/******************************************************************************/
|
|
|
|
void on_updating_objects_transparencies (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
|
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
|
|
|
void on_resetting_XYZ_in_state_page ();
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* M A I N W I N D O W T O P B A R */
|
|
/******************************************************************************/
|
|
|
|
void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data);
|
|
void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box);
|
|
void on_topbar_right_measure_clicked (GtkWidget *btt_measure, gpointer data);
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
/* M E A S U R E S */
|
|
/******************************************************************************/
|
|
|
|
// access functions
|
|
void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data);
|
|
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);
|
|
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data);
|
|
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data);
|
|
void on_select_a_second_rules_set (GtkWidget *btt, gpointer data);
|
|
|
|
// measurement triggers
|
|
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data);
|
|
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data);
|
|
void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data);
|
|
void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data);
|
|
void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data);
|
|
|
|
// correlate ?
|
|
void on_select_a_second_measurement (GtkWidget *btt, gpointer data);
|
|
void on_skip_this_step (GtkWidget *btt, gpointer data);
|
|
void on_something_else (GtkWidget *btt, gpointer data);
|
|
void on_closing_page (GtkWidget *btt, gpointer data);
|
|
|
|
void on_start_new_engine (GtkWidget *btt, gpointer data);
|
|
|
|
|
|
/******************************************************************************/
|
|
/* R U L E S */
|
|
/******************************************************************************/
|
|
|
|
void on_entry_name_insert_after (GtkWidget *entry, gpointer data);
|
|
void on_entry_name_delete_after (GtkWidget *entry, gpointer data);
|