PUI: A Picoscopic User InterfaceFrequently Asked Questions List.By Steve Baker |
The 'complex' demo program seems to fail when a dialog box is dismissed. This may be because the dialog object is deleted inside a callback within a member function of that object. This problem only appears under Microsoft operating systems and so is hard for me to track down. The simplest thing may be for me to change the demo program so it just doesn't work that way.
I want to write a cute interactive GUI designer program to write C++ source code for the PUI constructor functions automatically. Something along the lines of the XForms 'fdesign' or the FLTK 'fluid' programs.
If GLUT ever changes to allow applications to run without calling 'glutMainLoop', I will greatly improve the Dialog box API which sucks right now. It would also spur me on to write a File Selector widget. The problem is that you'd really like to be able to write things like:
if ( ( fd = fopen ( "babble", "w" ) ) == NULL ) { if ( puYesNoDialog ( "Can't open babble file", "Do you want to continue?" ) ) return ; else exit ( 1 ) ; }However, the 'puYesNoDialog' function can't get it's graphics up on the screen without returning to GLUT's main loop - and it can't do that since the call to puYesNoDialog is in a GLUT callback function. Look at the ugly code in 'complex' to see how to do this kind of thing without this facility.
Finally, the appearance of PUI's widgets is somehow not as neat as some other GUI's such as MUI and Motif. This should be pretty easy to fix - and it's something on the 'to do' list.
MUI has now been 'abandoned' by it's author (Tom Davis) who none-the-less retains copyright over it. MUI has several known bugs - and the only known documentation was written by me - and I have never actually written a real application using it!
The MUI library (distributed with GLUT) takes over all of the GLUT callbacks - this makes it very hard to write general purpose programs with MUI.
In contrast, it is very easy to add PUI widgets to an existing OpenGL/GLUT application with only a couple of lines of code.
PUI also works quite well with 3D hardware such as 3Dfx Voodoo that 'take over' the screen. Since MUI and GLUT both create their menu's using the underlying windowing system's GUI, these menu's won't be visible on that kind of hardware. PUI uses only OpenGL to do all kinds of widgets, so portability onto 3Dfx hardware is assured.
Steve J. Baker. <sjbaker1@airmail.net> |