Ardour  9.0-pre0-582-g084a23a80d
binding_proxy.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2017-2019 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 #ifndef _WIDGETS_BINDING_PROXY_
21 #define _WIDGETS_BINDING_PROXY_
22 
23 #include <memory>
24 #include <string>
25 
26 #include "pbd/signals.h"
27 
28 #include "gdk/gdkevents.h"
29 
30 #include "widgets/visibility.h"
31 
32 namespace PBD {
33  class Controllable;
34 }
35 
36 namespace ArdourWidgets {
37  class PopUp;
38 }
39 
40 namespace ArdourWidgets {
41 
42 class LIBWIDGETS_API BindingProxy : public sigc::trackable
43 {
44 public:
45  BindingProxy (std::shared_ptr<PBD::Controllable>);
47  virtual ~BindingProxy();
48 
49  void set_bind_button_state (guint button, guint statemask);
50 
51  static bool is_bind_action (GdkEventButton *);
53 
54  std::shared_ptr<PBD::Controllable> get_controllable() const { return controllable; }
55  void set_controllable (std::shared_ptr<PBD::Controllable>);
56 
57 protected:
59  std::shared_ptr<PBD::Controllable> controllable;
60 
61  static guint bind_button;
62  static guint bind_statemask;
63 
68 };
69 
70 }
71 
72 #endif
bool button_press_handler(GdkEventButton *)
void set_controllable(std::shared_ptr< PBD::Controllable >)
std::shared_ptr< PBD::Controllable > get_controllable() const
Definition: binding_proxy.h:54
bool prompter_hiding(GdkEventAny *)
static bool is_bind_action(GdkEventButton *)
ArdourWidgets::PopUp * prompter
Definition: binding_proxy.h:58
void set_bind_button_state(guint button, guint statemask)
BindingProxy(std::shared_ptr< PBD::Controllable >)
PBD::ScopedConnection _controllable_going_away_connection
Definition: binding_proxy.h:65
PBD::ScopedConnection learning_connection
Definition: binding_proxy.h:64
std::shared_ptr< PBD::Controllable > controllable
Definition: binding_proxy.h:59
std::shared_ptr< PBD::Controllable > Controllable
Definition: console1.h:80
Definition: axis_view.h:42
#define LIBWIDGETS_API