Important: The information in this document is obsolete and should not be used for new development.
BeginUpdate
Use theBeginUpdateprocedure 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
messagefield in the update event record.DESCRIPTION
TheBeginUpdateprocedure 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
BeginUpdatemust be matched with a subsequent call toEndUpdateafter your application redraws the content region.
- Note
- In Pascal,
BeginUpdateandEndUpdatecan't be nested. That is,
you must callEndUpdatebefore the next call toBeginUpdate.![]()
- You can nest
BeginUpdateandEndUpdatecalls 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 howBeginUpdateandEndUpdateaffect the visible region and update region. See Listing 4-10 on page 4-50 for an example that updates a window.