Fix ExportFormatSpecification copy-c'tor
[ardour.git] / gtk2_ardour / control_slave_ui.h
1 /*
2   Copyright (C) 2016 Paul Davis
3
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.
8
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.
13
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.
17 */
18
19 #ifndef __gtk2_ardour_control_slave_ui_h__
20 #define __gtk2_ardour_control_slave_ui_h__
21
22 #include <stdint.h>
23
24 #include <boost/shared_ptr.hpp>
25
26 #include <gtkmm/box.h>
27 #include <gtkmm/checkmenuitem.h>
28
29 #include "pbd/signals.h"
30 #include "pbd/properties.h"
31
32 #include "ardour/session_handle.h"
33
34 #include "widgets/ardour_button.h"
35
36 namespace ARDOUR {
37         class VCA;
38         class Stripable;
39         class Session;
40 }
41
42 class ControlSlaveUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
43 {
44 public:
45         ControlSlaveUI (ARDOUR::Session*);
46         ~ControlSlaveUI ();
47         void set_stripable (boost::shared_ptr<ARDOUR::Stripable>);
48
49 private:
50         boost::shared_ptr<ARDOUR::Stripable> stripable;
51         PBD::ScopedConnectionList   connections;
52         PBD::ScopedConnectionList   master_connections;
53         ArdourWidgets::ArdourButton initial_button;
54
55         void master_property_changed (PBD::PropertyChange const &);
56         void update_vca_display ();
57         void vca_menu_toggle (Gtk::CheckMenuItem*, uint32_t n);
58         bool specific_vca_button_release (GdkEventButton* ev, uint32_t n);
59         bool vca_event_box_release (GdkEventButton* ev);
60         bool vca_button_release (GdkEventButton* ev, uint32_t n);
61         void add_vca_button (boost::shared_ptr<ARDOUR::VCA>);
62         void unassign_all ();
63
64         Gtk::Menu* context_menu;
65 };
66
67 #endif /* __gtk2_ardour_control_slave_ui_h__ */