48 virtual void*
origin()
const = 0;
100 const PlotCoordinate& coord);
118 PlotCoordinate
where()
const;
132 const PlotCoordinate& coord) :
142 const PlotCoordinate& coord) :
152 const PlotCoordinate& coord) :
162 const PlotCoordinate& coord) :
172 const PlotCoordinate& coord) :
202 PlotCoordinate
where()
const;
251 case ALT:
return "Alt";
252 case SHIFT:
return "Shift";
261 if(f ==
"ctrl" || f ==
"control")
return CONTROL;
262 if(f ==
"shift")
return SHIFT;
263 if(f ==
"alt")
return ALT;
264 if(f ==
"f" || f ==
"function")
return F;
282 int newWidth,
int newHeight);
286 int newWidth,
int newHeight);
304 std::pair<int, int>
oldSize()
const;
307 std::pair<int, int>
newSize()
const;
PlotRegion region() const
Returns the region that was selected.
void * origin() const
Overrides PlotEvent::origin().
std::pair< int, int > newSize() const
New size, in pixels.
Event for when the user selects a region on a plot canvas with the mouse.
PlotCanvas * canvas() const
Returns the originating canvas.
Convenience class for mouse presses.
char key() const
Returns the pressed character key.
static Modifier modifier(casacore::String f)
PlotResizeEvent(PlotCanvas *canvas, int oldWidth, int oldHeight, int newWidth, int newHeight)
Canvas resize constructor, which takes the old and new sizes.
int delta() const
Scroll delta.
PlotCheckbox * m_checkbox
Event for when a PlotCheckbox is clicked.
PlotCheckbox * checkbox() const
Returns the checkbox that was clicked.
Modifier
Modifier for a key press.
std::pair< int, int > oldSize() const
Old size, in pixels.
virtual void * origin() const =0
Return the origin of the object that spawned this event.
void * origin() const
Overrides PlotEvent::origin().
void * origin() const
Overrides PlotEvent::origin().
Convenience class for mouse moves.
std::vector< Modifier > modifiers() const
Returns the key modifiers.
PlotMouseReleaseEvent(PlotCanvas *canvas, Button button, const PlotCoordinate &coord)
Button
Mouse button types that we care about.
~PlotCheckboxEvent()
Destructor.
Event for when the user scrolls the scroll wheel.
PlotWheelEvent(PlotCanvas *canvas, int delta, const PlotCoordinate &c)
Constructor which takes the originating canvas, the wheel delta, and the location.
A Plotter can be thought of as a frame that holds one or more PlotCanvases in a configuration determi...
Convenience class for mouse clicks.
PlotKeyEvent(PlotCanvas *canvas, char key, const std::vector< Modifier > &mods)
Constructor that takes the originating canvas, the key pressed, and any modifiers.
PlotCheckboxEvent(PlotCheckbox *checkbox)
Constructor which takes the originating checkbox.
PlotMouseEvent(PlotCanvas *canvas, Type type, Button button, const PlotCoordinate &coord)
Constructor which takes the originating canvas, type, button, and location.
Generic class for a checkbox that goes on a PlotPanel.
Event for when the user makes a keyboard command when a canvas has focus.
Plotter * plotter() const
Plotter that was resize, or NULL if it was a canvas.
Button button() const
Button of event.
~PlotResizeEvent()
Destructor.
std::pair< int, int > m_old
void * origin() const
Overrides PlotEvent::origin().
PlotMouseDragEvent(PlotCanvas *canvas, Button button, const PlotCoordinate &coord)
PlotMousePressEvent(PlotCanvas *canvas, Button button, const PlotCoordinate &coord)
PlotClickEvent(PlotCanvas *canvas, Button button, const PlotCoordinate &coord)
~PlotWheelEvent()
Destructor.
PlotCanvas * canvas() const
Returns the canvas upon which the selection was made.
PlotCoordinate where() const
Where the scroll happened.
static casacore::String modifier(Modifier f)
Converts between KeyModifier and its casacore::String representation.
Convenience class for mouse drags.
Event for when a canvas or plotter is resized.
std::pair< int, int > m_new
~PlotSelectEvent()
Destructor.
Generic mouse event where the canvas is the origin, and the type, button, and location of the event a...
~PlotKeyEvent()
Destructor.
PlotSelectEvent(PlotCanvas *canvas, const PlotRegion ®ion)
Constructor that takes the originating canvas and the selected region.
PlotCanvas * canvas() const
Canvas origin of event.
PlotCanvas is an area for different PlotItems to be attached and drawn.
virtual ~PlotMouseEvent()
Destructor.
void * origin() const
Overrides PlotEvent::origin().
PlotMouseMoveEvent(PlotCanvas *canvas, Button button, const PlotCoordinate &coord)
const Double c
Fundamental physical constants (SI units):
String: the storage and methods of handling collections of characters.
casacore::String toString() const
Returns a casacore::String representation of this key event.
std::vector< Modifier > m_mods
PlotCanvas * canvas() const
Canvas that was scrolled upon.
A PlotRegion is basically just a wrapper for two PlotCoordinates: an upper left coordinate and a lowe...
Type type() const
Type of event.
PlotCanvas * canvas() const
Canvas that was resized, or NULL if it was a plotter.
void downcase()
internal transformation to lowercase of String
Convenience class for mouse releases.
void * origin() const
Overrides PlotEvent::origin().
PlotCoordinate where() const
Location of event.