WIP: measures process IV
This commit is contained in:
parent
513fcaa17c
commit
a332f3c3fb
|
@ -142,3 +142,5 @@ void on_clicked_topbar_right_measure (GtkWidget *btt_measure, gpointer data);
|
||||||
|
|
||||||
void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data);
|
void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data);
|
||||||
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);
|
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);
|
||||||
|
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data);
|
||||||
|
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data);
|
||||||
|
|
|
@ -254,4 +254,6 @@ void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_
|
||||||
|
|
||||||
void *widget_measure_new();
|
void *widget_measure_new();
|
||||||
void *widget_measure_do_select_rules_first();
|
void *widget_measure_do_select_rules_first();
|
||||||
void *widget_measure_do_xxx();
|
void *widget_measure_do_depends_on_one_or_two_events();
|
||||||
|
void *widget_measure_do_depends_on_a_single_event();
|
||||||
|
void *widget_measure_do_depends_on_two_events();
|
||||||
|
|
21
src/signal.c
21
src/signal.c
|
@ -364,21 +364,32 @@ void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrol
|
||||||
/* M E A S U R E S */
|
/* M E A S U R E S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
void on_clicked_topbar_right_measure (GtkWidget *btt_measure, gpointer data)
|
void on_clicked_topbar_right_measure (GtkWidget *btt, gpointer data)
|
||||||
{
|
{
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_get_measure_page()));
|
GTK_WIDGET (widget_get_measure_page()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data)
|
void on_start_new_measure (GtkWidget *btt, gpointer data)
|
||||||
{
|
{
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_measure_do_select_rules_first()));
|
GTK_WIDGET (widget_measure_do_select_rules_first()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data)
|
void on_select_rules_first (GtkWidget *btt, gpointer data)
|
||||||
{
|
{
|
||||||
printf("on_select_rules_first()\n");
|
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_measure_do_xxx()));
|
GTK_WIDGET (widget_measure_do_depends_on_one_or_two_events()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_do_depends_on_a_single_event()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_do_depends_on_two_events()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#define PARTITION_MEASURE 40
|
#define PARTITION_MEASURE 40
|
||||||
|
|
||||||
static GtkBox *measure_page;
|
static GtkBox *measure_page;
|
||||||
static GtkWidget *label_empty;
|
|
||||||
|
|
||||||
static GtkBox *edit_a_new_measure_box;
|
static GtkBox *edit_a_new_measure_box;
|
||||||
static GtkWidget *caliper;
|
static GtkWidget *caliper;
|
||||||
|
@ -50,19 +49,40 @@ static GtkBox *select_rules_first_box;
|
||||||
static GtkWidget *pressure;
|
static GtkWidget *pressure;
|
||||||
static GtkWidget *btt_select_rules_first;
|
static GtkWidget *btt_select_rules_first;
|
||||||
|
|
||||||
void *widget_measure_do_xxx()
|
static GtkBox *select_one_or_two_rules_events_box;
|
||||||
|
static GtkWidget *balance;
|
||||||
|
static GtkWidget *btt_select_first_of_two;
|
||||||
|
static GtkWidget *btt_select_second_of_two;
|
||||||
|
|
||||||
|
void *widget_measure_do_depends_on_a_single_event() {printf("measure depends on a single event\n"); return measure_page;}
|
||||||
|
void *widget_measure_do_depends_on_two_events() {printf("measure depends on two events\n"); return measure_page;}
|
||||||
|
|
||||||
|
void *widget_measure_do_depends_on_one_or_two_events()
|
||||||
{
|
{
|
||||||
printf("on_clicked_measure() >> dispatch.c / widget_measure_do_select_rules_first()\
|
select_one_or_two_rules_events_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
>> widget_measure_do_xxx()\n");
|
balance = gtk_picture_new_for_filename
|
||||||
return NULL;
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/balance icon.png");
|
||||||
|
btt_select_first_of_two = gtk_toggle_button_new_with_label ("measure depends on a single event");
|
||||||
|
btt_select_second_of_two = gtk_toggle_button_new_with_label ("measure depends on two events");
|
||||||
|
g_signal_connect (btt_select_first_of_two, "toggled",
|
||||||
|
G_CALLBACK (on_measure_depends_on_a_single_event), NULL);
|
||||||
|
g_signal_connect (btt_select_second_of_two, "toggled",
|
||||||
|
G_CALLBACK (on_measure_depends_on_two_events), NULL);
|
||||||
|
|
||||||
|
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (balance));
|
||||||
|
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_first_of_two));
|
||||||
|
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_second_of_two));
|
||||||
|
measure_page = widget_get_measure_page();
|
||||||
|
gtk_box_append (measure_page, GTK_WIDGET (select_one_or_two_rules_events_box));
|
||||||
|
|
||||||
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *widget_measure_do_select_rules_first ()
|
void *widget_measure_do_select_rules_first ()
|
||||||
{
|
{
|
||||||
printf("on_clicked_measure() >> dispatch.c / widget_measure_do_select_rules_first()\n");
|
|
||||||
select_rules_first_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
select_rules_first_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
gtk_box_append (select_rules_first_box, GTK_WIDGET (gtk_picture_new_for_filename
|
pressure = gtk_picture_new_for_filename
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure pressure icon.png")));
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure pressure icon.png");
|
||||||
btt_select_rules_first = gtk_toggle_button_new_with_label ("select rules first");
|
btt_select_rules_first = gtk_toggle_button_new_with_label ("select rules first");
|
||||||
g_signal_connect (btt_select_rules_first, "toggled",
|
g_signal_connect (btt_select_rules_first, "toggled",
|
||||||
G_CALLBACK (on_select_rules_first), NULL);
|
G_CALLBACK (on_select_rules_first), NULL);
|
||||||
|
@ -78,8 +98,6 @@ void *widget_measure_do_select_rules_first ()
|
||||||
void *widget_get_measure_page()
|
void *widget_get_measure_page()
|
||||||
{
|
{
|
||||||
measure_page = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
measure_page = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
label_empty = gtk_label_new ("");
|
|
||||||
gtk_widget_set_size_request (label_empty, 0, H_MY_SCREEN); // OK (required))
|
|
||||||
edit_a_new_measure_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
edit_a_new_measure_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
caliper = gtk_picture_new_for_filename
|
caliper = gtk_picture_new_for_filename
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure caliper icon.png");
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure caliper icon.png");
|
||||||
|
|
Loading…
Reference in New Issue