WCRefreshEH.h
Classes
- WCRefreshEH -- Base class for handling WorldCanvas refresh events. (full description)
Interface
- Public Members
- WCRefreshEH()
- virtual void operator ()(const WCRefreshEvent & ev)
- virtual ~WCRefreshEH()
Prerequisite
- WCRefreshEvent
- Understanding of Display library event-handling methodology
- (Optional) Understanding of the
PixelCanvas caching mechanism.
Etymology
WCRefreshEH : WorldCanvas refresh event-handler
Synopsis
class designed for derivation to provide a standard way of redrawing the
screen. To use, derive from this class and implement the () operator. For simple
applications, the op () should redraw the screen, or rebuild and redraw all display
lists if display lists were used.
More advanced applications should maintain display lists and perhaps cache information
at other levels. These kinds of applications should examine the reason field to see
what changed so they can minimize the computation needed to redraw the screen.
The meanings of the reason field are as follows:
Display::UserCommand - This is generated only when the user calls
refresh() on the canvas.
Display::ColorTableChange - This is generated by a change in the
colortable distribution.
Normally all display lists with color information must be rebuilt and redrawn.
Display::PixelCoordinateChange - The world canvas has been
resized or repositioned with
respect to the pixel canvas, or the pixelCanvas has changed size.