mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
MCU: add scrolling in eq subview
This commit is contained in:
parent
900706320c
commit
c59dddfdae
2 changed files with 29 additions and 3 deletions
|
|
@ -278,6 +278,7 @@ void NoneSubview::setup_vpot(
|
|||
|
||||
EQSubview::EQSubview(MackieControlProtocol& mcp, std::shared_ptr<ARDOUR::Stripable> subview_stripable)
|
||||
: Subview(mcp, subview_stripable)
|
||||
, _current_bank(0)
|
||||
{}
|
||||
|
||||
EQSubview::~EQSubview()
|
||||
|
|
@ -308,8 +309,8 @@ void EQSubview::setup_vpot(
|
|||
Pot* vpot,
|
||||
std::string pending_display[2])
|
||||
{
|
||||
const uint32_t global_strip_position = _mcp.global_index (*strip);
|
||||
store_pointers(strip, vpot, pending_display, global_strip_position);
|
||||
const uint32_t global_strip_position = _mcp.global_index (*strip) + _current_bank;
|
||||
store_pointers(strip, vpot, pending_display, global_strip_position - _current_bank);
|
||||
|
||||
if (!_subview_stripable) {
|
||||
return;
|
||||
|
|
@ -414,7 +415,7 @@ void EQSubview::notify_change (std::weak_ptr<ARDOUR::AutomationControl> pc, uint
|
|||
Strip* strip = 0;
|
||||
Pot* vpot = 0;
|
||||
std::string* pending_display = 0;
|
||||
if (!retrieve_pointers(&strip, &vpot, &pending_display, global_strip_position))
|
||||
if (!retrieve_pointers(&strip, &vpot, &pending_display, global_strip_position - _current_bank))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -428,6 +429,27 @@ void EQSubview::notify_change (std::weak_ptr<ARDOUR::AutomationControl> pc, uint
|
|||
}
|
||||
}
|
||||
|
||||
bool EQSubview::handle_cursor_left_press()
|
||||
{
|
||||
if (_current_bank >= 1)
|
||||
{
|
||||
_current_bank -= 1;
|
||||
mcp().redisplay_subview_mode();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQSubview::handle_cursor_right_press()
|
||||
{
|
||||
if (/* todo: generate this value on redisplay */ 14 > _current_bank + 1) {
|
||||
_current_bank += 1;
|
||||
mcp().redisplay_subview_mode();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
DynamicsSubview::DynamicsSubview(MackieControlProtocol& mcp, std::shared_ptr<ARDOUR::Stripable> subview_stripable)
|
||||
|
|
|
|||
|
|
@ -127,6 +127,10 @@ class EQSubview : public Subview {
|
|||
Pot* vpot,
|
||||
std::string pending_display[2]);
|
||||
void notify_change (std::weak_ptr<ARDOUR::AutomationControl>, uint32_t global_strip_position, bool force);
|
||||
virtual bool handle_cursor_left_press();
|
||||
virtual bool handle_cursor_right_press();
|
||||
protected:
|
||||
uint32_t _current_bank;
|
||||
};
|
||||
|
||||
class DynamicsSubview : public Subview {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue