MaxGUI

BlitzMax Forums/BlitzMax Programming/MaxGUI

UByte(Posted 2006) [#1]
I've just been mucking around with the GUI module and just finished a ScrollPane gadget by extending the TGadgetProxy class. I'll put it in the code archives when I document it tommorow.

However, after fiddling with MaxGUI I've come to the conclusion it's horrible. For example: slider events only generate on release of the scrollbar meaning I can't achieve continuous scrolling of the viewport. I can't even work around it because mouse movement events aren't generated on the slider. (If I'm mistaken I'de gladly be corrected). I originally started the scroll pane class with the intention of extending it to create composite controls, tables, property sheets etc... I'm not sure I want to delve into MaxGUI anymore though.

BlitzMax deserves a more comprehensive (native) GUI module, if I were to start a more capable one, I'm thinking a simplified SWT clone (http://www.eclipse.org/swt/ ). Would anyone be up for working on such a project?


REDi(Posted 2006) [#2]
http://www.blitzmax.com/codearcs/codearcs.php?code=1610

heres one i knocked up, it uses eventhooks which makes it possible to do what you're after.


UByte(Posted 2006) [#3]
Well I be damned, I knew about event hooks but didn't know they behaved like that. Cheers.


FlameDuck(Posted 2006) [#4]
However, after fiddling with MaxGUI I've come to the conclusion it's horrible.
It's not MaxGUIs fault that Windows widgets only execute in the main thread (and/or crash the computer). One would have hoped Microsoft would have corrected this obvious design flaw by .Net 2.0. Maybe in 3.0.

BlitzMax deserves a more comprehensive (native) GUI module
Actually it needs a less native GUI module. Like QT.


Dreamora(Posted 2006) [#5]
MaxGUI uses the best possible GUI system on any OS. QT would be nice, but not possible thanks to its license. Same for other multiplattform GUI systems.

Its "horrible" point at the moment is how it actually works.

1) Still quite some stuff is missing, especially important events on several gadgets like the ListBox or the "autocompletition behavior" on DropDowns
the mentioned movement - slider problem could be achieved through event hooks when I remember correctly.

2) BM has function pointers. I really don't understand why the events were not handled in that way with "OnEnter(gadget:TGadget, ev:TEvent)", like .NET EventHandling works. Just because such a behavior is needed for BlitzPlus, it makes no sense to take outdated crap over to a new language (beside saving implementation time which seems to be the actual reason) ... If TGadget would be extendable, it would be no problem to add, but as a mather of fact, MaxGUI **** can't be extended, defeating any use of OO :-( *this supports my assumption that it is only a straight port of BlitzPlus GUI part instead of one written with BM in mind*


ozak(Posted 2006) [#6]
I actually think MaxGUI is working rather well.
There are countless issues and you need to perform workarounds all the time, but it's still way better than anything I've tried, and I use Java's excellent GUI system at work everyday.
MaxGUI is just smarter and simpler than anything else.
But yes, a non-native GUI system would be nicer. You could still get acceleration by using native Win32/Whatever as a GUI render or you could use Max2D or whatever. A GUI rendering system with pluggable renders would rule as a matter of fact :)


CS_TBL(Posted 2006) [#7]
Non-native GUI is easy, if you have a window, a panel and a canvas, you can make whatever you want.. buttons, scrollbars etc.!


Diablo(Posted 2006) [#8]
heres a starting point:
Clicky


Chris C(Posted 2006) [#9]
why oh why cant you do

if text1.text="" then text1.text=defaultstring

not too OO at the moment...


N(Posted 2006) [#10]
why oh why cant you do

if text1.text="" then text1.text=defaultstring

not too OO at the moment...


If BlitzMax supported properties you could. But it doesn't, so you can't.


UByte(Posted 2006) [#11]
Perhaps I should clarify that "horrible" is ony my opinion and as I think I've already demonstrated (see papa's reply to my post) I've still not explored it completly.


WendellM(Posted 2006) [#12]
I was a bit surprised at how non-OO MaxGUI is. I was also a little disappointed at how non-customizable it is (i.e. gadget colors being tied in most cases to Windows' settings).

Noel has some stuff (Object-Oriented MaxGUI Wrapper) that OO-ies up the GUI (though I'm not currently using it since MaxGUI seems in flux right now). As for gadget colors, I hope to see more flexibility in color/appearance over time, decoupling it from the Windows scheme (as you can in VB, though I think that uses custom gadgets). And as CS_TBL mentions above, you can create your own gadgets (like Papa Lazarou above, and as I've done with MaxGUI Panel Image Buttons).

Oh, and Faena's AddXPStyle creates a manifest file that displays MaxGUI gadgets with the XP look. This file can be used as-is (left in the same folder as the .exe) or embedded in the .exe as Kuron (channeling Snarty <g>) mentions here.