WIP: measures process I

This commit is contained in:
Jean Sirmai 2024-08-06 18:43:15 +02:00
parent 9a2cb4ec8b
commit 442740bf61
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 34 additions and 27 deletions

View File

@ -122,7 +122,7 @@ void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
void on_clicked_home (GtkWidget *btt_reset, gpointer data); void on_clicked_home (GtkWidget *btt_reset, gpointer data);
void on_clicked_search (GtkWidget *btt_menu, gpointer list_box); void on_clicked_search (GtkWidget *btt_menu, gpointer list_box);
void on_clicked_measure (GtkWidget *btt_measure, gpointer data); void on_clicked_measure (GtkWidget *btt_measure, gpointer data);
void on_clicked_new_measure (GtkWidget *btt_new_measure, gpointer data);
/******************************************************************************/ /******************************************************************************/
/* M A I N W I N D O W S T A T E P A G E (upper part) */ /* M A I N W I N D O W S T A T E P A G E (upper part) */

View File

@ -253,3 +253,4 @@ void widget_let_us_create_a_complex_useless_and_expensive_tree (struct TreeNode_
// defined in : widget / measure / dispatch.c // defined in : widget / measure / dispatch.c
void *widget_measure_new(); void *widget_measure_new();
void *widget_measure_do_select_rules_first();

View File

@ -369,3 +369,9 @@ void on_clicked_measure (GtkWidget *btt_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_get_measure_page())); GTK_WIDGET (widget_get_measure_page()));
} }
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()));
}

View File

@ -37,38 +37,38 @@
/* M E A S U R E S */ /* M E A S U R E S */
/******************************************************************************/ /******************************************************************************/
#define PARTITION_MEASURE 500 #define PARTITION_MEASURE 40
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
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure pressure icon.png")));
return measure_select_rules_first;
}
void *widget_measure_new () void *widget_measure_new ()
{ {
printf("on_clicked_measure() >> dispatch.c / widget_measure_new()\n"); GtkBox *measure_new = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
GtkBox *results_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); gtk_box_append (measure_new, GTK_WIDGET (gtk_picture_new_for_filename
gtk_box_append (results_box, GTK_WIDGET (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")));
return results_box; 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);
void *widget_measure_II () gtk_box_append (measure_new, GTK_WIDGET (btt_edit_a_new_measure));
{ return measure_new;
printf("on_clicked_measure() >> dispatch.c / widget_measure_II()\n");
GtkBox *measure_II_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
gtk_box_append (measure_II_box, GTK_WIDGET (gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure pressure icon.png")));
return measure_II_box;
} }
void *widget_get_measure_page() void *widget_get_measure_page()
{ {
printf("dispatch.c / widget_measure_new() >> dispatch.c / widget_get_measure_page()\n"); GtkWidget *any_widget = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
GtkWidget *anything = gtk_paned_new (GTK_ORIENTATION_VERTICAL); gtk_paned_set_start_child (GTK_PANED (any_widget),
gtk_paned_set_start_child (GTK_PANED (anything),
GTK_WIDGET (widget_measure_new())); GTK_WIDGET (widget_measure_new()));
gtk_paned_set_end_child (GTK_PANED (anything), gtk_paned_set_end_child (GTK_PANED (any_widget), gtk_label_new (""));
GTK_WIDGET (widget_measure_II())); gtk_paned_set_position (GTK_PANED (any_widget), PARTITION_MEASURE);
gtk_paned_set_position (GTK_PANED (anything), PARTITION_MEASURE); gtk_paned_set_shrink_start_child (GTK_PANED (any_widget), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (anything), FALSE); gtk_paned_set_shrink_end_child (GTK_PANED (any_widget), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (anything), FALSE); gtk_widget_set_size_request (any_widget, 0, H_MY_SCREEN); // OK (required))
gtk_widget_set_size_request (anything, 0, H_MY_SCREEN); // OK (required)) return any_widget;
return anything;
} }