Page 1 of 1

Lua UI window manager module positioning proposal

Posted: 18 Jun 2007, 00:08
by AF
I propose we set out a basic layout for positioned modules.

Modules or widgets with UI components would declare a module position and a set of properties and then they would be added to a list of modules in that section that the user could re-order.

They would set their width and height or percentages and wether they stretch or not to fill empty unused space in the module, so a build menu could stretch to fill the rest of a module adding an extra row of build icons at the bottom.

This way a UI module would draw itself based on translated co-ordinates using the window manager API rather than drawing directly to the screen with OpenGL calls.

Modules could declare themselves as not being part of this system and using screen coordinates instead.

As an example I've shown a bsic layout and then used IceXuicks mockup with edits to show what would fit in where. Upper middle and lower control the placement within a section fo a UI module. Corners are sued to go from a corner up or across underneath ro above or alongside the other sections.

Image

For example if the ETA panel where moved from G Upper to G middle then as the screen got taller the distance would increase between the panel and its neighbour as it centers itself.

Of course there are some kinks such as what happens if you havent got a corner module but you have a top lower right and right top components?

Posted: 18 Jun 2007, 00:25
by trepan
Ideas are cheap, let's see some code ;-)

Posted: 18 Jun 2007, 10:24
by MelTraX
It's an interesting idea.. I'll think about it a bit..

Right now I was only planning to implement docking windows.. So one window would be underneath another one and moves with it / moves if the other window is resized..

Btw: AlfaSub and I are making some progress in merging our two systems.. Hopefully it will bring some performance boost.. :D

Posted: 19 Jun 2007, 06:46
by AlfaSub
Yeah... meltrax and I are trying to develop the system to be as flexible as possible. We pretty much have everything you described implemented in actual code, windows just don't snap together yet.

The only other thing we don't have implemented is the "layout" regions. The objection I have to the layout you describe is that it implies a certain lack of control. If stuff can only be in one given sector of the screen at a time... I think having fully moveable and sizeable windows is better. That way the user isnt "boxed in" with fairly arbitrary screen regions.

Right now (in the current IceUI build) you can move and size each UI widget in whatever fashion you want. Hell, you could put every single element in the center of the screen if for some reason you liked it more that way. You can pretty much achieve everything you're mentioning with the layout scheme, but without the limitation of a predefined grid layout.

Posted: 19 Jun 2007, 08:37
by AF
No because the region is the width fo the widest panel it contains and the combined height of all the panels it contains or vice versa dpending on where it is.

If the user disagrees they can just resize a panel move it into another area or reorder. And not everything should have to use that system.

Se in my example there are spaces and holes where panels dont stretch or push the layout region out towards the centre