Previous Contents Next

Summary

This chapter has presented the basic notions of graphics programming and event-driven programming using the Graphics library in the distribution of Objective CAML. After having explained the basic graphical elements (colors, drawing, filling, text and bitmaps) we have approached the problem of animating them. The mechanism of handling events in Graphics was then described in a way that allowed the introduction of a general method of handling user interaction. This was accomplished by taking a game as model for event-driven programming. To improve user interactions and to provide interactive graphical components to the programmer, we have developed a new library called Awi, which facilitates the construction of graphical interfaces. This library was used for writing the interface to the imperative calculator.


Previous Contents Next