Previous: Some Examples, Up: Part I Getting Started [Contents][Index]
To summarize, every Forms Library application program must perform several basic steps. These are
This step establishes a connection to the X server, allocates resources and otherwise initializes the Forms Library’s internal structures, which include visual selection, font initialization and command line parsing.
Every program creates one or more forms and all the objects on them to construct the user interface. This step may also include callback registration and per object initialization such as setting bounds for sliders etc.
This step makes the designed user interface visible by creating and mapping the window (and subwindows) used by the forms.
Most Forms Library applications are completely event-driven and are
designed to respond to user events indefinitely. The Forms Library
main loop, usually invoked by calling fl_do_forms()
,
retrieves events from the X event queue, dispatches them to the
appropriate objects and notifies the application of what action, if
any, should be taken. The actual notification method depends on how
the interaction is set up, which could be done by calling an object
callback or by returning the object whose status has changed to the
application program.
The following chapters will lead you through each step of the process with more details.