LCOV - code coverage report
Current view: top level - graphics/GenericPlotter - PlotEventHandler.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 14 0.0 %
Date: 2024-10-04 16:51:10 Functions: 0 21 0.0 %

          Line data    Source code
       1             : //# PlotEventHandler.h: Class to handle different types of interaction events.
       2             : //# Copyright (C) 2008
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be addressed as follows:
      20             : //#        Internet email: casa-feedback@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //# $Id: $
      27             : #ifndef PLOTEVENTHANDLER_H_
      28             : #define PLOTEVENTHANDLER_H_
      29             : 
      30             : #include <graphics/GenericPlotter/PlotEvent.h>
      31             : 
      32             : namespace casa {
      33             : 
      34             : // Base class for a handler for PlotSelectEvent.
      35             : class PlotSelectEventHandler {
      36             : public:
      37           0 :     PlotSelectEventHandler() { }
      38             :     
      39           0 :     virtual ~PlotSelectEventHandler() { }
      40             :     
      41             :     // Handle the given event.
      42             :     virtual void handleSelect(const PlotSelectEvent& event) = 0;
      43             : };
      44             : 
      45             : // Base class for a handler for PlotClickEvent.
      46             : class PlotClickEventHandler {
      47             : public:
      48           0 :     PlotClickEventHandler() { }
      49             :     
      50           0 :     virtual ~PlotClickEventHandler() { }
      51             :     
      52             :     // Handle the given event.
      53             :     virtual void handleClick(const PlotClickEvent& event) = 0;
      54             : };
      55             : 
      56             : // Base class for a handler for PlotMousePressEvent.
      57             : class PlotMousePressEventHandler {
      58             : public:
      59           0 :     PlotMousePressEventHandler() { }
      60             :     
      61           0 :     virtual ~PlotMousePressEventHandler() { }
      62             :     
      63             :     // Handle the given event.
      64             :     virtual void handleMousePress(const PlotMousePressEvent& event) = 0;
      65             : };
      66             : 
      67             : // Base class for a handler for PlotMouseReleaseEvent.
      68             : class PlotMouseReleaseEventHandler {
      69             : public:
      70           0 :     PlotMouseReleaseEventHandler() { }
      71             :     
      72           0 :     virtual ~PlotMouseReleaseEventHandler() { }
      73             :     
      74             :     // Handle the given event.
      75             :     virtual void handleMouseRelease(const PlotMouseReleaseEvent& event) = 0;
      76             : };
      77             : 
      78             : // Base class for a handler for PlotMouseDragEvent.
      79             : class PlotMouseDragEventHandler {
      80             : public:
      81           0 :     PlotMouseDragEventHandler() { }
      82             :     
      83           0 :     virtual ~PlotMouseDragEventHandler() { }
      84             :     
      85             :     // Handle the given event.
      86             :     virtual void handleMouseDrag(const PlotMouseDragEvent& event) = 0;
      87             : };
      88             : 
      89             : // Base class for a handler for a PlotMouseMoveEvent.
      90             : class PlotMouseMoveEventHandler {
      91             : public:
      92           0 :     PlotMouseMoveEventHandler() { }
      93             :     
      94           0 :     virtual ~PlotMouseMoveEventHandler() { }
      95             :     
      96             :     // Handle the given event.
      97             :     virtual void handleMouseMove(const PlotMouseMoveEvent& event) = 0;
      98             : };
      99             : 
     100             : // Base class for a handler for PlotWheelEvent.
     101             : class PlotWheelEventHandler {
     102             : public:
     103           0 :     PlotWheelEventHandler() { }
     104             :     
     105           0 :     virtual ~PlotWheelEventHandler() { }
     106             :     
     107             :     // Handle the given event
     108             :     virtual void handleWheel(const PlotWheelEvent& event) = 0;
     109             : };
     110             : 
     111             : // Base class for a handler for PlotKeyEvent.
     112             : class PlotKeyEventHandler {
     113             : public:
     114             :     PlotKeyEventHandler() { }
     115             :     
     116             :     virtual ~PlotKeyEventHandler() { }
     117             :     
     118             :     // Handle the given event.
     119             :     virtual void handleKey(const PlotKeyEvent& event) = 0;
     120             : };
     121             : 
     122             : // Base class for a handler for PlotResizeEvent.
     123             : class PlotResizeEventHandler {
     124             : public:
     125             :     PlotResizeEventHandler() { }
     126             :     
     127             :     virtual ~PlotResizeEventHandler() { }
     128             :     
     129             :     // Handle the given event.
     130             :     virtual void handleResize(const PlotResizeEvent& event) = 0;
     131             : };
     132             : 
     133             : // Base class for a handler for PlotButtonEvent.
     134             : class PlotButtonEventHandler {
     135             : public:
     136             :     PlotButtonEventHandler() { }
     137             :     
     138             :     virtual ~PlotButtonEventHandler() { }
     139             :     
     140             :     // Handle the given event.
     141             :     virtual void handleButton(const PlotButtonEvent& event) = 0;
     142             : };
     143             : 
     144             : // Base class for a handler for PlotCheckboxEvent.
     145             : class PlotCheckboxEventHandler {
     146             : public:
     147             :     PlotCheckboxEventHandler() { }
     148             :     
     149             :     virtual ~PlotCheckboxEventHandler() { }
     150             :     
     151             :     // Handle the given event.
     152             :     virtual void handleCheckbox(const PlotCheckboxEvent& event) = 0;
     153             : };
     154             : 
     155             : 
     156             : // Smart Pointer Definitions //
     157             : 
     158             : typedef casacore::CountedPtr<PlotSelectEventHandler> PlotSelectEventHandlerPtr;
     159             : typedef casacore::CountedPtr<PlotClickEventHandler> PlotClickEventHandlerPtr;
     160             : typedef casacore::CountedPtr<PlotMousePressEventHandler> PlotMousePressEventHandlerPtr;
     161             : typedef casacore::CountedPtr<PlotMouseReleaseEventHandler>
     162             :         PlotMouseReleaseEventHandlerPtr;
     163             : typedef casacore::CountedPtr<PlotMouseDragEventHandler> PlotMouseDragEventHandlerPtr;
     164             : typedef casacore::CountedPtr<PlotMouseMoveEventHandler> PlotMouseMoveEventHandlerPtr;
     165             : typedef casacore::CountedPtr<PlotWheelEventHandler> PlotWheelEventHandlerPtr;
     166             : typedef casacore::CountedPtr<PlotKeyEventHandler> PlotKeyEventHandlerPtr;
     167             : typedef casacore::CountedPtr<PlotResizeEventHandler> PlotResizeEventHandlerPtr;
     168             : typedef casacore::CountedPtr<PlotButtonEventHandler> PlotButtonEventHandlerPtr;
     169             : typedef casacore::CountedPtr<PlotCheckboxEventHandler> PlotCheckboxEventHandlerPtr;
     170             : 
     171             : }
     172             : 
     173             : #endif /*PLOTEVENTHANDLER_H_*/

Generated by: LCOV version 1.16