[S P E E D] aligné avec [D O / U N D O] (plus ergonomique)
This commit is contained in:
parent
45048498a9
commit
d46175032d
|
@ -103,6 +103,7 @@ GtkWidget *get_edit_space_page_new(){
|
||||||
GtkWidget *get_run_space_top_box(){
|
GtkWidget *get_run_space_top_box(){
|
||||||
GtkBox *top_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
GtkBox *top_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
gtk_box_append (top_box, GTK_WIDGET (get_ELAPSED_TIME_ProgressBar()));
|
gtk_box_append (top_box, GTK_WIDGET (get_ELAPSED_TIME_ProgressBar()));
|
||||||
|
gtk_box_append (top_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
gtk_box_append (top_box, GTK_WIDGET (get_RUN_STOP_box()));
|
gtk_box_append (top_box, GTK_WIDGET (get_RUN_STOP_box()));
|
||||||
return GTK_WIDGET (top_box);
|
return GTK_WIDGET (top_box);
|
||||||
}
|
}
|
||||||
|
@ -117,6 +118,7 @@ GtkWidget *get_run_space_left_box(){
|
||||||
GtkWidget *get_run_space_right_box(){
|
GtkWidget *get_run_space_right_box(){
|
||||||
GtkBox *right_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *right_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
gtk_box_append (right_box, GTK_WIDGET (get_XYZ_box()));
|
gtk_box_append (right_box, GTK_WIDGET (get_XYZ_box()));
|
||||||
|
gtk_box_append (right_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
gtk_box_append (right_box, GTK_WIDGET (get_ZOOM_box()));
|
gtk_box_append (right_box, GTK_WIDGET (get_ZOOM_box()));
|
||||||
return GTK_WIDGET (right_box);
|
return GTK_WIDGET (right_box);
|
||||||
}
|
}
|
||||||
|
@ -124,6 +126,7 @@ GtkWidget *get_run_space_right_box(){
|
||||||
GtkWidget *get_run_space_bottom_box(){
|
GtkWidget *get_run_space_bottom_box(){
|
||||||
GtkBox *bottom_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
GtkBox *bottom_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (get_run_space_left_box()));
|
gtk_box_append (bottom_box, GTK_WIDGET (get_run_space_left_box()));
|
||||||
|
gtk_box_append (bottom_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (get_run_space_right_box()));
|
gtk_box_append (bottom_box, GTK_WIDGET (get_run_space_right_box()));
|
||||||
return GTK_WIDGET (bottom_box);
|
return GTK_WIDGET (bottom_box);
|
||||||
}
|
}
|
||||||
|
@ -168,10 +171,10 @@ void activate (GtkApplication *app, gpointer user_data) {
|
||||||
gtk_notebook_append_page (edit_notebook, get_edit_help_page_new(), gtk_label_new ("help"));
|
gtk_notebook_append_page (edit_notebook, get_edit_help_page_new(), gtk_label_new ("help"));
|
||||||
|
|
||||||
GtkWidget *run_xor_edit_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
GtkWidget *run_xor_edit_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_widget_set_size_request (run_xor_edit_horizontal_pane, W_IMAGE, H_STYLES_PANE);
|
gtk_widget_set_size_request (run_xor_edit_horizontal_pane, 0, 0);
|
||||||
gtk_paned_set_start_child (GTK_PANED(run_xor_edit_horizontal_pane), GTK_WIDGET (run_notebook));
|
gtk_paned_set_start_child (GTK_PANED(run_xor_edit_horizontal_pane), GTK_WIDGET (run_notebook));
|
||||||
gtk_paned_set_end_child (GTK_PANED(run_xor_edit_horizontal_pane), GTK_WIDGET (edit_notebook));
|
gtk_paned_set_end_child (GTK_PANED(run_xor_edit_horizontal_pane), GTK_WIDGET (edit_notebook));
|
||||||
gtk_paned_set_position (GTK_PANED (run_xor_edit_horizontal_pane), W_IMAGE + 90); // ! WARNING ! '90' is AD HOC
|
gtk_paned_set_position (GTK_PANED (run_xor_edit_horizontal_pane), W_IMAGE + 400); // ! WARNING ! '90' is AD HOC
|
||||||
gtk_window_set_child (window, GTK_WIDGET(run_xor_edit_horizontal_pane));
|
gtk_window_set_child (window, GTK_WIDGET(run_xor_edit_horizontal_pane));
|
||||||
gtk_window_present (GTK_WINDOW (window));
|
gtk_window_present (GTK_WINDOW (window));
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#define W 1920
|
#define W 1920
|
||||||
#define H 960
|
#define H 960
|
||||||
#define W_IMAGE 1920 - 20
|
#define W_IMAGE 1920 - 320
|
||||||
#define H_IMAGE 960 - 126
|
#define H_IMAGE 960 - 126
|
||||||
#define H_STYLES_PANE 60
|
#define H_STYLES_PANE 60
|
||||||
|
|
||||||
|
|
18
display.c
18
display.c
|
@ -29,11 +29,19 @@ static GtkWidget *get_scroll_speed(){
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (scroll_speed), 140, 2);
|
gtk_widget_set_size_request (GTK_WIDGET (scroll_speed), 140, 2);
|
||||||
return scroll_speed;
|
return scroll_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GtkBox *get_SPEED_box(){
|
||||||
|
GtkBox *SPEED_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
||||||
|
gtk_box_append (SPEED_box, GTK_WIDGET(gtk_label_new ("\n")));
|
||||||
|
gtk_box_append (SPEED_box, get_scroll_speed());
|
||||||
|
return SPEED_box;
|
||||||
|
}
|
||||||
|
|
||||||
GtkBox *get_RUN_STOP_box(){
|
GtkBox *get_RUN_STOP_box(){
|
||||||
GtkBox *RUN_STOP_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20));
|
GtkBox *RUN_STOP_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20));
|
||||||
// gtk_box_append (RUN_STOP_box, gtk_label_new ("\n"));
|
// gtk_box_append (RUN_STOP_box, gtk_label_new ("\n"));
|
||||||
gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_label_new (" R U N\n S T O P")));
|
gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_label_new (" R U N\n S T O P")));
|
||||||
gtk_box_append (RUN_STOP_box, get_scroll_speed());
|
gtk_box_append (RUN_STOP_box, GTK_WIDGET (get_SPEED_box()));
|
||||||
gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_label_new (" STEP\n(show active rule) ")));
|
gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_label_new (" STEP\n(show active rule) ")));
|
||||||
// gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
// gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
return RUN_STOP_box;
|
return RUN_STOP_box;
|
||||||
|
@ -45,7 +53,7 @@ GtkBox *get_ZOOM_box(){
|
||||||
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
||||||
"\n TOOLS\n ---\n zoom\n ---\n (space\n struct.)\n\
|
"\n TOOLS\n ---\n zoom\n ---\n (space\n struct.)\n\
|
||||||
---\n (arrows\n struct.)\n"));
|
---\n (arrows\n struct.)\n"));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 30, 80);
|
gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80);
|
||||||
gtk_box_append (ZOOM_box, ZOOM_Label);
|
gtk_box_append (ZOOM_box, ZOOM_Label);
|
||||||
return ZOOM_box;
|
return ZOOM_box;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +63,7 @@ GtkBox *get_ZOOM_box(){
|
||||||
GtkBox *get_edit_TOOL_box(){
|
GtkBox *get_edit_TOOL_box(){
|
||||||
GtkBox *TOOL_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *TOOL_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new ("TOOLS\n ---\n(space\nstruct.)"));
|
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new ("TOOLS\n ---\n(space\nstruct.)"));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (TOOL_box), 30, 120);
|
gtk_widget_set_size_request (GTK_WIDGET (TOOL_box), 10, 120);
|
||||||
gtk_box_append (TOOL_box, ZOOM_Label);
|
gtk_box_append (TOOL_box, ZOOM_Label);
|
||||||
return TOOL_box;
|
return TOOL_box;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +81,7 @@ GtkBox *get_XYZ_box(){
|
||||||
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
||||||
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
||||||
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, 250);
|
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, 500);
|
||||||
|
|
||||||
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
||||||
|
@ -97,7 +105,7 @@ GtkProgressBar *get_ELAPSED_TIME_ProgressBar(){ // TODO ? <> rename : DO - UNDO
|
||||||
"\n<--- [buffer] (simulation extensive time) --->\n\
|
"\n<--- [buffer] (simulation extensive time) --->\n\
|
||||||
supports DO - UNDO - REDO functions\n");
|
supports DO - UNDO - REDO functions\n");
|
||||||
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, 0);
|
gtk_widget_set_size_request (GTK_WIDGET (buffer), W - 400, 0);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue