R U N S P A C E (ergonomie : 1ère version)
This commit is contained in:
parent
d46175032d
commit
62ad9c2e33
|
@ -6,6 +6,7 @@
|
||||||
#include "contain.h"
|
#include "contain.h"
|
||||||
#include "texts.h"
|
#include "texts.h"
|
||||||
|
|
||||||
|
// https://docs.gtk.org/gtk4/section-text-widget.html
|
||||||
|
|
||||||
GtkWidget *get_edit_rules_page_new(){
|
GtkWidget *get_edit_rules_page_new(){
|
||||||
GtkWidget *xxx_grid = gtk_grid_new();
|
GtkWidget *xxx_grid = gtk_grid_new();
|
||||||
|
@ -126,6 +127,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_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
gtk_box_append (bottom_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
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);
|
||||||
|
@ -134,6 +136,7 @@ GtkWidget *get_run_space_bottom_box(){
|
||||||
GtkWidget *get_run_space_page_new(){
|
GtkWidget *get_run_space_page_new(){
|
||||||
GtkBox *page_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *page_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
gtk_box_append (page_box, GTK_WIDGET (get_run_space_top_box()));
|
gtk_box_append (page_box, GTK_WIDGET (get_run_space_top_box()));
|
||||||
|
gtk_box_append (page_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
gtk_box_append (page_box, GTK_WIDGET (get_run_space_bottom_box()));
|
gtk_box_append (page_box, GTK_WIDGET (get_run_space_bottom_box()));
|
||||||
return GTK_WIDGET (page_box);
|
return GTK_WIDGET (page_box);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +177,7 @@ void activate (GtkApplication *app, gpointer user_data) {
|
||||||
gtk_widget_set_size_request (run_xor_edit_horizontal_pane, 0, 0);
|
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 + 400); // ! WARNING ! '90' is AD HOC
|
gtk_paned_set_position (GTK_PANED (run_xor_edit_horizontal_pane), W_IMAGE + 350); // '350' : 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));
|
||||||
}
|
}
|
||||||
|
|
45
contain.h
45
contain.h
|
@ -1,4 +1,4 @@
|
||||||
/******************************************************************************/
|
//******************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* E coli by David S. Goodsell (2009) */
|
/* E coli by David S. Goodsell (2009) */
|
||||||
/* --- */
|
/* --- */
|
||||||
|
@ -14,6 +14,10 @@
|
||||||
#define H_STYLES_PANE 60
|
#define H_STYLES_PANE 60
|
||||||
|
|
||||||
void activate (GtkApplication *app, gpointer user_data);
|
void activate (GtkApplication *app, gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
GtkWidget *get_run_space_left_box();
|
GtkWidget *get_run_space_left_box();
|
||||||
GtkWidget *get_run_space_right_box();
|
GtkWidget *get_run_space_right_box();
|
||||||
|
|
||||||
|
@ -30,44 +34,5 @@ GtkWidget *get_edit_measures_page_new();
|
||||||
GtkWidget *get_edit_results_page_new();
|
GtkWidget *get_edit_results_page_new();
|
||||||
GtkWidget *get_edit_discuss_page_new();
|
GtkWidget *get_edit_discuss_page_new();
|
||||||
GtkWidget *get_edit_help_page_new();
|
GtkWidget *get_edit_help_page_new();
|
||||||
|
|
||||||
// https://docs.gtk.org/gtk4/visual_index.html < widgets gallery
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
>>> Dans : [space_page - mode RUN] doivent être : ------------------------------------------------------
|
|
||||||
|
|
||||||
(1) les commandes de mouvement:
|
|
||||||
- run/stop, slow down/speed up, step by step, do/undo/redo
|
|
||||||
+ le buffer [elapsed time] qui montre le temps de simulation écoulé
|
|
||||||
(2) les commandes qui modifient la perception de l'espace (la caméra)
|
|
||||||
- son orientation (X,Y,Z),
|
|
||||||
+ le zoom,
|
|
||||||
+ les paramètres qui définissent la perspective (distances oeil/écran, écran/objet virtuel)
|
|
||||||
(3) les commandes qui modifient les apparences des objets et des situations d'intérêt
|
|
||||||
(+/- transparents, colorés, etc.)
|
|
||||||
(4) les commandes qui modifient l'apparence de l'espace (grilles, +/- surfaces, aspect des flèches, etc.)
|
|
||||||
(0) NB >>> AUCUNE COMMANDE NE DOIT PERMETTRE D'ÉDITER L'ESPACE ! <<<
|
|
||||||
>>> Dans : [space_page - mode EDIT] doivent être : ------------------------------------------------------
|
|
||||||
(1) les commandes qui modifient la perception de l'espace (la caméra)
|
|
||||||
- son orientation (X,Y,Z),
|
|
||||||
+ le zoom,
|
|
||||||
+ les paramètres qui définissent la perspective (distances oeil/écran, écran/objet virtuel)
|
|
||||||
(2) les commandes qui modifient les apparences des objets et des situations d'intérêt
|
|
||||||
(+/- transparents, colorés, etc.)
|
|
||||||
(3) les commandes qui modifient l'apparence de l'espace (grilles, +/- surfaces, aspect des flèches, etc.)
|
|
||||||
(4) les commandes d'édition locales (drag and drop une flèche)
|
|
||||||
('faire de la place' pour insérer)
|
|
||||||
(sélectionner pour déplacer ou enlever...)
|
|
||||||
NB ces commandes doivent être graphiques et/ou accessibles par raccourcis ou en ligne
|
|
||||||
(5) les commandes d'édition globales
|
|
||||||
(ex: introduire, retirer, transformer +/-aléatoirement (n) objets dans l'espace)
|
|
||||||
NB une action effectuée sur une zone d'intérêt devrait pouvoir être automatiquement appliquée
|
|
||||||
à d'autres zones d'intérêt identifiées comme similaires
|
|
||||||
(0) NB >>> AUCUNE COMMANDE NE DOIT PERMETTRE D'EXÉCUTER UN RUN ! <<<
|
|
||||||
>>> L'objectif est que l'utilisateur ait accès à une organsisation aussi ergonomique que possible -----
|
|
||||||
i.e : chaque utilisateur devrait disposer de 'préférences'
|
|
||||||
c'est-à-dire avoir la possiblité de faire des choix ergonomiques personnalisés.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ static GtkWidget *get_scroll_speed(){
|
||||||
return scroll_speed;
|
return scroll_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkBox *get_SPEED_box(){
|
static GtkBox *get_SPEED_box(){
|
||||||
GtkBox *SPEED_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
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, GTK_WIDGET(gtk_label_new ("\n")));
|
||||||
gtk_box_append (SPEED_box, get_scroll_speed());
|
gtk_box_append (SPEED_box, get_scroll_speed());
|
||||||
|
@ -91,15 +91,12 @@ GtkBox *get_XYZ_box(){
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("\nX 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 (XYZ_scrollbar_box));
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
||||||
|
|
||||||
// gtk_box_set_baseline_position (XYZ_scrollbar_box, GTK_BASELINE_POSITION_BOTTOM);
|
|
||||||
|
|
||||||
return XYZ_labels_box;
|
return XYZ_labels_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
GtkProgressBar *get_ELAPSED_TIME_ProgressBar(){ // TODO ? <> rename : DO - UNDO - REDO ?
|
GtkProgressBar *get_ELAPSED_TIME_ProgressBar(){ // To rename : DO - UNDO - REDO ?
|
||||||
GtkProgressBar *buffer = GTK_PROGRESS_BAR (gtk_progress_bar_new ());
|
GtkProgressBar *buffer = GTK_PROGRESS_BAR (gtk_progress_bar_new ());
|
||||||
gtk_progress_bar_set_text (buffer,\
|
gtk_progress_bar_set_text (buffer,\
|
||||||
"\n<--- [buffer] (simulation extensive time) --->\n\
|
"\n<--- [buffer] (simulation extensive time) --->\n\
|
||||||
|
@ -111,6 +108,8 @@ GtkProgressBar *get_ELAPSED_TIME_ProgressBar(){ // TODO ? <> rename : DO - UNDO
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Chaque label "objet" ou "situation" sera remplacé par un curseur "transparence" (vertical)
|
||||||
|
|
||||||
static GtkBox *get_objects_box(){
|
static GtkBox *get_objects_box(){
|
||||||
GtkBox *objects_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *objects_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" membrane ")));
|
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" membrane ")));
|
||||||
|
|
11
display.h
11
display.h
|
@ -7,21 +7,16 @@
|
||||||
/* */
|
/* */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
GtkWidget *get_SPACE_IMAGE();
|
|
||||||
GtkWidget *get_text_view();
|
GtkWidget *get_text_view();
|
||||||
GtkFrame *get_frame_with_label();
|
GtkFrame *get_frame_with_label();
|
||||||
GtkScrolledWindow *get_scrolled_gl_area();
|
|
||||||
GtkProgressBar *get_ELAPSED_TIME_ProgressBar();
|
|
||||||
|
|
||||||
|
GtkWidget *get_SPACE_IMAGE();
|
||||||
|
GtkProgressBar *get_ELAPSED_TIME_ProgressBar();
|
||||||
GtkBox *get_RUN_STOP_box();
|
GtkBox *get_RUN_STOP_box();
|
||||||
//GtkBox *get_CONTROL_box();
|
|
||||||
GtkBox *get_ZOOM_box();
|
GtkBox *get_ZOOM_box();
|
||||||
GtkBox *get_edit_TOOL_box();
|
GtkBox *get_edit_TOOL_box();
|
||||||
GtkBox *get_XYZ_box();
|
GtkBox *get_XYZ_box();
|
||||||
|
|
||||||
void window_bar(GtkWindow *window, char *title);
|
|
||||||
GtkWidget *get_OBJECTS_and_SITUATIONS();
|
GtkWidget *get_OBJECTS_and_SITUATIONS();
|
||||||
GtkBox *get_ELAPSED_TIME_box();
|
GtkBox *get_ELAPSED_TIME_box();
|
||||||
|
|
||||||
// https://docs.gtk.org/gtk4/section-text-widget.html
|
void window_bar(GtkWindow *window, char *title);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue