2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2000-2003 Paul Davis
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_editor_h__
|
|
|
|
#define __ardour_editor_h__
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
#include <boost/optional.hpp>
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
#include <libgnomecanvasmm/canvas.h>
|
|
|
|
#include <libgnomecanvasmm/group.h>
|
|
|
|
#include <libgnomecanvasmm/line.h>
|
2007-10-11 18:07:47 -04:00
|
|
|
#include <libgnomecanvasmm/pixbuf.h>
|
2005-11-14 11:24:21 -05:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
#include <cmath>
|
|
|
|
|
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
|
|
|
|
2011-01-02 22:10:43 -05:00
|
|
|
#include "gtkmm2ext/selector.h"
|
|
|
|
#include "gtkmm2ext/click_box.h"
|
|
|
|
#include "gtkmm2ext/dndtreeview.h"
|
2011-02-09 09:01:46 -05:00
|
|
|
#include "gtkmm2ext/stateful_button.h"
|
2011-11-30 10:29:53 -05:00
|
|
|
#include "gtkmm2ext/bindings.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
|
|
|
|
|
|
|
#include "gtk-custom-ruler.h"
|
2011-11-10 10:25:01 -05:00
|
|
|
#include "ardour_button.h"
|
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"
|
2005-11-14 11:24:21 -05:00
|
|
|
#include "canvas.h"
|
2010-08-17 22:20:15 -04:00
|
|
|
#include "window_proxy.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2012-06-08 21:51:34 -04:00
|
|
|
namespace Gnome {
|
|
|
|
namespace Canvas {
|
|
|
|
class NoEventText;
|
|
|
|
class CanvasNoteEvent;
|
|
|
|
}
|
|
|
|
}
|
2009-11-17 09:14:26 -05:00
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
namespace Gtkmm2ext {
|
2005-09-25 14:42:24 -04:00
|
|
|
class TearOff;
|
2011-05-25 21:29:59 -04:00
|
|
|
class Bindings;
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class RouteGroup;
|
|
|
|
class Playlist;
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Region;
|
|
|
|
class Location;
|
|
|
|
class TempoSection;
|
|
|
|
class Session;
|
2007-08-06 01:30:18 -04:00
|
|
|
class Filter;
|
2006-08-12 04:20:24 -04:00
|
|
|
class ChanCount;
|
2009-08-26 23:09:30 -04:00
|
|
|
class MidiOperator;
|
2011-05-25 21:29:59 -04:00
|
|
|
class Track;
|
2009-10-30 11:30:22 -04:00
|
|
|
class MidiTrack;
|
|
|
|
class AudioTrack;
|
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;
|
2012-02-03 13:31:10 -05:00
|
|
|
class ButtonJoiner;
|
2009-02-26 20:20:25 -05:00
|
|
|
class ControlPoint;
|
2010-01-12 11:14:49 -05:00
|
|
|
class DragManager;
|
2005-09-25 14:42:24 -04:00
|
|
|
class GroupedButtons;
|
2011-07-06 20:37:13 -04:00
|
|
|
class GUIObjectState;
|
2009-02-26 20:20:25 -05:00
|
|
|
class Marker;
|
2009-08-26 23:09:30 -04:00
|
|
|
class MidiRegionView;
|
2009-02-26 20:20:25 -05:00
|
|
|
class MixerStrip;
|
|
|
|
class PlaylistSelector;
|
|
|
|
class PluginSelector;
|
|
|
|
class RhythmFerret;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Selection;
|
2009-02-26 20:20:25 -05:00
|
|
|
class SoundFileOmega;
|
|
|
|
class StreamView;
|
2008-09-23 10:36:26 -04:00
|
|
|
class TempoLines;
|
2009-02-26 20:20:25 -05:00
|
|
|
class TimeAxisView;
|
|
|
|
class TimeFXDialog;
|
2005-09-25 14:42:24 -04:00
|
|
|
class TimeSelection;
|
2009-06-20 09:41:55 -04:00
|
|
|
class EditorGroupTabs;
|
2009-07-03 14:37:15 -04:00
|
|
|
class EditorRoutes;
|
|
|
|
class EditorRouteGroups;
|
2009-07-03 18:42:22 -04:00
|
|
|
class EditorRegions;
|
2009-11-12 00:47:05 -05:00
|
|
|
class EditorLocations;
|
2009-07-03 19:51:58 -04:00
|
|
|
class EditorSnapshots;
|
2010-06-17 20:05:44 -04:00
|
|
|
class EditorSummary;
|
2010-08-25 15:28:33 -04:00
|
|
|
class RegionLayeringOrderEditor;
|
2010-09-19 20:58:25 -04:00
|
|
|
class ProgressReporter;
|
2010-11-16 09:53:16 -05:00
|
|
|
class EditorCursor;
|
|
|
|
class MouseCursors;
|
2011-05-02 09:38:16 -04:00
|
|
|
class VerboseCursor;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* <CMT Additions> */
|
|
|
|
class ImageFrameView;
|
|
|
|
class ImageFrameTimeAxisView;
|
|
|
|
class ImageFrameTimeAxis;
|
|
|
|
class MarkerTimeAxis ;
|
|
|
|
class MarkerView ;
|
|
|
|
class ImageFrameSocketHandler ;
|
|
|
|
class TimeAxisViewItem ;
|
|
|
|
/* </CMT Additions> */
|
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
|
2005-09-25 14:42:24 -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
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
void set_session (ARDOUR::Session *);
|
|
|
|
ARDOUR::Session* session() const { return _session; }
|
|
|
|
|
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
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t leftmost_position() const { return leftmost_frame; }
|
2009-06-13 13:52:51 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framecnt_t current_page_frames() const {
|
|
|
|
return (framecnt_t) floor (_canvas_width * frames_per_unit);
|
2009-06-13 13:52:51 -04:00
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-06-13 13:52:51 -04:00
|
|
|
double canvas_height () const {
|
|
|
|
return _canvas_height;
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void cycle_snap_mode ();
|
2012-02-13 09:34:21 -05:00
|
|
|
void next_snap_choice ();
|
|
|
|
void next_snap_choice_music_only ();
|
|
|
|
void next_snap_choice_music_and_time ();
|
|
|
|
void prev_snap_choice ();
|
|
|
|
void prev_snap_choice_music_only ();
|
|
|
|
void prev_snap_choice_music_and_time ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void set_snap_to (Editing::SnapType);
|
|
|
|
void set_snap_mode (Editing::SnapMode);
|
|
|
|
void set_snap_threshold (double pixel_distance) {snap_threshold = pixel_distance;}
|
|
|
|
|
2009-10-26 19:43:04 -04:00
|
|
|
Editing::SnapMode snap_mode () const;
|
|
|
|
Editing::SnapType snap_type () 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
|
|
|
|
|
|
|
void set_mouse_mode (Editing::MouseMode, bool force=true);
|
|
|
|
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;
|
2010-05-24 21:39:45 -04:00
|
|
|
void remove_midi_note (ArdourCanvas::Item *, GdkEvent *);
|
2009-07-28 16:51:28 -04:00
|
|
|
|
|
|
|
bool internal_editing() const { return _internal_editing ; }
|
|
|
|
void set_internal_edit (bool yn);
|
2012-01-19 10:23:51 -05:00
|
|
|
bool toggle_internal_editing_from_double_click (GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-05-10 22:54:43 -04:00
|
|
|
#ifdef WITH_CMT
|
2007-03-18 02:07:08 -04:00
|
|
|
void add_imageframe_time_axis(const std::string & track_name, void*) ;
|
2009-07-09 13:58:13 -04:00
|
|
|
void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) ;
|
2005-09-25 14:42:24 -04:00
|
|
|
void connect_to_image_compositor() ;
|
|
|
|
void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
|
2009-07-09 13:58:13 -04:00
|
|
|
TimeAxisView* get_named_time_axis(const std::string & name) ;
|
2009-10-06 18:07:10 -04:00
|
|
|
#endif /* WITH_CMT */
|
|
|
|
|
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
|
|
|
|
2011-11-15 14:33:09 -05:00
|
|
|
RouteTimeAxisView* get_route_view_by_route_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
|
|
|
|
|
|
|
/* undo related */
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t unit_to_frame (double unit) const {
|
|
|
|
return (framepos_t) rint (unit * frames_per_unit);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
double frame_to_unit (framepos_t frame) const {
|
2005-09-25 14:42:24 -04:00
|
|
|
return rint ((double) frame / (double) frames_per_unit);
|
|
|
|
}
|
|
|
|
|
2012-05-31 13:07:02 -04:00
|
|
|
double frame_to_unit_unrounded (framepos_t frame) const {
|
|
|
|
return frame / frames_per_unit;
|
|
|
|
}
|
|
|
|
|
2007-11-07 20:40:25 -05:00
|
|
|
double frame_to_unit (double frame) const {
|
2005-09-25 14:42:24 -04:00
|
|
|
return rint (frame / frames_per_unit);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* NOTE: these functions assume that the "pixel" coordinate is
|
|
|
|
the result of using the world->canvas affine transform on a
|
|
|
|
world coordinate. These coordinates already take into
|
|
|
|
account any scrolling carried out by adjusting the
|
2009-10-14 12:10:01 -04:00
|
|
|
xscroll_adjustment.
|
2005-09-25 14:42:24 -04:00
|
|
|
*/
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t pixel_to_frame (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) {
|
2010-09-17 14:20:37 -04:00
|
|
|
return (framepos_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
|
2005-09-25 14:42:24 -04:00
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
gulong frame_to_pixel (framepos_t frame) const {
|
2008-09-23 13:53:52 -04:00
|
|
|
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit)));
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void flush_canvas ();
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/* selection */
|
|
|
|
|
|
|
|
Selection& get_selection() const { return *selection; }
|
|
|
|
Selection& get_cut_buffer() const { return *cut_buffer; }
|
2011-11-15 14:33:09 -05:00
|
|
|
void track_mixer_selection ();
|
2005-09-25 14:42:24 -04: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 ();
|
2012-11-20 14:43:43 -05:00
|
|
|
framepos_t get_preroll ();
|
|
|
|
void maybe_locate_with_edit_preroll (framepos_t);
|
|
|
|
void play_with_preroll ();
|
2008-01-12 18:45:50 -05:00
|
|
|
void select_all_in_track (Selection::Operation op);
|
2006-03-05 14:39:16 -05:00
|
|
|
void select_all (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 ();
|
2012-01-30 17:53:22 -05:00
|
|
|
long select_range (framepos_t, framepos_t);
|
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
|
|
|
|
|
|
|
/* tempo */
|
|
|
|
|
|
|
|
void set_show_measures (bool yn);
|
|
|
|
bool show_measures () const { return _show_measures; }
|
|
|
|
|
2006-03-12 17:06:41 -05:00
|
|
|
/* analysis window */
|
2009-02-26 20:20:25 -05:00
|
|
|
|
2006-03-12 17:35:39 -05:00
|
|
|
void analyze_region_selection();
|
|
|
|
void 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 ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void add_toplevel_controls (Gtk::Container&);
|
2007-10-11 18:07:47 -04:00
|
|
|
Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; }
|
2005-09-25 14:42:24 -04:00
|
|
|
|
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; }
|
2009-02-26 20:20:25 -05:00
|
|
|
double get_current_zoom () const { return frames_per_unit; }
|
2012-12-13 11:20:37 -05:00
|
|
|
void cycle_zoom_focus ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void temporal_zoom_step (bool coarser);
|
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 */
|
|
|
|
|
|
|
|
PlaylistSelector& playlist_selector() const;
|
2007-01-09 18:24:54 -05:00
|
|
|
void clear_playlist (boost::shared_ptr<ARDOUR::Playlist>);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-07-09 13:58:13 -04:00
|
|
|
void new_playlists (TimeAxisView* v);
|
|
|
|
void copy_playlists (TimeAxisView* v);
|
|
|
|
void clear_playlists (TimeAxisView* 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);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* nudge is initiated by transport controls owned by ARDOUR_UI */
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next);
|
|
|
|
Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position);
|
2009-08-17 22:37:57 -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 ();
|
|
|
|
|
|
|
|
/* 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
|
|
|
void toggle_measure_visibility ();
|
2007-10-11 18:07:47 -04:00
|
|
|
void toggle_logo_visibility ();
|
2006-01-07 21:56:49 -05:00
|
|
|
|
2012-04-16 12:32:22 -04:00
|
|
|
/* fades */
|
2008-10-09 10:15:45 -04:00
|
|
|
|
2010-11-03 18:19:29 -04:00
|
|
|
void toggle_region_fades (int dir);
|
2008-10-09 17:55:05 -04:00
|
|
|
void update_region_fade_visibility ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* redirect shared ops menu. caller must free returned menu */
|
|
|
|
|
|
|
|
Gtk::Menu* redirect_menu ();
|
|
|
|
|
|
|
|
/* floating windows/transient */
|
|
|
|
|
|
|
|
void ensure_float (Gtk::Window&);
|
|
|
|
|
|
|
|
void show_window ();
|
2006-04-06 12:51:27 -04:00
|
|
|
|
2011-07-25 16:28:51 -04:00
|
|
|
void ensure_time_axis_view_is_visible (const TimeAxisView& tav);
|
2005-09-25 14:42:24 -04:00
|
|
|
void scroll_tracks_down_line ();
|
|
|
|
void scroll_tracks_up_line ();
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
void update_tearoff_visibility();
|
2006-01-19 13:05:31 -05:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void reset_x_origin (framepos_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);
|
2007-01-11 15:36:35 -05:00
|
|
|
void reset_zoom (double);
|
2010-09-17 14:20:37 -04:00
|
|
|
void reposition_and_zoom (framepos_t, double);
|
2007-01-11 15:36:35 -05:00
|
|
|
|
2011-12-30 12:28:05 -05:00
|
|
|
framepos_t get_preferred_edit_position (bool ignore_playhead = false, bool use_context_click = 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 ();
|
|
|
|
|
2009-07-03 14:37:15 -04:00
|
|
|
TrackViewList const & get_track_views () {
|
|
|
|
return track_views;
|
|
|
|
}
|
|
|
|
|
2009-07-03 18:42:22 -04:00
|
|
|
int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region>);
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void do_import (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, framepos_t&);
|
|
|
|
void do_embed (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, framepos_t&);
|
2009-07-03 18:42:22 -04:00
|
|
|
|
2013-01-04 17:46:51 -05:00
|
|
|
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions, bool src_comparison);
|
2009-08-28 12:06:08 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void center_screen (framepos_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;
|
2010-03-18 22:49:01 -04:00
|
|
|
Gtkmm2ext::TearOff* mouse_mode_tearoff () const { return _mouse_mode_tearoff; }
|
|
|
|
Gtkmm2ext::TearOff* tools_tearoff () const { return _tools_tearoff; }
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void snap_to (framepos_t& first, int32_t direction = 0, bool for_mark = false);
|
|
|
|
void snap_to_with_modifier (framepos_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
|
|
|
|
void snap_to (framepos_t& first, framepos_t& last, int32_t direction = 0, bool for_mark = false);
|
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);
|
2010-03-18 22:49:01 -04:00
|
|
|
void commit_reversible_command ();
|
2009-12-13 14:09:52 -05:00
|
|
|
|
2010-06-29 15:08:19 -04:00
|
|
|
DragManager* drags () const {
|
|
|
|
return _drags;
|
|
|
|
}
|
|
|
|
|
2012-01-30 16:33:32 -05:00
|
|
|
void maybe_autoscroll (bool, bool, bool, bool);
|
2011-05-25 21:29:59 -04:00
|
|
|
|
|
|
|
Gdk::Cursor* get_canvas_cursor () const { return current_canvas_cursor; }
|
|
|
|
void set_canvas_cursor (Gdk::Cursor*, bool save=false);
|
|
|
|
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
|
|
|
|
2010-11-16 09:53:16 -05:00
|
|
|
MouseCursors const * cursors () const {
|
|
|
|
return _cursors;
|
|
|
|
}
|
|
|
|
|
2011-05-02 09:38:16 -04:00
|
|
|
VerboseCursor* verbose_cursor () const {
|
|
|
|
return _verbose_cursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void get_pointer_position (double &, double &) const;
|
|
|
|
|
2012-06-17 12:57:21 -04:00
|
|
|
TimeAxisView* stepping_axis_view () {
|
|
|
|
return _stepping_axis_view;
|
|
|
|
}
|
|
|
|
|
|
|
|
void set_stepping_axis_view (TimeAxisView* v) {
|
|
|
|
_stepping_axis_view = v;
|
|
|
|
}
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
protected:
|
|
|
|
void map_transport_state ();
|
2010-09-17 14:20:37 -04:00
|
|
|
void map_position_change (framepos_t);
|
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
|
|
|
|
|
|
|
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
|
2010-09-17 14:20:37 -04:00
|
|
|
boost::optional<framepos_t> _control_scroll_target;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
PlaylistSelector* _playlist_selector;
|
|
|
|
|
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 {
|
2012-03-06 21:11:59 -05:00
|
|
|
VisualState (bool with_tracks);
|
2011-07-06 20:37:13 -04:00
|
|
|
~VisualState ();
|
2008-09-10 11:03:30 -04:00
|
|
|
double y_position;
|
|
|
|
double frames_per_unit;
|
2011-07-06 20:37:13 -04:00
|
|
|
framepos_t leftmost_frame;
|
2008-09-10 11:03:30 -04:00
|
|
|
Editing::ZoomFocus zoom_focus;
|
2011-07-06 20:37:13 -04:00
|
|
|
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
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t leftmost_frame;
|
2008-01-10 16:20:59 -05:00
|
|
|
double frames_per_unit;
|
|
|
|
Editing::ZoomFocus zoom_focus;
|
|
|
|
|
|
|
|
void set_frames_per_unit (double);
|
2012-06-20 10:14:27 -04:00
|
|
|
bool clamp_frames_per_unit (double &) const;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
Editing::MouseMode mouse_mode;
|
2011-03-07 20:55:50 -05:00
|
|
|
Editing::MouseMode pre_internal_mouse_mode;
|
2012-02-13 09:34:21 -05:00
|
|
|
Editing::SnapType pre_internal_snap_type;
|
|
|
|
Editing::SnapMode pre_internal_snap_mode;
|
|
|
|
Editing::SnapType internal_snap_type;
|
|
|
|
Editing::SnapMode internal_snap_mode;
|
2009-07-28 16:51:28 -04:00
|
|
|
bool _internal_editing;
|
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;
|
|
|
|
|
|
|
|
void update_join_object_range_location (double, double);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2012-01-24 22:03:25 -05:00
|
|
|
boost::optional<int> pre_notebook_shrink_pane_width;
|
|
|
|
|
2005-11-12 17:07:07 -05:00
|
|
|
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2011-01-04 21:06:51 -05:00
|
|
|
Gtk::Notebook _the_notebook;
|
|
|
|
bool _notebook_shrunk;
|
|
|
|
void add_notebook_page (std::string const &, Gtk::Widget &);
|
|
|
|
bool notebook_tab_clicked (GdkEventButton *, Gtk::Widget *);
|
2011-05-25 21:29:59 -04:00
|
|
|
|
2005-12-07 12:15:37 -05:00
|
|
|
Gtk::HPaned edit_pane;
|
2010-06-07 21:29:33 -04:00
|
|
|
Gtk::VPaned editor_summary_pane;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::EventBox meter_base;
|
|
|
|
Gtk::HBox meter_box;
|
|
|
|
Gtk::EventBox marker_base;
|
|
|
|
Gtk::HBox marker_box;
|
|
|
|
Gtk::VBox scrollers_rulers_markers_box;
|
|
|
|
|
|
|
|
void location_changed (ARDOUR::Location *);
|
|
|
|
void location_flags_changed (ARDOUR::Location *, void *);
|
|
|
|
void refresh_location_display ();
|
|
|
|
void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
|
|
|
|
void add_new_location (ARDOUR::Location *);
|
2011-04-22 22:00:23 -04:00
|
|
|
ArdourCanvas::Group* add_new_location_internal (ARDOUR::Location *);
|
2005-09-25 14:42:24 -04:00
|
|
|
void location_gone (ARDOUR::Location *);
|
2005-11-14 11:24:21 -05:00
|
|
|
void remove_marker (ArdourCanvas::Item&, GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
gint really_remove_marker (ARDOUR::Location* loc);
|
2008-01-10 16:20:59 -05:00
|
|
|
void goto_nth_marker (int nth);
|
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
|
|
|
|
|
|
|
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 {
|
2010-11-10 13:29:32 -05:00
|
|
|
Marker* start;
|
|
|
|
Marker* end;
|
|
|
|
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);
|
|
|
|
void canvas_height_set (double);
|
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&);
|
|
|
|
void set_position (framepos_t start, framepos_t end = 0);
|
|
|
|
void set_color_rgba (uint32_t);
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
2007-11-07 20:40:25 -05:00
|
|
|
LocationMarkers *find_location_markers (ARDOUR::Location *) const;
|
|
|
|
ARDOUR::Location* find_location_from_marker (Marker *, bool& is_start) const;
|
2011-10-19 20:05:31 -04:00
|
|
|
Marker* find_marker_from_location_id (PBD::ID const &, bool) const;
|
2007-11-12 17:23:01 -05:00
|
|
|
Marker* entered_marker;
|
2010-11-10 13:29:32 -05:00
|
|
|
bool _show_marker_lines;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-05 09:48:09 -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 ();
|
|
|
|
void update_marker_labels (ArdourCanvas::Group *);
|
|
|
|
void check_marker_label (Marker *);
|
|
|
|
|
|
|
|
/** 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.
|
|
|
|
*/
|
|
|
|
std::map<ArdourCanvas::Group *, std::list<Marker *> > _sorted_marker_lists;
|
2010-11-14 18:47:09 -05:00
|
|
|
void remove_sorted_marker (Marker *);
|
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 ();
|
2010-09-17 14:20:37 -04:00
|
|
|
void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
|
2012-06-19 09:54:28 -04:00
|
|
|
void mouse_add_new_range (framepos_t);
|
2009-05-12 13:03:42 -04:00
|
|
|
bool choose_new_marker_name(std::string &name);
|
2008-01-10 16:20:59 -05:00
|
|
|
void update_cd_marker_display ();
|
|
|
|
void ensure_cd_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;
|
|
|
|
RegionSelection get_equivalent_regions (RegionSelection &, PBD::PropertyID) const;
|
|
|
|
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
|
2011-12-10 14:20:15 -05:00
|
|
|
void mapover_tracks_with_unique_playlists (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
|
2006-03-05 14:39:16 -05:00
|
|
|
|
2006-08-16 16:36:14 -04:00
|
|
|
/* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
|
2009-07-09 13:58:13 -04:00
|
|
|
void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView *, std::vector<RegionView*>*) const;
|
|
|
|
void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
|
|
|
|
void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
|
|
|
|
void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
|
2012-01-31 20:07:52 -05: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;
|
|
|
|
|
2006-07-23 08:03:19 -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);
|
2007-03-18 02:07:08 -04:00
|
|
|
void select_all_tracks ();
|
2011-05-25 21:29:59 -04:00
|
|
|
void 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>);
|
2006-07-23 08:03:19 -04:00
|
|
|
void collect_new_region_view (RegionView *);
|
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 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
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
Gtk::MenuItem* region_edit_menu_split_item;
|
|
|
|
Gtk::MenuItem* region_edit_menu_split_multichannel_item;
|
2008-01-12 18:45:50 -05:00
|
|
|
Gtk::Menu * track_region_edit_playlist_menu;
|
|
|
|
Gtk::Menu * track_edit_playlist_submenu;
|
|
|
|
Gtk::Menu * track_selection_edit_playlist_submenu;
|
2007-10-11 18:07:47 -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
|
|
|
|
2011-07-17 16:10:31 -04:00
|
|
|
void popup_control_point_context_menu (ArdourCanvas::Item *, GdkEvent *);
|
|
|
|
Gtk::Menu _control_point_context_menu;
|
|
|
|
|
2012-06-27 18:57:06 -04:00
|
|
|
void add_routes (ARDOUR::RouteList&);
|
2009-12-25 16:06:52 -05:00
|
|
|
void timeaxisview_deleted (TimeAxisView *);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::HBox global_hpacker;
|
|
|
|
Gtk::VBox global_vpacker;
|
|
|
|
Gtk::VBox vpacker;
|
|
|
|
|
2005-10-28 18:19:45 -04:00
|
|
|
Gdk::Cursor* current_canvas_cursor;
|
2008-02-16 17:43:18 -05:00
|
|
|
Gdk::Cursor* which_grabber_cursor ();
|
2010-09-21 11:15:06 -04:00
|
|
|
void set_canvas_cursor ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
ArdourCanvas::Canvas* track_canvas;
|
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
|
|
|
|
2009-05-15 21:22:43 -04:00
|
|
|
void parameter_changed (std::string);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
bool track_canvas_motion (GdkEvent*);
|
|
|
|
|
2009-02-26 20:20:25 -05:00
|
|
|
Gtk::EventBox time_canvas_event_box;
|
|
|
|
Gtk::EventBox track_canvas_event_box;
|
|
|
|
Gtk::EventBox time_button_event_box;
|
|
|
|
Gtk::EventBox ruler_label_event_box;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Group *minsec_group;
|
2007-10-11 18:07:47 -04:00
|
|
|
ArdourCanvas::Pixbuf *logo_item;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Group *bbt_group;
|
2009-10-26 10:38:58 -04:00
|
|
|
ArdourCanvas::Group *timecode_group;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Group *frame_group;
|
|
|
|
ArdourCanvas::Group *tempo_group;
|
|
|
|
ArdourCanvas::Group *meter_group;
|
|
|
|
ArdourCanvas::Group *marker_group;
|
|
|
|
ArdourCanvas::Group *range_marker_group;
|
|
|
|
ArdourCanvas::Group *transport_marker_group;
|
2008-01-10 16:20:59 -05:00
|
|
|
ArdourCanvas::Group* cd_marker_group;
|
2008-09-10 17:27:39 -04:00
|
|
|
|
|
|
|
ArdourCanvas::Group* timebar_group;
|
|
|
|
|
|
|
|
/* These bars never need to be scrolled */
|
|
|
|
ArdourCanvas::Group* meter_bar_group;
|
|
|
|
ArdourCanvas::Group* tempo_bar_group;
|
|
|
|
ArdourCanvas::Group* marker_bar_group;
|
|
|
|
ArdourCanvas::Group* range_marker_bar_group;
|
|
|
|
ArdourCanvas::Group* transport_marker_bar_group;
|
|
|
|
ArdourCanvas::Group* cd_marker_bar_group;
|
|
|
|
|
2008-09-14 19:08:19 -04:00
|
|
|
/** The group containing all items that require horizontal scrolling. */
|
2008-12-12 09:43:24 -05:00
|
|
|
ArdourCanvas::Group* _background_group;
|
2009-10-14 12:10:01 -04:00
|
|
|
/*
|
2008-12-12 09:43:24 -05:00
|
|
|
The _master_group is the group containing all items
|
|
|
|
that require horizontal scrolling..
|
2009-10-14 12:10:01 -04:00
|
|
|
It is primarily used to separate canvas items
|
|
|
|
that require horizontal scrolling from those that do not.
|
2008-12-12 09:43:24 -05:00
|
|
|
*/
|
2008-09-10 17:27:39 -04:00
|
|
|
ArdourCanvas::Group* _master_group;
|
2008-09-14 19:08:19 -04:00
|
|
|
|
|
|
|
/* The group containing all trackviews. Only scrolled vertically. */
|
2008-09-10 17:27:39 -04:00
|
|
|
ArdourCanvas::Group* _trackview_group;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-14 19:08:19 -04:00
|
|
|
/* The group used for region motion. Sits on top of _trackview_group */
|
2008-09-10 17:27:39 -04:00
|
|
|
ArdourCanvas::Group* _region_motion_group;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
enum RulerType {
|
2009-10-26 10:38:58 -04:00
|
|
|
ruler_metric_timecode = 0,
|
2005-09-25 14:42:24 -04:00
|
|
|
ruler_metric_bbt = 1,
|
2011-01-18 07:51:02 -05:00
|
|
|
ruler_metric_samples = 2,
|
2005-09-25 14:42:24 -04:00
|
|
|
ruler_metric_minsec = 3,
|
|
|
|
|
|
|
|
ruler_time_tempo = 4,
|
|
|
|
ruler_time_meter = 5,
|
|
|
|
ruler_time_marker = 6,
|
|
|
|
ruler_time_range_marker = 7,
|
|
|
|
ruler_time_transport_marker = 8,
|
2008-01-10 16:20:59 -05:00
|
|
|
ruler_time_cd_marker = 9,
|
2013-03-12 17:00:09 -04:00
|
|
|
#ifdef WITH_VIDEOTIMELINE
|
|
|
|
ruler_video_timeline = 10,
|
|
|
|
#endif
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
static GtkCustomMetric ruler_metrics[4];
|
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;
|
2009-02-26 20:20:25 -05:00
|
|
|
bool no_ruler_shown_update;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2011-04-19 06:43:43 -04:00
|
|
|
bool ruler_button_press (GdkEventButton*);
|
|
|
|
bool ruler_button_release (GdkEventButton*);
|
|
|
|
bool ruler_mouse_motion (GdkEventMotion*);
|
2008-01-10 16:20:59 -05:00
|
|
|
bool ruler_scroll (GdkEventScroll* event);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::Widget * ruler_grabbed_widget;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
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 ();
|
2012-11-27 17:48:59 -05:00
|
|
|
void update_tempo_based_rulers (ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
|
|
|
|
ARDOUR::TempoMap::BBTPointList::const_iterator& end);
|
2010-09-17 14:20:37 -04:00
|
|
|
void popup_ruler_menu (framepos_t where = 0, ItemType type = RegionItem);
|
2005-09-25 14:42:24 -04:00
|
|
|
void update_ruler_visibility ();
|
2008-03-17 16:54:03 -04:00
|
|
|
void set_ruler_visible (RulerType, bool);
|
|
|
|
void toggle_ruler_visibility (RulerType rt);
|
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 ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-10-26 10:38:58 -04:00
|
|
|
static gint _metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2005-11-25 19:06:46 -05:00
|
|
|
static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2011-01-18 07:51:02 -05:00
|
|
|
static gint _metric_get_samples (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2005-11-25 19:06:46 -05:00
|
|
|
static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2009-10-14 12:10:01 -04: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 MinsecRulerScale {
|
|
|
|
minsec_show_seconds,
|
|
|
|
minsec_show_minutes,
|
|
|
|
minsec_show_hours,
|
|
|
|
minsec_show_frames
|
|
|
|
};
|
|
|
|
|
|
|
|
MinsecRulerScale minsec_ruler_scale;
|
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
framecnt_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;
|
2011-01-17 20:16:05 -05:00
|
|
|
void set_minsec_ruler_scale (framepos_t, framepos_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,
|
|
|
|
timecode_show_frames,
|
|
|
|
timecode_show_seconds,
|
|
|
|
timecode_show_minutes,
|
|
|
|
timecode_show_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;
|
2011-01-17 20:16:05 -05:00
|
|
|
void set_timecode_ruler_scale (framepos_t, framepos_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
|
|
|
|
2011-01-18 07:51:02 -05:00
|
|
|
framecnt_t _samples_ruler_interval;
|
|
|
|
void set_samples_ruler_scale (framepos_t, framepos_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 {
|
|
|
|
bbt_over,
|
|
|
|
bbt_show_64,
|
|
|
|
bbt_show_16,
|
|
|
|
bbt_show_4,
|
|
|
|
bbt_show_1,
|
|
|
|
bbt_show_beats,
|
|
|
|
bbt_show_ticks,
|
|
|
|
bbt_show_ticks_detail,
|
|
|
|
bbt_show_ticks_super_detail
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
uint32_t bbt_accent_modulo;
|
2012-11-27 17:48:59 -05:00
|
|
|
void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper,
|
|
|
|
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin,
|
|
|
|
ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end);
|
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 metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2005-11-25 19:06:46 -05:00
|
|
|
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2011-01-18 07:51:02 -05:00
|
|
|
gint metric_get_samples (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2005-11-25 19:06:46 -05:00
|
|
|
gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-03-19 03:07:38 -04:00
|
|
|
Gtk::Widget *_ruler_separator;
|
2009-10-26 10:38:58 -04:00
|
|
|
GtkWidget *_timecode_ruler;
|
2005-09-25 14:42:24 -04:00
|
|
|
GtkWidget *_bbt_ruler;
|
2011-01-18 07:51:02 -05:00
|
|
|
GtkWidget *_samples_ruler;
|
2005-09-25 14:42:24 -04:00
|
|
|
GtkWidget *_minsec_ruler;
|
2009-10-26 10:38:58 -04:00
|
|
|
Gtk::Widget *timecode_ruler;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Widget *bbt_ruler;
|
2011-01-18 07:51:02 -05:00
|
|
|
Gtk::Widget *samples_ruler;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Widget *minsec_ruler;
|
|
|
|
static Editor *ruler_editor;
|
|
|
|
|
|
|
|
static const double timebar_height;
|
|
|
|
guint32 visible_timebars;
|
2008-09-10 17:27:39 -04:00
|
|
|
gdouble canvas_timebars_vsize;
|
2008-12-12 09:43:24 -05:00
|
|
|
gdouble get_canvas_timebars_vsize () const { return canvas_timebars_vsize; }
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Menu *editor_ruler_menu;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::SimpleRect* tempo_bar;
|
|
|
|
ArdourCanvas::SimpleRect* meter_bar;
|
|
|
|
ArdourCanvas::SimpleRect* marker_bar;
|
|
|
|
ArdourCanvas::SimpleRect* range_marker_bar;
|
|
|
|
ArdourCanvas::SimpleRect* transport_marker_bar;
|
2008-01-10 16:20:59 -05:00
|
|
|
ArdourCanvas::SimpleRect* cd_marker_bar;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2013-03-12 17:00:09 -04:00
|
|
|
#ifdef WITH_VIDEOTIMELINE
|
|
|
|
ArdourCanvas::SimpleRect* videotl_bar;
|
|
|
|
Gtk::Label videotl_label;
|
|
|
|
ArdourCanvas::Group* videotl_bar_group;
|
|
|
|
ArdourCanvas::Group* videotl_group;
|
|
|
|
Glib::RefPtr<Gtk::ToggleAction> ruler_video_action;
|
|
|
|
Glib::RefPtr<Gtk::ToggleAction> xjadeo_proc_action;
|
|
|
|
void set_xjadeo_proc ();
|
|
|
|
void toggle_xjadeo_proc (int state=-1);
|
|
|
|
void set_xjadeo_sensitive (bool onoff);
|
|
|
|
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 export_video ();
|
|
|
|
void toggle_region_video_lock ();
|
|
|
|
#endif
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::VBox time_button_vbox;
|
|
|
|
Gtk::HBox time_button_hbox;
|
|
|
|
|
2009-05-30 14:25:59 -04:00
|
|
|
friend class EditorCursor;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-05-30 14:25:59 -04:00
|
|
|
EditorCursor* playhead_cursor;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Group* cursor_group;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t get_region_boundary (framepos_t 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);
|
|
|
|
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
|
|
|
|
2009-05-30 14:25:59 -04:00
|
|
|
void select_all_selectables_using_cursor (EditorCursor *, bool);
|
2007-11-12 17:23:01 -05:00
|
|
|
void select_all_selectables_using_edit (bool);
|
|
|
|
void select_all_selectables_between (bool within);
|
|
|
|
void select_range_between ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-07-06 07:33:27 -04:00
|
|
|
boost::shared_ptr<ARDOUR::Region> find_next_region (ARDOUR::framepos_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
|
2011-05-25 21:29:59 -04:00
|
|
|
ARDOUR::framepos_t find_next_region_boundary (ARDOUR::framepos_t, int32_t dir, const TrackViewList&);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-07-06 07:33:27 -04:00
|
|
|
std::vector<ARDOUR::framepos_t> region_boundary_cache;
|
2005-09-25 14:42:24 -04:00
|
|
|
void build_region_boundary_cache ();
|
|
|
|
|
|
|
|
Gtk::HBox top_hbox;
|
|
|
|
Gtk::HBox bottom_hbox;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Table edit_packer;
|
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
Gtk::Adjustment vertical_adjustment;
|
2011-05-25 21:29:59 -04:00
|
|
|
|
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
|
|
|
|
2009-06-13 13:52:51 -04:00
|
|
|
double _canvas_width;
|
2010-06-29 15:08:19 -04:00
|
|
|
double _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*);
|
|
|
|
|
2011-04-19 06:18:21 -04:00
|
|
|
bool edit_controls_button_release (GdkEventButton*);
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Menu *edit_controls_left_menu;
|
|
|
|
Gtk::Menu *edit_controls_right_menu;
|
|
|
|
|
2008-09-10 17:27:39 -04:00
|
|
|
Gtk::VBox ruler_label_vbox;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::VBox track_canvas_vbox;
|
|
|
|
Gtk::VBox time_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);
|
2012-04-13 12:11:55 -04:00
|
|
|
void control_select (uint32_t rid, Selection::Operation);
|
2012-04-09 12:15:55 -04:00
|
|
|
void control_unselect ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void access_action (std::string,std::string);
|
2010-09-17 14:20:37 -04:00
|
|
|
bool deferred_control_scroll (framepos_t);
|
2006-04-06 12:51:27 -04:00
|
|
|
sigc::connection control_scroll_connection;
|
|
|
|
|
2008-09-10 17:27:39 -04:00
|
|
|
gdouble get_trackview_group_vertical_offset () const { return vertical_adjustment.get_value () - canvas_timebars_vsize;}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
ArdourCanvas::Group* get_background_group () const { return _background_group; }
|
2008-09-10 17:27:39 -04:00
|
|
|
ArdourCanvas::Group* get_trackview_group () const { return _trackview_group; }
|
2008-10-04 06:38:20 -04:00
|
|
|
double last_trackview_group_vertical_offset;
|
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;
|
2008-09-10 17:27:39 -04:00
|
|
|
void scroll_canvas_vertically ();
|
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,
|
|
|
|
YOrigin = 0x4
|
|
|
|
};
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-06-15 18:45:05 -04:00
|
|
|
Type pending;
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t time_origin;
|
2009-06-15 18:45:05 -04:00
|
|
|
double frames_per_unit;
|
|
|
|
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
|
|
|
|
2012-06-25 20:07:45 -04:00
|
|
|
VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (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;
|
|
|
|
|
|
|
|
static int _idle_visual_changer (void *arg);
|
|
|
|
int idle_visual_changer ();
|
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;
|
2011-12-26 20:42:49 -05:00
|
|
|
std::pair<TimeAxisView*, double> trackview_by_y_position (double);
|
2009-12-09 22:25:32 -05:00
|
|
|
TimeAxisView* axis_view_from_route (boost::shared_ptr<ARDOUR::Route>) const;
|
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;
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t last_update_frame;
|
|
|
|
void center_screen_internal (framepos_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
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void session_going_away ();
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t cut_buffer_start;
|
|
|
|
framecnt_t cut_buffer_length;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2011-05-25 21:29:59 -04:00
|
|
|
Gdk::Cursor* pre_press_cursor;
|
|
|
|
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);
|
2009-08-04 14:21:09 -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);
|
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 ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2011-11-30 10:29:53 -05:00
|
|
|
void load_bindings ();
|
|
|
|
Gtkmm2ext::ActionMap editor_action_map;
|
|
|
|
Gtkmm2ext::Bindings key_bindings;
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
int ensure_cursor (framepos_t* pos);
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
void cut_copy_points (Editing::CutCopyOp);
|
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 ();
|
2010-09-17 14:20:37 -04:00
|
|
|
void paste_internal (framepos_t 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
|
|
|
|
|
|
|
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 ();
|
2010-09-17 14:20:37 -04:00
|
|
|
void split_regions_at (framepos_t, RegionSelection&);
|
2008-02-01 22:57:35 -05:00
|
|
|
void split_region_at_transients ();
|
2011-01-19 13:35:11 -05:00
|
|
|
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
|
2005-09-25 14:42:24 -04:00
|
|
|
void crop_region_to_selection ();
|
2010-09-17 14:20:37 -04:00
|
|
|
void crop_region_to (framepos_t start, framepos_t end);
|
|
|
|
void set_sync_point (framepos_t, 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);
|
2010-09-17 14:20:37 -04:00
|
|
|
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, framepos_t position);
|
|
|
|
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, framepos_t position);
|
2007-05-10 07:53:35 -04:00
|
|
|
void remove_selected_regions ();
|
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>);
|
|
|
|
void audition_playlist_region_via_route (boost::shared_ptr<ARDOUR::Region>, ARDOUR::Route&);
|
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);
|
2008-01-12 18:45:50 -05:00
|
|
|
void quantize_region ();
|
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 ();
|
2011-09-05 19:38:18 -04:00
|
|
|
void insert_time (framepos_t, framecnt_t, Editing::InsertTimeOption, bool, bool, bool, bool, bool, bool);
|
2008-04-11 10:06:50 -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 ();
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void define_one_bar (framepos_t start, framepos_t end);
|
2008-02-01 22:57:35 -05:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void audition_region_from_region_list ();
|
|
|
|
void hide_region_from_region_list ();
|
2010-03-30 21:11:48 -04:00
|
|
|
void show_region_in_region_list ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-11-03 18:19:29 -04:00
|
|
|
void naturalize_region ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-01-28 12:44:13 -05:00
|
|
|
void reset_focus ();
|
|
|
|
|
2010-11-03 18:19:29 -04:00
|
|
|
void split_region ();
|
2007-11-12 17:23:01 -05:00
|
|
|
|
2011-06-12 11:50:47 -04:00
|
|
|
void delete_ ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void cut ();
|
|
|
|
void copy ();
|
2011-12-30 12:28:05 -05:00
|
|
|
void paste (float times, bool from_context_menu = false);
|
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&);
|
|
|
|
|
|
|
|
void temporal_zoom_selection ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void temporal_zoom_region (bool both_axes);
|
2009-10-20 14:20:38 -04:00
|
|
|
void zoom_to_region (bool both_axes);
|
2005-09-25 14:42:24 -04:00
|
|
|
void temporal_zoom_session ();
|
2012-06-20 10:14:27 -04:00
|
|
|
void temporal_zoom (double scale);
|
2012-03-22 12:41:44 -04:00
|
|
|
void temporal_zoom_by_frame (framepos_t start, framepos_t end);
|
2010-09-17 14:20:37 -04:00
|
|
|
void temporal_zoom_to_frame (bool coarser, framepos_t frame);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
void insert_region_list_drag (boost::shared_ptr<ARDOUR::Region>, int x, int y);
|
2005-09-25 14:42:24 -04:00
|
|
|
void insert_region_list_selection (float times);
|
|
|
|
|
2008-02-10 13:16:25 -05:00
|
|
|
void insert_route_list_drag (boost::shared_ptr<ARDOUR::Route>, int x, int y);
|
|
|
|
|
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);
|
2007-10-11 18:07:47 -04:00
|
|
|
void external_audio_dialog ();
|
2008-09-26 04:29:30 -04:00
|
|
|
void session_import_dialog ();
|
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
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void bring_in_external_audio (Editing::ImportMode mode, framepos_t& pos);
|
2008-03-17 16:54:03 -04:00
|
|
|
|
2013-03-21 16:33:02 -04:00
|
|
|
bool idle_drop_paths (std::vector<std::string> paths, framepos_t frame, double ypos, bool copy);
|
|
|
|
void drop_paths_part_two (const std::vector<std::string>& paths, framepos_t frame, double ypos, bool copy);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
int import_sndfiles (std::vector<std::string> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, framepos_t& pos,
|
2010-04-09 21:35:11 -04:00
|
|
|
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool);
|
2010-09-14 11:45:21 -04:00
|
|
|
int embed_sndfiles (std::vector<std::string> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
|
2007-10-11 18:07:47 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
int add_sources (std::vector<std::string> paths, ARDOUR::SourceList& sources, framepos_t& pos, Editing::ImportMode,
|
2008-02-18 14:45:52 -05:00
|
|
|
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool add_channel_suffix);
|
2010-09-17 14:20:37 -04:00
|
|
|
int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region> region, uint32_t, uint32_t, framepos_t& pos, Editing::ImportMode mode,
|
2008-02-18 14:45:52 -05:00
|
|
|
boost::shared_ptr<ARDOUR::Track>& existing_track);
|
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
|
|
|
|
2012-11-12 21:19:04 -05:00
|
|
|
void toggle_midi_input_active (bool flip_others);
|
|
|
|
|
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
|
|
|
|
|
|
|
/* import specific info */
|
|
|
|
|
2009-10-30 11:30:22 -04:00
|
|
|
struct EditorImportStatus : public ARDOUR::ImportStatus {
|
2008-12-12 09:43:24 -05:00
|
|
|
Editing::ImportMode mode;
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t pos;
|
2008-12-12 09:43:24 -05:00
|
|
|
int target_tracks;
|
|
|
|
int target_regions;
|
|
|
|
boost::shared_ptr<ARDOUR::Track> track;
|
|
|
|
bool replace;
|
|
|
|
};
|
|
|
|
|
|
|
|
EditorImportStatus import_status;
|
2005-09-25 14:42:24 -04:00
|
|
|
static void *_import_thread (void *);
|
|
|
|
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);
|
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 ();
|
|
|
|
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 jump_forward_to_mark ();
|
|
|
|
void jump_backward_to_mark ();
|
|
|
|
void cursor_align (bool playhead_to_edit);
|
|
|
|
|
|
|
|
void remove_last_capture ();
|
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
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void add_location_mark (framepos_t 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 ();
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void set_loop_from_edit_range (bool play);
|
|
|
|
void set_loop_from_region (bool play);
|
|
|
|
void set_punch_from_edit_range ();
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void set_loop_range (framepos_t start, framepos_t end, std::string cmd);
|
|
|
|
void set_punch_range (framepos_t start, framepos_t end, std::string cmd);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void add_location_from_playhead_cursor ();
|
2008-01-10 16:20:59 -05:00
|
|
|
bool select_new_marker;
|
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;
|
2010-09-17 14:20:37 -04:00
|
|
|
void scrub (framepos_t, double);
|
2007-10-11 18:07:47 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void keyboard_selection_begin ();
|
|
|
|
void keyboard_selection_finish (bool add);
|
|
|
|
bool have_pending_keyboard_selection;
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_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
|
|
|
|
2009-10-26 19:43:04 -04:00
|
|
|
Editing::SnapType _snap_type;
|
|
|
|
Editing::SnapMode _snap_mode;
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/// Snap threshold in pixels
|
2005-09-25 14:42:24 -04:00
|
|
|
double snap_threshold;
|
|
|
|
|
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 ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::Menu fade_context_menu;
|
2005-11-14 11:24:21 -05:00
|
|
|
void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
|
|
|
|
|
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
|
|
|
|
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;
|
2007-11-12 17:23:01 -05:00
|
|
|
bool _dragging_edit_point;
|
2007-01-09 18:24:54 -05:00
|
|
|
|
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*);
|
|
|
|
|
2010-01-12 11:14:49 -05:00
|
|
|
void add_region_drag (ArdourCanvas::Item*, GdkEvent*, RegionView*);
|
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_copy_drag (ArdourCanvas::Item*, GdkEvent*, RegionView*);
|
|
|
|
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*);
|
|
|
|
|
2011-07-17 16:10:31 -04:00
|
|
|
bool can_remove_control_point (ArdourCanvas::Item *);
|
|
|
|
void remove_control_point (ArdourCanvas::Item *);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void mouse_brush_insert_region (RegionView*, framepos_t pos);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-12 12:28:26 -04:00
|
|
|
/* Canvas event handlers */
|
|
|
|
|
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*);
|
|
|
|
bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
|
|
|
|
bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
|
|
|
|
bool canvas_fade_out_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
|
2006-07-23 08:03:19 -04:00
|
|
|
bool canvas_region_view_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
|
2009-08-28 12:06:08 -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*);
|
2005-11-14 11:24:21 -05:00
|
|
|
bool canvas_marker_event (GdkEvent* event,ArdourCanvas::Item*, Marker*);
|
|
|
|
bool canvas_zoom_rect_event (GdkEvent* event,ArdourCanvas::Item*);
|
|
|
|
bool canvas_tempo_marker_event (GdkEvent* event,ArdourCanvas::Item*, TempoMarker*);
|
|
|
|
bool canvas_meter_marker_event (GdkEvent* event,ArdourCanvas::Item*, MeterMarker*);
|
2009-07-09 13:58:13 -04:00
|
|
|
bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*) ;
|
2009-09-08 17:45:44 -04:00
|
|
|
bool canvas_note_event (GdkEvent* event, ArdourCanvas::Item*);
|
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*);
|
2013-03-12 17:00:09 -04:00
|
|
|
#ifdef WITH_VIDEOTIMELINE
|
|
|
|
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 ();
|
2013-03-28 11:58:30 -04:00
|
|
|
void embed_audio_from_video (std::string, framepos_t n = 0);
|
2013-03-12 17:00:09 -04:00
|
|
|
#endif
|
2005-11-14 11:24:21 -05:00
|
|
|
|
2005-11-15 22:20:54 -05:00
|
|
|
bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
|
|
|
|
bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameTimeAxis*);
|
|
|
|
bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
|
|
|
|
bool canvas_imageframe_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
|
|
|
|
bool canvas_marker_time_axis_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerTimeAxis*);
|
|
|
|
bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
|
|
|
|
bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
|
|
|
|
bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
|
2011-05-25 21:29:59 -04:00
|
|
|
|
2011-02-14 16:49:43 -05:00
|
|
|
PBD::Signal0<void> EditorFreeze;
|
|
|
|
PBD::Signal0<void> EditorThaw;
|
2005-10-12 12:28:26 -04:00
|
|
|
|
2010-03-18 22:49:01 -04:00
|
|
|
private:
|
2011-05-25 21:29:59 -04:00
|
|
|
friend class DragManager;
|
|
|
|
friend class EditorRouteGroups;
|
|
|
|
friend class EditorRegions;
|
2010-03-18 22:49:01 -04:00
|
|
|
|
2010-11-15 14:00:31 -05:00
|
|
|
/** true if the mouse is over a place where region trim can happen */
|
|
|
|
bool _over_region_trim_target;
|
2010-08-26 22:01:59 -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_scroll_event (GdkEventScroll* event);
|
|
|
|
bool track_canvas_button_press_event (GdkEventButton* event);
|
|
|
|
bool track_canvas_button_release_event (GdkEventButton* event);
|
|
|
|
bool track_canvas_motion_notify_event (GdkEventMotion* event);
|
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
Gtk::Allocation canvas_allocation;
|
2005-11-15 21:57:22 -05:00
|
|
|
void track_canvas_allocate (Gtk::Allocation alloc);
|
2007-03-18 02:07:08 -04:00
|
|
|
bool track_canvas_size_allocated ();
|
2009-06-08 15:28:51 -04:00
|
|
|
bool track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const &, int, int, guint);
|
2010-09-21 10:22:13 -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 ();
|
|
|
|
|
|
|
|
/* display control */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
bool _show_measures;
|
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
|
|
|
|
2008-09-23 10:36:26 -04:00
|
|
|
TempoLines* tempo_lines;
|
2008-09-10 17:27:39 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Group* time_line_group;
|
2007-08-05 17:31:02 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void hide_measures ();
|
2012-11-27 17:48:59 -05:00
|
|
|
void draw_measures (ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
|
|
|
|
ARDOUR::TempoMap::BBTPointList::const_iterator& end);
|
2007-08-05 17:31:02 -04:00
|
|
|
bool redraw_measures ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void new_tempo_section ();
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void mouse_add_new_tempo_event (framepos_t where);
|
|
|
|
void mouse_add_new_meter_event (framepos_t where);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void remove_tempo_marker (ArdourCanvas::Item*);
|
|
|
|
void remove_meter_marker (ArdourCanvas::Item*);
|
2005-09-25 14:42:24 -04:00
|
|
|
gint real_remove_tempo_marker (ARDOUR::TempoSection*);
|
|
|
|
gint real_remove_meter_marker (ARDOUR::MeterSection*);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void edit_tempo_section (ARDOUR::TempoSection*);
|
|
|
|
void edit_meter_section (ARDOUR::MeterSection*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void edit_tempo_marker (ArdourCanvas::Item*);
|
|
|
|
void edit_meter_marker (ArdourCanvas::Item*);
|
2008-12-18 12:46:28 -05:00
|
|
|
void edit_control_point (ArdourCanvas::Item*);
|
2012-06-08 21:51:34 -04:00
|
|
|
void edit_notes (std::set<Gnome::Canvas::CanvasNoteEvent *> const &);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void marker_menu_edit ();
|
|
|
|
void marker_menu_remove ();
|
|
|
|
void marker_menu_rename ();
|
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 ();
|
|
|
|
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 ();
|
|
|
|
void update_loop_range_view (bool visibility=false);
|
|
|
|
void update_punch_range_view (bool visibility=false);
|
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*);
|
2011-10-16 17:58:29 -04:00
|
|
|
void build_range_marker_menu (bool, bool);
|
2011-01-03 20:40:47 -05:00
|
|
|
void build_marker_menu (ARDOUR::Location *);
|
2010-05-02 19:14:43 -04:00
|
|
|
void build_tempo_or_meter_marker_menu (bool);
|
2005-09-25 14:42:24 -04:00
|
|
|
void build_new_transport_marker_menu ();
|
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
|
|
|
|
2010-05-02 19:14:43 -04:00
|
|
|
Gtk::Menu* tempo_or_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* transport_marker_menu;
|
|
|
|
Gtk::Menu* new_transport_marker_menu;
|
2008-01-10 16:20:59 -05:00
|
|
|
Gtk::Menu* cd_marker_menu;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Item* marker_menu_item;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-05-12 13:03:42 -04:00
|
|
|
typedef std::list<Marker*> Marks;
|
2005-09-25 14:42:24 -04:00
|
|
|
Marks metric_marks;
|
|
|
|
|
|
|
|
void remove_metric_marks ();
|
|
|
|
void draw_metric_marks (const ARDOUR::Metrics& metrics);
|
|
|
|
|
2012-11-27 17:48:59 -05:00
|
|
|
void compute_current_bbt_points (framepos_t left, framepos_t right,
|
|
|
|
ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
|
|
|
|
ARDOUR::TempoMap::BBTPointList::const_iterator& end);
|
|
|
|
|
2010-02-19 13:09:08 -05:00
|
|
|
void tempo_map_changed (const PBD::PropertyChange&);
|
2007-04-12 19:20:37 -04:00
|
|
|
void redisplay_tempo (bool immediate_redraw);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
uint32_t bbt_beat_subdivision;
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
2011-06-02 13:50:37 -04:00
|
|
|
AudioClock* zoom_range_clock;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2012-12-06 15:48:44 -05:00
|
|
|
ArdourButton zoom_in_button;
|
|
|
|
ArdourButton zoom_out_button;
|
|
|
|
ArdourButton zoom_out_full_button;
|
|
|
|
|
|
|
|
ArdourButton tav_expand_button;
|
|
|
|
ArdourButton tav_shrink_button;
|
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
|
|
|
|
2010-03-18 22:49:01 -04:00
|
|
|
Gtkmm2ext::TearOff* _mouse_mode_tearoff;
|
2011-11-10 10:25:01 -05:00
|
|
|
ArdourButton mouse_select_button;
|
2012-01-19 10:23:51 -05:00
|
|
|
ArdourButton mouse_draw_button;
|
2011-11-10 10:25:01 -05:00
|
|
|
ArdourButton mouse_move_button;
|
|
|
|
ArdourButton mouse_gain_button;
|
|
|
|
ArdourButton mouse_zoom_button;
|
|
|
|
ArdourButton mouse_timefx_button;
|
|
|
|
ArdourButton mouse_audition_button;
|
2012-02-03 13:31:10 -05:00
|
|
|
|
2012-11-26 17:43:10 -05:00
|
|
|
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-11-10 10:25:01 -05:00
|
|
|
ArdourButton internal_edit_button;
|
|
|
|
void toggle_internal_editing ();
|
2009-07-28 16:51:28 -04:00
|
|
|
|
2011-04-19 06:43:43 -04:00
|
|
|
bool mouse_select_button_release (GdkEventButton*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::VBox automation_box;
|
|
|
|
Gtk::Button automation_mode_button;
|
|
|
|
|
2005-09-26 10:33:53 -04:00
|
|
|
Gtk::ComboBoxText edit_mode_selector;
|
2006-06-30 04:03:43 -04:00
|
|
|
Gtk::VBox edit_mode_box;
|
2011-05-25 21:29:59 -04:00
|
|
|
std::vector<std::string> edit_mode_strings;
|
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-11-15 21:57:22 -05:00
|
|
|
void edit_mode_selection_done ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-26 10:33:53 -04:00
|
|
|
Gtk::ComboBoxText snap_type_selector;
|
2006-06-30 04:03:43 -04:00
|
|
|
Gtk::ComboBoxText snap_mode_selector;
|
|
|
|
Gtk::HBox snap_box;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
std::vector<std::string> snap_type_strings;
|
|
|
|
std::vector<std::string> snap_mode_strings;
|
|
|
|
|
2005-11-15 21:57:22 -05:00
|
|
|
void snap_type_selection_done ();
|
|
|
|
void snap_mode_selection_done ();
|
2006-11-19 11:45:16 -05:00
|
|
|
void snap_mode_chosen (Editing::SnapMode);
|
|
|
|
void snap_type_chosen (Editing::SnapType);
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::RadioAction> snap_type_action (Editing::SnapType);
|
|
|
|
Glib::RefPtr<Gtk::RadioAction> snap_mode_action (Editing::SnapMode);
|
|
|
|
|
2005-09-26 10:33:53 -04:00
|
|
|
Gtk::ComboBoxText zoom_focus_selector;
|
2006-11-19 11:45:16 -05:00
|
|
|
Gtk::VBox zoom_focus_box;
|
|
|
|
|
|
|
|
std::vector<std::string> zoom_focus_strings;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-11-15 21:57:22 -05:00
|
|
|
void zoom_focus_selection_done ();
|
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
|
|
|
|
2010-07-14 13:47:54 -04:00
|
|
|
Gtk::HBox _zoom_box;
|
|
|
|
Gtkmm2ext::TearOff* _zoom_tearoff;
|
2005-09-25 14:42:24 -04:00
|
|
|
void zoom_adjustment_changed();
|
|
|
|
|
|
|
|
void setup_toolbar ();
|
|
|
|
|
2010-02-08 19:50:24 -05:00
|
|
|
void setup_tooltips ();
|
|
|
|
|
2010-03-18 22:49:01 -04:00
|
|
|
Gtkmm2ext::TearOff* _tools_tearoff;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::HBox toolbar_hbox;
|
|
|
|
Gtk::EventBox toolbar_base;
|
|
|
|
Gtk::Frame toolbar_frame;
|
2011-01-03 11:23:58 -05:00
|
|
|
Gtk::Viewport _toolbar_viewport;
|
2011-05-25 21:29:59 -04:00
|
|
|
|
2007-08-08 15:13:36 -04:00
|
|
|
/* midi toolbar */
|
|
|
|
|
2009-07-28 16:51:28 -04:00
|
|
|
Gtk::HBox panic_box;
|
2009-10-14 12:10:01 -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;
|
|
|
|
|
|
|
|
void time_selection_changed ();
|
|
|
|
void track_selection_changed ();
|
|
|
|
void region_selection_changed ();
|
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);
|
|
|
|
void sensitize_the_right_region_actions ();
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
bool audio_region_selection_covers (framepos_t where);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* transport range select process */
|
|
|
|
|
2008-02-16 17:43:18 -05:00
|
|
|
ArdourCanvas::SimpleRect* cd_marker_bar_drag_rect;
|
2005-11-25 19:06:46 -05:00
|
|
|
ArdourCanvas::SimpleRect* range_bar_drag_rect;
|
|
|
|
ArdourCanvas::SimpleRect* transport_bar_drag_rect;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
#ifdef GTKOSX
|
|
|
|
ArdourCanvas::SimpleRect *bogus_background_rect;
|
|
|
|
#endif
|
2005-11-25 19:06:46 -05:00
|
|
|
ArdourCanvas::SimpleRect *transport_bar_range_rect;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::SimpleRect *transport_bar_preroll_rect;
|
2005-11-25 19:06:46 -05:00
|
|
|
ArdourCanvas::SimpleRect *transport_bar_postroll_rect;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::SimpleRect *transport_loop_range_rect;
|
2005-11-25 19:06:46 -05:00
|
|
|
ArdourCanvas::SimpleRect *transport_punch_range_rect;
|
|
|
|
ArdourCanvas::SimpleLine *transport_punchin_line;
|
|
|
|
ArdourCanvas::SimpleLine *transport_punchout_line;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::SimpleRect *transport_preroll_rect;
|
|
|
|
ArdourCanvas::SimpleRect *transport_postroll_rect;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
ARDOUR::Location* transport_loop_location();
|
|
|
|
ARDOUR::Location* transport_punch_location();
|
|
|
|
|
|
|
|
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
|
|
|
|
2011-01-23 18:13:46 -05:00
|
|
|
void select_all_within (framepos_t, framepos_t, double, double, TrackViewList const &, Selection::Operation, bool);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-11-27 17:35:04 -05:00
|
|
|
ArdourCanvas::SimpleRect *rubberband_rect;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/* mouse zoom process */
|
|
|
|
|
2005-11-27 17:35:04 -05:00
|
|
|
ArdourCanvas::SimpleRect *zoom_rect;
|
2010-09-17 14:20:37 -04:00
|
|
|
void reposition_zoom_rect (framepos_t start, framepos_t end);
|
2009-07-01 19:20:18 -04:00
|
|
|
|
2009-07-03 14:37:15 -04:00
|
|
|
EditorRouteGroups* _route_groups;
|
|
|
|
EditorRoutes* _routes;
|
2009-07-03 18:42:22 -04:00
|
|
|
EditorRegions* _regions;
|
2009-07-03 19:51:58 -04:00
|
|
|
EditorSnapshots* _snapshots;
|
2009-11-12 00:47:05 -05:00
|
|
|
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
|
|
|
|
|
|
|
Gtk::VBox list_vpacker;
|
|
|
|
|
|
|
|
/* autoscrolling */
|
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
bool autoscroll_active;
|
2005-09-25 14:42:24 -04:00
|
|
|
int autoscroll_timeout_tag;
|
2008-04-11 10:06:50 -04:00
|
|
|
int autoscroll_x;
|
|
|
|
int autoscroll_y;
|
|
|
|
int last_autoscroll_x;
|
|
|
|
int last_autoscroll_y;
|
2005-09-25 14:42:24 -04:00
|
|
|
uint32_t autoscroll_cnt;
|
2010-09-17 14:20:37 -04:00
|
|
|
framecnt_t autoscroll_x_distance;
|
2008-04-11 10:06:50 -04:00
|
|
|
double autoscroll_y_distance;
|
2008-09-10 17:27:39 -04:00
|
|
|
|
2011-11-20 14:38:37 -05:00
|
|
|
bool _autoscroll_fudging;
|
|
|
|
int autoscroll_fudge_threshold () const;
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
static gint _autoscroll_canvas (void *);
|
2006-09-18 23:29:16 -04:00
|
|
|
bool autoscroll_canvas ();
|
2008-04-11 10:06:50 -04:00
|
|
|
void start_canvas_autoscroll (int x, int y);
|
2005-09-25 14:42:24 -04:00
|
|
|
void stop_canvas_autoscroll ();
|
|
|
|
|
|
|
|
/* trimming */
|
2010-09-17 14:20:37 -04:00
|
|
|
void point_trim (GdkEvent *, framepos_t);
|
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
|
|
|
int convert_drop_to_paths (
|
2010-09-14 11:45:21 -04:00
|
|
|
std::vector<std::string>& paths,
|
|
|
|
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 track_canvas_drag_data_received (
|
2010-09-14 11:45:21 -04: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 (
|
2010-09-14 11:45:21 -04: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 (
|
2010-09-14 11:45:21 -04: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_routes (
|
2010-09-14 11:45:21 -04: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
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/* audio export */
|
|
|
|
|
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);
|
2009-03-06 14:28:39 -05:00
|
|
|
void bounce_range_selection (bool replace, bool enable_processing);
|
2005-09-25 14:42:24 -04:00
|
|
|
void external_edit_region ();
|
|
|
|
|
|
|
|
int write_audio_selection (TimeSelection&);
|
2009-05-12 13:03:42 -04:00
|
|
|
bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, std::list<ARDOUR::AudioRange>&);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void write_selection ();
|
|
|
|
|
2006-08-12 04:20:24 -04:00
|
|
|
XMLNode *before; /* used in *_reversible_command */
|
|
|
|
|
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 ();
|
|
|
|
|
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);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t event_frame (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
|
|
|
|
*/
|
2010-09-17 14:20:37 -04:00
|
|
|
bool mouse_frame (framepos_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;
|
|
|
|
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
|
|
|
|
|
|
|
int time_stretch (RegionSelection&, float fraction);
|
|
|
|
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
|
|
|
|
2011-04-05 22:04:37 -04:00
|
|
|
void transpose_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 ();
|
|
|
|
|
2005-11-12 17:07:07 -05:00
|
|
|
void detach_tearoff (Gtk::Box* b, Gtk::Window* w);
|
|
|
|
void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n);
|
2008-12-12 09:43:24 -05:00
|
|
|
#ifdef GTKOSX
|
|
|
|
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
|
|
|
|
2007-05-10 22:54:43 -04:00
|
|
|
#ifdef WITH_CMT
|
2009-05-12 13:03:42 -04:00
|
|
|
void handle_new_imageframe_time_axis_view(const std::string & track_name, void* src) ;
|
2009-07-09 13:58:13 -04:00
|
|
|
void handle_new_imageframe_marker_time_axis_view(const std::string & track_name, TimeAxisView* marked_track) ;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_imageframe_grab(ArdourCanvas::Item*, GdkEvent*) ;
|
|
|
|
void start_markerview_grab(ArdourCanvas::Item*, GdkEvent*) ;
|
|
|
|
|
|
|
|
void imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
|
|
|
|
void markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
|
|
|
|
void timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent*) ;
|
|
|
|
|
|
|
|
gint canvas_imageframe_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
|
|
|
|
gint canvas_imageframe_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
|
|
|
|
gint canvas_imageframe_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
|
|
|
|
gint canvas_imageframe_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
|
|
|
|
|
|
|
|
gint canvas_marker_time_axis_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerTimeAxis* mta);
|
|
|
|
gint canvas_markerview_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
|
|
|
|
gint canvas_markerview_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
|
|
|
|
gint canvas_markerview_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
|
|
|
|
|
|
|
|
void imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void imageframe_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
void markerview_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
|
|
|
|
|
|
|
|
void popup_imageframe_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
|
|
|
|
void popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
ImageFrameSocketHandler* image_socket_listener ;
|
2007-05-10 22:54:43 -04:00
|
|
|
#endif
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
static const int32_t default_width = 995;
|
|
|
|
static const int32_t default_height = 765;
|
|
|
|
|
|
|
|
/* nudge */
|
|
|
|
|
2012-12-06 15:48:44 -05:00
|
|
|
ArdourButton nudge_forward_button;
|
|
|
|
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);
|
2009-08-26 23:09:30 -04:00
|
|
|
void apply_midi_note_edit_op (ARDOUR::MidiOperator& op);
|
|
|
|
|
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;
|
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;
|
2008-09-10 11:03:30 -04:00
|
|
|
ARDOUR::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
|
|
|
|
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*);
|
2009-07-09 13:58:13 -04:00
|
|
|
void ensure_track_visible (TimeAxisView*);
|
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 ();
|
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
bool on_key_press_event (GdkEventKey*);
|
2008-01-10 16:20:59 -05:00
|
|
|
bool on_key_release_event (GdkEventKey*);
|
2006-01-04 22:18:44 -05:00
|
|
|
|
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;
|
|
|
|
|
|
|
|
void history_changed ();
|
2007-10-11 18:07:47 -04:00
|
|
|
|
|
|
|
Gtk::HBox status_bar_hpacker;
|
2007-11-07 20:40:25 -05:00
|
|
|
|
|
|
|
Editing::EditPoint _edit_point;
|
|
|
|
|
|
|
|
Gtk::ComboBoxText edit_point_selector;
|
|
|
|
|
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 ();
|
2007-11-07 20:40:25 -05:00
|
|
|
void edit_point_selection_done ();
|
|
|
|
void edit_point_chosen (Editing::EditPoint);
|
|
|
|
Glib::RefPtr<Gtk::RadioAction> edit_point_action (Editing::EditPoint);
|
|
|
|
std::vector<std::string> edit_point_strings;
|
2007-11-12 17:23:01 -05:00
|
|
|
|
|
|
|
void selected_marker_moved (ARDOUR::Location*);
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
bool get_edit_op_range (framepos_t& start, framepos_t& end) const;
|
2007-11-12 17:23:01 -05:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void get_regions_at (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
|
|
|
|
void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2011-01-19 13:35:11 -05:00
|
|
|
RegionSelection get_regions_from_selection ();
|
2010-11-03 18:19:29 -04:00
|
|
|
RegionSelection get_regions_from_selection_and_edit_point ();
|
|
|
|
RegionSelection get_regions_from_selection_and_entered ();
|
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
|
|
|
|
|
|
|
void select_next_route ();
|
|
|
|
void select_prev_route ();
|
2008-02-01 22:57:35 -05:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
|
|
|
|
void timecode_snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
|
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 &);
|
2009-06-21 21:01:43 -04:00
|
|
|
void fit_selected_tracks ();
|
2010-05-10 20:09:41 -04:00
|
|
|
void set_track_height (Height);
|
2008-03-17 16:54:03 -04:00
|
|
|
|
|
|
|
void remove_tracks ();
|
|
|
|
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
|
|
|
|
2009-06-10 21:05:01 -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-12 15:05:16 -04:00
|
|
|
void update_canvas_now ();
|
|
|
|
|
2009-06-20 09:41:55 -04:00
|
|
|
EditorGroupTabs* _group_tabs;
|
2009-07-03 14:37:15 -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 ();
|
|
|
|
std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_in_images;
|
|
|
|
std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_out_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 &);
|
|
|
|
|
2011-05-25 21:29:59 -04:00
|
|
|
void set_canvas_cursor_for_region_view (double, RegionView *);
|
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;
|
|
|
|
|
2012-01-27 11:29:01 -05:00
|
|
|
int time_fx (ARDOUR::RegionList&, float val, bool pitching);
|
|
|
|
|
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
|
|
|
|
stepped in height using Shift-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 shift key is released. In this (hacky) way, pushing shift and moving the scroll wheel
|
|
|
|
will operate on the same track until shift is released (rather than skipping about to whatever
|
|
|
|
happens to be underneath the mouse at the time).
|
|
|
|
*/
|
|
|
|
TimeAxisView* _stepping_axis_view;
|
|
|
|
void shift_key_released ();
|
|
|
|
|
2009-05-30 14:25:59 -04:00
|
|
|
friend class Drag;
|
|
|
|
friend class RegionDrag;
|
|
|
|
friend class RegionMoveDrag;
|
|
|
|
friend class RegionSpliceDrag;
|
|
|
|
friend class TrimDrag;
|
|
|
|
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
|
|
|
#ifdef WITH_VIDEOTIMELINE
|
|
|
|
friend class VideoTimeLineDrag;
|
|
|
|
#endif
|
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__ */
|