Next: , Previous: Interface sightseeing tour, Up: VCL Overview



8.1.5 Propagation

There are two basic processes which happen in the VCL node tree – redrawing of regions (down-propagating, running from the root to leaves) and the propagation of a change (up-propagating, running from a leaf to the root). The first process is initiated in the canvas (by a GTK expose event) and managed by the current painter. There is a context structure which is internally used by painters and which can take complete control of the drawing process. Canvas calls the painter's methods and the painter walks through the tree using tree-examining methods of containers, and draws the appropriate nodes. The painter ignores uninteresting branches of the node tree. Containers are responsible for storing information about their children (they usually store the aggregate bounding box of all children) needed to cooperate with the painter so as to avoid walking through uninteresting branches. These data are updated during the second process – propagation of a change.