2 Copyright (C) 2016 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.
19 #ifndef __gtk2_ardour_control_slave_ui_h__
20 #define __gtk2_ardour_control_slave_ui_h__
24 #include <boost/shared_ptr.hpp>
26 #include <gtkmm/box.h>
27 #include <gtkmm/checkmenuitem.h>
29 #include "pbd/signals.h"
30 #include "pbd/properties.h"
32 #include "ardour/session_handle.h"
34 #include "widgets/ardour_button.h"
42 class ControlSlaveUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
45 ControlSlaveUI (ARDOUR::Session*);
47 void set_stripable (boost::shared_ptr<ARDOUR::Stripable>);
50 boost::shared_ptr<ARDOUR::Stripable> stripable;
51 PBD::ScopedConnectionList connections;
52 PBD::ScopedConnectionList master_connections;
53 ArdourWidgets::ArdourButton initial_button;
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>);
64 Gtk::Menu* context_menu;
67 #endif /* __gtk2_ardour_control_slave_ui_h__ */