virtualize some CueEditor methods to allow audio clip editor to do the right thing
This commit is contained in:
@@ -98,6 +98,19 @@ AudioClipEditor::~AudioClipEditor ()
|
||||
delete clip_metric;
|
||||
}
|
||||
|
||||
void
|
||||
AudioClipEditor::set_action_defaults ()
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
CueEditor::set_action_defaults ();
|
||||
|
||||
if (grid_actions[Editing::GridTypeMinSec]) {
|
||||
grid_actions[Editing::GridTypeMinSec]->set_active (false);
|
||||
grid_actions[Editing::GridTypeMinSec]->set_active (true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioClipEditor::load_shared_bindings ()
|
||||
{
|
||||
@@ -126,8 +139,9 @@ AudioClipEditor::pack_inner (Gtk::Box& box)
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
box.pack_start (snap_box, false, false);
|
||||
box.pack_start (grid_box, false, false);
|
||||
/* No snap, no grid selections until elastic audio */
|
||||
// box.pack_start (snap_box, false, false);
|
||||
// box.pack_start (grid_box, false, false);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -818,3 +832,18 @@ AudioClipEditor::update_fixed_rulers ()
|
||||
compute_fixed_ruler_scale ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioClipEditor::snap_mode_chosen (Editing::SnapMode)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
AudioClipEditor::grid_type_chosen (Editing::GridType gt)
|
||||
{
|
||||
if (gt != Editing::GridTypeMinSec && grid_actions[gt] && grid_actions[gt]->get_active()) {
|
||||
assert (grid_actions[Editing::GridTypeMinSec]);
|
||||
grid_actions[Editing::GridTypeMinSec]->set_active (false);
|
||||
grid_actions[Editing::GridTypeMinSec]->set_active (true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -198,4 +198,9 @@ public:
|
||||
|
||||
void update_rulers () { update_fixed_rulers(); }
|
||||
void set_action_defaults ();
|
||||
|
||||
void snap_mode_chosen (Editing::SnapMode);
|
||||
void grid_type_chosen (Editing::GridType);
|
||||
|
||||
Gtk::Box* pack_mouse_mode_box () { return nullptr; }
|
||||
};
|
||||
|
||||
@@ -386,14 +386,10 @@ CueEditor::_get_preferred_edit_position (Editing::EditIgnoreOption ignore, bool
|
||||
return Temporal::timepos_t (where);
|
||||
}
|
||||
|
||||
void
|
||||
CueEditor::build_upper_toolbar ()
|
||||
Gtk::Box*
|
||||
CueEditor::pack_mouse_mode_box ()
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
using namespace Gtk::Menu_Helpers;
|
||||
|
||||
Gtk::HBox* mode_box = manage(new Gtk::HBox);
|
||||
Gtk::HBox* mode_box (manage(new Gtk::HBox));
|
||||
mode_box->set_border_width (2);
|
||||
mode_box->set_spacing(2);
|
||||
|
||||
@@ -423,6 +419,18 @@ CueEditor::build_upper_toolbar ()
|
||||
|
||||
mouse_mode_box->pack_start (*mouse_mode_align, false, false);
|
||||
|
||||
return mouse_mode_box;
|
||||
}
|
||||
|
||||
void
|
||||
CueEditor::build_upper_toolbar ()
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
using namespace Gtk::Menu_Helpers;
|
||||
|
||||
Gtk::Box* mouse_mode_box = pack_mouse_mode_box ();
|
||||
|
||||
pack_snap_box ();
|
||||
pack_draw_box (false);
|
||||
|
||||
@@ -430,7 +438,10 @@ CueEditor::build_upper_toolbar ()
|
||||
Gtk::HBox* _toolbar_outer = manage (new Gtk::HBox);
|
||||
Gtk::HBox* _toolbar_left = manage (new Gtk::HBox);
|
||||
|
||||
_toolbar_inner->pack_start (*mouse_mode_box, false, false);
|
||||
if (mouse_mode_box) {
|
||||
_toolbar_inner->pack_start (*mouse_mode_box, false, false);
|
||||
}
|
||||
|
||||
pack_inner (*_toolbar_inner);
|
||||
|
||||
set_tooltip (full_zoom_button, _("Zoom to full clip"));
|
||||
|
||||
@@ -182,6 +182,7 @@ class CueEditor : public EditingContext, public PBD::HistoryOwner
|
||||
|
||||
virtual void pack_inner (Gtk::Box&) = 0;
|
||||
virtual void pack_outer (Gtk::Box&) = 0;
|
||||
virtual Gtk::Box* pack_mouse_mode_box ();
|
||||
void build_zoom_focus_menu ();
|
||||
|
||||
virtual void update_rulers() {}
|
||||
|
||||
@@ -411,7 +411,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
||||
void register_midi_actions (Gtkmm2ext::Bindings*, std::string const &);
|
||||
void register_common_actions (Gtkmm2ext::Bindings*, std::string const &);
|
||||
void register_automation_actions (Gtkmm2ext::Bindings*, std::string const &);
|
||||
void set_action_defaults ();
|
||||
virtual void set_action_defaults ();
|
||||
|
||||
ArdourCanvas::Rectangle* rubberband_rect;
|
||||
|
||||
@@ -552,8 +552,8 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
||||
ArdourWidgets::ArdourDropdown draw_channel_selector;
|
||||
void build_draw_midi_menus ();
|
||||
|
||||
void snap_mode_chosen (Editing::SnapMode);
|
||||
void grid_type_chosen (Editing::GridType);
|
||||
virtual void snap_mode_chosen (Editing::SnapMode);
|
||||
virtual void grid_type_chosen (Editing::GridType);
|
||||
|
||||
ArdourWidgets::ArdourButton play_note_selection_button;
|
||||
ArdourWidgets::ArdourButton note_mode_button;
|
||||
|
||||
Reference in New Issue
Block a user