mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
scaffolding and more skeleton for trigger UI
This commit is contained in:
parent
405ca42e75
commit
27c6edc0b2
4 changed files with 22 additions and 2 deletions
|
|
@ -45,11 +45,20 @@ using namespace ArdourCanvas;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
|
|
||||||
TriggerUI::TriggerUI (Item* parent, Trigger& t)
|
TriggerUI::TriggerUI (Item* parent, Trigger& t)
|
||||||
: Box (parent, Box::Vertical)
|
: Box (parent, Box::Vertical)
|
||||||
, trigger (t)
|
, trigger (t)
|
||||||
{
|
{
|
||||||
|
follow_label = new Box (canvas(), Horizontal);
|
||||||
|
follow_label->set_fill_color (UIConfiguration::instance().color (X_("theme:bg")));
|
||||||
|
follow_label->set_outline_color (UIConfiguration::instance().color (X_("neutral:foreground")));
|
||||||
|
|
||||||
|
follow_text = new Text (canvas());
|
||||||
|
follow_text->set (X_("Follow Action"));
|
||||||
|
follow_text->set_color (Gtkmm2ext::contrasting_text_color (follow_label->fill_color()));
|
||||||
|
|
||||||
|
follow_label->add (follow_text);
|
||||||
|
add (follow_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
TriggerUI::~TriggerUI ()
|
TriggerUI::~TriggerUI ()
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class TriggerUI : public ArdourCanvas::Box
|
||||||
private:
|
private:
|
||||||
ARDOUR::Trigger& trigger;
|
ARDOUR::Trigger& trigger;
|
||||||
|
|
||||||
ArdourCanvas::Rectangle* follow_label;
|
ArdourCanvas::Box* follow_label;
|
||||||
ArdourCanvas::Text* follow_text;
|
ArdourCanvas::Text* follow_text;
|
||||||
|
|
||||||
ArdourCanvas::Rectangle* follow_left;
|
ArdourCanvas::Rectangle* follow_left;
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
#include "triggerbox_ui.h"
|
#include "triggerbox_ui.h"
|
||||||
|
#include "trigger_ui.h"
|
||||||
#include "public_editor.h"
|
#include "public_editor.h"
|
||||||
#include "ui_config.h"
|
#include "ui_config.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
@ -392,6 +393,7 @@ TriggerBoxUI::context_menu (size_t n)
|
||||||
dynamic_cast<Gtk::CheckMenuItem*> (&qitems.back ())->set_active (true);
|
dynamic_cast<Gtk::CheckMenuItem*> (&qitems.back ())->set_active (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
items.push_back (MenuElem (_("Edit..."), sigc::bind (sigc::mem_fun (*this, &TriggerBoxUI::edit_trigger), n)));
|
||||||
items.push_back (MenuElem (_("Follow Action..."), *follow_menu));
|
items.push_back (MenuElem (_("Follow Action..."), *follow_menu));
|
||||||
items.push_back (MenuElem (_("Launch Style..."), *launch_menu));
|
items.push_back (MenuElem (_("Launch Style..."), *launch_menu));
|
||||||
items.push_back (MenuElem (_("Quantization..."), *quant_menu));
|
items.push_back (MenuElem (_("Quantization..."), *quant_menu));
|
||||||
|
|
@ -399,6 +401,13 @@ TriggerBoxUI::context_menu (size_t n)
|
||||||
_context_menu->popup (1, gtk_get_current_event_time());
|
_context_menu->popup (1, gtk_get_current_event_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TriggerBoxUI::edit_trigger (size_t n)
|
||||||
|
{
|
||||||
|
TriggerWindow* tw = new TriggerWindow (*_triggerbox.trigger (n));
|
||||||
|
tw->present ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TriggerBoxUI::set_follow_action (size_t n, Trigger::FollowAction fa)
|
TriggerBoxUI::set_follow_action (size_t n, Trigger::FollowAction fa)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,8 @@ class TriggerBoxUI : public ArdourCanvas::Box
|
||||||
TriggerBoxUI (ArdourCanvas::Item* parent, ARDOUR::TriggerBox&);
|
TriggerBoxUI (ArdourCanvas::Item* parent, ARDOUR::TriggerBox&);
|
||||||
~TriggerBoxUI ();
|
~TriggerBoxUI ();
|
||||||
|
|
||||||
|
void edit_trigger (size_t n);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::TriggerBox& _triggerbox;
|
ARDOUR::TriggerBox& _triggerbox;
|
||||||
typedef std::vector<TriggerEntry*> Slots;
|
typedef std::vector<TriggerEntry*> Slots;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue