casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::PlotDrawWatcher Class Referenceabstract

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

Public Member Functions

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

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 53 of file PlotCanvas.h.

Constructor & Destructor Documentation

casa::PlotDrawWatcher::PlotDrawWatcher ( )
inline

Constructor.

Definition at line 56 of file PlotCanvas.h.

virtual casa::PlotDrawWatcher::~PlotDrawWatcher ( )
inlinevirtual

Destructor.

Definition at line 59 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: