micro commit mais tout va bien

This commit is contained in:
Jean Sirmai 2024-05-09 20:06:08 +02:00
parent 4c1a3ade1f
commit 3415ffde4c
Signed by: jean
GPG Key ID: FB3115C340E057E3
6 changed files with 34 additions and 12 deletions

31
(notes) Normal file
View File

@ -0,0 +1,31 @@
--------------------------------------------------------------------------------
https://docs.gtk.org/gtk4/visual_index.html widgets gallery
https://forge.a-lec.org/gem-graph/gem-graph-client/src/branch/devel/Makefile
https://docs.gtk.org/gtk4/class.Widget.html#height-for-width-geometry-management
https://docs.gtk.org/gtk4/drag-and-drop.html drag-and-drop
https://docs.gtk.org/gtk4/class.GestureZoom.html GtkGestureZoom
--------------------------------------------------------------------------------
GTK_ORIENTATION_VERTICAL GTK_ORIENTATION_HORIZONTAL
g_signal_connect (button, "clicked", G_CALLBACK (printf("%s\n", text)), text);
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
--------------------------------------------------------------------------------
GtkBox GtkGrid GtkRevealer GtkStack
GtkOverlay GtkPaned GtkExpander GtkFixed
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_halign (box, GTK_ALIGN_FILL);
gtk_widget_set_valign (box, GTK_ALIGN_CENTER); // START CENTER END FILL
gtk_window_set_child (GTK_WINDOW (window), box);
puis, après déclaration du bouton, gtk_box_append (GTK_BOX (box), button);
grid = gtk_grid_new ();
gtk_window_set_child (GTK_WINDOW (window), grid);
button = gtk_button_new_with_label (" I "); n fois
gtk_grid_attach (GTK_GRID (grid), button, 0, 0, 1, 1); n fois
--------------------------------------------------------------------------------

BIN
myprogram

Binary file not shown.

View File

@ -166,12 +166,3 @@ void activate (GtkApplication *app, gpointer user_data) {
gtk_window_present (GTK_WINDOW (window)); gtk_window_present (GTK_WINDOW (window));
} }
/* REM !
* g_signal_connect (button, "clicked", G_CALLBACK (printf("%s\n", text)), text);
* g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
*
* drag-and-drop https://docs.gtk.org/gtk4/drag-and-drop.html
*
* GtkGestureZoom https://docs.gtk.org/gtk4/class.GestureZoom.html
*/

BIN
warm.o

Binary file not shown.

View File

@ -16,7 +16,7 @@ GtkWidget *get_test_image(){
image = gtk_image_new_from_file("/home/jean/01/Gtk4/Getting_Started_with_GTK/image aXoris.png"); image = gtk_image_new_from_file("/home/jean/01/Gtk4/Getting_Started_with_GTK/image aXoris.png");
image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image gg sketch.png"); image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image gg sketch.png");
image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image E coli (Goodsell).png"); image = gtk_picture_new_for_filename ("/home/jean/01/Gtk4/Getting_Started_with_GTK/image E coli (Goodsell).png");
gtk_widget_set_size_request (GTK_WIDGET (image), W_IMAGE, NULL); gtk_widget_set_size_request (GTK_WIDGET (image), W_IMAGE, 0);
return image; return image;
} }
@ -35,7 +35,7 @@ GtkBox *get_ZOOM_box(){
GtkBox *get_edit_TOOL_box(){ GtkBox *get_edit_TOOL_box(){
GtkBox *TOOL_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0)); GtkBox *TOOL_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new ("TOOLS\n ---\n(space\nstruct.)")); GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new ("TOOLS\n ---\n(space\nstruct.)"));
// gtk_widget_set_size_request (GTK_WIDGET (TOOL_box), 30, 80); gtk_widget_set_size_request (GTK_WIDGET (TOOL_box), 30, 120);
gtk_box_append (TOOL_box, ZOOM_Label); gtk_box_append (TOOL_box, ZOOM_Label);
return TOOL_box; return TOOL_box;
} }
@ -53,7 +53,7 @@ GtkBox *get_XYZ_box(){
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, 250);
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);

BIN
widgets.o

Binary file not shown.