Organizing widget directories and files (a dispatcher in each dir)
This commit is contained in:
parent
7998a8426d
commit
c20715b3d4
|
@ -89,11 +89,12 @@ int widget_get_object_transparency (int i); // top
|
|||
void *widget_get_selected_rule();
|
||||
void *widget_get_rules_left_pane();
|
||||
void *widget_get_rules_page();
|
||||
void *widget_get_rule_edit_controls();
|
||||
void *widget_get_rule_explore_controls();
|
||||
void *widget_get_rule_edit();
|
||||
void *widget_get_rule_analyse();
|
||||
void *widget_get_rules_right_pane();
|
||||
void *widget_get_rules_pilot_box();
|
||||
void *widget_get_rules_tree();
|
||||
void *widget_get_rules_tree_tools();
|
||||
void *widget_get_rules_use();
|
||||
void *widget_get_selected_rule_texts();
|
||||
void *widget_get_selected_rule_images();
|
||||
|
||||
|
|
|
@ -32,16 +32,16 @@
|
|||
#include "../../../include/signal.h"
|
||||
|
||||
|
||||
void *widget_get_rules_pilot_box ()
|
||||
void *widget_get_rules_page()
|
||||
{
|
||||
GtkBox *rules_pilot_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
GtkButton *btt_show_rules_use = GTK_BUTTON (gtk_button_new ());
|
||||
gtk_button_set_icon_name (btt_show_rules_use, "go-home-symbolic");
|
||||
// g_signal_connect (btt_show_rules_use, "clicked", G_CALLBACK (on_show_rules_use), no_local_data);
|
||||
gtk_box_append (rules_pilot_box, GTK_BUTTON (btt_show_rules_use));
|
||||
GtkPaned *tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
gtk_paned_set_start_child (tree_vs_selected, GTK_WIDGET (widget_get_rules_left_pane()));
|
||||
gtk_paned_set_end_child (tree_vs_selected, GTK_WIDGET (widget_get_rules_right_pane()));
|
||||
gtk_paned_set_position (tree_vs_selected, 340); // WARNING : c'est une position "absolue"
|
||||
gtk_paned_set_wide_handle (tree_vs_selected, TRUE);
|
||||
gtk_paned_set_shrink_start_child (tree_vs_selected, FALSE);
|
||||
gtk_paned_set_shrink_end_child (tree_vs_selected, FALSE);
|
||||
|
||||
// gtk_box_append (rules_pilot_box,
|
||||
// GTK_WIDGET (gtk_label_new ("\n - - - - - - - (some widgets here) - - - - - - - \n")));
|
||||
return rules_pilot_box;
|
||||
return GTK_WIDGET (tree_vs_selected);
|
||||
}
|
||||
|
|
@ -1,212 +0,0 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* 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"
|
||||
|
||||
|
||||
static void *get_btt_conditions_list()
|
||||
{
|
||||
GtkWidget* list_box = gtk_list_box_new();
|
||||
GtkWidget *label_A = GTK_WIDGET (gtk_label_new("if (value (0,0,1,3) == 2)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_A);
|
||||
GtkWidget *label_B = GTK_WIDGET (gtk_label_new("if (value (0,1,1,0) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_B);
|
||||
GtkWidget *label_C = GTK_WIDGET (gtk_label_new("if (value (0,1,1,2) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_C);
|
||||
GtkWidget *label_D = GTK_WIDGET (gtk_label_new("if (value (1,0,1,2) == 1)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_D);
|
||||
GtkWidget *label_E = GTK_WIDGET (gtk_label_new("if (value (1,1,1,0) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_E);
|
||||
|
||||
|
||||
GtkWidget *pop = gtk_popover_new ();
|
||||
gtk_popover_set_child (GTK_POPOVER (pop), list_box);
|
||||
gtk_popover_present (GTK_POPOVER (pop));
|
||||
gtk_popover_set_autohide (GTK_POPOVER (pop), FALSE);
|
||||
gtk_popover_set_cascade_popdown (GTK_POPOVER (pop), TRUE);
|
||||
|
||||
GtkMenuButton *conditions = GTK_MENU_BUTTON (gtk_menu_button_new ());
|
||||
gtk_menu_button_set_label (GTK_MENU_BUTTON (conditions), "conditions");
|
||||
gtk_menu_button_set_always_show_arrow (conditions, TRUE);
|
||||
gtk_menu_button_set_popover (conditions, GTK_WIDGET (pop));
|
||||
// gtk_widget_set_halign (GTK_WIDGET (conditions), GTK_ALIGN_START);
|
||||
|
||||
return conditions;
|
||||
}
|
||||
|
||||
static void *get_btt_assign_list()
|
||||
{
|
||||
GtkWidget* list_box = gtk_list_box_new();
|
||||
GtkWidget *label_A = GTK_WIDGET (gtk_label_new("value (0,0,1,3) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_A);
|
||||
GtkWidget *label_B = GTK_WIDGET (gtk_label_new("value (0,1,1,0) == 2)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_B);
|
||||
GtkWidget *label_C = GTK_WIDGET (gtk_label_new("value (0,1,1,2) == 1)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_C);
|
||||
GtkWidget *label_D = GTK_WIDGET (gtk_label_new("value (1,0,1,2) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_D);
|
||||
GtkWidget *label_E = GTK_WIDGET (gtk_label_new("value (1,1,1,0) == 2)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_E);
|
||||
|
||||
GtkWidget *pop = gtk_popover_new ();
|
||||
gtk_popover_set_child (GTK_POPOVER (pop), list_box);
|
||||
gtk_popover_present (GTK_POPOVER (pop));
|
||||
gtk_popover_set_autohide (GTK_POPOVER (pop), FALSE);
|
||||
gtk_popover_set_cascade_popdown (GTK_POPOVER (pop), TRUE);
|
||||
|
||||
GtkMenuButton *actions = GTK_MENU_BUTTON (gtk_menu_button_new ());
|
||||
gtk_menu_button_set_label (GTK_MENU_BUTTON (actions), "actions");
|
||||
gtk_menu_button_set_always_show_arrow (actions, TRUE);
|
||||
gtk_menu_button_set_popover (actions, GTK_WIDGET (pop));
|
||||
// gtk_widget_set_halign (GTK_WIDGET (actions), GTK_ALIGN_START);
|
||||
|
||||
return actions;
|
||||
}
|
||||
|
||||
static void *get_btt_rule_identity()
|
||||
{
|
||||
GtkWidget* list_box = gtk_list_box_new();
|
||||
GtkWidget *label_A = GTK_WIDGET (gtk_label_new("AMP > ADP")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_A);
|
||||
GtkWidget *label_B = GTK_WIDGET (gtk_label_new("AMP-activated protein kinase")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_B);
|
||||
GtkWidget *label_C = GTK_WIDGET (gtk_label_new("date")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_C);
|
||||
GtkWidget *label_D = GTK_WIDGET (gtk_label_new("author")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_D);
|
||||
GtkWidget *label_E = GTK_WIDGET (gtk_label_new("status, activity")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_E);
|
||||
GtkWidget *label_F = GTK_WIDGET (gtk_label_new("links to other rules")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_F);
|
||||
|
||||
GtkWidget *pop = gtk_popover_new ();
|
||||
gtk_popover_set_child (GTK_POPOVER (pop), list_box);
|
||||
gtk_popover_present (GTK_POPOVER (pop));
|
||||
gtk_popover_set_autohide (GTK_POPOVER (pop), FALSE);
|
||||
gtk_popover_set_cascade_popdown (GTK_POPOVER (pop), TRUE);
|
||||
|
||||
GtkMenuButton *identity = GTK_MENU_BUTTON (gtk_menu_button_new ());
|
||||
gtk_menu_button_set_label (GTK_MENU_BUTTON (identity), "identity");
|
||||
gtk_menu_button_set_always_show_arrow (identity, TRUE);
|
||||
gtk_menu_button_set_popover (identity, GTK_WIDGET (pop));
|
||||
// gtk_widget_set_halign (GTK_WIDGET (identity), GTK_ALIGN_START);
|
||||
|
||||
return identity;
|
||||
}
|
||||
|
||||
static void *get_conditions_actions_names_box()
|
||||
{
|
||||
GtkWidget *label_ad_hoc = GTK_WIDGET (gtk_label_new (\
|
||||
" "));
|
||||
GtkBox *conditions_actions_names_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
GtkLayoutManager *conditions_actions_identity_layout = gtk_box_layout_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_widget_set_layout_manager (GTK_WIDGET (conditions_actions_names_box),
|
||||
GTK_LAYOUT_MANAGER (conditions_actions_identity_layout));
|
||||
gtk_box_layout_set_spacing (GTK_BOX_LAYOUT (conditions_actions_identity_layout), 180);
|
||||
// allocate (GTK_LAYOUT_MANAGER (conditions_actions_identity_layout), get_btt_conditions_list (), 100, 20,100); TODO
|
||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (label_ad_hoc));
|
||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (get_btt_conditions_list ()));
|
||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (get_btt_assign_list()));
|
||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (get_btt_rule_identity()));
|
||||
return GTK_WIDGET (conditions_actions_names_box);
|
||||
}
|
||||
|
||||
|
||||
static void *get_rule_before()
|
||||
{
|
||||
GtkWidget *rule_before = GTK_WIDGET (gtk_picture_new_for_filename \
|
||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png"));
|
||||
gtk_widget_set_size_request (GTK_WIDGET (rule_before), 0, H_IMAGE_LOCAL);
|
||||
return GTK_WIDGET (rule_before);
|
||||
}
|
||||
|
||||
static void *get_rule_after()
|
||||
{
|
||||
GtkWidget *rule_after = 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 (rule_after), 0, H_IMAGE_LOCAL);
|
||||
return GTK_WIDGET (rule_after);
|
||||
}
|
||||
|
||||
|
||||
static GtkBox *rec_XYZ_box()
|
||||
{
|
||||
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
||||
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
// GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
|
||||
// (double min, double max, double step, const char** icons)
|
||||
GtkAdjustment *X_adjust = gtk_adjustment_new (rand() % 100, 0, 380, 1, 0, 0);
|
||||
GtkAdjustment *Y_adjust = gtk_adjustment_new (rand() % 200, 0, 380, 1, 0, 0);
|
||||
GtkAdjustment *Z_adjust = gtk_adjustment_new (rand() % 300, 0, 380, 1, 0, 0);
|
||||
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
||||
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
||||
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
||||
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, 400);
|
||||
|
||||
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
||||
gtk_box_append (XYZ_scrollbar_box, scroll_Y);
|
||||
gtk_box_append (XYZ_scrollbar_box, scroll_Z);
|
||||
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||
|
||||
GtkWidget *btt_reset = gtk_toggle_button_new ();
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("\nX Y Z")));
|
||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (XYZ_scrollbar_box));
|
||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (btt_reset));
|
||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
||||
return XYZ_labels_box;
|
||||
}
|
||||
|
||||
static GtkBox *rec_ZOOM_box()
|
||||
{
|
||||
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
||||
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
||||
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
||||
gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80);
|
||||
gtk_box_append (ZOOM_box, ZOOM_Label);
|
||||
return ZOOM_box;
|
||||
}
|
||||
|
||||
|
||||
void *widget_get_selected_rule_images() {
|
||||
|
||||
GtkBox *right_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (right_box, GTK_WIDGET (rec_XYZ_box()));
|
||||
gtk_box_append (right_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (right_box, GTK_WIDGET (rec_ZOOM_box()));
|
||||
|
||||
GtkBox *before_vs_after = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (get_rule_before ()));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (get_rule_after ()));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (right_box));
|
||||
|
||||
return GTK_WIDGET (before_vs_after);
|
||||
}
|
||||
|
||||
|
||||
void *widget_get_selected_rule() {
|
||||
|
||||
GtkBox *images_and_texts = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_images ()));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (get_conditions_actions_names_box ()));
|
||||
|
||||
return GTK_WIDGET (images_and_texts);
|
||||
}
|
||||
|
|
@ -32,13 +32,11 @@
|
|||
#include "../../../../include/signal.h"
|
||||
|
||||
|
||||
void *widget_get_selected_rule() {
|
||||
|
||||
GtkBox *images_and_texts = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_images ()));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_texts ()));
|
||||
|
||||
return GTK_WIDGET (images_and_texts);
|
||||
void *widget_get_rule_analyse()
|
||||
{
|
||||
return gtk_label_new ("________________\n RULE ANALYSIS\n\
|
||||
controls\n'''''''''''''''''''''''''''''");
|
||||
}
|
||||
|
||||
|
|
@ -27,21 +27,19 @@
|
|||
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
#include "../../../include/fsm.h"
|
||||
#include "../../../include/widget.h"
|
||||
#include "../../../include/signal.h"
|
||||
#include "../../../../include/fsm.h"
|
||||
#include "../../../../include/widget.h"
|
||||
#include "../../../../include/signal.h"
|
||||
|
||||
|
||||
void *widget_get_rule_explore_controls()
|
||||
{
|
||||
return gtk_label_new ("________________\n RULE EXPLORE\n\
|
||||
controls\n'''''''''''''''''''''''''''''");
|
||||
}
|
||||
void *widget_get_selected_rule() {
|
||||
|
||||
void *widget_get_rule_edit_controls()
|
||||
{
|
||||
return gtk_label_new
|
||||
("___________\n RULE EDIT\n controls\n''''''''''''''''''''");
|
||||
GtkBox *images_and_texts = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_images ()));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_texts ()));
|
||||
|
||||
return GTK_WIDGET (images_and_texts);
|
||||
}
|
||||
|
||||
void *widget_get_rules_right_pane()
|
||||
|
@ -49,9 +47,9 @@ void *widget_get_rules_right_pane()
|
|||
GtkPaned *rule_itself_vs_explore_edit_pane = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_VERTICAL));
|
||||
gtk_paned_set_start_child (rule_itself_vs_explore_edit_pane, GTK_WIDGET (widget_get_selected_rule()));
|
||||
if (fsm_get_exec_edit()) gtk_paned_set_end_child (rule_itself_vs_explore_edit_pane,
|
||||
GTK_WIDGET (widget_get_rule_edit_controls()));
|
||||
GTK_WIDGET (widget_get_rule_edit()));
|
||||
else gtk_paned_set_end_child (rule_itself_vs_explore_edit_pane,
|
||||
GTK_WIDGET (widget_get_rule_explore_controls()));
|
||||
GTK_WIDGET (widget_get_rule_analyse()));
|
||||
gtk_paned_set_position (rule_itself_vs_explore_edit_pane, 640); // WARNING : c'est une position "absolue"
|
||||
gtk_paned_set_wide_handle (rule_itself_vs_explore_edit_pane, TRUE);
|
||||
gtk_paned_set_shrink_start_child (rule_itself_vs_explore_edit_pane, FALSE);
|
||||
|
@ -60,41 +58,4 @@ void *widget_get_rules_right_pane()
|
|||
return GTK_WIDGET (rule_itself_vs_explore_edit_pane);
|
||||
}
|
||||
|
||||
void *widget_get_rules_pilot_box ()
|
||||
{
|
||||
GtkBox *rules_pilot_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
GtkButton *btt_show_rules_use = GTK_BUTTON (gtk_button_new_with_label ("rules use"));
|
||||
// gtk_button_set_icon_name (btt_show_rules_use, "any-symbolic");
|
||||
// g_signal_connect (btt_show_rules_use, "clicked", G_CALLBACK (on_show_rules_use), no_local_data);
|
||||
GtkButton *btt_show_rules_comparator = GTK_BUTTON (gtk_button_new_with_label ("comparator"));
|
||||
GtkButton *btt_expand_tree = GTK_BUTTON (gtk_button_new_with_label ("tree"));
|
||||
|
||||
gtk_box_append (rules_pilot_box, GTK_WIDGET (btt_expand_tree));
|
||||
gtk_box_append (rules_pilot_box, GTK_WIDGET (btt_show_rules_use));
|
||||
gtk_box_append (rules_pilot_box, GTK_WIDGET (btt_show_rules_comparator));
|
||||
return rules_pilot_box;
|
||||
}
|
||||
|
||||
void *widget_get_rules_left_pane ()
|
||||
{
|
||||
GtkBox *rules_tree_and_pilot_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (rules_tree_and_pilot_box, GTK_WIDGET (widget_get_rules_pilot_box ()));
|
||||
// TODO non static génère une erreur : "référence indéfinie" <> a linkage pb ? see Makefile ?
|
||||
gtk_box_append (rules_tree_and_pilot_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (rules_tree_and_pilot_box, GTK_WIDGET (widget_get_rules_tree ()));
|
||||
return rules_tree_and_pilot_box;
|
||||
}
|
||||
|
||||
void *widget_get_rules_page()
|
||||
{
|
||||
GtkPaned *tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
gtk_paned_set_start_child (tree_vs_selected, GTK_WIDGET (widget_get_rules_left_pane()));
|
||||
gtk_paned_set_end_child (tree_vs_selected, GTK_WIDGET (widget_get_rules_right_pane()));
|
||||
gtk_paned_set_position (tree_vs_selected, 340); // WARNING : c'est une position "absolue"
|
||||
gtk_paned_set_wide_handle (tree_vs_selected, TRUE);
|
||||
gtk_paned_set_shrink_start_child (tree_vs_selected, FALSE);
|
||||
gtk_paned_set_shrink_end_child (tree_vs_selected, FALSE);
|
||||
|
||||
return GTK_WIDGET (tree_vs_selected);
|
||||
}
|
||||
|
|
@ -27,22 +27,15 @@
|
|||
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
#include "../../../include/fsm.h"
|
||||
#include "../../../include/widget.h"
|
||||
#include "../../../include/signal.h"
|
||||
#include "../../../../include/fsm.h"
|
||||
#include "../../../../include/widget.h"
|
||||
#include "../../../../include/signal.h"
|
||||
|
||||
|
||||
/*
|
||||
void *widget_get_rule_explore_controls()
|
||||
{
|
||||
return gtk_label_new ("________________\n RULE EXPLORE\n\
|
||||
controls\n'''''''''''''''''''''''''''''");
|
||||
}
|
||||
|
||||
void *widget_get_rule_edit_controls()
|
||||
void *widget_get_rule_edit()
|
||||
{
|
||||
return gtk_label_new
|
||||
("___________\n RULE EDIT\n controls\n''''''''''''''''''''");
|
||||
}
|
||||
*/
|
||||
|
|
@ -92,11 +92,13 @@ static GtkBox *rec_ZOOM_box()
|
|||
|
||||
void *widget_get_selected_rule_images() {
|
||||
|
||||
// - - - - - - - - - - - - C A M E R A - - - - - - - - - - - - - - //
|
||||
GtkBox *right_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (right_box, GTK_WIDGET (rec_XYZ_box()));
|
||||
gtk_box_append (right_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (right_box, GTK_WIDGET (rec_ZOOM_box()));
|
||||
|
||||
// - - - - - - - - - - - - I M A G E S - - - - - - - - - - - - - - //
|
||||
GtkBox *before_vs_after = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (get_rule_before ()));
|
||||
gtk_box_append (before_vs_after, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* 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"
|
||||
|
||||
|
||||
// design a comparator (using 'before'/'after' stamps)
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* 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_left_pane ()
|
||||
{
|
||||
GtkBox *rules_tree_and_pilot_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (rules_tree_and_pilot_box, GTK_WIDGET (widget_get_rules_pilot_box ()));
|
||||
gtk_box_append (rules_tree_and_pilot_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
gtk_box_append (rules_tree_and_pilot_box, GTK_WIDGET (widget_get_rules_tree_tools ()));
|
||||
return rules_tree_and_pilot_box;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* 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_pilot_box ()
|
||||
{
|
||||
GtkBox *rules_pilot_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
GtkButton *btt_show_rules_use = GTK_BUTTON (gtk_button_new_with_label ("rules use"));
|
||||
// gtk_button_set_icon_name (btt_show_rules_use, "any-symbolic");
|
||||
// g_signal_connect (btt_show_rules_use, "clicked", G_CALLBACK (on_show_rules_use), no_local_data);
|
||||
GtkButton *btt_show_rules_comparator = GTK_BUTTON (gtk_button_new_with_label ("comparator"));
|
||||
GtkButton *btt_expand_tree = GTK_BUTTON (gtk_button_new_with_label ("tree"));
|
||||
|
||||
gtk_box_append (rules_pilot_box, GTK_WIDGET (btt_expand_tree));
|
||||
gtk_box_append (rules_pilot_box, GTK_WIDGET (btt_show_rules_use));
|
||||
gtk_box_append (rules_pilot_box, GTK_WIDGET (btt_show_rules_comparator));
|
||||
return rules_pilot_box;
|
||||
}
|
||||
|
||||
void *widget_get_rules_tree_tools ()
|
||||
{
|
||||
GtkBox *rules_tree_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_user_rules_tree()));
|
||||
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_rules_use ()));
|
||||
gtk_box_append (rules_tree_box, GTK_WIDGET (get_an_impression_of_what_a_rules_comparator_could_be()));
|
||||
return GTK_WIDGET (rules_tree_box);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* 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_user_rules_tree() < est à la racine (dans src/widget/)
|
||||
|
||||
// Il faut faire le tri entre
|
||||
// - ce qui appartient à "cet" arbre, et
|
||||
// - ce qui serait commun à "tous" les arbres utilisés dans gem-graph
|
||||
|
||||
|
|
@ -27,15 +27,15 @@
|
|||
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
#include "../../../include/fsm.h"
|
||||
#include "../../../include/widget.h"
|
||||
#include "../../../include/signal.h"
|
||||
#include "../../../../include/fsm.h"
|
||||
#include "../../../../include/widget.h"
|
||||
#include "../../../../include/signal.h"
|
||||
|
||||
|
||||
static GtkScrollbar *rule_bar [n_rules];
|
||||
static GtkAdjustment *rule_adjust [n_rules];
|
||||
|
||||
static void *static_widget_get_rules_use ()
|
||||
void *widget_get_rules_use ()
|
||||
{
|
||||
GtkBox *rules_use_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
||||
GtkWidget *scroll_rules_use = gtk_scrolled_window_new ();
|
||||
|
@ -66,13 +66,3 @@ static void *static_widget_get_rules_use ()
|
|||
}
|
||||
|
||||
|
||||
void *widget_get_rules_tree ()
|
||||
{
|
||||
GtkBox *rules_tree_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_user_rules_tree()));
|
||||
gtk_box_append (rules_tree_box, GTK_WIDGET (static_widget_get_rules_use ()));
|
||||
gtk_box_append (rules_tree_box, GTK_WIDGET (get_an_impression_of_what_a_rules_comparator_could_be()));
|
||||
return GTK_WIDGET (rules_tree_box);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue