2024-04-27 16:16:21 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <gtk-4.0/gtk/gtk.h>
|
2024-05-01 10:07:50 +02:00
|
|
|
//#include "gg/graphics.h"
|
|
|
|
//#include "hot.h"
|
2024-04-29 23:43:04 +02:00
|
|
|
#include "warm.h"
|
|
|
|
#include "cold.h"
|
|
|
|
|
2024-04-30 18:59:44 +02:00
|
|
|
// https://docs.gtk.org/gtk4/visual_index.html < widgets gallery
|
2024-04-30 07:17:00 +02:00
|
|
|
|
2024-05-01 11:01:50 +02:00
|
|
|
GtkWidget *get_space_page_new(){
|
2024-05-06 17:14:52 +02:00
|
|
|
|
|
|
|
GtkWidget *space_grid = gtk_grid_new();
|
|
|
|
|
|
|
|
gtk_grid_attach (GTK_GRID (space_grid), get_objects_and_situations_horizontal_pane(), 0, 0, 1, 1);
|
|
|
|
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_a_space_test_image()), 0, 1, 1, 10);
|
|
|
|
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("RUN"), 1, 0, 1, 1);
|
|
|
|
gtk_grid_attach (GTK_GRID(space_grid), get_scroll_speed(), 1, 1, 1, 1);
|
|
|
|
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("Step"), 1, 2, 1, 1);
|
|
|
|
// gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_simulation_time_extent_buffer()), 0, 2, 1, 1);
|
|
|
|
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_XYZ_gtk_box()), 1, 3, 1, 1);
|
|
|
|
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("zoom"), 1, 4, 1, 1);
|
|
|
|
|
|
|
|
return space_grid;
|
|
|
|
}
|
2024-05-06 12:45:24 +02:00
|
|
|
/*
|
2024-05-05 20:53:52 +02:00
|
|
|
GtkBox *controls_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
|
|
|
gtk_box_append (controls_box, gtk_button_new_with_label ("RUN"));
|
|
|
|
// gtk_box_append (controls_box, scroll_speed);
|
|
|
|
gtk_box_append (controls_box, gtk_button_new_with_label ("step"));
|
|
|
|
|
2024-05-01 10:07:50 +02:00
|
|
|
// GtkLevelBar *slow_speed = GTK_LEVEL_BAR (gtk_level_bar_new ()); // or __new_for_interval(0,100);
|
|
|
|
// gtk_level_bar_set_mode (slow_speed, GTK_LEVEL_BAR_MODE_CONTINUOUS); //_DISCRETE
|
2024-05-05 20:53:52 +02:00
|
|
|
// gtk_box_append (controls_box, gtk_button_new_with_label ("slow down / speed up")); // GTK_WIDGET(slow_speed));
|
|
|
|
// gtk_box_append (controls_box, gtk_button_new_with_label ("step by step"));
|
2024-05-06 12:45:24 +02:00
|
|
|
|
2024-05-01 10:07:50 +02:00
|
|
|
GtkProgressBar *buffer = GTK_PROGRESS_BAR (gtk_progress_bar_new ());
|
2024-05-06 12:45:24 +02:00
|
|
|
gtk_progress_bar_set_text (buffer, "<--- [buffer] (simulation extent time) --->");
|
2024-05-01 10:07:50 +02:00
|
|
|
gtk_progress_bar_set_show_text (buffer, TRUE);
|
2024-05-06 12:45:24 +02:00
|
|
|
// gtk_box_append (controls_box, GTK_WIDGET(buffer));//gtk_button_new_with_label ("---- buffer ----"));
|
2024-05-01 19:40:36 +02:00
|
|
|
|
|
|
|
|
2024-04-30 07:17:00 +02:00
|
|
|
GtkBox *XYZ_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2
|
2024-04-30 13:06:46 +02:00
|
|
|
// GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
|
|
|
|
// (double min, double max, double step, const char** icons)
|
2024-04-30 18:59:44 +02:00
|
|
|
GtkAdjustment *X_adjust = gtk_adjustment_new (0, 0, 380, 1, 0, 0);
|
|
|
|
GtkAdjustment *Y_adjust = gtk_adjustment_new (0, 0, 380, 1, 0, 0);
|
|
|
|
GtkAdjustment *Z_adjust = gtk_adjustment_new (0, 0, 380, 1, 0, 0);
|
2024-04-30 13:06:46 +02:00
|
|
|
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
|
|
|
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
|
|
|
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
|
|
|
|
|
|
|
gtk_box_append (XYZ_box, scroll_X);
|
|
|
|
gtk_box_append (XYZ_box, scroll_Y);
|
|
|
|
gtk_box_append (XYZ_box, scroll_Z);
|
2024-05-06 17:14:52 +02:00
|
|
|
|
2024-04-30 18:59:44 +02:00
|
|
|
GtkWidget *bottom_grid = gtk_grid_new();
|
2024-05-06 12:45:24 +02:00
|
|
|
// gtk_grid_attach (GTK_GRID(bottom_grid), GTK_WIDGET(controls_box), 0, 0, 1, 1);
|
2024-04-30 18:59:44 +02:00
|
|
|
gtk_grid_attach (GTK_GRID(bottom_grid), gtk_button_new_with_label ("Objects / Situations (transparences, styles)"), 0, 1, 1, 1);
|
2024-05-06 12:45:24 +02:00
|
|
|
gtk_grid_attach (GTK_GRID(bottom_grid), gtk_button_new_with_label ("zoom, +/- grid,\npresentation,\n objects styles,..."), 1, 0, 1, 2);
|
2024-04-30 18:59:44 +02:00
|
|
|
|
2024-05-06 12:45:24 +02:00
|
|
|
GtkWidget *objects_and_situations_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
|
|
|
GtkWidget *frame_objects = gtk_frame_new ("Objects"); // define each class of object transparence
|
|
|
|
GtkWidget *frame_situations = gtk_frame_new ("Situations"); // facilitate each situation identification
|
|
|
|
gtk_widget_set_size_request (objects_and_situations_horizontal_pane, W_GL_AREA, H_STYLES_PANE);
|
|
|
|
gtk_widget_set_size_request (frame_objects, 100, H_STYLES_PANE); // < utile seulement pour la largeur min/max
|
|
|
|
gtk_widget_set_size_request (frame_situations, 100, H_STYLES_PANE); // < utile seulement pour la largeur min/max
|
|
|
|
gtk_paned_set_start_child (GTK_PANED(objects_and_situations_horizontal_pane), GTK_WIDGET (frame_objects));
|
|
|
|
gtk_paned_set_end_child (GTK_PANED(objects_and_situations_horizontal_pane), GTK_WIDGET (frame_situations));
|
|
|
|
*/
|
2024-04-30 18:59:44 +02:00
|
|
|
|
2024-04-29 23:43:04 +02:00
|
|
|
|