[Bf-committers] UI layout engine
Bobby Parker
sh0rtwave at gmail.com
Mon Nov 26 18:06:36 CET 2007
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
isn't that terribly difficult to write (and I've done so myself), so I
really kind of agree with you. The UI madness is one of the reasons
I've kept my plugin strictly python-only.
On Nov 26, 2007, at 11:48 AM, Alexander Ewering wrote:
>
> On Mon, 26 Nov 2007, Shaul Kedem wrote:
>
>> first , thank you for waking up this ML
>>
>> second, I think it should be done as well, but at what depth?
>> creating
>> a full rasterising engine is very complex, but maybe an external xml
>> format to define panels and UI ?
>
> Thank you for not dissing what I've said just because it's me in the
> first
> place ;)
>
> My (and probably EVERY other coder's!) primary concern with the
> current system
> is not the fact that the coordinates are stored inside source files,
> but the
> fact that specifying coordinates is even NECESSARY!
>
> As I mentioned, when you code new stuff for Blender (in my case, for
> my 2D
> fork of Blender), you almost are afraid of needing an UI for it
> because it
> means 2 hours of button-coordinate-trial-and-error.
>
> There should be at least a simpler, higher-level interface to
> creating UIs,
> something like:
>
> - A horizontal row of buttons:
>
> - uiBlockBeginHRow(uiBlock *block, short xco, short yco, short
> butheight, short total_width);
> - uiBut...() like usual (but WITHOUT explicit coordinates!);
> - uiBlockEndRow();
>
> - A vertical row of buttons:
>
> - uiBlockBeginVRow(uiBlock *block, short xco, short yco, short
> butwidth, short total_height);
>
> - A grid of buttons:
>
> - uiBlockBeginGrid(uiBlock *block, short xco, short yco, short
> number_of_rows, short total_width);
>
> Of course, xco, yco and the widths should be in *percentages*, not in
> pixels; the percentages being relative to the *container* (mostly,
> that will
> be the panel). Speaking of that, a way to define arbitrary
> containers (like
> a <div> in HTML) to render buttons relative to:
>
> - uiBlockBeginContainer(uiBlock *block, short xco, short yco, short
> total_width, short total_height);
>
> etc... just a few spontaneous thoughts. The coder simply must be
> freed from
> the burden of being a painter and an arithmetic genius.
>
> 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
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
Bobby Parker
sh0rtwave at gmail.com
http://www.stormwind-studios.com
More information about the Bf-committers
mailing list