     1	#include <gtk/gtk.h>
     2	#include <ssw-sheet.h>
     3	
     4	GtkTreeModel *
     5	create_data_model (void)
     6	{
     7	  GtkListStore *model = gtk_list_store_new (3,
     8						    G_TYPE_INT,
     9						    G_TYPE_STRING,
    10						    G_TYPE_DOUBLE);
    11	  for (int i = 0; i < 4; ++i)
    12	    {
    13	      GtkTreeIter iter;
    14	      gtk_list_store_append (model, &iter);
    15	      gtk_list_store_set (model, &iter,
    16				  0, i,
    17				  1, (i % 2) ? "odd" : "even",
    18				  2, i / 3.0,
    19				  -1);
    20	    }
    21	
    22	  return GTK_TREE_MODEL (model);
    23	}
    24	
    25	int
    26	main (int argc, char **argv)
    27	{
    28	  gtk_init (&argc, &argv);
    29	
    30	  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    31	  GtkWidget *sheet = ssw_sheet_new ();
    32	  
    33	  GtkTreeModel *data = create_data_model ();
    34	  g_object_set (sheet, "data-model", data, NULL);
    35	  g_object_set (sheet, "editable", TRUE, NULL);
    36	
    37	  gtk_container_add (GTK_CONTAINER (window), sheet);
    38	  gtk_window_maximize (GTK_WINDOW (window));
    39	  gtk_widget_show_all (window);
    40	  gtk_main ();
    41	
    42	  return 0;
    43	}
