GUI Example - Vibrant

DemoVib - A Vibrant GUI example

This example and Vibrant programming is fully described in the original NCBI C tookit manual.
This program is a simple Vibrant program poking fun at a taxonomy database, courtesy of Jonathan Kans, the author of Vibrant.
You can actually draw a crude picture in the box using the mouse!

Vibrant programs typically look like they have lots of functions, and lots of static global variables.

They entire style of programming is different for GUI programs compared with the other examples. It is often useful to study this style in other source code in the NCBI toolkit before doing it yourself. One helpful hint is to put every dialogue box and alternate windows into its own source code file, which helps manage the complexity of the large number of functions created.

Vibrant works by declaring the GUI first. This makes a data structure in memory that holds the user-interface. The command Show() causes Vibrant to display the user interface and ProcessEvents() performs an automatic event-loop handler - removing the ususal necessity for coding this separately.

Vibrant GUI's are incredibly concise. Using the C functions for X-Windows or MS-Windows will force you to write far more code than Vibrant

Here's the program and makefile attached below:

Christopher Hogue,
Nov 20, 2009, 2:25 AM