EZ
Up Prev Next Contents


2 Using The EZ Widget Library

This chapter is a tutorial of the EZ widget library.

There are two classes of widgets in the EZ widget library: a class of simple widgets each of which is implemented using exactly one X window; and a class of composite widgets which are made from a group of simple widgets. Label, frame, buttons, menu-items, entry and sliders are examples of simple widgets while text widget, list box, notebook and notebook-page are composite widgets.

EZ widgets are event-driven. Interaction between an application and the EZ widget library is achieved via callbacks and event handlers. Typically, an EZwgl application contains five components. \it initialization, creating and configuring widgets, registering widget callbacks and/or event handlers, mapping widgets and handling events.

For some applications, especially interactive graphical applications, it may be desirable to use a "polling" style programming. The EZ widget library also provides an event "polling" routine, EZ_ServiceEvents(), which does no-waiting event processing.

The EZ widget library implements a simple geometry manager (rectangle packer). The size and location of EZ widgets are computed semi-automatically by the geometry manager, in the sense that applications specify some controlling information about how to arrange a set of widgets, the geometry manager assigns a size and location to each widget.

The EZwgl also supports a more advanced grid bag geometry management. The grid bag geometry manager is implemented through the row-column container widget.

Warning: There are some subtle differences between simple widgets and composite widgets.


HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>