2 * Copyright (C) 2011-2012 Carl Hetherington <carl@carlh.net>
3 * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef __gtk_ardour_panner_interface_h__
21 #define __gtk_ardour_panner_interface_h__
23 #include <boost/shared_ptr.hpp>
24 #include <gtkmm/drawingarea.h>
25 #include <gtkmm/label.h>
26 #include "gtkmm2ext/persistent_tooltip.h"
28 #include "pbd/destructible.h"
40 class PannerPersistentTooltip : public Gtkmm2ext::PersistentTooltip
43 PannerPersistentTooltip (Gtk::Widget* w);
45 void target_start_drag ();
46 void target_stop_drag ();
48 bool dragging () const;
55 /** Parent class for some panner UI classes that contains some common code */
56 class PannerInterface : public Gtk::DrawingArea, public PBD::Destructible
59 PannerInterface (boost::shared_ptr<ARDOUR::Panner>);
60 virtual ~PannerInterface ();
62 boost::shared_ptr<ARDOUR::Panner> panner () {
67 void set_send_drawing_mode (bool);
70 virtual void set_tooltip () = 0;
71 virtual boost::weak_ptr<PBD::Controllable> proxy_controllable () const = 0;
75 bool on_enter_notify_event (GdkEventCrossing *);
76 bool on_leave_notify_event (GdkEventCrossing *);
77 bool on_key_release_event (GdkEventKey *);
78 bool on_button_press_event (GdkEventButton*);
79 bool on_button_release_event (GdkEventButton*);
81 boost::shared_ptr<ARDOUR::Panner> _panner;
82 PannerPersistentTooltip _tooltip;
87 virtual PannerEditor* editor () = 0;
88 PannerEditor* _editor;