learning GTK4 tree (bottom-up)
This commit is contained in:
parent
1eef2ad9c6
commit
1a1b369fbb
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
GtkWidget *get_text_view();
|
GtkWidget *get_text_view();
|
||||||
GtkFrame *get_frame_with_label();
|
GtkFrame *get_frame_with_label();
|
||||||
|
GtkWidget *get_run_rules_page_new();
|
||||||
|
|
||||||
GtkWidget *get_image_ALL_SPACE();
|
GtkWidget *get_image_ALL_SPACE();
|
||||||
GtkWidget *get_image_GLUTAMATE();
|
GtkWidget *get_image_GLUTAMATE();
|
||||||
|
|
6
hot.c
6
hot.c
|
@ -15,11 +15,12 @@
|
||||||
|
|
||||||
static void on_experimental_expander_toggled(GtkExpander *expander, gpointer user_data){
|
static void on_experimental_expander_toggled(GtkExpander *expander, gpointer user_data){
|
||||||
gtk_expander_set_expanded (expander, gtk_expander_get_expanded (expander));
|
gtk_expander_set_expanded (expander, gtk_expander_get_expanded (expander));
|
||||||
printf(">>>>>>> %s <<<<<<<\n", gtk_expander_get_label (user_data));
|
printf("> %s\n", gtk_expander_get_label (user_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkBox *get_experimental_box_new(){
|
GtkBox *get_experimental_box_new(){
|
||||||
GtkBox *experimental_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
GtkBox *experimental_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
||||||
|
gtk_widget_set_size_request (GTK_WIDGET (experimental_box), 0, 400);
|
||||||
gtk_box_append (experimental_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
gtk_box_append (experimental_box, GTK_WIDGET(gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
|
||||||
gtk_box_append (experimental_box, GTK_WIDGET(gtk_label_new ("\n\n")));
|
gtk_box_append (experimental_box, GTK_WIDGET(gtk_label_new ("\n\n")));
|
||||||
|
|
||||||
|
@ -32,11 +33,10 @@ GtkBox *get_experimental_box_new(){
|
||||||
GtkExpander *it_s_me = GTK_EXPANDER (gtk_expander_new ("it's me !"));
|
GtkExpander *it_s_me = GTK_EXPANDER (gtk_expander_new ("it's me !"));
|
||||||
gtk_expander_set_expanded (GTK_EXPANDER (it_s_me), FALSE);
|
gtk_expander_set_expanded (GTK_EXPANDER (it_s_me), FALSE);
|
||||||
gtk_widget_set_margin_start(GTK_WIDGET (it_s_me), 20);
|
gtk_widget_set_margin_start(GTK_WIDGET (it_s_me), 20);
|
||||||
g_signal_connect (hello, "activate", G_CALLBACK (on_experimental_expander_toggled), it_s_me);
|
g_signal_connect (it_s_me, "activate", G_CALLBACK (on_experimental_expander_toggled), it_s_me);
|
||||||
gtk_box_append (experimental_box, GTK_WIDGET (it_s_me));
|
gtk_box_append (experimental_box, GTK_WIDGET (it_s_me));
|
||||||
|
|
||||||
gtk_box_append (experimental_box, GTK_WIDGET(gtk_label_new ("\n\n")));
|
gtk_box_append (experimental_box, GTK_WIDGET(gtk_label_new ("\n\n")));
|
||||||
|
|
||||||
return experimental_box;
|
return experimental_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
hot.h
2
hot.h
|
@ -12,5 +12,5 @@
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "contain.h"
|
#include "contain.h"
|
||||||
|
|
||||||
GtkWidget *get_run_rules_page_new();
|
|
||||||
GtkBox *get_experimental_box_new();
|
GtkBox *get_experimental_box_new();
|
||||||
|
|
3
tree.c
3
tree.c
|
@ -263,9 +263,8 @@ static void ui_create_tree (GtkWidget *target_widget)
|
||||||
|
|
||||||
GtkBox *get_rules_user_tree_new(){
|
GtkBox *get_rules_user_tree_new(){
|
||||||
GtkBox *tree_sketch_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
GtkBox *tree_sketch_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
||||||
ui_create_tree (GTK_WIDGET (tree_sketch_box));
|
|
||||||
|
|
||||||
gtk_box_append (tree_sketch_box, GTK_WIDGET (get_experimental_box_new()));
|
gtk_box_append (tree_sketch_box, GTK_WIDGET (get_experimental_box_new()));
|
||||||
|
ui_create_tree (GTK_WIDGET (tree_sketch_box));
|
||||||
return tree_sketch_box;
|
return tree_sketch_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue