Ardour  8.7-14-g57a6773833
track_mix.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2017 Paul Davis <paul@linuxaudiosystems.com>
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 along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_push2_track_mix_layout_h__
20 #define __ardour_push2_track_mix_layout_h__
21 
22 #include <vector>
23 
24 #include "layout.h"
25 
26 namespace ARDOUR {
27  class Stripable;
28  class AutomationControl;
29 }
30 
31 namespace ArdourCanvas {
32  struct Rect;
33 
34  class Rectangle;
35  class Text;
36  class Line;
37 }
38 
39 namespace ArdourSurface {
40 
41 class Push2Knob;
42 class LevelMeter;
43 
45 {
46  public:
47  TrackMixLayout (Push2& p, ARDOUR::Session&, std::string const &);
49 
50  void set_stripable (std::shared_ptr<ARDOUR::Stripable>);
51 
52  void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
53 
54  void show ();
55  void hide ();
56  void button_upper (uint32_t n);
57  void button_lower (uint32_t n);
58  void button_left ();
59  void button_right ();
60 
61  void strip_vpot (int, int);
62  void strip_vpot_touch (int, bool);
63 
64  void update_meters ();
65  void update_clocks ();
66 
67  std::shared_ptr<ARDOUR::Stripable> current_stripable() const { return _stripable; }
68 
69  private:
70  std::shared_ptr<ARDOUR::Stripable> _stripable;
72 
75  std::vector<ArdourCanvas::Text*> _upper_text;
76  std::vector<ArdourCanvas::Text*> _lower_text;
81 
84 
85  void stripable_property_change (PBD::PropertyChange const& what_changed);
86  void simple_control_change (std::shared_ptr<ARDOUR::AutomationControl> ac, Push2::ButtonID bid);
87 
88  void show_state ();
89 
90  void drop_stripable ();
91  void name_changed ();
92  void color_changed ();
93 
96  void solo_iso_change ();
99 };
100 
101 } /* namespace */
102 
103 #endif /* __ardour_push2_track_mix_layout_h__ */
ArdourCanvas::Text * _bbt_text
Definition: track_mix.h:78
void render(ArdourCanvas::Rect const &, Cairo::RefPtr< Cairo::Context >) const
void button_upper(uint32_t n)
void set_stripable(std::shared_ptr< ARDOUR::Stripable >)
void button_lower(uint32_t n)
std::vector< ArdourCanvas::Text * > _upper_text
Definition: track_mix.h:75
PBD::ScopedConnectionList _stripable_connections
Definition: track_mix.h:71
TrackMixLayout(Push2 &p, ARDOUR::Session &, std::string const &)
std::shared_ptr< ARDOUR::Stripable > current_stripable() const
Definition: track_mix.h:67
ArdourCanvas::Rectangle * _bg
Definition: track_mix.h:73
void strip_vpot_touch(int, bool)
void simple_control_change(std::shared_ptr< ARDOUR::AutomationControl > ac, Push2::ButtonID bid)
std::vector< ArdourCanvas::Text * > _lower_text
Definition: track_mix.h:76
ArdourCanvas::Line * _upper_line
Definition: track_mix.h:74
ArdourCanvas::Text * _minsec_text
Definition: track_mix.h:79
std::shared_ptr< ARDOUR::Stripable > _stripable
Definition: track_mix.h:70
void stripable_property_change(PBD::PropertyChange const &what_changed)
ArdourCanvas::Text * _name_text
Definition: track_mix.h:77