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 __ardour_push2_mix_layout_h__
20 #define __ardour_push2_mix_layout_h__
29 namespace ArdourCanvas {
35 namespace ArdourSurface {
40 class MixLayout : public Push2Layout
43 MixLayout (Push2& p, ARDOUR::Session&, std::string const &);
46 void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
49 void button_upper (uint32_t n);
50 void button_lower (uint32_t n);
55 void button_select_press ();
56 void button_select_release ();
60 void strip_vpot (int, int);
61 void strip_vpot_touch (int, bool);
63 void update_meters ();
66 ArdourCanvas::Rectangle* bg;
67 ArdourCanvas::Line* upper_line;
68 std::vector<ArdourCanvas::Text*> upper_text;
69 std::vector<ArdourCanvas::Text*> lower_text;
70 std::vector<ArdourCanvas::Rectangle*> upper_backgrounds;
71 std::vector<ArdourCanvas::Rectangle*> lower_backgrounds;
73 struct GainMeter : public ArdourCanvas::Container {
74 GainMeter (Item* parent, Push2&);
80 GainMeter* gain_meter[8];
85 PBD::ScopedConnectionList stripable_connections;
86 boost::shared_ptr<ARDOUR::Stripable> stripable[8];
88 PBD::ScopedConnectionList session_connections;
89 void stripables_added ();
91 void stripable_property_change (PBD::PropertyChange const& what_changed, uint32_t which);
93 void switch_bank (uint32_t base);
99 Send1, Send2, Send3, Send4, Send5
102 Push2::Button* mode_button;
104 void show_vpot_mode ();
106 void solo_changed (uint32_t n);
107 void mute_changed (uint32_t n);
108 void solo_mute_changed (uint32_t n);
109 void show_selection (uint32_t n);
110 void hide_selection (uint32_t n);
115 #endif /* __ardour_push2_layout_h__ */