MaxGUI with automatic layout?

BlitzMax Forums/BlitzMax Programming/MaxGUI with automatic layout?

Rozek(Posted 2006) [#1]
Hello!

I just looked through the documentation of MaxGUI in order to find out if it has an automatic layout mechanism...and did not find any.

Has anybody already written layout managers for MaxGUI?

If not, this would definitely be my first task related to BlitzMAX.


Grisu(Posted 2006) [#2]
what do you mean by automatic layout?

Setgadgetstyle?


fredborg(Posted 2006) [#3]
I think he means, that every time you add a gadget to a window, it is positioned automatically. Which is cool for a lot of things.

I don't know of any such solutions for MaxGUI, but there might be one hidden somewhere on these forums :)


Duck(Posted 2006) [#4]
I think it means a drag and drop interface to build your gui.


Grisu(Posted 2006) [#5]
Or does he mean a gui editor?

Examples:
http://www.blitzmax.com/logs/userlog.php?user=997&log=606
http://myweb.tiscali.co.uk/diablogames/programs/HighGUI.zip


fredborg(Posted 2006) [#6]
Who knows? Only time will tell :)


Nelvin(Posted 2006) [#7]
He surely means runtime layouting - very common for modern guikits as well as back in the golden ages of MUI (Magic User Interface) for the Amiga.
Have a look at wxWidgets sizers as a sample for Win/Mac/Linux.


H&K(Posted 2006) [#8]
Coooor, there are a lot of things MaxGui doesnt have that he could mean, arent there?
But I think he means one of those Visual Studio type things, were you put the button (or whatever) directly on the screen, and then it produces it own code


Rozek(Posted 2006) [#9]
Ooops,

if I would have imagined what discussion my little post has started...

Well, with "automatic layout" I mean automatic sizing and positioning of controls.

To give a simple example: in a toolbar, adding buttons one after the other would instruct the toolbar's "layout manager" to place them in row, side-by-side. The size of every single button would depend on its "contents" (i.e. its label and/or pixmap) This would free the programmer from silly coordinate calculations and provide the base for dynamic GUIs.

Automatic layout management is a standard for many GUI libraries, unless there is a visual GUI editor, at least.

Hope this clarifies my posting a bit - sorry for any inconveniences I've caused by not specifying properly, what I meant...


Dreamora(Posted 2006) [#10]
The toolbar does this.
For the rest there is no rule how it shall be added (aside from text set to text gadgets etc). Windows / Linux are not as "stupid" as OSX which enforces a given standard like "buttons can't waste space with nothing around text" and the like ...

But BM has an auto layouting. But a little different: The initial adding is your stuff to do. but afterwards you can set that all gadgets keep the relations between each other "alive" so it always looks the same. (you can force it to keep a distance constant instead of the relative distances). To use that, you use SetGadgetLayout