class RegionLayeringOrderEditor;
class VerboseCursor;
-class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
+class Editor : public PublicEditor, public PBD::ScopedConnectionList
{
- public:
+public:
Editor ();
~Editor ();
void set_session (ARDOUR::Session *);
- ARDOUR::Session* session() const { return _session; }
Gtk::Window* use_own_window (bool and_fill_it);
return pixel * samples_per_pixel;
}
- double sample_to_pixel (framepos_t sample) const {
- return round (sample / (double) samples_per_pixel);
+ double sample_to_pixel (framepos_t sample) const {
+ return round (sample / (double) samples_per_pixel);
}
double sample_to_pixel_unrounded (framepos_t sample) const {
Selection& get_selection() const { return *selection; }
bool get_selection_extents (framepos_t &start, framepos_t &end) const; // the time extents of the current selection, whether Range, Region(s), Control Points, or Notes
Selection& get_cut_buffer() const { return *cut_buffer; }
- void track_mixer_selection ();
+
+ void set_selection (std::list<Selectable*>, Selection::Operation);
bool extend_selection_to_track (TimeAxisView&);
void maybe_locate_with_edit_preroll (framepos_t);
void play_with_preroll ();
void rec_with_preroll ();
+ void rec_with_count_in ();
void select_all_in_track (Selection::Operation op);
void select_all_objects (Selection::Operation op);
void invert_selection_in_track ();
void set_selected_mixer_strip (TimeAxisView&);
void mixer_strip_width_changed ();
void hide_track_in_display (TimeAxisView* tv, bool apply_to_selection = false);
+ void show_track_in_display (TimeAxisView* tv, bool move_into_view = false);
+ void tempo_curve_selected (ARDOUR::TempoSection* ts, bool yn);
/* nudge is initiated by transport controls owned by ARDOUR_UI */
/* fades */
- void toggle_region_fades (int dir);
- void update_region_fade_visibility ();
+ void toggle_region_fades (int dir);
+ void update_region_fade_visibility ();
/* redirect shared ops menu. caller must free returned menu */
void scroll_left_half_page ();
void scroll_right_half_page ();
+ void select_topmost_track ();
+
void prepare_for_cleanup ();
void finish_cleanup ();
void start_resize_line_ops ();
void end_resize_line_ops ();
- TrackViewList const & get_track_views () {
+ TrackViewList const & get_track_views () const {
return track_views;
}
TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
- void snap_to (framepos_t& first,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false,
- bool ensure_snap = false);
+ void snap_to (ARDOUR::MusicFrame& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false,
+ bool ensure_snap = false);
- void snap_to_with_modifier (framepos_t& first,
- GdkEvent const * ev,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false);
+ void snap_to_with_modifier (ARDOUR::MusicFrame& first,
+ GdkEvent const * ev,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
- void snap_to (framepos_t& first,
- framepos_t& last,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false);
+ void snap_to (ARDOUR::MusicFrame& first,
+ ARDOUR::MusicFrame& last,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
void begin_selection_op_history ();
void begin_reversible_selection_op (std::string cmd_name);
/* editing operations that need to be public */
void mouse_add_new_marker (framepos_t where, bool is_cd=false);
- void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num, bool snap = true);
+ void split_regions_at (ARDOUR::MusicFrame, RegionSelection&, bool snap = true);
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
RegionSelection get_regions_from_selection_and_mouse (framepos_t);
void edit_tempo_section (ARDOUR::TempoSection*);
void edit_meter_section (ARDOUR::MeterSection*);
- protected:
+protected:
void map_transport_state ();
void map_position_change (framepos_t);
+ void transport_looped ();
void on_realize();
void suspend_route_redisplay ();
void resume_route_redisplay ();
- private:
+private:
void color_handler ();
Editing::ZoomFocus zoom_focus;
void set_samples_per_pixel (framecnt_t);
+ void on_samples_per_pixel_changed ();
Editing::MouseMode mouse_mode;
Editing::SnapType pre_internal_snap_type;
void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, PBD::PropertyID) const;
RegionSelection get_equivalent_regions (RegionSelection &, PBD::PropertyID) const;
+ RegionView* regionview_from_region (boost::shared_ptr<ARDOUR::Region>) const;
+ RouteTimeAxisView* rtav_from_route (boost::shared_ptr<ARDOUR::Route>) const;
+
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
void mapover_tracks_with_unique_playlists (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
};
VisualChange pending_visual_change;
+ bool visual_change_queued;
+
+ void pre_render ();
static int _idle_visual_changer (void *arg);
int idle_visual_changer ();
/* track views */
TrackViewList track_views;
std::pair<TimeAxisView*, double> trackview_by_y_position (double, bool trackview_relative_offset = true) const;
- TimeAxisView* axis_view_from_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
+
+ AxisView* axis_view_by_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
+ AxisView* axis_view_by_control (boost::shared_ptr<ARDOUR::AutomationControl>) const;
+
+ TimeAxisView* time_axis_view_from_stripable (boost::shared_ptr<ARDOUR::Stripable> s) const {
+ return dynamic_cast<TimeAxisView*> (axis_view_by_stripable (s));
+ }
TrackViewList get_tracks_for_range_action () const;
sigc::connection super_rapid_screen_update_connection;
- framepos_t last_update_frame;
void center_screen_internal (framepos_t, float);
void super_rapid_screen_update ();
+ int64_t _last_update_time;
+ double _err_screen_engine;
+
void session_going_away ();
framepos_t cut_buffer_start;
void normalize_region ();
void reset_region_scale_amplitude ();
void adjust_region_gain (bool up);
+ void reset_region_gain ();
void quantize_region ();
void quantize_regions (const RegionSelection& rs);
void legatize_region (bool shrink_only);
void queue_visual_videotimeline_update ();
void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true);
+ bool track_selection_change_without_scroll () const {
+ return _track_selection_change_without_scroll;
+ }
+
PBD::Signal0<void> EditorFreeze;
PBD::Signal0<void> EditorThaw;
- private:
+private:
friend class DragManager;
friend class EditorRouteGroups;
friend class EditorRegions;
void initialize_canvas ();
- void set_script_action_name (int i, const std::string&);
-
/* display control */
bool _show_measures;
void marker_menu_rename ();
void rename_marker (ArdourMarker *marker);
void toggle_marker_lock_style ();
+ void toggle_tempo_clamped ();
void toggle_tempo_type ();
+ void continue_previous_tempo ();
+ void ramp_to_next_tempo ();
void toggle_marker_menu_lock ();
void toggle_marker_menu_glue ();
void marker_menu_hide ();
void compute_current_bbt_points (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, framepos_t left, framepos_t right);
void tempo_map_changed (const PBD::PropertyChange&);
- void marker_position_changed ();
+ void tempometric_position_changed (const PBD::PropertyChange&);
void redisplay_tempo (bool immediate_redraw);
uint32_t bbt_beat_subdivision;
void time_selection_changed ();
void update_time_selection_display ();
- void track_selection_changed ();
+ void presentation_info_changed (PBD::PropertyChange const &);
void region_selection_changed ();
sigc::connection editor_regions_selection_changed_connection;
void sensitize_all_region_actions (bool);
- void sensitize_the_right_region_actions ();
+ void sensitize_the_right_region_actions (bool because_canvas_crossing);
bool _all_region_actions_sensitized;
/** Flag to block region action handlers from doing what they normally do;
* I tried Gtk::Action::block_activate() but this doesn't work (ie it doesn't
void point_selection_changed ();
void marker_selection_changed ();
+ bool _track_selection_change_without_scroll;
+
void cancel_selection ();
void cancel_time_selection ();
void get_regions_at (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
- RegionSelection get_regions_from_selection_and_edit_point ();
+ RegionSelection get_regions_from_selection_and_edit_point (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE,
+ bool use_context_click = false,
+ bool from_outside_canvas = false);
RegionSelection get_regions_from_selection_and_entered () const;
void start_updating_meters ();
void select_next_route ();
void select_prev_route ();
- void snap_to_internal (framepos_t& first,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false,
- bool ensure_snap = false);
+ void snap_to_internal (ARDOUR::MusicFrame& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false,
+ bool ensure_snap = false);
- void timecode_snap_to_internal (framepos_t& first,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false);
+ void timecode_snap_to_internal (ARDOUR::MusicFrame& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
RhythmFerret* rhythm_ferret;
bool _region_selection_change_updates_region_list;
void setup_fade_images ();
- std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_in_images;
- std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_out_images;
std::map<ARDOUR::FadeShape, Gtk::Image*> _xfade_in_images;
std::map<ARDOUR::FadeShape, Gtk::Image*> _xfade_out_images;
QuantizeDialog* quantize_dialog;
MainMenuDisabler* _main_menu_disabler;
- /* private helper functions to help with registering axis */
+ /* private helper functions to help with registering region actions */
+
+ Glib::RefPtr<Gtk::Action> register_region_action (Glib::RefPtr<Gtk::ActionGroup> group, Editing::RegionActionTarget, char const * name, char const * label, sigc::slot<void> slot);
+ void register_toggle_region_action (Glib::RefPtr<Gtk::ActionGroup> group, Editing::RegionActionTarget, char const * name, char const * label, sigc::slot<void> slot);
Glib::RefPtr<Gtk::Action> reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot);
void toggle_reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot);