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::WCPositionEvent Class Reference

Class which stores WorldCanvas position event information. More...

#include <WCPositionEvent.h>

Inheritance diagram for casa::WCPositionEvent:
casa::WCMotionEvent casa::WorldCanvasEvent casa::DisplayEvent

Public Member Functions

 WCPositionEvent (WorldCanvas *wc, const Display::KeySym &key, const casacore::Bool &keyState, const casacore::uInt &modifiers, const casacore::Int &pixX, const casacore::Int &pixY, const casacore::Double &linX, const casacore::Double &linY, const casacore::Vector< casacore::Double > &world)
 Constructor taking a pointer to the WorldCanvas for which the event is valid, the key which is pressed and its state (ie. More...
 
virtual ~WCPositionEvent ()
 Destructor. More...
 
virtual Display::KeySym key () const
 Which key was pressed or released? More...
 
virtual casacore::Bool keystate () const
 What state is the key in: true for pressed, false for released. More...
 
- Public Member Functions inherited from casa::WCMotionEvent
 WCMotionEvent (WorldCanvas *wc, const casacore::uInt &modifiers, const casacore::Int &pixX, const casacore::Int &pixY, const casacore::Double &linX, const casacore::Double &linY, const casacore::Vector< casacore::Double > &world)
 Constructor taking a pointer to the WorldCanvas for which the event is valid, the state of the keyboard and pointer modifiers, and the pixel, linear and world coordinates of the event. More...
 
 WCMotionEvent (const WCMotionEvent &other)
 copy constructor. More...
 
virtual ~WCMotionEvent ()
 Destructor. More...
 
virtual casacore::Int pixX () const
 The x and y pixel position of the pointer when the event occurred. More...
 
virtual casacore::Int pixY () const
 
virtual casacore::Double linX () const
 The x and y linear coordinates of the event. More...
 
virtual casacore::Double linY () const
 
virtual const casacore::Vector
< casacore::Double > & 
world () const
 The world coordinates describing where the event occurred. More...
 
virtual casacore::uInt modifiers () const
 Return the state of the "modifiers": this is made up of mask bits referring to various keys on the keyboard (eg. More...
 
- Public Member Functions inherited from casa::WorldCanvasEvent
 WorldCanvasEvent (WorldCanvas *wc)
 Constructor, taking a pointer to a WorldCanvas. More...
 
virtual ~WorldCanvasEvent ()
 Destructor. More...
 
virtual WorldCanvasworldCanvas () const
 Return a pointer to the WorldCanvas 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

 WCPositionEvent ()
 (Required) default constructor. More...
 
 WCPositionEvent (const WCPositionEvent &other)
 (Required) copy constructor. More...
 
WCPositionEventoperator= (const WCPositionEvent &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::WCMotionEvent
 WCMotionEvent ()
 (Required) default constructor. More...
 
WCMotionEventoperator= (const WCMotionEvent &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::WorldCanvasEvent
 WorldCanvasEvent ()
 (Required) default constructor. More...
 
 WorldCanvasEvent (const WorldCanvasEvent &other)
 (Required) copy constructor. More...
 
WorldCanvasEventoperator= (const WorldCanvasEvent &other)
 (Required) copy assignment. More...
 

Private Attributes

Display::KeySym itsKey
 Store the key that was pressed or released here. More...
 
casacore::Bool itsKeyState
 Store the state of that key here. More...
 

Detailed Description

Class which stores WorldCanvas position event information.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"WCPositionEvent" is a contraction and concatenation of "WorldCanvas", "Position" and "Event", and describes position events occuring on WorldCanvases.

Prerequisite

Synopsis

This class adds to the information stored in the WCMotionEvent class. It adds information describing key that has been pressed or released, and the state of that key.

Example

Motivation

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

Thrown Exceptions

.

Definition at line 83 of file WCPositionEvent.h.

Constructor & Destructor Documentation

casa::WCPositionEvent::WCPositionEvent ( WorldCanvas wc,
const Display::KeySym key,
const casacore::Bool keyState,
const casacore::uInt modifiers,
const casacore::Int pixX,
const casacore::Int pixY,
const casacore::Double linX,
const casacore::Double linY,
const casacore::Vector< casacore::Double > &  world 
)

Constructor taking a pointer to the WorldCanvas for which the event is valid, the key which is pressed and its state (ie.

pressed or released), the state of the keyboard and pointer modifiers, and the pixel, linear and world coordinates of the event.

virtual casa::WCPositionEvent::~WCPositionEvent ( )
virtual

Destructor.

casa::WCPositionEvent::WCPositionEvent ( )
protected

(Required) default constructor.

casa::WCPositionEvent::WCPositionEvent ( const WCPositionEvent other)
protected

(Required) copy constructor.

Member Function Documentation

virtual Display::KeySym casa::WCPositionEvent::key ( ) const
inlinevirtual

Which key was pressed or released?

Definition at line 104 of file WCPositionEvent.h.

References itsKey.

virtual casacore::Bool casa::WCPositionEvent::keystate ( ) const
inlinevirtual

What state is the key in: true for pressed, false for released.

Definition at line 110 of file WCPositionEvent.h.

References itsKeyState.

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

(Required) copy assignment.

Member Data Documentation

Display::KeySym casa::WCPositionEvent::itsKey
private

Store the key that was pressed or released here.

Definition at line 128 of file WCPositionEvent.h.

Referenced by key().

casacore::Bool casa::WCPositionEvent::itsKeyState
private

Store the state of that key here.

Definition at line 131 of file WCPositionEvent.h.

Referenced by keystate().


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