diff --git a/include/widget.h b/include/widget.h index 3b64bc7..9b30394 100644 --- a/include/widget.h +++ b/include/widget.h @@ -185,20 +185,21 @@ void *widget_get_rules_use(); // freq.c // call: widget / rules / selected / dispatch.c / widget_get_rules_selected_pane() // def: widget / rules / selected / dispatch.c // def: widget / rules / selected / edit.c -// def: widget / rules / selected / analyse.c +// def: widget / rules / selected / enquire.c void *widget_get_selected_rule(); // dispatch.c void *widget_get_rule_edit(); // edit.c -void *widget_get_rule_analyse(); // analyse.c +void *widget_get_rule_enquire(); // enquire.c // call: widget / rules / selected / dispatch.c / widget_get_selected_rule() // def: widget / rules / selected / text.c // def: widget / rules / selected / image.c -void *widget_get_selected_rule_texts(); -void *widget_get_selected_rule_images(); +void *widget_get_selected_rule_algebra(); +void *widget_get_selected_rule_geometry(); void *widget_get_btt_conditions_list(); void *widget_get_btt_assignations_list(); +void *widget_get_btt_rule_identity(); // def: widget / rules / selected / wip_menu.c GtkEntry widget_set_one_item_text_in_list (GtkWidget *list_box, const char *text); diff --git a/src/widget/rules/selected/text.c b/src/widget/rules/selected/algebra.c similarity index 56% rename from src/widget/rules/selected/text.c rename to src/widget/rules/selected/algebra.c index a8091ce..d6c3dce 100644 --- a/src/widget/rules/selected/text.c +++ b/src/widget/rules/selected/algebra.c @@ -32,58 +32,10 @@ #include "../../../../include/signal.h" -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 *widget_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 *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; -} - -void *widget_get_selected_rule_texts() +void *widget_get_selected_rule_algebra() { GtkWidget *label_ad_hoc = GTK_WIDGET (gtk_label_new (\ - " ")); // ad hoc (provisoire) + " ")); // (provisoire) 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), diff --git a/src/widget/rules/selected/dispatch.c b/src/widget/rules/selected/dispatch.c index 6881fa6..71bc85c 100644 --- a/src/widget/rules/selected/dispatch.c +++ b/src/widget/rules/selected/dispatch.c @@ -35,9 +35,9 @@ 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 (widget_get_selected_rule_geometry ())); 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 ())); + gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_algebra ())); return GTK_WIDGET (images_and_texts); } @@ -49,7 +49,7 @@ void *widget_get_rules_selected_pane() if (fsm_get_exec_edit()) gtk_paned_set_end_child (rule_itself_vs_explore_edit_pane, GTK_WIDGET (widget_get_rule_edit())); else gtk_paned_set_end_child (rule_itself_vs_explore_edit_pane, - GTK_WIDGET (widget_get_rule_analyse())); + GTK_WIDGET (widget_get_rule_enquire())); 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); diff --git a/src/widget/rules/selected/edit.c b/src/widget/rules/selected/edit.c index f67b19f..f4ade32 100644 --- a/src/widget/rules/selected/edit.c +++ b/src/widget/rules/selected/edit.c @@ -36,6 +36,6 @@ void *widget_get_rule_edit() { return gtk_label_new - ("___________\n RULE EDIT\n controls\n''''''''''''''''''''"); + ("_______________\n RULE EDITION\n controls\n''''''''''''''''''''''''''"); } diff --git a/src/widget/rules/selected/analyse.c b/src/widget/rules/selected/enquire.c similarity index 92% rename from src/widget/rules/selected/analyse.c rename to src/widget/rules/selected/enquire.c index ab9ab6f..c038087 100644 --- a/src/widget/rules/selected/analyse.c +++ b/src/widget/rules/selected/enquire.c @@ -33,10 +33,10 @@ -void *widget_get_rule_analyse() +void *widget_get_rule_enquire() { - return gtk_label_new (" ______________________\n RULE INVESTIGATION\n\ - tools\n '''''''''''''''''''''''''''''''''''''''"); + return gtk_label_new (" ________________\n RULE INQUIRY\n\ + tools\n '''''''''''''''''''''''''''"); } diff --git a/src/widget/rules/selected/image.c b/src/widget/rules/selected/geometry.c similarity index 99% rename from src/widget/rules/selected/image.c rename to src/widget/rules/selected/geometry.c index 3f9a469..1c673bf 100644 --- a/src/widget/rules/selected/image.c +++ b/src/widget/rules/selected/geometry.c @@ -89,7 +89,7 @@ static GtkBox *rec_ZOOM_box() } -void *widget_get_selected_rule_images() { +void *widget_get_selected_rule_geometry() { // - - - - - - - - - - - - C A M E R A - - - - - - - - - - - - - - // GtkBox *right_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); diff --git a/src/widget/rules/selected/wip_menu.c b/src/widget/rules/selected/utilities.c similarity index 85% rename from src/widget/rules/selected/wip_menu.c rename to src/widget/rules/selected/utilities.c index 09a5506..fff37aa 100644 --- a/src/widget/rules/selected/wip_menu.c +++ b/src/widget/rules/selected/utilities.c @@ -108,6 +108,30 @@ void *widget_get_btt_assignations_list() return actions; } +void *widget_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 *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; +} +