Important: The information in this document is obsolete and should not be used for new development.
BeginUpdate
Use theBeginUpdate
procedure to start updating a window when you receive an update event for that window.
PROCEDURE BeginUpdate (theWindow: WindowPtr);
- theWindow
- A pointer to the window's window record. Your application gets this information from the
message
field in the update event record.DESCRIPTION
TheBeginUpdate
procedure limits the visible region of the window's graphics port to the intersection of the visible region and the update region; it then sets the window's update region to an empty region. After callingBeginUpdate
, your application redraws either the entire content region or only the visible region. In either case, only the parts of the window that require updating are actually redrawn on the screen.Every call to
BeginUpdate
must be matched with a subsequent call toEndUpdate
after your application redraws the content region.
- Note
- In Pascal,
BeginUpdate
andEndUpdate
can't be nested. That is,
you must callEndUpdate
before the next call toBeginUpdate
.- You can nest
BeginUpdate
andEndUpdate
calls in assembly
language if you save and restore the copy of thevisRgn
, a copy
of which is stored, in global coordinates, in the global variableSaveVisRgn
.SPECIAL CONSIDERATIONS
If you don't clear the update region when you receive an update event, the Event Manager continues to send update events until you do.SEE ALSO
See Figure 4-21 on page 4-49 for an illustration of howBeginUpdate
andEndUpdate
affect the visible region and update region. See Listing 4-10 on page 4-50 for an example that updates a window.