diff --git a/contain.c b/contain.c index 599b98d..96f3ed0 100644 --- a/contain.c +++ b/contain.c @@ -86,26 +86,24 @@ GtkWidget *get_run_rules_page_new(){ GtkWidget *get_edit_space_page_new(){ - GtkWidget *space_grid = gtk_grid_new(); - gtk_grid_attach (GTK_GRID(space_grid), get_test_image(), 0, 0, 1, 3); - gtk_grid_attach (GTK_GRID(space_grid), get_objects_and_situations_horizontal_pane(), 0, 4, 1, 1); + gtk_grid_attach (GTK_GRID(space_grid), get_SPACE_IMAGE(), 0, 0, 1, 3); + gtk_grid_attach (GTK_GRID(space_grid), get_OBJECTS_and_SITUATIONS(), 0, 4, 1, 1); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_XYZ_box()), 1, 0, 1, 2); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_ZOOM_box()), 1, 2, 1, 2); gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(get_edit_TOOL_box()), 1, 3, 1, 2); gtk_widget_set_size_request (space_grid, W, H); // How to use gtk_separators ? // gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)), 1, 1, 1, 1); - return space_grid; } GtkWidget *get_run_space_left_box(){ GtkBox *left_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0)); - gtk_box_append (left_box, GTK_WIDGET (get_ELAPSED_TIME_box())); - gtk_box_append (left_box, GTK_WIDGET (get_test_image())); + gtk_box_append (left_box, GTK_WIDGET (get_ELAPSED_TIME_ProgressBar())); + gtk_box_append (left_box, GTK_WIDGET (get_SPACE_IMAGE())); gtk_box_append (left_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (left_box, GTK_WIDGET (get_objects_and_situations_horizontal_pane())); + gtk_box_append (left_box, GTK_WIDGET (get_OBJECTS_and_SITUATIONS())); return GTK_WIDGET (left_box); } diff --git a/contain.o b/contain.o index 66d0386..abe3ee8 100644 Binary files a/contain.o and b/contain.o differ diff --git a/display.c b/display.c index c24c876..77fe073 100644 --- a/display.c +++ b/display.c @@ -8,7 +8,7 @@ //------------------------------------------------------------------------------ -GtkWidget *get_test_image(){ +GtkWidget *get_SPACE_IMAGE(){ GtkWidget *image; // forget > GTK_WIDGET(get_scrolled_gl_area()); // Use GtkImage if you want to display a fixed-size icon @@ -24,7 +24,9 @@ GtkWidget *get_test_image(){ GtkBox *get_ZOOM_box(){ GtkBox *ZOOM_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0)); - GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new ("ZOOM\n ---\n(space\nstruct.)")); + GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\ + "\n TOOLS\n ---\n zoom\n ---\n (space\n struct.)\n\ + ---\n (arrows\n struct.)\n")); // gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 30, 80); gtk_box_append (ZOOM_box, ZOOM_Label); return ZOOM_box; @@ -44,7 +46,7 @@ GtkBox *get_edit_TOOL_box(){ GtkBox *get_XYZ_box(){ GtkBox *XYZ_labels_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2 - GtkBox *XYZ_scrollbar_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2 + GtkBox *XYZ_scrollbar_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2q // 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); @@ -60,8 +62,9 @@ GtkBox *get_XYZ_box(){ gtk_box_append (XYZ_scrollbar_box, scroll_Y); gtk_box_append (XYZ_scrollbar_box, scroll_Z); - gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("X Y Z"))); + gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("\nX Y Z"))); gtk_box_append (XYZ_labels_box, GTK_WIDGET (XYZ_scrollbar_box)); + gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new (""))); // gtk_box_set_baseline_position (XYZ_scrollbar_box, GTK_BASELINE_POSITION_BOTTOM); @@ -70,22 +73,16 @@ GtkBox *get_XYZ_box(){ //------------------------------------------------------------------------------ -static GtkProgressBar *get_simulation_time_extent_buffer(){ +GtkProgressBar *get_ELAPSED_TIME_ProgressBar(){ // TODO ? <> rename : DO - UNDO - REDO ? GtkProgressBar *buffer = GTK_PROGRESS_BAR (gtk_progress_bar_new ()); - gtk_progress_bar_set_text (buffer, "<--- [buffer] (simulation extensive time) --->\n\ - supports DO - UNDO - REDO functions"); + gtk_progress_bar_set_text (buffer,\ + "\n<--- [buffer] (simulation extensive time) --->\n\ + supports DO - UNDO - REDO functions\n"); gtk_progress_bar_set_show_text (buffer, TRUE); gtk_widget_set_size_request (GTK_WIDGET (buffer), W_IMAGE, 0); return buffer; } -GtkBox *get_ELAPSED_TIME_box(){ - GtkBox *ELAPSED_TIME_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); - gtk_widget_set_size_request (GTK_WIDGET (ELAPSED_TIME_box), W_IMAGE, 50); - gtk_box_append (ELAPSED_TIME_box, GTK_WIDGET(get_simulation_time_extent_buffer())); - return ELAPSED_TIME_box; -} - //------------------------------------------------------------------------------ static GtkBox *get_objects_box(){ @@ -124,7 +121,7 @@ static GtkWidget *get_frame_situations(){ return frame_situations; } -GtkWidget *get_objects_and_situations_horizontal_pane(){ +GtkWidget *get_OBJECTS_and_SITUATIONS(){ GtkWidget *objects_and_situations_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); gtk_paned_set_start_child (GTK_PANED(objects_and_situations_horizontal_pane), GTK_WIDGET (get_frame_objects())); gtk_paned_set_end_child (GTK_PANED(objects_and_situations_horizontal_pane), GTK_WIDGET (get_frame_situations())); diff --git a/display.h b/display.h index 85e2666..78de1b2 100644 --- a/display.h +++ b/display.h @@ -7,10 +7,11 @@ /* */ /******************************************************************************/ -GtkWidget *get_test_image(); +GtkWidget *get_SPACE_IMAGE(); GtkWidget *get_text_view(); GtkFrame *get_frame_with_label(); GtkScrolledWindow *get_scrolled_gl_area(); +GtkProgressBar *get_ELAPSED_TIME_ProgressBar(); GtkBox *get_RUN_STOP_box(); //GtkBox *get_CONTROL_box(); @@ -19,7 +20,7 @@ GtkBox *get_edit_TOOL_box(); GtkBox *get_XYZ_box(); void window_bar(GtkWindow *window, char *title); -GtkWidget *get_objects_and_situations_horizontal_pane(); +GtkWidget *get_OBJECTS_and_SITUATIONS(); GtkBox *get_ELAPSED_TIME_box(); // https://docs.gtk.org/gtk4/section-text-widget.html diff --git a/display.o b/display.o index eefa20c..4416ec4 100644 Binary files a/display.o and b/display.o differ diff --git a/myprogram b/myprogram index 11b9a55..3303f1c 100755 Binary files a/myprogram and b/myprogram differ