A review of demo catalog with a selection of some widgets of interest.

This commit is contained in:
Jean Sirmai 2024-01-05 10:15:44 +01:00
parent 5a604fa05d
commit 368af2790f
Signed by: jean
GPG Key ID: FB3115C340E057E3
3 changed files with 182 additions and 6 deletions

View File

@ -191,7 +191,7 @@ do_listview_words (GtkWidget *do_widget)
else else
{ {
char **words; char **words;
words = g_strsplit ("lorem ipsum dolor sit amet consectetur adipisci elit sed eiusmod tempor incidunt labore et dolore magna aliqua ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat", " ", -1); words = g_strsplit ("Les sanglots longs des violons de lautomne blessent mon cœur dune langueur monotone", " ", -1);
stringlist = gtk_string_list_new ((const char **) words); stringlist = gtk_string_list_new ((const char **) words);
g_strfreev (words); g_strfreev (words);
} }
@ -202,7 +202,7 @@ do_listview_words (GtkWidget *do_widget)
gtk_filter_list_model_set_incremental (filter_model, TRUE); gtk_filter_list_model_set_incremental (filter_model, TRUE);
window = gtk_window_new (); window = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (window), 400, 600); gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
header = gtk_header_bar_new (); header = gtk_header_bar_new ();
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE); gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);

View File

@ -31,6 +31,152 @@
* You can also use the GTK Inspector, available from the menu on the * You can also use the GTK Inspector, available from the menu on the
* top right, to poke at the running demos, and see how they are put * top right, to poke at the running demos, and see how they are put
* together. * together.
*
In the following list (*.c in gtk-demo dir)
!! <> doesn't work (see line 1087 sqq. in this file)
!!application.c
!!application_demo.c ?? Failed to execute
assistant.c //
!!bluroverlay.c
??builder.c
clipboard.c //
combobox.c //
constraints_builder.c // layouts
constraints.c // simple layout
constraints_interactive.c //
constraints_vfl.c // very simple layout
css_accordion.c //
css_basics.c //
css_blendmodes.c // pictures colors
css_multiplebgs.c //
css_pixbufs.c // animated background
css_shadows.c // stripped background
cursors.c //
!!demo2layout.c
!!demo2widget.c
!!demo3widget.c
!!demo4widget.c
!!demochild.c
!!demoimage.c
!!demolayout.c
!!demotaggedentry.c
!!demowidget.c
dialog.c //
dnd.c // drag and drop
drawingarea.c //
editable_cells.c //
entry_completion.c //
entry_undo.c //
errorstates.c // ?
expander.c //
filtermodel.c //
fishbowl.c //
fixed.c // layout
flowbox.c // layout
font_features.c //
!!fontify.c
!!fontplane.c
fontrendering.c // fontrendering
!!four_point_transform.c
frames.c // backgr. color varies
gears.c // 3D animation
gestures.c // draws a line
glarea.c // triangle in 3D
gltransition.c // complicated !
!!graphwidget.c
!!gskshaderpaintable.c
!!gtkfishbowl.c
!!gtkgears.c
!!gtkshaderbin.c
!!gtkshaderstack.c
!!gtkshadertoy.c
headerbar.c //
!!hsla.c
hypertext.c //
iconscroll.c //
iconview.c //
iconview_edit.c // drag and drop
images.c //
image_scaling.c //
infobar.c //
!!language-names.c
layoutmanager2.c //
layoutmanager.c //
links.c // Ok
listbox.c //
listbox_controls.c //
list_store.c // many columns
listview_applauncher.c //
listview_clocks.c //
listview_colors.c //
!!listview_filebrowser.c
!!listview_minesweeper.c
listview_selections.c //
listview_settings2.c //
listview_settings.c //
listview_ucd.c // char
listview_weather.c //
listview_words.c // OK (favourite)
//main.c
markup.c // text
mask.c //
!!nodewidget.c
overlay.c // grid of numbers
overlay_decorative.c // Dear diary...
pagesetup.c //
paintable_animated.c // sympa
paintable.c //
paintable_emblem.c //
!!paintable_c.c
paintable_svg.c //
paintable_symbolic.c //
paint.c // Ok
panes.c //
password_entry.c //
path_fill.c //
path_maze.c //
path_spinner.c //
path_text.c // whouuh (text)
path_walk.c // whooh (world)
peg_solitaire.c //
pickers.c //
pixbufpaintable.c // (avoid : err)
printing.c // (avoid : err)
!!puzzlepiece.c
read_more.c //
revealer.c //
rotated_text.c //
scale.c //
!!script-names.c
search_entry2.c // Ok
search_entry.c //
!!settings-key.c
shadertoy.c // dynamq view
!!shortcuts.c
shortcut_triggers.c // buttons assoc
sidebar.c //
!!singular_value_decomposition.c
sizegroup.c // layout
sliding_puzzle.c // George Boole
spinbutton.c // increment val
spinner.c //
stack.c //
!!suggestionentry.c
!!svgpaintable.c
tabs.c //
tagged_entry.c //
textmask.c // pango power !
textscroll.c // automatic
textundo.c //
textview.c //
themes.c // flashes !
theming_style_classes.c // (poor)
transparent.c //
tree_store.c // my first one
!!unicode-names.c
video_player.c //
*/ */
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
@ -935,13 +1081,34 @@ activate (GApplication *app)
// GSimpleAction *action; // GSimpleAction *action;
// https://www.gtk.org/
/******************************************************************************/ /******************************************************************************/
/* */ /* */
/* W I N D O W = D O _ S O M E _ A P P L I C A T I O N _ E X A M P L E */ /* W I N D O W = D O _ S O M E _ A P P L I C A T I O N _ E X A M P L E */
/* */ /* */
// window = do_tree_store(NULL); // window = do_tree_store(NULL);
window = do_listview_words(NULL); // window = do_listview_words(NULL);
// window = do_editable_cells(NULL);
// window = do_dnd(NULL); // drag and drop
// window = do_drawingarea(NULL);
// window = do_entry_undo(NULL);
// window = do_expander(NULL);
// window = do_textundo(NULL);
// window = do_search_entry2(NULL);
// window = do_scale(NULL); // scale entries from bars
// window = do_font_features(NULL);
// window = do_hypertext(NULL);
// window = do_iconview_edit(NULL); // drag and drop
// window = do_image_scaling(NULL);
// window = do_infobar(NULL);
// window = do_links(NULL);
// window = do_listbox_controls(NULL);
// window = do_list_store(NULL);
// window = do_listview_colors(NULL);
// window = do_listview_selections(NULL);
// window = do_mask(NULL);
window = do_tree_store(NULL);
/* */ /* */
/******************************************************************************/ /******************************************************************************/
@ -1157,9 +1324,11 @@ main (int argc, char **argv)
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL); g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
g_signal_connect (app, "handle-local-options", G_CALLBACK (local_options), NULL); g_signal_connect (app, "handle-local-options", G_CALLBACK (local_options), NULL);
printf("... tracking ... (line 1327)\n");
g_application_run (G_APPLICATION (app), argc, argv); g_application_run (G_APPLICATION (app), argc, argv);
printf(" (line 1150 in demos/gtk-demo/main.c)\ printf(" (line 1331 in demos/gtk-demo/main.c)\
>> [env] $ clear && meson compile && demos/gtk-demo/gtk4-demo\n"); >> [env] $ clear && meson compile && demos/gtk-demo/gtk4-demo\n");
return 0; return 0;

View File

@ -10,6 +10,13 @@
/* */ /* */
/* >>>>>>>>>>>>>>>>>> Modify line 944 in the main file to run examples <<<<<<<<<<<<<<<<< */ /* >>>>>>>>>>>>>>>>>> Modify line 944 in the main file to run examples <<<<<<<<<<<<<<<<< */
/* */ /* */
/* (gtk4-demo:24025): Gtk-CRITICAL **: 18:52:50.048: gtk_widget_get_display: assertion 'GTK_IS_WIDGET (widget)' failed */
/* in gtk/gtkwidget.c line 6902 : GdkDisplay *gtk_widget_get_display (GtkWidget *widget) { */
/* g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); return _gtk_widget_get_display (widget); } */
/* */
/* (gtk4-demo:24025): Gtk-CRITICAL **: 18:52:50.048: gtk_window_set_display: assertion 'GDK_IS_DISPLAY (display)' failed */
/* in gtk/gtkwindow.c line 5700 : void gtk_window_set_display (GtkWindow *window, GdkDisplay *display) { } */
/* */
/* */ /* */
/* jean@Project:~/Gem-Graph/gem-graph-client/tree (learning)/The_Gnome_way/gtk/builddir [env] $ ctrl D (avant de fermer builder) */ /* jean@Project:~/Gem-Graph/gem-graph-client/tree (learning)/The_Gnome_way/gtk/builddir [env] $ ctrl D (avant de fermer builder) */
/* */ /* */