WIP: void window_main_child (...) {...switch (selected_page)...} in contain.c
This commit is contained in:
parent
72736a6165
commit
545e1cb146
|
@ -19,7 +19,6 @@ void on_main_window_activation (GtkApplication *self, gpointer user_data)
|
|||
window_main_child (main_window, 0); // 0 is the state page (see contain.c)
|
||||
window_header_bar (main_window,
|
||||
"E coli (with permission from David S. Goodsell, 2009)");
|
||||
// gtk_window_fullscreen (main_window); << WARNING : no more header bar !
|
||||
gtk_window_present (GTK_WINDOW (main_window));
|
||||
}
|
||||
|
||||
|
|
55
contain.c
55
contain.c
|
@ -52,7 +52,7 @@ GtkWidget *get_edit_help_page_new(){
|
|||
return edit_help_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_run_measures_page_new(){
|
||||
GtkWidget *get_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);
|
||||
|
@ -62,7 +62,7 @@ GtkWidget *get_run_measures_page_new(){
|
|||
return measures_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_run_results_page_new(){
|
||||
GtkWidget *get_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);
|
||||
|
@ -70,14 +70,14 @@ GtkWidget *get_run_results_page_new(){
|
|||
return results_grid;
|
||||
}
|
||||
|
||||
GtkWidget *get_run_discuss_page_new(){
|
||||
GtkWidget *get_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_run_help_page_new(){
|
||||
GtkWidget *get_help_page_new(){
|
||||
GtkWidget *run_help_grid = gtk_grid_new();
|
||||
gtk_grid_attach (GTK_GRID(run_help_grid), GTK_WIDGET(get_frame_with_label()), 0, 0, 1, 1);
|
||||
return run_help_grid;
|
||||
|
@ -139,7 +139,7 @@ GtkWidget *get_SPACE_VIEW_box(){
|
|||
return GTK_WIDGET (middle_box);
|
||||
}
|
||||
|
||||
GtkWidget *get_run_space_page_new(){
|
||||
GtkWidget *get_space_page_new(){
|
||||
GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||
gtk_box_append (page_box, GTK_WIDGET (get_OBJECTS_and_SITUATIONS()));
|
||||
gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||
|
@ -186,47 +186,16 @@ void window_header_bar (GtkWindow *window, char *title){
|
|||
void window_main_child (GtkWindow *main_window, int selected_page){
|
||||
// in_depth.c : enum { STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIGURE };
|
||||
switch (selected_page) {
|
||||
case (0) : gtk_window_set_child (main_window, GTK_WIDGET (get_run_space_page_new())); break;
|
||||
case (1) : gtk_window_set_child (main_window, GTK_WIDGET (get_run_rules_page_new())); break;
|
||||
case (2) : gtk_window_set_child (main_window, GTK_WIDGET (get_run_measures_page_new())); break;
|
||||
case (3) : gtk_window_set_child (main_window, GTK_WIDGET (get_run_results_page_new())); break;
|
||||
case (4) : gtk_window_set_child (main_window, GTK_WIDGET (get_run_discuss_page_new())); break;
|
||||
case (5) : gtk_window_set_child (main_window, GTK_WIDGET (get_run_help_page_new())); break;
|
||||
default : gtk_window_set_child (main_window, GTK_WIDGET (get_run_space_page_new()));
|
||||
case (0) : gtk_window_set_child (main_window, GTK_WIDGET (get_space_page_new())); break;
|
||||
case (1) : gtk_window_set_child (main_window, GTK_WIDGET (get_rules_page_new())); break;
|
||||
case (2) : gtk_window_set_child (main_window, GTK_WIDGET (get_measures_page_new())); break;
|
||||
case (3) : gtk_window_set_child (main_window, GTK_WIDGET (get_results_page_new())); break;
|
||||
case (4) : gtk_window_set_child (main_window, GTK_WIDGET (get_discuss_page_new())); break;
|
||||
case (5) : gtk_window_set_child (main_window, GTK_WIDGET (get_help_page_new())); break;
|
||||
default : gtk_window_set_child (main_window, GTK_WIDGET (get_space_page_new()));
|
||||
}
|
||||
}
|
||||
|
||||
void two_notebooks_in_two_panes (GtkWindow *window) {
|
||||
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 (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"));
|
||||
|
||||
GtkNotebook *edit_notebook = GTK_NOTEBOOK(gtk_notebook_new());
|
||||
gtk_notebook_set_tab_pos (GTK_NOTEBOOK(edit_notebook), GTK_POS_TOP); // GTK_POS_RIGHT
|
||||
|
||||
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"));
|
||||
|
||||
GtkWidget *exec_xor_edit_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_widget_set_size_request (exec_xor_edit_horizontal_pane, 0, 0);
|
||||
gtk_paned_set_start_child (GTK_PANED(exec_xor_edit_horizontal_pane), GTK_WIDGET (run_notebook));
|
||||
gtk_paned_set_end_child (GTK_PANED(exec_xor_edit_horizontal_pane), GTK_WIDGET (edit_notebook));
|
||||
gtk_paned_set_position (GTK_PANED (exec_xor_edit_horizontal_pane), W_IMAGE + 350); // '350' : AD HOC
|
||||
gtk_window_set_child (window, GTK_WIDGET(exec_xor_edit_horizontal_pane));
|
||||
|
||||
gtk_notebook_set_current_page (run_notebook, 0); // @see hot.c 2024-05-11 (line 68)
|
||||
gtk_notebook_set_current_page (edit_notebook, 1); // @see hot.c 2024-05-11 (line 68)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ GtkWidget *get_rules_tree_hpaned_new(){
|
|||
return GTK_WIDGET (H_tree_vs_comparison);
|
||||
}
|
||||
|
||||
GtkWidget *get_run_rules_page_new(){
|
||||
GtkWidget *get_rules_page_new(){
|
||||
GtkPaned *H_tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
|
||||
// GtkWidget *arbre_des_règles = gtk_frame_new ("Arbre des règles");
|
||||
|
|
Loading…
Reference in New Issue