normal gui commands or wxMAX? and form editor

BlitzMax Forums/Brucey's Modules/normal gui commands or wxMAX? and form editor

Wiebo(Posted 2009) [#1]
Hi, I have some questions. I'm planning on create some tools for my game making antics. I'm deciding whether to use the 'normal' max GUI commands, or wxMAx, which looks pretty cool as well. What are the main advantages of each?

Also, I found some wx form editors, but has anyone made a conversion tool to make max code of it? These editors export to c++, but I am not in the mood to create a converter myself :)

thanks!


Retimer(Posted 2009) [#2]
MaxGUI is a bit easier to get used to...except the simple reason behind that is that it's lacking the million features wxwidgets contains, and that the orientation of its usage isn't as flexible.

And as far as I am aware, although I always coded my UI for my software manually, that brucey did create a conversion tool for the editor.

Go with wxMax....your only disapointment would likely be that you bought maxgui, if you did. That's my opinion anyways.


Brucey(Posted 2009) [#3]
What are the main advantages of each?


Not so sure MaxGUI is easier... It has a "flat" API (in the sense that there are lots of Functions where you pass in the control as a param), rather than a OOP-style API. For those coming from a procedural language background, perhaps MaxGUI will be easier to use because of it.

Also, since wxMax is quite large, perhaps that makes it more difficult to get into. However, once you get used to it, I think it's easy enough to use ;-)

As far as features go, I made a list here which tries to show some of the differences between them.

wxMax uses a callback system for event handling. You "Connect" your function to the event, which gets called at the appropriate time.
I think this way is much easier to manage than having to manually check an event type in MaxGUI. But each to their own. In fact, you could in theory point all callbacks to the same function, and handle the events in a similar manner if you wished.


has anyone made a conversion tool to make max code of it?

There is a tool provided with the distribution (in wx.mod/tools), called wxCodeGen (not very original naming, I'm afraid).
Currently it can handle wxFormBuilder project files, but I hope to add others in the future (framework is there, I just need to implement them).
wxCodeGen's UI is built with wxCodeGen, from a wxFormBuilder project file.

MaxGUI uses a coordinate specific layout of controls. Which is fine, but not so good for theme or cross-platform, since not everything is always the same size.
With wxMax you can use Sizers. These control layout for you.
The wxWidget formbuilders tend to prefer to use Sizers, since they are so flexible. Although it sometimes takes a while to get used to using them - if you are previously used to placing your controls in an exact location.

Once you get the hang of it, building UIs with wxFormBuilder is very quick.


At the end of the day, it probably depends what you want to do with your tools.
* MaxGUI is more lightweight, but I feel it requires more user management, and of course the feature set is a bit lacking.
* wxMax has some nice controls, such as a very flexible Property Grid, proper printing support, direct GDI access (draw on a control), and other things.

I wrote wxMax because MaxGUI didn't meet my requirements for a good GUI library.

But it might meet yours :-)


Wiebo(Posted 2009) [#4]
Thanks for your replies folks!

The size of wxMax doesn't bother me, I'll just pick what I need :) I have high demands so we'll see how wxMax holds up, Brucey. Your XML lib is already very important to me, so I'm confident wxMax will hold up. I'll see if the converter does what I want and then I'll get on with it.


Pete Rigz(Posted 2009) [#5]
Just thought I'd chip in here... I've been working on a particle editor which I originally coded in maxgui, but as the project got larger I started running into limitations with maxgui and decided to take the plunge with wxWidgets. I'm so glad I did! I'd say it's got an inverse learning curve to maxgui whereby maxgui is easy to learn but starts to becoming difficult to manage in large applications, whereas wxWidgets is a bit trickier to learn but gets much easier overtime.

I'd recommend investing in the book "Cross-platform gui programming with wxWidgets" as great way to learn it.


Wiebo(Posted 2009) [#6]
Pete,

Thanks for your info, it is very relevant as I am creating a new particle engine as well :) I posted about it on my blog as to how I designed the thing. But yes, I anticipated that maxgui wouldn't have enough functionality for me as I ran into that with Blitz Plus as well, and I could not find the additions I expect to use in the editor I'm about to create.


Brucey(Posted 2009) [#7]
There are also some tutorials here.


Wiebo(Posted 2009) [#8]
Yeah that's cool stuff Brucey. Thanks for all that!