WIP: Changement de cap : mettre un label dans la GtkBox *runlib_objects; de windows.c
This commit is contained in:
parent
fdc87782c6
commit
d3a64462db
15
src/main.c
15
src/main.c
|
@ -32,26 +32,11 @@
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *view;
|
||||
gtk_init();
|
||||
// window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
// g_signal_connect(window, "delete_event", gtk_main_quit, NULL); /* dirty */
|
||||
g_signal_connect(window, "delete_event", NULL, NULL); /* dirty */
|
||||
// view = create_view_and_model();
|
||||
// gtk_container_add(GTK_CONTAINER(window), view);
|
||||
// gtk_widget_show_all(window);
|
||||
// gtk_main();
|
||||
|
||||
tree_c_test();
|
||||
|
||||
g_autoptr(GemGraphClientApplication) app = NULL;
|
||||
int res;
|
||||
|
||||
// bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
// bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
// textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
app = gem_graph_client_application_new("org.alec.gemgraph",
|
||||
G_APPLICATION_DEFAULT_FLAGS);
|
||||
|
||||
|
|
|
@ -73,6 +73,27 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="runlib_stack">
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">runlib_objects</property>
|
||||
<property name="title" translatable="yes">Objects</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="runlib_objects">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_runlib_objects">
|
||||
<property name="justify">center</property>
|
||||
<property name="label" translatable="yes"><b>Here must be a label (then a tree)</b></property>
|
||||
<property name="use-markup">True</property>
|
||||
<property name="margin-top">50</property>
|
||||
<property name="margin-bottom">50</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">runlib_conditions_and_rules</property>
|
||||
|
@ -89,27 +110,6 @@
|
|||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">runlib_objects</property>
|
||||
<property name="title" translatable="yes">Objects</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="runlib_objects">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_runlib_objects">
|
||||
<property name="justify">center</property>
|
||||
<property name="label" translatable="yes"><b>runlib_objects</b></property>
|
||||
<property name="use-markup">True</property>
|
||||
<property name="margin-top">50</property>
|
||||
<property name="margin-bottom">50</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">runlib_states</property>
|
||||
|
|
|
@ -176,22 +176,16 @@ tree_c_test(void)
|
|||
static void tree_c_printing_test(void)
|
||||
{
|
||||
printf("tree_c_printing_test() \
|
||||
------------------------------------------------------------------\n\
|
||||
(https://en.wikibooks.org/wiki/GTK (modulo) 2B_By_Example/Tree_View/Columns_and_Renderer)\n\
|
||||
Trying to adapt the first example of this tuto to display a simple tree view in our window.\n\
|
||||
Can't use :\n\
|
||||
- gtk_init(&argc, &argv);\n\
|
||||
- window = gtk_tree_view_new(GTK_WINDOW_TOPLEVEL);\n\
|
||||
- g_signal_connect(window, 'delete_event', gtk_main_quit, NULL);\n\
|
||||
- tree_c_test(); (or : create_view_and_model() or some equivalent tree description)\n\
|
||||
- gtk_container_add(GTK_CONTAINER(window), view);\n\
|
||||
- gtk_widget_show_all(window);\n\
|
||||
- gtk_main();\n\
|
||||
(see main.c lines 35-44)\n\
|
||||
-----------------------------------\n\
|
||||
Changement de cap : comment mettre un label (puis un arbre)\n\
|
||||
dans la GtkBox *runlib_objects; de windows.c (ligne 61)\n\
|
||||
?\n\
|
||||
");
|
||||
}
|
||||
|
||||
// https://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Tree_Models
|
||||
// https://stackoverflow.com/questions/74556059/how-to-build-a-tree-in-gtk4-4-10
|
||||
//
|
||||
|
||||
/*
|
||||
https://stackoverflow.com/questions/51002454/how-to-list-all-the-rows-of-a-gtk-treeview
|
||||
|
@ -328,3 +322,18 @@ public class SharpApp : Window
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
(https://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Columns_and_Renderer)\n\
|
||||
Trying to adapt the first example of this tuto to display a simple tree view in our window.\n\
|
||||
Can't use :\n\
|
||||
- gtk_init(&argc, &argv);\n\
|
||||
- window = gtk_tree_view_new(GTK_WINDOW_TOPLEVEL);\n\
|
||||
- g_signal_connect(window, 'delete_event', gtk_main_quit, NULL);\n\
|
||||
- tree_c_test(); (or : create_view_and_model() or some equivalent tree description)\n\
|
||||
- gtk_container_add(GTK_CONTAINER(window), view);\n\
|
||||
- gtk_widget_show_all(window);\n\
|
||||
- gtk_main();\n\
|
||||
(see main.c lines 35-44)\n\
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue