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

Multi WorldCanvas event-based ruler line tool. More...

#include <MWCRulerlineTool.h>

Inheritance diagram for casa::MWCRulerlineTool:
casa::MultiWCTool casa::DTVisible casa::DisplayTool casa::WCPositionEH casa::WCMotionEH casa::WCRefreshEH casa::DisplayEH

Public Member Functions

 MWCRulerlineTool (Display::KeySym keysym=Display::K_Pointer_Button1, casacore::Bool scrollingAllowed=true)
 Constructor. More...
 
virtual ~MWCRulerlineTool ()
 Destructor. More...
 
virtual void reset (casacore::Bool skipRefresh=false)
 Reset to non-showing, non-active. More...
 
- Public Member Functions inherited from casa::MultiWCTool
 MultiWCTool (const Display::KeySym &keysym=Display::K_Pointer_Button1, bool enable_events=true)
 Constructor taking the primary key to which this tool will respond. More...
 
virtual ~MultiWCTool ()
 Destructor. More...
 
virtual void addWorldCanvas (WorldCanvas &worldcanvas)
 Add/remove a WorldCanvas from the control of this tool. More...
 
virtual void removeWorldCanvas (WorldCanvas &worldcanvas)
 
virtual void addWorldCanvases (PanelDisplay *pdisp)
 Add/Remove a list of WorldCanvases from PanelDisplay. More...
 
virtual void removeWorldCanvases (PanelDisplay *pdisp)
 
virtual void enable ()
 Switch the tool on/off - this simply registers or unregisters the event handlers on the WorldCanvases. More...
 
virtual void disable ()
 
virtual void operator() (const WCPositionEvent &ev)
 Required operators for event handling - these are called when events occur, and distribute the events to the "user-level" methods. More...
 
virtual void operator() (const WCMotionEvent &ev)
 default sends event to cout More...
 
virtual void operator() (const WCRefreshEvent &ev)
 original handler interface (still used for WCRefreshEvents) More...
 
- Public Member Functions inherited from casa::DisplayTool
virtual ~DisplayTool ()
 Destructor. More...
 
virtual void setKey (const Display::KeySym &keysym)
 Set/get which key to catch. More...
 
virtual Display::KeySym getKey () const
 
- Public Member Functions inherited from casa::WCPositionEH
 WCPositionEH ()
 Default Constructor Required. More...
 
virtual ~WCPositionEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::WCMotionEH
 WCMotionEH ()
 Default Constructor Required. More...
 
virtual ~WCMotionEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::WCRefreshEH
 WCRefreshEH ()
 Default Constructor Required. More...
 
virtual ~WCRefreshEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::DisplayEH
virtual void handleEvent (DisplayEvent &)
 Classes that contain this interface (i.e., derive from it) can override this method to implement actions for whatever types of DisplayEvent they're interested in. More...
 
virtual ~DisplayEH ()
 
- Public Member Functions inherited from casa::DTVisible
 DTVisible ()
 Default constructor. More...
 
virtual ~DTVisible ()
 Destructor. More...
 
virtual casacore::String drawColor () const
 Return the color to use. More...
 
virtual casacore::Int lineWidth () const
 Return the line width to use. More...
 
virtual casacore::Double doubleClickInterval () const
 Return the double click interval (in seconds). More...
 

Protected Member Functions

virtual void keyPressed (const WCPositionEvent &)
 Functions called by the base class mouse event handling operators - these maintain the state of the pan vector and order it to be drawn via refresh(). More...
 
virtual void keyReleased (const WCPositionEvent &)
 
virtual void moved (const WCMotionEvent &, const viewer::region::region_list_type &)
 
virtual void draw (const WCRefreshEvent &, const viewer::region::region_list_type &)
 draw the distance vector on a PixelCanvas. More...
 
- Protected Member Functions inherited from casa::MultiWCTool
virtual void otherKeyPressed (const WCPositionEvent &)
 
virtual void otherKeyReleased (const WCPositionEvent &)
 
virtual void updateRegion ()
 
virtual void clicked (casacore::Int, casacore::Int)
 
virtual void doubleClicked (casacore::Int, casacore::Int)
 
virtual void refresh ()
 Copy back-to-front buffer (erasing all MWCTool drawings), then cause this (and all MWCTools on current WC's PC) to draw (or not draw) themselves, according to their current state. More...
 
virtual void setClipToDrawArea ()
 Cause subsequent drawing commands to be clipped to the current WC (or its drawing area). More...
 
virtual void setClipToWC ()
 
virtual void resetClip ()
 
- Protected Member Functions inherited from casa::DisplayTool
 DisplayTool (const Display::KeySym &keysym=Display::K_Pointer_Button1)
 
Constructor taking a key to which this tool will initially be

attached, typically one of the pointer buttons. More...

 
 DisplayTool (const DisplayTool &other)
 Copy constructor - construct a new DisplayTool from other, using copy semantics. More...
 
DisplayTooloperator= (const DisplayTool &other)
 Copy assignment using copy semantics. More...
 
Display::KeyModifier keyModifiers ()
 Return the modifier mask. More...
 
- Protected Member Functions inherited from casa::DTVisible
 DTVisible (const DTVisible &other)
 (Required) copy constructor. More...
 
DTVisibleoperator= (const DTVisible &other)
 (Required) copy assignment. More...
 

Private Attributes

casacore::Bool itsActive
 Should we respond to mouse movement and button release? Should we draw? Set when the button is pushed in one of the tool's WCs. More...
 
casacore::Bool itsEqualUnits
 are the units in x and y identical? More...
 
casacore::Int itsX1
 pixel coordinates of the pan vector. More...
 
casacore::Int itsY1
 
casacore::Int itsX2
 
casacore::Int itsY2
 
casacore::Int itsX3
 
casacore::Int itsY3
 
casacore::Int itsRaIndex
 axis index for RA and DEC More...
 
casacore::Int itsDecIndex
 

Additional Inherited Members

- Protected Attributes inherited from casa::MultiWCTool
WorldCanvasitsCurrentWC
 WC being (or to be) drawn on (may be 0 initially). More...
 

Detailed Description

Multi WorldCanvas event-based ruler line tool.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

<prerequisites> </prerequisites>

Etymology

MWCRulerlineTool stands for MultiWorldCanvas ruler line Tool

Synopsis

Example

Motivation

A nice little tool to measure distances on the screen.

Definition at line 69 of file MWCRulerlineTool.h.

Constructor & Destructor Documentation

casa::MWCRulerlineTool::MWCRulerlineTool ( Display::KeySym  keysym = Display::K_Pointer_Button1,
casacore::Bool  scrollingAllowed = true 
)

Constructor.

virtual casa::MWCRulerlineTool::~MWCRulerlineTool ( )
virtual

Destructor.

Member Function Documentation

virtual void casa::MWCRulerlineTool::draw ( const WCRefreshEvent ,
const viewer::region::region_list_type  
)
protectedvirtual

draw the distance vector on a PixelCanvas.

(To be called only by the base class refresh event handler).

Reimplemented from casa::MultiWCTool.

virtual void casa::MWCRulerlineTool::keyPressed ( const WCPositionEvent )
protectedvirtual

Functions called by the base class mouse event handling operators - these maintain the state of the pan vector and order it to be drawn via refresh().

Reimplemented from casa::MultiWCTool.

virtual void casa::MWCRulerlineTool::keyReleased ( const WCPositionEvent )
protectedvirtual

Reimplemented from casa::MultiWCTool.

virtual void casa::MWCRulerlineTool::moved ( const WCMotionEvent ,
const viewer::region::region_list_type  
)
protectedvirtual

Reimplemented from casa::MultiWCTool.

virtual void casa::MWCRulerlineTool::reset ( casacore::Bool  skipRefresh = false)
virtual

Reset to non-showing, non-active.

Refreshes if necessary to erase (unless skipRefresh==true). (Does not unregister from WCs or disable future event handling).

Reimplemented from casa::MultiWCTool.

Member Data Documentation

casacore::Bool casa::MWCRulerlineTool::itsActive
private

Should we respond to mouse movement and button release? Should we draw? Set when the button is pushed in one of the tool's WCs.

Definition at line 101 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsDecIndex
private

Definition at line 110 of file MWCRulerlineTool.h.

casacore::Bool casa::MWCRulerlineTool::itsEqualUnits
private

are the units in x and y identical?

Definition at line 104 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsRaIndex
private

axis index for RA and DEC

Definition at line 110 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsX1
private

pixel coordinates of the pan vector.

1 = anchor, 2 = new position.

Definition at line 107 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsX2
private

Definition at line 107 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsX3
private

Definition at line 107 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsY1
private

Definition at line 107 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsY2
private

Definition at line 107 of file MWCRulerlineTool.h.

casacore::Int casa::MWCRulerlineTool::itsY3
private

Definition at line 107 of file MWCRulerlineTool.h.


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