Update

Ever since Selene was announced, I've been working steadily on the codebase. The Qyoto frontend has improved a lot, gaining support for WizardDialog among other things. Aside from a few things, we're almost good to go for 0.1 (which I intend to release sometime around September).

Despite what the commit history might suggest, it has been far from a one-man project. I'd like to thank people for tweeting, twittering and re-tweeting, watching, following, blogging and submitting it to reddit, fixing upstream bugs or otherwise encouraging me.

The promised write-up is here

Announcing Selene

How many times have you found yourself writing yet another configuration window, properties dialog or other simple form? Surely we, as programmers, should be able to work around repetitive tasks - it's why we like automation. So gradually, my coding muscles started itching. Easing the itch, I had a lot of fun and arrived at what I would later give the working title "Selene" [1]. It's a new way of writing dialogs.

Coding a typical dialog may go like this:

  • Write GUI-code to allow the user to fill in the form, perhaps presenting default values or ones provided from memory when editing.
  • Come up with code to verify data upon change- or "OK"-events. This can be especially cumbersome.
  • Finally, write the data back to a class/struct, passing control back to the main window.

With Selene, those days are over! Instead, it examines a class via either reflection or an XML-manifest and binds each public field to a widget, based on its type, created by a toolkit-specific midend. You can also influence a number of options (such as the label) through attributes. Think of it as serializating your data, but instead serializing to a file, you're serializing to the user. Let's start straight off with an example:

code.cs

Gtk frontend

GTK frontend screenshot

Qt frontend

Qt frontend screenshot
Note that we have left out toolkit-specific initialisation. You might want to use our testing skeleton.

The above is, ofcourse, the simplest example of them all. A lot can be changed via attributes, such as which widget to pick or grouping / subgrouping fields, arranging them differently. See the showcase page for more elaborate code examples. The developers page is a good start if you want to help out.

As collaboration media I've chosen GitHub and I'm eager to see how using Git wil work out for me, since I've never used it collaboratively before. So there we are, it's time for this brainfart gone wild pet project to go live. Here's hoping it'll attain some respectable momentum!

[1]: It's a Greek name. The e (η) in the middle is actually pronounced like the a in "man", please do not pronounce it like "Celine".