preparing two GtkNotebooks : a run_notebook and an edit_notebook
This commit is contained in:
parent
9ae7bc16d3
commit
1a51a01bfc
71
cold.c
71
cold.c
|
@ -121,7 +121,37 @@ GtkScrolledWindow *get_scrolled_gl_area(){
|
|||
|
||||
|
||||
|
||||
GtkWidget *get_measures_page_new(){
|
||||
GtkWidget *get_edit_space_page_new(){
|
||||
GtkWidget *xxx_grid = gtk_grid_new();
|
||||
return xxx_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_edit_rules_page_new(){
|
||||
GtkWidget *xxx_grid = gtk_grid_new();
|
||||
return xxx_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_edit_measures_page_new(){
|
||||
GtkWidget *measures_grid = gtk_grid_new();
|
||||
return measures_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_edit_results_page_new(){
|
||||
GtkWidget *xxx_grid = gtk_grid_new();
|
||||
return xxx_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_edit_discuss_page_new(){
|
||||
GtkWidget *xxx_grid = gtk_grid_new();
|
||||
return xxx_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_edit_help_page_new(){
|
||||
GtkWidget *xxx_grid = gtk_grid_new();
|
||||
return xxx_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_run_measures_page_new(){
|
||||
GtkWidget *measures_grid = gtk_grid_new();
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("movements"), 0, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("transports"), 1, 0, 1, 1);
|
||||
|
@ -131,7 +161,7 @@ GtkWidget *get_measures_page_new(){
|
|||
return measures_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_results_page_new(){
|
||||
GtkWidget *get_run_results_page_new(){
|
||||
GtkWidget *results_grid = gtk_grid_new();
|
||||
gtk_grid_attach (GTK_GRID(results_grid), gtk_button_new_with_label ("Repartitions"), 0, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID(results_grid), gtk_button_new_with_label ("Correlations"), 0, 1, 1, 1);
|
||||
|
@ -139,21 +169,21 @@ GtkWidget *get_results_page_new(){
|
|||
return results_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_discuss_page_new(){
|
||||
GtkWidget *get_run_discuss_page_new(){
|
||||
GtkWidget *discuss_grid = gtk_grid_new();
|
||||
gtk_grid_attach (GTK_GRID (discuss_grid), gtk_button_new_with_label ("Interpretations"), 0, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (discuss_grid), gtk_button_new_with_label ("Discussions"), 0, 1, 1, 1);
|
||||
return discuss_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_help_page_new(){
|
||||
GtkWidget *get_run_help_page_new(){
|
||||
GtkWidget *help_grid = gtk_grid_new();
|
||||
gtk_grid_attach (GTK_GRID (help_grid), gtk_button_new_with_label ("Can I help you ?"), 0, 0, 1, 1);
|
||||
return help_grid;
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *get_rules_page_new(){
|
||||
GtkWidget *get_run_rules_page_new(){
|
||||
GtkWidget *rules_grid = gtk_grid_new();
|
||||
GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_grid_attach (GTK_GRID (rules_grid), hpaned, 0, 0, 1, 1);
|
||||
|
@ -176,7 +206,7 @@ GtkWidget *get_rules_page_new(){
|
|||
}
|
||||
|
||||
|
||||
GtkWidget *get_space_page_new(){
|
||||
GtkWidget *get_run_space_page_new(){
|
||||
|
||||
GtkWidget *space_grid = gtk_grid_new();
|
||||
// attach either : get_ELAPSED_TIME_box() or get_simulation_time_extent_buffer()
|
||||
|
@ -208,17 +238,28 @@ void activate (GtkApplication *app, gpointer user_data) {
|
|||
GtkWindow *window = GTK_WINDOW (gtk_application_window_new (app));
|
||||
window_bar (window, "E coli (with permission from David S. Goodsell, 2009)");
|
||||
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK(gtk_notebook_new());
|
||||
gtk_notebook_set_tab_pos (GTK_NOTEBOOK(notebook), GTK_POS_TOP); // GTK_POS_LEFT
|
||||
GtkNotebook *run_notebook = GTK_NOTEBOOK(gtk_notebook_new());
|
||||
gtk_notebook_set_tab_pos (GTK_NOTEBOOK(run_notebook), GTK_POS_TOP); // GTK_POS_LEFT
|
||||
|
||||
gtk_notebook_append_page (notebook, get_space_page_new(), gtk_label_new ("space"));
|
||||
gtk_notebook_append_page (notebook, get_rules_page_new(), gtk_label_new ("rules"));
|
||||
gtk_notebook_append_page (notebook, get_measures_page_new(),gtk_label_new ("measures"));
|
||||
gtk_notebook_append_page (notebook, get_results_page_new(), gtk_label_new ("results"));
|
||||
gtk_notebook_append_page (notebook, get_discuss_page_new(), gtk_label_new ("interpret"));
|
||||
gtk_notebook_append_page (notebook, get_help_page_new(), gtk_label_new ("help"));
|
||||
gtk_notebook_append_page (run_notebook, get_run_space_page_new(), gtk_label_new ("space"));
|
||||
gtk_notebook_append_page (run_notebook, get_run_rules_page_new(), gtk_label_new ("rules"));
|
||||
gtk_notebook_append_page (run_notebook, get_run_measures_page_new(),gtk_label_new ("measures"));
|
||||
gtk_notebook_append_page (run_notebook, get_run_results_page_new(), gtk_label_new ("results"));
|
||||
gtk_notebook_append_page (run_notebook, get_run_discuss_page_new(), gtk_label_new ("interpret"));
|
||||
gtk_notebook_append_page (run_notebook, get_run_help_page_new(), gtk_label_new ("help"));
|
||||
|
||||
gtk_window_set_child (window, GTK_WIDGET(notebook));
|
||||
GtkNotebook *edit_notebook = GTK_NOTEBOOK(gtk_notebook_new());
|
||||
gtk_notebook_set_tab_pos (GTK_NOTEBOOK(edit_notebook), GTK_POS_TOP); // GTK_POS_LEFT
|
||||
|
||||
gtk_notebook_append_page (edit_notebook, get_edit_space_page_new(), gtk_label_new ("space"));
|
||||
gtk_notebook_append_page (edit_notebook, get_edit_rules_page_new(), gtk_label_new ("rules"));
|
||||
gtk_notebook_append_page (edit_notebook, get_edit_measures_page_new(),gtk_label_new ("measures"));
|
||||
gtk_notebook_append_page (edit_notebook, get_edit_results_page_new(), gtk_label_new ("results"));
|
||||
gtk_notebook_append_page (edit_notebook, get_edit_discuss_page_new(), gtk_label_new ("interpret"));
|
||||
gtk_notebook_append_page (edit_notebook, get_edit_help_page_new(), gtk_label_new ("help"));
|
||||
|
||||
if (0) gtk_window_set_child (window, GTK_WIDGET(edit_notebook));
|
||||
else gtk_window_set_child (window, GTK_WIDGET(run_notebook));
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
|
|
19
cold.h
19
cold.h
|
@ -30,12 +30,19 @@ GtkBox *get_ELAPSED_TIME_box();
|
|||
GtkProgressBar *get_simulation_time_extent_buffer();
|
||||
void activate (GtkApplication *app, gpointer user_data);
|
||||
|
||||
GtkWidget *get_space_page_new();
|
||||
GtkWidget *get_rules_page_new();
|
||||
GtkWidget *get_measures_page_new();
|
||||
GtkWidget *get_results_page_new();
|
||||
GtkWidget *get_discuss_page_new();
|
||||
GtkWidget *get_help_page_new();
|
||||
GtkWidget *get_run_space_page_new();
|
||||
GtkWidget *get_run_rules_page_new();
|
||||
GtkWidget *get_run_measures_page_new();
|
||||
GtkWidget *get_run_results_page_new();
|
||||
GtkWidget *get_run_discuss_page_new();
|
||||
GtkWidget *get_run_help_page_new();
|
||||
|
||||
GtkWidget *get_edit_space_page_new();
|
||||
GtkWidget *get_edit_rules_page_new();
|
||||
GtkWidget *get_edit_measures_page_new();
|
||||
GtkWidget *get_edit_results_page_new();
|
||||
GtkWidget *get_edit_discuss_page_new();
|
||||
GtkWidget *get_edit_help_page_new();
|
||||
|
||||
void click_print_do (GtkWindow *window, GtkWidget *grid,
|
||||
char *label, char *text, int x, int y, int w, int h);
|
||||
|
|
7
hot.c
7
hot.c
|
@ -3,6 +3,7 @@
|
|||
#include "warm.h"
|
||||
#include "cold.h"
|
||||
|
||||
// https://forge.a-lec.org/gem-graph/gem-graph-client/src/branch/devel/Makefile
|
||||
// https://docs.gtk.org/gtk4/visual_index.html < widgets gallery
|
||||
// GTK_ORIENTATION_VERTICAL GTK_ORIENTATION_HORIZONTAL
|
||||
|
||||
|
@ -15,8 +16,10 @@ GtkWidget *get_scroll_interest_0(){
|
|||
GtkBox *get_objects_box(){
|
||||
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 (" enzyme A ")));
|
||||
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" co-enzyme A ")));
|
||||
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" ribosome ")));
|
||||
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" cytochrome C ")));
|
||||
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" ATP synthase ")));
|
||||
gtk_box_append (objects_box, GTK_WIDGET (gtk_label_new (" chromosome ")));
|
||||
return objects_box;
|
||||
}
|
||||
|
@ -26,7 +29,9 @@ GtkBox *get_situations_box(){
|
|||
gtk_box_append (situations_box, GTK_WIDGET (gtk_label_new (" transcription ")));
|
||||
gtk_box_append (situations_box, GTK_WIDGET (gtk_label_new (" épissage ")));
|
||||
gtk_box_append (situations_box, GTK_WIDGET (gtk_label_new (" translation ")));
|
||||
gtk_box_append (situations_box, GTK_WIDGET (gtk_label_new (" transport Na/K ")));
|
||||
gtk_box_append (situations_box, GTK_WIDGET (gtk_label_new (" ubiquitination ")));
|
||||
gtk_box_append (situations_box, GTK_WIDGET (gtk_label_new (" rotation du moteur flagellaire ")));
|
||||
return situations_box;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue