[Bf-committers] UI layout engine

Alexander Ewering blender at instinctive.de
Mon Nov 26 18:14:46 CET 2007


On Mon, 26 Nov 2007, Bobby Parker wrote:

> At the bottom of things, what you're talking about is a layout manager
> similar to what's available in Swing(Java) and Gtk(C/C++...see the
> Glade UI tool and how it uses containers). A simple layout manager

Actually, GTK is the only toolkit (apart from Blender's "Toolkit") which I
have used to do "system-level" (i.e., non-HTML/CSS or javascript) UIs, and I
found the way it works quite useful. So, yes, designing this new layout
engine around GTK's is probably a good idea.

However, as I said, I don't propose anything fancy. But a *BIT* fancier than
manual 249,122,599,344 (hmm, or was it 343?) would be nice.

To summarize:

1) Remove coordinates completely from uiDefBut*
2) Instead, make containers which take PERCENTAGES relative to parent
    as coordinates
3) Auto-arrange buttons from uiDefBut in their containers

That would already simplify UI coding by around 90%, I'd say. And if someone
who knows the UI code (Ton, stop painting walls!) does that, it'd probably
take around 3 hours.

Alexander Ewering


[ i n s t i n c t i v e . ]   http://www.instinctive.de

Zur Waldeshoehe 6                    Tel.: 02393-220558
59846 Sundern                         Fax: 02393-220559
Germany                xx-mail: xx-mail.com/instinctive


More information about the Bf-committers mailing list