Ardour  9.0-pre0-582-g084a23a80d
panner_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011-2012 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
4  *
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.
9  *
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.
14  *
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.
18  */
19 
20 #pragma once
21 
22 #include <memory>
23 
24 #include <gtkmm/drawingarea.h>
25 #include <gtkmm/label.h>
27 
28 #include "pbd/destructible.h"
29 
30 namespace PBD {
31  class Controllable;
32 }
33 
34 namespace ARDOUR {
35  class Panner;
36 }
37 
38 class PannerEditor;
39 
41 {
42 public:
44 
47 
48  bool dragging () const;
49 
50 private:
51  bool _dragging;
52 };
53 
54 
57 {
58 public:
59  PannerInterface (std::shared_ptr<ARDOUR::Panner>);
60  virtual ~PannerInterface ();
61 
62  std::shared_ptr<ARDOUR::Panner> panner () {
63  return _panner;
64  }
65 
66  void edit ();
67  void set_send_drawing_mode (bool);
68 
69 protected:
70  virtual void set_tooltip () = 0;
71  virtual std::weak_ptr<PBD::Controllable> proxy_controllable () const = 0;
72 
73  void value_change ();
74 
80 
81  std::shared_ptr<ARDOUR::Panner> _panner;
83 
84  bool _send_mode;
85 
86 private:
87  virtual PannerEditor* editor () = 0;
89 };
90 
PannerEditor * _editor
std::shared_ptr< ARDOUR::Panner > panner()
PannerInterface(std::shared_ptr< ARDOUR::Panner >)
virtual std::weak_ptr< PBD::Controllable > proxy_controllable() const =0
bool on_leave_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_leave_notify_event().
virtual PannerEditor * editor()=0
void set_send_drawing_mode(bool)
bool on_button_release_event(GdkEventButton *)
This is a default handler for the signal signal_button_release_event().
bool on_key_release_event(GdkEventKey *)
This is a default handler for the signal signal_key_release_event().
PannerPersistentTooltip _tooltip
virtual void set_tooltip()=0
bool on_enter_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_enter_notify_event().
bool on_button_press_event(GdkEventButton *)
This is a default handler for the signal signal_button_press_event().
std::shared_ptr< ARDOUR::Panner > _panner
virtual ~PannerInterface()
PannerPersistentTooltip(Gtk::Widget *w)
std::shared_ptr< PBD::Controllable > Controllable
Definition: console1.h:80
Definition: axis_view.h:42