2007-04-14 14:39:01 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2005-2018 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
|
|
|
|
* Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
|
|
|
|
* Copyright (C) 2006-2015 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2007-2016 Tim Mayberry <mojofunk@gmail.com>
|
|
|
|
* Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
|
|
|
|
* Copyright (C) 2014-2017 Nick Mainsbridge <mainsbridge@gmail.com>
|
|
|
|
* Copyright (C) 2014-2018 Ben Loftis <ben@harrisonconsoles.com>
|
|
|
|
* Copyright (C) 2015 Colin Fletcher <colin.m.fletcher@googlemail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2007-04-14 14:39:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
#ifndef __gtk_ardour_public_editor_h__
|
|
|
|
#define __gtk_ardour_public_editor_h__
|
|
|
|
|
2010-11-13 00:14:48 -05:00
|
|
|
#ifdef WAF_BUILD
|
|
|
|
#include "gtk2ardour-config.h"
|
|
|
|
#endif
|
|
|
|
|
2023-02-17 02:31:31 -05:00
|
|
|
#include <atomic>
|
2005-09-25 14:42:24 -04:00
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <glib.h>
|
|
|
|
#include <gdk/gdktypes.h>
|
2009-08-08 18:36:32 -04:00
|
|
|
#include <gtkmm/box.h>
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <gtkmm/window.h>
|
2006-04-09 23:54:00 -04:00
|
|
|
#include <gtkmm/actiongroup.h>
|
2015-04-21 15:10:49 -04:00
|
|
|
#include <gtkmm/notebook.h>
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <sigc++/signal.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2017-09-24 12:57:27 -04:00
|
|
|
#include "pbd/statefuldestructible.h"
|
|
|
|
|
2017-09-24 12:03:54 -04:00
|
|
|
#include "temporal/beats.h"
|
2009-06-25 16:58:32 -04:00
|
|
|
|
2019-10-25 15:13:51 -04:00
|
|
|
#include "evoral/Note.h"
|
2006-08-29 17:21:48 -04:00
|
|
|
|
2017-05-05 07:31:49 -04:00
|
|
|
#include "ardour/session_handle.h"
|
|
|
|
|
2013-04-15 16:10:13 -04:00
|
|
|
#include "canvas/fwd.h"
|
2015-05-06 12:10:41 -04:00
|
|
|
|
|
|
|
#include "gtkmm2ext/actions.h"
|
2015-08-04 14:00:57 -04:00
|
|
|
#include "gtkmm2ext/bindings.h"
|
2013-05-07 13:01:18 -04:00
|
|
|
#include "gtkmm2ext/visibility_tracker.h"
|
2013-04-15 16:10:13 -04:00
|
|
|
|
2017-07-16 22:55:52 -04:00
|
|
|
#include "widgets/tabbable.h"
|
|
|
|
|
2017-05-05 07:31:49 -04:00
|
|
|
#include "axis_provider.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
#include "editing.h"
|
2006-11-19 11:45:16 -05:00
|
|
|
#include "selection.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2023-07-25 13:58:51 -04:00
|
|
|
namespace Temporal {
|
|
|
|
class TempoPoint;
|
|
|
|
class MeterPoint;
|
|
|
|
}
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
namespace ARDOUR {
|
|
|
|
class Session;
|
2005-10-10 16:38:53 -04:00
|
|
|
class Region;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Playlist;
|
|
|
|
class RouteGroup;
|
2017-04-29 06:01:56 -04:00
|
|
|
class Trimmable;
|
|
|
|
class Movable;
|
|
|
|
class Stripable;
|
2022-08-31 15:53:55 -04:00
|
|
|
class MidiOperator;
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Gtk {
|
|
|
|
class Container;
|
|
|
|
class Menu;
|
|
|
|
}
|
|
|
|
|
2012-05-23 22:54:10 -04:00
|
|
|
class AudioRegionView;
|
2005-11-13 13:13:50 -05:00
|
|
|
class AutomationLine;
|
2012-05-23 22:54:10 -04:00
|
|
|
class AutomationTimeAxisView;
|
2005-11-13 13:13:50 -05:00
|
|
|
class ControlPoint;
|
2012-05-23 22:54:10 -04:00
|
|
|
class DragManager;
|
2021-01-05 15:58:28 -05:00
|
|
|
class EditorCursor;
|
2015-07-23 07:23:47 -04:00
|
|
|
class ArdourMarker;
|
2012-05-23 22:54:10 -04:00
|
|
|
class MeterMarker;
|
2020-01-05 13:22:14 -05:00
|
|
|
class MixerStrip;
|
2010-11-16 09:53:16 -05:00
|
|
|
class MouseCursors;
|
2012-05-23 22:54:10 -04:00
|
|
|
class RegionView;
|
|
|
|
class RouteTimeAxisView;
|
|
|
|
class Selection;
|
2022-10-18 10:53:04 -04:00
|
|
|
class SimpleExport;
|
2017-08-06 16:16:36 -04:00
|
|
|
class StripableTimeAxisView;
|
2016-05-07 13:03:12 -04:00
|
|
|
class TempoCurve;
|
2012-05-23 22:54:10 -04:00
|
|
|
class TempoMarker;
|
|
|
|
class TimeAxisView;
|
2011-05-02 09:38:16 -04:00
|
|
|
class VerboseCursor;
|
2012-05-23 22:54:10 -04:00
|
|
|
struct SelectionRect;
|
2024-03-20 08:49:18 -04:00
|
|
|
class SelectionPropertiesBox;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2014-06-28 17:22:15 -04:00
|
|
|
class DisplaySuspender;
|
|
|
|
|
2014-06-25 15:27:37 -04:00
|
|
|
namespace ARDOUR_UI_UTILS {
|
|
|
|
bool relay_key_press (GdkEventKey* ev, Gtk::Window* win);
|
|
|
|
bool forward_key_press (GdkEventKey* ev);
|
|
|
|
}
|
|
|
|
|
2017-09-18 12:39:17 -04:00
|
|
|
using ARDOUR::samplepos_t;
|
|
|
|
using ARDOUR::samplecnt_t;
|
2010-09-17 14:20:37 -04:00
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/// Representation of the interface of the Editor class
|
|
|
|
|
|
|
|
/** This class contains just the public interface of the Editor class,
|
|
|
|
* in order to decouple it from the private implementation, so that callers
|
|
|
|
* of PublicEditor need not be recompiled if private methods or member variables
|
|
|
|
* change.
|
|
|
|
*/
|
2018-12-10 08:33:31 -05:00
|
|
|
class PublicEditor : public ArdourWidgets::Tabbable, public ARDOUR::SessionHandlePtr, public AxisViewProvider
|
2017-07-01 15:11:14 -04:00
|
|
|
{
|
|
|
|
public:
|
2015-07-07 22:12:21 -04:00
|
|
|
PublicEditor (Gtk::Widget& content);
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual ~PublicEditor ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/** @return Singleton PublicEditor instance */
|
2021-11-13 19:49:20 -05:00
|
|
|
static PublicEditor& instance () { assert (_instance); return *_instance; }
|
2007-05-11 11:06:12 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
virtual bool have_idled() const = 0;
|
|
|
|
virtual void first_idle() = 0;
|
|
|
|
|
2010-02-08 19:50:24 -05:00
|
|
|
virtual void setup_tooltips() = 0;
|
|
|
|
|
2021-01-15 17:57:47 -05:00
|
|
|
/* returns the time domain to be used when there's no other overriding
|
|
|
|
* reason to choose one.
|
|
|
|
*/
|
|
|
|
virtual Temporal::TimeDomain default_time_domain() const = 0;
|
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/** Attach this editor to a Session.
|
|
|
|
* @param s Session to connect to.
|
|
|
|
*/
|
2009-12-17 13:24:23 -05:00
|
|
|
virtual void set_session (ARDOUR::Session* s) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/** Set the snap type.
|
|
|
|
* @param t Snap type (defined in editing_syms.h)
|
|
|
|
*/
|
2018-02-09 10:59:39 -05:00
|
|
|
virtual void set_grid_to (Editing::GridType t) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
2018-02-09 10:59:39 -05:00
|
|
|
virtual Editing::GridType grid_type () const = 0;
|
2009-10-26 19:43:04 -04:00
|
|
|
virtual Editing::SnapMode snap_mode () const = 0;
|
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/** Set the snap mode.
|
|
|
|
* @param m Snap mode (defined in editing_syms.h)
|
|
|
|
*/
|
|
|
|
virtual void set_snap_mode (Editing::SnapMode m) = 0;
|
|
|
|
|
2015-05-22 13:09:48 -04:00
|
|
|
/**
|
|
|
|
* Snap a value according to the current snap setting.
|
|
|
|
* ensure_snap overrides SnapOff and magnetic snap
|
|
|
|
*/
|
2020-09-26 11:14:59 -04:00
|
|
|
virtual void snap_to (Temporal::timepos_t & first,
|
2020-10-01 12:32:06 -04:00
|
|
|
Temporal::RoundMode direction = Temporal::RoundNearest,
|
2018-07-26 15:23:59 -04:00
|
|
|
ARDOUR::SnapPref gpref = ARDOUR::SnapToAny_Visual,
|
2017-07-01 15:11:14 -04:00
|
|
|
bool ensure_snap = false) = 0;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/** Undo some transactions.
|
|
|
|
* @param n Number of transactions to undo.
|
|
|
|
*/
|
2008-09-10 11:03:30 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void undo (uint32_t n = 1) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/** Redo some transactions.
|
|
|
|
* @param n Number of transaction to redo.
|
|
|
|
*/
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void redo (uint32_t n = 1) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/** Set the mouse mode (gain, object, range, timefx etc.)
|
|
|
|
* @param m Mouse mode (defined in editing_syms.h)
|
|
|
|
* @param force Perform the effects of the change even if no change is required
|
2022-10-30 20:44:28 -04:00
|
|
|
* (ie even if the current mouse mode is equal to @p m)
|
2007-05-11 11:06:12 -04:00
|
|
|
*/
|
|
|
|
virtual void set_mouse_mode (Editing::MouseMode m, bool force = false) = 0;
|
|
|
|
|
|
|
|
/** Step the mouse mode onto the next or previous one.
|
|
|
|
* @param next true to move to the next, otherwise move to the previous
|
|
|
|
*/
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void step_mouse_mode (bool next) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/** @return The current mouse mode (gain, object, range, timefx etc.)
|
|
|
|
* (defined in editing_syms.h)
|
|
|
|
*/
|
2007-05-10 07:53:35 -04:00
|
|
|
virtual Editing::MouseMode current_mouse_mode () const = 0;
|
2009-07-28 16:51:28 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
/** @return Whether the current mouse mode is an "internal" editing mode. */
|
2009-07-28 16:51:28 -04:00
|
|
|
virtual bool internal_editing() const = 0;
|
|
|
|
|
2019-09-30 12:20:15 -04:00
|
|
|
/** Possibly start the audition of a region.
|
|
|
|
*
|
|
|
|
* If \p r is 0, or not an AudioRegion any current audition is cancelled.
|
|
|
|
* If we are currently auditioning \p r , the audition will be cancelled.
|
|
|
|
* Otherwise an audition of \p r will start.
|
|
|
|
*
|
|
|
|
* @param r Region to consider auditioning
|
2007-05-11 11:06:12 -04:00
|
|
|
*/
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual void consider_auditioning (std::shared_ptr<ARDOUR::Region> r) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
2017-01-12 12:22:56 -05:00
|
|
|
/* import dialogs -> ardour-ui ?! */
|
|
|
|
virtual void external_audio_dialog () = 0;
|
|
|
|
virtual void session_import_dialog () = 0;
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void new_region_from_selection () = 0;
|
|
|
|
virtual void separate_region_from_selection () = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
2021-12-01 09:03:17 -05:00
|
|
|
virtual void reverse_region () = 0;
|
|
|
|
virtual void normalize_region () = 0;
|
|
|
|
virtual void quantize_region () = 0;
|
|
|
|
virtual void legatize_region (bool shrink_only) = 0;
|
|
|
|
virtual void transform_region () = 0;
|
|
|
|
virtual void transpose_region () = 0;
|
|
|
|
virtual void pitch_shift_region () = 0;
|
|
|
|
|
2007-01-28 12:44:13 -05:00
|
|
|
virtual void transition_to_rolling (bool fwd) = 0;
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual samplepos_t pixel_to_sample (double pixel) const = 0;
|
|
|
|
virtual samplepos_t playhead_cursor_sample () const = 0;
|
|
|
|
virtual double sample_to_pixel (samplepos_t sample) const = 0;
|
|
|
|
virtual double sample_to_pixel_unrounded (samplepos_t sample) const = 0;
|
2020-10-05 00:52:17 -04:00
|
|
|
virtual double time_to_pixel (Temporal::timepos_t const &) const = 0;
|
|
|
|
virtual double time_to_pixel_unrounded (Temporal::timepos_t const &) const = 0;
|
|
|
|
virtual double duration_to_pixels (Temporal::timecnt_t const &) const = 0;
|
|
|
|
virtual double duration_to_pixels_unrounded (Temporal::timecnt_t const &) const = 0;
|
2017-02-23 16:31:03 -05:00
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual Selection& get_selection () const = 0;
|
2020-10-27 13:18:02 -04:00
|
|
|
virtual bool get_selection_extents (Temporal::timepos_t &start, Temporal::timepos_t &end) const = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual Selection& get_cut_buffer () const = 0;
|
2017-02-23 16:31:03 -05:00
|
|
|
|
|
|
|
virtual void set_selection (std::list<Selectable*>, Selection::Operation) = 0;
|
2020-05-01 19:37:27 -04:00
|
|
|
virtual void set_selected_midi_region_view (MidiRegionView&) = 0;
|
2017-02-23 16:31:03 -05:00
|
|
|
|
2024-02-17 09:01:58 -05:00
|
|
|
virtual std::shared_ptr<ARDOUR::Route> current_mixer_stripable () const = 0;
|
|
|
|
|
2009-07-09 13:58:13 -04:00
|
|
|
virtual bool extend_selection_to_track (TimeAxisView&) = 0;
|
2018-02-11 10:39:45 -05:00
|
|
|
virtual void play_solo_selection(bool restart) = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void play_selection () = 0;
|
2012-11-20 14:43:43 -05:00
|
|
|
virtual void play_with_preroll () = 0;
|
2017-01-18 09:16:05 -05:00
|
|
|
virtual void rec_with_preroll () = 0;
|
2017-02-13 16:59:51 -05:00
|
|
|
virtual void rec_with_count_in () = 0;
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual void maybe_locate_with_edit_preroll (samplepos_t location) = 0;
|
2014-07-03 18:50:14 -04:00
|
|
|
virtual void goto_nth_marker (int nth) = 0;
|
2022-09-07 13:13:55 -04:00
|
|
|
virtual void jump_to_loop_marker (bool start) = 0;
|
2016-02-23 09:42:53 -05:00
|
|
|
virtual void trigger_script (int nth) = 0;
|
2022-12-02 15:31:56 -05:00
|
|
|
virtual void add_bbt_marker_at_playhead_cursor () = 0;
|
2014-07-03 18:50:14 -04:00
|
|
|
virtual void add_location_from_playhead_cursor () = 0;
|
2024-05-07 16:47:20 -04:00
|
|
|
virtual void add_section_marker_from_playhead_cursor () = 0;
|
2014-07-03 18:50:14 -04:00
|
|
|
virtual void remove_location_at_playhead_cursor () = 0;
|
2024-05-21 10:27:17 -04:00
|
|
|
void add_location_mark (Temporal::timepos_t const & where, ARDOUR::Location::Flags flags = ARDOUR::Location::IsMark, int32_t cue_id = 0) {
|
|
|
|
add_location_mark_with_flag (where, flags, cue_id);
|
|
|
|
}
|
|
|
|
virtual void add_location_mark_with_flag (Temporal::timepos_t const & where, ARDOUR::Location::Flags, int32_t cue_id) = 0;
|
2018-02-09 10:59:39 -05:00
|
|
|
virtual void update_grid () = 0;
|
2015-04-06 17:56:18 -04:00
|
|
|
virtual void remove_tracks () = 0;
|
2020-09-29 19:53:43 -04:00
|
|
|
virtual void set_loop_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd) = 0;
|
|
|
|
virtual void set_punch_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd) = 0;
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2024-05-29 00:07:35 -04:00
|
|
|
void jump_forward_to_mark () {
|
|
|
|
jump_forward_to_mark_flagged (ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0));
|
|
|
|
}
|
|
|
|
void jump_backward_to_mark () {
|
|
|
|
jump_backward_to_mark_flagged (ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0), ARDOUR::Location::Flags (0));
|
|
|
|
}
|
|
|
|
virtual void jump_forward_to_mark_flagged (ARDOUR::Location::Flags whitelist, ARDOUR::Location::Flags blacklist, ARDOUR::Location::Flags equalist) = 0;
|
|
|
|
virtual void jump_backward_to_mark_flagged (ARDOUR::Location::Flags whitelist, ARDOUR::Location::Flags blacklist, ARDOUR::Location::Flags equalist) = 0;
|
2017-01-12 12:22:56 -05:00
|
|
|
|
2017-01-28 12:02:28 -05:00
|
|
|
virtual void set_session_start_from_playhead () = 0;
|
|
|
|
virtual void set_session_end_from_playhead () = 0;
|
|
|
|
|
|
|
|
virtual void toggle_location_at_playhead_cursor () = 0;
|
|
|
|
|
|
|
|
virtual void nudge_forward (bool next, bool force_playhead) = 0;
|
|
|
|
virtual void nudge_backward (bool next, bool force_playhead) = 0;
|
|
|
|
|
|
|
|
virtual void playhead_forward_to_grid () = 0;
|
|
|
|
virtual void playhead_backward_to_grid () = 0;
|
|
|
|
|
2017-01-28 12:32:59 -05:00
|
|
|
virtual void keyboard_selection_begin ( Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE) = 0;
|
|
|
|
virtual void keyboard_selection_finish (bool add, Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE) = 0;
|
|
|
|
|
|
|
|
virtual void set_punch_start_from_edit_point () = 0;
|
|
|
|
virtual void set_punch_end_from_edit_point () = 0;
|
|
|
|
virtual void set_loop_start_from_edit_point () = 0;
|
|
|
|
virtual void set_loop_end_from_edit_point () = 0;
|
|
|
|
|
2012-11-26 17:43:10 -05:00
|
|
|
virtual Editing::MouseMode effective_mouse_mode () const = 0;
|
|
|
|
|
2014-12-24 20:07:10 -05:00
|
|
|
/** Import existing media */
|
2016-12-14 07:31:16 -05:00
|
|
|
virtual void do_import (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality,
|
2020-09-26 11:14:59 -04:00
|
|
|
ARDOUR::MidiTrackNameSource, ARDOUR::MidiTempoMapDisposition, Temporal::timepos_t&,
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::PluginInfo> instrument = std::shared_ptr<ARDOUR::PluginInfo>(),
|
|
|
|
std::shared_ptr<ARDOUR::Track> track = std::shared_ptr<ARDOUR::Track>(),
|
2021-05-07 16:57:41 -04:00
|
|
|
bool with_markers = false) = 0;
|
2020-09-26 11:14:59 -04:00
|
|
|
virtual void do_embed (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, Temporal::timepos_t&,
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::PluginInfo> instrument = std::shared_ptr<ARDOUR::PluginInfo>(),
|
|
|
|
std::shared_ptr<ARDOUR::Track> track = std::shared_ptr<ARDOUR::Track>()) = 0;
|
2012-12-23 13:25:26 -05:00
|
|
|
|
2008-09-17 04:44:51 -04:00
|
|
|
/** Open main export dialog */
|
|
|
|
virtual void export_audio () = 0;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2011-01-06 11:55:19 -05:00
|
|
|
/** Open stem export dialog */
|
|
|
|
virtual void stem_export () = 0;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 04:44:51 -04:00
|
|
|
/** Open export dialog with current selection pre-selected */
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual void export_selection () = 0;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 04:44:51 -04:00
|
|
|
/** Open export dialog with current range pre-selected */
|
|
|
|
virtual void export_range () = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
2022-10-18 10:53:04 -04:00
|
|
|
/** Open Simple Export Dialog */
|
|
|
|
virtual void quick_export () = 0;
|
|
|
|
|
2023-12-07 11:43:26 -05:00
|
|
|
virtual void surround_export () = 0;
|
|
|
|
|
2021-04-12 18:10:07 -04:00
|
|
|
virtual void loudness_assistant (bool) = 0;
|
2020-07-20 18:40:11 -04:00
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual void register_actions () = 0;
|
|
|
|
virtual void set_zoom_focus (Editing::ZoomFocus) = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual Editing::ZoomFocus get_zoom_focus () const = 0;
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual samplecnt_t get_current_zoom () const = 0;
|
|
|
|
virtual void reset_zoom (samplecnt_t) = 0;
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual void clear_playlist (std::shared_ptr<ARDOUR::Playlist>) = 0;
|
2021-06-04 10:36:53 -04:00
|
|
|
virtual void clear_grouped_playlists (RouteUI*) = 0;
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual void mapped_select_playlist_matching (RouteUI&, std::weak_ptr<ARDOUR::Playlist> pl) = 0;
|
2021-06-27 10:49:51 -04:00
|
|
|
|
|
|
|
virtual void mapover_grouped_routes (sigc::slot<void, RouteUI&> sl, RouteUI*, PBD::PropertyID) const = 0;
|
|
|
|
virtual void mapover_armed_routes (sigc::slot<void, RouteUI&> sl) const = 0;
|
|
|
|
virtual void mapover_selected_routes (sigc::slot<void, RouteUI&> sl) const = 0;
|
|
|
|
virtual void mapover_all_routes (sigc::slot<void, RouteUI&> sl) const = 0;
|
|
|
|
|
2021-06-04 10:36:53 -04:00
|
|
|
virtual void new_playlists_for_all_tracks(bool copy) = 0;
|
|
|
|
virtual void new_playlists_for_grouped_tracks(RouteUI* rui, bool copy) = 0;
|
|
|
|
virtual void new_playlists_for_selected_tracks(bool copy) = 0;
|
|
|
|
virtual void new_playlists_for_armed_tracks(bool copy) = 0;
|
|
|
|
|
2020-01-22 11:30:05 -05:00
|
|
|
virtual void select_all_visible_lanes () = 0;
|
2007-03-18 02:07:08 -04:00
|
|
|
virtual void select_all_tracks () = 0;
|
2014-12-12 18:16:50 -05:00
|
|
|
virtual void deselect_all () = 0;
|
2018-08-24 09:42:43 -04:00
|
|
|
virtual void invert_selection () = 0;
|
2009-07-09 13:58:13 -04:00
|
|
|
virtual void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove = false) = 0;
|
|
|
|
virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
|
2011-03-07 08:05:45 -05:00
|
|
|
virtual void hide_track_in_display (TimeAxisView* tv, bool apply_to_selection = false) = 0;
|
2017-02-24 07:03:24 -05:00
|
|
|
virtual void show_track_in_display (TimeAxisView* tv, bool move_into_view = false) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
2017-01-12 12:22:56 -05:00
|
|
|
virtual void set_stationary_playhead (bool yn) = 0;
|
|
|
|
virtual void toggle_stationary_playhead () = 0;
|
|
|
|
virtual bool stationary_playhead() const = 0;
|
2010-03-16 11:33:04 -04:00
|
|
|
|
2022-02-12 22:44:48 -05:00
|
|
|
virtual void toggle_cue_behavior () = 0;
|
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/** Set whether the editor should follow the playhead.
|
|
|
|
* @param yn true to follow playhead, otherwise false.
|
2011-01-04 21:28:28 -05:00
|
|
|
* @param catch_up true to reset the editor view to show the playhead (if yn == true), otherwise false.
|
2007-05-11 11:06:12 -04:00
|
|
|
*/
|
2017-11-23 04:45:04 -05:00
|
|
|
virtual void set_follow_playhead (bool yn, bool catch_up = true) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/** Toggle whether the editor is following the playhead */
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void toggle_follow_playhead () = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/** @return true if the editor is following the playhead */
|
|
|
|
virtual bool follow_playhead () const = 0;
|
|
|
|
|
|
|
|
/** @return true if the playhead is currently being dragged, otherwise false */
|
|
|
|
virtual bool dragging_playhead () const = 0;
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual samplepos_t leftmost_sample() const = 0;
|
|
|
|
virtual samplecnt_t current_page_samples() const = 0;
|
2013-04-04 18:45:27 -04:00
|
|
|
virtual double visible_canvas_height () const = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void temporal_zoom_step (bool coarser) = 0;
|
2017-04-29 06:01:56 -04:00
|
|
|
virtual void ensure_time_axis_view_is_visible (TimeAxisView const & tav, bool at_top = false) = 0;
|
|
|
|
virtual void override_visible_track_count () = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void scroll_tracks_down_line () = 0;
|
|
|
|
virtual void scroll_tracks_up_line () = 0;
|
2017-04-29 06:01:56 -04:00
|
|
|
virtual bool scroll_down_one_track (bool skip_child_views = false) = 0;
|
|
|
|
virtual bool scroll_up_one_track (bool skip_child_views = false) = 0;
|
2017-04-29 06:38:03 -04:00
|
|
|
virtual void select_topmost_track () = 0;
|
2018-10-22 17:46:44 -04:00
|
|
|
virtual void cleanup_regions () = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void prepare_for_cleanup () = 0;
|
2008-09-10 11:03:30 -04:00
|
|
|
virtual void finish_cleanup () = 0;
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual void reset_x_origin (samplepos_t sample) = 0;
|
2014-12-14 08:13:38 -05:00
|
|
|
virtual double get_y_origin () const = 0;
|
|
|
|
virtual void reset_y_origin (double pos) = 0;
|
2017-07-19 14:08:01 -04:00
|
|
|
virtual void set_visible_track_count (int32_t) = 0;
|
|
|
|
virtual void fit_selection () = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
virtual void remove_last_capture () = 0;
|
2012-06-13 00:21:46 -04:00
|
|
|
virtual void maximise_editing_space () = 0;
|
|
|
|
virtual void restore_editing_space () = 0;
|
2020-09-29 19:53:43 -04:00
|
|
|
virtual Temporal::timepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE, bool from_context_menu = false, bool from_outside_canvas = false) = 0;
|
2008-01-10 16:20:59 -05:00
|
|
|
virtual void toggle_meter_updating() = 0;
|
2020-09-29 19:53:43 -04:00
|
|
|
virtual void split_regions_at (Temporal::timepos_t const &, RegionSelection&) = 0;
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual void split_region_at_points (std::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
2009-07-09 13:58:13 -04:00
|
|
|
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
|
|
|
virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0;
|
2020-09-26 11:14:59 -04:00
|
|
|
virtual Temporal::timecnt_t get_nudge_distance (Temporal::timepos_t const & pos, Temporal::timecnt_t& next) = 0;
|
|
|
|
virtual Temporal::timecnt_t get_paste_offset (Temporal::timepos_t const & pos, unsigned paste_count, Temporal::timecnt_t const & duration) = 0;
|
2021-11-15 18:36:05 -05:00
|
|
|
|
2020-09-26 11:14:59 -04:00
|
|
|
virtual Temporal::Beats get_grid_type_as_beats (bool& success, Temporal::timepos_t const & position) = 0;
|
2021-11-15 18:36:05 -05:00
|
|
|
virtual Temporal::Beats get_draw_length_as_beats (bool& success, Temporal::timepos_t const & position) = 0;
|
|
|
|
|
2021-11-16 13:06:13 -05:00
|
|
|
virtual int draw_velocity () const = 0;
|
|
|
|
virtual int draw_channel () const = 0;
|
|
|
|
|
2022-03-04 11:51:21 -05:00
|
|
|
virtual int32_t get_grid_beat_divisions (Editing::GridType gt) = 0;
|
2021-11-15 18:36:05 -05:00
|
|
|
virtual int32_t get_grid_music_divisions (Editing::GridType gt, uint32_t event_state) = 0;
|
|
|
|
|
2014-12-25 15:32:10 -05:00
|
|
|
virtual void edit_notes (MidiRegionView*) = 0;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2013-03-12 17:00:09 -04:00
|
|
|
virtual void queue_visual_videotimeline_update () = 0;
|
2013-06-12 18:54:43 -04:00
|
|
|
virtual void set_close_video_sensitive (bool) = 0;
|
2013-03-12 17:00:09 -04:00
|
|
|
virtual void toggle_ruler_video (bool) = 0;
|
|
|
|
virtual void toggle_xjadeo_proc (int) = 0;
|
2013-04-05 17:16:33 -04:00
|
|
|
virtual void toggle_xjadeo_viewoption (int, int) = 0;
|
2013-03-12 17:00:09 -04:00
|
|
|
virtual void set_xjadeo_sensitive (bool onoff) = 0;
|
|
|
|
virtual int get_videotl_bar_height () const = 0;
|
|
|
|
virtual void set_video_timeline_height (const int h) = 0;
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual void embed_audio_from_video (std::string, samplepos_t n = 0, bool lock_position_to_video = true) = 0;
|
2013-03-12 17:00:09 -04:00
|
|
|
|
2022-05-23 10:52:25 -04:00
|
|
|
virtual void trigger_script_by_name (const std::string script_name, const std::string args = "") = 0;
|
|
|
|
|
2017-02-17 19:25:13 -05:00
|
|
|
virtual bool track_selection_change_without_scroll () const = 0;
|
2021-02-08 13:45:37 -05:00
|
|
|
virtual bool show_touched_automation () const = 0;
|
2017-02-17 19:25:13 -05:00
|
|
|
|
2017-08-06 16:16:36 -04:00
|
|
|
virtual StripableTimeAxisView* get_stripable_time_axis_by_id (const PBD::ID& id) const = 0;
|
2008-02-10 13:16:25 -05:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual TimeAxisView* time_axis_view_from_stripable (std::shared_ptr<ARDOUR::Stripable> s) const = 0;
|
2017-05-05 07:31:49 -04:00
|
|
|
|
2010-02-18 08:59:49 -05:00
|
|
|
virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&, PBD::PropertyID) const = 0;
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual RegionView* regionview_from_region (std::shared_ptr<ARDOUR::Region>) const = 0;
|
|
|
|
virtual RouteTimeAxisView* rtav_from_route (std::shared_ptr<ARDOUR::Route>) const = 0;
|
2007-10-07 11:51:14 -04:00
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::signal<void> ZoomChanged;
|
2005-12-21 16:37:18 -05:00
|
|
|
sigc::signal<void> Realized;
|
2017-09-18 12:39:17 -04:00
|
|
|
sigc::signal<void,samplepos_t> UpdateAllTransportClocks;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2020-03-25 21:19:46 -04:00
|
|
|
virtual bool pending_locate_request() const = 0;
|
|
|
|
|
2017-04-29 06:01:56 -04:00
|
|
|
static sigc::signal<void> DropDownKeys;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2017-02-14 10:09:32 -05:00
|
|
|
struct RegionAction {
|
|
|
|
Glib::RefPtr<Gtk::Action> action;
|
|
|
|
Editing::RegionActionTarget target;
|
|
|
|
|
|
|
|
RegionAction (Glib::RefPtr<Gtk::Action> a, Editing::RegionActionTarget tgt)
|
|
|
|
: action (a), target (tgt) {}
|
|
|
|
};
|
|
|
|
|
2022-01-18 23:05:57 -05:00
|
|
|
/* data-type of [region] object currently dragged with x-ardour/region.pbdid */
|
|
|
|
static ARDOUR::DataType pbdid_dragged_dt;
|
|
|
|
|
2017-02-14 10:09:32 -05:00
|
|
|
std::map<std::string,RegionAction> region_action_map;
|
|
|
|
|
2006-04-09 23:54:00 -04:00
|
|
|
Glib::RefPtr<Gtk::ActionGroup> editor_actions;
|
2012-03-12 15:24:16 -04:00
|
|
|
Glib::RefPtr<Gtk::ActionGroup> editor_menu_actions;
|
2010-11-03 18:19:29 -04:00
|
|
|
Glib::RefPtr<Gtk::ActionGroup> _region_actions;
|
2020-04-16 14:16:45 -04:00
|
|
|
Glib::RefPtr<Gtk::ActionGroup> _midi_actions;
|
2005-11-13 13:13:50 -05:00
|
|
|
|
2014-06-13 14:27:59 -04:00
|
|
|
virtual bool canvas_scroll_event (GdkEventScroll* event, bool from_canvas) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_control_point_event (GdkEvent* event, ArdourCanvas::Item*, ControlPoint*) = 0;
|
2023-01-12 19:07:27 -05:00
|
|
|
virtual bool canvas_velocity_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
2023-07-10 19:32:18 -04:00
|
|
|
virtual bool canvas_velocity_base_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_line_event (GdkEvent* event, ArdourCanvas::Item*, AutomationLine*) = 0;
|
|
|
|
virtual bool canvas_selection_rect_event (GdkEvent* event, ArdourCanvas::Item*, SelectionRect*) = 0;
|
|
|
|
virtual bool canvas_selection_start_trim_event (GdkEvent* event, ArdourCanvas::Item*, SelectionRect*) = 0;
|
|
|
|
virtual bool canvas_selection_end_trim_event (GdkEvent* event, ArdourCanvas::Item*, SelectionRect*) = 0;
|
2012-05-08 13:13:59 -04:00
|
|
|
virtual bool canvas_start_xfade_event (GdkEvent* event, ArdourCanvas::Item*, AudioRegionView*) = 0;
|
|
|
|
virtual bool canvas_end_xfade_event (GdkEvent* event, ArdourCanvas::Item*, AudioRegionView*) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_fade_in_event (GdkEvent* event, ArdourCanvas::Item*, AudioRegionView*) = 0;
|
2014-05-30 21:53:59 -04:00
|
|
|
virtual bool canvas_fade_in_handle_event (GdkEvent* event, ArdourCanvas::Item*, AudioRegionView*, bool) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_fade_out_event (GdkEvent* event, ArdourCanvas::Item*, AudioRegionView*) = 0;
|
2014-05-30 21:53:59 -04:00
|
|
|
virtual bool canvas_fade_out_handle_event (GdkEvent* event, ArdourCanvas::Item*, AudioRegionView*, bool) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_region_view_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0;
|
2014-06-18 10:24:59 -04:00
|
|
|
virtual bool canvas_wave_view_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0;
|
2019-04-08 14:25:05 -04:00
|
|
|
virtual bool canvas_frame_handle_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_region_view_name_highlight_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0;
|
|
|
|
virtual bool canvas_region_view_name_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0;
|
2010-07-06 07:33:27 -04:00
|
|
|
virtual bool canvas_feature_line_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0;
|
2009-07-09 13:58:13 -04:00
|
|
|
virtual bool canvas_stream_view_event (GdkEvent* event, ArdourCanvas::Item*, RouteTimeAxisView*) = 0;
|
2015-07-23 07:23:47 -04:00
|
|
|
virtual bool canvas_marker_event (GdkEvent* event, ArdourCanvas::Item*, ArdourMarker*) = 0;
|
2013-03-12 17:00:09 -04:00
|
|
|
virtual bool canvas_videotl_bar_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
2023-05-16 19:44:26 -04:00
|
|
|
virtual bool canvas_selection_marker_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_tempo_marker_event (GdkEvent* event, ArdourCanvas::Item*, TempoMarker*) = 0;
|
2016-05-07 13:03:12 -04:00
|
|
|
virtual bool canvas_tempo_curve_event (GdkEvent* event, ArdourCanvas::Item*, TempoCurve*) = 0;
|
2007-05-11 11:06:12 -04:00
|
|
|
virtual bool canvas_meter_marker_event (GdkEvent* event, ArdourCanvas::Item*, MeterMarker*) = 0;
|
2021-02-10 16:34:30 -05:00
|
|
|
virtual bool canvas_bbt_marker_event (GdkEvent* event, ArdourCanvas::Item*, BBTMarker*) = 0;
|
2009-07-09 13:58:13 -04:00
|
|
|
virtual bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*) = 0;
|
2005-11-14 11:24:21 -05:00
|
|
|
|
2009-09-08 17:45:44 -04:00
|
|
|
virtual bool canvas_note_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
2005-11-13 13:13:50 -05:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
static const int window_border_width;
|
|
|
|
static const int container_border_width;
|
|
|
|
static const int vertical_spacing;
|
|
|
|
static const int horizontal_spacing;
|
|
|
|
|
2014-06-22 11:41:05 -04:00
|
|
|
virtual ArdourCanvas::Container* get_trackview_group () const = 0;
|
2014-06-21 11:44:22 -04:00
|
|
|
virtual ArdourCanvas::ScrollGroup* get_hscroll_group () const = 0;
|
|
|
|
virtual ArdourCanvas::ScrollGroup* get_hvscroll_group () const = 0;
|
2015-01-16 19:09:47 -05:00
|
|
|
virtual ArdourCanvas::ScrollGroup* get_cursor_scroll_group () const = 0;
|
2018-02-09 09:21:45 -05:00
|
|
|
virtual ArdourCanvas::Container* get_drag_motion_group () const = 0;
|
2013-04-15 16:10:13 -04:00
|
|
|
|
2017-04-29 06:01:56 -04:00
|
|
|
virtual ArdourCanvas::GtkCanvasViewport* get_track_canvas() const = 0;
|
2008-09-10 17:27:39 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual void set_current_trimmable (std::shared_ptr<ARDOUR::Trimmable>) = 0;
|
|
|
|
virtual void set_current_movable (std::shared_ptr<ARDOUR::Movable>) = 0;
|
2010-09-22 11:21:06 -04:00
|
|
|
|
2017-09-18 12:39:17 -04:00
|
|
|
virtual void center_screen (samplepos_t) = 0;
|
2009-11-25 20:51:50 -05:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual TrackViewList axis_views_from_routes (std::shared_ptr<ARDOUR::RouteList>) const = 0;
|
2017-05-05 07:31:49 -04:00
|
|
|
virtual TrackViewList const & get_track_views () const = 0;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2020-01-05 13:22:14 -05:00
|
|
|
virtual MixerStrip* get_current_mixer_strip () const = 0;
|
|
|
|
|
2010-06-29 15:08:19 -04:00
|
|
|
virtual DragManager* drags () const = 0;
|
2019-11-08 19:35:55 -05:00
|
|
|
virtual bool drag_active () const = 0;
|
|
|
|
virtual bool preview_video_drag_active () const = 0;
|
2017-04-29 06:01:56 -04:00
|
|
|
virtual void maybe_autoscroll (bool, bool, bool from_headers) = 0;
|
2010-06-29 15:08:19 -04:00
|
|
|
virtual void stop_canvas_autoscroll () = 0;
|
2017-04-29 06:01:56 -04:00
|
|
|
virtual bool autoscroll_active() const = 0;
|
2010-06-29 15:08:19 -04:00
|
|
|
|
2015-01-10 12:07:31 -05:00
|
|
|
virtual void begin_reversible_selection_op (std::string cmd_name) = 0;
|
|
|
|
virtual void commit_reversible_selection_op () = 0;
|
2014-12-14 08:13:38 -05:00
|
|
|
virtual void begin_reversible_command (std::string cmd_name) = 0;
|
|
|
|
virtual void begin_reversible_command (GQuark) = 0;
|
2015-02-05 07:32:57 -05:00
|
|
|
virtual void abort_reversible_command () = 0;
|
2014-12-14 08:13:38 -05:00
|
|
|
virtual void commit_reversible_command () = 0;
|
|
|
|
|
2022-10-27 15:42:58 -04:00
|
|
|
virtual Temporal::TempoMap::WritableSharedPtr begin_tempo_map_edit () = 0;
|
|
|
|
virtual void abort_tempo_map_edit () = 0;
|
|
|
|
void commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr& map, bool with_update = false) {
|
|
|
|
_commit_tempo_map_edit (map, with_update);
|
|
|
|
}
|
|
|
|
|
2023-08-15 01:38:44 -04:00
|
|
|
virtual Temporal::TempoMap::WritableSharedPtr begin_tempo_mapping (Temporal::DomainBounceInfo&) = 0;
|
2023-02-24 01:01:09 -05:00
|
|
|
virtual void abort_tempo_mapping () = 0;
|
2023-02-24 12:13:23 -05:00
|
|
|
virtual void commit_tempo_mapping (Temporal::TempoMap::WritableSharedPtr& map) = 0;
|
2023-02-24 01:01:09 -05:00
|
|
|
|
2017-08-09 08:04:05 -04:00
|
|
|
virtual void access_action (const std::string&, const std::string&) = 0;
|
|
|
|
virtual void set_toggleaction (const std::string&, const std::string&, bool) = 0;
|
2016-02-29 06:01:37 -05:00
|
|
|
|
2019-04-08 18:27:05 -04:00
|
|
|
virtual MouseCursors const* cursors () const = 0;
|
|
|
|
virtual VerboseCursor* verbose_cursor () const = 0;
|
2010-11-16 09:53:16 -05:00
|
|
|
|
2021-01-05 15:58:28 -05:00
|
|
|
virtual EditorCursor* playhead_cursor () const = 0;
|
|
|
|
virtual EditorCursor* snapped_cursor () const = 0;
|
|
|
|
|
2012-11-20 14:43:43 -05:00
|
|
|
virtual bool get_smart_mode () const = 0;
|
|
|
|
|
2011-05-02 09:38:16 -04:00
|
|
|
virtual void get_pointer_position (double &, double &) const = 0;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2021-01-14 14:55:51 -05:00
|
|
|
virtual std::pair <Temporal::timepos_t, Temporal::timepos_t> session_gui_extents (bool use_extra = true) const = 0;
|
2021-01-05 17:23:22 -05:00
|
|
|
|
2019-04-08 18:27:05 -04:00
|
|
|
virtual ARDOUR::Location* find_location_from_marker (ArdourMarker*, bool&) const = 0;
|
|
|
|
virtual ArdourMarker* find_marker_from_location_id (PBD::ID const&, bool) const = 0;
|
2023-07-25 13:58:51 -04:00
|
|
|
virtual TempoMarker* find_marker_for_tempo (Temporal::TempoPoint const &) = 0;
|
|
|
|
virtual MeterMarker* find_marker_for_meter (Temporal::MeterPoint const &) = 0;
|
2011-10-19 20:05:31 -04:00
|
|
|
|
2020-09-26 11:14:59 -04:00
|
|
|
virtual void snap_to_with_modifier (Temporal::timepos_t & first,
|
2019-04-08 18:27:05 -04:00
|
|
|
GdkEvent const* ev,
|
2020-10-01 12:32:06 -04:00
|
|
|
Temporal::RoundMode direction = Temporal::RoundNearest,
|
2023-08-19 15:33:16 -04:00
|
|
|
ARDOUR::SnapPref gpref = ARDOUR::SnapToAny_Visual,
|
|
|
|
bool ensure_snap = false) = 0;
|
2021-03-15 21:49:18 -04:00
|
|
|
virtual Temporal::timepos_t snap_to_bbt (Temporal::timepos_t const & pos, Temporal::RoundMode, ARDOUR::SnapPref) = 0;
|
2011-11-16 15:11:33 -05:00
|
|
|
|
2020-10-15 01:09:22 -04:00
|
|
|
virtual void set_snapped_cursor_position (Temporal::timepos_t const & pos) = 0;
|
2018-02-09 09:21:45 -05:00
|
|
|
|
2020-09-29 19:53:43 -04:00
|
|
|
virtual void get_regions_at (RegionSelection &, Temporal::timepos_t const & where, TrackViewList const &) const = 0;
|
|
|
|
virtual void get_regions_after (RegionSelection&, Temporal::timepos_t const & where, const TrackViewList& ts) const = 0;
|
|
|
|
virtual RegionSelection get_regions_from_selection_and_mouse (Temporal::timepos_t const &) = 0;
|
2015-01-10 12:07:31 -05:00
|
|
|
virtual void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const = 0;
|
2023-02-16 18:33:28 -05:00
|
|
|
virtual void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<std::shared_ptr<Evoral::Note<Temporal::Beats> > > > >&) const = 0;
|
2012-01-23 20:31:42 -05:00
|
|
|
|
2018-02-09 10:59:39 -05:00
|
|
|
virtual void build_region_boundary_cache () = 0;
|
|
|
|
virtual void mark_region_boundary_cache_dirty () = 0;
|
|
|
|
|
2020-10-05 00:52:17 -04:00
|
|
|
virtual void mouse_add_new_tempo_event (Temporal::timepos_t where) = 0;
|
|
|
|
virtual void mouse_add_new_meter_event (Temporal::timepos_t where) = 0;
|
2020-11-23 18:45:08 -05:00
|
|
|
virtual void edit_tempo_section (Temporal::TempoPoint&) = 0;
|
|
|
|
virtual void edit_meter_section (Temporal::MeterPoint&) = 0;
|
2015-02-03 14:25:10 -05:00
|
|
|
|
2021-06-02 18:34:13 -04:00
|
|
|
virtual bool should_ripple () const = 0;
|
2021-05-31 14:44:32 -04:00
|
|
|
|
2022-04-05 22:50:44 -04:00
|
|
|
virtual void queue_redisplay_track_views () = 0;
|
|
|
|
|
2023-09-24 17:00:28 -04:00
|
|
|
virtual ARDOUR::Quantize* get_quantize_op () = 0;
|
2022-08-31 15:53:55 -04:00
|
|
|
virtual void apply_midi_note_edit_op (ARDOUR::MidiOperator& op, const RegionSelection& rs) = 0;
|
|
|
|
|
2023-08-31 20:25:18 -04:00
|
|
|
virtual void set_tempo_curve_range (double& max, double& min) const = 0;
|
|
|
|
|
2024-06-03 19:52:42 -04:00
|
|
|
virtual void start_track_drag (TimeAxisView&, int y, Gtk::Widget&, bool can_change_cursor) = 0;
|
2024-05-02 20:22:07 -04:00
|
|
|
virtual void mid_track_drag (GdkEventMotion*, Gtk::Widget&) = 0;
|
|
|
|
virtual void end_track_drag () = 0;
|
|
|
|
virtual bool track_dragging() const = 0;
|
|
|
|
|
2007-05-11 11:06:12 -04:00
|
|
|
/// Singleton instance, set up by Editor::Editor()
|
2008-09-10 17:27:39 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
static PublicEditor* _instance;
|
2006-08-10 23:24:57 -04:00
|
|
|
|
2014-06-25 15:27:37 -04:00
|
|
|
friend bool ARDOUR_UI_UTILS::relay_key_press (GdkEventKey*, Gtk::Window*);
|
|
|
|
friend bool ARDOUR_UI_UTILS::forward_key_press (GdkEventKey*);
|
2010-05-25 19:14:41 -04:00
|
|
|
|
|
|
|
PBD::Signal0<void> SnapChanged;
|
2010-11-21 18:54:57 -05:00
|
|
|
PBD::Signal0<void> MouseModeChanged;
|
2014-03-24 19:46:45 -04:00
|
|
|
|
2015-08-08 08:36:29 -04:00
|
|
|
Gtkmm2ext::Bindings* bindings;
|
2024-03-25 20:36:11 -04:00
|
|
|
Gtkmm2ext::Bindings* midi_bindings;
|
2015-10-26 14:35:06 -04:00
|
|
|
|
2024-03-20 08:49:18 -04:00
|
|
|
virtual SelectionPropertiesBox& properties_box() const = 0;
|
2024-03-21 00:20:05 -04:00
|
|
|
Gtk::HBox* mouse_mode_hbox;
|
|
|
|
Gtk::HBox _zoom_box;
|
2024-04-25 10:10:26 -04:00
|
|
|
Gtk::HBox _track_box;
|
2024-03-21 00:20:05 -04:00
|
|
|
/** the adjustment that controls the overall editor vertical scroll position */
|
|
|
|
Gtk::Adjustment vertical_adjustment;
|
|
|
|
Gtk::Adjustment horizontal_adjustment;
|
2024-03-20 08:49:18 -04:00
|
|
|
|
2024-05-09 16:41:11 -04:00
|
|
|
#ifdef LIVETRAX
|
|
|
|
virtual void livetrax_assign_ui_dependent_actions() = 0;
|
|
|
|
#endif
|
|
|
|
|
2017-04-29 06:01:56 -04:00
|
|
|
protected:
|
2014-06-28 17:22:15 -04:00
|
|
|
friend class DisplaySuspender;
|
|
|
|
virtual void suspend_route_redisplay () = 0;
|
|
|
|
virtual void resume_route_redisplay () = 0;
|
2022-10-27 15:42:58 -04:00
|
|
|
virtual void _commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr&, bool with_update) = 0;
|
2021-03-19 01:20:21 -04:00
|
|
|
|
2023-02-17 02:31:31 -05:00
|
|
|
std::atomic<int> _suspend_route_redisplay_counter;
|
2014-06-28 17:22:15 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class DisplaySuspender {
|
|
|
|
public:
|
|
|
|
DisplaySuspender() {
|
2023-02-17 02:31:31 -05:00
|
|
|
if (PublicEditor::instance()._suspend_route_redisplay_counter.fetch_add (1) == 0) {
|
2014-06-28 17:22:15 -04:00
|
|
|
PublicEditor::instance().suspend_route_redisplay ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
~DisplaySuspender () {
|
2023-02-17 02:31:31 -05:00
|
|
|
if (PBD::atomic_dec_and_test (PublicEditor::instance()._suspend_route_redisplay_counter)) {
|
2014-06-28 17:22:15 -04:00
|
|
|
PublicEditor::instance().resume_route_redisplay ();
|
|
|
|
}
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
2015-05-06 12:10:41 -04:00
|
|
|
class MainMenuDisabler {
|
|
|
|
public:
|
|
|
|
MainMenuDisabler () {
|
|
|
|
/* The global menu bar continues to be accessible to applications
|
|
|
|
with modal dialogs on mac, which means that we need to desensitize
|
2015-10-04 14:51:05 -04:00
|
|
|
all items in the menu bar.
|
2015-05-06 12:10:41 -04:00
|
|
|
*/
|
|
|
|
ActionManager::disable_active_actions ();
|
|
|
|
}
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2015-05-06 12:10:41 -04:00
|
|
|
~MainMenuDisabler () {
|
|
|
|
ActionManager::enable_active_actions ();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2006-03-05 14:39:16 -05:00
|
|
|
#endif // __gtk_ardour_public_editor_h__
|