Ardour
9.0-pre0-582-g084a23a80d
ui_menu.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Robin Gareus <robin@gareus.org>
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_maschine2_menu_h_
20
#define _ardour_maschine2_menu_h_
21
22
#include <vector>
23
#include <cairomm/refptr.h>
24
25
#include "
pbd/signals.h
"
26
#include "
canvas/container.h
"
27
#include "
canvas/rectangle.h
"
28
29
namespace
ArdourCanvas
{
30
class
Text;
31
}
32
33
namespace
ARDOUR
{
34
class
AutomationControl;
35
}
36
37
namespace
Cairo {
38
class
Context;
39
}
40
41
namespace
ArdourSurface
{
42
43
class
Maschine2;
44
class
M2EncoderInterface;
45
46
class
Maschine2Menu
:
public
ArdourCanvas::Container
47
{
48
public
:
49
Maschine2Menu
(
PBD::EventLoop
*,
ArdourCanvas::Item
*,
const
std::vector<std::string>&,
double
width
= 64);
50
virtual
~Maschine2Menu
();
51
52
void
set_control
(
M2EncoderInterface
*);
53
void
set_active
(uint32_t index);
54
void
set_wrap
(
bool
);
55
56
uint32_t
active
()
const
{
return
_active
; }
57
uint32_t
items
()
const
{
return
_displays
.size(); }
58
59
PBD::Signal
<void()>
ActiveChanged
;
60
61
void
render
(
ArdourCanvas::Rect
const
&, Cairo::RefPtr<Cairo::Context>)
const
;
62
63
private
:
64
void
rearrange
(uint32_t);
65
void
encoder_changed
(
int
);
66
67
M2EncoderInterface
*
_ctrl
;
68
PBD::EventLoop
*
_eventloop
;
69
PBD::ScopedConnection
encoder_connection
;
70
71
std::vector<ArdourCanvas::Text*>
_displays
;
72
ArdourCanvas::Rectangle
*
_active_bg
;
73
74
double
_baseline
;
75
double
_height
;
76
double
_width
;
77
uint32_t
_active
;
78
bool
_wrap
;
79
80
uint32_t
_first
;
81
uint32_t
_last
;
82
double
_rotary
;
83
};
84
85
}
// namespace
86
87
#endif
container.h
rectangle.h
ArdourCanvas::Container
Definition:
canvas/canvas/container.h:40
ArdourCanvas::Item
Definition:
canvas/canvas/item.h:57
ArdourCanvas::Item::width
Coord width() const
ArdourCanvas::Rectangle
Definition:
canvas/canvas/rectangle.h:31
ArdourSurface::M2EncoderInterface
Definition:
m2_encoder.h:28
ArdourSurface::Maschine2Menu
Definition:
ui_menu.h:47
ArdourSurface::Maschine2Menu::_wrap
bool _wrap
Definition:
ui_menu.h:78
ArdourSurface::Maschine2Menu::Maschine2Menu
Maschine2Menu(PBD::EventLoop *, ArdourCanvas::Item *, const std::vector< std::string > &, double width=64)
ArdourSurface::Maschine2Menu::_last
uint32_t _last
Definition:
ui_menu.h:81
ArdourSurface::Maschine2Menu::encoder_connection
PBD::ScopedConnection encoder_connection
Definition:
ui_menu.h:69
ArdourSurface::Maschine2Menu::active
uint32_t active() const
Definition:
ui_menu.h:56
ArdourSurface::Maschine2Menu::_baseline
double _baseline
Definition:
ui_menu.h:74
ArdourSurface::Maschine2Menu::_first
uint32_t _first
Definition:
ui_menu.h:80
ArdourSurface::Maschine2Menu::_active
uint32_t _active
Definition:
ui_menu.h:77
ArdourSurface::Maschine2Menu::ActiveChanged
PBD::Signal< void()> ActiveChanged
Definition:
ui_menu.h:59
ArdourSurface::Maschine2Menu::_active_bg
ArdourCanvas::Rectangle * _active_bg
Definition:
ui_menu.h:72
ArdourSurface::Maschine2Menu::set_control
void set_control(M2EncoderInterface *)
ArdourSurface::Maschine2Menu::_eventloop
PBD::EventLoop * _eventloop
Definition:
ui_menu.h:68
ArdourSurface::Maschine2Menu::_ctrl
M2EncoderInterface * _ctrl
Definition:
ui_menu.h:67
ArdourSurface::Maschine2Menu::items
uint32_t items() const
Definition:
ui_menu.h:57
ArdourSurface::Maschine2Menu::_height
double _height
Definition:
ui_menu.h:75
ArdourSurface::Maschine2Menu::set_wrap
void set_wrap(bool)
ArdourSurface::Maschine2Menu::_displays
std::vector< ArdourCanvas::Text * > _displays
Definition:
ui_menu.h:71
ArdourSurface::Maschine2Menu::rearrange
void rearrange(uint32_t)
ArdourSurface::Maschine2Menu::set_active
void set_active(uint32_t index)
ArdourSurface::Maschine2Menu::_rotary
double _rotary
Definition:
ui_menu.h:82
ArdourSurface::Maschine2Menu::_width
double _width
Definition:
ui_menu.h:76
ArdourSurface::Maschine2Menu::encoder_changed
void encoder_changed(int)
ArdourSurface::Maschine2Menu::render
void render(ArdourCanvas::Rect const &, Cairo::RefPtr< Cairo::Context >) const
ArdourSurface::Maschine2Menu::~Maschine2Menu
virtual ~Maschine2Menu()
PBD::EventLoop
Definition:
event_loop.h:45
PBD::ScopedConnection
Definition:
signals.h:236
PBD::Signal
Definition:
signals.h:169
ARDOUR
Definition:
analysis_window.h:44
ArdourCanvas
Definition:
audio_clip_editor.h:56
ArdourSurface
Definition:
cc121.h:71
signals.h
ArdourCanvas::Rect
Definition:
canvas/canvas/types.h:112
libs
surfaces
maschine2
ui_menu.h
Generated on Wed Dec 25 2024 05:44:56 for Ardour by
1.9.1