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-22 15:42:24 +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-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-07-22 18:02:14 +02:00
|
|
|
// called in init.c
|
|
|
|
// functions are in topbar.c
|
2024-07-08 07:52:27 +02:00
|
|
|
|
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-22 18:02:14 +02:00
|
|
|
|
|
|
|
// called in topbar.c
|
|
|
|
// functions are in init.c
|
|
|
|
|
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-22 18:02:14 +02:00
|
|
|
// called in signal.c
|
2024-07-08 07:52:27 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
void *widget_get_state_page(); // in : src/widget/state/distrib.c
|
|
|
|
void *widget_get_rules_page(); // in : src/widget/rules.c
|
|
|
|
void *widget_get_stock_page(); // in : src/widget/stock.c
|
2024-07-01 00:42:25 +02:00
|
|
|
|
2024-07-27 12:34:32 +02:00
|
|
|
#define W_IMAGE_LOCAL 1920 / 32 // 1920 x 960 ad hoc (pour mon écran)
|
2024-07-30 03:21:39 +02:00
|
|
|
#define H_IMAGE_LOCAL 800
|
2024-07-22 17:18:40 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* S T A T E */
|
|
|
|
/******************************************************************************/
|
2024-07-27 20:55:50 +02:00
|
|
|
// called in : src/widget/state/distribvoid *widget_get_rule_edit_control().c
|
2024-07-19 23:02:27 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
void *widget_get_space_view(); // middle
|
|
|
|
void *widget_get_graph_view_control(); // middle
|
|
|
|
|
|
|
|
void *widget_get_space_edit_control(); // bottom
|
|
|
|
void *widget_get_sequence_control(); // bottom
|
|
|
|
|
|
|
|
// called in : src/widget/state/top.c
|
2024-07-04 22:29:34 +02:00
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
void widget_reset_all_situations_transparencies_to_value (int value); // top
|
2024-07-26 12:26:24 +02:00
|
|
|
void widget_set_object_transparency_to_value (int rank, int value); // top
|
|
|
|
int widget_get_object_transparency (int i); // top
|
2024-07-22 18:02:14 +02:00
|
|
|
|
2024-07-26 22:18:03 +02:00
|
|
|
|
|
|
|
|
2024-07-27 12:34:32 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* R U L E S */
|
|
|
|
/******************************************************************************/
|
|
|
|
// called in : src/widget/rules/distrib.c
|
|
|
|
|
2024-07-31 05:32:25 +02:00
|
|
|
// Define a structure for the stack
|
|
|
|
#define MAX_SIZE 22
|
|
|
|
typedef struct {
|
|
|
|
// Array to store stack elements
|
|
|
|
GtkWidget *arr[MAX_SIZE];
|
|
|
|
// Index of the top element in the stack
|
|
|
|
int top;
|
|
|
|
} Stack;
|
|
|
|
|
|
|
|
void initialize(Stack *stack);
|
|
|
|
bool isEmpty(Stack *stack);
|
|
|
|
bool isFull(Stack *stack);
|
|
|
|
void push(Stack *stack, GtkWidget *value);
|
|
|
|
GtkWidget *pop(Stack *stack);
|
|
|
|
GtkWidget *peek(Stack *stack);
|
|
|
|
void *push_images_onto_stack();
|
|
|
|
|
2024-07-27 20:55:50 +02:00
|
|
|
void *widget_get_selected_rule();
|
2024-07-30 13:17:16 +02:00
|
|
|
void *widget_get_rules_left_pane();
|
2024-07-27 12:34:32 +02:00
|
|
|
void *widget_get_rules_page();
|
2024-07-30 15:26:01 +02:00
|
|
|
void *widget_get_rule_edit();
|
|
|
|
void *widget_get_rule_analyse();
|
2024-07-30 13:17:16 +02:00
|
|
|
void *widget_get_rules_right_pane();
|
2024-07-29 05:46:10 +02:00
|
|
|
void *widget_get_rules_pilot_box();
|
2024-07-30 15:26:01 +02:00
|
|
|
void *widget_get_rules_tree_tools();
|
|
|
|
void *widget_get_rules_use();
|
2024-07-30 13:17:16 +02:00
|
|
|
void *widget_get_selected_rule_texts();
|
|
|
|
void *widget_get_selected_rule_images();
|
2024-07-27 12:34:32 +02:00
|
|
|
|
|
|
|
|
2024-07-22 18:02:14 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* S T O C K */
|
|
|
|
/******************************************************************************/
|
|
|
|
// in : stock.c
|
|
|
|
// called by topbar.c.widget_design_text_window()
|
|
|
|
|
|
|
|
void *widget_get_stock_text (gchar *text_name);
|
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-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-08 07:52:27 +02:00
|
|
|
|
2024-07-22 15:42:24 +02:00
|
|
|
void *widget_get_user_rules_tree (); // see "labo.c" for specification of the 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
|
|
|
/******************************************************************************/
|
|
|
|
/* T E X T S */
|
|
|
|
/******************************************************************************/
|
2024-07-22 18:02:14 +02:00
|
|
|
// texts in : data / text /
|
|
|
|
// functions in : widget / stock.c
|
|
|
|
// used by text_window (see topbar.c))
|
2024-07-05 10:23:19 +02:00
|
|
|
|
2024-07-21 23:17:01 +02:00
|
|
|
char *widget_get_text_address_theory ();
|
|
|
|
char *widget_get_text_address_about_commands ();
|
|
|
|
char *widget_get_text_address_any ();
|
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-07-31 05:32:25 +02:00
|
|
|
void *get_an_impression_of_what_a_rules_comparator_could_be();
|
|
|
|
void *trying_to_fill_the_rules_comparator_from_stack();
|
2024-07-27 06:10:34 +02:00
|
|
|
|
2024-07-06 08:27:05 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* L A B O */
|
|
|
|
/******************************************************************************/
|
2024-07-22 18:02:14 +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 */
|
|
|
|
/******************************************************************************/
|
|
|
|
|