in widget is a rule directory. It has three files : rules_tree.c selected_rule.c & distrib.c
This commit is contained in:
parent
8c88737028
commit
a70987a860
|
@ -43,7 +43,7 @@ enum fsm_choice_STATE_RULES_DATA { STATE, RULES, DATA }; // xor
|
||||||
enum fsm_choice_STORE_RESTORE_RESET { STORE, RESTORE, RESET }; // xor
|
enum fsm_choice_STORE_RESTORE_RESET { STORE, RESTORE, RESET }; // xor
|
||||||
|
|
||||||
|
|
||||||
#define n_objects 32
|
#define n_objects 32 // arbitrary...
|
||||||
#define n_situations 128
|
#define n_situations 128
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@ void fsm_set_exec_edit (int value);
|
||||||
void fsm_set_state_rules_data (int value);
|
void fsm_set_state_rules_data (int value);
|
||||||
void fsm_set_store_restore_reset (int target, int value);
|
void fsm_set_store_restore_reset (int target, int value);
|
||||||
|
|
||||||
void fsm_reset_all_situations_transparencies_at_value (int value);
|
void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire...
|
||||||
|
|
||||||
bool fsm_get_preferences_state ();
|
bool fsm_get_preferences_state ();
|
||||||
void fsm_set_preferences_state (bool value);
|
void fsm_set_preferences_state (bool value);
|
||||||
|
|
||||||
|
|
|
@ -128,11 +128,6 @@ void on_clicked_search (GtkWidget *btt_menu, gpointer list_box);
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
void on_updating_objects_transparencies (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
void on_updating_objects_transparencies (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
||||||
/*
|
|
||||||
void on_objects_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
|
||||||
void on_objects_box_do_store (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
|
||||||
void on_objects_box_do_restore (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
|
||||||
*/
|
|
||||||
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,8 @@ void *widget_get_state_page(); // in : src/widget/state/distrib.c
|
||||||
void *widget_get_rules_page(); // in : src/widget/rules.c
|
void *widget_get_rules_page(); // in : src/widget/rules.c
|
||||||
void *widget_get_stock_page(); // in : src/widget/stock.c
|
void *widget_get_stock_page(); // in : src/widget/stock.c
|
||||||
|
|
||||||
|
#define W_IMAGE_LOCAL 1920 / 32 // 1920 x 960 ad hoc (pour mon écran)
|
||||||
|
#define H_IMAGE_LOCAL 960
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* S T A T E */
|
/* S T A T E */
|
||||||
|
@ -79,6 +81,16 @@ int widget_get_object_transparency (int i); // top
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* R U L E S */
|
||||||
|
/******************************************************************************/
|
||||||
|
// called in : src/widget/rules/distrib.c
|
||||||
|
|
||||||
|
void *get_the_selected_rule();
|
||||||
|
void *get_rules_tree();
|
||||||
|
void *widget_get_rules_page();
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* S T O C K */
|
/* S T O C K */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* *
|
||||||
|
* Gem-graph client *
|
||||||
|
* *
|
||||||
|
* Rules *
|
||||||
|
* *
|
||||||
|
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
|
||||||
|
* Copyright © 2021 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 published by 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/>. *
|
||||||
|
* *
|
||||||
|
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
|
||||||
|
#include "../../../include/fsm.h"
|
||||||
|
#include "../../../include/widget.h"
|
||||||
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
|
|
||||||
|
void *widget_get_rules_page() {
|
||||||
|
GtkPaned *H_tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
||||||
|
// GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre des règles");
|
||||||
|
// GtkWidget *édition_de_la_règle_sélectionnée_n_1 = gtk_frame_new ("Inspection");
|
||||||
|
gtk_paned_set_start_child (H_tree_vs_selected, GTK_WIDGET (get_rules_tree()));
|
||||||
|
gtk_paned_set_end_child (H_tree_vs_selected, GTK_WIDGET (get_the_selected_rule()));
|
||||||
|
gtk_paned_set_position (H_tree_vs_selected, 400); // WARNING : c'est une position "absolue"
|
||||||
|
gtk_paned_set_wide_handle (H_tree_vs_selected, TRUE);
|
||||||
|
gtk_paned_set_shrink_start_child (H_tree_vs_selected, FALSE);
|
||||||
|
gtk_paned_set_shrink_end_child (H_tree_vs_selected, FALSE);
|
||||||
|
return GTK_WIDGET (H_tree_vs_selected);
|
||||||
|
}
|
||||||
|
|
|
@ -27,26 +27,12 @@
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
|
||||||
#include "../../include/widget.h"
|
#include "../../../include/fsm.h"
|
||||||
|
#include "../../../include/widget.h"
|
||||||
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
#define W_IMAGE_LOCAL 1920 / 32 // 1920 x 960 ad hoc (pour mon écran)
|
|
||||||
#define H_IMAGE_LOCAL 960
|
|
||||||
|
|
||||||
static GtkWidget *rec_selected_rules_vpaned_new() {
|
void *get_rules_tree(){
|
||||||
|
|
||||||
GtkBox *bottom_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (gtk_picture_new_for_filename
|
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png")));
|
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (gtk_picture_new_for_filename
|
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/ADP.png")));
|
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (bottom_box), W_IMAGE_LOCAL, H_IMAGE_LOCAL);
|
|
||||||
|
|
||||||
return GTK_WIDGET (bottom_box);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkWidget *rec_rules_tree_hpaned_new(){
|
|
||||||
GtkPaned *H_tree_vs_comparison = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
GtkPaned *H_tree_vs_comparison = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
||||||
|
|
||||||
// GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre");
|
// GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre");
|
||||||
|
@ -64,16 +50,3 @@ static GtkWidget *rec_rules_tree_hpaned_new(){
|
||||||
return GTK_WIDGET (H_tree_vs_comparison);
|
return GTK_WIDGET (H_tree_vs_comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *widget_get_rules_page() {
|
|
||||||
GtkPaned *H_tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
|
||||||
// GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre des règles");
|
|
||||||
// GtkWidget *édition_de_la_règle_sélectionnée_n_1 = gtk_frame_new ("Inspection");
|
|
||||||
gtk_paned_set_start_child (H_tree_vs_selected, GTK_WIDGET (rec_rules_tree_hpaned_new()));
|
|
||||||
gtk_paned_set_end_child (H_tree_vs_selected, GTK_WIDGET (rec_selected_rules_vpaned_new()));
|
|
||||||
gtk_paned_set_position (H_tree_vs_selected, 400); // WARNING : c'est une position "absolue"
|
|
||||||
gtk_paned_set_wide_handle (H_tree_vs_selected, TRUE);
|
|
||||||
gtk_paned_set_shrink_start_child (H_tree_vs_selected, FALSE);
|
|
||||||
gtk_paned_set_shrink_end_child (H_tree_vs_selected, FALSE);
|
|
||||||
return GTK_WIDGET (H_tree_vs_selected);
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* *
|
||||||
|
* Gem-graph client *
|
||||||
|
* *
|
||||||
|
* Rules *
|
||||||
|
* *
|
||||||
|
* Copyright © 2021 Libre en Communs <contact@a-lec.org> *
|
||||||
|
* Copyright © 2021 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 published by 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/>. *
|
||||||
|
* *
|
||||||
|
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
|
||||||
|
#include "../../../include/fsm.h"
|
||||||
|
#include "../../../include/widget.h"
|
||||||
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
|
|
||||||
|
void *get_the_selected_rule() {
|
||||||
|
|
||||||
|
GtkBox *bottom_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
|
gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
|
gtk_box_append (bottom_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png")));
|
||||||
|
gtk_box_append (bottom_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
|
gtk_box_append (bottom_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/ADP.png")));
|
||||||
|
gtk_widget_set_size_request (GTK_WIDGET (bottom_box), W_IMAGE_LOCAL, H_IMAGE_LOCAL);
|
||||||
|
|
||||||
|
return GTK_WIDGET (bottom_box);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue