WIP: cleaning the 'gtk_widget_set_size_request()'
This commit is contained in:
parent
415b89fa99
commit
a7f6288db0
|
@ -37,6 +37,9 @@
|
||||||
// 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 H_MY_SCREEN_1000 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);
|
||||||
void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window);
|
void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window);
|
||||||
|
@ -72,8 +75,20 @@ void *widget_get_data_page(); // in : src/widget/data /dispatch.c
|
||||||
|
|
||||||
void *widget_get_stock_text (gchar *text_name);
|
void *widget_get_stock_text (gchar *text_name);
|
||||||
|
|
||||||
#define W_IMAGE_LOCAL 1920 / 32 // 1920 x 960 = ad hoc (pour mon écran)
|
#define W_TREE_160 160
|
||||||
#define H_IMAGE_LOCAL 800
|
#define W_DO_UNDO_REDO_BOX_1300 1300
|
||||||
|
#define H_XYZ_BOX_200 200
|
||||||
|
#define H_OBJECTS_SITUATIONS_130 130
|
||||||
|
#define W_COMPARATOR_64 64
|
||||||
|
#define W_RULES_USE_90 90
|
||||||
|
|
||||||
|
#define W_IMAGE_800 800
|
||||||
|
#define W_IMAGE_100 100
|
||||||
|
|
||||||
|
#define ARBITRARY_PARTITION_1600 1600
|
||||||
|
#define ARBITRARY_PARTITION_750 750
|
||||||
|
#define ARBITRARY_PARTITION_600 600
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* S Y N T H */
|
/* S Y N T H */
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include "../../include/graphics.h"
|
#include "../../include/graphics.h"
|
||||||
#include "../../include/signal.h"
|
#include "../../include/signal.h"
|
||||||
|
|
||||||
|
#define GL_AREA_1000 1000
|
||||||
|
|
||||||
struct stack_index_t {
|
struct stack_index_t {
|
||||||
long stack_id;
|
long stack_id;
|
||||||
void *container_widget;
|
void *container_widget;
|
||||||
|
@ -297,7 +299,7 @@ bool graphics_setup_glarea(int target_mode, GtkWidget *target_widget)
|
||||||
gl_area = GTK_WIDGET(gtk_gl_area_new());
|
gl_area = GTK_WIDGET(gtk_gl_area_new());
|
||||||
assert(gl_area);
|
assert(gl_area);
|
||||||
|
|
||||||
gtk_widget_set_size_request(gl_area, 1000, 1000);
|
gtk_widget_set_size_request(gl_area, GL_AREA_1000, GL_AREA_1000);
|
||||||
gtk_gl_area_set_auto_render(GTK_GL_AREA(gl_area), true);
|
gtk_gl_area_set_auto_render(GTK_GL_AREA(gl_area), true);
|
||||||
gtk_widget_set_hexpand(gl_area, TRUE);
|
gtk_widget_set_hexpand(gl_area, TRUE);
|
||||||
gtk_widget_set_vexpand(gl_area, TRUE);
|
gtk_widget_set_vexpand(gl_area, TRUE);
|
||||||
|
|
|
@ -34,30 +34,18 @@
|
||||||
// "graph", "chart", "plot" and "diagram" are ambiguous terms, sometimes used interchangeably.
|
// "graph", "chart", "plot" and "diagram" are ambiguous terms, sometimes used interchangeably.
|
||||||
// https://www.mathsisfun.com/data/data-graph.php
|
// https://www.mathsisfun.com/data/data-graph.php
|
||||||
|
|
||||||
#define PARTITION_A 700
|
#define PARTITION_700 700
|
||||||
#define PARTITION_B 700
|
|
||||||
|
|
||||||
void *widget_get_data_page()
|
void *widget_get_data_page()
|
||||||
{
|
{
|
||||||
GtkWidget *measures_and_results = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
GtkWidget *measures_and_results = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||||
gtk_paned_set_start_child (GTK_PANED(measures_and_results), GTK_WIDGET (widget_get_measures_page()));
|
gtk_paned_set_start_child (GTK_PANED(measures_and_results), GTK_WIDGET (widget_get_measures_page()));
|
||||||
gtk_paned_set_end_child (GTK_PANED(measures_and_results), GTK_WIDGET (widget_get_results_page()));
|
gtk_paned_set_end_child (GTK_PANED(measures_and_results), GTK_WIDGET (widget_get_results_page()));
|
||||||
gtk_paned_set_position (GTK_PANED (measures_and_results), PARTITION_B);
|
gtk_paned_set_position (GTK_PANED (measures_and_results), PARTITION_700);
|
||||||
gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_results), FALSE);
|
gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_results), FALSE);
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_results), FALSE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_results), FALSE);
|
||||||
|
|
||||||
return measures_and_results;
|
return measures_and_results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void *widget_get_data_page()
|
|
||||||
{
|
|
||||||
GtkWidget *measures_and_data_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
|
||||||
gtk_paned_set_start_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_stock_and_analysis_page()));
|
|
||||||
gtk_paned_set_end_child (GTK_PANED(measures_and_data_horizontal_pane), GTK_WIDGET (widget_get_operations_on_results_page()));
|
|
||||||
gtk_paned_set_position (GTK_PANED (measures_and_data_horizontal_pane), PARTITION_A);
|
|
||||||
gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE);
|
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE);
|
|
||||||
gtk_widget_set_size_request (measures_and_data_horizontal_pane, 1920, 800);
|
|
||||||
|
|
||||||
return measures_and_data_horizontal_pane;
|
|
||||||
}*/
|
|
||||||
|
|
|
@ -58,11 +58,8 @@ void *widget_get_measures_page ()
|
||||||
gtk_box_append (data_box, GTK_WIDGET (frame_rule_topic));
|
gtk_box_append (data_box, GTK_WIDGET (frame_rule_topic));
|
||||||
|
|
||||||
GtkWidget* frame_measures = gtk_frame_new ("measures");
|
GtkWidget* frame_measures = gtk_frame_new ("measures");
|
||||||
// GtkBox *measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8));
|
|
||||||
gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (data_box));
|
gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (data_box));
|
||||||
|
|
||||||
// gtk_widget_set_size_request (GTK_WIDGET (data_box), 200, 0);
|
|
||||||
|
|
||||||
return GTK_WIDGET (frame_measures);
|
return GTK_WIDGET (frame_measures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ void *widget_get_results_page () {
|
||||||
gtk_box_append (data_type_box, GTK_WIDGET (gtk_picture_new_for_filename
|
gtk_box_append (data_type_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/data correlations (4, horizontal).png")));
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/data correlations (4, horizontal).png")));
|
||||||
|
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (data_box), 1800, 700);
|
gtk_widget_set_size_request (GTK_WIDGET (data_box), 1800, 700); // provisoire TODO
|
||||||
return GTK_WIDGET (data_box);
|
return GTK_WIDGET (data_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ static void *get_rule_before()
|
||||||
{
|
{
|
||||||
GtkWidget *rule_before = GTK_WIDGET (gtk_picture_new_for_filename \
|
GtkWidget *rule_before = GTK_WIDGET (gtk_picture_new_for_filename \
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png"));
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/AMP.png"));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (rule_before), 0, H_IMAGE_LOCAL);
|
gtk_widget_set_size_request (GTK_WIDGET (rule_before), 0, W_IMAGE_800); // OK (provisoire)
|
||||||
return GTK_WIDGET (rule_before);
|
return GTK_WIDGET (rule_before);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,49 +44,48 @@ static void *get_rule_after()
|
||||||
{
|
{
|
||||||
GtkWidget *rule_after = GTK_WIDGET (gtk_picture_new_for_filename \
|
GtkWidget *rule_after = GTK_WIDGET (gtk_picture_new_for_filename \
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/ADP.png"));
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/ADP.png"));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (rule_after), 0, H_IMAGE_LOCAL);
|
gtk_widget_set_size_request (GTK_WIDGET (rule_after), 0, W_IMAGE_800); // OK (provisoire))
|
||||||
return GTK_WIDGET (rule_after);
|
return GTK_WIDGET (rule_after);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GtkBox *rec_XYZ_box()
|
static GtkBox *rec_XYZ_box()
|
||||||
{
|
{
|
||||||
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
||||||
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
// GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
|
// GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
|
||||||
// (double min, double max, double step, const char** icons)
|
// (double min, double max, double step, const char** icons)
|
||||||
GtkAdjustment *X_adjust = gtk_adjustment_new (rand() % 100, 0, 380, 1, 0, 0);
|
GtkAdjustment *X_adjust = gtk_adjustment_new (rand() % 100, 0, 380, 1, 0, 0);
|
||||||
GtkAdjustment *Y_adjust = gtk_adjustment_new (rand() % 200, 0, 380, 1, 0, 0);
|
GtkAdjustment *Y_adjust = gtk_adjustment_new (rand() % 200, 0, 380, 1, 0, 0);
|
||||||
GtkAdjustment *Z_adjust = gtk_adjustment_new (rand() % 300, 0, 380, 1, 0, 0);
|
GtkAdjustment *Z_adjust = gtk_adjustment_new (rand() % 300, 0, 380, 1, 0, 0);
|
||||||
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
||||||
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
||||||
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, 400);
|
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 0, H_XYZ_BOX_200); // OK (required)
|
||||||
|
|
||||||
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_Y);
|
gtk_box_append (XYZ_scrollbar_box, scroll_Y);
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_Z);
|
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_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||||
|
|
||||||
GtkWidget *btt_reset = gtk_toggle_button_new ();
|
GtkWidget *btt_reset = gtk_toggle_button_new ();
|
||||||
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("\nX Y Z")));
|
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 (XYZ_scrollbar_box));
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (btt_reset));
|
gtk_box_append (XYZ_labels_box, GTK_WIDGET (btt_reset));
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
||||||
return XYZ_labels_box;
|
return XYZ_labels_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkBox *rec_ZOOM_box()
|
static GtkBox *rec_ZOOM_box()
|
||||||
{
|
{
|
||||||
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
||||||
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
||||||
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80);
|
gtk_box_append (ZOOM_box, ZOOM_Label);
|
||||||
gtk_box_append (ZOOM_box, ZOOM_Label);
|
return ZOOM_box;
|
||||||
return ZOOM_box;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
#include "../../../../include/widget.h"
|
#include "../../../../include/widget.h"
|
||||||
#include "../../../../include/signal.h"
|
#include "../../../../include/signal.h"
|
||||||
|
|
||||||
#define W_IMAGE_ABSURD 1920 / 32 // 1920 x 960 ad hoc (pour mon écran)
|
|
||||||
#define H_IMAGE_ABSURD 960
|
|
||||||
#define MAX_SIZE 255
|
#define MAX_SIZE 255
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -150,10 +148,10 @@ static GtkWidget *do_rtfd (Stack stack_b);
|
||||||
void *widget_get_an_impression_of_what_a_rules_comparator_could_be(){
|
void *widget_get_an_impression_of_what_a_rules_comparator_could_be(){
|
||||||
|
|
||||||
GtkBox *compare_left = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *compare_left = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (compare_left), W_IMAGE_ABSURD, H_IMAGE_ABSURD);
|
gtk_widget_set_size_request (GTK_WIDGET (compare_left), W_COMPARATOR_64, 0);
|
||||||
|
|
||||||
GtkBox *compare_right = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *compare_right = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (compare_right), W_IMAGE_ABSURD, H_IMAGE_ABSURD);
|
gtk_widget_set_size_request (GTK_WIDGET (compare_right), W_COMPARATOR_64, 0);
|
||||||
|
|
||||||
initialize(&stack_b);
|
initialize(&stack_b);
|
||||||
|
|
||||||
|
@ -217,7 +215,7 @@ static GtkWidget *do_rtfd (Stack stack) // TODO
|
||||||
|
|
||||||
|
|
||||||
push_images_onto_stack (stack); // totalement inutile ici
|
push_images_onto_stack (stack); // totalement inutile ici
|
||||||
// peek (NULL); // idem + Erreur de segmentation
|
// peek (NULL); // idem + Erreur de segmentation
|
||||||
// free_intlist (NULL); // idem
|
// free_intlist (NULL); // idem
|
||||||
// add_to_mylist (0); // idem
|
// add_to_mylist (0); // idem
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ void *widget_get_rules_use ()
|
||||||
|
|
||||||
// GtkWidget *frame_rules_use = gtk_frame_new (" Rules use");
|
// GtkWidget *frame_rules_use = gtk_frame_new (" Rules use");
|
||||||
// gtk_frame_set_child (GTK_FRAME (frame_rules_use), GTK_WIDGET (scroll_rules_use));
|
// gtk_frame_set_child (GTK_FRAME (frame_rules_use), GTK_WIDGET (scroll_rules_use));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (scroll_rules_use), W_IMAGE_LOCAL * 1.5, 0);//H_IMAGE_LOCAL);
|
gtk_widget_set_size_request (GTK_WIDGET (scroll_rules_use), W_RULES_USE_90, 0); // OK (required)
|
||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scroll_rules_use), GTK_WIDGET (rules_use_box));
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scroll_rules_use), GTK_WIDGET (rules_use_box));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,15 +47,22 @@ void *widget_get_rules_pilot_box ()
|
||||||
return rules_pilot_box;
|
return rules_pilot_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *get_image_many_bars_vertical ()
|
||||||
|
{
|
||||||
|
GtkBox *image_many_bars_vertical_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
|
gtk_box_append (image_many_bars_vertical_box, GTK_WIDGET (gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/data many bars vertical.png")));
|
||||||
|
gtk_widget_set_size_request (GTK_WIDGET (image_many_bars_vertical_box), W_IMAGE_100, 0);
|
||||||
|
return image_many_bars_vertical_box;
|
||||||
|
}
|
||||||
|
|
||||||
void *widget_get_rules_tree_tools ()
|
void *widget_get_rules_tree_tools ()
|
||||||
{
|
{
|
||||||
GtkBox *rules_tree_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *rules_tree_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_user_rules_tree()));
|
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_user_rules_tree()));
|
||||||
gtk_box_append (rules_tree_box, GTK_WIDGET (gtk_picture_new_for_filename
|
gtk_box_append (rules_tree_box, GTK_WIDGET (get_image_many_bars_vertical()));
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/data many bars vertical.png")));
|
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_rules_use()));
|
||||||
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_rules_use ()));
|
|
||||||
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_an_impression_of_what_a_rules_comparator_could_be()));
|
gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_an_impression_of_what_a_rules_comparator_could_be()));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (rules_tree_box), W_IMAGE_LOCAL * 7.4, 0);//H_IMAGE_LOCAL);
|
|
||||||
return GTK_WIDGET (rules_tree_box);
|
return GTK_WIDGET (rules_tree_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include "../../../include/widget.h"
|
#include "../../../include/widget.h"
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
#define LOWER_COMPARTMENT_PARTITION 1300
|
|
||||||
|
|
||||||
/* L'image de l'état de l'espace (au centre) fait partie d'un panneau "milieu",
|
/* L'image de l'état de l'espace (au centre) fait partie d'un panneau "milieu",
|
||||||
* qui est encadré par les deux panneaux: "haut" et "bas".
|
* qui est encadré par les deux panneaux: "haut" et "bas".
|
||||||
|
@ -65,7 +64,7 @@ void *widget_get_sequence_control()
|
||||||
GTK_WIDGET (gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, adjust)));
|
GTK_WIDGET (gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, adjust)));
|
||||||
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_label_new ("\
|
gtk_box_append (DO_UNDO_REDO_box, GTK_WIDGET(gtk_label_new ("\
|
||||||
DO - UNDO - REDO")));
|
DO - UNDO - REDO")));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (DO_UNDO_REDO_box), LOWER_COMPARTMENT_PARTITION, 0);
|
gtk_widget_set_size_request (GTK_WIDGET (DO_UNDO_REDO_box), W_DO_UNDO_REDO_BOX_1300, 0); // OK (required)
|
||||||
|
|
||||||
gtk_box_append (SEQUENCE_CONTROL_box, GTK_WIDGET (DO_UNDO_REDO_box));
|
gtk_box_append (SEQUENCE_CONTROL_box, GTK_WIDGET (DO_UNDO_REDO_box));
|
||||||
gtk_box_append (SEQUENCE_CONTROL_box, GTK_WIDGET (gtk_button_new_with_label ("R U N / S T O P")));
|
gtk_box_append (SEQUENCE_CONTROL_box, GTK_WIDGET (gtk_button_new_with_label ("R U N / S T O P")));
|
||||||
|
|
|
@ -32,57 +32,44 @@
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
|
|
||||||
/* L'image de l'état de l'espace (au centre) fait partie d'un panneau "milieu",
|
|
||||||
* qui est encadré par les deux panneaux: "haut" et "bas".
|
|
||||||
* La partie droite du panneau "milieu" est elle-même un panneau de commandes.
|
|
||||||
*
|
|
||||||
* Si l'on nomme ces panneaux selon leur fonction, on trouvera:
|
|
||||||
* - CONTROL ou EDIT en bas permet de contrôler / choisir un état et / ou de l'éditer.
|
|
||||||
* ce panneau peut avoir deux apparences (et fonctions) différentes:
|
|
||||||
* - en mode EDIT, seuls les outils d'édition de l'état sont disponibles
|
|
||||||
* - en mode EXEC, seuls les outils de déplacement dans la séquence sont disponibles
|
|
||||||
* - CAMERA à droite permet de choisir la position de la caméra
|
|
||||||
* - CONTRAST en haut permet de modifier un à un les contrastes des objets et des situations
|
|
||||||
* afin de mieux mettre en évidence l'objet ou le phénomène d'intérêt */
|
|
||||||
|
|
||||||
static GtkBox *rec_XYZ_box()
|
static GtkBox *rec_XYZ_box()
|
||||||
{
|
{
|
||||||
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
GtkBox *XYZ_labels_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); // spacing = 2
|
||||||
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
GtkBox *XYZ_scrollbar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
// GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
|
// GtkWidget *scale_X = gtk_scale_button_new (0, 360, 10, NULL); < à étudier
|
||||||
// (double min, double max, double step, const char** icons)
|
// (double min, double max, double step, const char** icons)
|
||||||
GtkAdjustment *X_adjust = gtk_adjustment_new (rand() % 100, 0, 380, 1, 0, 0);
|
GtkAdjustment *X_adjust = gtk_adjustment_new (rand() % 100, 0, 380, 1, 0, 0);
|
||||||
GtkAdjustment *Y_adjust = gtk_adjustment_new (rand() % 200, 0, 380, 1, 0, 0);
|
GtkAdjustment *Y_adjust = gtk_adjustment_new (rand() % 200, 0, 380, 1, 0, 0);
|
||||||
GtkAdjustment *Z_adjust = gtk_adjustment_new (rand() % 300, 0, 380, 1, 0, 0);
|
GtkAdjustment *Z_adjust = gtk_adjustment_new (rand() % 300, 0, 380, 1, 0, 0);
|
||||||
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
GtkWidget *scroll_X = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, X_adjust);
|
||||||
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
GtkWidget *scroll_Y = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Y_adjust);
|
||||||
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
GtkWidget *scroll_Z = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, Z_adjust);
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, 400);
|
gtk_widget_set_size_request (GTK_WIDGET (scroll_X), 1, H_XYZ_BOX_200); // (provisoire) TODO
|
||||||
|
|
||||||
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
gtk_box_append (XYZ_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
gtk_box_append (XYZ_scrollbar_box, scroll_X);
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_Y);
|
gtk_box_append (XYZ_scrollbar_box, scroll_Y);
|
||||||
gtk_box_append (XYZ_scrollbar_box, scroll_Z);
|
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_scrollbar_box, GTK_WIDGET (gtk_label_new (" "))); // AD HOC (pour "centrer")
|
||||||
|
|
||||||
GtkWidget *btt_reset = gtk_toggle_button_new ();
|
GtkWidget *btt_reset = gtk_toggle_button_new ();
|
||||||
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("\nX Y Z")));
|
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 (XYZ_scrollbar_box));
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (btt_reset));
|
gtk_box_append (XYZ_labels_box, GTK_WIDGET (btt_reset));
|
||||||
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
gtk_box_append (XYZ_labels_box, GTK_WIDGET (gtk_label_new ("")));
|
||||||
return XYZ_labels_box;
|
return XYZ_labels_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkBox *rec_ZOOM_box()
|
static GtkBox *rec_ZOOM_box()
|
||||||
{
|
{
|
||||||
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\
|
||||||
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
"\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\
|
||||||
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
---\n arrows\n struct.\n ---\n orient\n state\n in space\n"));
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80);
|
// gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80);
|
||||||
gtk_box_append (ZOOM_box, ZOOM_Label);
|
gtk_box_append (ZOOM_box, ZOOM_Label);
|
||||||
return ZOOM_box;
|
return ZOOM_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,7 +84,7 @@ void *widget_get_space_view()
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
gtk_box_append (central_box, GTK_WIDGET (gtk_picture_new_for_filename
|
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));
|
// ui_setup_glarea (0, GTK_WIDGET (central_box));
|
||||||
|
|
||||||
gtk_box_append (central_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
gtk_box_append (central_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include "../../../include/widget.h"
|
#include "../../../include/widget.h"
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
#define UPPER_COMPARTMENT_PARTITION 600
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* O B J E C T S */
|
/* O B J E C T S */
|
||||||
|
@ -201,15 +200,15 @@ void *widget_get_graph_view_control()
|
||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scroll_situations), frame_situations);
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scroll_situations), frame_situations);
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *objects_and_situations_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
GtkWidget *objects_vs_situations_horizontal_pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_paned_set_start_child (GTK_PANED(objects_and_situations_horizontal_pane), GTK_WIDGET (scroll_objects));
|
gtk_paned_set_start_child (GTK_PANED(objects_vs_situations_horizontal_pane), GTK_WIDGET (scroll_objects));
|
||||||
gtk_paned_set_end_child (GTK_PANED(objects_and_situations_horizontal_pane), GTK_WIDGET (scroll_situations));
|
gtk_paned_set_end_child (GTK_PANED(objects_vs_situations_horizontal_pane), GTK_WIDGET (scroll_situations));
|
||||||
gtk_paned_set_position (GTK_PANED (objects_and_situations_horizontal_pane), UPPER_COMPARTMENT_PARTITION);
|
gtk_paned_set_position (GTK_PANED (objects_vs_situations_horizontal_pane), ARBITRARY_PARTITION_600);
|
||||||
gtk_paned_set_shrink_start_child (GTK_PANED (objects_and_situations_horizontal_pane), FALSE);
|
gtk_paned_set_shrink_start_child (GTK_PANED (objects_vs_situations_horizontal_pane), FALSE);
|
||||||
gtk_paned_set_shrink_end_child (GTK_PANED (objects_and_situations_horizontal_pane), FALSE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (objects_vs_situations_horizontal_pane), FALSE);
|
||||||
gtk_widget_set_size_request (objects_and_situations_horizontal_pane, 0, 127);
|
gtk_widget_set_size_request (objects_vs_situations_horizontal_pane, 0, H_OBJECTS_SITUATIONS_130); // OK (required))
|
||||||
|
|
||||||
return objects_and_situations_horizontal_pane;
|
return objects_vs_situations_horizontal_pane;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,9 @@ static void *widget_get_space_vs_non_time_dependent_analysis()
|
||||||
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 (gtk_picture_new_for_filename
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/data bar graph vertical.png")));
|
("/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), 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), FALSE);
|
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), FALSE);
|
gtk_paned_set_shrink_end_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
||||||
|
|
||||||
return space_vs_non_time_dependent_analysis;
|
return space_vs_non_time_dependent_analysis;
|
||||||
}
|
}
|
||||||
|
@ -55,10 +55,41 @@ void *widget_get_synth_page()
|
||||||
GTK_WIDGET (widget_get_space_vs_non_time_dependent_analysis()));
|
GTK_WIDGET (widget_get_space_vs_non_time_dependent_analysis()));
|
||||||
gtk_paned_set_end_child (GTK_PANED (space_and_analysis_vs_history),
|
gtk_paned_set_end_child (GTK_PANED (space_and_analysis_vs_history),
|
||||||
GTK_WIDGET (widget_get_time_dependent_results_and_time_controls()));
|
GTK_WIDGET (widget_get_time_dependent_results_and_time_controls()));
|
||||||
gtk_paned_set_position (GTK_PANED (space_and_analysis_vs_history), 600);
|
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))
|
||||||
|
|
||||||
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'
|
||||||
|
grep: bin/gem-graph-client : fichiers binaires correspondent
|
||||||
|
src/widget/data/dispatch.c: gtk_paned_set_position (GTK_PANED (measures_and_results), PARTITION_B);
|
||||||
|
src/widget/data/dispatch.c: gtk_paned_set_position (GTK_PANED (measures_and_data_horizontal_pane), PARTITION_A);
|
||||||
|
src/widget/state/top.c: gtk_paned_set_position (GTK_PANED (objects_and_situations_horizontal_pane), UPPER_COMPARTMENT_PARTITION);
|
||||||
|
src/widget/rules/dispatch.c: gtk_paned_set_position (tree_vs_selected, 340); // WARNING : c'est une position "absolue"
|
||||||
|
src/widget/rules/selected/dispatch.c: gtk_paned_set_position (rule_itself_vs_explore_edit_pane, 640); // WARNING : c'est une position "absolue"
|
||||||
|
src/widget/synth/dispatch.c: gtk_paned_set_position (GTK_PANED (space_vs_non_time_dependent_analysis), 1600);
|
||||||
|
src/widget/synth/dispatch.c: gtk_paned_set_position (GTK_PANED (space_and_analysis_vs_history), 600);
|
||||||
|
|
||||||
|
jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $ grep -r 'gtk_paned_set_shrink_'
|
||||||
|
grep: bin/gem-graph-client : fichiers binaires correspondent
|
||||||
|
src/widget/data/dispatch.c: gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_results), FALSE);
|
||||||
|
src/widget/data/dispatch.c: gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_results), FALSE);
|
||||||
|
src/widget/data/dispatch.c: gtk_paned_set_shrink_start_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE);
|
||||||
|
src/widget/data/dispatch.c: gtk_paned_set_shrink_end_child (GTK_PANED (measures_and_data_horizontal_pane), FALSE);
|
||||||
|
src/widget/state/top.c: gtk_paned_set_shrink_start_child (GTK_PANED (objects_and_situations_horizontal_pane), FALSE);
|
||||||
|
src/widget/state/top.c: gtk_paned_set_shrink_end_child (GTK_PANED (objects_and_situations_horizontal_pane), FALSE);
|
||||||
|
src/widget/rules/dispatch.c: gtk_paned_set_shrink_start_child (tree_vs_selected, FALSE);
|
||||||
|
src/widget/rules/dispatch.c: gtk_paned_set_shrink_end_child (tree_vs_selected, FALSE);
|
||||||
|
src/widget/rules/selected/dispatch.c: gtk_paned_set_shrink_start_child (rule_itself_vs_explore_edit_pane, FALSE);
|
||||||
|
src/widget/rules/selected/dispatch.c: gtk_paned_set_shrink_end_child (rule_itself_vs_explore_edit_pane, FALSE);
|
||||||
|
src/widget/synth/dispatch.c: gtk_paned_set_shrink_start_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
||||||
|
src/widget/synth/dispatch.c: gtk_paned_set_shrink_end_child (GTK_PANED (space_vs_non_time_dependent_analysis), TRUE);
|
||||||
|
src/widget/synth/dispatch.c: gtk_paned_set_shrink_start_child (GTK_PANED (space_and_analysis_vs_history), FALSE);
|
||||||
|
src/widget/synth/dispatch.c: gtk_paned_set_shrink_end_child (GTK_PANED (space_and_analysis_vs_history), FALSE);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,10 @@
|
||||||
|
|
||||||
void *widget_get_time_dependent_results_and_time_controls()
|
void *widget_get_time_dependent_results_and_time_controls()
|
||||||
{
|
{
|
||||||
return GTK_WIDGET (gtk_picture_new_for_filename
|
GtkBox *time_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/image/data évolutions parallèles (n > 30) étendu.png"));
|
gtk_box_append (time_box, GTK_WIDGET(widget_get_sequence_control()));
|
||||||
|
gtk_box_append (time_box, GTK_WIDGET(gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/image/data évolutions parallèles (n > 30) étendu.png")));
|
||||||
|
return time_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,38 +85,38 @@ static GListModel *get_user_tree_model (GObject *item, gpointer root)
|
||||||
|
|
||||||
void *widget_get_user_rules_tree ()
|
void *widget_get_user_rules_tree ()
|
||||||
{
|
{
|
||||||
struct TreeNode_t *tree_root = widget_create_user_tree_node("We, the people,");
|
struct TreeNode_t *tree_root = widget_create_user_tree_node("We, the people,");
|
||||||
widget_let_us_create_a_complex_useless_and_expensive_tree (tree_root);
|
widget_let_us_create_a_complex_useless_and_expensive_tree (tree_root);
|
||||||
|
|
||||||
GtkStringList *model = gtk_string_list_new(NULL);
|
GtkStringList *model = gtk_string_list_new(NULL);
|
||||||
gtk_string_list_append (model, tree_root->text);
|
gtk_string_list_append (model, tree_root->text);
|
||||||
GtkSignalListItemFactory *factory = GTK_SIGNAL_LIST_ITEM_FACTORY (gtk_signal_list_item_factory_new());
|
GtkSignalListItemFactory *factory = GTK_SIGNAL_LIST_ITEM_FACTORY (gtk_signal_list_item_factory_new());
|
||||||
g_signal_connect (factory, "setup", G_CALLBACK(on_setup_user_tree_factory), NULL);
|
g_signal_connect (factory, "setup", G_CALLBACK(on_setup_user_tree_factory), NULL);
|
||||||
g_signal_connect (factory, "bind", G_CALLBACK(on_bind_user_tree_factory), NULL);
|
g_signal_connect (factory, "bind", G_CALLBACK(on_bind_user_tree_factory), NULL);
|
||||||
|
|
||||||
GtkTreeListModel *tree_model = gtk_tree_list_model_new(
|
GtkTreeListModel *tree_model = gtk_tree_list_model_new(
|
||||||
G_LIST_MODEL (model),
|
G_LIST_MODEL (model),
|
||||||
FALSE, // Passthrough - False in actual usage with dynamic children retrieval
|
FALSE, // Passthrough - False in actual usage with dynamic children retrieval
|
||||||
TRUE, // FALSE, // autoexpand
|
TRUE, // FALSE, // autoexpand
|
||||||
(GtkTreeListModelCreateModelFunc) &get_user_tree_model,
|
(GtkTreeListModelCreateModelFunc) &get_user_tree_model,
|
||||||
tree_root,
|
tree_root,
|
||||||
NULL // (GDestroyNotify) free_user_tree_node
|
NULL // (GDestroyNotify) free_user_tree_node
|
||||||
);
|
);
|
||||||
|
|
||||||
GtkSingleSelection *selection_model = gtk_single_selection_new (G_LIST_MODEL (tree_model));
|
GtkSingleSelection *selection_model = gtk_single_selection_new (G_LIST_MODEL (tree_model));
|
||||||
gtk_single_selection_set_autoselect (selection_model, FALSE);
|
gtk_single_selection_set_autoselect (selection_model, FALSE);
|
||||||
gtk_single_selection_set_can_unselect (selection_model, TRUE);
|
gtk_single_selection_set_can_unselect (selection_model, TRUE);
|
||||||
GtkWidget *list_view = gtk_list_view_new (GTK_SELECTION_MODEL (selection_model), GTK_LIST_ITEM_FACTORY (factory));
|
GtkWidget *list_view = gtk_list_view_new (GTK_SELECTION_MODEL (selection_model),
|
||||||
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new());
|
GTK_LIST_ITEM_FACTORY (factory));
|
||||||
// Allocation height too small. Tried to allocate 1922x1030, but GtkNotebook 0x25cd4c0 needs at least 1922x1064.
|
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new());
|
||||||
// even if I remove (comment) the next line :
|
gtk_scrolled_window_set_child (scrolled_window, list_view);
|
||||||
gtk_scrolled_window_set_child (scrolled_window, list_view);
|
gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||||
gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
gtk_widget_set_vexpand (GTK_WIDGET (scrolled_window), TRUE);
|
||||||
gtk_widget_set_vexpand (GTK_WIDGET (scrolled_window), TRUE);
|
gtk_widget_set_visible (GTK_WIDGET (scrolled_window), TRUE);
|
||||||
gtk_widget_set_visible (GTK_WIDGET (scrolled_window), TRUE);
|
gtk_widget_set_visible (GTK_WIDGET (list_view), TRUE);
|
||||||
gtk_widget_set_visible (GTK_WIDGET (list_view), TRUE);
|
|
||||||
|
|
||||||
gtk_widget_set_size_request (GTK_WIDGET (scrolled_window), W_IMAGE_LOCAL * 3, 0);
|
gtk_widget_set_size_request (GTK_WIDGET (scrolled_window), W_TREE_160, 0); // OK (required)
|
||||||
return scrolled_window;
|
|
||||||
|
return scrolled_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue