2 * Copyright (C) 2011-2012 Carl Hetherington <carl@carlh.net>
3 * Copyright (C) 2011 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __gtk_ardour_mono_panner_h__
22 #define __gtk_ardour_mono_panner_h__
24 #include "pbd/signals.h"
26 #include <boost/shared_ptr.hpp>
28 #include "widgets/binding_proxy.h"
30 #include "panner_interface.h"
40 class MonoPanner : public PannerInterface
43 MonoPanner (boost::shared_ptr<ARDOUR::PannerShell>);
46 boost::shared_ptr<PBD::Controllable> get_controllable() const { return position_control; }
48 sigc::signal<void> StartGesture;
49 sigc::signal<void> StopGesture;
52 bool on_expose_event (GdkEventExpose*);
53 bool on_button_press_event (GdkEventButton*);
54 bool on_button_release_event (GdkEventButton*);
55 bool on_motion_notify_event (GdkEventMotion*);
56 bool on_scroll_event (GdkEventScroll*);
57 bool on_key_press_event (GdkEventKey*);
59 boost::weak_ptr<PBD::Controllable> proxy_controllable () const
61 return boost::weak_ptr<PBD::Controllable> (position_binder.get_controllable());
65 PannerEditor* editor ();
66 boost::shared_ptr<ARDOUR::PannerShell> _panner_shell;
68 boost::shared_ptr<PBD::Controllable> position_control;
69 PBD::ScopedConnectionList panvalue_connections;
70 PBD::ScopedConnectionList panshell_connections;
73 double accumulated_delta;
76 ArdourWidgets::BindingProxy position_binder;
91 static Pango::AttrList panner_font_attributes;
92 static bool have_font;
94 static ColorScheme colors;
95 static void set_colors ();
96 static bool have_colors;
97 void color_handler ();
98 void bypass_handler ();
99 void pannable_handler ();
102 #endif /* __gtk_ardour_mono_panner_h__ */