next up previous contents index
Next: Actions Up: General Structure Previous: Event handling

Redraw Mechanism

It is strictly forbidden for the items to draw themselves, as they have done in old versions of GRAPE. Drawing must be done by the manager calling the "check-refresh" (ref. 9.1.3.17) method on its layers and so on their group(s). If an element needs to be drawn, for example a button which was pressed down, it must use the method "set-refresh" (see 9.1.3.15), to mark itself. The manager will search for all items, which must be redrawn, and redraw them, before trying to get the next event from the control-device. Using this mechanisms also partial hidden object, who lay behind another layer, will be redrawn correctly. If the used control-device supports clipping, like the X11-device, these ability will be used. If a whole area of the manager must be redrawn, for example if you move or close an upper layer, the method "mark-refresh-region" is used to search and mark all items automatically. Groups and layers have got different refresh-flags for their items and for themselves (the border, title and the place which isn't occupied by any element).



SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.