(à revoir avec l'inspecteur)

This commit is contained in:
Jean Sirmai 2024-05-09 00:05:48 +02:00
parent b045b9599a
commit 4c1a3ade1f
Signed by: jean
GPG Key ID: FB3115C340E057E3
8 changed files with 9 additions and 6 deletions

7
hot.c
View File

@ -25,7 +25,7 @@ static GtkWidget *get_RUN_STOP_label(){
static GtkWidget *get_scroll_speed(){ static GtkWidget *get_scroll_speed(){
GtkAdjustment *speed_adjust = gtk_adjustment_new (0, 0, 100, 1, 0, 0); GtkAdjustment *speed_adjust = gtk_adjustment_new (0, 0, 100, 1, 0, 0);
GtkWidget *scroll_speed = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, speed_adjust); GtkWidget *scroll_speed = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, speed_adjust);
gtk_widget_set_size_request (GTK_WIDGET (scroll_speed), 2, 200); gtk_widget_set_size_request (GTK_WIDGET (scroll_speed), 2, 140);
return scroll_speed; return scroll_speed;
} }
@ -37,16 +37,17 @@ static GtkBox *get_speed_scrolling_box(){
} }
static GtkWidget *get_STEP_by_STEP_Label(){ static GtkWidget *get_STEP_by_STEP_Label(){
GtkWidget *RS_label = gtk_label_new (" Step\n\n(show\nactive\n rule)"); GtkWidget *RS_label = gtk_label_new (" Step\n\n(show\nactive\n rule)\n_______");
gtk_widget_set_size_request (GTK_WIDGET (RS_label), 20, 30); gtk_widget_set_size_request (GTK_WIDGET (RS_label), 20, 30);
return RS_label; return RS_label;
} }
GtkBox *get_RUN_STOP_box(){ GtkBox *get_RUN_STOP_box(){
GtkBox *RUN_STOP_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 20)); GtkBox *RUN_STOP_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 20));
gtk_box_append (RUN_STOP_box, gtk_label_new ("\n"));
gtk_box_append (RUN_STOP_box, get_RUN_STOP_label()); gtk_box_append (RUN_STOP_box, get_RUN_STOP_label());
gtk_box_append (RUN_STOP_box, GTK_WIDGET (get_speed_scrolling_box())); gtk_box_append (RUN_STOP_box, GTK_WIDGET (get_speed_scrolling_box()));
gtk_box_append (RUN_STOP_box, get_STEP_by_STEP_Label()); gtk_box_append (RUN_STOP_box, get_STEP_by_STEP_Label());
gtk_box_append (RUN_STOP_box, gtk_label_new ("\n\n")); gtk_box_append (RUN_STOP_box, gtk_label_new ("\n"));
return RUN_STOP_box; return RUN_STOP_box;
} }

BIN
hot.o

Binary file not shown.

BIN
myprogram

Binary file not shown.

View File

@ -114,12 +114,13 @@ GtkWidget *get_run_space_page_new(){
// same result using either : get_ELAPSED_TIME_box() or get_simulation_time_extent_buffer() // same result using either : get_ELAPSED_TIME_box() or get_simulation_time_extent_buffer()
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_ELAPSED_TIME_box()), 0, 0, 1, 1); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_ELAPSED_TIME_box()), 0, 0, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), get_test_image(), 0, 1, 1, 2); gtk_grid_attach (GTK_GRID(space_grid), get_test_image(), 0, 1, 1, 2);
gtk_grid_attach (GTK_GRID(space_grid), get_objects_and_situations_horizontal_pane(), 0, 3, 1, 1); gtk_grid_attach (GTK_GRID(space_grid), gtk_label_new ("\n"), 0, 3, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), get_objects_and_situations_horizontal_pane(), 0, 4, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_RUN_STOP_box()), 1, 0, 1, 2); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_RUN_STOP_box()), 1, 0, 1, 2);
// gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)), 1, 1, 1, 1); // gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)), 1, 1, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_XYZ_box()), 1, 2, 1, 1); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_XYZ_box()), 1, 2, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_ZOOM_box()), 1, 3, 1, 1); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_ZOOM_box()), 1, 3, 1, 2);
return space_grid; return space_grid;
} }

BIN
pages.o

Binary file not shown.

BIN
warm.o

Binary file not shown.

View File

@ -16,6 +16,7 @@ GtkWidget *get_test_image(){
image = gtk_image_new_from_file("/home/jean/01/Gtk4/Getting_Started_with_GTK/image aXoris.png"); image = gtk_image_new_from_file("/home/jean/01/Gtk4/Getting_Started_with_GTK/image aXoris.png");
image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image gg sketch.png"); image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image gg sketch.png");
image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image E coli (Goodsell).png"); image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image E coli (Goodsell).png");
gtk_widget_set_size_request (GTK_WIDGET (image), W_IMAGE, NULL);
return image; return image;
} }
@ -74,7 +75,7 @@ static GtkProgressBar *get_simulation_time_extent_buffer(){
gtk_progress_bar_set_text (buffer, "<--- [buffer] (simulation extensive time) --->\n\ gtk_progress_bar_set_text (buffer, "<--- [buffer] (simulation extensive time) --->\n\
supports DO - UNDO - REDO functions"); supports DO - UNDO - REDO functions");
gtk_progress_bar_set_show_text (buffer, TRUE); gtk_progress_bar_set_show_text (buffer, TRUE);
gtk_widget_set_size_request (GTK_WIDGET (buffer), W_IMAGE, 50); gtk_widget_set_size_request (GTK_WIDGET (buffer), W_IMAGE, 0);
return buffer; return buffer;
} }

BIN
widgets.o

Binary file not shown.