#include <gtk/gtk.h>

GtkWidget *list_box;

void
add_button_clicked_cb ()
{
  GtkWidget *l = gtk_label_new ("Test Text");
  gtk_style_context_add_class (gtk_widget_get_style_context (l), "dim-label");
  gtk_widget_show (l);

  gtk_container_add (GTK_CONTAINER (list_box), l);
}


void
main (int argc, char **argv)
{
  gtk_init (&argc, &argv);
  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
  list_box = gtk_list_box_new ();
  GtkWidget *add_button = gtk_button_new_with_label ("Add");
  g_signal_connect (G_OBJECT (add_button), "clicked", G_CALLBACK (add_button_clicked_cb), NULL);
  gtk_widget_set_margin_top (add_button, 50);

  gtk_container_add (GTK_CONTAINER (box), list_box);
  gtk_container_add (GTK_CONTAINER (box), add_button);

  gtk_container_add (GTK_CONTAINER (window), box);
  gtk_widget_show_all (window);
  gtk_main ();
}
