Ardour  9.0-pre0-427-gd2a3450e2f
surfaces/push2/layout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 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_layout_h__
20 #define __ardour_push2_layout_h__
21 
22 #include <stdint.h>
23 
24 #include <sigc++/trackable.h>
25 
26 #include <cairomm/refptr.h>
27 
28 #include "canvas/container.h"
29 
30 namespace ARDOUR {
31  class Session;
32 }
33 
34 namespace ArdourSurface {
35 
36 class Push2;
37 
38 class Push2Layout : public sigc::trackable, public ArdourCanvas::Container
39 {
40  public:
41  Push2Layout (Push2& p, ARDOUR::Session& s, std::string const & name);
42  virtual ~Push2Layout ();
43 
44  int display_width () const;
45  int display_height () const;
46 
47  void compute_bounding_box () const;
48 
49  virtual void button_upper (uint32_t n) {}
50  virtual void button_lower (uint32_t n) {}
51  virtual void button_up () {}
52  virtual void button_down () {}
53  virtual void button_right () {}
54  virtual void button_left () {}
55  virtual void button_select_press () {}
56  virtual void button_select_release () {}
57  virtual void button_solo () {}
58  virtual void button_mute () {}
59  virtual void button_rhs (int) {} /* scene/notelength buttons aka Right Hand Side */
60  virtual void button_octave_up() {}
61  virtual void button_octave_down() {}
62  virtual void button_page_left() {}
63  virtual void button_page_right() {}
64  virtual void button_stop_press () {}
65  virtual void button_stop_release () {}
66  virtual void button_stop_long_press () {}
67 
68  virtual void strip_vpot (int, int) = 0;
69  virtual void strip_vpot_touch (int, bool) = 0;
70 
71  virtual void pad_press (int x, int y, int velocity) {}
72  virtual void pad_release (int x, int y) {}
73 
74  virtual void update_meters () {}
75  virtual void update_clocks () {}
76 
77  std::string name() const { return _name; }
78 
79  protected:
82  std::string _name;
83 };
84 
85 } /* namespace */
86 
87 #endif /* __ardour_push2_layout_h__ */
void compute_bounding_box() const
virtual void button_lower(uint32_t n)
virtual void strip_vpot(int, int)=0
virtual void pad_release(int x, int y)
virtual void pad_press(int x, int y, int velocity)
virtual void strip_vpot_touch(int, bool)=0
Push2Layout(Push2 &p, ARDOUR::Session &s, std::string const &name)
virtual void button_upper(uint32_t n)
DebugBits Push2