casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::PlotDrawWatcher Class Reference

Abstract parent for any class that wants to be notified when the canvas is about to start drawing. More...

#include <PlotCanvas.h>

Inheritance diagram for casa::PlotDrawWatcher:
casa::PlotMSPlotter

List of all members.

Public Member Functions

 PlotDrawWatcher ()
 Constructor.
virtual ~PlotDrawWatcher ()
 Destructor.
virtual bool canvasDrawBeginning (PlotOperationPtr drawOperation, bool drawingIsThreaded, int drawnLayersFlag)=0
 This method should be called by the canvas whenever drawing is about to begin.

Detailed Description

Abstract parent for any class that wants to be notified when the canvas is about to start drawing.

This class is needed because a canvas could start redrawing for a number of reasons (user-requested, items changing the scale, resizing, ...) and instead of forcing applications to catch all cases this class can be used to notify when a drawing has begun for any reason.

Definition at line 55 of file PlotCanvas.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 58 of file PlotCanvas.h.

virtual casa::PlotDrawWatcher::~PlotDrawWatcher ( ) [inline, virtual]

Destructor.

Definition at line 61 of file PlotCanvas.h.


Member Function Documentation

virtual bool casa::PlotDrawWatcher::canvasDrawBeginning ( PlotOperationPtr  drawOperation,
bool  drawingIsThreaded,
int  drawnLayersFlag 
) [pure virtual]

This method should be called by the canvas whenever drawing is about to begin.

The watcher is given: A pointer to the PlotOperation object which is updated with progress information, A flag indicating whether the drawing will happen in its own thread or not, A flag indicating which layers are going to be drawn (bitwise-or of PlotCanvasLayer values). The method should return true UNLESS the watcher wants to stop the canvas from drawing. For example, if a canvas does not have threaded drawing, the watcher may want to stop drawing initially in order to spawn a new thread and then redraw.

Implemented in casa::PlotMSPlotter.


The documentation for this class was generated from the following file: