GUI Release: Radium (build 0)

(Months ago now) I recieved an e-mail from long time community member Pharoah:

I happened to visit the GUI blog today, and noticed you’re reviewing some un-finished GUIs. I thought I’d attach a zip of the Radium GUI creator project I’d started a few years ago. The code got so large that I couldn’t make it compile, although it runs in the QB45 IDE. Because it was so unwieldy, I gave up on it before writing the code generation part, but I’d say the UI is pretty decent and performs very well, even at low speeds.

Radium

When I opened QBASIC 4.5, I wasn’t quite ready for what I saw, a complete GUI development environment with all the major objects and an easy to use IDE that allowed for dynamic renaming, resizing, and moving.

Tonight I finally remembered that I had it and decided to get a screenshot and try to compile one last time, and to my surprise it compiled. So, in the download there is a compiled copy to make it easier to test as well as the original code as provided by Pharoah. BTW: This means that it’s elgible for GUI Awards ’13. Download Radium

2 Responses to GUI Release: Radium (build 0)

  1. Very awesome! I must say I’m rather impressed with how easy it was to get a basic GUI designed with this!

  2. Thanks for the positive feedback. I guess I’ll add a bit more about this project, as long as it’s on display.

    The goal was to write a GUI creator program that would allow you to design screens with basic GUI elements, and to generate the QuickBASIC drawing and controller code automatically. Did you notice that each GUI element has a set of handler checkboxes in its menu? The idea is that you’d check off the events you wanted to handle, and the generated code would detect those and call the sub associated with that event. So, for example, you would need to provide a button0.click function, but the Radium code would do all the rest of the work drawing and updating the screen, managing the mouse, etc… Of course, there are no threads in QBasic, so you’d also get to specify a sub that gets called each time the main loop goes ’round to update anything non-Radium related.

    I managed to get the creator for the GUI screens fairly polished (see if you can crash it), but didn’t write the project and file management screens or the code generation part, because I felt that I was already hitting the limits of how much code I could get QuickBASIC to handle – perhaps I was wrong.

    I also have another cool program which prepares the source for a release, which hasn’t been run on this source. It runs through the source and produces another source file but with some modifications. It will assign a sequential build number and change the variable in the code, it will add line numbers where it can, and it will assign 1-byte IDs to each function and add code to append those to the beginning of a stack trace variable when each function is called, and pop them off at the end. This is a rather slow but complete data collection mechanism which would have allowed me to pinpoint where bugs occurred in release builds, given the long error ID string. I wrote another program which could take that string and parse out and decode the stack trace, error number, and error line number from it to display exactly where the code had failed.

    At any rate, it was an interesting project to work on. A fun fact is that the menu part is very modular; it relies on a few drawing routines but that’s it. You provide it with an array of strings that dictates what each row of the menu should hold (title separator, label, checkbox, textbox, radio button), and it will do the rest for you. It may be useful to someone else if you can find a way to extract it. The font routines it uses are also fairly fast, I believe, as they’re entirely GET/PUT based and use fancy bit masking tricks.

Leave a Reply

Go to top