#include #include //#include "gg/graphics.h" //#include "hot.h" #include "warm.h" #include "cold.h" // https://docs.gtk.org/gtk4/visual_index.html < widgets gallery GtkWidget *get_space_page_new(){ GtkBox *controls_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0)); gtk_box_append (controls_box, gtk_button_new_with_label ("RUN")); GtkAdjustment *speed_adjust = gtk_adjustment_new (0, 0, 100, 1, 0, 0); GtkWidget *scroll_speed = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, speed_adjust); // gtk_box_append (controls_box, scroll_speed); gtk_box_append (controls_box, gtk_button_new_with_label ("step")); // 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 // 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")); GtkProgressBar *buffer = GTK_PROGRESS_BAR (gtk_progress_bar_new ()); gtk_progress_bar_set_text (buffer, "<>"); gtk_progress_bar_set_show_text (buffer, TRUE); gtk_box_append (controls_box, GTK_WIDGET(buffer));//gtk_button_new_with_label ("---- buffer ----")); GtkBox *XYZ_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2 // GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier // (double min, double max, double step, const char** icons) 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); 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); GtkWidget *bottom_grid = gtk_grid_new(); gtk_grid_attach (GTK_GRID(bottom_grid), GTK_WIDGET(controls_box), 0, 0, 1, 1); gtk_grid_attach (GTK_GRID(bottom_grid), gtk_button_new_with_label ("Objects / Situations (transparences, styles)"), 0, 1, 1, 1); gtk_grid_attach (GTK_GRID(bottom_grid), gtk_button_new_with_label ("zoom, +/- grid,\npresentation,\nstyles,..."), 1, 0, 1, 2); GtkWidget *space_grid = gtk_grid_new(); gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("Objects / Situations (transparences, styles)"), 0, 0, 1, 1); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_scrolled_gl_area()), 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), 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(controls_box), 1, 3, 1, 1); // gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(buffer), 1, 3, 1, 1); // gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(XYZ_box), 1, 3, 1, 1); // gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(bottom_grid), 0, 1, 2, 1); // ?! échec x_size // gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("?"), 1, 1, 1, 1); return space_grid; }