A couple of questions about MaxGUI...

BlitzMax Forums/MaxGUI Module/A couple of questions about MaxGUI...

Alessandro(Posted 2009) [#1]
Hello,
I'm working to make an "original" editor using MaxGui, but I found a couple of "obstacles".

1) How can I render components with MaxGui using GTK and not FLTK under Linux?

2) In the main loop (wait for events), I cannot detect EVENT_KEYDOWN (only KEYUP). I even putted my text area inside a panel, but nothing changed.
can you help me?

Thank you!


degac(Posted 2009) [#2]
quick answers...
1. maybe I'm wrong - but if I remember correctly there are some problems of compatibility with Brucey's GTK port and Bmax 1.33
2. you can TRY to use SetGadgetSensitivity(gadget) to generate other events...


Mark Tiffany(Posted 2009) [#3]
Take a look at the gui_module.bmx file in the community IDE to see how to swap between fltk and gtk. Link in sig.


Mark Tiffany(Posted 2009) [#4]
Oh, and you will need to download Brucey's gtkmaxgui from his website / svn.


markcw(Posted 2009) [#5]
1) How can I render components with MaxGui using GTK and not FLTK under Linux?

2) In the main loop (wait for events), I cannot detect EVENT_KEYDOWN (only KEYUP). I even putted my text area inside a panel, but nothing changed.

1) bah.gtkmaxgui (plus bah.gtkwebmozilla for html) but the zip is very old so you need to get it from bah svn.
2) I've noticed the same with FLTK in Linux so I think this may be a bug.


SebHoll(Posted 2009) [#6]
1) How can I render components with MaxGui using GTK and not FLTK under Linux?

Download BaH.GTKMaxGUI and BaH.GTKWebMozilla/BaH.GTKWebGTKHTML from Brucey's Google Code page and copy them into your BlitzMax/mod folder. Then run Build Modules from the Program menu in MaxIDE. If the modules build successfully, then you can force the use of the GTK MaxGUI driver by replacing:

Import MaxGUI.Drivers[/b]... in your source code, with something like...

[code]?Not Linux
Import MaxGUI.Drivers
?Linux
Import BaH.GTKMaxGUI
?


2) In the main loop (wait for events), I cannot detect EVENT_KEYDOWN (only KEYUP). I even putted my text area inside a panel, but nothing changed.

You can intercept more events in a text-area using SetGadgetFilter(), but if this still fails then try either catching EVENT_KEYCHAR or try your luck using SetGadgetSensitivity(), but it is unlikely this latter suggestion will work on Linux yet.


Alessandro(Posted 2009) [#7]
Thank you,
I will try these ways.