wrap pianoroll in an event box so we can get events from "the whole thing"

This commit is contained in:
Paul Davis
2025-01-22 18:19:51 -07:00
parent d8baa0b240
commit 42bbd1afd5
3 changed files with 6 additions and 4 deletions

View File

@@ -291,6 +291,7 @@ Pianoroll::build_upper_toolbar ()
Bindings* pr_bindings = Bindings::get_bindings (X_("Pianoroll"));
_toolbox.set_data (X_("ardour-bindings"), pr_bindings);
_contents.add (_toolbox);
}
void
@@ -644,9 +645,9 @@ Pianoroll::viewport()
}
Gtk::Widget&
Pianoroll::toolbox ()
Pianoroll::contents ()
{
return _toolbox;
return _contents;
}
void

View File

@@ -56,7 +56,7 @@ class Pianoroll : public CueEditor
ArdourCanvas::Container* get_trackview_group () const { return data_group; }
ArdourCanvas::Container* get_noscroll_group() const { return no_scroll_group; }
Gtk::Widget& viewport();
Gtk::Widget& toolbox ();
Gtk::Widget& contents ();
double visible_canvas_width() const { return _visible_canvas_width; }
samplecnt_t current_page_samples() const;
@@ -195,6 +195,7 @@ class Pianoroll : public CueEditor
ArdourCanvas::Rectangle* transport_loop_range_rect;
Gtk::EventBox _contents;
Gtk::VBox _toolbox;
Gtk::HBox button_bar;

View File

@@ -152,7 +152,7 @@ TriggerPage::TriggerPage ()
++col;
table->attach (_audio_trig_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
++col;
table->attach (_midi_editor->toolbox(), col, col + 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL);
table->attach (_midi_editor->contents(), col, col + 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL);
++col;
table->show_all ();