OTK GUI-Builder


The Otk GUI-Builder enables creating new GUI's by drawing them. Add panels, buttons, labels, sliders, etc. by pointing and clicking.

This is an early version.       (But it is already somewhat useful.)   GBuilder is still evolving!

Draw your initial GUI, save and compile it. Make further edits of your generated GUI's by text editor. In particular, you will need to add your call-back functions. (See below.)

To add objects, select an object type, then click on the drawing canvas, to the right of the control panel, where you want the object to be placed. Or, control object size by dragging your mouse to stretch a rubber-band-box around where you want to add the object. Edit the object's properties by double-clicking, or selecting it and clicking the properties button.


Download:


Compilation instructions are located in the header-comments of gbuilder.c, which expects otk_lib to be a subdirectory. Get otk_lib from: https://sourceforge.net/projects/otk.

GBuilder usage is fairly self-explanatory. GBuilder is WYSIWYG (What You See Is What You Get). Save, compile, and run the GUI you draw by clicking Export, Compile, and Run under the Tools menu. By default, GBuilder saves to the file name newgui.c. You can select an alternate name under the File / Save-As menu.

You can read-in previously created GUI's by including the GUI's name on the command-line when you invoke gbuilder.exe., or by File / Open. Note that GBuilder presently will reliably read-in only GUI's that were exported by GBuilder itself. If the GUI file is modified with a text editor, then depending on the edit, GBuilder may misinterpret the file. Therefore GBuilder is handy for quickly getting a new GUI panel started, and then it may be useful to switch to a text editor to complete adding functions to it.

Call-back functions are your functions to be called when a widget is clicked - for example, when a button is pressed, or when a slider is moved. You will need to write your functions, and you will need to insert their names in the call-back parameters of the respective widgets (buttons, sliders, etc.). Most Otk functions provide two call-back parameters: 1) a function name, 2) an optional parameter to pass to the function. By default, GBuilder places nulls (0) in the call-back parameters when it exports a new GUI. These are usually the last two parameters in the Otk functions that create widgets, such as OtkMakeButton, OtkMakeToggleButton, or OtkMakeSliderHorizontal. See the Otk main page for more information.

The Otk GBuilder is of course written in Otk, so it is portable to all platforms. GBuilder has reached the point where it is being used to generate new properties dialogs for itself. In other words, GBuilder is now being used to further its own development.



Back to main page

SourceForge.net Logo