procedure LazyPaint; virtual;
Processes a lazy display paint request from the terminal component.
The terminal component performs no painting of its own. Instead, it defers that job to the emulator component where the knowledge of such processing for a given terminal is embodied.
There are two types of painting to be done. The first is painting since the new data that has come from the serial device needs to be shown (for example, this could be triggered by the lazy display processing of the terminal). The second is painting due to all or part of the terminal component's client window being invalidated and Qt has issued a QEventType_Paint message.
The LazyPaint method is called in the former case. The emulator has been parsing the incoming data stream and altering the buffer to reflect the new text and other changes embedded in the stream. The terminal component has determined that the new changes need to be shown on the client window. There are three ways the terminal can make that determination. The first is when the emulator sets its NeedsUpdate property to True to denote that the terminal display has changed and the new data needs to be shown. The second is when the terminal component is in lazy display mode (its UseLazyDisplay property is True), and a certain number of bytes (given by the LazyByteDelay property of the TApxTerminal component) have been processed. The third is when the terminal component is in lazy display mode and the required amount of time, given by the LazyTimeDelay property, has elapsed.
The emulator needs to interrogate its terminal buffer object to find out the changed character cells in the terminal display and to display them on the terminal component's canvas.
See also: BlinkPaint, Paint