Commit a469257a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Add an expander example.

2006-01-10  Matthias Clasen  <mclasen@redhat.com>

	* tests/testgtk.c: Add an expander example.
parent 4da4ca31
2006-01-10 Matthias Clasen <mclasen@redhat.com>
* tests/testgtk.c: Add an expander example.
* gtk/gtkcalendar.c (gtk_calendar_focus_out): Queue a draw
when losing the focus. (#326064, Andrew Conkling)
......
2006-01-10 Matthias Clasen <mclasen@redhat.com>
* tests/testgtk.c: Add an expander example.
* gtk/gtkcalendar.c (gtk_calendar_focus_out): Queue a draw
when losing the focus. (#326064, Andrew Conkling)
......
......@@ -5129,6 +5129,46 @@ create_entry (GtkWidget *widget)
gtk_widget_destroy (window);
}
static void
create_expander (GtkWidget *widget)
{
GtkWidget *box1;
GtkWidget *expander;
GtkWidget *hidden;
static GtkWidget *window = NULL;
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (widget));
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&window);
gtk_window_set_title (GTK_WINDOW (window), "expander");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
expander = gtk_expander_new ("The Hidden");
gtk_box_pack_start (GTK_BOX (box1), expander, TRUE, TRUE, 0);
hidden = gtk_label_new ("Revealed!");
gtk_container_add (GTK_CONTAINER (expander), hidden);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
}
/* GtkEventBox */
......@@ -13192,6 +13232,7 @@ struct {
{ "entry", create_entry },
{ "event box", create_event_box },
{ "event watcher", create_event_watcher },
{ "expander", create_expander },
{ "file selection", create_file_selection },
{ "flipping", create_flipping },
{ "focus", create_focus },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment