#include <gtk/gtk.h>

gint
main (gint argc, gchar **argv)
{
	GtkWidget *container;
	GtkWidget *widget;

	gtk_init (&argc, &argv);

	widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	g_signal_connect (
		widget, "delete-event",
		G_CALLBACK (gtk_main_quit), NULL);
	gtk_widget_show (widget);

	container = widget;

	widget = gtk_vbox_new (FALSE, 0);
	gtk_container_add (GTK_CONTAINER (container), widget);
	gtk_widget_show (widget);

	container = widget;

	widget = gtk_label_new ("I'm an innocent bystander");
	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 12);
	gtk_widget_show (widget);

	widget = gtk_expander_new (NULL);
	gtk_expander_set_expanded (GTK_EXPANDER (widget), TRUE);
	gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
	gtk_widget_show (widget);

	container = widget;

	/* The size request forces the GtkExpander to allocate as
	 * much horizontal space as possible to the label widget,
	 * as if it were packed to expand and fill.  This allows
	 * the expander label to be centered over the tree view.
	 * Evolution's attachment bar uses a similar trick for
	 * its "# Attachments" label. */
	widget = gtk_label_new ("Center Me!");
	gtk_widget_set_size_request (widget, G_MAXINT, -1);
	gtk_expander_set_label_widget (GTK_EXPANDER (container), widget);
	gtk_widget_show (widget);

	widget = gtk_tree_view_new ();
	gtk_container_add (GTK_CONTAINER (container), widget);
	gtk_widget_show (widget);

	gtk_main ();

	return 0;
}
