Derive from repaint_handler to implement your repaint object which will be invoked whenever there is a resize event or if some other viewport is created or deleted or activated. Your repaint handler is expected to ask for the viewports size and completely repaint this region. The cmd passed to your repaint handler is one of the cmd_constant enum values. More...
#include <cursorwindow.h>
Public Types | |
enum | cmd_constant { activate, deactivate, resize } |
values that will be passed to the function call operator method. More... | |
Public Member Functions | |
virtual void | operator() (viewport *vp, int cmd)=0 |
virtual | ~repaint_handler () |
Derive from repaint_handler to implement your repaint object which will be invoked whenever there is a resize event or if some other viewport is created or deleted or activated. Your repaint handler is expected to ask for the viewports size and completely repaint this region. The cmd passed to your repaint handler is one of the cmd_constant enum values.
Maintenance note: a repaint_handler should not store a pointer to its viewport because the viewport associated with a viewer will change over time. A viewer has the responsibility of completely repainting the viewport it given when asked to do so. This means, you can't store the size of the viewport either -- but must inquire it from the viewport passed during resizes and handle_event() calls.
Definition at line 772 of file cursorwindow.h.
enum cmd_constant |
values that will be passed to the function call operator method.
activate |
means you have been activated |
deactivate |
some other viewport has taken focus |
resize |
only the size has changed |
Definition at line 793 of file cursorwindow.h.
~repaint_handler | ( | ) | [virtual] |
Definition at line 1925 of file cursorwindow.cxx.
virtual void operator() | ( | viewport * | vp, | |
int | cmd | |||
) | [pure virtual] |
Implemented in ViewerSelector, appChooser, Viewer, ListViewer, TreeViewer, TableViewer, TextViewer, FTPviewer, Dialog, Selection, Message, and FileSelector.