WIP: measures process II

This commit is contained in:
Jean Sirmai 2024-08-06 23:19:45 +02:00
parent 442740bf61
commit 29bd8069ed
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 54 additions and 24 deletions

View File

@ -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_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar);
void on_resetting_XYZ_in_state_page (); void on_resetting_XYZ_in_state_page ();
void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data);

View File

@ -254,3 +254,4 @@ 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_do_xxx();

View File

@ -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_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)
{
printf("on_select_rules_first()\n");
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_do_xxx()));
}

View File

@ -39,36 +39,56 @@
#define PARTITION_MEASURE 40 #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 () void *widget_measure_do_select_rules_first ()
{ {
printf("on_clicked_measure() >> dispatch.c / widget_measure_do_select_rules_first()\n"); 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)); select_rules_first_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
gtk_box_append (measure_select_rules_first, GTK_WIDGET (gtk_picture_new_for_filename 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"))); ("/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 () gtk_box_append (select_rules_first_box, GTK_WIDGET (pressure));
{ gtk_box_append (select_rules_first_box, GTK_WIDGET (btt_select_rules_first));
GtkBox *measure_new = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); measure_page = widget_get_measure_page();
gtk_box_append (measure_new, GTK_WIDGET (gtk_picture_new_for_filename gtk_box_append (measure_page, GTK_WIDGET (select_rules_first_box));
("/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"); return measure_page;
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;
} }
void *widget_get_measure_page() void *widget_get_measure_page()
{ {
GtkWidget *any_widget = gtk_paned_new (GTK_ORIENTATION_VERTICAL); measure_page = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
gtk_paned_set_start_child (GTK_PANED (any_widget), label_empty = gtk_label_new ("");
GTK_WIDGET (widget_measure_new())); gtk_widget_set_size_request (label_empty, 0, H_MY_SCREEN); // OK (required))
gtk_paned_set_end_child (GTK_PANED (any_widget), gtk_label_new ("")); edit_a_new_measure_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
gtk_paned_set_position (GTK_PANED (any_widget), PARTITION_MEASURE); caliper = gtk_picture_new_for_filename
gtk_paned_set_shrink_start_child (GTK_PANED (any_widget), FALSE); ("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure caliper icon.png");
gtk_paned_set_shrink_end_child (GTK_PANED (any_widget), FALSE); btt_edit_a_new_measure = gtk_toggle_button_new_with_label ("edit a new measure");
gtk_widget_set_size_request (any_widget, 0, H_MY_SCREEN); // OK (required)) g_signal_connect (btt_edit_a_new_measure, "toggled",
return any_widget; 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;
}