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.
21
#include "gtkmm2ext/keyboard.h"
22
#include "gtkmm2ext/persistent_tooltip.h"
23
#include "panner_interface.h"
24
#include "panner_editor.h"
25
#include "global_signals.h"
31
using namespace ARDOUR;
32
using namespace Gtkmm2ext;
34
PannerInterface::PannerInterface (boost::shared_ptr<Panner> p)
39
set_flags (Gtk::CAN_FOCUS);
41
add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|
42
Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|
43
Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|
45
Gdk::POINTER_MOTION_MASK);
49
PannerInterface::~PannerInterface ()
55
PannerInterface::on_enter_notify_event (GdkEventCrossing *)
58
Keyboard::magic_widget_grab_focus ();
63
PannerInterface::on_leave_notify_event (GdkEventCrossing *)
65
Keyboard::magic_widget_drop_focus ();
70
PannerInterface::on_key_release_event (GdkEventKey*)
76
PannerInterface::value_change ()
83
PannerInterface::on_button_press_event (GdkEventButton* ev)
85
if (Gtkmm2ext::Keyboard::is_edit_event (ev)) {
94
PannerInterface::on_button_release_event (GdkEventButton* ev)
96
if (Gtkmm2ext::Keyboard::is_edit_event (ev)) {
97
/* We edited on the press, so claim the release */
105
PannerInterface::edit ()
112
PannerPersistentTooltip::PannerPersistentTooltip (Gtk::Widget* w)
113
: PersistentTooltip (w)
120
PannerPersistentTooltip::target_start_drag ()
126
PannerPersistentTooltip::target_stop_drag ()
132
PannerPersistentTooltip::dragging () const