mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
progrss with rubber band selection and event handling in MIDI cue editor
This commit is contained in:
parent
10b48d2cc4
commit
0311bffed8
5 changed files with 10 additions and 12 deletions
|
|
@ -79,7 +79,7 @@ CueEditor::stop_canvas_autoscroll ()
|
|||
bool
|
||||
CueEditor::autoscroll_active() const
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -105,6 +105,9 @@ MidiCueEditor::build_canvas ()
|
|||
// used as rubberband rect
|
||||
rubberband_rect = new ArdourCanvas::Rectangle (hv_scroll_group, ArdourCanvas::Rect (0.0, 0.0, 0.0, 0.0));
|
||||
rubberband_rect->hide();
|
||||
rubberband_rect->set_outline_color (UIConfiguration::instance().color ("rubber band rect"));
|
||||
rubberband_rect->set_fill_color (UIConfiguration::instance().color_mod ("rubber band rect", "selection rect"));
|
||||
CANVAS_DEBUG_NAME (rubberband_rect, X_("midi cue rubberband rect"));
|
||||
|
||||
bg = new CueMidiBackground (hv_scroll_group);
|
||||
_canvas_viewport->signal_size_allocate().connect (sigc::mem_fun(*this, &MidiCueEditor::canvas_allocate));
|
||||
|
|
@ -114,6 +117,9 @@ void
|
|||
MidiCueEditor::canvas_allocate (Gtk::Allocation alloc)
|
||||
{
|
||||
bg->set_size (alloc.get_width(), alloc.get_height());
|
||||
if (view) {
|
||||
view->set_size (alloc.get_width(), alloc.get_height());
|
||||
}
|
||||
}
|
||||
|
||||
timepos_t
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace ArdourCanvas {
|
|||
class ScrollGroup;
|
||||
}
|
||||
|
||||
class MidiView;
|
||||
class MidiCueView;
|
||||
class CueMidiBackground;
|
||||
|
||||
class MidiCueEditor : public CueEditor
|
||||
|
|
@ -109,7 +109,7 @@ class MidiCueEditor : public CueEditor
|
|||
ArdourCanvas::Rectangle* transport_loop_range_rect;
|
||||
|
||||
CueMidiBackground* bg;
|
||||
MidiView* view;
|
||||
MidiCueView* view;
|
||||
|
||||
void build_canvas ();
|
||||
void canvas_allocate (Gtk::Allocation);
|
||||
|
|
|
|||
|
|
@ -238,8 +238,6 @@ MidiView::canvas_group_event (GdkEvent* ev)
|
|||
//For now, move the snapped cursor aside so it doesn't bother you during internal editing
|
||||
//_editing_context.set_snapped_cursor_position(_midi_region->position());
|
||||
|
||||
std::cerr << "MV @ " << this << " CGE " << Gtkmm2ext::event_type_string (ev->type) << std::endl;
|
||||
|
||||
bool r;
|
||||
|
||||
switch (ev->type) {
|
||||
|
|
@ -4651,12 +4649,6 @@ MidiView::add_split_notes ()
|
|||
}
|
||||
}
|
||||
|
||||
ArdourCanvas::Item*
|
||||
MidiView::drag_group () const
|
||||
{
|
||||
return _note_group->parent();
|
||||
}
|
||||
|
||||
double
|
||||
MidiView::height() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class MidiView : public virtual sigc::trackable
|
|||
|
||||
virtual bool display_is_enabled() const { return true; }
|
||||
|
||||
virtual ArdourCanvas::Item* drag_group() const;
|
||||
virtual ArdourCanvas::Item* drag_group() const = 0;
|
||||
|
||||
void step_add_note (uint8_t channel, uint8_t number, uint8_t velocity,
|
||||
Temporal::Beats pos, Temporal::Beats len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue