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-04 08:04:58 +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-20 15:24:32 +02:00
|
|
|
#define n_objects 32
|
2024-07-20 19:20:01 +02:00
|
|
|
#define n_situations 128
|
2024-07-20 15:24:32 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* W I N D O W S */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-07-20 19:04:08 +02:00
|
|
|
void widget_create_windows (GtkApplication *app);
|
|
|
|
|
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-21 12:33:29 +02:00
|
|
|
void *widget_get_main_window();
|
|
|
|
void *widget_get_dialog_window();
|
|
|
|
void *widget_get_text_window();
|
2024-07-02 17:59:43 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* W I D G E T S */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-07-20 15:24:32 +02:00
|
|
|
GtkWidget *widget_rec_state_page();
|
|
|
|
GtkWidget *widget_rec_rules_page();
|
|
|
|
GtkWidget *widget_rec_stock_page();
|
2024-07-01 00:42:25 +02:00
|
|
|
|
2024-07-20 19:04:08 +02:00
|
|
|
void reset_all_objects_transparencies_to_value (int value);
|
|
|
|
void reset_all_situations_transparencies_to_value (int value);
|
2024-07-19 23:02:27 +02:00
|
|
|
|
2024-07-20 15:24:32 +02:00
|
|
|
GtkWidget *widget_rec_stock_text (gchar *text_name);
|
2024-07-04 22:29:34 +02:00
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-13 07:48:46 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* M E N U */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
struct MenuNode_t {gchar *text; struct MenuNode_t *child, *next;};
|
2024-07-18 23:51:04 +02:00
|
|
|
struct MenuNode_t *widget_create_user_menu_node (const gchar* text);
|
2024-07-13 07:48:46 +02:00
|
|
|
|
2024-07-18 23:51:04 +02:00
|
|
|
GtkWidget *widget_rec_menu_anchor();
|
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-13 19:31:25 +02:00
|
|
|
void labo_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_t *tree_root);
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-18 23:51:04 +02:00
|
|
|
GtkScrolledWindow *widget_rec_user_rules_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
|
|
|
/******************************************************************************/
|
|
|
|
/* I M A G E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
// images are in : data / image /
|
|
|
|
|
2024-07-18 23:51:04 +02:00
|
|
|
GtkWidget *widget_rec_image_E_coli();
|
|
|
|
GtkWidget *widget_rec_image_GLUTAMATE();
|
|
|
|
GtkWidget *widget_rec_image_GLUTAMINE();
|
|
|
|
GtkWidget *widget_rec_image_ATP();
|
|
|
|
GtkWidget *widget_rec_image_AMP();
|
2024-07-05 10:23:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* T E X T S */
|
|
|
|
/******************************************************************************/
|
|
|
|
// texts are in : data / text /
|
|
|
|
|
2024-07-20 15:24:32 +02:00
|
|
|
gchar *widget_rec_text_address_theory ();
|
|
|
|
gchar *widget_rec_text_address_about_commands ();
|
|
|
|
gchar *widget_rec_text_address_any ();
|
2024-07-04 08:04:58 +02:00
|
|
|
|
|
|
|
|
2024-07-06 08:27:05 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* L A B O */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
2024-07-08 07:52:27 +02:00
|
|
|
void learning_how_to_create_a_menu (GtkMenuButton* menu_button);
|
2024-07-13 19:31:25 +02:00
|
|
|
void labo_create_a_simple_gtk_string_list ();
|
2024-07-06 08:27:05 +02:00
|
|
|
|