|
|
|
@ -150,6 +150,79 @@ GtkWidget *get_run_space_page_new(){
|
|
|
|
|
return GTK_WIDGET (page_box);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void icons_for_fun (GtkHeaderBar *header_bar);
|
|
|
|
|
|
|
|
|
|
void window_header_bar (GtkWindow *window, char *title){
|
|
|
|
|
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
|
|
|
|
|
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));
|
|
|
|
|
|
|
|
|
|
// GtkWidget my_window_controls = *gtk_window_controls_new (GTK_PACK_END); // _START
|
|
|
|
|
// gtk_window_controls_set_decoration_layout (GTK_WINDOW_CONTROLS(my_window_controls), NULL); // const char* layout);
|
|
|
|
|
|
|
|
|
|
GtkButton *run_stop_model_exec = GTK_BUTTON (gtk_toggle_button_new ());
|
|
|
|
|
gtk_button_set_icon_name (run_stop_model_exec, "system-shutdown-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (run_stop_model_exec, "media-playback-pause-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (run_stop_model_exec, "media-playback-start-symbolic");
|
|
|
|
|
g_signal_connect (run_stop_model_exec, "clicked", G_CALLBACK (ui_toggle_model_exec), NULL);
|
|
|
|
|
|
|
|
|
|
GtkButton *exec_xor_edit = GTK_BUTTON (gtk_toggle_button_new ());
|
|
|
|
|
// gtk_button_set_icon_name (exec_xor_edit, "system-run-symbolic");
|
|
|
|
|
// g_signal_connect (exec_xor_edit, "clicked", G_CALLBACK (ui_toggle_run_edit), NULL);
|
|
|
|
|
gtk_button_set_icon_name (exec_xor_edit, "document-edit-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (exec_xor_edit, "text-editor-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (exec_xor_edit, "system-run-symbolic");
|
|
|
|
|
g_signal_connect (exec_xor_edit, "clicked", G_CALLBACK (ui_toggle_exec_edit), run_stop_model_exec);
|
|
|
|
|
|
|
|
|
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (exec_xor_edit));
|
|
|
|
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (run_stop_model_exec));
|
|
|
|
|
gtk_window_set_titlebar (window, header_bar);
|
|
|
|
|
|
|
|
|
|
icons_for_fun (GTK_HEADER_BAR (header_bar)); // https://iconduck.com/sets/adwaita-icon-theme
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void icons_for_fun (GtkHeaderBar *header_bar)
|
|
|
|
|
{
|
|
|
|
|
GtkButton *go_home = GTK_BUTTON (gtk_button_new ());
|
|
|
|
@ -220,65 +293,3 @@ static void icons_for_fun (GtkHeaderBar *header_bar)
|
|
|
|
|
gtk_button_set_icon_name (power_low, "power-profile-power-saver-symbolic");
|
|
|
|
|
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (power_low));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void window_header_bar (GtkWindow *window, char *title){
|
|
|
|
|
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
|
|
|
|
|
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));
|
|
|
|
|
|
|
|
|
|
// GtkWidget my_window_controls = *gtk_window_controls_new (GTK_PACK_END); // _START
|
|
|
|
|
// gtk_window_controls_set_decoration_layout (GTK_WINDOW_CONTROLS(my_window_controls), NULL); // const char* layout);
|
|
|
|
|
|
|
|
|
|
GtkButton *run_stop_model_exec = GTK_BUTTON (gtk_toggle_button_new ());
|
|
|
|
|
gtk_button_set_icon_name (run_stop_model_exec, "system-shutdown-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (run_stop_model_exec, "media-playback-pause-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (run_stop_model_exec, "media-playback-start-symbolic");
|
|
|
|
|
g_signal_connect (run_stop_model_exec, "clicked", G_CALLBACK (ui_toggle_model_exec), NULL);
|
|
|
|
|
|
|
|
|
|
GtkButton *exec_xor_edit = GTK_BUTTON (gtk_toggle_button_new ());
|
|
|
|
|
// gtk_button_set_icon_name (exec_xor_edit, "system-run-symbolic");
|
|
|
|
|
// g_signal_connect (exec_xor_edit, "clicked", G_CALLBACK (ui_toggle_run_edit), NULL);
|
|
|
|
|
gtk_button_set_icon_name (exec_xor_edit, "document-edit-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (exec_xor_edit, "text-editor-symbolic");
|
|
|
|
|
gtk_button_set_icon_name (exec_xor_edit, "system-run-symbolic");
|
|
|
|
|
g_signal_connect (exec_xor_edit, "clicked", G_CALLBACK (ui_toggle_exec_edit), run_stop_model_exec);
|
|
|
|
|
|
|
|
|
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (exec_xor_edit));
|
|
|
|
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (run_stop_model_exec));
|
|
|
|
|
gtk_window_set_titlebar (window, header_bar);
|
|
|
|
|
|
|
|
|
|
icons_for_fun (GTK_HEADER_BAR (header_bar)); // https://iconduck.com/sets/adwaita-icon-theme
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|