preparing measures edition (see text 'pratique.txt') + cleaning
This commit is contained in:
parent
a7f6288db0
commit
f959a8012b
Binary file not shown.
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 141 KiB |
|
@ -1,54 +0,0 @@
|
||||||
|
|
||||||
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),
|
|
||||||
+ l'orientation (X,Y,Z) de l'état dans l'espace (six possibilités),
|
|
||||||
+ 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),
|
|
||||||
+ l'orientation (X,Y,Z) de l'état dans l'espace (six possibilités),
|
|
||||||
+ 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.
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
any text
|
|
||||||
(please, edit...)
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
ERGONOMIE, PRÉFÉRENCES -----------------------------------------------
|
||||||
|
|
||||||
|
Liste des préférences possibles :
|
||||||
|
|
||||||
|
- polices, couleurs, apparences des widgets (icones, textes, traductions)
|
||||||
|
- widgets 'mandatory' vs d'autres facultatifs (à certains emplacements)
|
||||||
|
>> sélection de certains widgets (parmi une liste)
|
||||||
|
- disposition 'libre' de certains boutons ? de certaines 'sous-fenêtres' ?
|
||||||
|
- macros (habitudes, facilitation de cycles de travail)
|
||||||
|
(accepter plusieurs chemins possibles pour effectuer une même tâche)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************/
|
||||||
|
É D I T I O N D E M E S U R E S
|
||||||
|
/**********************************************************************/
|
||||||
|
|
||||||
|
ÉDITION DE MESURES
|
||||||
|
|
||||||
|
(1) SÉLECTION d'un ou plusieurs ensembles de règles (au moins une règle)
|
||||||
|
|
||||||
|
(2) ACTION à exécuter orsque l'une de ces règles est appliquée:
|
||||||
|
|
||||||
|
- incrémentation d'un 'compteur de règle'
|
||||||
|
- calcul d'un 'temps' entre une 'règle de début' et une 'règle de fin'
|
||||||
|
(quel 'temps' choisir ?)
|
||||||
|
- mesure d'une valeur modifiée 'avant / après'
|
||||||
|
|
||||||
|
(3) OBSERVATIONS POSSIBLES
|
||||||
|
|
||||||
|
- fréquence d'utilisation d'une règle
|
||||||
|
- durée de vie d'un objet ou d'une situation
|
||||||
|
- variation d'une grandeur (autre que le temps) avant / après
|
||||||
|
|
||||||
|
(*) ANALYSE DE L'ÉTAT (pattern recognition)
|
||||||
|
|
||||||
|
À quelle fréquence ?
|
||||||
|
Systématiquement ? Aléatoirement ? Les deux ?
|
||||||
|
Signal déclenchant ? (exécution d'une règle) (ou d'une dans un groupe)
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************/
|
||||||
|
D A T A B A S E R É S U L T A T S
|
||||||
|
/**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************/
|
||||||
|
P R É S E N T A T I O N R É S U L T A T S
|
||||||
|
/**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EXEC / EDIT ----------------------------------------------------------
|
||||||
|
|
||||||
|
Les commandes se regroupent par blocs
|
||||||
|
selon leurs fonctions et/ou leurs présentations.
|
||||||
|
|
||||||
|
Les commandes de 'mouvement' ou de gestion du temps de simulation :
|
||||||
|
- run/stop, slow down/speed up, step by step, do/undo/redo
|
||||||
|
+ le buffer [elapsed time] qui montre le temps de simulation écoulé
|
||||||
|
|
||||||
|
Les commandes qui modifient la perception de l'espace (la caméra)
|
||||||
|
- son orientation (X,Y,Z),
|
||||||
|
+ l'orientation (X,Y,Z) de l'état dans l'espace (six possibilités),
|
||||||
|
+ le zoom,
|
||||||
|
+ les paramètres qui définissent la perspective
|
||||||
|
(distances oeil/écran, écran/objet virtuel)
|
||||||
|
|
||||||
|
Les commandes qui modifient les apparences des objets dans l'espace
|
||||||
|
(couleur, transparence...) et des situations d'intérêt
|
||||||
|
|
||||||
|
Les commandes qui modifient l'apparence de l'espace lui-même
|
||||||
|
(grilles, +/- surfaces, aspect des flèches, etc.)
|
||||||
|
|
||||||
|
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...)
|
||||||
|
|
||||||
|
Les commandes d'édition globales
|
||||||
|
ex: introduire, retirer, transformer (n) objets dans l'espace
|
||||||
|
systématiquement ou aléatoirement
|
||||||
|
|
||||||
|
NB Toute édition effectuée sur une zone d'intérêt doit pouvoir être
|
||||||
|
automatiquement appliquée à d'autres zones d'intérêt similaires
|
||||||
|
|
||||||
|
EN MODE EXEC, AUCUNE COMMANDE NE DOIT PERMETTRE D'ÉDITER L'ESPACE
|
||||||
|
EN MODE EDIT, AUCUNE COMMANDE NE DOIT PERMETTRE D'EXÉCUTER UN RUN
|
||||||
|
|
||||||
|
Les transitions entre ces deux modes
|
||||||
|
demandent s'il y a lieu de sauver l'état courant
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,11 @@
|
||||||
// called in dispatch.c
|
// called in dispatch.c
|
||||||
// functions are in topbar.c
|
// functions are in topbar.c
|
||||||
|
|
||||||
#define W_MY_SCREEN_1920 1920 // 1920 x 960 = ad hoc (pour mon écran))
|
#define W_MY_SCREEN 1920 // 1920 x 960 = ad hoc (pour mon écran))
|
||||||
#define H_MY_SCREEN_1000 1000
|
#define H_MY_SCREEN 1000 // Full HD (1920 x 1080 pixels)
|
||||||
|
|
||||||
|
#define W_TEXT_WINDOW 550 // ad hoc (mais sans conséquences ici)
|
||||||
|
#define H_TEXT_WINDOW 1000
|
||||||
|
|
||||||
void widget_design_main_window (GtkWindow *main_window);
|
void widget_design_main_window (GtkWindow *main_window);
|
||||||
void widget_design_dialog_window (GtkWindow *main_window, GtkWindow *dialog_window);
|
void widget_design_dialog_window (GtkWindow *main_window, GtkWindow *dialog_window);
|
||||||
|
@ -73,8 +76,6 @@ void *widget_get_state_page(); // in : src/widget/state/dispatch.c
|
||||||
void *widget_get_rules_page(); // in : src/widget/rules/dispatch.c
|
void *widget_get_rules_page(); // in : src/widget/rules/dispatch.c
|
||||||
void *widget_get_data_page(); // in : src/widget/data /dispatch.c
|
void *widget_get_data_page(); // in : src/widget/data /dispatch.c
|
||||||
|
|
||||||
void *widget_get_stock_text (gchar *text_name);
|
|
||||||
|
|
||||||
#define W_TREE_160 160
|
#define W_TREE_160 160
|
||||||
#define W_DO_UNDO_REDO_BOX_1300 1300
|
#define W_DO_UNDO_REDO_BOX_1300 1300
|
||||||
#define H_XYZ_BOX_200 200
|
#define H_XYZ_BOX_200 200
|
||||||
|
@ -165,9 +166,10 @@ void *widget_get_user_rules_tree (); // see "labo.c" for specification of the tr
|
||||||
// functions in : widget / stock.c
|
// functions in : widget / stock.c
|
||||||
// used by text_window (see topbar/dispatch.c))
|
// used by text_window (see topbar/dispatch.c))
|
||||||
|
|
||||||
|
void *widget_get_text_from_address (gchar *text_name);
|
||||||
|
|
||||||
char *widget_get_text_address_theory ();
|
char *widget_get_text_address_theory ();
|
||||||
char *widget_get_text_address_about_commands ();
|
char *widget_get_text_address_practice ();
|
||||||
char *widget_get_text_address_any ();
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -52,6 +52,9 @@
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#define PARTITION_SPACE_VS_CONTROLS_1 920
|
||||||
|
#define PARTITION_SPACE_VS_CONTROLS_2 800
|
||||||
|
|
||||||
void *widget_get_state_page()
|
void *widget_get_state_page()
|
||||||
{
|
{
|
||||||
GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
|
@ -59,9 +62,19 @@ void *widget_get_state_page()
|
||||||
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
gtk_box_append (page_box, GTK_WIDGET (widget_get_space_view()));
|
gtk_box_append (page_box, GTK_WIDGET (widget_get_space_view()));
|
||||||
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
if (fsm_get_exec_edit ()) gtk_box_append (page_box, GTK_WIDGET (widget_get_space_edit_control()));
|
|
||||||
else gtk_box_append (page_box, GTK_WIDGET (widget_get_sequence_control()));
|
GtkWidget *view_space_vs_controls = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||||
return GTK_WIDGET (page_box);
|
gtk_paned_set_start_child (GTK_PANED(view_space_vs_controls), GTK_WIDGET (page_box));
|
||||||
|
|
||||||
|
if (fsm_get_exec_edit ()) gtk_paned_set_end_child (GTK_PANED(view_space_vs_controls), GTK_WIDGET (widget_get_space_edit_control()));
|
||||||
|
else gtk_paned_set_end_child (GTK_PANED(view_space_vs_controls), GTK_WIDGET (widget_get_sequence_control()));
|
||||||
|
|
||||||
|
if (fsm_get_exec_edit ()) gtk_paned_set_position (GTK_PANED (view_space_vs_controls), PARTITION_SPACE_VS_CONTROLS_2);
|
||||||
|
else gtk_paned_set_position (GTK_PANED (view_space_vs_controls), PARTITION_SPACE_VS_CONTROLS_1);
|
||||||
|
gtk_paned_set_shrink_start_child (GTK_PANED (view_space_vs_controls), FALSE);
|
||||||
|
gtk_paned_set_shrink_end_child (GTK_PANED (view_space_vs_controls), FALSE);
|
||||||
|
|
||||||
|
return view_space_vs_controls; // GTK_WIDGET (page_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -72,24 +72,30 @@ static GtkBox *rec_ZOOM_box()
|
||||||
return ZOOM_box;
|
return ZOOM_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define PARTITION_SPACE_VS_CAMERA 1860
|
||||||
|
|
||||||
void *widget_get_space_view()
|
void *widget_get_space_view()
|
||||||
{
|
{
|
||||||
GtkBox *right_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *E_coli = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
gtk_box_append (right_box, GTK_WIDGET (rec_XYZ_box()));
|
gtk_box_append (GTK_BOX (E_coli), GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
gtk_box_append (right_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
|
||||||
gtk_box_append (right_box, GTK_WIDGET (rec_ZOOM_box()));
|
|
||||||
|
|
||||||
GtkBox *central_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
gtk_box_append (central_box, GTK_WIDGET (gtk_picture_new_for_filename
|
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/E coli by D Goodsell.png")));
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/E coli by D Goodsell.png")));
|
||||||
// ui_setup_glarea (0, GTK_WIDGET (central_box));
|
gtk_widget_set_size_request (GTK_WIDGET (E_coli), 0, H_E_COLI); // (provisoire) TODO
|
||||||
|
|
||||||
gtk_box_append (central_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
// TODO replace this image by >> ui_setup_glarea (0, GTK_WIDGET (~));
|
||||||
gtk_box_append (central_box, GTK_WIDGET (right_box));
|
|
||||||
return GTK_WIDGET (central_box);
|
GtkBox *camera = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
|
gtk_box_append (camera, GTK_WIDGET (rec_XYZ_box()));
|
||||||
|
gtk_box_append (camera, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
|
gtk_box_append (camera, GTK_WIDGET (rec_ZOOM_box()));
|
||||||
|
|
||||||
|
GtkWidget *view_space_vs_camera = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
gtk_paned_set_start_child (GTK_PANED (view_space_vs_camera), GTK_WIDGET (E_coli));
|
||||||
|
gtk_paned_set_end_child (GTK_PANED (view_space_vs_camera), GTK_WIDGET (camera));
|
||||||
|
gtk_paned_set_shrink_start_child (GTK_PANED (view_space_vs_camera), FALSE);
|
||||||
|
gtk_paned_set_shrink_end_child (GTK_PANED (view_space_vs_camera), FALSE);
|
||||||
|
gtk_paned_set_position (GTK_PANED (view_space_vs_camera), PARTITION_SPACE_VS_CAMERA);
|
||||||
|
|
||||||
|
return GTK_WIDGET (view_space_vs_camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,14 +33,27 @@
|
||||||
#include "../../../include/widget.h"
|
#include "../../../include/widget.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void *widget_get_non_time_dependent_analysis_elements() // for fun !
|
||||||
|
{
|
||||||
|
GtkBox *results_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
|
gtk_box_append (results_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/data bar graph vertical.png")));
|
||||||
|
gtk_box_append (results_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/data correlations (4, horizontal).png")));
|
||||||
|
gtk_box_append (results_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/data network interpretation (bump chart).png")));
|
||||||
|
gtk_box_append (results_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/hb.png")));
|
||||||
|
return results_box;
|
||||||
|
}
|
||||||
|
|
||||||
static void *widget_get_space_vs_non_time_dependent_analysis()
|
static void *widget_get_space_vs_non_time_dependent_analysis()
|
||||||
{
|
{
|
||||||
GtkWidget *space_vs_non_time_dependent_analysis = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
GtkWidget *space_vs_non_time_dependent_analysis = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_paned_set_start_child (GTK_PANED (space_vs_non_time_dependent_analysis),
|
gtk_paned_set_start_child (GTK_PANED (space_vs_non_time_dependent_analysis),
|
||||||
GTK_WIDGET (widget_get_space_view()));
|
GTK_WIDGET (widget_get_space_view()));
|
||||||
gtk_paned_set_end_child (GTK_PANED (space_vs_non_time_dependent_analysis),
|
gtk_paned_set_end_child (GTK_PANED (space_vs_non_time_dependent_analysis),
|
||||||
GTK_WIDGET (gtk_picture_new_for_filename
|
GTK_WIDGET (widget_get_non_time_dependent_analysis_elements()));
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/data bar graph vertical.png")));
|
|
||||||
gtk_paned_set_position (GTK_PANED (space_vs_non_time_dependent_analysis), ARBITRARY_PARTITION_1600);
|
gtk_paned_set_position (GTK_PANED (space_vs_non_time_dependent_analysis), ARBITRARY_PARTITION_1600);
|
||||||
gtk_paned_set_shrink_start_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
gtk_paned_set_shrink_start_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
||||||
|
@ -58,11 +71,29 @@ void *widget_get_synth_page()
|
||||||
gtk_paned_set_position (GTK_PANED (space_and_analysis_vs_history), ARBITRARY_PARTITION_750);
|
gtk_paned_set_position (GTK_PANED (space_and_analysis_vs_history), ARBITRARY_PARTITION_750);
|
||||||
gtk_paned_set_shrink_start_child (GTK_PANED (space_and_analysis_vs_history), FALSE);
|
gtk_paned_set_shrink_start_child (GTK_PANED (space_and_analysis_vs_history), FALSE);
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (space_and_analysis_vs_history), FALSE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (space_and_analysis_vs_history), FALSE);
|
||||||
gtk_widget_set_size_request (space_and_analysis_vs_history, 0, H_MY_SCREEN_1000); // OK (required))
|
gtk_widget_set_size_request (space_and_analysis_vs_history, 0, H_MY_SCREEN); // OK (required))
|
||||||
|
|
||||||
return space_and_analysis_vs_history;
|
return space_and_analysis_vs_history;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $ grep -r 'gtk_paned_set_position'
|
jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $ grep -r 'gtk_paned_set_position'
|
||||||
grep: bin/gem-graph-client : fichiers binaires correspondent
|
grep: bin/gem-graph-client : fichiers binaires correspondent
|
||||||
|
|
|
@ -95,13 +95,7 @@ char *widget_get_text_address_theory () {
|
||||||
return "/home/jean/Gem-Graph/gem-graph-client/data/text/théorie.txt";
|
return "/home/jean/Gem-Graph/gem-graph-client/data/text/théorie.txt";
|
||||||
}
|
}
|
||||||
|
|
||||||
char *widget_get_text_address_about_commands () {
|
char *widget_get_text_address_practice () {
|
||||||
return "/home/jean/Gem-Graph/gem-graph-client/data/text/about_commands.txt";
|
return "/home/jean/Gem-Graph/gem-graph-client/data/text/pratique.txt";
|
||||||
}
|
}
|
||||||
|
|
||||||
char *widget_get_text_address_any () {
|
|
||||||
return "/home/jean/Gem-Graph/gem-graph-client/data/text/any.txt";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,6 @@
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
#include "../../../include/widget.h"
|
#include "../../../include/widget.h"
|
||||||
|
|
||||||
#define W_TEXT_WINDOW 700 // ad hoc (mais sans conséquences ici)
|
|
||||||
#define H_TEXT_WINDOW 1000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* T E X T W I N D O W */
|
/* T E X T W I N D O W */
|
||||||
|
@ -48,8 +44,8 @@ void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window)
|
||||||
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));
|
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));
|
||||||
gtk_window_set_titlebar (text_window, header_bar);
|
gtk_window_set_titlebar (text_window, header_bar);
|
||||||
|
|
||||||
GtkWidget *child = widget_get_stock_text (widget_get_text_address_theory());
|
GtkWidget *child = widget_get_text_from_address (widget_get_text_address_theory());
|
||||||
child = widget_get_stock_text (widget_get_text_address_about_commands());
|
child = widget_get_text_from_address (widget_get_text_address_practice());
|
||||||
gtk_window_set_child (GTK_WINDOW (text_window), GTK_WIDGET (child));
|
gtk_window_set_child (GTK_WINDOW (text_window), GTK_WIDGET (child));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (child), W_TEXT_WINDOW, H_TEXT_WINDOW);
|
gtk_widget_set_size_request (GTK_WIDGET (child), W_TEXT_WINDOW, H_TEXT_WINDOW);
|
||||||
|
|
||||||
|
@ -60,7 +56,7 @@ void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void *widget_get_stock_text (gchar *text_address) {
|
void *widget_get_text_from_address (gchar *text_address) {
|
||||||
GtkWidget *view = gtk_text_view_new ();
|
GtkWidget *view = gtk_text_view_new ();
|
||||||
GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||||
gtk_text_buffer_set_text (buffer, read_file (text_address), -1);
|
gtk_text_buffer_set_text (buffer, read_file (text_address), -1);
|
||||||
|
|
Loading…
Reference in New Issue