Element: graphic_window.pre_redraw { }

Type

callback

Description

One of the command procedures to be executed when graphic_window is repainted due to a recalculation of its contents.

When window redraw procedures are defined and invoked, the following steps are executed:

  1. The window pre_redraw procedure (if defined) is called.

  2. The window background (color and/or image and/or cloth) is painted.

  3. The window redraw procedure (if defined) is called.

  4. If the window has a populate procedure defined, it is called for every group viewable in the window. If the window does not have a populate procedure defined, the window foreground (entity graphics) is painted.

  5. The window foreground (entity graphics) is painted.

  6. The window post_redraw procedure (if defined) is called.

  7. The window auto-grid and/or auto-vane are painted.

When a pre_redraw procedure is executed, the window identifier is passed to the procedure as a parameter.

The pre_redraw procedure is not invoked on repaints due to simple window exposure, but only on a change of window size and/or a redefinition of its corners.

Within a pre_redraw procedure commands which change the contents or view of the window are permitted, but requests to redraw the window contents will be ignored. This procedure is typically used for last-minute view changes prior to redrawing.

New windows have a pre_redraw procedure of null.

Parameters

window.pre_redraw(<window>)

See Also

Commands:

wpaint

Structures:

window.populate, window.post_redraw, window.redraw