WIP: cleaning (simplified state page II)

This commit is contained in:
Jean Sirmai 2024-07-03 00:50:21 +02:00
parent 76e3ced6da
commit 98b17ebb16
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 47 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@ -58,7 +58,7 @@ GtkWidget *get_rules_page_new();
GtkWidget *get_text_view();
GtkWidget *get_image_ALL_SPACE();
//GtkWidget *get_image_ALL_SPACE();
GtkWidget *get_image_GLUTAMATE();
GtkWidget *get_image_GLUTAMINE();
GtkWidget *get_image_HISTIDINE();

View File

@ -42,7 +42,7 @@
//------------------------------------------------------------------------------
GtkWidget *get_image_ALL_SPACE(){
static GtkWidget *get_image_ALL_SPACE(){
GtkWidget *image;
// forget > GTK_WIDGET(get_scrolled_gl_area());
// Use GtkImage if you want to display a fixed-size icon
@ -181,7 +181,8 @@ GtkBox *get_XYZ_box(){
gtk_box_append (XYZ_scrollbar_box, scroll_X);
gtk_box_append (XYZ_scrollbar_box, scroll_Y);
gtk_box_append (XYZ_scrollbar_box, scroll_Z);
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
//
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 (gtk_label_new ("")));

View File

@ -32,12 +32,8 @@
#define W 1920 // TODO 2024-06-30
#define H 960 // Ad hoc (pour mon écran)
#define W_IMAGE W - 500
#define H_IMAGE H - 300
#define H_STYLES_PANE 30
#define W_IMAGE_LOCAL W / 16
#define H_IMAGE_LOCAL H / 16
#define TIME_EXEC_CONTROLS_PARTITION 1200
#define LOWER_COMPARTMENT_PARTITION 1200
static GtkWindow *main_window, *dialog_window;
static GtkButton *btt_open_STATE, *btt_open_RULES, *btt_open_DATA;
@ -138,7 +134,9 @@ static GtkWidget *get_OBJECTS_and_SITUATIONS();
GtkWidget *get_edit_space_page_new() {
GtkWidget *space_grid = gtk_grid_new();
gtk_grid_attach (GTK_GRID(space_grid), get_image_ALL_SPACE(), 0, 0, 1, 3);
GtkWidget *image = gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/E coli by D Goodsell.png");
gtk_grid_attach (GTK_GRID(space_grid), image, 0, 0, 1, 3);
gtk_grid_attach (GTK_GRID(space_grid), get_OBJECTS_and_SITUATIONS(), 0, 4, 1, 1);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET (get_XYZ_box()), 1, 0, 1, 2);
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET (get_ZOOM_box()), 1, 2, 1, 2);
@ -170,19 +168,20 @@ GtkWidget *get_selected_rules_vpaned_new() {
static GtkBox *get_DO_UNDO_REDO_box(){
GtkBox *DO_UNDO_REDO_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_label_new ("\n")));
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_label_new ("\
a progress_bar (which shows elapsed time during simulation)")));
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_progress_bar_new ()));
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_label_new ("\n\
DO - UNDO - REDO\n")));
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_label_new ("\
DO - UNDO - REDO")));
return DO_UNDO_REDO_box;
}
static GtkBox *get_RUN_STOP_box(){
GtkBox *RUN_STOP_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_label_new ("\n\n\
gtk_box_append (RUN_STOP_box, GTK_WIDGET(gtk_label_new ("\n\
R U N / S T O P\
SPEED UP <> SLOW DOWN\
STEP by STEP (show active rule) \n\n")));
STEP by STEP (show active rule) \n")));
return RUN_STOP_box;
}
@ -190,7 +189,7 @@ static GtkWidget *get_TIME_EXEC_CONTROLS_box() {
GtkPaned *EXEC_CONTROLS_pane = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
gtk_paned_set_start_child (EXEC_CONTROLS_pane, GTK_WIDGET (get_DO_UNDO_REDO_box()));
gtk_paned_set_end_child (EXEC_CONTROLS_pane, GTK_WIDGET (get_RUN_STOP_box()));
gtk_paned_set_position (EXEC_CONTROLS_pane, TIME_EXEC_CONTROLS_PARTITION);
gtk_paned_set_position (EXEC_CONTROLS_pane, LOWER_COMPARTMENT_PARTITION);
return GTK_WIDGET (EXEC_CONTROLS_pane);
}
@ -200,15 +199,17 @@ GtkWidget *get_SPACE_VIEW_box() {
gtk_box_append (right_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
gtk_box_append (right_box, GTK_WIDGET (get_ZOOM_box()));
GtkBox *middle_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
GtkBox *central_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
// TODO
gtk_box_append (middle_box, GTK_WIDGET (get_image_ALL_SPACE()));
// ui_setup_glarea (0, GTK_WIDGET (middle_box));
GtkWidget *image = gtk_picture_new_for_filename
("/home/jean/Gem-Graph/gem-graph-client/data/image/E coli (Goodsell) 2.png");
gtk_box_append (central_box, GTK_WIDGET (image));
// ui_setup_glarea (0, GTK_WIDGET (central_box));
gtk_box_append (middle_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
gtk_box_append (middle_box, GTK_WIDGET (right_box));
return GTK_WIDGET (middle_box);
gtk_box_append (central_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
gtk_box_append (central_box, GTK_WIDGET (right_box));
return GTK_WIDGET (central_box);
}
static GtkWidget *get_SPACE_EDIT_CONTROLS_box() {
@ -257,7 +258,30 @@ static void window_header_bar (GtkWindow *window, char *title){
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_open_DATA));
icons_for_fun (GTK_HEADER_BAR (header_bar));
GtkButton *go_home = GTK_BUTTON (gtk_button_new ());
gtk_button_set_icon_name (go_home, "go-home-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (go_home));
GtkButton *user_trash = GTK_BUTTON (gtk_button_new ());
gtk_button_set_icon_name (user_trash, "user-trash-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (user_trash));
GtkButton *help_doc = GTK_BUTTON (gtk_button_new ());
gtk_button_set_icon_name (help_doc, "emblem-documents-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (help_doc));
GtkButton *search = GTK_BUTTON (gtk_button_new ());
gtk_button_set_icon_name (search, "folder-saved-search-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (search));
GtkButton *preferences_desktop_appearance = GTK_BUTTON (gtk_button_new ());
gtk_button_set_icon_name (preferences_desktop_appearance, "preferences-desktop-appearance-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (preferences_desktop_appearance));
GtkButton *open_menu = GTK_BUTTON (gtk_button_new ());
gtk_button_set_icon_name (open_menu, "open-menu-symbolic");
gtk_header_bar_pack_end (header_bar, GTK_WIDGET (open_menu));
}
void main_window_design (GtkWindow *main_window){