Showing changes from revision #2 to #3:
Added | Removed | Changed
When the Wimp has notified an application that a window needs redrawing, the process of updating it must begin. An application cannot simply update the appropriate area of the screen as other windows may be overlapping it.
There are two approaches to how an application can update a window:
1 | Permanent redraw to a window |
2 | Temporary redraw to a window |
Both options have their own benefits within an application. Each option will be discussed in further detail below.
This is useful when a window needs to be updated to reflect a change that will occur to a window. i.e e.g. when a paragraph of text has been reformatted in a word processor.
This to achieved by calling Wimp_ForceRedraw which will clear the update area automatically ready for the new contents to be redrawn by the application.
Once called, the application returns to the central loop where the Redraw_Window_Request originated.
Note: The Wimp will return a return a Redraw_Window_Request from Wimp_Poll, which should be responded to.
This is useful when a window needs to be updated to reflect a temporary change that will occur to a window. i.e e.g. when the mouse is dragging an object across a window.
This is achieve by calling Wimp_UpdateWindow and performing the appropriate operations. Unlike Wimp_ForceRedraw, no clearing of the area takes place. This allows for the application to retain the existing window contents and update the relevant part using EOR . ; i.e for example, when dragging a line.
Note: The Wimp will return a return a list of rectangles within the work area that need updating which should be responded to.