2005-09-25 14:42:24 -04:00
/*
2019-08-02 17:26:43 -04:00
* Copyright ( C ) 2005 - 2006 Taybin Rutkin < taybin @ taybin . com >
* Copyright ( C ) 2005 - 2007 Doug McLain < doug @ nostar . net >
* Copyright ( C ) 2005 - 2018 Paul Davis < paul @ linuxaudiosystems . com >
* Copyright ( C ) 2005 Karsten Wiese < fzuuzf @ googlemail . com >
* Copyright ( C ) 2006 - 2009 Sampo Savolainen < v2 @ iki . fi >
* Copyright ( C ) 2006 - 2015 David Robillard < d @ drobilla . net >
* Copyright ( C ) 2006 - 2017 Tim Mayberry < mojofunk @ gmail . com >
* Copyright ( C ) 2007 - 2012 Carl Hetherington < carl @ carlh . net >
* Copyright ( C ) 2008 - 2011 Sakari Bergen < sakari . bergen @ beatwaves . net >
* Copyright ( C ) 2008 Hans Baier < hansfbaier @ googlemail . com >
* Copyright ( C ) 2013 - 2015 Colin Fletcher < colin . m . fletcher @ googlemail . com >
* Copyright ( C ) 2013 - 2019 Robin Gareus < robin @ gareus . org >
* Copyright ( C ) 2014 - 2017 Nick Mainsbridge < mainsbridge @ gmail . com >
* Copyright ( C ) 2014 - 2019 Ben Loftis < ben @ harrisonconsoles . com >
* Copyright ( C ) 2015 - 2019 Damien Zammit < damien @ zamaudio . com >
* Copyright ( C ) 2015 André Nusser < andre . nusser @ 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 .
*/
2005-09-25 14:42:24 -04:00
# ifndef __ardour_editor_h__
# define __ardour_editor_h__
2014-12-20 01:11:28 -05:00
# include <sys/time.h>
# include <cmath>
2005-09-25 14:42:24 -04:00
# include <list>
# include <map>
# include <set>
# include <string>
2014-12-20 01:11:28 -05:00
# include <vector>
2005-09-25 14:42:24 -04:00
2007-10-11 18:07:47 -04:00
# include <boost/optional.hpp>
2005-09-26 10:33:53 -04:00
# include <gtkmm/comboboxtext.h>
2009-08-08 18:36:32 -04:00
# include <gtkmm/layout.h>
2005-10-22 11:30:17 -04:00
2016-05-26 10:46:28 -04:00
# include "gtkmm2ext/bindings.h"
2011-01-02 22:10:43 -05:00
# include "gtkmm2ext/dndtreeview.h"
2005-09-25 14:42:24 -04:00
2009-02-25 13:26:51 -05:00
# include "pbd/stateful.h"
2009-12-19 15:26:31 -05:00
# include "pbd/signals.h"
2009-12-17 13:24:23 -05:00
2009-10-30 11:30:22 -04:00
# include "ardour/import_status.h"
2009-02-25 13:26:51 -05:00
# include "ardour/tempo.h"
# include "ardour/location.h"
# include "ardour/types.h"
2005-09-25 14:42:24 -04:00
2013-04-04 18:45:27 -04:00
# include "canvas/fwd.h"
2014-06-11 23:54:04 -04:00
# include "canvas/ruler.h"
2013-04-04 18:45:27 -04:00
2017-07-15 11:38:28 -04:00
# include "widgets/ardour_button.h"
# include "widgets/ardour_dropdown.h"
2017-07-16 22:55:52 -04:00
# include "widgets/pane.h"
2017-07-15 11:38:28 -04:00
2005-09-25 14:42:24 -04:00
# include "ardour_dialog.h"
# include "public_editor.h"
# include "editing.h"
# include "enums.h"
2006-05-17 22:19:27 -04:00
# include "editor_items.h"
2005-09-25 14:42:24 -04:00
# include "region_selection.h"
2014-12-14 08:13:38 -05:00
# include "selection_memento.h"
2016-05-07 13:03:12 -04:00
# include "tempo_curve.h"
2005-09-25 14:42:24 -04:00
2019-06-21 08:09:04 -04:00
# include "ptformat/ptformat.h"
2018-10-10 05:13:14 -04:00
2005-09-25 16:33:00 -04:00
namespace Gtkmm2ext {
2011-05-25 21:29:59 -04:00
class Bindings ;
2005-09-25 14:42:24 -04:00
}
2016-12-16 11:49:52 -05:00
namespace Evoral {
class SMF ;
}
2005-09-25 14:42:24 -04:00
namespace ARDOUR {
Large nasty commit in the form of a 5000 line patch chock-full of completely
unecessary changes. (Sorry, doing a "sprint" based thing, this is the end of the first one)
Achieved MIDI track and bus creation, associated Jack port and diskstream creation, and minimal GUI stuff for creating them. Should be set to start work on actually recording and playing midi to/from disk now.
Relevant (significant) changes:
- Creation of a Buffer class. Base class is type agnostic so things can point to a buffer but not care what kind it is (otherwise it'd be a template). Derived into AudioBuffer and MidiBuffer, with a type tag because checking type is necessary in parts of the code where dynamic_cast wouldn't be wise. Originally I considered this a hack, but passing around a type proved to be a very good solution to all the other problems (below). There is a 1:1 mapping between jack port data types and ardour Buffer types (with a conversion function), but that's easily removed if it ever becomes necessary. Having the type scoped in the Buffer class is maybe not the best spot for it, but whatever (this is proof of concept kinda stuff right now...)
- IO now has a "default" port type (passed to the constructor and stored as a member), used by ensure_io (and similar) to create n ports. IO::register_***_port has a type argument that defaults to the default type if not passed. Rationale: previous IO API is identical, no changes needed to existing code, but path is paved for multiple port types in one IO, which we will need for eg synth plugin inserts, among other things. This is not quite ideal (best would be to only have the two port register functions and have them take a type), but the alternative is a lot of work (namely destroying the 'ensure' functions and everything that uses them) for very little gain. (I am convinced after quite a few tries at the whiteboard that subclassing IO in any way is not a feasible option, look at it's inheritance diagram in Doxygen and you can see why)
- AudioEngine::register_audio_input_port is now register_input_port and takes a type argument. Ditto for output.
- (Most significant change) AudioDiskstream abstracted into Distream, and sibling MidiDiskstream created. Very much still a work in progress, but Diskstream is there to switch references over to (most already are), which is the important part. It is still unclear what the MIDI diskstream's relation to channels is, but I'm pretty sure they will be single channel only (so SMF Type 0) since noone can come up with a reason otherwise.
- MidiTrack creation. Same thing as AudioTrack but with a different default type basically. No big deal here.
- Random cleanups and variable renamings etc. because I have OCD and can't help myself. :)
Known broken: Loading of sessions containing MIDI tracks.
git-svn-id: svn://localhost/ardour2/branches/midi@641 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-06-26 12:01:34 -04:00
class AudioPlaylist ;
2011-05-25 21:29:59 -04:00
class AudioRegion ;
2015-11-01 15:56:09 -05:00
class AudioTrack ;
2006-08-12 04:20:24 -04:00
class ChanCount ;
2015-11-01 15:56:09 -05:00
class Filter ;
class Location ;
2009-08-26 23:09:30 -04:00
class MidiOperator ;
2015-11-01 15:00:05 -05:00
class MidiRegion ;
2009-10-30 11:30:22 -04:00
class MidiTrack ;
2015-11-01 15:56:09 -05:00
class Playlist ;
class Region ;
class RouteGroup ;
class Session ;
class Track ;
2005-09-25 14:42:24 -04:00
}
namespace LADSPA {
class Plugin ;
}
2009-02-26 20:20:25 -05:00
class AnalysisWindow ;
2011-06-02 13:50:37 -04:00
class AudioClock ;
2009-02-26 20:20:25 -05:00
class AudioRegionView ;
class AudioStreamView ;
2005-09-25 14:42:24 -04:00
class AudioTimeAxisView ;
2009-02-26 20:20:25 -05:00
class AutomationLine ;
class AutomationSelection ;
2005-09-25 14:42:24 -04:00
class AutomationTimeAxisView ;
2009-02-26 20:20:25 -05:00
class BundleManager ;
class ControlPoint ;
2014-12-20 01:11:28 -05:00
class CursorContext ;
2010-01-12 11:14:49 -05:00
class DragManager ;
2013-05-02 18:13:35 -04:00
class EditNoteDialog ;
class EditorCursor ;
class EditorGroupTabs ;
class EditorLocations ;
class EditorRegions ;
2018-11-15 10:21:55 -05:00
class EditorSources ;
2013-05-02 18:13:35 -04:00
class EditorRoutes ;
class EditorRouteGroups ;
class EditorSnapshots ;
class EditorSummary ;
2011-07-06 20:37:13 -04:00
class GUIObjectState ;
2015-07-23 07:23:47 -04:00
class ArdourMarker ;
2009-08-26 23:09:30 -04:00
class MidiRegionView ;
2015-11-01 15:00:05 -05:00
class MidiExportDialog ;
2009-02-26 20:20:25 -05:00
class MixerStrip ;
2013-05-02 18:13:35 -04:00
class MouseCursors ;
2013-04-04 18:45:27 -04:00
class NoteBase ;
2009-02-26 20:20:25 -05:00
class PluginSelector ;
2013-05-02 18:13:35 -04:00
class ProgressReporter ;
2015-06-26 12:34:55 -04:00
class QuantizeDialog ;
2020-12-19 10:44:16 -05:00
class RegionPeakCursor ;
2009-02-26 20:20:25 -05:00
class RhythmFerret ;
2014-06-25 15:23:25 -04:00
class RulerDialog ;
2005-09-25 14:42:24 -04:00
class Selection ;
2021-11-29 18:30:50 -05:00
class SelectionPropertiesBox ;
2009-02-26 20:20:25 -05:00
class SoundFileOmega ;
class StreamView ;
2018-02-09 10:59:39 -05:00
class GridLines ;
2008-09-23 10:36:26 -04:00
class TempoLines ;
2009-02-26 20:20:25 -05:00
class TimeAxisView ;
2016-12-16 20:31:41 -05:00
class TimeInfoBox ;
2009-02-26 20:20:25 -05:00
class TimeFXDialog ;
2005-09-25 14:42:24 -04:00
class TimeSelection ;
2010-08-25 15:28:33 -04:00
class RegionLayeringOrderEditor ;
2011-05-02 09:38:16 -04:00
class VerboseCursor ;
2005-09-25 14:42:24 -04:00
2017-05-05 07:31:49 -04:00
class Editor : public PublicEditor , public PBD : : ScopedConnectionList
2005-09-25 14:42:24 -04:00
{
2017-04-29 06:01:56 -04:00
public :
2007-03-18 02:07:08 -04:00
Editor ( ) ;
2005-09-25 14:42:24 -04:00
~ Editor ( ) ;
2009-10-14 12:10:01 -04:00
2019-04-08 18:27:05 -04:00
void set_session ( ARDOUR : : Session * ) ;
2009-12-17 13:24:23 -05:00
2015-07-09 12:40:51 -04:00
Gtk : : Window * use_own_window ( bool and_fill_it ) ;
2015-10-26 14:35:06 -04:00
2008-03-17 16:54:03 -04:00
void first_idle ( ) ;
2009-02-26 20:20:25 -05:00
virtual bool have_idled ( ) const { return _have_idled ; }
2005-09-25 14:42:24 -04:00
2020-03-25 21:19:46 -04:00
bool pending_locate_request ( ) const { return _pending_locate_request ; }
2021-01-15 17:57:47 -05:00
Temporal : : TimeDomain default_time_domain ( ) const ;
2017-09-18 12:39:17 -04:00
samplepos_t leftmost_sample ( ) const { return _leftmost_sample ; }
2009-06-13 13:52:51 -04:00
2017-09-18 12:39:17 -04:00
samplecnt_t current_page_samples ( ) const {
2019-04-08 18:27:05 -04:00
return ( samplecnt_t ) _visible_canvas_width * samples_per_pixel ;
2009-06-13 13:52:51 -04:00
}
2009-10-14 12:10:01 -04:00
2013-04-04 00:32:52 -04:00
double visible_canvas_height ( ) const {
return _visible_canvas_height ;
2005-09-25 14:42:24 -04:00
}
2014-12-14 08:13:38 -05:00
double trackviews_height ( ) const ;
2005-09-25 14:42:24 -04:00
2008-01-10 16:20:59 -05:00
void cycle_snap_mode ( ) ;
2018-02-09 10:59:39 -05:00
void next_grid_choice ( ) ;
void prev_grid_choice ( ) ;
void set_grid_to ( Editing : : GridType ) ;
2005-09-25 14:42:24 -04:00
void set_snap_mode ( Editing : : SnapMode ) ;
2021-11-16 13:06:13 -05:00
void set_draw_length_to ( Editing : : GridType ) ;
void set_draw_velocity_to ( int ) ;
void set_draw_channel_to ( int ) ;
2009-10-26 19:43:04 -04:00
Editing : : SnapMode snap_mode ( ) const ;
2018-02-09 10:59:39 -05:00
Editing : : GridType grid_type ( ) const ;
2021-05-24 17:02:25 -04:00
bool grid_type_is_musical ( Editing : : GridType ) const ;
2018-02-09 10:59:39 -05:00
bool grid_musical ( ) const ;
2009-10-26 19:43:04 -04:00
2021-11-16 13:06:13 -05:00
bool on_velocity_scroll_event ( GdkEventScroll * ) ;
Editing : : GridType draw_length ( ) const ;
int draw_velocity ( ) const ;
int draw_channel ( ) const ;
2005-09-25 14:42:24 -04:00
void undo ( uint32_t n = 1 ) ;
void redo ( uint32_t n = 1 ) ;
XMLNode & get_state ( ) ;
2009-10-15 14:56:11 -04:00
int set_state ( const XMLNode & , int version ) ;
2005-09-25 14:42:24 -04:00
2017-11-23 04:45:04 -05:00
void set_mouse_mode ( Editing : : MouseMode , bool force = false ) ;
2005-09-25 14:42:24 -04:00
void step_mouse_mode ( bool next ) ;
2007-05-10 07:53:35 -04:00
Editing : : MouseMode current_mouse_mode ( ) const { return mouse_mode ; }
2009-07-28 16:51:28 -04:00
Editing : : MidiEditMode current_midi_edit_mode ( ) const ;
2019-04-08 18:27:05 -04:00
void remove_midi_note ( ArdourCanvas : : Item * , GdkEvent * ) ;
2009-07-28 16:51:28 -04:00
2014-12-08 23:00:00 -05:00
bool internal_editing ( ) const ;
2005-09-25 14:42:24 -04:00
2009-07-09 13:58:13 -04:00
void foreach_time_axis_view ( sigc : : slot < void , TimeAxisView & > ) ;
void add_to_idle_resize ( TimeAxisView * , int32_t ) ;
2008-03-17 16:54:03 -04:00
2017-08-06 16:16:36 -04:00
StripableTimeAxisView * get_stripable_time_axis_by_id ( const PBD : : ID & id ) const ;
2008-02-10 13:16:25 -05:00
2006-08-29 17:21:48 -04:00
void consider_auditioning ( boost : : shared_ptr < ARDOUR : : Region > ) ;
void hide_a_region ( boost : : shared_ptr < ARDOUR : : Region > ) ;
2010-03-30 21:11:48 -04:00
void show_a_region ( boost : : shared_ptr < ARDOUR : : Region > ) ;
2005-09-25 14:42:24 -04:00
2008-01-10 17:22:29 -05:00
# ifdef USE_RUBBERBAND
std : : vector < std : : string > rb_opt_strings ;
2010-08-13 12:50:29 -04:00
int rb_current_opt ;
2008-01-10 17:22:29 -05:00
# endif
2005-09-25 14:42:24 -04:00
/* things that need to be public to be used in the main menubar */
void new_region_from_selection ( ) ;
2008-01-10 16:20:59 -05:00
void separate_regions_between ( const TimeSelection & ) ;
2005-09-25 14:42:24 -04:00
void separate_region_from_selection ( ) ;
2010-07-06 07:33:27 -04:00
void separate_under_selected_regions ( ) ;
2008-02-19 17:10:27 -05:00
void separate_region_from_punch ( ) ;
void separate_region_from_loop ( ) ;
2006-03-31 19:21:25 -05:00
void separate_regions_using_location ( ARDOUR : : Location & ) ;
2007-01-28 12:44:13 -05:00
void transition_to_rolling ( bool forward ) ;
2005-09-25 14:42:24 -04:00
/* NOTE: these functions assume that the "pixel" coordinate is
2013-04-12 11:31:50 -04:00
in canvas coordinates . These coordinates already take into
account any scrolling offsets .
2005-09-25 14:42:24 -04:00
*/
2017-09-18 12:39:17 -04:00
samplepos_t pixel_to_sample_from_event ( double pixel ) const {
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
/* pixel can be less than zero when motion events
are processed . since we ' ve already run the world - > canvas
affine , that means that the location * really * is " off
to the right " and thus really is " before the start " .
*/
if ( pixel > = 0 ) {
2013-06-18 23:02:54 -04:00
return pixel * samples_per_pixel ;
2005-09-25 14:42:24 -04:00
} else {
return 0 ;
}
}
2017-09-18 12:39:17 -04:00
samplepos_t pixel_to_sample ( double pixel ) const {
2014-03-20 13:29:29 -04:00
return pixel * samples_per_pixel ;
}
2017-09-18 12:39:17 -04:00
double sample_to_pixel ( samplepos_t sample ) const {
2017-04-29 06:01:56 -04:00
return round ( sample / ( double ) samples_per_pixel ) ;
2013-04-12 11:09:49 -04:00
}
2017-09-18 12:39:17 -04:00
double sample_to_pixel_unrounded ( samplepos_t sample ) const {
2013-06-18 23:02:54 -04:00
return sample / ( double ) samples_per_pixel ;
2005-09-25 14:42:24 -04:00
}
2020-10-05 00:52:17 -04:00
double time_to_pixel ( Temporal : : timepos_t const & pos ) const ;
double time_to_pixel_unrounded ( Temporal : : timepos_t const & pos ) const ;
double duration_to_pixels ( Temporal : : timecnt_t const & pos ) const ;
double duration_to_pixels_unrounded ( Temporal : : timecnt_t const & pos ) const ;
2005-09-25 14:42:24 -04:00
/* selection */
Selection & get_selection ( ) const { return * selection ; }
2020-10-27 13:18:02 -04:00
bool get_selection_extents ( Temporal : : timepos_t & start , Temporal : : timepos_t & end ) const ; // the time extents of the current selection, whether Range, Region(s), Control Points, or Notes
2005-09-25 14:42:24 -04:00
Selection & get_cut_buffer ( ) const { return * cut_buffer ; }
2021-07-16 16:12:00 -04:00
void get_regionviews_at_or_after ( Temporal : : timepos_t const & , RegionSelection & ) ;
2021-06-20 18:50:45 -04:00
2017-02-23 16:31:03 -05:00
void set_selection ( std : : list < Selectable * > , Selection : : Operation ) ;
2020-05-01 19:37:27 -04:00
void set_selected_midi_region_view ( MidiRegionView & ) ;
2017-02-23 16:31:03 -05:00
2009-07-09 13:58:13 -04:00
bool extend_selection_to_track ( TimeAxisView & ) ;
2007-01-09 18:24:54 -05:00
2005-09-25 14:42:24 -04:00
void play_selection ( ) ;
2017-09-18 12:39:17 -04:00
void maybe_locate_with_edit_preroll ( samplepos_t ) ;
2012-11-20 14:43:43 -05:00
void play_with_preroll ( ) ;
2017-01-18 09:16:05 -05:00
void rec_with_preroll ( ) ;
2017-02-13 16:59:51 -05:00
void rec_with_count_in ( ) ;
2008-01-12 18:45:50 -05:00
void select_all_in_track ( Selection : : Operation op ) ;
2014-07-06 14:53:56 -04:00
void select_all_objects ( Selection : : Operation op ) ;
2008-01-12 18:45:50 -05:00
void invert_selection_in_track ( ) ;
2005-09-25 14:42:24 -04:00
void invert_selection ( ) ;
2008-01-10 16:20:59 -05:00
void deselect_all ( ) ;
2020-10-19 14:37:54 -04:00
long select_range ( Temporal : : timepos_t const & , Temporal : : timepos_t const & ) ;
2009-10-14 12:10:01 -04:00
2009-07-03 18:42:22 -04:00
void set_selected_regionview_from_region_list ( boost : : shared_ptr < ARDOUR : : Region > region , Selection : : Operation op = Selection : : Set ) ;
2005-09-25 14:42:24 -04:00
2015-04-06 17:56:18 -04:00
void remove_tracks ( ) ;
2015-10-05 10:17:49 -04:00
2005-09-25 14:42:24 -04:00
/* tempo */
2018-02-09 10:59:39 -05:00
void update_grid ( ) ;
2005-09-25 14:42:24 -04:00
2006-03-12 17:06:41 -05:00
/* analysis window */
2009-02-26 20:20:25 -05:00
2016-03-11 11:26:27 -05:00
void loudness_analyze_region_selection ( ) ;
void loudness_analyze_range_selection ( ) ;
void spectral_analyze_region_selection ( ) ;
void spectral_analyze_range_selection ( ) ;
2006-03-12 17:06:41 -05:00
2005-09-25 14:42:24 -04:00
/* export */
2009-10-14 12:10:01 -04:00
2008-09-17 04:44:51 -04:00
void export_audio ( ) ;
2011-01-06 11:55:19 -05:00
void stem_export ( ) ;
2008-09-17 04:44:51 -04:00
void export_selection ( ) ;
void export_range ( ) ;
void export_region ( ) ;
2020-07-20 18:40:11 -04:00
/* export for analysis only */
2021-04-12 18:10:07 -04:00
void loudness_assistant ( bool ) ;
void loudness_assistant_marker ( ) ;
void measure_master_loudness ( samplepos_t start , samplepos_t end , bool ) ;
2005-09-25 14:42:24 -04:00
2015-11-01 15:00:05 -05:00
bool process_midi_export_dialog ( MidiExportDialog & dialog , boost : : shared_ptr < ARDOUR : : MidiRegion > midi_region ) ;
2009-02-26 20:20:25 -05:00
void set_zoom_focus ( Editing : : ZoomFocus ) ;
2005-09-25 14:42:24 -04:00
Editing : : ZoomFocus get_zoom_focus ( ) const { return zoom_focus ; }
2019-04-08 13:53:33 -04:00
samplecnt_t get_current_zoom ( ) const { return samples_per_pixel ; }
2015-02-03 14:33:22 -05:00
void cycle_zoom_focus ( ) ;
2016-02-09 05:37:53 -05:00
void temporal_zoom_step ( bool zoom_out ) ;
void temporal_zoom_step_scale ( bool zoom_out , double scale ) ;
void temporal_zoom_step_mouse_focus ( bool zoom_out ) ;
void temporal_zoom_step_mouse_focus_scale ( bool zoom_out , double scale ) ;
2015-02-03 14:33:22 -05:00
void ensure_time_axis_view_is_visible ( TimeAxisView const & tav , bool at_top ) ;
2009-08-24 18:28:00 -04:00
void tav_zoom_step ( bool coarser ) ;
2012-04-09 14:53:51 -04:00
void tav_zoom_smooth ( bool coarser , bool force_all ) ;
2005-09-25 14:42:24 -04:00
/* stuff that AudioTimeAxisView and related classes use */
2007-01-09 18:24:54 -05:00
void clear_playlist ( boost : : shared_ptr < ARDOUR : : Playlist > ) ;
2005-09-25 14:42:24 -04:00
2021-06-04 10:36:53 -04:00
void clear_grouped_playlists ( RouteUI * v ) ;
2006-03-07 21:50:53 -05:00
2009-04-15 14:04:23 -04:00
void get_onscreen_tracks ( TrackViewList & ) ;
2005-09-25 14:42:24 -04:00
Width editor_mixer_strip_width ;
2007-04-29 13:23:11 -04:00
void maybe_add_mixer_strip_width ( XMLNode & ) ;
2005-09-25 14:42:24 -04:00
void show_editor_mixer ( bool yn ) ;
2008-12-08 11:07:28 -05:00
void create_editor_mixer ( ) ;
2007-06-15 03:39:20 -04:00
void show_editor_list ( bool yn ) ;
2009-07-09 13:58:13 -04:00
void set_selected_mixer_strip ( TimeAxisView & ) ;
2010-12-28 16:29:36 -05:00
void mixer_strip_width_changed ( ) ;
2011-03-07 08:05:45 -05:00
void hide_track_in_display ( TimeAxisView * tv , bool apply_to_selection = false ) ;
2017-02-24 07:03:24 -05:00
void show_track_in_display ( TimeAxisView * tv , bool move_into_view = false ) ;
2021-01-26 21:30:56 -05:00
void tempo_curve_selected ( Temporal : : TempoPoint const * ts , bool yn ) ;
2005-09-25 14:42:24 -04:00
/* nudge is initiated by transport controls owned by ARDOUR_UI */
2020-09-26 11:14:59 -04:00
Temporal : : timecnt_t get_nudge_distance ( Temporal : : timepos_t const & pos , Temporal : : timecnt_t & next ) ;
Temporal : : timecnt_t get_paste_offset ( Temporal : : timepos_t const & pos , unsigned paste_count , Temporal : : timecnt_t const & duration ) ;
2021-11-15 18:36:05 -05:00
2020-09-26 11:14:59 -04:00
Temporal : : Beats get_grid_type_as_beats ( bool & success , Temporal : : timepos_t const & position ) ;
2021-11-15 18:36:05 -05:00
Temporal : : Beats get_draw_length_as_beats ( bool & success , Temporal : : timepos_t const & position ) ;
2009-08-17 22:37:57 -04:00
2021-11-15 18:36:05 -05:00
unsigned get_grid_beat_divisions ( Editing : : GridType gt ) ;
int32_t get_grid_music_divisions ( Editing : : GridType gt , uint32_t event_state ) ;
2016-06-11 12:46:13 -04:00
2008-01-18 22:49:52 -05:00
void nudge_forward ( bool next , bool force_playhead ) ;
void nudge_backward ( bool next , bool force_playhead ) ;
2005-09-25 14:42:24 -04:00
/* nudge initiated from context menu */
void nudge_forward_capture_offset ( ) ;
void nudge_backward_capture_offset ( ) ;
2014-04-29 00:11:05 -04:00
void sequence_regions ( ) ;
2005-09-25 14:42:24 -04:00
/* playhead/screen stuff */
2009-10-14 12:10:01 -04:00
2011-05-25 21:29:59 -04:00
void set_stationary_playhead ( bool yn ) ;
void toggle_stationary_playhead ( ) ;
bool stationary_playhead ( ) const { return _stationary_playhead ; }
2011-01-04 21:28:28 -05:00
void set_follow_playhead ( bool yn , bool catch_up = true ) ;
2005-09-25 14:42:24 -04:00
void toggle_follow_playhead ( ) ;
bool follow_playhead ( ) const { return _follow_playhead ; }
2007-01-09 18:24:54 -05:00
bool dragging_playhead ( ) const { return _dragging_playhead ; }
2005-09-25 14:42:24 -04:00
2008-02-10 13:16:25 -05:00
void toggle_zero_line_visibility ( ) ;
2009-06-14 14:54:38 -04:00
void set_summary ( ) ;
2009-06-20 13:15:33 -04:00
void set_group_tabs ( ) ;
2006-01-07 21:56:49 -05:00
2017-08-26 22:00:45 -04:00
/* returns the left-most and right-most time that the gui should allow the user to scroll to */
2020-09-26 11:14:59 -04:00
std : : pair < Temporal : : timepos_t , Temporal : : timepos_t > session_gui_extents ( bool use_extra = true ) const ;
2017-08-26 22:00:45 -04:00
2021-02-08 13:45:37 -05:00
/* RTAV Automation display option */
bool show_touched_automation ( ) const ;
2012-04-16 12:32:22 -04:00
/* fades */
2008-10-09 10:15:45 -04:00
2017-01-28 05:16:50 -05:00
void toggle_region_fades ( int dir ) ;
void update_region_fade_visibility ( ) ;
2005-09-25 14:42:24 -04:00
/* floating windows/transient */
void ensure_float ( Gtk : : Window & ) ;
void scroll_tracks_down_line ( ) ;
void scroll_tracks_up_line ( ) ;
2015-10-05 10:17:49 -04:00
2015-04-21 09:35:20 -04:00
bool scroll_up_one_track ( bool skip_child_views = false ) ;
bool scroll_down_one_track ( bool skip_child_views = false ) ;
2005-09-25 14:42:24 -04:00
2016-01-06 19:30:29 -05:00
void scroll_left_step ( ) ;
void scroll_right_step ( ) ;
2016-01-06 20:26:22 -05:00
void scroll_left_half_page ( ) ;
void scroll_right_half_page ( ) ;
2017-04-29 06:38:03 -04:00
void select_topmost_track ( ) ;
2018-10-22 17:46:44 -04:00
void cleanup_regions ( ) ;
2005-09-25 14:42:24 -04:00
void prepare_for_cleanup ( ) ;
2008-09-10 11:03:30 -04:00
void finish_cleanup ( ) ;
2005-09-25 14:42:24 -04:00
2012-06-13 00:21:46 -04:00
void maximise_editing_space ( ) ;
void restore_editing_space ( ) ;
2014-12-14 08:13:38 -05:00
double get_y_origin ( ) const ;
2017-09-18 12:39:17 -04:00
void reset_x_origin ( samplepos_t ) ;
2010-02-07 20:25:06 -05:00
void reset_x_origin_to_follow_playhead ( ) ;
2009-06-13 13:52:51 -04:00
void reset_y_origin ( double ) ;
2017-09-18 12:39:17 -04:00
void reset_zoom ( samplecnt_t ) ;
void reposition_and_zoom ( samplepos_t , double ) ;
2007-01-11 15:36:35 -05:00
2020-09-29 19:53:43 -04:00
Temporal : : timepos_t get_preferred_edit_position ( Editing : : EditIgnoreOption = Editing : : EDIT_IGNORE_NONE ,
bool use_context_click = false ,
bool from_outside_canvas = false ) ;
2007-11-07 20:40:25 -05:00
2007-10-11 18:07:47 -04:00
bool update_mouse_speed ( ) ;
bool decelerate_mouse_speed ( ) ;
2007-03-18 02:07:08 -04:00
2008-01-10 16:20:59 -05:00
void toggle_meter_updating ( ) ;
2008-02-01 22:57:35 -05:00
void show_rhythm_ferret ( ) ;
2008-09-10 11:03:30 -04:00
void goto_visual_state ( uint32_t ) ;
void save_visual_state ( uint32_t ) ;
2010-03-16 11:33:04 -04:00
void queue_draw_resize_line ( int at ) ;
void start_resize_line_ops ( ) ;
void end_resize_line_ops ( ) ;
2017-05-05 07:31:49 -04:00
TrackViewList const & get_track_views ( ) const {
2009-07-03 14:37:15 -04:00
return track_views ;
}
2015-07-31 23:41:26 -04:00
void do_ptimport ( std : : string path , ARDOUR : : SrcQuality quality ) ;
2014-12-24 20:07:10 -05:00
void do_import ( std : : vector < std : : string > paths ,
Editing : : ImportDisposition disposition ,
Editing : : ImportMode mode ,
ARDOUR : : SrcQuality quality ,
2016-12-14 07:31:16 -05:00
ARDOUR : : MidiTrackNameSource mts ,
2016-12-16 09:57:14 -05:00
ARDOUR : : MidiTempoMapDisposition mtd ,
2020-09-26 11:14:59 -04:00
Temporal : : timepos_t & pos ,
2021-07-04 11:35:42 -04:00
boost : : shared_ptr < ARDOUR : : PluginInfo > instrument = boost : : shared_ptr < ARDOUR : : PluginInfo > ( ) ,
bool with_markers = false ) ;
2014-12-24 20:07:10 -05:00
void do_embed ( std : : vector < std : : string > paths ,
Editing : : ImportDisposition disposition ,
Editing : : ImportMode mode ,
2020-09-26 11:14:59 -04:00
Temporal : : timepos_t & pos ,
2014-12-24 20:07:10 -05:00
boost : : shared_ptr < ARDOUR : : PluginInfo > instrument = boost : : shared_ptr < ARDOUR : : PluginInfo > ( ) ) ;
2009-07-03 18:42:22 -04:00
2021-06-04 14:24:13 -04:00
void get_regionview_corresponding_to ( boost : : shared_ptr < ARDOUR : : Region > region , std : : vector < RegionView * > & regions ) ;
2009-08-28 12:06:08 -04:00
2015-01-10 12:07:31 -05:00
void get_regionviews_by_id ( PBD : : ID const id , RegionSelection & regions ) const ;
2017-09-24 12:03:54 -04:00
void get_per_region_note_selection ( std : : list < std : : pair < PBD : : ID , std : : set < boost : : shared_ptr < Evoral : : Note < Temporal : : Beats > > > > > & ) const ;
2014-12-14 08:13:38 -05:00
2017-09-18 12:39:17 -04:00
void center_screen ( samplepos_t ) ;
2009-11-25 20:51:50 -05:00
2009-12-13 14:09:52 -05:00
TrackViewList axis_views_from_routes ( boost : : shared_ptr < ARDOUR : : RouteList > ) const ;
2014-06-28 15:45:52 -04:00
2020-09-26 11:14:59 -04:00
void snap_to ( Temporal : : timepos_t & first ,
2020-10-01 12:32:06 -04:00
Temporal : : RoundMode direction = Temporal : : RoundNearest ,
2019-04-08 13:53:33 -04:00
ARDOUR : : SnapPref pref = ARDOUR : : SnapToAny_Visual ,
bool ensure_snap = false ) ;
2015-05-16 14:26:05 -04:00
2020-09-26 11:14:59 -04:00
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 ,
2020-09-26 11:14:59 -04:00
ARDOUR : : SnapPref gpref = ARDOUR : : SnapToAny_Visual ) ;
2021-03-15 21:49:18 -04:00
Temporal : : timepos_t snap_to_bbt ( Temporal : : timepos_t const & start ,
Temporal : : RoundMode direction ,
ARDOUR : : SnapPref gpref ) ;
2014-11-16 01:05:21 -05:00
2020-10-15 01:09:22 -04:00
void set_snapped_cursor_position ( Temporal : : timepos_t const & pos ) ;
2018-02-09 09:21:45 -05:00
2014-12-22 08:30:23 -05:00
void begin_selection_op_history ( ) ;
void begin_reversible_selection_op ( std : : string cmd_name ) ;
void commit_reversible_selection_op ( ) ;
2014-12-23 12:29:43 -05:00
void undo_selection_op ( ) ;
void redo_selection_op ( ) ;
2010-03-18 22:49:01 -04:00
void begin_reversible_command ( std : : string cmd_name ) ;
2011-01-19 12:38:56 -05:00
void begin_reversible_command ( GQuark ) ;
2015-02-05 07:32:57 -05:00
void abort_reversible_command ( ) ;
2010-03-18 22:49:01 -04:00
void commit_reversible_command ( ) ;
2009-12-13 14:09:52 -05:00
2020-01-05 13:22:14 -05:00
MixerStrip * get_current_mixer_strip ( ) const {
return current_mixer_strip ;
}
2010-06-29 15:08:19 -04:00
DragManager * drags ( ) const {
return _drags ;
}
2019-11-08 19:35:55 -05:00
bool drag_active ( ) const ;
bool preview_video_drag_active ( ) const ;
2015-02-03 14:33:22 -05:00
void maybe_autoscroll ( bool , bool , bool ) ;
bool autoscroll_active ( ) const ;
2011-05-25 21:29:59 -04:00
2014-12-20 01:11:28 -05:00
Gdk : : Cursor * get_canvas_cursor ( ) const ;
2014-06-13 17:15:23 -04:00
2011-05-25 21:29:59 -04:00
void set_current_trimmable ( boost : : shared_ptr < ARDOUR : : Trimmable > ) ;
void set_current_movable ( boost : : shared_ptr < ARDOUR : : Movable > ) ;
2010-09-21 11:15:06 -04:00
2019-04-08 18:27:05 -04:00
MouseCursors const * cursors ( ) const {
2010-11-16 09:53:16 -05:00
return _cursors ;
}
2011-05-02 09:38:16 -04:00
VerboseCursor * verbose_cursor ( ) const {
return _verbose_cursor ;
}
2013-04-04 18:45:27 -04:00
double clamp_verbose_cursor_x ( double ) ;
double clamp_verbose_cursor_y ( double ) ;
2011-05-02 09:38:16 -04:00
void get_pointer_position ( double & , double & ) const ;
2014-12-23 13:46:53 -05:00
/** Context for mouse entry (stored in a stack). */
struct EnterContext {
ItemType item_type ;
boost : : shared_ptr < CursorContext > cursor_ctx ;
} ;
/** Get the topmost enter context for the given item type.
*
* This is used to change the cursor associated with a given enter context ,
* which may not be on the top of the stack .
*/
EnterContext * get_enter_context ( ItemType type ) ;
2012-06-17 12:57:21 -04:00
TimeAxisView * stepping_axis_view ( ) {
return _stepping_axis_view ;
}
2015-10-05 10:17:49 -04:00
2012-06-17 12:57:21 -04:00
void set_stepping_axis_view ( TimeAxisView * v ) {
_stepping_axis_view = v ;
}
2015-01-12 01:02:58 -05:00
ArdourCanvas : : Container * get_trackview_group ( ) const { return _trackview_group ; }
ArdourCanvas : : Container * get_noscroll_group ( ) const { return no_scroll_group ; }
ArdourCanvas : : ScrollGroup * get_hscroll_group ( ) const { return h_scroll_group ; }
ArdourCanvas : : ScrollGroup * get_hvscroll_group ( ) const { return hv_scroll_group ; }
2015-01-16 19:09:47 -05:00
ArdourCanvas : : ScrollGroup * get_cursor_scroll_group ( ) const { return cursor_scroll_group ; }
2018-02-09 09:21:45 -05:00
ArdourCanvas : : Container * get_drag_motion_group ( ) const { return _drag_motion_group ; }
2014-05-21 19:15:08 -04:00
2015-01-12 01:02:58 -05:00
ArdourCanvas : : GtkCanvasViewport * get_track_canvas ( ) const ;
2013-04-15 16:10:13 -04:00
2015-01-12 01:02:58 -05:00
void override_visible_track_count ( ) ;
2013-04-15 16:10:13 -04:00
2014-06-11 23:54:04 -04:00
/* Ruler metrics methods */
2020-11-16 13:19:22 -05:00
void metric_get_timecode ( std : : vector < ArdourCanvas : : Ruler : : Mark > & , int64_t , int64_t , gint ) ;
void metric_get_bbt ( std : : vector < ArdourCanvas : : Ruler : : Mark > & , int64_t , int64_t , gint ) ;
void metric_get_samples ( std : : vector < ArdourCanvas : : Ruler : : Mark > & , int64_t , int64_t , gint ) ;
void metric_get_minsec ( std : : vector < ArdourCanvas : : Ruler : : Mark > & , int64_t , int64_t , gint ) ;
2014-06-11 23:54:04 -04:00
2014-07-07 07:05:27 -04:00
/* editing operations that need to be public */
2022-01-05 15:27:39 -05:00
void mouse_add_new_marker ( Temporal : : timepos_t where , ARDOUR : : Location : : Flags extra_flags = ARDOUR : : Location : : Flags ( 0 ) , int32_t cue_id = 0 ) ;
2020-09-29 19:53:43 -04:00
void split_regions_at ( Temporal : : timepos_t const & , RegionSelection & ) ;
2014-07-07 07:05:27 -04:00
void split_region_at_points ( boost : : shared_ptr < ARDOUR : : Region > , ARDOUR : : AnalysisFeatureList & , bool can_ferret , bool select_new = false ) ;
2020-09-29 19:53:43 -04:00
RegionSelection get_regions_from_selection_and_mouse ( Temporal : : timepos_t const & ) ;
2021-05-28 15:27:55 -04:00
void do_remove_gaps ( ) ;
2021-07-04 11:36:28 -04:00
void remove_gaps ( Temporal : : timecnt_t const & threshold , Temporal : : timecnt_t const & leave , bool markers_too ) ;
2015-10-05 10:17:49 -04:00
2021-07-04 11:36:28 -04:00
void mouse_brush_insert_region ( RegionView * , Temporal : : timepos_t const & pos ) ;
2021-06-15 17:09:24 -04:00
2020-10-05 00:52:17 -04:00
void mouse_add_new_tempo_event ( Temporal : : timepos_t where ) ;
void mouse_add_new_meter_event ( Temporal : : timepos_t where ) ;
2020-11-23 18:45:08 -05:00
void edit_tempo_section ( Temporal : : TempoPoint & ) ;
void edit_meter_section ( Temporal : : MeterPoint & ) ;
2015-02-03 14:25:10 -05:00
2021-06-02 18:34:13 -04:00
bool should_ripple ( ) const ;
2021-07-16 16:12:00 -04:00
void do_ripple ( boost : : shared_ptr < ARDOUR : : Playlist > , Temporal : : timepos_t const & , Temporal : : timecnt_t const & , ARDOUR : : RegionList * exclude , bool add_to_command ) ;
void do_ripple ( boost : : shared_ptr < ARDOUR : : Playlist > , Temporal : : timepos_t const & , Temporal : : timecnt_t const & , boost : : shared_ptr < ARDOUR : : Region > exclude , bool add_to_command ) ;
void ripple_marks ( boost : : shared_ptr < ARDOUR : : Playlist > target_playlist , Temporal : : timepos_t at , Temporal : : timecnt_t const & distance ) ;
void get_markers_to_ripple ( boost : : shared_ptr < ARDOUR : : Playlist > target_playlist , Temporal : : timepos_t const & pos , std : : vector < ArdourMarker * > & markers ) ;
Temporal : : timepos_t effective_ripple_mark_start ( boost : : shared_ptr < ARDOUR : : Playlist > target_playlist , Temporal : : timepos_t pos ) ;
2021-05-31 14:44:32 -04:00
2021-05-14 09:48:53 -04:00
void add_region_marker ( ) ;
2021-05-18 20:46:55 -04:00
void clear_region_markers ( ) ;
void remove_region_marker ( ARDOUR : : CueMarker & ) ;
2021-05-25 16:10:36 -04:00
void make_region_markers_global ( bool as_cd_markers ) ;
2021-05-14 09:48:53 -04:00
2017-04-29 06:01:56 -04:00
protected :
2005-09-25 14:42:24 -04:00
void map_transport_state ( ) ;
2017-09-18 12:39:17 -04:00
void map_position_change ( samplepos_t ) ;
2017-03-31 08:11:49 -04:00
void transport_looped ( ) ;
2005-09-25 14:42:24 -04:00
2005-09-25 22:48:59 -04:00
void on_realize ( ) ;
2005-09-25 14:42:24 -04:00
2014-06-28 17:22:15 -04:00
void suspend_route_redisplay ( ) ;
void resume_route_redisplay ( ) ;
2017-04-29 06:01:56 -04:00
private :
2007-05-11 11:06:12 -04:00
2007-06-15 18:08:27 -04:00
void color_handler ( ) ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
bool constructed ;
2007-10-11 18:07:47 -04:00
// to keep track of the playhead position for control_scroll
2017-09-18 12:39:17 -04:00
boost : : optional < samplepos_t > _control_scroll_target ;
2009-10-14 12:10:01 -04:00
2021-11-29 18:30:50 -05:00
SelectionPropertiesBox * _properties_box ;
2016-12-16 20:31:41 -05:00
2009-07-09 13:58:13 -04:00
typedef std : : pair < TimeAxisView * , XMLNode * > TAVState ;
2008-09-10 11:03:30 -04:00
2008-01-10 16:20:59 -05:00
struct VisualState {
2017-07-01 12:42:24 -04:00
VisualState ( bool with_tracks ) ;
~ VisualState ( ) ;
double y_position ;
2019-04-08 13:53:33 -04:00
samplecnt_t samples_per_pixel ;
samplepos_t _leftmost_sample ;
2017-07-01 12:42:24 -04:00
Editing : : ZoomFocus zoom_focus ;
GUIObjectState * gui_state ;
2008-01-10 16:20:59 -05:00
} ;
2009-10-14 12:10:01 -04:00
2008-09-10 11:03:30 -04:00
std : : list < VisualState * > undo_visual_stack ;
std : : list < VisualState * > redo_visual_stack ;
VisualState * current_visual_state ( bool with_tracks = true ) ;
void undo_visual_state ( ) ;
void redo_visual_state ( ) ;
void use_visual_state ( VisualState & ) ;
bool no_save_visual ;
void swap_visual_state ( ) ;
2009-10-14 12:10:01 -04:00
2008-09-10 11:03:30 -04:00
std : : vector < VisualState * > visual_states ;
void start_visual_state_op ( uint32_t n ) ;
void cancel_visual_state_op ( uint32_t n ) ;
2008-01-10 16:20:59 -05:00
2019-04-08 18:27:05 -04:00
samplepos_t _leftmost_sample ;
samplecnt_t samples_per_pixel ;
2008-01-10 16:20:59 -05:00
Editing : : ZoomFocus zoom_focus ;
2017-09-18 12:39:17 -04:00
void set_samples_per_pixel ( samplecnt_t ) ;
2017-03-26 23:26:58 -04:00
void on_samples_per_pixel_changed ( ) ;
2005-09-25 14:42:24 -04:00
2008-01-10 16:20:59 -05:00
Editing : : MouseMode mouse_mode ;
2018-02-09 10:59:39 -05:00
Editing : : GridType pre_internal_grid_type ;
2014-12-16 23:02:28 -05:00
Editing : : SnapMode pre_internal_snap_mode ;
2018-02-09 10:59:39 -05:00
Editing : : GridType internal_grid_type ;
2014-12-16 23:02:28 -05:00
Editing : : SnapMode internal_snap_mode ;
2010-01-01 17:11:15 -05:00
Editing : : MouseMode effective_mouse_mode ( ) const ;
enum JoinObjectRangeState {
JOIN_OBJECT_RANGE_NONE ,
/** `join object/range' mode is active and the mouse is over a place where object mode should happen */
JOIN_OBJECT_RANGE_OBJECT ,
/** `join object/range' mode is active and the mouse is over a place where range mode should happen */
JOIN_OBJECT_RANGE_RANGE
} ;
JoinObjectRangeState _join_object_range_state ;
2014-06-18 10:24:59 -04:00
void update_join_object_range_location ( double ) ;
2009-10-14 12:10:01 -04:00
2016-05-26 10:46:28 -04:00
boost : : optional < float > pre_notebook_shrink_pane_width ;
2005-09-25 14:42:24 -04:00
2016-12-22 21:56:01 -05:00
Gtk : : VBox _editor_list_vbox ;
2011-01-04 21:06:51 -05:00
Gtk : : Notebook _the_notebook ;
bool _notebook_shrunk ;
2019-04-08 18:27:05 -04:00
void add_notebook_page ( std : : string const & , Gtk : : Widget & ) ;
bool notebook_tab_clicked ( GdkEventButton * , Gtk : : Widget * ) ;
2011-05-25 21:29:59 -04:00
2017-07-16 22:55:52 -04:00
ArdourWidgets : : HPane edit_pane ;
ArdourWidgets : : VPane editor_summary_pane ;
2005-09-25 14:42:24 -04:00
Gtk : : EventBox meter_base ;
Gtk : : EventBox marker_base ;
Gtk : : HBox marker_box ;
Gtk : : VBox scrollers_rulers_markers_box ;
2019-04-08 18:27:05 -04:00
void location_changed ( ARDOUR : : Location * ) ;
void location_flags_changed ( ARDOUR : : Location * ) ;
2005-09-25 14:42:24 -04:00
void refresh_location_display ( ) ;
2014-10-24 12:18:40 -04:00
void refresh_location_display_internal ( const ARDOUR : : Locations : : LocationList & ) ;
2019-04-08 18:27:05 -04:00
void add_new_location ( ARDOUR : : Location * ) ;
ArdourCanvas : : Container * add_new_location_internal ( ARDOUR : : Location * ) ;
void location_gone ( ARDOUR : : Location * ) ;
2021-05-18 18:50:55 -04:00
void remove_marker ( ArdourCanvas : : Item & ) ;
void remove_marker ( ArdourMarker * ) ;
gint really_remove_global_marker ( ARDOUR : : Location * loc ) ;
gint really_remove_region_marker ( ArdourMarker * ) ;
2008-01-10 16:20:59 -05:00
void goto_nth_marker ( int nth ) ;
2016-02-23 09:42:53 -05:00
void trigger_script ( int nth ) ;
2017-12-11 18:13:12 -05:00
void trigger_script_by_name ( const std : : string script_name ) ;
2010-11-10 13:29:32 -05:00
void toggle_marker_lines ( ) ;
void set_marker_line_visibility ( bool ) ;
2005-09-25 14:42:24 -04:00
2017-01-12 12:22:56 -05:00
void jump_forward_to_mark ( ) ;
void jump_backward_to_mark ( ) ;
2005-09-25 14:42:24 -04:00
uint32_t location_marker_color ;
uint32_t location_range_color ;
uint32_t location_loop_color ;
uint32_t location_punch_color ;
uint32_t location_cd_marker_color ;
struct LocationMarkers {
2015-07-23 07:23:47 -04:00
ArdourMarker * start ;
ArdourMarker * end ;
2010-11-10 13:29:32 -05:00
bool valid ;
2011-05-25 21:29:59 -04:00
2010-11-10 13:29:32 -05:00
LocationMarkers ( ) : start ( 0 ) , end ( 0 ) , valid ( true ) { }
2011-05-25 21:29:59 -04:00
2010-11-10 13:29:32 -05:00
~ LocationMarkers ( ) ;
2011-05-25 21:29:59 -04:00
2010-11-10 13:29:32 -05:00
void hide ( ) ;
void show ( ) ;
2010-11-11 08:36:38 -05:00
void set_show_lines ( bool ) ;
void set_selected ( bool ) ;
2021-05-18 16:46:25 -04:00
void set_entered ( bool ) ;
2010-11-11 10:21:37 -05:00
void setup_lines ( ) ;
2011-05-25 21:29:59 -04:00
2010-11-10 13:29:32 -05:00
void set_name ( const std : : string & ) ;
2020-09-26 11:14:59 -04:00
void set_position ( Temporal : : timepos_t const & start , Temporal : : timepos_t const & end = Temporal : : timepos_t ( ) ) ;
2010-11-10 13:29:32 -05:00
void set_color_rgba ( uint32_t ) ;
2005-09-25 14:42:24 -04:00
} ;
2019-04-08 18:27:05 -04:00
LocationMarkers * find_location_markers ( ARDOUR : : Location * ) const ;
ARDOUR : : Location * find_location_from_marker ( ArdourMarker * , bool & is_start ) const ;
ArdourMarker * find_marker_from_location_id ( PBD : : ID const & , bool ) const ;
2015-07-23 07:23:47 -04:00
ArdourMarker * entered_marker ;
2010-11-10 13:29:32 -05:00
bool _show_marker_lines ;
2005-09-25 14:42:24 -04:00
2019-04-08 18:27:05 -04:00
typedef std : : map < ARDOUR : : Location * , LocationMarkers * > LocationMarkerMap ;
2005-09-25 14:42:24 -04:00
LocationMarkerMap location_markers ;
2010-11-12 17:51:54 -05:00
void update_marker_labels ( ) ;
2021-02-11 00:27:27 -05:00
void update_marker_labels ( ArdourCanvas : : Item * ) ;
2019-04-08 18:27:05 -04:00
void check_marker_label ( ArdourMarker * ) ;
2010-11-12 17:51:54 -05:00
/** A set of lists of Markers that are in each of the canvas groups
* for the marker sections at the top of the editor . These lists
* are kept sorted in time order between marker movements , so that after
* a marker has moved we can decide whether we need to update the labels
* for all markers or for just a few .
*/
2021-02-11 00:27:27 -05:00
std : : map < ArdourCanvas : : Item * , std : : list < ArdourMarker * > > _sorted_marker_lists ;
2019-04-08 18:27:05 -04:00
void remove_sorted_marker ( ArdourMarker * ) ;
2010-11-12 17:51:54 -05:00
2005-11-14 11:24:21 -05:00
void hide_marker ( ArdourCanvas : : Item * , GdkEvent * ) ;
2005-09-25 14:42:24 -04:00
void clear_marker_display ( ) ;
2020-10-05 00:52:17 -04:00
void mouse_add_new_range ( Temporal : : timepos_t ) ;
void mouse_add_new_loop ( Temporal : : timepos_t ) ;
void mouse_add_new_punch ( Temporal : : timepos_t ) ;
2018-12-27 20:58:24 -05:00
bool choose_new_marker_name ( std : : string & name , bool is_range = false ) ;
2008-01-10 16:20:59 -05:00
void update_cd_marker_display ( ) ;
2019-04-08 18:27:05 -04:00
void ensure_cd_marker_updated ( LocationMarkers * lam , ARDOUR : : Location * location ) ;
2022-01-04 16:48:52 -05:00
void update_cue_marker_display ( ) ;
void ensure_cue_marker_updated ( LocationMarkers * lam , ARDOUR : : Location * location ) ;
2005-09-25 14:42:24 -04:00
2009-07-09 13:58:13 -04:00
TimeAxisView * clicked_axisview ;
RouteTimeAxisView * clicked_routeview ;
2009-02-26 20:26:47 -05:00
/** The last RegionView that was clicked on, or 0 if the last click was not
* on a RegionView . This is set up by the canvas event handlers in
* editor_canvas_events . cc
*/
2006-07-23 08:03:19 -04:00
RegionView * clicked_regionview ;
2008-01-10 16:20:59 -05:00
RegionSelection latest_regionviews ;
2005-09-25 14:42:24 -04:00
uint32_t clicked_selection ;
ControlPoint * clicked_control_point ;
2011-12-10 14:20:15 -05:00
void sort_track_selection ( TrackViewList & ) ;
2007-01-28 12:44:13 -05:00
2010-02-18 08:59:49 -05:00
void get_equivalent_regions ( RegionView * rv , std : : vector < RegionView * > & , PBD : : PropertyID ) const ;
2021-06-03 16:30:25 -04:00
void get_all_equivalent_regions ( RegionView * rv , std : : vector < RegionView * > & ) const ;
2010-02-18 08:59:49 -05:00
RegionSelection get_equivalent_regions ( RegionSelection & , PBD : : PropertyID ) const ;
2017-02-24 07:03:24 -05:00
RegionView * regionview_from_region ( boost : : shared_ptr < ARDOUR : : Region > ) const ;
RouteTimeAxisView * rtav_from_route ( boost : : shared_ptr < ARDOUR : : Route > ) const ;
2017-02-23 16:31:03 -05:00
2021-01-25 17:52:39 -05:00
void mapover_tracks_with_unique_playlists ( sigc : : slot < void , RouteTimeAxisView & , uint32_t > sl , TimeAxisView * , PBD : : PropertyID ) const ;
2021-06-03 16:30:25 -04:00
void mapover_all_tracks_with_unique_playlists ( sigc : : slot < void , RouteTimeAxisView & , uint32_t > ) const ;
2019-04-08 18:27:05 -04:00
void mapped_get_equivalent_regions ( RouteTimeAxisView & , uint32_t , RegionView * , std : : vector < RegionView * > * ) const ;
2021-01-25 17:52:39 -05:00
2021-06-04 10:36:53 -04:00
void mapover_grouped_routes ( sigc : : slot < void , RouteUI & > sl , RouteUI * , PBD : : PropertyID ) const ;
void mapover_armed_routes ( sigc : : slot < void , RouteUI & > sl ) const ;
void mapover_selected_routes ( sigc : : slot < void , RouteUI & > sl ) const ;
void mapover_all_routes ( sigc : : slot < void , RouteUI & > sl ) const ;
2021-06-27 10:49:51 -04:00
void mapped_select_playlist_matching ( RouteUI & , boost : : weak_ptr < ARDOUR : : Playlist > pl ) ;
2021-06-04 10:36:53 -04:00
void mapped_use_new_playlist ( RouteUI & , std : : string name , std : : string gid , bool copy , std : : vector < boost : : shared_ptr < ARDOUR : : Playlist > > const & ) ;
void mapped_clear_playlist ( RouteUI & ) ;
void new_playlists_for_all_tracks ( bool copy ) ;
void new_playlists_for_grouped_tracks ( RouteUI * v , bool copy ) ;
void new_playlists_for_selected_tracks ( bool copy ) ;
void new_playlists_for_armed_tracks ( bool copy ) ;
2015-10-05 10:17:49 -04:00
2006-06-13 03:27:52 -04:00
void button_selection ( ArdourCanvas : : Item * item , GdkEvent * event , ItemType item_type ) ;
bool button_release_can_deselect ;
2015-01-10 12:07:31 -05:00
bool _mouse_changed_selection ;
2006-06-13 03:27:52 -04:00
2019-04-08 18:27:05 -04:00
void catch_vanishing_regionview ( RegionView * ) ;
2006-06-13 03:27:52 -04:00
2009-07-09 13:58:13 -04:00
void set_selected_track ( TimeAxisView & , Selection : : Operation op = Selection : : Set , bool no_remove = false ) ;
2020-01-22 11:30:05 -05:00
void select_all_visible_lanes ( ) ;
2007-03-18 02:07:08 -04:00
void select_all_tracks ( ) ;
2014-12-29 21:04:23 -05:00
bool select_all_internal_edit ( Selection : : Operation ) ;
2009-10-14 12:10:01 -04:00
2012-04-22 19:14:27 -04:00
bool set_selected_control_point_from_click ( bool press , Selection : : Operation op = Selection : : Set ) ;
2008-01-10 16:20:59 -05:00
void set_selected_track_from_click ( bool press , Selection : : Operation op = Selection : : Set , bool no_remove = false ) ;
2012-01-30 17:53:22 -05:00
void set_selected_track_as_side_effect ( Selection : : Operation op ) ;
bool set_selected_regionview_from_click ( bool press , Selection : : Operation op = Selection : : Set ) ;
2006-06-13 03:27:52 -04:00
2008-01-12 18:45:50 -05:00
bool set_selected_regionview_from_map_event ( GdkEventAny * , StreamView * , boost : : weak_ptr < ARDOUR : : Region > ) ;
2019-04-08 18:27:05 -04:00
void collect_new_region_view ( RegionView * ) ;
void collect_and_select_new_region_view ( RegionView * ) ;
2009-10-14 12:10:01 -04:00
2008-01-12 18:45:50 -05:00
Gtk : : Menu track_context_menu ;
Gtk : : Menu track_region_context_menu ;
Gtk : : Menu track_selection_context_menu ;
2005-09-25 14:42:24 -04:00
2011-12-26 18:18:24 -05:00
GdkEvent context_click_event ;
2010-11-14 11:49:59 -05:00
void popup_track_context_menu ( int , int , ItemType , bool ) ;
Gtk : : Menu * build_track_context_menu ( ) ;
Gtk : : Menu * build_track_bus_context_menu ( ) ;
Gtk : : Menu * build_track_region_context_menu ( ) ;
Gtk : : Menu * build_track_selection_context_menu ( ) ;
2008-01-12 18:45:50 -05:00
void add_dstream_context_items ( Gtk : : Menu_Helpers : : MenuList & ) ;
void add_bus_context_items ( Gtk : : Menu_Helpers : : MenuList & ) ;
2011-02-27 11:43:48 -05:00
void add_region_context_items ( Gtk : : Menu_Helpers : : MenuList & , boost : : shared_ptr < ARDOUR : : Track > ) ;
2005-09-25 14:42:24 -04:00
void add_selection_context_items ( Gtk : : Menu_Helpers : : MenuList & ) ;
2010-11-03 18:19:29 -04:00
Gtk : : MenuItem * _popup_region_menu_item ;
2005-09-25 14:42:24 -04:00
2019-04-08 18:27:05 -04:00
void popup_control_point_context_menu ( ArdourCanvas : : Item * , GdkEvent * ) ;
2011-07-17 16:10:31 -04:00
Gtk : : Menu _control_point_context_menu ;
2019-04-08 18:27:05 -04:00
void popup_note_context_menu ( ArdourCanvas : : Item * , GdkEvent * ) ;
2014-12-25 15:32:10 -05:00
Gtk : : Menu _note_context_menu ;
2016-06-03 15:15:30 -04:00
void add_stripables ( ARDOUR : : StripableList & ) ;
2012-06-27 18:57:06 -04:00
void add_routes ( ARDOUR : : RouteList & ) ;
2019-04-08 18:27:05 -04:00
void timeaxisview_deleted ( TimeAxisView * ) ;
2016-05-21 16:36:08 -04:00
void add_vcas ( ARDOUR : : VCAList & ) ;
2005-09-25 14:42:24 -04:00
2015-07-09 18:10:19 -04:00
Gtk : : HBox global_hpacker ;
Gtk : : VBox global_vpacker ;
2005-09-25 14:42:24 -04:00
2014-12-20 01:11:28 -05:00
/* Cursor stuff. Do not use directly, use via CursorContext. */
friend class CursorContext ;
std : : vector < Gdk : : Cursor * > _cursor_stack ;
void set_canvas_cursor ( Gdk : : Cursor * ) ;
size_t push_canvas_cursor ( Gdk : : Cursor * ) ;
void pop_canvas_cursor ( ) ;
2014-06-18 21:03:25 -04:00
Gdk : : Cursor * which_track_cursor ( ) const ;
2014-06-18 10:24:59 -04:00
Gdk : : Cursor * which_mode_cursor ( ) const ;
Gdk : : Cursor * which_trim_cursor ( bool left_side ) const ;
2014-12-23 13:46:53 -05:00
Gdk : : Cursor * which_canvas_cursor ( ItemType type ) const ;
/** Push the appropriate enter/cursor context on item entry. */
2014-12-20 01:11:28 -05:00
void choose_canvas_cursor_on_entry ( ItemType ) ;
2005-09-25 14:42:24 -04:00
2014-12-23 13:46:53 -05:00
/** Update all enter cursors based on current settings. */
void update_all_enter_cursors ( ) ;
2013-04-04 00:32:52 -04:00
ArdourCanvas : : GtkCanvas * _track_canvas ;
2013-04-04 18:45:27 -04:00
ArdourCanvas : : GtkCanvasViewport * _track_canvas_viewport ;
2013-04-04 00:32:52 -04:00
2012-03-09 12:15:25 -05:00
bool within_track_canvas ;
2005-09-25 14:42:24 -04:00
2011-05-02 09:38:16 -04:00
friend class VerboseCursor ;
VerboseCursor * _verbose_cursor ;
2005-09-25 14:42:24 -04:00
2020-12-19 10:44:16 -05:00
RegionPeakCursor * _region_peak_cursor ;
2009-05-15 21:22:43 -04:00
void parameter_changed ( std : : string ) ;
2014-06-10 14:39:08 -04:00
void ui_parameter_changed ( std : : string ) ;
2009-10-14 12:10:01 -04:00
2019-04-08 18:27:05 -04:00
Gtk : : EventBox time_bars_event_box ;
Gtk : : VBox time_bars_vbox ;
2005-09-25 14:42:24 -04:00
2019-04-08 18:27:05 -04:00
ArdourCanvas : : Container * tempo_group ;
ArdourCanvas : : Container * meter_group ;
ArdourCanvas : : Container * marker_group ;
ArdourCanvas : : Container * range_marker_group ;
ArdourCanvas : : Container * transport_marker_group ;
ArdourCanvas : : Container * cd_marker_group ;
2022-01-04 16:48:52 -05:00
ArdourCanvas : : Container * cue_marker_group ;
2008-09-10 17:27:39 -04:00
2013-04-04 00:32:52 -04:00
/* parent for groups which themselves contain time markers */
2019-04-08 18:27:05 -04:00
ArdourCanvas : : Container * _time_markers_group ;
2008-09-10 17:27:39 -04:00
2014-05-20 23:08:15 -04:00
/* The group containing all other groups that are scrolled vertically
and horizontally .
*/
2015-01-12 01:02:58 -05:00
ArdourCanvas : : ScrollGroup * hv_scroll_group ;
2014-05-20 23:08:15 -04:00
/* The group containing all other groups that are scrolled horizontally ONLY
*/
2015-01-12 01:02:58 -05:00
ArdourCanvas : : ScrollGroup * h_scroll_group ;
2014-05-20 23:08:15 -04:00
2015-01-16 19:09:47 -05:00
/* Scroll group for cursors, scrolled horizontally, above everything else
*/
ArdourCanvas : : ScrollGroup * cursor_scroll_group ;
2014-06-24 09:56:08 -04:00
/* The group containing all trackviews. */
ArdourCanvas : : Container * no_scroll_group ;
2014-05-20 23:08:15 -04:00
/* The group containing all trackviews. */
2014-06-22 11:41:05 -04:00
ArdourCanvas : : Container * _trackview_group ;
2009-10-14 12:10:01 -04:00
2014-06-05 15:16:55 -04:00
/* The group holding things (mostly regions) while dragging so they
* are on top of everything else
*/
2014-06-22 11:41:05 -04:00
ArdourCanvas : : Container * _drag_motion_group ;
2014-06-05 15:16:55 -04:00
2015-02-03 14:33:22 -05:00
/* a rect that sits at the bottom of all tracks to act as a drag-no-drop/clickable
2014-04-16 04:16:56 -04:00
* target area .
*/
2015-02-03 14:33:22 -05:00
ArdourCanvas : : Rectangle * _canvas_drop_zone ;
bool canvas_drop_zone_event ( GdkEvent * event ) ;
2014-04-16 04:16:56 -04:00
2008-03-17 16:54:03 -04:00
Glib : : RefPtr < Gtk : : ToggleAction > ruler_timecode_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_bbt_action ;
2011-01-18 07:51:02 -05:00
Glib : : RefPtr < Gtk : : ToggleAction > ruler_samples_action ;
2008-03-17 16:54:03 -04:00
Glib : : RefPtr < Gtk : : ToggleAction > ruler_minsec_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_tempo_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_meter_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_marker_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_range_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_loop_punch_action ;
Glib : : RefPtr < Gtk : : ToggleAction > ruler_cd_marker_action ;
2022-01-04 16:48:52 -05:00
Glib : : RefPtr < Gtk : : ToggleAction > ruler_cue_marker_action ;
2009-02-26 20:20:25 -05:00
bool no_ruler_shown_update ;
2009-10-14 12:10:01 -04:00
2019-04-08 18:27:05 -04:00
Gtk : : Widget * ruler_grabbed_widget ;
2009-10-14 12:10:01 -04:00
2014-06-25 15:23:25 -04:00
RulerDialog * ruler_dialog ;
2005-09-25 14:42:24 -04:00
void initialize_rulers ( ) ;
2009-10-26 10:38:58 -04:00
void update_just_timecode ( ) ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
void compute_fixed_ruler_scale ( ) ; //calculates the RulerScale of the fixed rulers
2005-09-25 14:42:24 -04:00
void update_fixed_rulers ( ) ;
2016-10-18 12:56:43 -04:00
void update_tempo_based_rulers ( ) ;
2020-10-05 00:52:17 -04:00
void popup_ruler_menu ( Temporal : : timepos_t const & where = Temporal : : timepos_t ( ) , ItemType type = RegionItem ) ;
2005-09-25 14:42:24 -04:00
void update_ruler_visibility ( ) ;
2019-02-28 18:52:36 -05:00
void toggle_ruler_visibility ( ) ;
2005-09-25 14:42:24 -04:00
void ruler_toggled ( int ) ;
2011-04-19 06:43:43 -04:00
bool ruler_label_button_release ( GdkEventButton * ) ;
2005-09-25 14:42:24 -04:00
void store_ruler_visibility ( ) ;
void restore_ruler_visibility ( ) ;
2018-07-26 18:25:01 -04:00
void show_rulers_for_grid ( ) ;
2009-10-14 12:10:01 -04:00
2018-07-26 18:25:01 -04:00
enum MinsecRulerScale {
2014-12-11 12:51:01 -05:00
minsec_show_msecs ,
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
minsec_show_seconds ,
minsec_show_minutes ,
minsec_show_hours ,
2014-12-11 12:51:01 -05:00
minsec_show_many_hours
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
} ;
MinsecRulerScale minsec_ruler_scale ;
2017-09-18 12:39:17 -04:00
samplecnt_t minsec_mark_interval ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
gint minsec_mark_modulo ;
gint minsec_nmarks ;
2017-09-18 12:39:17 -04:00
void set_minsec_ruler_scale ( samplepos_t , samplepos_t ) ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
2009-10-26 10:38:58 -04:00
enum TimecodeRulerScale {
timecode_show_bits ,
2017-09-18 12:39:17 -04:00
timecode_show_samples ,
2009-10-26 10:38:58 -04:00
timecode_show_seconds ,
timecode_show_minutes ,
2014-12-11 12:51:01 -05:00
timecode_show_hours ,
timecode_show_many_hours
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
} ;
2009-10-26 10:38:58 -04:00
TimecodeRulerScale timecode_ruler_scale ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
2009-10-26 10:38:58 -04:00
gint timecode_mark_modulo ;
gint timecode_nmarks ;
2017-09-18 12:39:17 -04:00
void set_timecode_ruler_scale ( samplepos_t , samplepos_t ) ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
2017-09-18 12:39:17 -04:00
samplecnt_t _samples_ruler_interval ;
void set_samples_ruler_scale ( samplepos_t , samplepos_t ) ;
2011-01-17 20:00:27 -05:00
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
enum BBTRulerScale {
2014-12-11 12:51:01 -05:00
bbt_show_many ,
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
bbt_show_64 ,
bbt_show_16 ,
bbt_show_4 ,
bbt_show_1 ,
2018-07-26 15:07:45 -04:00
bbt_show_quarters ,
bbt_show_eighths ,
bbt_show_sixteenths ,
2021-02-20 11:29:03 -05:00
bbt_show_thirtyseconds ,
bbt_show_sixtyfourths ,
bbt_show_onetwentyeighths
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
} ;
BBTRulerScale bbt_ruler_scale ;
2011-05-25 21:29:59 -04:00
uint32_t bbt_bars ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
gint bbt_nmarks ;
uint32_t bbt_bar_helper_on ;
2017-09-18 12:39:17 -04:00
void compute_bbt_ruler_scale ( samplepos_t lower , samplepos_t upper ) ;
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
2014-06-11 23:54:04 -04:00
ArdourCanvas : : Ruler * timecode_ruler ;
ArdourCanvas : : Ruler * bbt_ruler ;
ArdourCanvas : : Ruler * samples_ruler ;
ArdourCanvas : : Ruler * minsec_ruler ;
2005-09-25 14:42:24 -04:00
2014-12-28 09:01:49 -05:00
static double timebar_height ;
2005-09-25 14:42:24 -04:00
guint32 visible_timebars ;
2019-03-07 10:40:16 -05:00
Gtk : : Menu * editor_ruler_menu ;
2009-10-14 12:10:01 -04:00
2013-04-04 00:32:52 -04:00
ArdourCanvas : : Rectangle * tempo_bar ;
ArdourCanvas : : Rectangle * meter_bar ;
ArdourCanvas : : Rectangle * marker_bar ;
ArdourCanvas : : Rectangle * range_marker_bar ;
ArdourCanvas : : Rectangle * transport_marker_bar ;
ArdourCanvas : : Rectangle * cd_marker_bar ;
2022-01-04 16:48:52 -05:00
ArdourCanvas : : Rectangle * cue_marker_bar ;
2009-10-14 12:10:01 -04:00
2022-01-06 14:00:18 -05:00
void toggle_cue_behavior ( ) ;
2005-09-25 14:42:24 -04:00
Gtk : : Label minsec_label ;
Gtk : : Label bbt_label ;
2009-10-26 10:38:58 -04:00
Gtk : : Label timecode_label ;
2011-01-18 07:51:02 -05:00
Gtk : : Label samples_label ;
2005-09-25 14:42:24 -04:00
Gtk : : Label tempo_label ;
Gtk : : Label meter_label ;
Gtk : : Label mark_label ;
Gtk : : Label range_mark_label ;
Gtk : : Label transport_mark_label ;
2008-01-10 16:20:59 -05:00
Gtk : : Label cd_mark_label ;
2022-01-04 16:48:52 -05:00
Gtk : : Label cue_mark_label ;
2005-09-25 14:42:24 -04:00
2013-04-11 13:49:29 -04:00
/* videtimline related actions */
2013-03-12 17:00:09 -04:00
Gtk : : Label videotl_label ;
2014-06-22 11:41:05 -04:00
ArdourCanvas : : Container * videotl_group ;
2013-03-12 17:00:09 -04:00
Glib : : RefPtr < Gtk : : ToggleAction > ruler_video_action ;
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_proc_action ;
2013-04-05 17:16:33 -04:00
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_ontop_action ;
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_timecode_action ;
2018-12-13 11:44:58 -05:00
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_frame_action ;
2013-04-05 17:16:33 -04:00
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_osdbg_action ;
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_fullscreen_action ;
Glib : : RefPtr < Gtk : : ToggleAction > xjadeo_letterbox_action ;
Glib : : RefPtr < Gtk : : Action > xjadeo_zoom_100 ;
2013-03-12 17:00:09 -04:00
void set_xjadeo_proc ( ) ;
void toggle_xjadeo_proc ( int state = - 1 ) ;
2013-06-12 18:54:43 -04:00
void set_close_video_sensitive ( bool onoff ) ;
2013-03-12 17:00:09 -04:00
void set_xjadeo_sensitive ( bool onoff ) ;
2013-04-05 17:16:33 -04:00
void set_xjadeo_viewoption ( int ) ;
void toggle_xjadeo_viewoption ( int what , int state = - 1 ) ;
2013-03-12 17:00:09 -04:00
void toggle_ruler_video ( bool onoff ) { ruler_video_action - > set_active ( onoff ) ; }
int videotl_bar_height ; /* in units of timebar_height; default: 4 */
int get_videotl_bar_height ( ) const { return videotl_bar_height ; }
void toggle_region_video_lock ( ) ;
2021-01-05 15:58:28 -05:00
EditorCursor * playhead_cursor ( ) const { return _playhead_cursor ; }
EditorCursor * snapped_cursor ( ) const { return _snapped_cursor ; }
2009-10-14 12:10:01 -04:00
2017-09-18 12:39:17 -04:00
samplepos_t playhead_cursor_sample ( ) const ;
2005-09-25 14:42:24 -04:00
2020-10-27 13:18:02 -04:00
Temporal : : timepos_t get_region_boundary ( Temporal : : timepos_t const & pos , int32_t dir , bool with_selection , bool only_onscreen ) ;
2009-04-15 14:04:23 -04:00
void cursor_to_region_boundary ( bool with_selection , int32_t dir ) ;
void cursor_to_next_region_boundary ( bool with_selection ) ;
void cursor_to_previous_region_boundary ( bool with_selection ) ;
2009-05-30 14:25:59 -04:00
void cursor_to_next_region_point ( EditorCursor * , ARDOUR : : RegionPoint ) ;
void cursor_to_previous_region_point ( EditorCursor * , ARDOUR : : RegionPoint ) ;
void cursor_to_region_point ( EditorCursor * , ARDOUR : : RegionPoint , int32_t dir ) ;
2019-04-08 18:27:05 -04:00
void cursor_to_selection_start ( EditorCursor * ) ;
void cursor_to_selection_end ( EditorCursor * ) ;
2007-11-12 17:23:01 -05:00
2009-04-15 14:04:23 -04:00
void selected_marker_to_region_boundary ( bool with_selection , int32_t dir ) ;
void selected_marker_to_next_region_boundary ( bool with_selection ) ;
void selected_marker_to_previous_region_boundary ( bool with_selection ) ;
2008-01-10 16:20:59 -05:00
void selected_marker_to_next_region_point ( ARDOUR : : RegionPoint ) ;
void selected_marker_to_previous_region_point ( ARDOUR : : RegionPoint ) ;
void selected_marker_to_region_point ( ARDOUR : : RegionPoint , int32_t dir ) ;
void selected_marker_to_selection_start ( ) ;
void selected_marker_to_selection_end ( ) ;
2007-11-12 17:23:01 -05:00
2019-04-08 18:27:05 -04:00
void select_all_selectables_using_cursor ( EditorCursor * , bool ) ;
2015-10-07 17:56:14 -04:00
void select_all_selectables_using_edit ( bool , bool ) ;
2007-11-12 17:23:01 -05:00
void select_all_selectables_between ( bool within ) ;
void select_range_between ( ) ;
2005-09-25 14:42:24 -04:00
2020-10-01 12:32:06 -04:00
boost : : shared_ptr < ARDOUR : : Region > find_next_region ( Temporal : : timepos_t const & , ARDOUR : : RegionPoint , int32_t dir , TrackViewList & , TimeAxisView * * = 0 ) ;
Temporal : : timepos_t find_next_region_boundary ( Temporal : : timepos_t const & , int32_t dir , const TrackViewList & ) ;
2005-09-25 14:42:24 -04:00
2020-10-01 12:32:06 -04:00
std : : vector < Temporal : : timepos_t > region_boundary_cache ;
2018-02-09 10:59:39 -05:00
void mark_region_boundary_cache_dirty ( ) { _region_boundary_cache_dirty = true ; }
2005-09-25 14:42:24 -04:00
void build_region_boundary_cache ( ) ;
2018-02-09 10:59:39 -05:00
bool _region_boundary_cache_dirty ;
2005-09-25 14:42:24 -04:00
2014-07-28 12:27:02 -04:00
Gtk : : HBox toplevel_hpacker ;
2005-09-25 14:42:24 -04:00
Gtk : : HBox bottom_hbox ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
Gtk : : Table edit_packer ;
2013-04-04 00:32:52 -04:00
/** the adjustment that controls the overall editor vertical scroll position */
2005-12-12 15:54:55 -05:00
Gtk : : Adjustment vertical_adjustment ;
2015-02-03 14:33:22 -05:00
Gtk : : Adjustment horizontal_adjustment ;
2011-05-25 21:29:59 -04:00
2015-02-03 14:33:22 -05:00
Gtk : : Adjustment unused_adjustment ; // yes, really; Gtk::Layout constructor requires refs
2005-12-12 15:54:55 -05:00
Gtk : : Layout controls_layout ;
2006-01-10 07:33:26 -05:00
bool control_layout_scroll ( GdkEventScroll * ev ) ;
2011-05-25 21:29:59 -04:00
void reset_controls_layout_width ( ) ;
void reset_controls_layout_height ( int32_t height ) ;
2005-09-25 14:42:24 -04:00
2011-03-01 19:30:19 -05:00
enum Direction {
LEFT ,
RIGHT ,
UP ,
DOWN
} ;
2011-05-25 21:29:59 -04:00
2011-03-01 19:30:19 -05:00
bool scroll_press ( Direction ) ;
void scroll_release ( ) ;
2010-06-16 20:02:45 -04:00
sigc : : connection _scroll_connection ;
int _scroll_callbacks ;
2005-12-12 15:54:55 -05:00
2013-04-04 00:32:52 -04:00
double _visible_canvas_width ;
double _visible_canvas_height ; ///< height of the visible area of the track canvas
double _full_canvas_height ; ///< full height of the canvas
2005-09-25 14:42:24 -04:00
2005-11-28 23:41:15 -05:00
bool track_canvas_map_handler ( GdkEventAny * ) ;
2021-03-28 14:36:37 -04:00
bool edit_controls_button_event ( GdkEventButton * ) ;
2019-04-08 18:27:05 -04:00
Gtk : : Menu * edit_controls_left_menu ;
Gtk : : Menu * edit_controls_right_menu ;
2005-09-25 14:42:24 -04:00
Gtk : : VBox track_canvas_vbox ;
Gtk : : VBox edit_controls_vbox ;
2007-10-11 18:07:47 -04:00
Gtk : : HBox edit_controls_hbox ;
2005-09-25 14:42:24 -04:00
2012-04-09 14:53:51 -04:00
void control_vertical_zoom_in_all ( ) ;
void control_vertical_zoom_out_all ( ) ;
void control_vertical_zoom_in_selected ( ) ;
void control_vertical_zoom_out_selected ( ) ;
2012-04-25 23:46:18 -04:00
void control_step_tracks_up ( ) ;
void control_step_tracks_down ( ) ;
2012-04-09 14:53:51 -04:00
void control_view ( uint32_t ) ;
2006-04-06 12:51:27 -04:00
void control_scroll ( float ) ;
2017-08-09 08:04:05 -04:00
void access_action ( const std : : string & , const std : : string & ) ;
void set_toggleaction ( const std : : string & , const std : : string & , bool ) ;
2017-09-18 12:39:17 -04:00
bool deferred_control_scroll ( samplepos_t ) ;
2006-04-06 12:51:27 -04:00
sigc : : connection control_scroll_connection ;
2005-09-25 14:42:24 -04:00
void tie_vertical_scrolling ( ) ;
2010-05-08 21:33:11 -04:00
void set_horizontal_position ( double ) ;
2010-05-09 16:48:21 -04:00
double horizontal_position ( ) const ;
2006-09-18 23:29:16 -04:00
2007-01-11 15:36:35 -05:00
struct VisualChange {
2009-10-14 12:10:01 -04:00
enum Type {
2009-06-15 18:45:05 -04:00
TimeOrigin = 0x1 ,
ZoomLevel = 0x2 ,
2017-06-28 12:46:07 -04:00
YOrigin = 0x4 ,
VideoTimeline = 0x8
2009-06-15 18:45:05 -04:00
} ;
2009-10-14 12:10:01 -04:00
2019-04-08 13:53:33 -04:00
Type pending ;
2017-09-18 12:39:17 -04:00
samplepos_t time_origin ;
2019-04-08 13:53:33 -04:00
samplecnt_t samples_per_pixel ;
double y_origin ;
2009-10-14 12:10:01 -04:00
2009-06-15 18:45:05 -04:00
int idle_handler_id ;
2012-06-25 20:07:45 -04:00
/** true if we are currently in the idle handler */
bool being_handled ;
2009-10-14 12:10:01 -04:00
2013-04-12 11:31:50 -04:00
VisualChange ( ) : pending ( ( VisualChange : : Type ) 0 ) , time_origin ( 0 ) , samples_per_pixel ( 0 ) , idle_handler_id ( - 1 ) , being_handled ( false ) { }
2009-06-15 18:45:05 -04:00
void add ( Type t ) {
pending = Type ( pending | t ) ;
}
2007-01-11 15:36:35 -05:00
} ;
VisualChange pending_visual_change ;
2017-04-01 07:33:59 -04:00
bool visual_change_queued ;
void pre_render ( ) ;
2007-01-11 15:36:35 -05:00
2019-04-08 18:27:05 -04:00
static int _idle_visual_changer ( void * arg ) ;
2007-01-11 15:36:35 -05:00
int idle_visual_changer ( ) ;
2015-02-03 14:33:22 -05:00
void visual_changer ( const VisualChange & ) ;
2009-06-15 18:45:05 -04:00
void ensure_visual_change_idle_handler ( ) ;
2007-01-11 15:36:35 -05:00
2005-09-25 14:42:24 -04:00
/* track views */
2009-06-13 13:52:51 -04:00
TrackViewList track_views ;
2014-06-18 10:24:59 -04:00
std : : pair < TimeAxisView * , double > trackview_by_y_position ( double , bool trackview_relative_offset = true ) const ;
2017-05-05 07:31:49 -04:00
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 ) ) ;
}
2005-09-25 14:42:24 -04:00
2009-12-13 14:09:52 -05:00
TrackViewList get_tracks_for_range_action ( ) const ;
2009-07-21 15:55:12 -04:00
2010-02-07 20:25:06 -05:00
sigc : : connection super_rapid_screen_update_connection ;
2017-09-18 12:39:17 -04:00
void center_screen_internal ( samplepos_t , float ) ;
2009-10-14 12:10:01 -04:00
2010-02-07 20:25:06 -05:00
void super_rapid_screen_update ( ) ;
2009-10-14 12:10:01 -04:00
2017-03-23 14:21:50 -04:00
int64_t _last_update_time ;
double _err_screen_engine ;
2005-09-25 14:42:24 -04:00
void session_going_away ( ) ;
2017-09-18 12:39:17 -04:00
samplepos_t cut_buffer_start ;
samplecnt_t cut_buffer_length ;
2005-09-25 14:42:24 -04:00
2014-12-20 01:11:28 -05:00
boost : : shared_ptr < CursorContext > _press_cursor_ctx ; ///< Button press cursor context
2011-05-25 21:29:59 -04:00
boost : : weak_ptr < ARDOUR : : Trimmable > _trimmable ;
boost : : weak_ptr < ARDOUR : : Movable > _movable ;
2010-09-22 11:21:06 -04:00
2005-11-14 11:24:21 -05:00
bool typed_event ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
bool button_press_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
2019-04-08 18:27:05 -04:00
bool button_press_handler_1 ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
bool button_press_handler_2 ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
2005-11-14 11:24:21 -05:00
bool button_release_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
2013-08-09 10:57:37 -04:00
bool button_double_click_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
2011-05-25 21:29:59 -04:00
bool button_press_dispatch ( GdkEventButton * ) ;
bool button_release_dispatch ( GdkEventButton * ) ;
2009-05-30 14:25:59 -04:00
bool motion_handler ( ArdourCanvas : : Item * , GdkEvent * , bool from_autoscroll = false ) ;
2005-11-14 11:24:21 -05:00
bool enter_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
bool leave_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
2011-08-15 11:08:37 -04:00
bool key_press_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
bool key_release_handler ( ArdourCanvas : : Item * , GdkEvent * , ItemType ) ;
2009-10-14 12:10:01 -04:00
2011-05-25 21:29:59 -04:00
Gtkmm2ext : : Bindings * button_bindings ;
XMLNode * button_settings ( ) const ;
2011-03-03 22:10:48 -05:00
2005-09-25 14:42:24 -04:00
/* KEYMAP HANDLING */
2005-10-09 13:58:06 -04:00
void register_actions ( ) ;
2010-11-03 18:19:29 -04:00
void register_region_actions ( ) ;
2020-04-16 14:11:10 -04:00
void register_midi_actions ( Gtkmm2ext : : Bindings * ) ;
2005-09-25 14:42:24 -04:00
2015-02-03 14:33:22 -05:00
void load_bindings ( ) ;
2011-11-30 10:29:53 -05:00
2014-11-14 20:04:09 -05:00
/* CUT/COPY/PASTE */
2020-10-27 13:18:02 -04:00
Temporal : : timepos_t last_paste_pos ;
2019-04-08 13:53:33 -04:00
unsigned paste_count ;
2014-11-14 20:04:09 -05:00
2005-09-25 14:42:24 -04:00
void cut_copy ( Editing : : CutCopyOp ) ;
2007-05-10 07:53:35 -04:00
bool can_cut_copy ( ) const ;
2020-10-27 13:18:02 -04:00
void cut_copy_points ( Editing : : CutCopyOp , Temporal : : timepos_t const & earliest ) ;
2008-03-17 16:54:03 -04:00
void cut_copy_regions ( Editing : : CutCopyOp , RegionSelection & ) ;
2005-09-25 14:42:24 -04:00
void cut_copy_ranges ( Editing : : CutCopyOp ) ;
2009-08-10 15:29:29 -04:00
void cut_copy_midi ( Editing : : CutCopyOp ) ;
2005-09-25 14:42:24 -04:00
void mouse_paste ( ) ;
2020-10-27 13:18:02 -04:00
void paste_internal ( Temporal : : timepos_t const & position , float times ) ;
2005-09-25 14:42:24 -04:00
/* EDITING OPERATIONS */
2009-10-14 12:10:01 -04:00
2006-05-19 16:10:35 -04:00
void reset_point_selection ( ) ;
2007-10-11 18:07:47 -04:00
void toggle_region_lock ( ) ;
2010-11-03 18:19:29 -04:00
void toggle_opaque_region ( ) ;
2008-12-12 09:43:24 -05:00
void toggle_record_enable ( ) ;
2011-08-14 12:01:07 -04:00
void toggle_solo ( ) ;
void toggle_solo_isolate ( ) ;
void toggle_mute ( ) ;
2010-05-02 10:08:37 -04:00
void toggle_region_lock_style ( ) ;
2011-12-27 15:21:00 -05:00
2018-07-26 18:25:01 -04:00
void play_solo_selection ( bool restart ) ;
2018-02-11 10:39:45 -05:00
2011-12-27 15:21:00 -05:00
enum LayerOperation {
Raise ,
RaiseToTop ,
Lower ,
LowerToBottom
} ;
void do_layer_operation ( LayerOperation ) ;
2008-01-10 16:20:59 -05:00
void raise_region ( ) ;
2005-09-25 14:42:24 -04:00
void raise_region_to_top ( ) ;
2011-12-26 18:18:24 -05:00
void change_region_layering_order ( bool from_context_menu ) ;
2008-01-10 16:20:59 -05:00
void lower_region ( ) ;
2005-09-25 14:42:24 -04:00
void lower_region_to_bottom ( ) ;
2008-02-01 22:57:35 -05:00
void split_region_at_transients ( ) ;
2005-09-25 14:42:24 -04:00
void crop_region_to_selection ( ) ;
2020-10-27 13:18:02 -04:00
void crop_region_to ( Temporal : : timepos_t const & start , Temporal : : timepos_t const & end ) ;
void set_sync_point ( Temporal : : timepos_t const & , const RegionSelection & ) ;
2010-11-03 18:19:29 -04:00
void set_region_sync_position ( ) ;
2005-09-25 14:42:24 -04:00
void remove_region_sync ( ) ;
2010-11-03 18:19:29 -04:00
void align_regions ( ARDOUR : : RegionPoint ) ;
void align_regions_relative ( ARDOUR : : RegionPoint point ) ;
2020-10-19 14:37:54 -04:00
void align_region ( boost : : shared_ptr < ARDOUR : : Region > , ARDOUR : : RegionPoint point , Temporal : : timepos_t const & position ) ;
void align_region_internal ( boost : : shared_ptr < ARDOUR : : Region > , ARDOUR : : RegionPoint point , Temporal : : timepos_t const & position ) ;
2019-06-06 21:28:40 -04:00
void recover_regions ( ARDOUR : : RegionList ) ;
2007-05-10 07:53:35 -04:00
void remove_selected_regions ( ) ;
2021-11-19 10:14:46 -05:00
void remove_regions ( const RegionSelection & , bool can_ripple , bool as_part_of_other_command ) ;
2005-09-25 14:42:24 -04:00
void remove_clicked_region ( ) ;
2010-11-03 18:19:29 -04:00
void show_region_properties ( ) ;
2009-08-26 23:09:30 -04:00
void show_midi_list_editor ( ) ;
2008-01-10 16:20:59 -05:00
void rename_region ( ) ;
2006-07-23 08:03:19 -04:00
void duplicate_some_regions ( RegionSelection & , float times ) ;
2005-09-25 14:42:24 -04:00
void duplicate_selection ( float times ) ;
void region_fill_selection ( ) ;
2011-05-16 16:16:57 -04:00
void combine_regions ( ) ;
void uncombine_regions ( ) ;
2005-09-25 14:42:24 -04:00
void region_fill_track ( ) ;
2006-08-29 17:21:48 -04:00
void audition_playlist_region_standalone ( boost : : shared_ptr < ARDOUR : : Region > ) ;
2005-09-25 14:42:24 -04:00
void split_multichannel_region ( ) ;
2008-01-12 18:45:50 -05:00
void reverse_region ( ) ;
2009-04-29 13:01:14 -04:00
void strip_region_silence ( ) ;
2008-01-12 18:45:50 -05:00
void normalize_region ( ) ;
2009-09-09 12:39:33 -04:00
void reset_region_scale_amplitude ( ) ;
2010-11-03 18:19:29 -04:00
void adjust_region_gain ( bool up ) ;
2017-03-04 00:20:56 -05:00
void reset_region_gain ( ) ;
2008-01-12 18:45:50 -05:00
void quantize_region ( ) ;
2014-12-25 15:32:10 -05:00
void quantize_regions ( const RegionSelection & rs ) ;
2014-12-06 23:42:11 -05:00
void legatize_region ( bool shrink_only ) ;
2014-12-25 15:32:10 -05:00
void legatize_regions ( const RegionSelection & rs , bool shrink_only ) ;
2021-11-19 10:14:46 -05:00
void deinterlace_midi_regions ( const RegionSelection & rs ) ;
void deinterlace_selected_midi_regions ( ) ;
2014-12-28 15:50:57 -05:00
void transform_region ( ) ;
void transform_regions ( const RegionSelection & rs ) ;
2015-10-15 09:44:09 -04:00
void transpose_region ( ) ;
void transpose_regions ( const RegionSelection & rs ) ;
2011-12-29 20:50:34 -05:00
void insert_patch_change ( bool from_context ) ;
2010-05-18 23:03:28 -04:00
void fork_region ( ) ;
2005-09-25 14:42:24 -04:00
2008-04-11 10:06:50 -04:00
void do_insert_time ( ) ;
2020-10-27 13:18:02 -04:00
void insert_time ( Temporal : : timepos_t const & , Temporal : : timecnt_t const & , Editing : : InsertTimeOption , bool , bool , bool , bool , bool , bool ) ;
2008-04-11 10:06:50 -04:00
2015-06-16 06:23:50 -04:00
void do_remove_time ( ) ;
2020-10-27 13:18:02 -04:00
void remove_time ( Temporal : : timepos_t const & pos , Temporal : : timecnt_t const & distance , Editing : : InsertTimeOption opt , bool ignore_music_glue , bool markers_too ,
bool glued_markers_too , bool locked_markers_too , bool tempo_too ) ;
2013-10-16 17:25:35 -04:00
2008-02-01 22:57:35 -05:00
void tab_to_transient ( bool forward ) ;
2010-11-03 18:19:29 -04:00
void set_tempo_from_region ( ) ;
2008-02-01 22:57:35 -05:00
void use_range_as_bar ( ) ;
2020-10-27 13:18:02 -04:00
void define_one_bar ( Temporal : : timepos_t const & start , Temporal : : timepos_t const & end ) ;
2008-02-01 22:57:35 -05:00
2005-09-25 14:42:24 -04:00
void audition_region_from_region_list ( ) ;
2010-11-03 18:19:29 -04:00
void naturalize_region ( ) ;
2005-09-25 14:42:24 -04:00
2014-07-07 10:13:19 -04:00
void split_region ( ) ;
2011-06-12 11:50:47 -04:00
void delete_ ( ) ;
2005-09-25 14:42:24 -04:00
void cut ( ) ;
void copy ( ) ;
2016-06-16 13:20:37 -04:00
void paste ( float times , bool from_context_menu ) ;
2011-05-25 21:29:59 -04:00
2010-07-06 07:33:27 -04:00
void place_transient ( ) ;
void remove_transient ( ArdourCanvas : : Item * item ) ;
void snap_regions_to_grid ( ) ;
void close_region_gaps ( ) ;
2005-09-25 14:42:24 -04:00
void keyboard_paste ( ) ;
void region_from_selection ( ) ;
2008-02-16 17:43:18 -05:00
void create_region_from_selection ( std : : vector < boost : : shared_ptr < ARDOUR : : Region > > & ) ;
2005-09-25 14:42:24 -04:00
void play_from_start ( ) ;
2007-11-12 17:23:01 -05:00
void play_from_edit_point ( ) ;
2008-01-10 16:20:59 -05:00
void play_from_edit_point_and_return ( ) ;
2005-09-25 14:42:24 -04:00
void play_selected_region ( ) ;
2008-01-10 16:20:59 -05:00
void play_edit_range ( ) ;
2005-09-25 14:42:24 -04:00
void play_location ( ARDOUR : : Location & ) ;
void loop_location ( ARDOUR : : Location & ) ;
2017-09-18 12:39:17 -04:00
void calc_extra_zoom_edges ( samplepos_t & start , samplepos_t & end ) ;
2016-12-12 18:20:44 -05:00
void temporal_zoom_selection ( Editing : : ZoomAxis ) ;
2005-09-25 14:42:24 -04:00
void temporal_zoom_session ( ) ;
2017-08-27 00:06:29 -04:00
void temporal_zoom_extents ( ) ;
2017-09-18 12:39:17 -04:00
void temporal_zoom ( samplecnt_t samples_per_pixel ) ;
void temporal_zoom_by_sample ( samplepos_t start , samplepos_t end ) ;
void temporal_zoom_to_sample ( bool coarser , samplepos_t sample ) ;
2005-09-25 14:42:24 -04:00
2019-07-30 14:02:15 -04:00
void insert_source_list_selection ( float times ) ;
2005-09-25 14:42:24 -04:00
2007-10-11 18:07:47 -04:00
/* import & embed */
2009-10-14 12:10:01 -04:00
2006-03-22 12:03:00 -05:00
void add_external_audio_action ( Editing : : ImportMode ) ;
2008-02-16 17:43:18 -05:00
2009-05-12 13:03:42 -04:00
int check_whether_and_how_to_import ( std : : string , bool all_or_nothing = true ) ;
2010-09-14 11:45:21 -04:00
bool check_multichannel_status ( const std : : vector < std : : string > & paths ) ;
2007-10-11 18:07:47 -04:00
SoundFileOmega * sfbrowser ;
2009-10-14 12:10:01 -04:00
2017-09-18 12:39:17 -04:00
void bring_in_external_audio ( Editing : : ImportMode mode , samplepos_t & pos ) ;
2008-03-17 16:54:03 -04:00
2020-09-26 11:14:59 -04:00
bool idle_drop_paths ( std : : vector < std : : string > paths , Temporal : : timepos_t sample , double ypos , bool copy ) ;
void drop_paths_part_two ( const std : : vector < std : : string > & paths , Temporal : : timepos_t const & sample , double ypos , bool copy ) ;
2009-10-14 12:10:01 -04:00
2014-12-24 20:07:10 -05:00
int import_sndfiles ( std : : vector < std : : string > paths ,
Editing : : ImportDisposition disposition ,
Editing : : ImportMode mode ,
ARDOUR : : SrcQuality quality ,
2020-10-19 14:37:54 -04:00
Temporal : : timepos_t & pos ,
2014-12-24 20:07:10 -05:00
int target_regions ,
int target_tracks ,
boost : : shared_ptr < ARDOUR : : Track > & track ,
2021-07-07 23:24:02 -04:00
std : : string const & pgroup_id ,
2014-12-24 20:07:10 -05:00
bool replace ,
boost : : shared_ptr < ARDOUR : : PluginInfo > instrument = boost : : shared_ptr < ARDOUR : : PluginInfo > ( ) ) ;
int embed_sndfiles ( std : : vector < std : : string > paths ,
bool multiple_files ,
bool & check_sample_rate ,
Editing : : ImportDisposition disposition ,
Editing : : ImportMode mode ,
2020-10-19 14:37:54 -04:00
Temporal : : timepos_t & pos ,
2014-12-24 20:07:10 -05:00
int target_regions ,
int target_tracks ,
boost : : shared_ptr < ARDOUR : : Track > & track ,
2021-07-07 23:24:02 -04:00
std : : string const & pgroup_id ,
2014-12-24 20:07:10 -05:00
boost : : shared_ptr < ARDOUR : : PluginInfo > instrument = boost : : shared_ptr < ARDOUR : : PluginInfo > ( ) ) ;
int add_sources ( std : : vector < std : : string > paths ,
ARDOUR : : SourceList & sources ,
2020-10-19 14:37:54 -04:00
Temporal : : timepos_t & pos ,
2014-12-24 20:07:10 -05:00
Editing : : ImportDisposition disposition ,
Editing : : ImportMode mode ,
int target_regions ,
int target_tracks ,
boost : : shared_ptr < ARDOUR : : Track > & track ,
2021-07-07 23:24:02 -04:00
std : : string const & pgroup_id ,
2014-12-24 20:07:10 -05:00
bool add_channel_suffix ,
boost : : shared_ptr < ARDOUR : : PluginInfo > instrument = boost : : shared_ptr < ARDOUR : : PluginInfo > ( ) ) ;
int finish_bringing_in_material ( boost : : shared_ptr < ARDOUR : : Region > region ,
uint32_t in_chans ,
uint32_t out_chans ,
2020-10-19 14:37:54 -04:00
Temporal : : timepos_t & pos ,
2014-12-24 20:07:10 -05:00
Editing : : ImportMode mode ,
boost : : shared_ptr < ARDOUR : : Track > & existing_track ,
2021-07-07 23:24:02 -04:00
std : : string const & new_track_name ,
std : : string const & pgroup_id ,
2014-12-24 20:07:10 -05:00
boost : : shared_ptr < ARDOUR : : PluginInfo > instrument ) ;
2007-10-11 18:07:47 -04:00
boost : : shared_ptr < ARDOUR : : AudioTrack > get_nth_selected_audio_track ( int nth ) const ;
2008-02-18 14:45:52 -05:00
boost : : shared_ptr < ARDOUR : : MidiTrack > get_nth_selected_midi_track ( int nth ) const ;
2005-09-25 14:42:24 -04:00
2015-02-03 14:33:22 -05:00
void toggle_midi_input_active ( bool flip_others ) ;
2012-11-12 21:19:04 -05:00
2005-09-25 14:42:24 -04:00
ARDOUR : : InterThreadInfo * current_interthread_info ;
2006-03-12 22:27:58 -05:00
2006-03-12 17:06:41 -05:00
AnalysisWindow * analysis_window ;
2005-09-25 14:42:24 -04:00
2017-01-12 12:22:56 -05:00
/* import & embed */
void external_audio_dialog ( ) ;
void session_import_dialog ( ) ;
2018-10-10 05:13:14 -04:00
/* PT import specific */
void external_pt_dialog ( ) ;
ARDOUR : : ImportStatus import_pt_status ;
2019-04-08 18:27:05 -04:00
static void * _import_pt_thread ( void * ) ;
2018-10-10 05:13:14 -04:00
void * import_pt_thread ( ) ;
PTFFormat import_ptf ;
2005-09-25 14:42:24 -04:00
/* import specific info */
2009-10-30 11:30:22 -04:00
struct EditorImportStatus : public ARDOUR : : ImportStatus {
2020-02-24 20:37:52 -05:00
void clear ( ) {
ARDOUR : : ImportStatus : : clear ( ) ;
track . reset ( ) ;
}
Editing : : ImportMode mode ;
2020-10-19 14:37:54 -04:00
Temporal : : timepos_t pos ;
2020-02-24 20:37:52 -05:00
int target_tracks ;
int target_regions ;
boost : : shared_ptr < ARDOUR : : Track > track ;
bool replace ;
2008-12-12 09:43:24 -05:00
} ;
EditorImportStatus import_status ;
2019-04-08 18:27:05 -04:00
static void * _import_thread ( void * ) ;
2005-09-25 14:42:24 -04:00
void * import_thread ( ) ;
2008-12-12 09:43:24 -05:00
void finish_import ( ) ;
2005-09-25 14:42:24 -04:00
/* to support this ... */
void import_audio ( bool as_tracks ) ;
2010-09-14 11:45:21 -04:00
void do_import ( std : : vector < std : : string > paths , bool split , bool as_tracks ) ;
2020-10-19 14:37:54 -04:00
void import_smf_tempo_map ( Evoral : : SMF const & , Temporal : : timepos_t const & pos ) ;
void import_smf_markers ( Evoral : : SMF & , Temporal : : timepos_t const & pos ) ;
2005-09-25 14:42:24 -04:00
void move_to_start ( ) ;
void move_to_end ( ) ;
void center_playhead ( ) ;
2007-11-12 17:23:01 -05:00
void center_edit_point ( ) ;
2008-02-19 17:10:27 -05:00
void playhead_forward_to_grid ( ) ;
void playhead_backward_to_grid ( ) ;
2007-01-28 12:44:13 -05:00
void scroll_playhead ( bool forward ) ;
2005-09-25 14:42:24 -04:00
void scroll_backward ( float pages = 0.8f ) ;
void scroll_forward ( float pages = 0.8f ) ;
void scroll_tracks_down ( ) ;
void scroll_tracks_up ( ) ;
void set_mark ( ) ;
void clear_markers ( ) ;
2021-03-16 18:49:49 -04:00
void clear_xrun_markers ( ) ;
2005-09-25 14:42:24 -04:00
void clear_ranges ( ) ;
void clear_locations ( ) ;
2007-01-09 18:24:54 -05:00
void unhide_markers ( ) ;
void unhide_ranges ( ) ;
2005-09-25 14:42:24 -04:00
void cursor_align ( bool playhead_to_edit ) ;
2014-09-17 12:28:36 -04:00
void toggle_skip_playback ( ) ;
2005-09-25 14:42:24 -04:00
void remove_last_capture ( ) ;
2018-11-15 10:27:04 -05:00
void tag_last_capture ( ) ;
void tag_selected_region ( ) ;
void tag_regions ( ARDOUR : : RegionList ) ;
2006-02-15 07:15:29 -05:00
void select_all_selectables_using_time_selection ( ) ;
void select_all_selectables_using_loop ( ) ;
void select_all_selectables_using_punch ( ) ;
2005-09-25 14:42:24 -04:00
void set_selection_from_range ( ARDOUR : : Location & ) ;
void set_selection_from_punch ( ) ;
void set_selection_from_loop ( ) ;
2008-01-12 18:45:50 -05:00
void set_selection_from_region ( ) ;
2005-09-25 14:42:24 -04:00
2020-09-29 19:53:43 -04:00
void add_location_mark ( Temporal : : timepos_t const & where ) ;
2010-11-03 18:19:29 -04:00
void add_location_from_region ( ) ;
void add_locations_from_region ( ) ;
2005-09-25 14:42:24 -04:00
void add_location_from_selection ( ) ;
2007-10-11 18:07:47 -04:00
void set_loop_from_selection ( bool play ) ;
void set_punch_from_selection ( ) ;
2008-01-10 17:22:29 -05:00
void set_punch_from_region ( ) ;
2016-08-27 19:57:40 -04:00
void set_auto_punch_range ( ) ;
2008-01-10 17:22:29 -05:00
2015-04-27 16:58:50 -04:00
void set_session_start_from_playhead ( ) ;
void set_session_end_from_playhead ( ) ;
2014-12-09 17:17:47 -05:00
void set_session_extents_from_selection ( ) ;
2008-01-10 16:20:59 -05:00
void set_loop_from_region ( bool play ) ;
2020-09-29 19:53:43 -04:00
void set_loop_range ( Temporal : : timepos_t const & start , Temporal : : timepos_t const & end , std : : string cmd ) ;
void set_punch_range ( Temporal : : timepos_t const & start , Temporal : : timepos_t const & end , std : : string cmd ) ;
2005-09-25 14:42:24 -04:00
2016-08-13 10:02:43 -04:00
void toggle_location_at_playhead_cursor ( ) ;
2005-09-25 14:42:24 -04:00
void add_location_from_playhead_cursor ( ) ;
2016-08-13 10:02:43 -04:00
bool do_remove_location_at_playhead_cursor ( ) ;
2014-07-03 18:50:14 -04:00
void remove_location_at_playhead_cursor ( ) ;
2008-01-10 16:20:59 -05:00
bool select_new_marker ;
2005-09-25 14:42:24 -04:00
2020-04-03 15:28:27 -04:00
void toggle_all_existing_automation ( ) ;
2021-06-27 22:38:29 -04:00
2020-04-03 20:54:37 -04:00
void toggle_layer_display ( ) ;
2021-06-27 22:38:29 -04:00
void layer_display_stacked ( ) ;
void layer_display_overlaid ( ) ;
2020-04-03 15:28:27 -04:00
2021-06-25 18:03:14 -04:00
void launch_playlist_selector ( ) ;
2005-09-25 14:42:24 -04:00
void reverse_selection ( ) ;
void edit_envelope ( ) ;
2007-11-07 20:40:25 -05:00
double last_scrub_x ;
int scrubbing_direction ;
2008-01-07 16:12:29 -05:00
int scrub_reversals ;
int scrub_reverse_distance ;
2017-09-18 12:39:17 -04:00
void scrub ( samplepos_t , double ) ;
2007-10-11 18:07:47 -04:00
2015-08-19 15:53:35 -04:00
void set_punch_start_from_edit_point ( ) ;
void set_punch_end_from_edit_point ( ) ;
void set_loop_start_from_edit_point ( ) ;
void set_loop_end_from_edit_point ( ) ;
2017-12-11 18:13:12 -05:00
void keyboard_selection_begin ( Editing : : EditIgnoreOption = Editing : : EDIT_IGNORE_NONE ) ;
2016-01-28 14:43:47 -05:00
void keyboard_selection_finish ( bool add , Editing : : EditIgnoreOption = Editing : : EDIT_IGNORE_NONE ) ;
2005-09-25 14:42:24 -04:00
bool have_pending_keyboard_selection ;
2017-09-18 12:39:17 -04:00
samplepos_t pending_keyboard_selection_start ;
2005-09-25 14:42:24 -04:00
2011-04-17 09:55:41 -04:00
void move_range_selection_start_or_end_to_region_boundary ( bool , bool ) ;
2005-09-25 14:42:24 -04:00
2018-02-09 10:59:39 -05:00
Editing : : GridType _grid_type ;
2009-10-26 19:43:04 -04:00
Editing : : SnapMode _snap_mode ;
2007-05-11 11:06:12 -04:00
2021-11-16 13:06:13 -05:00
Editing : : GridType _draw_length ;
int _draw_velocity ;
int _draw_channel ;
2008-12-12 09:43:24 -05:00
bool ignore_gui_changes ;
2005-09-25 14:42:24 -04:00
2010-01-12 11:14:49 -05:00
DragManager * _drags ;
2005-09-25 14:42:24 -04:00
2010-01-07 20:28:15 -05:00
void escape ( ) ;
2014-06-24 09:56:08 -04:00
void lock ( ) ;
void unlock ( ) ;
2014-06-25 11:47:35 -04:00
Gtk : : Dialog * lock_dialog ;
2005-09-25 14:42:24 -04:00
2014-06-25 08:28:36 -04:00
struct timeval last_event_time ;
bool generic_event_handler ( GdkEvent * ) ;
bool lock_timeout_callback ( ) ;
void start_lock_event_timing ( ) ;
2005-09-25 14:42:24 -04:00
Gtk : : Menu fade_context_menu ;
2005-11-14 11:24:21 -05:00
2012-05-11 17:30:36 -04:00
Gtk : : Menu xfade_in_context_menu ;
Gtk : : Menu xfade_out_context_menu ;
void popup_xfade_in_context_menu ( int , int , ArdourCanvas : : Item * , ItemType ) ;
void popup_xfade_out_context_menu ( int , int , ArdourCanvas : : Item * , ItemType ) ;
void fill_xfade_menu ( Gtk : : Menu_Helpers : : MenuList & items , bool start ) ;
2012-05-10 15:14:11 -04:00
2010-09-18 23:31:03 -04:00
void set_fade_in_shape ( ARDOUR : : FadeShape ) ;
void set_fade_out_shape ( ARDOUR : : FadeShape ) ;
2009-10-14 12:10:01 -04:00
2007-11-12 17:23:01 -05:00
void set_fade_length ( bool in ) ;
2007-01-28 12:44:13 -05:00
void set_fade_in_active ( bool ) ;
void set_fade_out_active ( bool ) ;
2009-10-14 12:10:01 -04:00
2014-07-10 08:17:22 -04:00
void fade_range ( ) ;
2007-01-09 18:24:54 -05:00
std : : set < boost : : shared_ptr < ARDOUR : : Playlist > > motion_frozen_playlists ;
2005-11-14 11:24:21 -05:00
2007-01-09 18:24:54 -05:00
bool _dragging_playhead ;
2009-05-30 14:25:59 -04:00
void marker_drag_motion_callback ( GdkEvent * ) ;
void marker_drag_finished_callback ( GdkEvent * ) ;
2005-11-14 11:24:21 -05:00
gint mouse_rename_region ( ArdourCanvas : : Item * , GdkEvent * ) ;
2021-06-04 11:22:44 -04:00
void add_region_drag ( ArdourCanvas : : Item * , GdkEvent * , RegionView * , bool copy ) ;
2007-10-14 01:45:31 -04:00
void start_create_region_grab ( ArdourCanvas : : Item * , GdkEvent * ) ;
2010-01-12 11:14:49 -05:00
void add_region_brush_drag ( ArdourCanvas : : Item * , GdkEvent * , RegionView * ) ;
2005-11-14 11:24:21 -05:00
void start_selection_grab ( ArdourCanvas : : Item * , GdkEvent * ) ;
2005-09-25 14:42:24 -04:00
void region_view_item_click ( AudioRegionView & , GdkEventButton * ) ;
2019-04-08 18:27:05 -04:00
bool can_remove_control_point ( ArdourCanvas : : Item * ) ;
void remove_control_point ( ArdourCanvas : : Item * ) ;
2005-09-25 14:42:24 -04:00
2005-10-12 12:28:26 -04:00
/* Canvas event handlers */
2014-06-13 14:27:59 -04:00
bool canvas_scroll_event ( GdkEventScroll * event , bool from_canvas ) ;
2005-11-14 11:24:21 -05:00
bool canvas_control_point_event ( GdkEvent * event , ArdourCanvas : : Item * , ControlPoint * ) ;
bool canvas_line_event ( GdkEvent * event , ArdourCanvas : : Item * , AutomationLine * ) ;
bool canvas_selection_rect_event ( GdkEvent * event , ArdourCanvas : : Item * , SelectionRect * ) ;
bool canvas_selection_start_trim_event ( GdkEvent * event , ArdourCanvas : : Item * , SelectionRect * ) ;
bool canvas_selection_end_trim_event ( GdkEvent * event , ArdourCanvas : : Item * , SelectionRect * ) ;
2012-05-08 13:13:59 -04:00
bool canvas_start_xfade_event ( GdkEvent * event , ArdourCanvas : : Item * , AudioRegionView * ) ;
bool canvas_end_xfade_event ( GdkEvent * event , ArdourCanvas : : Item * , AudioRegionView * ) ;
2005-11-14 11:24:21 -05:00
bool canvas_fade_in_event ( GdkEvent * event , ArdourCanvas : : Item * , AudioRegionView * ) ;
2014-05-30 21:53:59 -04:00
bool canvas_fade_in_handle_event ( GdkEvent * event , ArdourCanvas : : Item * , AudioRegionView * , bool trim = false ) ;
2005-11-14 11:24:21 -05:00
bool canvas_fade_out_event ( GdkEvent * event , ArdourCanvas : : Item * , AudioRegionView * ) ;
2014-05-30 21:53:59 -04:00
bool canvas_fade_out_handle_event ( GdkEvent * event , ArdourCanvas : : Item * , AudioRegionView * , bool trim = false ) ;
2006-07-23 08:03:19 -04:00
bool canvas_region_view_event ( GdkEvent * event , ArdourCanvas : : Item * , RegionView * ) ;
2014-06-18 10:24:59 -04:00
bool canvas_wave_view_event ( GdkEvent * event , ArdourCanvas : : Item * , RegionView * ) ;
2019-04-08 14:25:05 -04:00
bool canvas_frame_handle_event ( GdkEvent * event , ArdourCanvas : : Item * , RegionView * ) ;
2006-07-23 08:03:19 -04:00
bool canvas_region_view_name_highlight_event ( GdkEvent * event , ArdourCanvas : : Item * , RegionView * ) ;
2006-08-01 15:18:12 -04:00
bool canvas_region_view_name_event ( GdkEvent * event , ArdourCanvas : : Item * , RegionView * ) ;
2010-07-06 07:33:27 -04:00
bool canvas_feature_line_event ( GdkEvent * event , ArdourCanvas : : Item * , RegionView * ) ;
2009-07-09 13:58:13 -04:00
bool canvas_stream_view_event ( GdkEvent * event , ArdourCanvas : : Item * , RouteTimeAxisView * ) ;
2015-07-23 07:23:47 -04:00
bool canvas_marker_event ( GdkEvent * event , ArdourCanvas : : Item * , ArdourMarker * ) ;
2005-11-14 11:24:21 -05:00
bool canvas_tempo_marker_event ( GdkEvent * event , ArdourCanvas : : Item * , TempoMarker * ) ;
2016-05-07 13:03:12 -04:00
bool canvas_tempo_curve_event ( GdkEvent * event , ArdourCanvas : : Item * , TempoCurve * ) ;
2005-11-14 11:24:21 -05:00
bool canvas_meter_marker_event ( GdkEvent * event , ArdourCanvas : : Item * , MeterMarker * ) ;
2021-02-10 16:34:30 -05:00
bool canvas_bbt_marker_event ( GdkEvent * event , ArdourCanvas : : Item * , BBTMarker * ) ;
2013-04-04 00:32:52 -04:00
bool canvas_automation_track_event ( GdkEvent * event , ArdourCanvas : : Item * , AutomationTimeAxisView * ) ;
2019-04-08 18:27:05 -04:00
bool canvas_note_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
2005-11-14 11:24:21 -05:00
2019-04-08 18:27:05 -04:00
bool canvas_ruler_event ( GdkEvent * event , ArdourCanvas : : Item * , ItemType ) ;
2005-11-14 11:24:21 -05:00
bool canvas_tempo_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
bool canvas_meter_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
bool canvas_marker_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
bool canvas_range_marker_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
bool canvas_transport_marker_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
2008-01-10 16:20:59 -05:00
bool canvas_cd_marker_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
2022-01-04 16:48:52 -05:00
bool canvas_cue_marker_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
2013-04-11 13:49:29 -04:00
2013-03-12 17:00:09 -04:00
bool canvas_videotl_bar_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
void update_video_timeline ( bool flush = false ) ;
void set_video_timeline_height ( const int ) ;
bool is_video_timeline_locked ( ) ;
void toggle_video_timeline_locked ( ) ;
void set_video_timeline_locked ( const bool ) ;
void queue_visual_videotimeline_update ( ) ;
2017-09-18 12:39:17 -04:00
void embed_audio_from_video ( std : : string , samplepos_t n = 0 , bool lock_position_to_video = true ) ;
2005-11-14 11:24:21 -05:00
2017-02-17 19:25:13 -05:00
bool track_selection_change_without_scroll ( ) const {
return _track_selection_change_without_scroll ;
}
2016-04-08 13:21:13 -04:00
PBD : : Signal0 < void > EditorFreeze ;
PBD : : Signal0 < void > EditorThaw ;
2022-01-18 21:45:18 -05:00
void begin_tempo_map_edit ( ) ;
void abort_tempo_map_edit ( ) ;
void commit_tempo_map_edit ( ) ;
void mid_tempo_change ( ) ;
2017-04-29 06:01:56 -04:00
private :
2011-05-25 21:29:59 -04:00
friend class DragManager ;
friend class EditorRouteGroups ;
friend class EditorRegions ;
2018-11-15 10:21:55 -05:00
friend class EditorSources ;
2010-03-18 22:49:01 -04:00
2005-11-14 11:24:21 -05:00
/* non-public event handlers */
2005-09-25 14:42:24 -04:00
2005-11-15 22:09:36 -05:00
bool canvas_playhead_cursor_event ( GdkEvent * event , ArdourCanvas : : Item * ) ;
2005-12-23 21:17:47 -05:00
bool track_canvas_scroll ( GdkEventScroll * event ) ;
2005-09-25 14:42:24 -04:00
2007-04-12 19:20:37 -04:00
bool track_canvas_button_press_event ( GdkEventButton * event ) ;
bool track_canvas_button_release_event ( GdkEventButton * event ) ;
bool track_canvas_motion_notify_event ( GdkEventMotion * event ) ;
2013-04-04 00:32:52 -04:00
Gtk : : Allocation _canvas_viewport_allocation ;
void track_canvas_viewport_allocate ( Gtk : : Allocation alloc ) ;
2014-04-16 02:55:08 -04:00
void track_canvas_viewport_size_allocated ( ) ;
2009-06-08 15:28:51 -04:00
bool track_canvas_drag_motion ( Glib : : RefPtr < Gdk : : DragContext > const & , int , int , guint ) ;
2019-04-08 18:27:05 -04:00
bool track_canvas_key_press ( GdkEventKey * ) ;
bool track_canvas_key_release ( GdkEventKey * ) ;
2005-09-25 14:42:24 -04:00
2007-11-12 17:23:01 -05:00
void set_playhead_cursor ( ) ;
2005-09-25 14:42:24 -04:00
2010-11-03 18:19:29 -04:00
void toggle_region_mute ( ) ;
2005-09-25 14:42:24 -04:00
void initialize_canvas ( ) ;
2021-06-04 10:36:53 -04:00
/* playlist internal ops */
2021-07-20 17:00:19 -04:00
bool stamp_new_playlist ( std : : string title , std : : string & name , std : : string & pgroup , bool copy ) ;
2021-06-04 10:36:53 -04:00
2005-09-25 14:42:24 -04:00
/* display control */
2009-10-14 12:10:01 -04:00
2007-05-11 11:06:12 -04:00
/// true if the editor should follow the playhead, otherwise false
2005-09-25 14:42:24 -04:00
bool _follow_playhead ;
2011-05-25 21:29:59 -04:00
/// true if we scroll the tracks rather than the playhead
bool _stationary_playhead ;
2012-01-24 22:03:25 -05:00
/// true if we are in fullscreen mode
bool _maximised ;
2009-10-14 12:10:01 -04:00
2018-02-09 10:59:39 -05:00
std : : vector < ArdourCanvas : : Ruler : : Mark > grid_marks ;
GridLines * grid_lines ;
2008-09-10 17:27:39 -04:00
2014-06-22 11:41:05 -04:00
ArdourCanvas : : Container * global_rect_group ;
ArdourCanvas : : Container * time_line_group ;
2007-08-05 17:31:02 -04:00
2018-02-09 10:59:39 -05:00
void hide_grid_lines ( ) ;
void maybe_draw_grid_lines ( ) ;
2005-09-25 14:42:24 -04:00
void new_tempo_section ( ) ;
2005-11-14 11:24:21 -05:00
void remove_tempo_marker ( ArdourCanvas : : Item * ) ;
void remove_meter_marker ( ArdourCanvas : : Item * ) ;
2022-01-18 21:45:18 -05:00
gint real_remove_tempo_marker ( Temporal : : TempoPoint const * ) ;
gint real_remove_meter_marker ( Temporal : : MeterPoint const * ) ;
2009-10-14 12:10:01 -04:00
2014-01-27 10:09:58 -05:00
void edit_tempo_marker ( TempoMarker & ) ;
void edit_meter_marker ( MeterMarker & ) ;
2008-12-18 12:46:28 -05:00
void edit_control_point ( ArdourCanvas : : Item * ) ;
2014-12-25 15:32:10 -05:00
void edit_notes ( MidiRegionView * ) ;
2016-12-12 21:02:57 -05:00
void edit_region ( RegionView * ) ;
2009-10-14 12:10:01 -04:00
2016-12-10 10:01:20 -05:00
void edit_current_meter ( ) ;
void edit_current_tempo ( ) ;
2005-09-25 14:42:24 -04:00
void marker_menu_edit ( ) ;
void marker_menu_remove ( ) ;
void marker_menu_rename ( ) ;
2019-04-08 18:27:05 -04:00
void rename_marker ( ArdourMarker * marker ) ;
2017-03-04 13:21:56 -05:00
void toggle_tempo_clamped ( ) ;
2016-04-13 14:16:24 -04:00
void toggle_tempo_type ( ) ;
2017-02-26 11:03:55 -05:00
void ramp_to_next_tempo ( ) ;
2010-08-07 19:31:07 -04:00
void toggle_marker_menu_lock ( ) ;
2010-08-09 12:40:31 -04:00
void toggle_marker_menu_glue ( ) ;
2005-09-25 14:42:24 -04:00
void marker_menu_hide ( ) ;
2017-11-22 18:10:36 -05:00
void marker_menu_set_origin ( ) ;
2005-09-25 14:42:24 -04:00
void marker_menu_loop_range ( ) ;
2006-02-15 07:15:29 -05:00
void marker_menu_select_all_selectables_using_range ( ) ;
2007-03-18 02:07:08 -04:00
void marker_menu_select_using_range ( ) ;
2006-03-31 19:21:25 -05:00
void marker_menu_separate_regions_using_location ( ) ;
2005-09-25 14:42:24 -04:00
void marker_menu_play_from ( ) ;
2007-01-09 18:24:54 -05:00
void marker_menu_play_range ( ) ;
2005-09-25 14:42:24 -04:00
void marker_menu_set_playhead ( ) ;
void marker_menu_set_from_playhead ( ) ;
2013-01-09 16:47:10 -05:00
void marker_menu_set_from_selection ( bool force_regions ) ;
2008-09-10 11:03:30 -04:00
void marker_menu_range_to_next ( ) ;
2012-03-22 12:41:44 -04:00
void marker_menu_zoom_to_range ( ) ;
2005-09-25 14:42:24 -04:00
void new_transport_marker_menu_set_loop ( ) ;
void new_transport_marker_menu_set_punch ( ) ;
2014-01-27 21:27:13 -05:00
void update_loop_range_view ( ) ;
void update_punch_range_view ( ) ;
2011-05-25 21:29:59 -04:00
void new_transport_marker_menu_popdown ( ) ;
2005-11-14 11:24:21 -05:00
void marker_context_menu ( GdkEventButton * , ArdourCanvas : : Item * ) ;
2010-05-02 19:14:43 -04:00
void tempo_or_meter_marker_context_menu ( GdkEventButton * , ArdourCanvas : : Item * ) ;
2005-11-14 11:24:21 -05:00
void new_transport_marker_context_menu ( GdkEventButton * , ArdourCanvas : : Item * ) ;
2019-04-08 18:27:05 -04:00
void build_range_marker_menu ( ARDOUR : : Location * , bool , bool ) ;
void build_marker_menu ( ARDOUR : : Location * ) ;
void build_tempo_marker_menu ( TempoMarker * , bool ) ;
void build_meter_marker_menu ( MeterMarker * , bool ) ;
2005-09-25 14:42:24 -04:00
void build_new_transport_marker_menu ( ) ;
2019-03-07 15:24:15 -05:00
2010-05-02 19:14:43 -04:00
void dynamic_cast_marker_object ( void * , MeterMarker * * , TempoMarker * * ) const ;
2005-09-25 14:42:24 -04:00
2016-04-13 14:16:24 -04:00
Gtk : : Menu * tempo_marker_menu ;
Gtk : : Menu * meter_marker_menu ;
2005-09-25 14:42:24 -04:00
Gtk : : Menu * marker_menu ;
2006-03-31 19:21:25 -05:00
Gtk : : Menu * range_marker_menu ;
2005-09-25 14:42:24 -04:00
Gtk : : Menu * new_transport_marker_menu ;
2005-11-14 11:24:21 -05:00
ArdourCanvas : : Item * marker_menu_item ;
2005-09-25 14:42:24 -04:00
2022-01-18 21:45:18 -05:00
typedef std : : list < MetricMarker * > Marks ;
Marks tempo_marks ;
Marks meter_marks ;
Marks bbt_marks ;
2016-05-07 13:03:12 -04:00
2005-09-25 14:42:24 -04:00
void remove_metric_marks ( ) ;
2020-11-25 13:01:09 -05:00
void draw_metric_marks ( Temporal : : TempoMap : : Metrics const & metrics ) ;
2022-01-18 21:45:18 -05:00
void draw_tempo_marks ( ) ;
void draw_meter_marks ( ) ;
void draw_bbt_marks ( ) ;
2005-09-25 14:42:24 -04:00
2020-11-16 13:19:22 -05:00
void compute_current_bbt_points ( Temporal : : TempoMapPoints & grid , samplepos_t left , samplepos_t right ) ;
2012-11-27 17:48:59 -05:00
2021-04-04 19:56:58 -04:00
void reassociate_metric_markers ( Temporal : : TempoMap : : SharedPtr const & ) ;
2022-01-18 21:45:18 -05:00
void reassociate_metric_marker ( Temporal : : TempoMap : : SharedPtr const & tmap , Temporal : : TempoMap : : Metrics & metric , MetricMarker & marker ) ;
void make_bbt_marker ( Temporal : : MusicTimePoint const * ) ;
void make_meter_marker ( Temporal : : MeterPoint const * ) ;
void make_tempo_marker ( Temporal : : TempoPoint const * ts , double & min_tempo , double & max_tempo , Temporal : : TempoPoint const * & prev_ts , uint32_t tc_color , samplecnt_t sr ) ;
void update_tempo_curves ( double min_tempo , double max_tempo , samplecnt_t sr ) ;
2020-11-16 13:19:22 -05:00
void tempo_map_changed ( ) ;
2018-02-09 10:59:39 -05:00
void redisplay_grid ( bool immediate_redraw ) ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
/* toolbar */
2008-10-03 14:24:38 -04:00
2007-06-15 03:39:20 -04:00
Gtk : : ToggleButton editor_mixer_button ;
Gtk : : ToggleButton editor_list_button ;
2005-09-25 14:42:24 -04:00
void editor_mixer_button_toggled ( ) ;
2007-06-15 03:39:20 -04:00
void editor_list_button_toggled ( ) ;
2005-09-25 14:42:24 -04:00
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourButton zoom_in_button ;
ArdourWidgets : : ArdourButton zoom_out_button ;
ArdourWidgets : : ArdourButton zoom_out_full_button ;
2012-12-06 15:48:44 -05:00
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourButton tav_expand_button ;
ArdourWidgets : : ArdourButton tav_shrink_button ;
ArdourWidgets : : ArdourDropdown visible_tracks_selector ;
ArdourWidgets : : ArdourDropdown zoom_preset_selector ;
2014-03-26 12:37:09 -04:00
2015-02-03 14:33:22 -05:00
int32_t _visible_track_count ;
void build_track_count_menu ( ) ;
void set_visible_track_count ( int32_t ) ;
void set_zoom_preset ( int64_t ) ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
Gtk : : VBox toolbar_clock_vbox ;
2009-10-14 12:10:01 -04:00
Gtk : : VBox toolbar_selection_clock_vbox ;
2005-09-25 14:42:24 -04:00
Gtk : : Table toolbar_selection_clock_table ;
Gtk : : Label toolbar_selection_cursor_label ;
2009-10-14 12:10:01 -04:00
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourButton mouse_select_button ;
ArdourWidgets : : ArdourButton mouse_draw_button ;
ArdourWidgets : : ArdourButton mouse_move_button ;
ArdourWidgets : : ArdourButton mouse_timefx_button ;
ArdourWidgets : : ArdourButton mouse_content_button ;
ArdourWidgets : : ArdourButton mouse_audition_button ;
ArdourWidgets : : ArdourButton mouse_cut_button ;
2012-02-03 13:31:10 -05:00
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourButton smart_mode_button ;
2012-02-03 13:31:10 -05:00
Glib : : RefPtr < Gtk : : ToggleAction > smart_mode_action ;
2009-07-28 16:51:28 -04:00
2005-09-25 14:42:24 -04:00
void mouse_mode_toggled ( Editing : : MouseMode m ) ;
2012-11-26 17:43:10 -05:00
void mouse_mode_object_range_toggled ( ) ;
2005-09-25 14:42:24 -04:00
bool ignore_mouse_mode_toggle ;
2011-04-19 06:43:43 -04:00
bool mouse_select_button_release ( GdkEventButton * ) ;
2005-09-25 14:42:24 -04:00
2018-12-10 08:33:31 -05:00
Glib : : RefPtr < Gtk : : Action > get_mouse_mode_action ( Editing : : MouseMode m ) const ;
2005-09-25 14:42:24 -04:00
Gtk : : VBox automation_box ;
Gtk : : Button automation_mode_button ;
2014-03-23 19:11:42 -04:00
//edit mode menu stuff
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourDropdown edit_mode_selector ;
void edit_mode_selection_done ( ARDOUR : : EditMode ) ;
2014-03-23 19:11:42 -04:00
void build_edit_mode_menu ( ) ;
2017-07-15 11:38:28 -04:00
Gtk : : VBox edit_mode_box ;
2005-09-25 14:42:24 -04:00
2008-01-10 16:20:59 -05:00
void set_edit_mode ( ARDOUR : : EditMode ) ;
void cycle_edit_mode ( ) ;
2005-09-25 14:42:24 -04:00
2018-02-09 10:59:39 -05:00
ArdourWidgets : : ArdourDropdown grid_type_selector ;
void build_grid_type_menu ( ) ;
2021-11-16 13:06:13 -05:00
ArdourWidgets : : ArdourDropdown draw_length_selector ;
ArdourWidgets : : ArdourDropdown draw_velocity_selector ;
ArdourWidgets : : ArdourDropdown draw_channel_selector ;
2018-02-09 10:59:39 -05:00
ArdourWidgets : : ArdourButton snap_mode_button ;
2019-04-08 18:27:05 -04:00
bool snap_mode_button_clicked ( GdkEventButton * ) ;
2014-03-23 19:11:42 -04:00
2017-07-15 11:38:28 -04:00
Gtk : : HBox snap_box ;
2021-11-15 18:36:05 -05:00
Gtk : : HBox draw_box ;
2005-09-25 14:42:24 -04:00
2018-02-19 09:05:55 -05:00
Gtk : : HBox ebox_hpacker ;
Gtk : : VBox ebox_vpacker ;
2018-02-09 10:59:39 -05:00
Gtk : : HBox _box ;
std : : vector < std : : string > grid_type_strings ;
2006-11-19 11:45:16 -05:00
std : : vector < std : : string > snap_mode_strings ;
2018-02-09 10:59:39 -05:00
void grid_type_selection_done ( Editing : : GridType ) ;
2014-03-23 19:11:42 -04:00
void snap_mode_selection_done ( Editing : : SnapMode ) ;
2006-11-19 11:45:16 -05:00
void snap_mode_chosen ( Editing : : SnapMode ) ;
2018-02-09 10:59:39 -05:00
void grid_type_chosen ( Editing : : GridType ) ;
2021-11-16 13:06:13 -05:00
void draw_length_selection_done ( Editing : : GridType ) ;
2021-11-15 18:36:05 -05:00
void draw_length_chosen ( Editing : : GridType ) ;
2006-11-19 11:45:16 -05:00
2021-11-16 13:06:13 -05:00
void draw_velocity_selection_done ( int ) ;
void draw_velocity_chosen ( int ) ;
void draw_channel_selection_done ( int ) ;
void draw_channel_chosen ( int ) ;
2018-02-09 10:59:39 -05:00
Glib : : RefPtr < Gtk : : RadioAction > grid_type_action ( Editing : : GridType ) ;
2006-11-19 11:45:16 -05:00
Glib : : RefPtr < Gtk : : RadioAction > snap_mode_action ( Editing : : SnapMode ) ;
2021-11-16 13:06:13 -05:00
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 ) ;
2014-03-23 19:11:42 -04:00
//zoom focus meu stuff
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourDropdown zoom_focus_selector ;
void zoom_focus_selection_done ( Editing : : ZoomFocus ) ;
2014-03-23 19:11:42 -04:00
void build_zoom_focus_menu ( ) ;
2006-11-19 11:45:16 -05:00
std : : vector < std : : string > zoom_focus_strings ;
2009-10-14 12:10:01 -04:00
2006-11-19 11:45:16 -05:00
void zoom_focus_chosen ( Editing : : ZoomFocus ) ;
Glib : : RefPtr < Gtk : : RadioAction > zoom_focus_action ( Editing : : ZoomFocus ) ;
2005-09-25 14:42:24 -04:00
2017-07-15 11:38:28 -04:00
Gtk : : HBox _track_box ;
2016-12-18 14:29:19 -05:00
2017-07-15 11:38:28 -04:00
Gtk : : HBox _zoom_box ;
void zoom_adjustment_changed ( ) ;
2005-09-25 14:42:24 -04:00
void setup_toolbar ( ) ;
2010-02-08 19:50:24 -05:00
void setup_tooltips ( ) ;
2017-07-15 11:38:28 -04:00
Gtk : : HBox toolbar_hbox ;
2011-05-25 21:29:59 -04:00
2007-08-08 15:13:36 -04:00
void setup_midi_toolbar ( ) ;
2005-09-25 14:42:24 -04:00
/* selection process */
Selection * selection ;
Selection * cut_buffer ;
2014-12-14 08:13:38 -05:00
SelectionMemento * _selection_memento ;
2005-09-25 14:42:24 -04:00
void time_selection_changed ( ) ;
2018-02-11 10:39:45 -05:00
void track_selection_changed ( ) ;
2015-02-03 14:33:22 -05:00
void update_time_selection_display ( ) ;
2017-05-05 07:31:49 -04:00
void presentation_info_changed ( PBD : : PropertyChange const & ) ;
2005-09-25 14:42:24 -04:00
void region_selection_changed ( ) ;
2020-04-16 14:16:45 -04:00
void catch_up_on_midi_selection ( ) ;
2009-01-18 05:41:56 -05:00
sigc : : connection editor_regions_selection_changed_connection ;
2010-11-03 18:19:29 -04:00
void sensitize_all_region_actions ( bool ) ;
2017-02-15 13:50:51 -05:00
void sensitize_the_right_region_actions ( bool because_canvas_crossing ) ;
2010-11-03 18:19:29 -04:00
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
* block ) when setting a ToggleAction ' s active state .
*/
bool _ignore_region_action ;
2010-11-03 22:05:08 -04:00
bool _last_region_menu_was_main ;
2005-09-25 14:42:24 -04:00
void point_selection_changed ( ) ;
2007-11-12 17:23:01 -05:00
void marker_selection_changed ( ) ;
2005-09-25 14:42:24 -04:00
2017-02-17 19:25:13 -05:00
bool _track_selection_change_without_scroll ;
2017-10-21 11:27:03 -04:00
bool _editor_track_selection_change_without_scroll ;
2017-02-17 19:25:13 -05:00
2005-09-25 14:42:24 -04:00
void cancel_selection ( ) ;
2012-11-20 14:43:43 -05:00
void cancel_time_selection ( ) ;
bool get_smart_mode ( ) const ;
2005-09-25 14:42:24 -04:00
2017-09-18 12:39:17 -04:00
bool audio_region_selection_covers ( samplepos_t where ) ;
2005-09-25 14:42:24 -04:00
2021-01-05 15:58:28 -05:00
/* playhead and edit cursor */
EditorCursor * _playhead_cursor ;
EditorCursor * _snapped_cursor ;
2005-09-25 14:42:24 -04:00
/* transport range select process */
2017-07-15 11:38:28 -04:00
ArdourCanvas : : Rectangle * cd_marker_bar_drag_rect ;
2022-01-04 17:22:13 -05:00
ArdourCanvas : : Rectangle * cue_marker_bar_drag_rect ;
2017-07-15 11:38:28 -04:00
ArdourCanvas : : Rectangle * range_bar_drag_rect ;
ArdourCanvas : : Rectangle * transport_bar_drag_rect ;
ArdourCanvas : : Rectangle * transport_bar_range_rect ;
ArdourCanvas : : Rectangle * transport_bar_preroll_rect ;
ArdourCanvas : : Rectangle * transport_bar_postroll_rect ;
ArdourCanvas : : Rectangle * transport_loop_range_rect ;
ArdourCanvas : : Rectangle * transport_punch_range_rect ;
ArdourCanvas : : Line * transport_punchin_line ;
ArdourCanvas : : Line * transport_punchout_line ;
ArdourCanvas : : Rectangle * transport_preroll_rect ;
ArdourCanvas : : Rectangle * transport_postroll_rect ;
2005-09-25 14:42:24 -04:00
2017-07-15 11:38:28 -04:00
ARDOUR : : Location * transport_loop_location ( ) ;
ARDOUR : : Location * transport_punch_location ( ) ;
2005-09-25 14:42:24 -04:00
2017-07-15 11:38:28 -04:00
ARDOUR : : Location * temp_location ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
/* object rubberband select process */
2009-10-14 12:10:01 -04:00
2020-09-26 11:14:59 -04:00
void select_all_within ( Temporal : : timepos_t const & , Temporal : : timepos_t const & , double , double , TrackViewList const & , Selection : : Operation , bool ) ;
2009-10-14 12:10:01 -04:00
2017-07-15 11:38:28 -04:00
ArdourCanvas : : Rectangle * rubberband_rect ;
2009-10-14 12:10:01 -04:00
2009-07-03 14:37:15 -04:00
EditorRouteGroups * _route_groups ;
2017-07-15 11:38:28 -04:00
EditorRoutes * _routes ;
EditorRegions * _regions ;
2018-11-15 10:21:55 -05:00
EditorSources * _sources ;
2017-07-15 11:38:28 -04:00
EditorSnapshots * _snapshots ;
EditorLocations * _locations ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
/* diskstream/route display management */
2009-06-17 21:48:11 -04:00
Glib : : RefPtr < Gdk : : Pixbuf > rec_enabled_icon ;
Glib : : RefPtr < Gdk : : Pixbuf > rec_disabled_icon ;
2005-09-25 14:42:24 -04:00
2005-10-26 14:12:00 -04:00
Glib : : RefPtr < Gtk : : TreeSelection > route_display_selection ;
2009-07-03 14:37:15 -04:00
bool sync_track_view_list_and_routes ( ) ;
2005-09-25 14:42:24 -04:00
2017-07-15 11:38:28 -04:00
Gtk : : VBox list_vpacker ;
2005-09-25 14:42:24 -04:00
/* autoscrolling */
2015-02-03 14:33:22 -05:00
sigc : : connection autoscroll_connection ;
bool autoscroll_horizontal_allowed ;
bool autoscroll_vertical_allowed ;
uint32_t autoscroll_cnt ;
Gtk : : Widget * autoscroll_widget ;
ArdourCanvas : : Rect autoscroll_boundary ;
2011-11-20 14:38:37 -05:00
2006-09-18 23:29:16 -04:00
bool autoscroll_canvas ( ) ;
2015-02-03 14:33:22 -05:00
void start_canvas_autoscroll ( bool allow_horiz , bool allow_vert , const ArdourCanvas : : Rect & boundary ) ;
2005-09-25 14:42:24 -04:00
void stop_canvas_autoscroll ( ) ;
/* trimming */
2020-10-15 01:09:22 -04:00
void point_trim ( GdkEvent * , Temporal : : timepos_t const & ) ;
2008-01-10 16:20:59 -05:00
void trim_region_front ( ) ;
void trim_region_back ( ) ;
void trim_region ( bool front ) ;
2007-11-12 17:23:01 -05:00
void trim_region_to_loop ( ) ;
void trim_region_to_punch ( ) ;
void trim_region_to_location ( const ARDOUR : : Location & , const char * cmd ) ;
2005-09-25 14:42:24 -04:00
2009-04-20 17:02:46 -04:00
void trim_to_region ( bool forward ) ;
void trim_region_to_previous_region_end ( ) ;
void trim_region_to_next_region_start ( ) ;
2005-09-25 14:42:24 -04:00
bool show_gain_after_trim ;
/* Drag-n-Drop */
2009-02-26 20:20:25 -05:00
void track_canvas_drag_data_received (
2015-02-03 14:33:22 -05:00
const Glib : : RefPtr < Gdk : : DragContext > & context ,
gint x ,
gint y ,
const Gtk : : SelectionData & data ,
guint info ,
guint time ) ;
2011-05-25 21:29:59 -04:00
2009-02-26 20:20:25 -05:00
void drop_paths (
2015-02-03 14:33:22 -05:00
const Glib : : RefPtr < Gdk : : DragContext > & context ,
gint x ,
gint y ,
const Gtk : : SelectionData & data ,
guint info ,
guint time ) ;
2011-05-25 21:29:59 -04:00
2009-02-26 20:20:25 -05:00
void drop_regions (
2015-02-03 14:33:22 -05:00
const Glib : : RefPtr < Gdk : : DragContext > & context ,
gint x ,
gint y ,
const Gtk : : SelectionData & data ,
guint info ,
2022-01-18 00:52:57 -05:00
guint time ) ;
2011-05-25 21:29:59 -04:00
2005-09-25 14:42:24 -04:00
/* audio export */
2021-12-23 16:33:54 -05:00
enum BounceTarget {
NewSource ,
NewTrigger ,
ReplaceRange
} ;
2006-07-23 08:03:19 -04:00
int write_region_selection ( RegionSelection & ) ;
2009-05-12 13:03:42 -04:00
bool write_region ( std : : string path , boost : : shared_ptr < ARDOUR : : AudioRegion > ) ;
2011-05-26 21:04:56 -04:00
void bounce_region_selection ( bool with_processing ) ;
2021-12-23 16:33:54 -05:00
void bounce_range_selection ( BounceTarget , bool enable_processing ) ;
2005-09-25 14:42:24 -04:00
void external_edit_region ( ) ;
int write_audio_selection ( TimeSelection & ) ;
2020-09-26 11:14:59 -04:00
bool write_audio_range ( ARDOUR : : AudioPlaylist & , const ARDOUR : : ChanCount & channels , std : : list < ARDOUR : : TimelineRange > & ) ;
2005-09-25 14:42:24 -04:00
void write_selection ( ) ;
2014-12-22 08:30:23 -05:00
uint32_t selection_op_cmd_depth ;
uint32_t selection_op_history_it ;
2019-04-08 18:27:05 -04:00
std : : list < XMLNode * > selection_op_history ; /* used in *_reversible_selection_op */
std : : list < XMLNode * > before ; /* used in *_reversible_command */
2006-08-12 04:20:24 -04:00
2009-10-14 12:10:01 -04:00
void update_title ( ) ;
2009-05-12 13:03:42 -04:00
void update_title_s ( const std : : string & snapshot_name ) ;
2005-09-25 14:42:24 -04:00
void instant_save ( ) ;
2016-05-18 14:06:20 -04:00
bool no_save_instant ;
2005-09-25 14:42:24 -04:00
2006-08-29 17:21:48 -04:00
boost : : shared_ptr < ARDOUR : : AudioRegion > last_audition_region ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
/* freeze operations */
ARDOUR : : InterThreadInfo freeze_status ;
static void * _freeze_thread ( void * ) ;
void * freeze_thread ( ) ;
2008-01-12 18:45:50 -05:00
void freeze_route ( ) ;
void unfreeze_route ( ) ;
2005-09-25 14:42:24 -04:00
/* duplication */
2012-07-04 17:31:06 -04:00
void duplicate_range ( bool with_dialog ) ;
2016-09-22 17:27:01 -04:00
void duplicate_regions ( float times ) ;
2009-10-14 12:10:01 -04:00
2017-09-18 12:39:17 -04:00
/** computes the timeline sample (sample) of an event whose coordinates
2013-04-12 11:09:49 -04:00
* are in canvas units ( pixels , scroll offset included ) .
*/
2019-04-08 18:27:05 -04:00
samplepos_t canvas_event_sample ( GdkEvent const * , double * px = 0 , double * py = 0 ) const ;
2013-04-12 11:09:49 -04:00
2021-01-18 22:13:13 -05:00
/** 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 ( )
* at the time of calling .
*/
Temporal : : timepos_t canvas_event_time ( GdkEvent const * , double * px = 0 , double * py = 0 ) const ;
2017-09-18 12:39:17 -04:00
/** computes the timeline sample (sample) of an event whose coordinates
2013-04-12 11:09:49 -04:00
* are in window units ( pixels , no scroll offset ) .
*/
2019-04-08 18:27:05 -04:00
samplepos_t window_event_sample ( GdkEvent const * , double * px = 0 , double * py = 0 ) const ;
2007-11-07 20:40:25 -05:00
/* returns false if mouse pointer is not in track or marker canvas
*/
2017-09-18 12:39:17 -04:00
bool mouse_sample ( samplepos_t & , bool & in_track_canvas ) const ;
2005-09-25 14:42:24 -04:00
2008-01-10 16:20:59 -05:00
TimeFXDialog * current_timefx ;
2019-04-08 18:27:05 -04:00
static void * timefx_thread ( void * arg ) ;
2012-01-31 16:24:23 -05:00
void do_timefx ( ) ;
2008-01-10 16:20:59 -05:00
2020-12-27 19:47:08 -05:00
int time_stretch ( RegionSelection & , Temporal : : ratio_t const & fraction ) ;
2008-01-10 16:20:59 -05:00
int pitch_shift ( RegionSelection & , float cents ) ;
2010-11-03 18:19:29 -04:00
void pitch_shift_region ( ) ;
2005-09-25 14:42:24 -04:00
/* editor-mixer strip */
MixerStrip * current_mixer_strip ;
2006-11-19 11:45:16 -05:00
bool show_editor_mixer_when_tracks_arrive ;
2005-09-25 14:42:24 -04:00
Gtk : : VBox current_mixer_strip_vbox ;
2007-11-04 18:18:15 -05:00
void cms_new ( boost : : shared_ptr < ARDOUR : : Route > ) ;
2005-09-25 14:42:24 -04:00
void current_mixer_strip_hidden ( ) ;
2015-10-27 13:43:31 -04:00
# ifdef __APPLE__
2008-12-12 09:43:24 -05:00
void ensure_all_elements_drawn ( ) ;
# endif
2005-09-25 14:42:24 -04:00
/* nudging tracks */
2008-01-12 18:45:50 -05:00
void nudge_track ( bool use_edit_point , bool forwards ) ;
2005-09-25 14:42:24 -04:00
static const int32_t default_width = 995 ;
static const int32_t default_height = 765 ;
/* nudge */
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourButton nudge_forward_button ;
ArdourWidgets : : ArdourButton nudge_backward_button ;
2005-09-25 14:42:24 -04:00
Gtk : : HBox nudge_hbox ;
Gtk : : VBox nudge_vbox ;
2011-06-02 13:50:37 -04:00
AudioClock * nudge_clock ;
2005-09-25 14:42:24 -04:00
2008-01-18 22:49:52 -05:00
bool nudge_forward_release ( GdkEventButton * ) ;
bool nudge_backward_release ( GdkEventButton * ) ;
2009-10-14 12:10:01 -04:00
2005-09-25 14:42:24 -04:00
/* audio filters */
2010-09-19 20:58:25 -04:00
void apply_filter ( ARDOUR : : Filter & , std : : string cmd , ProgressReporter * progress = 0 ) ;
2005-09-25 14:42:24 -04:00
2009-09-07 12:53:53 -04:00
Command * apply_midi_note_edit_op_to_region ( ARDOUR : : MidiOperator & op , MidiRegionView & mrv ) ;
2014-12-25 15:32:10 -05:00
void apply_midi_note_edit_op ( ARDOUR : : MidiOperator & op , const RegionSelection & rs ) ;
2009-08-26 23:09:30 -04:00
2005-09-25 14:42:24 -04:00
/* handling cleanup */
2007-01-09 18:24:54 -05:00
int playlist_deletion_dialog ( boost : : shared_ptr < ARDOUR : : Playlist > ) ;
2005-09-25 14:42:24 -04:00
2009-12-17 13:24:23 -05:00
PBD : : ScopedConnectionList session_connections ;
2021-01-01 18:00:07 -05:00
PBD : : ScopedConnection tempo_map_connection ;
2005-09-25 14:42:24 -04:00
/* tracking step changes of track height */
2009-07-09 13:58:13 -04:00
TimeAxisView * current_stepping_trackview ;
2021-06-27 11:32:30 -04:00
PBD : : microseconds_t last_track_height_step_timestamp ;
2005-09-25 14:42:24 -04:00
gint track_height_step_timeout ( ) ;
2005-09-25 16:33:00 -04:00
sigc : : connection step_timeout ;
2005-09-25 14:42:24 -04:00
2009-07-09 13:58:13 -04:00
TimeAxisView * entered_track ;
2010-07-04 21:55:07 -04:00
/** If the mouse is over a RegionView or one of its child canvas items, this is set up
to point to the RegionView . Otherwise it is 0.
*/
2006-07-23 08:03:19 -04:00
RegionView * entered_regionview ;
2008-01-10 17:22:29 -05:00
2014-12-23 13:46:53 -05:00
std : : vector < EnterContext > _enter_stack ;
2014-12-20 01:11:28 -05:00
2005-09-25 14:42:24 -04:00
bool clear_entered_track ;
2008-04-11 10:06:50 -04:00
bool left_track_canvas ( GdkEventCrossing * ) ;
bool entered_track_canvas ( GdkEventCrossing * ) ;
2009-07-09 13:58:13 -04:00
void set_entered_track ( TimeAxisView * ) ;
2006-07-23 08:03:19 -04:00
void set_entered_regionview ( RegionView * ) ;
2005-09-25 14:42:24 -04:00
gint left_automation_track ( ) ;
2008-04-11 10:06:50 -04:00
void reset_canvas_action_sensitivity ( bool ) ;
2012-05-29 14:30:10 -04:00
void set_gain_envelope_visibility ( ) ;
void set_region_gain_visibility ( RegionView * ) ;
2007-10-11 18:07:47 -04:00
void toggle_gain_envelope_active ( ) ;
2006-11-19 11:45:16 -05:00
void reset_region_gain_envelopes ( ) ;
2009-05-12 13:03:42 -04:00
void session_state_saved ( std : : string ) ;
2006-11-19 11:45:16 -05:00
Glib : : RefPtr < Gtk : : Action > undo_action ;
Glib : : RefPtr < Gtk : : Action > redo_action ;
2014-12-22 12:52:29 -05:00
Glib : : RefPtr < Gtk : : Action > alternate_redo_action ;
Glib : : RefPtr < Gtk : : Action > alternate_alternate_redo_action ;
2014-12-22 08:30:23 -05:00
Glib : : RefPtr < Gtk : : Action > selection_undo_action ;
Glib : : RefPtr < Gtk : : Action > selection_redo_action ;
2006-11-19 11:45:16 -05:00
void history_changed ( ) ;
2007-10-11 18:07:47 -04:00
2007-11-07 20:40:25 -05:00
Editing : : EditPoint _edit_point ;
2017-07-15 11:38:28 -04:00
ArdourWidgets : : ArdourDropdown edit_point_selector ;
2014-03-23 19:11:42 -04:00
void build_edit_point_menu ( ) ;
2007-11-07 20:40:25 -05:00
2008-03-17 16:54:03 -04:00
void set_edit_point_preference ( Editing : : EditPoint ep , bool force = false ) ;
2008-01-10 16:20:59 -05:00
void cycle_edit_point ( bool with_marker ) ;
2007-11-12 17:23:01 -05:00
void set_edit_point ( ) ;
2014-03-23 19:11:42 -04:00
void edit_point_selection_done ( Editing : : EditPoint ) ;
2007-11-07 20:40:25 -05:00
void edit_point_chosen ( Editing : : EditPoint ) ;
Glib : : RefPtr < Gtk : : RadioAction > edit_point_action ( Editing : : EditPoint ) ;
std : : vector < std : : string > edit_point_strings ;
2014-07-09 16:48:19 -04:00
std : : vector < std : : string > edit_mode_strings ;
2007-11-12 17:23:01 -05:00
void selected_marker_moved ( ARDOUR : : Location * ) ;
2020-10-19 14:37:54 -04:00
bool get_edit_op_range ( Temporal : : timepos_t & start , Temporal : : timepos_t & end ) const ;
2007-11-12 17:23:01 -05:00
2020-09-29 19:53:43 -04:00
void get_regions_at ( RegionSelection & , Temporal : : timepos_t const & where , const TrackViewList & ts ) const ;
void get_regions_after ( RegionSelection & , Temporal : : timepos_t const & where , const TrackViewList & ts ) const ;
2009-10-14 12:10:01 -04:00
2017-02-10 16:12:28 -05:00
RegionSelection get_regions_from_selection_and_edit_point ( Editing : : EditIgnoreOption = Editing : : EDIT_IGNORE_NONE ,
bool use_context_click = false ,
bool from_outside_canvas = false ) ;
2016-04-08 18:33:03 -04:00
RegionSelection get_regions_from_selection_and_entered ( ) const ;
2011-05-25 21:29:59 -04:00
2010-02-07 20:25:06 -05:00
void start_updating_meters ( ) ;
void stop_updating_meters ( ) ;
2007-12-20 18:25:19 -05:00
bool meters_running ;
2008-01-10 16:20:59 -05:00
2017-08-06 12:37:15 -04:00
void select_next_stripable ( bool routes_only = true ) ;
void select_prev_stripable ( bool routes_only = true ) ;
2008-02-01 22:57:35 -05:00
2020-10-01 12:32:06 -04:00
Temporal : : timepos_t snap_to_minsec ( Temporal : : timepos_t const & start ,
Temporal : : RoundMode direction ,
2018-07-26 18:25:01 -04:00
ARDOUR : : SnapPref gpref ) ;
2018-07-26 15:23:59 -04:00
2020-10-01 12:32:06 -04:00
Temporal : : timepos_t snap_to_cd_frames ( Temporal : : timepos_t const & start ,
Temporal : : RoundMode direction ,
2018-07-26 18:25:01 -04:00
ARDOUR : : SnapPref gpref ) ;
2018-07-26 15:23:59 -04:00
2020-10-01 12:32:06 -04:00
Temporal : : timepos_t snap_to_timecode ( Temporal : : timepos_t const & start ,
Temporal : : RoundMode direction ,
2018-07-26 18:25:01 -04:00
ARDOUR : : SnapPref gpref ) ;
2018-07-26 15:23:59 -04:00
2020-10-01 12:32:06 -04:00
Temporal : : timepos_t snap_to_grid ( Temporal : : timepos_t const & start ,
Temporal : : RoundMode direction ,
2018-07-26 18:25:01 -04:00
ARDOUR : : SnapPref gpref ) ;
2018-02-09 10:59:39 -05:00
2020-10-01 12:32:06 -04:00
void snap_to_internal ( Temporal : : timepos_t & first ,
Temporal : : RoundMode direction = Temporal : : RoundNearest ,
ARDOUR : : SnapPref gpref = ARDOUR : : SnapToAny_Visual ,
bool ensure_snap = false ) ;
2020-09-26 11:14:59 -04:00
void timecode_snap_to_internal ( Temporal : : timepos_t & first ,
Temporal : : RoundMode direction = Temporal : : RoundNearest ,
bool for_mark = false ) ;
2014-11-16 01:05:21 -05:00
2020-10-01 12:32:06 -04:00
Temporal : : timepos_t snap_to_marker ( Temporal : : timepos_t const & presnap ,
Temporal : : RoundMode direction = Temporal : : RoundNearest ) ;
2008-02-19 17:10:27 -05:00
2008-02-01 22:57:35 -05:00
RhythmFerret * rhythm_ferret ;
2008-03-17 16:54:03 -04:00
2009-12-13 14:09:52 -05:00
void fit_tracks ( TrackViewList & ) ;
2015-01-11 12:46:36 -05:00
void fit_selection ( ) ;
2010-05-10 20:09:41 -04:00
void set_track_height ( Height ) ;
2008-03-17 16:54:03 -04:00
2015-04-06 17:56:18 -04:00
void _remove_tracks ( ) ;
bool idle_remove_tracks ( ) ;
2008-03-17 16:54:03 -04:00
void toggle_tracks_active ( ) ;
bool _have_idled ;
2008-09-10 11:03:30 -04:00
int resize_idle_id ;
2010-03-18 22:49:01 -04:00
static gboolean _idle_resize ( gpointer ) ;
2008-09-10 11:03:30 -04:00
bool idle_resize ( ) ;
2009-06-17 18:43:27 -04:00
int32_t _pending_resize_amount ;
2009-07-09 13:58:13 -04:00
TimeAxisView * _pending_resize_view ;
2009-01-05 22:18:09 -05:00
void visible_order_range ( int * , int * ) const ;
2009-02-16 19:12:22 -05:00
void located ( ) ;
2011-05-25 21:29:59 -04:00
2010-02-07 20:25:06 -05:00
/** true if we've made a locate request that hasn't yet been processed */
2009-02-16 19:12:22 -05:00
bool _pending_locate_request ;
2011-05-25 21:29:59 -04:00
2010-02-07 20:25:06 -05:00
/** if true, there is a pending Session locate which is the initial one when loading a session;
we need to know this so that we don ' t ( necessarily ) set the viewport to show the playhead
initially .
*/
bool _pending_initial_locate ;
2009-05-30 14:25:59 -04:00
2009-12-21 20:13:06 -05:00
Gtk : : HBox _summary_hbox ;
2009-06-10 21:05:01 -04:00
EditorSummary * _summary ;
2011-01-19 13:35:11 -05:00
2019-04-08 18:27:05 -04:00
void region_view_added ( RegionView * ) ;
2011-01-30 08:24:41 -05:00
void region_view_removed ( ) ;
2009-06-10 21:05:01 -04:00
2009-06-20 09:41:55 -04:00
EditorGroupTabs * _group_tabs ;
2019-04-08 18:27:05 -04:00
void fit_route_group ( ARDOUR : : RouteGroup * ) ;
2009-06-21 15:59:56 -04:00
2011-05-25 21:29:59 -04:00
void step_edit_status_change ( bool ) ;
2009-09-05 10:11:48 -04:00
void start_step_editing ( ) ;
void stop_step_editing ( ) ;
bool check_step_edit ( ) ;
sigc : : connection step_edit_connection ;
2010-08-18 14:06:31 -04:00
double _last_motion_y ;
2011-05-25 21:29:59 -04:00
RegionLayeringOrderEditor * layering_order_editor ;
void update_region_layering_order_editor ( ) ;
2010-08-25 15:28:33 -04:00
2010-09-01 21:06:19 -04:00
/** Track that was the source for the last cut/copy operation. Used as a place
to paste things iff there is no selected track .
*/
TimeAxisView * _last_cut_copy_source_track ;
2010-09-28 13:27:58 -04:00
/** true if a change in Selection->regions should change the selection in the region list.
See EditorRegions : : selection_changed .
2010-09-18 19:31:39 -04:00
*/
2010-09-28 13:27:58 -04:00
bool _region_selection_change_updates_region_list ;
2010-09-18 19:31:39 -04:00
2010-09-18 23:31:03 -04:00
void setup_fade_images ( ) ;
2012-05-11 17:30:36 -04:00
std : : map < ARDOUR : : FadeShape , Gtk : : Image * > _xfade_in_images ;
std : : map < ARDOUR : : FadeShape , Gtk : : Image * > _xfade_out_images ;
2010-09-18 23:31:03 -04:00
2010-11-03 18:19:29 -04:00
Gtk : : MenuItem & action_menu_item ( std : : string const & ) ;
void action_pre_activated ( Glib : : RefPtr < Gtk : : Action > const & ) ;
2010-11-16 09:53:16 -05:00
MouseCursors * _cursors ;
2010-12-30 16:15:51 -05:00
2011-11-15 14:33:09 -05:00
void follow_mixer_selection ( ) ;
bool _following_mixer_selection ;
2021-02-08 13:45:37 -05:00
/* RTAV Automation display option */
void toggle_show_touched_automation ( ) ;
void set_show_touched_automation ( bool ) ;
bool _show_touched_automation ;
2021-03-19 19:23:41 -04:00
int time_fx ( ARDOUR : : RegionList & , Temporal : : ratio_t ratio , bool pitching ) ;
2015-02-03 14:33:22 -05:00
void note_edit_done ( int , EditNoteDialog * ) ;
2012-02-01 15:11:57 -05:00
void toggle_sound_midi_notes ( ) ;
2012-05-31 10:39:48 -04:00
/** Flag for a bit of a hack wrt control point selection; see set_selected_control_point_from_click */
bool _control_point_toggled_on_press ;
2012-06-17 12:57:21 -04:00
/** This is used by TimeAxisView to keep a track of the TimeAxisView that is currently being
2013-07-23 11:15:23 -04:00
stepped in height using ScrollZoomVerticalModifier + Scrollwheel . When a scroll event
occurs , we do the step on this _stepping_axis_view if it is non - 0 ( and we set up this
_stepping_axis_view with the TimeAxisView underneath the mouse if it is 0 ) . Then Editor
resets _stepping_axis_view when the modifier key is released . In this ( hacky ) way ,
pushing the modifier key and moving the scroll wheel will operate on the same track
until the key is released ( rather than skipping about to whatever happens to be
underneath the mouse at the time ) .
2012-06-17 12:57:21 -04:00
*/
TimeAxisView * _stepping_axis_view ;
2013-07-23 11:15:23 -04:00
void zoom_vertical_modifier_released ( ) ;
2012-06-17 12:57:21 -04:00
2014-07-08 00:53:06 -04:00
void bring_in_callback ( Gtk : : Label * , uint32_t n , uint32_t total , std : : string name ) ;
void update_bring_in_message ( Gtk : : Label * label , uint32_t n , uint32_t total , std : : string name ) ;
void bring_all_sources_into_session ( ) ;
2015-06-26 12:34:55 -04:00
QuantizeDialog * quantize_dialog ;
2015-05-06 12:10:41 -04:00
MainMenuDisabler * _main_menu_disabler ;
2015-10-05 10:17:49 -04:00
2020-04-16 14:11:10 -04:00
/* MIDI actions, proxied to selected MidiRegionView(s) */
void midi_action ( void ( MidiRegionView : : * method ) ( ) ) ;
2020-07-03 01:15:10 -04:00
std : : vector < MidiRegionView * > filter_to_unique_midi_region_views ( RegionSelection const & ms ) const ;
2020-04-16 14:11:10 -04:00
2017-02-14 10:09:32 -05:00
/* private helper functions to help with registering region actions */
2019-04-08 18:27:05 -04:00
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 ) ;
2015-08-01 23:40:55 -04:00
2019-04-08 18:27:05 -04:00
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 ) ;
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 ) ;
2015-08-01 23:40:55 -04:00
2021-07-04 11:36:28 -04:00
void remove_gap_marker_callback ( Temporal : : timepos_t at , Temporal : : timecnt_t distance ) ;
2021-05-28 19:43:25 -04:00
2009-05-30 14:25:59 -04:00
friend class Drag ;
2016-11-21 05:11:47 -05:00
friend class RegionCutDrag ;
2009-05-30 14:25:59 -04:00
friend class RegionDrag ;
friend class RegionMoveDrag ;
2021-07-16 16:12:00 -04:00
friend class RegionRippleDrag ;
2009-05-30 14:25:59 -04:00
friend class TrimDrag ;
2016-05-17 10:12:28 -04:00
friend class BBTRulerDrag ;
2009-05-30 14:25:59 -04:00
friend class MeterMarkerDrag ;
friend class TempoMarkerDrag ;
friend class CursorDrag ;
friend class FadeInDrag ;
friend class FadeOutDrag ;
friend class MarkerDrag ;
friend class RegionGainDrag ;
friend class ControlPointDrag ;
friend class LineDrag ;
friend class RubberbandSelectDrag ;
2011-11-16 15:11:33 -05:00
friend class EditorRubberbandSelectDrag ;
2011-05-25 21:29:59 -04:00
friend class TimeFXDrag ;
friend class ScrubDrag ;
2009-05-30 14:25:59 -04:00
friend class SelectionDrag ;
friend class RangeMarkerBarDrag ;
friend class MouseZoomDrag ;
friend class RegionCreateDrag ;
2009-06-08 15:28:51 -04:00
friend class RegionMotionDrag ;
friend class RegionInsertDrag ;
2013-03-12 17:00:09 -04:00
friend class VideoTimeLineDrag ;
2009-06-10 21:05:01 -04:00
friend class EditorSummary ;
2009-06-20 09:41:55 -04:00
friend class EditorGroupTabs ;
2009-07-01 19:20:18 -04:00
2009-07-03 14:37:15 -04:00
friend class EditorRoutes ;
2010-07-06 07:33:27 -04:00
friend class RhythmFerret ;
2005-09-25 14:42:24 -04:00
} ;
# endif /* __ardour_editor_h__ */