Ardour  9.0-pre0-582-g084a23a80d
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 "pbd/property_basics.h"
25 
26 #include "layout.h"
27 #include "push2.h"
28 
29 namespace ARDOUR {
30  class Stripable;
31  class AutomationControl;
32 }
33 
34 namespace ArdourCanvas {
35  struct Rect;
36 
37  class Rectangle;
38  class Text;
39  class Line;
40 }
41 
42 namespace ArdourSurface {
43 
44 class Push2Knob;
45 class LevelMeter;
46 
48 {
49  public:
50  TrackMixLayout (Push2& p, ARDOUR::Session&, std::string const &);
52 
53  void set_stripable (std::shared_ptr<ARDOUR::Stripable>);
54 
55  void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
56 
57  void show ();
58  void hide ();
59  void button_upper (uint32_t n);
60  void button_lower (uint32_t n);
61  void button_left ();
62  void button_right ();
63 
64  void strip_vpot (int, int);
65  void strip_vpot_touch (int, bool);
66 
67  void update_meters ();
68  void update_clocks ();
69 
70  std::shared_ptr<ARDOUR::Stripable> current_stripable() const { return _stripable; }
71 
72  private:
73  std::shared_ptr<ARDOUR::Stripable> _stripable;
75 
78  std::vector<ArdourCanvas::Text*> _upper_text;
79  std::vector<ArdourCanvas::Text*> _lower_text;
84 
87 
88  void stripable_property_change (PBD::PropertyChange const& what_changed);
89  void simple_control_change (std::shared_ptr<ARDOUR::AutomationControl> ac, Push2::ButtonID bid);
90 
91  void show_state ();
92 
93  void drop_stripable ();
94  void name_changed ();
95  void color_changed ();
96 
99  void solo_iso_change ();
102 };
103 
104 } /* namespace */
105 
106 #endif /* __ardour_push2_track_mix_layout_h__ */
ArdourCanvas::Text * _bbt_text
Definition: track_mix.h:81
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:78
PBD::ScopedConnectionList _stripable_connections
Definition: track_mix.h:74
TrackMixLayout(Push2 &p, ARDOUR::Session &, std::string const &)
std::shared_ptr< ARDOUR::Stripable > current_stripable() const
Definition: track_mix.h:70
ArdourCanvas::Rectangle * _bg
Definition: track_mix.h:76
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:79
ArdourCanvas::Line * _upper_line
Definition: track_mix.h:77
ArdourCanvas::Text * _minsec_text
Definition: track_mix.h:82
std::shared_ptr< ARDOUR::Stripable > _stripable
Definition: track_mix.h:73
void stripable_property_change(PBD::PropertyChange const &what_changed)
ArdourCanvas::Text * _name_text
Definition: track_mix.h:80