mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
large-scale refactoring of Pianoroll, CueEditor and AudioClipEditor
Enables code-sharing between "clip editors"
This commit is contained in:
parent
81ca93bdfb
commit
1d4e3940d1
24 changed files with 2673 additions and 2668 deletions
|
|
@ -147,7 +147,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
void toggle_follow_playhead ();
|
||||
|
||||
/** @return true if the editor is following the playhead */
|
||||
bool follow_playhead () const { return _follow_playhead; }
|
||||
bool follow_playhead () const;
|
||||
|
||||
Temporal::timepos_t get_preferred_edit_position (Editing::EditIgnoreOption eio = Editing::EDIT_IGNORE_NONE,
|
||||
bool use_context_click = false,
|
||||
|
|
@ -258,6 +258,9 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
double timeline_to_canvas (double p) const { return p + _timeline_origin; }
|
||||
double canvas_to_timeline (double p) const { return p - _timeline_origin; }
|
||||
|
||||
double visible_canvas_width () const { return _visible_canvas_width; }
|
||||
double visible_canvas_height () const { return _visible_canvas_height; }
|
||||
|
||||
/** computes the timeline position for an event whose coordinates
|
||||
* are in canvas units (pixels, scroll offset included). The time
|
||||
* domain used by the return value will match ::default_time_domain()
|
||||
|
|
@ -291,12 +294,12 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
void cycle_snap_mode ();
|
||||
void next_grid_choice ();
|
||||
void prev_grid_choice ();
|
||||
void set_grid_to (Editing::GridType);
|
||||
void set_grid_type (Editing::GridType);
|
||||
void set_snap_mode (Editing::SnapMode);
|
||||
|
||||
void set_draw_length_to (Editing::GridType);
|
||||
void set_draw_velocity_to (int);
|
||||
void set_draw_channel_to (int);
|
||||
void set_draw_length (Editing::GridType);
|
||||
void set_draw_velocity (int);
|
||||
void set_draw_channel (int);
|
||||
|
||||
Editing::GridType draw_length () const;
|
||||
int draw_velocity () const;
|
||||
|
|
@ -516,7 +519,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
Glib::RefPtr<Gtk::ActionGroup> velocity_actions;
|
||||
Glib::RefPtr<Gtk::ActionGroup> zoom_actions;
|
||||
|
||||
void load_shared_bindings ();
|
||||
virtual void load_shared_bindings ();
|
||||
|
||||
Editing::GridType pre_internal_grid_type;
|
||||
Editing::SnapMode pre_internal_snap_mode;
|
||||
|
|
@ -525,19 +528,11 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
|
||||
static std::vector<std::string> grid_type_strings;
|
||||
|
||||
Glib::RefPtr<Gtk::RadioAction> grid_type_action (Editing::GridType);
|
||||
Glib::RefPtr<Gtk::RadioAction> snap_mode_action (Editing::SnapMode);
|
||||
|
||||
Glib::RefPtr<Gtk::RadioAction> draw_length_action (Editing::GridType);
|
||||
Glib::RefPtr<Gtk::RadioAction> draw_velocity_action (int);
|
||||
Glib::RefPtr<Gtk::RadioAction> draw_channel_action (int);
|
||||
|
||||
Editing::GridType _grid_type;
|
||||
Editing::SnapMode _snap_mode;
|
||||
|
||||
Editing::GridType _draw_length;
|
||||
int _draw_velocity;
|
||||
int _draw_channel;
|
||||
std::map<Editing::GridType, Glib::RefPtr<Gtk::RadioAction> > grid_actions;
|
||||
std::map<Editing::SnapMode, Glib::RefPtr<Gtk::RadioAction> > snap_mode_actions;
|
||||
std::map<Editing::GridType, Glib::RefPtr<Gtk::RadioAction> > draw_length_actions;
|
||||
std::map<int, Glib::RefPtr<Gtk::RadioAction> > draw_velocity_actions;
|
||||
std::map<int, Glib::RefPtr<Gtk::RadioAction> > draw_channel_actions;
|
||||
|
||||
void draw_channel_chosen (int);
|
||||
void draw_velocity_chosen (int);
|
||||
|
|
@ -561,8 +556,6 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
ArdourWidgets::ArdourDropdown draw_channel_selector;
|
||||
void build_draw_midi_menus ();
|
||||
|
||||
void grid_type_selection_done (Editing::GridType);
|
||||
void snap_mode_selection_done (Editing::SnapMode);
|
||||
void snap_mode_chosen (Editing::SnapMode);
|
||||
void grid_type_chosen (Editing::GridType);
|
||||
|
||||
|
|
@ -600,7 +593,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
EditorCursor* _playhead_cursor;
|
||||
EditorCursor* _snapped_cursor;
|
||||
|
||||
bool _follow_playhead;
|
||||
Glib::RefPtr<Gtk::ToggleAction> follow_playhead_action;
|
||||
|
||||
/* selection process */
|
||||
|
||||
|
|
@ -633,7 +626,6 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
bool ensure_snap = false) const = 0;
|
||||
|
||||
void check_best_snap (Temporal::timepos_t const & presnap, Temporal::timepos_t &test, Temporal::timepos_t &dist, Temporal::timepos_t &best) const;
|
||||
virtual double visible_canvas_width() const = 0;
|
||||
|
||||
enum BBTRulerScale {
|
||||
bbt_show_many,
|
||||
|
|
@ -819,8 +811,8 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
|||
/* protected helper functions to help with registering actions */
|
||||
|
||||
static Glib::RefPtr<Gtk::Action> reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const* name, char const* label, sigc::slot<void> slot);
|
||||
static void toggle_reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const* name, char const* label, sigc::slot<void> slot);
|
||||
static void radio_reg_sens (Glib::RefPtr<Gtk::ActionGroup> action_group, Gtk::RadioAction::Group& radio_group, char const* name, char const* label, sigc::slot<void> slot);
|
||||
static Glib::RefPtr<Gtk::ToggleAction> toggle_reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const* name, char const* label, sigc::slot<void> slot);
|
||||
static Glib::RefPtr<Gtk::RadioAction> radio_reg_sens (Glib::RefPtr<Gtk::ActionGroup> action_group, Gtk::RadioAction::Group& radio_group, char const* name, char const* label, sigc::slot<void> slot);
|
||||
|
||||
void center_screen_internal (samplepos_t, float);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue