MWCPannerTool.h
Classes
- MWCPannerTool --
(full description)
Interface
- Public Members
- MWCPannerTool(Display::KeySym keysym = Display::K_Pointer_Button1, Bool scrollingAllowed = True)
- virtual ~MWCPannerTool()
- virtual void reset(Bool skipRefresh=False)
- Protected Members
- virtual void keyPressed(const WCPositionEvent &ev)
- virtual void keyReleased(const WCPositionEvent &ev)
- virtual void moved(const WCMotionEvent &ev)
- virtual void otherKeyPressed(const WCPositionEvent &ev)
- virtual void draw(const WCRefreshEvent &)
- virtual void zoomed(const Vector<Double> &linBlc, const Vector<Double> &linTrc)
- Private Members
- virtual void pan(Vector<Double> &shift)
Review Status
- Date Reviewed:
- yyyy/mm/dd
MWCTool
Etymology
MWCPannerTool stands for MultiWorldCanvas Panner Tool
Synopsis
This class provides panning functionality. The zoomed() function should
be overriden to catch the event, if needed.
The pan line is drawn by dragging the mouse from one point to
another. The release of the mouse button triggers the movement of the
image by the same displacement.
The Tool also responds to the arrow keys, scroll wheel, et. al.,
moving the zoom window in the same direction through the image.
A constructor parameter is provided to turn these features off,
if needed.
Example
Motivation
Panning is a common function in most visualization applications
To Do
Member Description
MWCPannerTool(Display::KeySym keysym = Display::K_Pointer_Button1, Bool scrollingAllowed = True)
Constructor
Destructor
virtual void reset(Bool skipRefresh=False)
Reset to non-showing, non-active. Refreshes if necessary to erase
(unless skipRefresh==True).
(Does not unregister from WCs or disable future event handling).
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(), send the pan request to the WC, and pass on notice
of the pan (zoomed()) when it is complete.
functions
draw the pan vector on a PixelCanvas. (To be called only by the
base class refresh event handler).
virtual void zoomed(const Vector<Double> &linBlc, const Vector<Double> &linTrc)
Output callback to indicate that we have zoomed. Override to
handle, if needed.
virtual void pan(Vector<Double> &shift)
execute the pan. shift is the (2-element) shift vector for the
zoom window, in linear coordinates. Resets the tool, removing
the line (if any) from screen