There are four main functional blocks in the library structure:
The first block handles all the system generated events:
- 1) System Event Management (SEM)
- 2) Graphics Request Management (GRM)
- 3) TopLevel Window Management (TWM)
- 4) MGUI Objects (Widgets)
When one of the above event occurs, the SEM block generates an event and passes it to the TWM block. The DOS implementation uses a polling tecnique to handle mouse events, so mouse clicks and moves occurring while the program is not waiting for input are lost.
- mouse button press
- mouse button release
- mouse move
- keyboard
- timeout
- window move
- window resize
- window expose
The TWM block's major task is to handle all those events the system notifies to a window. Any system window owned by the application has a MGUI Object bound to, events are received by this Object (SHELL) and propagated to the destination Widget following the layout hierarchy. Since the DOS O.S. does not provide a Window Manager, the TWM block in the DOS implementation also handles window movement and focus delivery.
The GRM block offers the API for the display functions: color and font management and drawing primitives.
Last block, the greater and system independent one, contains the MGUI Widgets' API.
In the remainder of this guide details about Widgets are described as well as the programming tecnique for a strict MGUI application. Refer to MGUI C++ API or C API documentation for more details about all available library functions.
Every example mentioned in this guide can be obviously compiled and executed without changes in any of the supported platforms.