casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::PCRefreshEvent Class Reference

Class which stores PixelCanvas refresh event information. More...

#include <PCRefreshEvent.h>

Inheritance diagram for casa::PCRefreshEvent:
casa::PixelCanvasEvent casa::DisplayEvent

Public Member Functions

 PCRefreshEvent (PixelCanvas *pc, const Display::RefreshReason &reason)
 Constructor taking a pointer to the PixelCanvas for which the event is valid, and the reason for the refresh. More...
 
virtual ~PCRefreshEvent ()
 Destructor. More...
 
virtual Display::RefreshReason reason () const
 Why did the refresh occur? More...
 
- Public Member Functions inherited from casa::PixelCanvasEvent
 PixelCanvasEvent (PixelCanvas *pc)
 Constructor, taking a pointer to a PixelCanvas. More...
 
virtual ~PixelCanvasEvent ()
 Destructor. More...
 
virtual PixelCanvaspixelCanvas () const
 Return a pointer to the PixelCanvas on which the event occurred. More...
 
- Public Member Functions inherited from casa::DisplayEvent
 DisplayEvent ()
 Constructor. More...
 
 DisplayEvent (const DisplayEvent &other)
 Copy constructor - construct a new DisplayEvent from other. More...
 
virtual ~DisplayEvent ()
 Destructor. More...
 
DisplayEventoperator= (const DisplayEvent &other)
 Copy assignment using copy semantics. More...
 
virtual casacore::Double timeOfEvent () const
 Return the Julian date (in fractional seconds) that this event occured. More...
 

Protected Member Functions

 PCRefreshEvent ()
 (Required) default constructor. More...
 
 PCRefreshEvent (const PCRefreshEvent &other)
 (Required) copy constructor. More...
 
PCRefreshEventoperator= (const PCRefreshEvent &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::PixelCanvasEvent
 PixelCanvasEvent ()
 (Required) default constructor. More...
 
 PixelCanvasEvent (const PixelCanvasEvent &other)
 (Required) copy constructor. More...
 
PixelCanvasEventoperator= (const PixelCanvasEvent &other)
 (Required) copy assignment. More...
 

Private Attributes

Display::RefreshReason itsRefreshReason
 Store the reason for the refresh here at construction. More...
 

Detailed Description

Class which stores PixelCanvas refresh event information.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"PCRefreshEvent" is a contraction and concatenation of "PixelCanvas", "Refresh" and "Event", and describes refresh events occuring on PixelCanvases.

Prerequisite

Synopsis

This class adds to the information stored in the PixelCanvasEvent class. It adds information describing the reason a refresh event has occurred. An object of this class is generated and distributed to all registered PCRefreshEvent handlers whenever a refresh is explicitly or implicitly generated on a PixelCanvas.

The reason field can be used to minimize the computation required to redraw the screen, or it can be ignored, forcing all elements to be redrawn. The reason for the refresh can be one of the following:

Display::UserCommand

The refresh event was caused by the user explicitly calling the PixelCanvas refresh function.

Display::ColorTableChange

The refresh event was caused by a change in the distribution of colors on the PixelCanvas. Graphical elements that are dependent on colormaps need to be re-drawn. Cached display lists that include colormap-dependent graphical elements must be rebuilt.

Display::ColormapChange

This is a less severe version of the above refresh reason (Display::ColorTableChange), and means that a single Colormap has been modified, but that the overall distribution of colors remains unchanged, ie. other Colormaps in this PixelCanvas' ColorTable are unaffected.

Display::PixelCoordinateChange

The PixelCanvas has changed size. Usually this means the graphics drawn must be translated to a new position (recentered) which can be done by translating all primitives and display lists.

Display::LinearCoordinateChange

The linear coordinate system which is overlaid on the PixelCanvas (normally by a WorldCanvas has changed.

Display::WorldCoordinateChange

The world coordinate system which is overlaid on the PixelCanvas (normally by a WorldCanvas has changed.

Display::BackCopiedToFront

The back buffer has been written to the screen. Only transient graphics drawers should be interested in this refresh reason. Any graphics which are required to be visible over everything else on the PixelCanvas (or WorldCanvas) should catch and respond to this refresh reason. Examples include interactively constructed regions, eg. a zooming box.

Example

Motivation

A compact way of passing refresh event information around the display classes was needed, with a functional but tight and efficient interface.

Thrown Exceptions

.

Definition at line 132 of file PCRefreshEvent.h.

Constructor & Destructor Documentation

casa::PCRefreshEvent::PCRefreshEvent ( PixelCanvas pc,
const Display::RefreshReason reason 
)

Constructor taking a pointer to the PixelCanvas for which the event is valid, and the reason for the refresh.

virtual casa::PCRefreshEvent::~PCRefreshEvent ( )
virtual

Destructor.

casa::PCRefreshEvent::PCRefreshEvent ( )
protected

(Required) default constructor.

casa::PCRefreshEvent::PCRefreshEvent ( const PCRefreshEvent other)
protected

(Required) copy constructor.

Member Function Documentation

PCRefreshEvent& casa::PCRefreshEvent::operator= ( const PCRefreshEvent other)
protected

(Required) copy assignment.

virtual Display::RefreshReason casa::PCRefreshEvent::reason ( ) const
inlinevirtual

Why did the refresh occur?

Definition at line 144 of file PCRefreshEvent.h.

References itsRefreshReason.

Member Data Documentation

Display::RefreshReason casa::PCRefreshEvent::itsRefreshReason
private

Store the reason for the refresh here at construction.

Definition at line 162 of file PCRefreshEvent.h.

Referenced by reason().


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