2 Copyright (C) 2011 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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"
27 #include "pbd/destructible.h"
35 class PannerPersistentTooltip : public Gtkmm2ext::PersistentTooltip
38 PannerPersistentTooltip (Gtk::Widget* w);
40 void target_start_drag ();
41 void target_stop_drag ();
43 bool dragging () const;
50 /** Parent class for some panner UI classes that contains some common code */
51 class PannerInterface : public Gtk::DrawingArea, public PBD::Destructible
54 PannerInterface (boost::shared_ptr<ARDOUR::Panner>);
55 virtual ~PannerInterface ();
57 boost::shared_ptr<ARDOUR::Panner> panner () {
64 virtual void set_tooltip () = 0;
68 bool on_enter_notify_event (GdkEventCrossing *);
69 bool on_leave_notify_event (GdkEventCrossing *);
70 bool on_key_release_event (GdkEventKey *);
71 bool on_button_press_event (GdkEventButton*);
72 bool on_button_release_event (GdkEventButton*);
74 boost::shared_ptr<ARDOUR::Panner> _panner;
75 PannerPersistentTooltip _tooltip;
78 virtual PannerEditor* editor () = 0;
79 PannerEditor* _editor;