WIP: measures process II
This commit is contained in:
parent
442740bf61
commit
29bd8069ed
|
@ -132,3 +132,5 @@ void on_updating_objects_transparencies (GtkWidget *btt_reset, GtkScrollbar *res
|
|||
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
|
||||
|
||||
void on_resetting_XYZ_in_state_page ();
|
||||
|
||||
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);
|
||||
|
|
|
@ -254,3 +254,4 @@ void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_
|
|||
|
||||
void *widget_measure_new();
|
||||
void *widget_measure_do_select_rules_first();
|
||||
void *widget_do_xxx();
|
||||
|
|
|
@ -375,3 +375,10 @@ void on_clicked_new_measure (GtkWidget *btt_new_measure, gpointer data)
|
|||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_select_rules_first()));
|
||||
}
|
||||
|
||||
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data)
|
||||
{
|
||||
printf("on_select_rules_first()\n");
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_do_xxx()));
|
||||
}
|
||||
|
|
|
@ -39,36 +39,56 @@
|
|||
|
||||
#define PARTITION_MEASURE 40
|
||||
|
||||
static GtkBox *measure_page;
|
||||
static GtkWidget *label_empty;
|
||||
|
||||
static GtkBox *edit_a_new_measure_box;
|
||||
static GtkWidget *caliper;
|
||||
static GtkWidget *btt_edit_a_new_measure;
|
||||
|
||||
static GtkBox *select_rules_first_box;
|
||||
static GtkWidget *pressure;
|
||||
static GtkWidget *btt_select_rules_first;
|
||||
|
||||
void *widget_do_xxx()
|
||||
{
|
||||
printf("on_clicked_measure() >> dispatch.c / widget_measure_do_select_rules_first() >> widget_do_xxx()\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *widget_measure_do_select_rules_first ()
|
||||
{
|
||||
printf("on_clicked_measure() >> dispatch.c / widget_measure_do_select_rules_first()\n");
|
||||
GtkBox *measure_select_rules_first = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
gtk_box_append (measure_select_rules_first, GTK_WIDGET (gtk_picture_new_for_filename
|
||||
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
|
||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure pressure icon.png")));
|
||||
return measure_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_CALLBACK (on_select_rules_first), NULL);
|
||||
|
||||
void *widget_measure_new ()
|
||||
{
|
||||
GtkBox *measure_new = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||
gtk_box_append (measure_new, GTK_WIDGET (gtk_picture_new_for_filename
|
||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure caliper icon.png")));
|
||||
GtkWidget *btt_edit_a_new_measure = gtk_toggle_button_new_with_label ("edit a new measure");
|
||||
g_signal_connect (btt_edit_a_new_measure, "toggled",
|
||||
G_CALLBACK (on_clicked_new_measure), NULL);
|
||||
gtk_box_append (measure_new, GTK_WIDGET (btt_edit_a_new_measure));
|
||||
return measure_new;
|
||||
gtk_box_append (select_rules_first_box, GTK_WIDGET (pressure));
|
||||
gtk_box_append (select_rules_first_box, GTK_WIDGET (btt_select_rules_first));
|
||||
measure_page = widget_get_measure_page();
|
||||
gtk_box_append (measure_page, GTK_WIDGET (select_rules_first_box));
|
||||
|
||||
return measure_page;
|
||||
}
|
||||
|
||||
void *widget_get_measure_page()
|
||||
{
|
||||
GtkWidget *any_widget = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_paned_set_start_child (GTK_PANED (any_widget),
|
||||
GTK_WIDGET (widget_measure_new()));
|
||||
gtk_paned_set_end_child (GTK_PANED (any_widget), gtk_label_new (""));
|
||||
gtk_paned_set_position (GTK_PANED (any_widget), PARTITION_MEASURE);
|
||||
gtk_paned_set_shrink_start_child (GTK_PANED (any_widget), FALSE);
|
||||
gtk_paned_set_shrink_end_child (GTK_PANED (any_widget), FALSE);
|
||||
gtk_widget_set_size_request (any_widget, 0, H_MY_SCREEN); // OK (required))
|
||||
return any_widget;
|
||||
}
|
||||
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));
|
||||
caliper = gtk_picture_new_for_filename
|
||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure caliper icon.png");
|
||||
btt_edit_a_new_measure = gtk_toggle_button_new_with_label ("edit a new measure");
|
||||
g_signal_connect (btt_edit_a_new_measure, "toggled",
|
||||
G_CALLBACK (on_clicked_new_measure), NULL);
|
||||
|
||||
gtk_box_append (edit_a_new_measure_box, GTK_WIDGET (caliper));
|
||||
gtk_box_append (edit_a_new_measure_box, GTK_WIDGET (btt_edit_a_new_measure));
|
||||
gtk_box_append (measure_page, GTK_WIDGET (edit_a_new_measure_box));
|
||||
|
||||
return measure_page;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue