14 June 2012

What's in a page?

A page of the O Beginners Tutorial for Gtk+ in Python, I mean...

First of all, there is an image of a window with the widget "in action".

Then there is the code to get exactly that example. Heavily commented: each line is explained (ok, the "here we set the width and the length of the window" is left out after a couple of examples).

In some cases, here there is a note to comment the code even further.

Then (thanks Jewelfox for the idea!) a series of "useful methods for this widget". I am thinking of writing this part as a list (one method for each bulletpoint), but in a relatively conversational style because a "plain" list could bore you and make you miss some parts while you skim over it. A great help in this is the tutorial by Sebastian Pölsterl, from which I already took an example (and that has been my Rosetta Stone between the C of the Gtk+3 Reference Manual and Python).

Finally, all the links to the pages in the Gtk+3 Reference Manual that I used to write the example.

Is there anything else you would like? Is there anything else you would do differently? If so, leave a comment...

And the Bigger Picture? The Tutorial Itself?

The main idea: one page, one widget; one widget, one page.

Then: a map! A graph to describe "from here you can go here, there, or there", and "to get here you will need what you learn there". And how would you do that? Only via hyperlinks on the page? Wouldn't they get lost in the variety of links described above - and wouldn't the bigger picture of the tutorial get lost in it? On the other hand: a "real" graph for all the examples needed for the tutorial could be a little too tangled...

[And: how's the work progressing? After a first very rough draft of many (but not all) widgets, so far I have written better pages for the window widgets (Gtk.Window, Gtk.ApplicationWindow, Gtk.Dialog, Gtk.AboutDialog, Gtk.MessageDialog) and I am now dealing with version 0.2 of the display widgets' pages (Gtk.Image, Gtk.Label, Gtk.Spinner, Gtk.Statusbar, Gtk.Progressbar). To come: buttons and toggles, numeric and text data entry, Gtk.TextView and more, including list and tree widgets (and therefore Gtk.ListStore and Gtk.TreeStore).]