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-21 23:17:01 +02:00
|
|
|
* Signals 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-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-22 15:42:24 +02:00
|
|
|
// void on_auto_notification (const char *message); (see "signal.c")
|
2024-04-22 18:40:30 +02:00
|
|
|
|
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* W I N D O W S */
|
|
|
|
/******************************************************************************/
|
2024-07-01 00:42:25 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/* "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".
|
2024-07-13 07:48:46 +02:00
|
|
|
|
2024-08-04 19:02:00 +02:00
|
|
|
* It is found in [ deprec "init.c" >> now "widget / dispatch.c" ]
|
|
|
|
* where all the various windows are declared as static :
|
2024-07-22 15:42:24 +02:00
|
|
|
* (static GtkWindow *main_window, *dialog_window, *text_window;)
|
|
|
|
* and where are all the functions useful for initiating and designing these windows.
|
2024-07-13 07:48:46 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
* 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);
|
2024-07-13 07:48:46 +02:00
|
|
|
|
2024-07-01 00:42:25 +02:00
|
|
|
|
2024-07-13 07:48:46 +02:00
|
|
|
|
2024-07-01 00:42:25 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* W I D G E T S */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
/* All the callbacks except "on_windows_activation (app)" are in "signal.c" */
|
|
|
|
/* (see details below) */
|
2024-07-20 15:24:32 +02:00
|
|
|
|
2024-07-03 22:30:08 +02:00
|
|
|
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* F I N I T E S T A T E M A C H I N E (fsm) */
|
|
|
|
/******************************************************************************/
|
2024-07-21 12:33:29 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/* { EXEC xor EDIT } and { STATE xor RULES xor DATA } are states of the fsm */
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-24 23:07:14 +02:00
|
|
|
/*************n_objects*****************************************************************/
|
2024-07-22 15:42:24 +02:00
|
|
|
/* D I A L O G W I N D O W */
|
|
|
|
/******************************************************************************/
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
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);
|
2024-07-04 08:04:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* T R E E (in tree.c & rules.c) */
|
|
|
|
/******************************************************************************/
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
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);
|
2024-07-04 08:04:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* G L A R E A (see graphics) */
|
|
|
|
/******************************************************************************/
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
gboolean on_glarea_render (GtkGLArea *area, GdkGLContext *context);
|
|
|
|
void on_glarea_realize (GtkWidget *widget);
|
|
|
|
void on_glarea_unrealize (GtkWidget *widget);
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
|
2024-07-04 08:04:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* M A I N W I N D O W S T A T E P A G E (upper part) */
|
|
|
|
/******************************************************************************/
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-07-23 19:43:21 +02:00
|
|
|
void on_updating_objects_transparencies (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
2024-07-22 15:42:24 +02:00
|
|
|
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
2024-07-04 08:04:58 +02:00
|
|
|
|
2024-08-06 05:25:41 +02:00
|
|
|
void on_resetting_XYZ_in_state_page ();
|
2024-08-06 23:19:45 +02:00
|
|
|
|
2024-08-07 10:40:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* 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_clicked_topbar_right_measure (GtkWidget *btt_measure, gpointer data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* M E A S U R E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data);
|
2024-08-06 23:19:45 +02:00
|
|
|
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);
|
2024-08-07 13:18:58 +02:00
|
|
|
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data);
|
|
|
|
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data);
|