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_scale_layout_h__
20 #define __ardour_push2_scale_layout_h__
30 namespace ArdourCanvas {
34 namespace ArdourSurface {
36 class ScaleLayout : public Push2Layout
39 ScaleLayout (Push2& p, ARDOUR::Session&);
42 void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
46 void button_upper (uint32_t n);
47 void button_lower (uint32_t n);
52 void strip_vpot (int, int);
54 void strip_vpot_touch (int, bool) {}
57 ArdourCanvas::Rectangle* bg;
58 std::vector<ArdourCanvas::Text*> upper_text;
59 std::vector<ArdourCanvas::Text*> lower_text;
60 ArdourCanvas::Text* left_scroll_text;
61 ArdourCanvas::Text* right_scroll_text;
62 ArdourCanvas::Text* inkey_text;
63 ArdourCanvas::Text* chromatic_text;
64 ArdourCanvas::Text* close_text;
65 ArdourCanvas::Text* fixed_text;
66 ArdourCanvas::Rectangle* root_bg;
67 Push2Menu* scale_menu;
70 Push2::Button* root_button;
72 void build_scale_menu ();
73 PBD::ScopedConnectionList menu_connections;
74 PBD::ScopedConnectionList p2_connections;
76 void menu_rearranged ();
77 void show_root_state ();
78 void update_cursor_buttons ();
83 #endif /* __ardour_push2_scale_layout_h__ */