2005-09-25 14:42:24 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2000-2003 Paul Davis
|
|
|
|
|
|
|
|
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>
|
2009-01-05 22:18:09 -05:00
|
|
|
#include <bitset>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
#include <glibmm/ustring.h>
|
|
|
|
|
|
|
|
#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-25 16:33:00 -04:00
|
|
|
#include <gtkmm/layout.h>
|
2005-09-26 10:33:53 -04:00
|
|
|
#include <gtkmm/comboboxtext.h>
|
2005-10-22 11:30:17 -04:00
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <gtkmm2ext/selector.h>
|
|
|
|
#include <gtkmm2ext/click_box.h>
|
2005-12-29 19:34:21 -05:00
|
|
|
#include <gtkmm2ext/dndtreeview.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-07-13 23:43:32 -04:00
|
|
|
#include <pbd/stateful.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
#include <ardour/session.h>
|
|
|
|
#include <ardour/tempo.h>
|
2008-01-10 16:20:59 -05:00
|
|
|
#include <ardour/stretch.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
#include <ardour/location.h>
|
2007-01-28 12:44:13 -05:00
|
|
|
#include <ardour/audioregion.h>
|
2008-02-18 14:45:52 -05:00
|
|
|
#include <ardour/track.h>
|
2009-01-05 22:18:09 -05:00
|
|
|
#include <ardour/types.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "audio_clock.h"
|
|
|
|
#include "gtk-custom-ruler.h"
|
|
|
|
#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"
|
2006-03-07 21:50:53 -05:00
|
|
|
#include "draginfo.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
namespace Gtkmm2ext {
|
2005-09-25 14:42:24 -04:00
|
|
|
class TearOff;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
2006-06-14 21:34:54 -04:00
|
|
|
class AudioDiskstream;
|
2005-09-25 14:42:24 -04:00
|
|
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Region;
|
|
|
|
class Location;
|
|
|
|
class TempoSection;
|
|
|
|
class NamedSelection;
|
|
|
|
class Session;
|
2007-08-06 01:30:18 -04:00
|
|
|
class Filter;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Crossfade;
|
2006-08-12 04:20:24 -04:00
|
|
|
class ChanCount;
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace LADSPA {
|
|
|
|
class Plugin;
|
|
|
|
}
|
|
|
|
|
|
|
|
class TimeAxisView;
|
|
|
|
class AudioTimeAxisView;
|
|
|
|
class AutomationTimeAxisView;
|
|
|
|
class AudioRegionView;
|
|
|
|
class CrossfadeView;
|
|
|
|
class PluginSelector;
|
|
|
|
class PlaylistSelector;
|
|
|
|
class Marker;
|
|
|
|
class GroupedButtons;
|
|
|
|
class AutomationLine;
|
|
|
|
class Selection;
|
2008-09-23 10:36:26 -04:00
|
|
|
class TempoLines;
|
2005-09-25 14:42:24 -04:00
|
|
|
class TimeSelection;
|
|
|
|
class TrackSelection;
|
|
|
|
class AutomationSelection;
|
|
|
|
class MixerStrip;
|
|
|
|
class StreamView;
|
2006-07-23 08:03:19 -04:00
|
|
|
class AudioStreamView;
|
2005-09-25 14:42:24 -04:00
|
|
|
class ControlPoint;
|
2007-10-11 18:07:47 -04:00
|
|
|
class SoundFileOmega;
|
2008-02-01 22:57:35 -05:00
|
|
|
class RhythmFerret;
|
2006-03-12 17:06:41 -05:00
|
|
|
class AnalysisWindow;
|
2009-01-20 09:46:00 -05:00
|
|
|
class BundleManager;
|
2009-01-23 16:24:11 -05:00
|
|
|
class GlobalPortMatrixWindow;
|
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> */
|
|
|
|
|
|
|
|
|
|
|
|
class Editor : public PublicEditor
|
|
|
|
{
|
|
|
|
public:
|
2007-03-18 02:07:08 -04:00
|
|
|
Editor ();
|
2005-09-25 14:42:24 -04:00
|
|
|
~Editor ();
|
2008-09-19 10:38:46 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void connect_to_session (ARDOUR::Session *);
|
|
|
|
ARDOUR::Session* current_session() const { return session; }
|
2008-03-17 16:54:03 -04:00
|
|
|
void first_idle ();
|
|
|
|
virtual bool have_idled() const { return _have_idled; }
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t leftmost_position() const { return leftmost_frame; }
|
|
|
|
nframes64_t current_page_frames() const {
|
|
|
|
return (nframes64_t) floor (canvas_width * frames_per_unit);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void cycle_snap_mode ();
|
|
|
|
void cycle_snap_choice ();
|
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;}
|
|
|
|
|
|
|
|
void undo (uint32_t n = 1);
|
|
|
|
void redo (uint32_t n = 1);
|
|
|
|
|
|
|
|
XMLNode& get_state ();
|
|
|
|
int set_state (const XMLNode& );
|
|
|
|
|
|
|
|
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; }
|
2007-08-08 15:13:36 -04:00
|
|
|
|
2007-08-10 16:55:27 -04:00
|
|
|
void set_midi_edit_cursor (Editing::MidiEditMode);
|
2007-08-08 15:13:36 -04:00
|
|
|
void set_midi_edit_mode (Editing::MidiEditMode, bool force=true);
|
|
|
|
Editing::MidiEditMode current_midi_edit_mode () const { return midi_edit_mode; }
|
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*) ;
|
|
|
|
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) ;
|
2007-05-10 22:54:43 -04:00
|
|
|
#endif
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
TimeAxisView* get_named_time_axis(const std::string & name) ;
|
|
|
|
void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
|
2008-09-10 11:03:30 -04:00
|
|
|
void add_to_idle_resize (TimeAxisView*, uint32_t);
|
2008-03-17 16:54:03 -04:00
|
|
|
|
2008-02-10 13:16:25 -05:00
|
|
|
RouteTimeAxisView* get_route_view_by_id (PBD::ID& id);
|
|
|
|
|
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>);
|
|
|
|
void remove_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;
|
|
|
|
#endif
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/* option editor-access */
|
|
|
|
|
|
|
|
void set_show_waveforms (bool yn);
|
|
|
|
bool show_waveforms() const { return _show_waveforms; }
|
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
void set_waveform_scale (Editing::WaveformScale);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void set_show_waveforms_recording (bool yn);
|
|
|
|
bool show_waveforms_recording() const { return _show_waveforms_recording; }
|
|
|
|
|
|
|
|
/* 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 ();
|
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&);
|
2005-09-25 14:42:24 -04:00
|
|
|
void toggle_playback (bool with_abort);
|
2007-01-28 12:44:13 -05:00
|
|
|
void transition_to_rolling (bool forward);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* undo related */
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t unit_to_frame (double unit) const {
|
|
|
|
return (nframes64_t) rint (unit * frames_per_unit);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
double frame_to_unit (nframes64_t frame) const {
|
2005-09-25 14:42:24 -04:00
|
|
|
return rint ((double) frame / (double) 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
|
|
|
|
xscroll_adjustment.
|
|
|
|
*/
|
|
|
|
|
2007-11-07 20:40:25 -05:00
|
|
|
nframes64_t pixel_to_frame (double pixel) const {
|
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) {
|
2008-09-10 11:03:30 -04:00
|
|
|
return (nframes64_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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-11-07 20:40:25 -05:00
|
|
|
gulong frame_to_pixel (nframes64_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; }
|
|
|
|
|
2007-01-09 18:24:54 -05:00
|
|
|
bool extend_selection_to_track (TimeAxisView&);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void play_selection ();
|
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 ();
|
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 */
|
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 */
|
|
|
|
|
2008-09-17 04:44:51 -04:00
|
|
|
void export_audio ();
|
|
|
|
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
|
|
|
|
|
|
|
void set_zoom_focus (Editing::ZoomFocus);
|
|
|
|
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
|
2008-01-10 16:20:59 -05:00
|
|
|
double get_current_zoom () const { return frames_per_unit; }
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void temporal_zoom_step (bool coarser);
|
|
|
|
|
|
|
|
/* stuff that AudioTimeAxisView and related classes use */
|
|
|
|
|
|
|
|
PlaylistSelector& playlist_selector() const;
|
|
|
|
void route_name_changed (TimeAxisView *);
|
2007-01-09 18:24:54 -05:00
|
|
|
void clear_playlist (boost::shared_ptr<ARDOUR::Playlist>);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-06 12:24:08 -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
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0);
|
|
|
|
|
|
|
|
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);
|
2005-09-25 14:42:24 -04:00
|
|
|
void set_selected_mixer_strip (TimeAxisView&);
|
2008-09-10 11:03:30 -04:00
|
|
|
void hide_track_in_display (TimeAxisView& tv, bool temporary = false);
|
2006-01-09 23:25:47 -05:00
|
|
|
void show_track_in_display (TimeAxisView& tv);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* nudge is initiated by transport controls owned by ARDOUR_UI */
|
|
|
|
|
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 */
|
|
|
|
|
|
|
|
void set_follow_playhead (bool yn);
|
|
|
|
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
|
|
|
|
2006-01-07 21:56:49 -05:00
|
|
|
void toggle_waveform_visibility ();
|
2008-02-10 13:16:25 -05:00
|
|
|
void toggle_zero_line_visibility ();
|
2006-01-07 21:56:49 -05:00
|
|
|
void toggle_waveforms_while_recording ();
|
|
|
|
void toggle_measure_visibility ();
|
2007-10-11 18:07:47 -04:00
|
|
|
void toggle_logo_visibility ();
|
2006-01-07 21:56:49 -05:00
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
double get_physical_screen_width () const { return physical_screen_width; };
|
2008-10-10 20:04:33 -04:00
|
|
|
double physical_screen_width;
|
|
|
|
double physical_screen_height;
|
|
|
|
|
2006-09-18 23:29:16 -04:00
|
|
|
/* SMPTE timecode & video sync */
|
|
|
|
|
2007-01-09 18:24:54 -05:00
|
|
|
void smpte_fps_chosen (ARDOUR::SmpteFormat format);
|
2006-09-18 23:29:16 -04:00
|
|
|
void video_pullup_chosen (ARDOUR::Session::PullupFormat pullup);
|
2007-01-09 18:24:54 -05:00
|
|
|
void subframes_per_frame_chosen (uint32_t);
|
2006-09-18 23:29:16 -04:00
|
|
|
|
|
|
|
void update_smpte_mode();
|
|
|
|
void update_video_pullup();
|
2007-01-09 18:24:54 -05:00
|
|
|
void update_subframes_per_frame ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-10-09 10:15:45 -04:00
|
|
|
/* fades/xfades */
|
|
|
|
|
|
|
|
void toggle_region_fades ();
|
2008-10-09 17:55:05 -04:00
|
|
|
void toggle_region_fades_visible ();
|
|
|
|
void toggle_selected_region_fades (int dir);
|
|
|
|
void update_region_fade_visibility ();
|
2006-03-21 10:27:57 -05:00
|
|
|
void toggle_auto_xfade ();
|
|
|
|
void toggle_xfades_active ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void toggle_xfade_visibility ();
|
|
|
|
bool xfade_visibility() const { return _xfade_visibility; }
|
2007-04-22 14:01:10 -04:00
|
|
|
void update_xfade_visibility ();
|
2006-03-21 10:27:57 -05:00
|
|
|
void update_crossfade_model ();
|
|
|
|
void set_crossfade_model (ARDOUR::CrossfadeModel);
|
|
|
|
|
2006-09-18 23:29:16 -04:00
|
|
|
/* layers */
|
2006-10-21 15:01:50 -04:00
|
|
|
void set_layer_model (ARDOUR::LayerModel);
|
2006-03-21 10:27:57 -05:00
|
|
|
void update_layering_model ();
|
2008-01-10 16:20:59 -05:00
|
|
|
|
|
|
|
void toggle_link_region_and_track_selection ();
|
2008-12-16 18:21:01 -05:00
|
|
|
void toggle_automation_follows_regions ();
|
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
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void scroll_tracks_down_line ();
|
|
|
|
void scroll_tracks_up_line ();
|
|
|
|
|
2008-12-08 13:16:12 -05:00
|
|
|
void move_selected_tracks (bool up);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
|
|
|
|
void prepare_for_cleanup ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void finish_cleanup ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-01-19 13:05:31 -05:00
|
|
|
void maximise_editing_space();
|
|
|
|
void restore_editing_space();
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void reset_x_origin (nframes64_t);
|
2007-01-11 15:36:35 -05:00
|
|
|
void reset_zoom (double);
|
2008-09-10 11:03:30 -04:00
|
|
|
void reposition_and_zoom (nframes64_t, double);
|
2007-01-11 15:36:35 -05:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
nframes64_t get_preferred_edit_position (bool ignore_playhead = 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();
|
2009-01-20 09:46:00 -05:00
|
|
|
void show_bundle_manager ();
|
2009-01-23 16:24:11 -05:00
|
|
|
void show_global_port_matrix (ARDOUR::DataType);
|
2008-02-01 22:57:35 -05:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void goto_visual_state (uint32_t);
|
|
|
|
void save_visual_state (uint32_t);
|
|
|
|
|
|
|
|
void queue_draw_resize_line (int at);
|
|
|
|
void start_resize_line_ops ();
|
|
|
|
void end_resize_line_ops ();
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
protected:
|
|
|
|
void map_transport_state ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void map_position_change (nframes64_t);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 22:48:59 -04:00
|
|
|
void on_realize();
|
2008-09-10 11:03:30 -04:00
|
|
|
bool on_expose_event (GdkEventExpose*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
private:
|
2007-05-11 11:06:12 -04:00
|
|
|
|
|
|
|
/// The session that we are editing, or 0
|
2007-06-15 18:08:27 -04:00
|
|
|
void color_handler ();
|
2005-09-25 14:42:24 -04:00
|
|
|
ARDOUR::Session *session;
|
|
|
|
bool constructed;
|
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
// to keep track of the playhead position for control_scroll
|
2008-09-10 11:03:30 -04:00
|
|
|
boost::optional<nframes64_t> _control_scroll_target;
|
2007-10-11 18:07:47 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
PlaylistSelector* _playlist_selector;
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
typedef std::pair<TimeAxisView*,XMLNode*> TAVState;
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
struct VisualState {
|
2008-09-10 11:03:30 -04:00
|
|
|
double y_position;
|
|
|
|
double frames_per_unit;
|
|
|
|
nframes64_t leftmost_frame;
|
|
|
|
Editing::ZoomFocus zoom_focus;
|
|
|
|
bool zoomed_to_region;
|
|
|
|
std::list<TAVState> track_states;
|
2008-01-10 16:20:59 -05: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 ();
|
|
|
|
|
|
|
|
std::vector<VisualState*> visual_states;
|
|
|
|
sigc::connection visual_state_op_connection;
|
|
|
|
void start_visual_state_op (uint32_t n);
|
|
|
|
void cancel_visual_state_op (uint32_t n);
|
|
|
|
bool end_visual_state_op (uint32_t n);
|
2008-01-10 16:20:59 -05:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_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);
|
|
|
|
void post_zoom ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
Editing::MouseMode mouse_mode;
|
2007-08-08 15:13:36 -04:00
|
|
|
Editing::MidiEditMode midi_edit_mode;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
int post_maximal_editor_width;
|
|
|
|
int post_maximal_pane_position;
|
2006-01-19 13:05:31 -05:00
|
|
|
int pre_maximal_pane_position;
|
2006-11-19 11:45:16 -05:00
|
|
|
int pre_maximal_editor_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
|
|
|
|
2005-12-07 12:15:37 -05:00
|
|
|
Gtk::Notebook the_notebook;
|
|
|
|
Gtk::HPaned edit_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_s (ARDOUR::Change);
|
|
|
|
void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
|
|
|
|
void add_new_location (ARDOUR::Location *);
|
|
|
|
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);
|
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 {
|
|
|
|
Marker* start;
|
|
|
|
Marker* end;
|
2007-11-12 17:23:01 -05:00
|
|
|
bool valid;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-11-12 17:23:01 -05:00
|
|
|
LocationMarkers () : start(0), end(0), valid (true) {}
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
~LocationMarkers ();
|
|
|
|
|
|
|
|
void hide();
|
|
|
|
void show ();
|
|
|
|
void set_name (const string&);
|
2008-09-10 11:03:30 -04:00
|
|
|
void set_position (nframes64_t start, nframes64_t end = 0);
|
2005-09-25 14:42:24 -04:00
|
|
|
void set_color_rgba (uint32_t);
|
|
|
|
};
|
|
|
|
|
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;
|
2007-11-12 17:23:01 -05:00
|
|
|
Marker* entered_marker;
|
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;
|
|
|
|
|
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 ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false);
|
|
|
|
bool choose_new_marker_name(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
|
|
|
|
2006-08-16 16:36:14 -04:00
|
|
|
TimeAxisView* clicked_axisview;
|
|
|
|
RouteTimeAxisView* clicked_routeview;
|
2007-05-10 07:53:35 -04: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;
|
|
|
|
CrossfadeView* clicked_crossfadeview;
|
|
|
|
ControlPoint* clicked_control_point;
|
|
|
|
|
2008-01-10 17:22:29 -05:00
|
|
|
void sort_track_selection (TrackSelection* sel = 0);
|
2007-01-28 12:44:13 -05:00
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
void get_relevant_tracks (std::set<RouteTimeAxisView*>& relevant_tracks);
|
2007-10-07 11:51:14 -04:00
|
|
|
void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&) const;
|
|
|
|
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*) 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 */
|
2006-03-05 14:39:16 -05:00
|
|
|
|
2007-10-07 11:51:14 -04:00
|
|
|
void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, vector<RegionView*>*) const;
|
2008-10-06 14:04:12 -04:00
|
|
|
void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
|
|
|
|
void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
|
2006-08-16 16:36:14 -04:00
|
|
|
void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
|
2006-03-05 14:39:16 -05:00
|
|
|
|
|
|
|
/* end */
|
|
|
|
|
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
|
|
|
|
2008-01-10 16:20:59 -05: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 ();
|
2008-12-08 13:16:12 -05:00
|
|
|
|
2008-09-19 10:38:46 -04:00
|
|
|
int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region> region);
|
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
|
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);
|
|
|
|
void set_selected_track_as_side_effect (bool force = false);
|
2006-06-13 03:27:52 -04:00
|
|
|
bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false);
|
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
|
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 *);
|
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;
|
|
|
|
Gtk::Menu track_crossfade_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
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void popup_track_context_menu (int, int, ItemType, bool, nframes64_t);
|
|
|
|
Gtk::Menu* build_track_context_menu (nframes64_t);
|
|
|
|
Gtk::Menu* build_track_bus_context_menu (nframes64_t);
|
|
|
|
Gtk::Menu* build_track_region_context_menu (nframes64_t frame);
|
|
|
|
Gtk::Menu* build_track_crossfade_context_menu (nframes64_t);
|
|
|
|
Gtk::Menu* build_track_selection_context_menu (nframes64_t);
|
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&);
|
|
|
|
void add_region_context_items (StreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
|
2007-01-11 14:50:49 -05:00
|
|
|
void add_crossfade_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Crossfade>, Gtk::Menu_Helpers::MenuList&, bool many);
|
2005-09-25 14:42:24 -04:00
|
|
|
void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
|
|
|
|
|
2007-05-10 07:53:35 -04:00
|
|
|
void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList&, Gtk::Menu_Helpers::MenuElem, bool) const;
|
|
|
|
|
2009-01-30 02:40:13 -05:00
|
|
|
void handle_new_route (ARDOUR::RouteList&);
|
2005-09-25 14:42:24 -04:00
|
|
|
void remove_route (TimeAxisView *);
|
|
|
|
bool route_removal;
|
|
|
|
|
|
|
|
Gtk::HBox global_hpacker;
|
|
|
|
Gtk::VBox global_vpacker;
|
|
|
|
Gtk::VBox vpacker;
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
bool need_resize_line;
|
|
|
|
int resize_line_y;
|
|
|
|
int old_resize_line_y;
|
|
|
|
|
2005-10-28 18:19:45 -04:00
|
|
|
Gdk::Cursor* current_canvas_cursor;
|
2008-02-16 17:43:18 -05:00
|
|
|
void set_canvas_cursor ();
|
|
|
|
Gdk::Cursor* which_grabber_cursor ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
ArdourCanvas::Canvas* track_canvas;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Text* first_action_message;
|
|
|
|
ArdourCanvas::Text* verbose_canvas_cursor;
|
2005-10-12 12:28:26 -04:00
|
|
|
bool verbose_cursor_visible;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
void parameter_changed (const char *);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
bool track_canvas_motion (GdkEvent*);
|
|
|
|
|
2005-12-22 07:23:54 -05:00
|
|
|
void set_verbose_canvas_cursor (const string &, double x, double y);
|
|
|
|
void set_verbose_canvas_cursor_text (const string &);
|
2005-09-25 14:42:24 -04:00
|
|
|
void show_verbose_canvas_cursor();
|
|
|
|
void hide_verbose_canvas_cursor();
|
|
|
|
|
|
|
|
bool verbose_cursor_on; // so far unused
|
|
|
|
|
|
|
|
Gtk::EventBox time_canvas_event_box;
|
|
|
|
Gtk::EventBox track_canvas_event_box;
|
|
|
|
Gtk::EventBox time_button_event_box;
|
2008-09-10 17:27:39 -04:00
|
|
|
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;
|
|
|
|
ArdourCanvas::Group *smpte_group;
|
|
|
|
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;
|
|
|
|
/*
|
|
|
|
The _master_group is the group containing all items
|
|
|
|
that require horizontal scrolling..
|
|
|
|
It is primarily used to separate canvas items
|
|
|
|
that require horizontal scrolling from those that do not.
|
|
|
|
*/
|
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;
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
enum RulerType {
|
2005-09-25 14:42:24 -04:00
|
|
|
ruler_metric_smpte = 0,
|
|
|
|
ruler_metric_bbt = 1,
|
|
|
|
ruler_metric_frames = 2,
|
|
|
|
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,
|
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;
|
|
|
|
Glib::RefPtr<Gtk::ToggleAction> ruler_samples_action;
|
|
|
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
bool no_ruler_shown_update;
|
|
|
|
|
|
|
|
gint ruler_button_press (GdkEventButton*);
|
|
|
|
gint ruler_button_release (GdkEventButton*);
|
|
|
|
gint 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
|
|
|
|
|
|
|
gint ruler_pressed_button;
|
|
|
|
Gtk::Widget * ruler_grabbed_widget;
|
|
|
|
|
|
|
|
void initialize_rulers ();
|
|
|
|
void update_just_smpte ();
|
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 ();
|
|
|
|
void update_tempo_based_rulers ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void popup_ruler_menu (nframes64_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);
|
|
|
|
gint ruler_label_button_release (GdkEventButton*);
|
|
|
|
void store_ruler_visibility ();
|
|
|
|
void restore_ruler_visibility ();
|
|
|
|
|
2005-11-25 19:06:46 -05:00
|
|
|
static gint _metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
|
|
|
static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
|
|
|
static gint _metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
|
|
|
static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
2005-09-25 14:42:24 -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;
|
|
|
|
|
|
|
|
nframes_t minsec_mark_interval;
|
|
|
|
gint minsec_mark_modulo;
|
|
|
|
gint minsec_nmarks;
|
|
|
|
void set_minsec_ruler_scale (gdouble lower, gdouble upper);
|
|
|
|
|
|
|
|
enum SMPTERulerScale {
|
|
|
|
smpte_show_bits,
|
|
|
|
smpte_show_frames,
|
|
|
|
smpte_show_seconds,
|
|
|
|
smpte_show_minutes,
|
|
|
|
smpte_show_hours
|
|
|
|
};
|
|
|
|
|
|
|
|
SMPTERulerScale smpte_ruler_scale;
|
|
|
|
|
|
|
|
nframes_t smpte_mark_interval;
|
|
|
|
gint smpte_mark_modulo;
|
|
|
|
gint smpte_nmarks;
|
|
|
|
void set_smpte_ruler_scale (gdouble lower, gdouble upper);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
uint32_t bbt_bars;
|
|
|
|
gint bbt_nmarks;
|
|
|
|
uint32_t bbt_bar_helper_on;
|
|
|
|
uint32_t bbt_accent_modulo;
|
2008-09-10 11:03:30 -04:00
|
|
|
void compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper);
|
use filechooser widget in export dialog, selected files set format combos, hide progress bar until use in export dialog, speed up 'separate regions in range' operation on larger sessions, ruler scale now calculated separately to mark generation, fix for non-stacked layering regression, try not to generate 'buried' crossfades, use playlist->freeze() to speed up copying/moving regions on large playlists (not done for undo), width dependent items now reset on regionview init, get rid of jack_port_ensure_monitor check, remove audiosourse _length (only source has a length.. i think), make overlapend differ to overlapexternal where start points coincide.
git-svn-id: svn://localhost/ardour2/trunk@2576 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-26 09:32:24 -04:00
|
|
|
|
2005-11-25 19:06:46 -05:00
|
|
|
gint metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
|
|
|
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
|
|
|
gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
|
|
|
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;
|
2005-09-25 14:42:24 -04:00
|
|
|
GtkWidget *_smpte_ruler;
|
|
|
|
GtkWidget *_bbt_ruler;
|
|
|
|
GtkWidget *_frames_ruler;
|
|
|
|
GtkWidget *_minsec_ruler;
|
|
|
|
Gtk::Widget *smpte_ruler;
|
|
|
|
Gtk::Widget *bbt_ruler;
|
|
|
|
Gtk::Widget *frames_ruler;
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Label minsec_label;
|
|
|
|
Gtk::Label bbt_label;
|
|
|
|
Gtk::Label smpte_label;
|
|
|
|
Gtk::Label frame_label;
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
Gtk::VBox time_button_vbox;
|
|
|
|
Gtk::HBox time_button_hbox;
|
|
|
|
|
|
|
|
struct Cursor {
|
2005-11-12 17:07:07 -05:00
|
|
|
Editor& editor;
|
2005-11-22 00:10:12 -05:00
|
|
|
ArdourCanvas::Points points;
|
|
|
|
ArdourCanvas::Line canvas_item;
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t current_frame;
|
2005-11-12 17:07:07 -05:00
|
|
|
double length;
|
|
|
|
|
2007-03-18 02:07:08 -04:00
|
|
|
Cursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
|
2005-09-25 14:42:24 -04:00
|
|
|
~Cursor ();
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void set_position (nframes64_t);
|
2005-09-25 14:42:24 -04:00
|
|
|
void set_length (double units);
|
2005-11-12 17:07:07 -05:00
|
|
|
void set_y_axis (double position);
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
friend struct Cursor; /* it needs access to several private
|
|
|
|
fields. XXX fix me.
|
|
|
|
*/
|
|
|
|
|
|
|
|
Cursor* playhead_cursor;
|
2005-11-14 11:24:21 -05:00
|
|
|
ArdourCanvas::Group* cursor_group;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void cursor_to_region_boundary (Cursor*, int32_t dir);
|
|
|
|
void cursor_to_next_region_boundary (Cursor*);
|
|
|
|
void cursor_to_previous_region_boundary (Cursor*);
|
2005-09-25 14:42:24 -04:00
|
|
|
void cursor_to_next_region_point (Cursor*, ARDOUR::RegionPoint);
|
|
|
|
void cursor_to_previous_region_point (Cursor*, ARDOUR::RegionPoint);
|
|
|
|
void cursor_to_region_point (Cursor*, ARDOUR::RegionPoint, int32_t dir);
|
|
|
|
void cursor_to_selection_start (Cursor *);
|
|
|
|
void cursor_to_selection_end (Cursor *);
|
2007-11-12 17:23:01 -05:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void selected_marker_to_region_boundary (int32_t dir);
|
|
|
|
void selected_marker_to_next_region_boundary ();
|
|
|
|
void selected_marker_to_previous_region_boundary ();
|
|
|
|
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
|
|
|
|
2006-02-15 07:15:29 -05:00
|
|
|
void select_all_selectables_using_cursor (Cursor *, 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
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes64_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
|
2008-01-10 16:20:59 -05:00
|
|
|
nframes64_t find_next_region_boundary (nframes64_t, int32_t dir, const TrackViewList&);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
vector<nframes64_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;
|
|
|
|
|
|
|
|
Gtk::Table edit_packer;
|
|
|
|
Gtk::VScrollbar edit_vscrollbar;
|
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
Gtk::Adjustment vertical_adjustment;
|
|
|
|
Gtk::Adjustment horizontal_adjustment;
|
|
|
|
|
|
|
|
Gtk::Layout controls_layout;
|
2006-01-10 07:33:26 -05:00
|
|
|
bool control_layout_scroll (GdkEventScroll* ev);
|
2006-01-08 09:50:41 -05:00
|
|
|
void controls_layout_size_request (Gtk::Requisition*);
|
2008-09-24 15:23:43 -04:00
|
|
|
sigc::connection controls_layout_size_request_connection;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::HScrollbar edit_hscrollbar;
|
2007-03-18 02:07:08 -04:00
|
|
|
bool _dragging_hscrollbar;
|
2006-04-18 22:11:39 -04:00
|
|
|
|
|
|
|
void reset_hscrollbar_stepping ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
bool hscrollbar_button_press (GdkEventButton*);
|
|
|
|
bool hscrollbar_button_release (GdkEventButton*);
|
|
|
|
void hscrollbar_allocate (Gtk::Allocation &alloc);
|
|
|
|
|
2005-12-07 12:15:37 -05:00
|
|
|
double canvas_width;
|
|
|
|
double canvas_height;
|
2007-01-09 18:24:54 -05:00
|
|
|
double full_canvas_height;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-28 23:41:15 -05:00
|
|
|
bool track_canvas_map_handler (GdkEventAny*);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
gint edit_controls_button_release (GdkEventButton*);
|
|
|
|
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
|
|
|
|
2006-04-06 12:51:27 -04:00
|
|
|
void control_scroll (float);
|
2008-09-10 11:03:30 -04:00
|
|
|
void access_action (std::string,std::string);
|
|
|
|
bool deferred_control_scroll (nframes64_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;}
|
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 ();
|
2008-09-10 17:27:39 -04:00
|
|
|
void scroll_canvas_horizontally ();
|
|
|
|
void scroll_canvas_vertically ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void canvas_horizontally_scrolled ();
|
2008-01-10 16:20:59 -05:00
|
|
|
void canvas_scroll_to (nframes64_t);
|
2006-09-18 23:29:16 -04:00
|
|
|
|
2007-01-11 15:36:35 -05:00
|
|
|
struct VisualChange {
|
|
|
|
enum Type {
|
|
|
|
TimeOrigin = 0x1,
|
|
|
|
ZoomLevel = 0x2
|
|
|
|
};
|
|
|
|
|
|
|
|
Type pending;
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t time_origin;
|
2007-01-11 15:36:35 -05:00
|
|
|
double frames_per_unit;
|
|
|
|
|
|
|
|
int idle_handler_id;
|
|
|
|
|
|
|
|
VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
VisualChange pending_visual_change;
|
|
|
|
|
|
|
|
static int _idle_visual_changer (void *arg);
|
|
|
|
int idle_visual_changer ();
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void queue_visual_change (nframes64_t);
|
2007-01-11 15:36:35 -05:00
|
|
|
void queue_visual_change (double);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void end_location_changed (ARDOUR::Location*);
|
|
|
|
|
2005-10-09 01:03:29 -04:00
|
|
|
struct RegionListDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
RegionListDisplayModelColumns() {
|
2008-09-19 10:38:46 -04:00
|
|
|
add (name);
|
2005-10-09 01:03:29 -04:00
|
|
|
add (region);
|
2006-01-01 10:31:59 -05:00
|
|
|
add (color_);
|
2008-09-19 10:38:46 -04:00
|
|
|
add (start);
|
|
|
|
add (end);
|
|
|
|
add (length);
|
2008-09-28 15:47:45 -04:00
|
|
|
add (sync);
|
|
|
|
add (fadein);
|
|
|
|
add (fadeout);
|
|
|
|
add (locked);
|
|
|
|
add (glued);
|
|
|
|
add (muted);
|
|
|
|
add (opaque);
|
2008-09-19 10:38:46 -04:00
|
|
|
add (used);
|
|
|
|
add (path);
|
2005-10-09 01:03:29 -04:00
|
|
|
}
|
2008-09-28 15:47:45 -04:00
|
|
|
Gtk::TreeModelColumn<Glib::ustring> name;
|
2006-08-29 17:21:48 -04:00
|
|
|
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
|
2006-10-21 15:01:50 -04:00
|
|
|
Gtk::TreeModelColumn<Gdk::Color> color_;
|
2008-09-19 10:38:46 -04:00
|
|
|
Gtk::TreeModelColumn<Glib::ustring> start;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> end;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> length;
|
2008-09-28 15:47:45 -04:00
|
|
|
Gtk::TreeModelColumn<Glib::ustring> sync;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> fadein;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> fadeout;
|
|
|
|
Gtk::TreeModelColumn<bool> locked;
|
|
|
|
Gtk::TreeModelColumn<bool> glued;
|
|
|
|
Gtk::TreeModelColumn<bool> muted;
|
|
|
|
Gtk::TreeModelColumn<bool> opaque;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> used;
|
2008-09-19 10:38:46 -04:00
|
|
|
Gtk::TreeModelColumn<Glib::ustring> path;
|
2005-10-09 01:03:29 -04:00
|
|
|
};
|
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
RegionListDisplayModelColumns region_list_columns;
|
|
|
|
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > region_list_display;
|
2008-01-10 16:20:59 -05:00
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
Glib::RefPtr<Gtk::TreeStore> region_list_model;
|
|
|
|
Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
|
|
|
|
Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
|
2005-10-09 01:03:29 -04:00
|
|
|
|
2007-11-04 16:40:12 -05:00
|
|
|
void region_list_region_changed (ARDOUR::Change, boost::weak_ptr<ARDOUR::Region>);
|
2005-10-09 01:03:29 -04:00
|
|
|
void region_list_selection_changed ();
|
2009-01-18 05:41:56 -05:00
|
|
|
sigc::connection region_list_change_connection;
|
|
|
|
void set_selected_in_region_list(RegionSelection&);
|
|
|
|
bool set_selected_in_region_list_subrow(boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &, int);
|
2006-01-04 22:18:44 -05:00
|
|
|
bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
|
2008-01-10 16:20:59 -05:00
|
|
|
void region_name_edit (const Glib::ustring&, const Glib::ustring&);
|
|
|
|
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
|
2005-10-09 01:03:29 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Menu *region_list_menu;
|
|
|
|
Gtk::ScrolledWindow region_list_scroller;
|
2007-10-11 18:07:47 -04:00
|
|
|
Gtk::Frame region_list_frame;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-09 01:03:29 -04:00
|
|
|
bool region_list_display_key_press (GdkEventKey *);
|
|
|
|
bool region_list_display_key_release (GdkEventKey *);
|
|
|
|
bool region_list_display_button_press (GdkEventButton *);
|
|
|
|
bool region_list_display_button_release (GdkEventButton *);
|
2005-09-25 14:42:24 -04:00
|
|
|
void region_list_clear ();
|
2006-08-29 17:21:48 -04:00
|
|
|
void region_list_selection_mapover (sigc::slot<void,boost::shared_ptr<ARDOUR::Region> >);
|
2005-09-25 14:42:24 -04:00
|
|
|
void build_region_list_menu ();
|
2005-12-31 13:20:42 -05:00
|
|
|
void show_region_list_display_context_menu (int button, int time);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
bool show_automatic_regions_in_region_list;
|
|
|
|
Editing::RegionListSortType region_list_sort_type;
|
|
|
|
|
|
|
|
void reset_region_list_sort_direction (bool);
|
|
|
|
void reset_region_list_sort_type (Editing::RegionListSortType);
|
|
|
|
|
|
|
|
void toggle_full_region_list ();
|
|
|
|
void toggle_show_auto_regions ();
|
|
|
|
|
2005-10-09 01:03:29 -04:00
|
|
|
int region_list_sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-01-04 22:18:44 -05:00
|
|
|
/* snapshots */
|
|
|
|
|
2007-08-06 01:30:18 -04:00
|
|
|
Gtk::ScrolledWindow snapshot_display_scroller;
|
2006-01-04 22:18:44 -05:00
|
|
|
struct SnapshotDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
SnapshotDisplayModelColumns() {
|
|
|
|
add (visible_name);
|
|
|
|
add (real_name);
|
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> visible_name;
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> real_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
SnapshotDisplayModelColumns snapshot_display_columns;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> snapshot_display_model;
|
|
|
|
Gtk::TreeView snapshot_display;
|
2007-04-12 19:20:37 -04:00
|
|
|
Gtk::Menu snapshot_context_menu;
|
2006-01-04 22:18:44 -05:00
|
|
|
|
|
|
|
bool snapshot_display_button_press (GdkEventButton*);
|
|
|
|
void snapshot_display_selection_changed ();
|
|
|
|
void redisplay_snapshots();
|
2007-04-12 19:20:37 -04:00
|
|
|
void popup_snapshot_context_menu (int, int32_t, Glib::ustring);
|
2006-01-04 22:18:44 -05:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/* named selections */
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
struct NamedSelectionDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
NamedSelectionDisplayModelColumns() {
|
|
|
|
add (text);
|
|
|
|
add (selection);
|
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> text;
|
|
|
|
Gtk::TreeModelColumn<ARDOUR::NamedSelection*> selection;
|
|
|
|
};
|
|
|
|
|
|
|
|
NamedSelectionDisplayModelColumns named_selection_columns;
|
|
|
|
Glib::RefPtr<Gtk::TreeStore> named_selection_model;
|
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
Gtkmm2ext::DnDTreeView<ARDOUR::NamedSelection*> named_selection_display;
|
2005-12-29 19:34:21 -05:00
|
|
|
Gtk::ScrolledWindow named_selection_scroller;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-01-15 13:33:54 -05:00
|
|
|
void create_named_selection ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void paste_named_selection (float times);
|
2007-01-15 13:33:54 -05:00
|
|
|
void remove_selected_named_selections ();
|
2007-04-12 19:20:37 -04:00
|
|
|
void remove_snapshot (Glib::ustring);
|
|
|
|
void rename_snapshot (Glib::ustring);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void handle_new_named_selection ();
|
|
|
|
void add_named_selection_to_named_selection_display (ARDOUR::NamedSelection&);
|
|
|
|
void redisplay_named_selections ();
|
|
|
|
|
2007-01-15 13:33:54 -05:00
|
|
|
bool named_selection_display_button_release (GdkEventButton *ev);
|
|
|
|
bool named_selection_display_key_release (GdkEventKey *ev);
|
2005-10-26 14:12:00 -04:00
|
|
|
void named_selection_display_selection_changed ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* track views */
|
|
|
|
TrackViewList track_views;
|
2009-01-05 22:18:09 -05:00
|
|
|
std::pair<TimeAxisView*, ARDOUR::layer_t> trackview_by_y_position (double);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-28 18:19:45 -04:00
|
|
|
static Gdk::Cursor* cross_hair_cursor;
|
|
|
|
static Gdk::Cursor* trimmer_cursor;
|
|
|
|
static Gdk::Cursor* selector_cursor;
|
|
|
|
static Gdk::Cursor* grabber_cursor;
|
2008-02-16 17:43:18 -05:00
|
|
|
static Gdk::Cursor* grabber_edit_point_cursor;
|
2005-10-28 18:19:45 -04:00
|
|
|
static Gdk::Cursor* zoom_cursor;
|
|
|
|
static Gdk::Cursor* time_fx_cursor;
|
|
|
|
static Gdk::Cursor* fader_cursor;
|
|
|
|
static Gdk::Cursor* speaker_cursor;
|
2007-08-10 16:55:27 -04:00
|
|
|
static Gdk::Cursor* midi_pencil_cursor;
|
2007-10-14 01:45:31 -04:00
|
|
|
static Gdk::Cursor* midi_select_cursor;
|
2008-03-26 07:11:47 -04:00
|
|
|
static Gdk::Cursor* midi_resize_cursor;
|
2007-08-10 16:55:27 -04:00
|
|
|
static Gdk::Cursor* midi_erase_cursor;
|
2005-10-28 18:19:45 -04:00
|
|
|
static Gdk::Cursor* wait_cursor;
|
|
|
|
static Gdk::Cursor* timebar_cursor;
|
2008-01-07 16:12:29 -05:00
|
|
|
static Gdk::Cursor* transparent_cursor;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
static void build_cursors ();
|
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::connection scroll_connection;
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t last_update_frame;
|
|
|
|
void center_screen (nframes64_t);
|
|
|
|
void center_screen_internal (nframes64_t, float);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void update_current_screen ();
|
|
|
|
|
|
|
|
void session_going_away ();
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t cut_buffer_start;
|
|
|
|
nframes64_t cut_buffer_length;
|
2005-09-25 14:42:24 -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);
|
|
|
|
bool button_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
2006-05-17 22:19:27 -04:00
|
|
|
bool motion_handler (ArdourCanvas::Item*, GdkEvent*, ItemType, 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);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* KEYMAP HANDLING */
|
|
|
|
|
2005-10-09 13:58:06 -04:00
|
|
|
void register_actions ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
int ensure_cursor (nframes64_t* pos);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
void handle_new_region (boost::weak_ptr<ARDOUR::Region>);
|
2008-02-16 17:43:18 -05:00
|
|
|
void handle_new_regions (vector<boost::weak_ptr<ARDOUR::Region> >& );
|
2006-11-19 11:45:16 -05:00
|
|
|
void handle_region_removed (boost::weak_ptr<ARDOUR::Region>);
|
2006-08-29 17:21:48 -04:00
|
|
|
void add_region_to_region_display (boost::shared_ptr<ARDOUR::Region>);
|
2008-02-16 17:43:18 -05:00
|
|
|
void add_regions_to_region_display (std::vector<boost::weak_ptr<ARDOUR::Region> > & );
|
2006-08-29 17:21:48 -04:00
|
|
|
void region_hidden (boost::shared_ptr<ARDOUR::Region>);
|
2005-09-25 14:42:24 -04:00
|
|
|
void redisplay_regions ();
|
2008-09-28 15:47:45 -04:00
|
|
|
void populate_row (boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &);
|
2008-09-19 10:38:46 -04:00
|
|
|
void update_region_row (boost::shared_ptr<ARDOUR::Region>);
|
2008-09-28 15:47:45 -04:00
|
|
|
bool update_region_subrows (boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &, int);
|
2008-10-01 05:18:30 -04:00
|
|
|
void update_all_region_rows ();
|
|
|
|
void update_all_region_subrows (Gtk::TreeModel::Row const &, int);
|
2008-09-10 11:03:30 -04:00
|
|
|
bool no_region_list_redisplay;
|
2006-08-29 17:21:48 -04:00
|
|
|
void insert_into_tmp_regionlist(boost::shared_ptr<ARDOUR::Region>);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list;
|
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);
|
|
|
|
|
|
|
|
void mouse_paste ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void paste_internal (nframes64_t position, float times);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* EDITING OPERATIONS */
|
|
|
|
|
2006-05-19 16:10:35 -04:00
|
|
|
void reset_point_selection ();
|
2007-10-11 18:07:47 -04:00
|
|
|
void toggle_region_mute ();
|
|
|
|
void toggle_region_lock ();
|
|
|
|
void toggle_region_opaque ();
|
2008-12-12 09:43:24 -05:00
|
|
|
void toggle_record_enable ();
|
2008-02-02 12:22:04 -05:00
|
|
|
void set_region_lock_style (ARDOUR::Region::PositionLockStyle);
|
2008-01-10 16:20:59 -05:00
|
|
|
void raise_region ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void raise_region_to_top ();
|
2008-01-10 16:20:59 -05:00
|
|
|
void lower_region ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void lower_region_to_bottom ();
|
|
|
|
void split_region ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void split_region_at (nframes64_t);
|
|
|
|
void split_regions_at (nframes64_t, RegionSelection&);
|
2008-02-01 22:57:35 -05:00
|
|
|
void split_region_at_transients ();
|
2008-02-16 17:43:18 -05:00
|
|
|
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret);
|
2005-09-25 14:42:24 -04:00
|
|
|
void crop_region_to_selection ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void crop_region_to (nframes64_t start, nframes64_t end);
|
2008-01-10 16:20:59 -05:00
|
|
|
void set_sync_point (nframes64_t, const RegionSelection&);
|
2007-11-12 17:23:01 -05:00
|
|
|
void set_region_sync_from_edit_point ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void remove_region_sync();
|
2008-09-10 11:03:30 -04:00
|
|
|
void align_selection (ARDOUR::RegionPoint, nframes64_t position, const RegionSelection&);
|
|
|
|
void align_selection_relative (ARDOUR::RegionPoint point, nframes64_t position, const RegionSelection&);
|
|
|
|
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
|
|
|
|
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_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 ();
|
|
|
|
void edit_region ();
|
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 ();
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
void normalize_region ();
|
|
|
|
void denormalize_region ();
|
2008-01-19 00:06:33 -05:00
|
|
|
void adjust_region_scale_amplitude (bool up);
|
2008-01-12 18:45:50 -05:00
|
|
|
void quantize_region ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-04-11 10:06:50 -04:00
|
|
|
void do_insert_time ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void insert_time (nframes64_t pos, nframes64_t distance, Editing::InsertTimeOption opt, bool ignore_music_glue, bool markers_too);
|
2008-04-11 10:06:50 -04:00
|
|
|
|
2008-02-01 22:57:35 -05:00
|
|
|
void tab_to_transient (bool forward);
|
|
|
|
|
|
|
|
void use_region_as_bar ();
|
|
|
|
void use_range_as_bar ();
|
|
|
|
|
|
|
|
void define_one_bar (nframes64_t start, nframes64_t end);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void audition_region_from_region_list ();
|
|
|
|
void hide_region_from_region_list ();
|
2005-10-09 13:58:06 -04:00
|
|
|
void remove_region_from_region_list ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void align (ARDOUR::RegionPoint);
|
|
|
|
void align_relative (ARDOUR::RegionPoint);
|
|
|
|
void naturalize ();
|
|
|
|
|
2007-01-28 12:44:13 -05:00
|
|
|
void reset_focus ();
|
|
|
|
|
2007-11-12 17:23:01 -05:00
|
|
|
void split ();
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void cut ();
|
|
|
|
void copy ();
|
|
|
|
void paste (float times);
|
|
|
|
|
|
|
|
int get_prefix (float&, bool&);
|
|
|
|
|
|
|
|
void keyboard_paste ();
|
|
|
|
void keyboard_insert_region_list_selection ();
|
|
|
|
|
|
|
|
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 loop_selected_region ();
|
|
|
|
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);
|
|
|
|
void toggle_zoom_region (bool both_axes);
|
2008-01-10 16:20:59 -05:00
|
|
|
bool zoomed_to_region;
|
2005-09-25 14:42:24 -04:00
|
|
|
void temporal_zoom_session ();
|
|
|
|
void temporal_zoom (gdouble scale);
|
2008-09-10 11:03:30 -04:00
|
|
|
void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string & op);
|
|
|
|
void temporal_zoom_to_frame (bool coarser, nframes64_t frame);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void amplitude_zoom (gdouble scale);
|
|
|
|
void amplitude_zoom_step (bool in);
|
|
|
|
|
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 */
|
|
|
|
|
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
|
|
|
|
|
|
|
int check_whether_and_how_to_import(string, bool all_or_nothing = true);
|
2007-10-11 18:07:47 -04:00
|
|
|
bool check_multichannel_status (const std::vector<Glib::ustring>& paths);
|
|
|
|
|
|
|
|
SoundFileOmega* sfbrowser;
|
|
|
|
|
|
|
|
void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos);
|
2008-03-17 16:54:03 -04:00
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
bool idle_drop_paths (std::vector<Glib::ustring> paths, nframes64_t frame, double ypos);
|
|
|
|
void drop_paths_part_two (const std::vector<Glib::ustring>& paths, nframes64_t frame, double ypos);
|
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
void do_import (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&);
|
|
|
|
void do_embed (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
int import_sndfiles (vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos,
|
2008-12-12 09:43:24 -05:00
|
|
|
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>, bool, uint32_t total);
|
2007-10-11 18:07:47 -04:00
|
|
|
int embed_sndfiles (vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
|
2008-02-18 14:45:52 -05:00
|
|
|
nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
|
2007-10-11 18:07:47 -04:00
|
|
|
|
|
|
|
int add_sources (vector<Glib::ustring> paths, ARDOUR::SourceList& sources, nframes64_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);
|
|
|
|
int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region> region, uint32_t, uint32_t, nframes64_t& pos, Editing::ImportMode mode,
|
|
|
|
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
|
|
|
|
|
|
|
/* generic interthread progress window */
|
|
|
|
|
|
|
|
ArdourDialog* interthread_progress_window;
|
|
|
|
Gtk::Label interthread_progress_label;
|
|
|
|
Gtk::VBox interthread_progress_vbox;
|
|
|
|
Gtk::ProgressBar interthread_progress_bar;
|
|
|
|
Gtk::Button interthread_cancel_button;
|
|
|
|
Gtk::Label interthread_cancel_label;
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::connection interthread_progress_connection;
|
2005-09-25 14:42:24 -04:00
|
|
|
void interthread_cancel_clicked ();
|
|
|
|
void build_interthread_progress_window ();
|
|
|
|
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 */
|
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
struct EditorImportStatus : public ARDOUR::Session::import_status {
|
|
|
|
Editing::ImportMode mode;
|
|
|
|
nframes64_t pos;
|
|
|
|
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
|
|
|
gint import_progress_timeout (void *);
|
|
|
|
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);
|
2007-01-09 18:24:54 -05:00
|
|
|
void do_import (vector<Glib::ustring> paths, bool split, bool as_tracks);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void move_to_start ();
|
|
|
|
void move_to_end ();
|
|
|
|
void goto_frame ();
|
|
|
|
void center_playhead ();
|
2007-11-12 17:23:01 -05:00
|
|
|
void center_edit_point ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void edit_cursor_backward ();
|
|
|
|
void edit_cursor_forward ();
|
2008-02-19 17:10:27 -05:00
|
|
|
void playhead_forward_to_grid ();
|
|
|
|
void playhead_backward_to_grid ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void playhead_backward ();
|
|
|
|
void playhead_forward ();
|
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 delete_sample_forward ();
|
|
|
|
void delete_sample_backward ();
|
|
|
|
void delete_screen ();
|
|
|
|
void search_backwards ();
|
|
|
|
void search_forwards ();
|
|
|
|
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
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void add_location_mark (nframes64_t where);
|
2006-03-31 18:00:40 -05:00
|
|
|
void add_location_from_audio_region ();
|
2008-12-12 09:43:24 -05:00
|
|
|
void add_locations_from_audio_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 ();
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void set_loop_range (nframes64_t start, nframes64_t end, std::string cmd);
|
|
|
|
void set_punch_range (nframes64_t start, nframes64_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 ();
|
|
|
|
|
|
|
|
void start_scrolling ();
|
|
|
|
void stop_scrolling ();
|
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
bool _scrubbing;
|
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;
|
2008-04-11 10:06:50 -04:00
|
|
|
void scrub ();
|
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;
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t pending_keyboard_selection_start;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
|
2005-09-25 14:42:24 -04:00
|
|
|
void extend_selection_to_end_of_region (bool next);
|
|
|
|
void extend_selection_to_start_of_region (bool previous);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2005-12-22 07:23:54 -05:00
|
|
|
void handle_gui_changes (const string &, void *);
|
2008-12-12 09:43:24 -05:00
|
|
|
bool ignore_gui_changes;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void hide_all_tracks (bool with_select);
|
|
|
|
|
2006-03-07 21:50:53 -05:00
|
|
|
DragInfo drag_info;
|
2005-09-25 14:42:24 -04:00
|
|
|
LineDragInfo current_line_drag_info;
|
|
|
|
|
2005-10-28 18:19:45 -04:00
|
|
|
void start_grab (GdkEvent*, Gdk::Cursor* cursor = 0);
|
2005-11-14 11:24:21 -05:00
|
|
|
bool end_grab (ArdourCanvas::Item*, GdkEvent*);
|
2006-06-13 03:27:52 -04:00
|
|
|
void swap_grab (ArdourCanvas::Item*, Gdk::Cursor* cursor, uint32_t time);
|
2008-04-11 10:06:50 -04:00
|
|
|
void break_drag ();
|
|
|
|
void finalize_drag ();
|
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);
|
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
void region_gain_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_fade_in_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_fade_out_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void fade_in_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void fade_out_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void fade_in_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void fade_out_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
2007-01-28 12:44:13 -05:00
|
|
|
|
|
|
|
void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
|
|
|
|
void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
|
2007-11-12 17:23:01 -05:00
|
|
|
|
|
|
|
void set_fade_length (bool in);
|
2008-01-10 16:20:59 -05:00
|
|
|
void toggle_fade_active (bool in);
|
2007-01-28 12:44:13 -05:00
|
|
|
void set_fade_in_active (bool);
|
|
|
|
void set_fade_out_active (bool);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-01-09 18:24:54 -05:00
|
|
|
std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
|
2008-01-10 16:20:59 -05:00
|
|
|
RegionSelection pre_drag_region_selection;
|
2005-11-14 11:24:21 -05:00
|
|
|
void region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
2007-10-14 01:45:31 -04:00
|
|
|
void create_region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void create_region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
2009-01-05 22:18:09 -05:00
|
|
|
bool check_region_drag_possible (RouteTimeAxisView**, ARDOUR::layer_t*);
|
2008-01-10 16:20:59 -05:00
|
|
|
void possibly_copy_regions_during_grab (GdkEvent*);
|
|
|
|
void region_drag_splice_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void region_drag_splice_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
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
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void cursor_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void cursor_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
2008-12-12 09:43:24 -05:00
|
|
|
void cursor_drag_finished_ensure_locate_callback (ArdourCanvas::Item*, GdkEvent*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void marker_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void control_point_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void control_point_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void line_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void line_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
|
|
|
|
void tempo_marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void tempo_marker_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void meter_marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void meter_marker_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
|
|
|
|
gint mouse_rename_region (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
|
|
|
|
void start_region_grab (ArdourCanvas::Item*, GdkEvent*);
|
2007-10-14 01:45:31 -04:00
|
|
|
void start_create_region_grab (ArdourCanvas::Item*, GdkEvent*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_region_copy_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_region_brush_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_selection_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_cursor_grab (ArdourCanvas::Item*, GdkEvent*);
|
2008-12-12 09:43:24 -05:00
|
|
|
void start_cursor_grab_no_stop (ArdourCanvas::Item*, GdkEvent*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_marker_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_control_point_grab (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_line_grab_from_regionview (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_line_grab_from_line (ArdourCanvas::Item*, GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
void start_line_grab (AutomationLine *, GdkEvent*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_tempo_marker_grab (ArdourCanvas::Item*, GdkEvent*);
|
2006-03-05 14:39:16 -05:00
|
|
|
void start_tempo_marker_copy_grab (ArdourCanvas::Item*, GdkEvent*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_meter_marker_grab (ArdourCanvas::Item*, GdkEvent*);
|
2006-03-05 14:39:16 -05:00
|
|
|
void start_meter_marker_copy_grab (ArdourCanvas::Item*, GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void region_view_item_click (AudioRegionView&, GdkEventButton*);
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void mouse_brush_insert_region (RegionView*, nframes64_t pos);
|
|
|
|
void brush (nframes64_t);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void show_verbose_time_cursor (nframes64_t frame, double offset = 0, double xpos=-1, double ypos=-1);
|
|
|
|
void show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset = 0, double xpos=-1, double ypos=-1);
|
2008-02-02 12:22:04 -05:00
|
|
|
double clamp_verbose_cursor_x (double);
|
|
|
|
double clamp_verbose_cursor_y (double);
|
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*);
|
|
|
|
bool canvas_crossfade_view_event (GdkEvent* event,ArdourCanvas::Item*, CrossfadeView*);
|
|
|
|
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*);
|
2008-02-16 17:43:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
// These variables are used to detect a feedback loop and break it to avoid a gui hang
|
|
|
|
private:
|
|
|
|
ArdourCanvas::Item *last_item_entered;
|
|
|
|
int last_item_entered_n;
|
|
|
|
public:
|
|
|
|
|
2006-07-23 08:03:19 -04:00
|
|
|
bool canvas_region_view_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
|
|
|
|
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*);
|
2006-07-23 08:03:19 -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*);
|
|
|
|
bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*) ;
|
|
|
|
|
|
|
|
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*);
|
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*);
|
2005-10-12 12:28:26 -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 ();
|
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
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
void kbd_driver (sigc::slot<void,GdkEvent*>, bool use_track_canvas = true, bool use_time_canvas = true, bool can_select = true);
|
2006-01-22 10:46:30 -05:00
|
|
|
void kbd_mute_unmute_region ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void kbd_brush ();
|
|
|
|
|
|
|
|
void kbd_do_brush (GdkEvent*);
|
|
|
|
void kbd_do_audition (GdkEvent*);
|
|
|
|
|
|
|
|
void handle_new_duration ();
|
|
|
|
void initialize_canvas ();
|
|
|
|
|
|
|
|
/* display control */
|
|
|
|
|
|
|
|
bool _show_measures;
|
2007-05-11 11:06:12 -04:00
|
|
|
/// true to show waveforms, otherwise false
|
2005-09-25 14:42:24 -04:00
|
|
|
bool _show_waveforms;
|
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;
|
2007-05-11 11:06:12 -04:00
|
|
|
/// true if waveforms should be shown while recording audio tracks, otherwise false
|
2005-09-25 14:42:24 -04:00
|
|
|
bool _show_waveforms_recording;
|
|
|
|
|
|
|
|
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
|
|
|
|
|
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 ();
|
|
|
|
void draw_measures ();
|
2007-08-05 17:31:02 -04:00
|
|
|
bool redraw_measures ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void new_tempo_section ();
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void mouse_add_new_tempo_event (nframes64_t where);
|
|
|
|
void mouse_add_new_meter_event (nframes64_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*);
|
|
|
|
|
|
|
|
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*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void marker_menu_edit ();
|
|
|
|
void marker_menu_remove ();
|
|
|
|
void marker_menu_rename ();
|
2007-11-12 17:23:01 -05:00
|
|
|
void marker_menu_lock (bool yn);
|
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 ();
|
|
|
|
void marker_menu_set_from_selection ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void marker_menu_range_to_next ();
|
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);
|
2008-10-11 13:51:15 -04:00
|
|
|
void new_transport_marker_menu_popdown ();
|
2005-11-14 11:24:21 -05:00
|
|
|
void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
|
|
|
void tm_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
|
|
|
void transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
|
|
|
void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
2007-01-09 18:24:54 -05:00
|
|
|
void build_range_marker_menu (bool loop_or_punch);
|
|
|
|
void build_marker_menu (bool start_or_end);
|
2005-09-25 14:42:24 -04:00
|
|
|
void build_tm_marker_menu ();
|
|
|
|
void build_new_transport_marker_menu ();
|
|
|
|
|
|
|
|
Gtk::Menu* tm_marker_menu;
|
|
|
|
Gtk::Menu* marker_menu;
|
2007-01-09 18:24:54 -05:00
|
|
|
Gtk::Menu* start_end_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
|
|
|
|
|
|
|
typedef list<Marker*> Marks;
|
|
|
|
Marks metric_marks;
|
|
|
|
|
|
|
|
void remove_metric_marks ();
|
|
|
|
void draw_metric_marks (const ARDOUR::Metrics& metrics);
|
|
|
|
|
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_current_bbt_points (nframes_t left, nframes_t right);
|
2007-04-12 19:20:37 -04:00
|
|
|
void tempo_map_changed (ARDOUR::Change);
|
|
|
|
void redisplay_tempo (bool immediate_redraw);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-05-31 17:15:28 -04:00
|
|
|
void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
|
2007-08-06 01:30:18 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
double snap_length_beats (nframes64_t start);
|
2007-05-31 17:15:28 -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
|
|
|
|
2007-11-12 17:23:01 -05:00
|
|
|
AudioClock edit_point_clock;
|
2005-09-25 14:42:24 -04:00
|
|
|
AudioClock zoom_range_clock;
|
|
|
|
Gtk::Button zoom_in_button;
|
|
|
|
Gtk::Button zoom_out_button;
|
|
|
|
Gtk::Button zoom_out_full_button;
|
|
|
|
Gtk::Button zoom_onetoone_button;
|
|
|
|
|
|
|
|
Gtk::VBox toolbar_clock_vbox;
|
|
|
|
Gtk::VBox toolbar_selection_clock_vbox;
|
|
|
|
Gtk::Table toolbar_selection_clock_table;
|
|
|
|
Gtk::Label toolbar_selection_cursor_label;
|
|
|
|
|
2006-06-30 04:03:43 -04:00
|
|
|
Gtk::HBox mouse_mode_button_box;
|
|
|
|
Gtkmm2ext::TearOff* mouse_mode_tearoff;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::ToggleButton mouse_select_button;
|
|
|
|
Gtk::ToggleButton mouse_move_button;
|
|
|
|
Gtk::ToggleButton mouse_gain_button;
|
|
|
|
Gtk::ToggleButton mouse_zoom_button;
|
|
|
|
Gtk::ToggleButton mouse_timefx_button;
|
|
|
|
Gtk::ToggleButton mouse_audition_button;
|
2007-07-14 21:56:11 -04:00
|
|
|
Gtk::ToggleButton mouse_note_button;
|
2005-09-25 14:42:24 -04:00
|
|
|
GroupedButtons *mouse_mode_button_set;
|
|
|
|
void mouse_mode_toggled (Editing::MouseMode m);
|
|
|
|
bool ignore_mouse_mode_toggle;
|
|
|
|
|
|
|
|
gint mouse_select_button_release (GdkEventButton*);
|
|
|
|
|
|
|
|
Gtk::VBox automation_box;
|
|
|
|
Gtk::Button automation_mode_button;
|
|
|
|
Gtk::ToggleButton global_automation_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;
|
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;
|
2005-09-25 14:42:24 -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
|
|
|
|
2006-06-30 04:03:43 -04:00
|
|
|
Gtk::HBox zoom_box;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void zoom_adjustment_changed();
|
|
|
|
|
2007-11-12 17:23:01 -05:00
|
|
|
void edit_point_clock_changed();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void setup_toolbar ();
|
|
|
|
|
2007-08-08 15:13:36 -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;
|
|
|
|
|
2007-08-08 15:13:36 -04:00
|
|
|
/* midi toolbar */
|
|
|
|
|
|
|
|
Gtk::HBox midi_tool_button_box;
|
|
|
|
Gtk::ToggleButton midi_tool_pencil_button;
|
2007-10-14 01:45:31 -04:00
|
|
|
Gtk::ToggleButton midi_tool_select_button;
|
2008-03-26 07:11:47 -04:00
|
|
|
Gtk::ToggleButton midi_tool_resize_button;
|
2007-08-08 15:13:36 -04:00
|
|
|
Gtk::ToggleButton midi_tool_erase_button;
|
2008-12-25 04:28:57 -05:00
|
|
|
Gtk::Button midi_panic_button;
|
|
|
|
Gtk::ToggleButton midi_sound_notes;
|
2007-08-08 15:13:36 -04:00
|
|
|
GroupedButtons *midi_tool_button_set;
|
2007-08-09 16:50:56 -04:00
|
|
|
void midi_edit_mode_toggled (Editing::MidiEditMode m);
|
2008-12-25 04:28:57 -05:00
|
|
|
void midi_panic_button_pressed ();
|
2009-01-06 21:40:13 -05:00
|
|
|
bool sound_notes () const { return midi_sound_notes.get_active(); }
|
2008-12-25 04:28:57 -05:00
|
|
|
|
2007-08-09 16:50:56 -04:00
|
|
|
bool ignore_midi_edit_mode_toggle;
|
2007-08-08 15:13:36 -04:00
|
|
|
|
|
|
|
Gtkmm2ext::TearOff* midi_tools_tearoff;
|
|
|
|
Gtk::HBox midi_toolbar_hbox;
|
|
|
|
Gtk::EventBox midi_toolbar_base;
|
|
|
|
Gtk::Frame midi_toolbar_frame;
|
|
|
|
|
|
|
|
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;
|
2008-03-17 16:54:03 -04:00
|
|
|
void sensitize_the_right_region_actions (bool have_selected_regions);
|
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
|
|
|
|
|
|
|
enum SelectionOp {
|
|
|
|
CreateSelection,
|
|
|
|
SelectionStartTrim,
|
|
|
|
SelectionEndTrim,
|
|
|
|
SelectionMove
|
|
|
|
} selection_op;
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, SelectionOp);
|
|
|
|
void drag_selection (ArdourCanvas::Item* item, GdkEvent* event);
|
|
|
|
void end_selection_op (ArdourCanvas::Item* item, GdkEvent* event);
|
2005-09-25 14:42:24 -04:00
|
|
|
void cancel_selection ();
|
|
|
|
|
|
|
|
void region_selection_op (void (ARDOUR::Region::*pmf)(void));
|
|
|
|
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
|
|
|
|
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
bool audio_region_selection_covers (nframes64_t where);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* transport range select process */
|
|
|
|
enum RangeMarkerOp {
|
|
|
|
CreateRangeMarker,
|
2008-01-10 16:20:59 -05:00
|
|
|
CreateTransportMarker,
|
|
|
|
CreateCDMarker
|
2005-09-25 14:42:24 -04:00
|
|
|
} range_marker_op;
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event, RangeMarkerOp);
|
|
|
|
void drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event);
|
|
|
|
void end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
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;
|
|
|
|
ArdourCanvas::Line* marker_drag_line;
|
|
|
|
ArdourCanvas::Points marker_drag_line_points;
|
|
|
|
ArdourCanvas::SimpleRect* range_marker_drag_rect;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void update_marker_drag_item (ARDOUR::Location *);
|
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;
|
|
|
|
|
|
|
|
/* object rubberband select process */
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
|
|
|
|
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
|
|
|
|
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
bool select_all_within (nframes64_t start, nframes64_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-27 17:35:04 -05:00
|
|
|
ArdourCanvas::SimpleRect *rubberband_rect;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* mouse zoom process */
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
|
|
|
|
void drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
|
|
|
|
void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-27 17:35:04 -05:00
|
|
|
ArdourCanvas::SimpleRect *zoom_rect;
|
2008-09-10 11:03:30 -04:00
|
|
|
void reposition_zoom_rect (nframes64_t start, nframes64_t end);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* diskstream/route display management */
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
RouteDisplayModelColumns() {
|
|
|
|
add (text);
|
2006-01-09 23:25:47 -05:00
|
|
|
add (visible);
|
2008-09-10 11:03:30 -04:00
|
|
|
add (temporary_visible);
|
2005-10-26 14:12:00 -04:00
|
|
|
add (tv);
|
2007-10-11 18:07:47 -04:00
|
|
|
add (route);
|
2005-10-26 14:12:00 -04:00
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> text;
|
2006-01-09 23:25:47 -05:00
|
|
|
Gtk::TreeModelColumn<bool> visible;
|
2008-09-10 11:03:30 -04:00
|
|
|
Gtk::TreeModelColumn<bool> temporary_visible;
|
2006-01-09 23:25:47 -05:00
|
|
|
Gtk::TreeModelColumn<TimeAxisView*> tv;
|
2007-10-11 18:07:47 -04:00
|
|
|
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
|
2005-10-26 14:12:00 -04:00
|
|
|
};
|
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
RouteDisplayModelColumns route_display_columns;
|
2006-01-10 10:09:38 -05:00
|
|
|
Glib::RefPtr<Gtk::ListStore> route_display_model;
|
2005-10-26 14:12:00 -04:00
|
|
|
Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
|
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > route_list_display;
|
|
|
|
Gtk::ScrolledWindow route_list_scroller;
|
|
|
|
Gtk::Menu* route_list_menu;
|
2006-01-09 23:25:47 -05:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void update_route_visibility ();
|
|
|
|
|
2008-12-08 13:16:12 -05:00
|
|
|
void sync_order_keys (const char*);
|
|
|
|
bool route_redisplay_does_not_sync_order_keys;
|
|
|
|
bool route_redisplay_does_not_reset_order_keys;
|
2007-10-11 18:07:47 -04:00
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
bool route_list_display_button_press (GdkEventButton*);
|
2008-01-10 16:20:59 -05:00
|
|
|
void route_list_display_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
const Gtk::SelectionData& data,
|
|
|
|
guint info,
|
|
|
|
guint time);
|
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
bool route_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
|
|
|
|
|
|
|
|
void route_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
|
|
|
|
void route_list_delete (const Gtk::TreeModel::Path&);
|
2007-10-11 18:07:47 -04:00
|
|
|
void track_list_reorder (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* new_order);
|
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
void initial_route_list_display ();
|
|
|
|
void redisplay_route_list();
|
|
|
|
void route_list_reordered (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* what);
|
|
|
|
bool ignore_route_list_reorder;
|
|
|
|
bool no_route_list_redisplay;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void build_route_list_menu ();
|
2006-01-09 23:25:47 -05:00
|
|
|
void show_route_list_menu ();
|
|
|
|
|
|
|
|
void show_all_routes ();
|
|
|
|
void hide_all_routes ();
|
|
|
|
void show_all_audiotracks ();
|
|
|
|
void hide_all_audiotracks ();
|
|
|
|
void show_all_audiobus ();
|
|
|
|
void hide_all_audiobus ();
|
|
|
|
|
|
|
|
void set_all_tracks_visibility (bool yn);
|
|
|
|
void set_all_audio_visibility (int type, bool yn);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* edit group management */
|
|
|
|
|
2005-10-26 14:12:00 -04:00
|
|
|
struct GroupListModelColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
GroupListModelColumns () {
|
|
|
|
add (is_active);
|
2006-01-09 23:25:47 -05:00
|
|
|
add (is_visible);
|
2005-10-26 14:12:00 -04:00
|
|
|
add (text);
|
|
|
|
add (routegroup);
|
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<bool> is_active;
|
2006-01-09 23:25:47 -05:00
|
|
|
Gtk::TreeModelColumn<bool> is_visible;
|
2005-10-26 14:12:00 -04:00
|
|
|
Gtk::TreeModelColumn<std::string> text;
|
|
|
|
Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
|
|
|
|
};
|
|
|
|
|
|
|
|
GroupListModelColumns group_columns;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> group_model;
|
|
|
|
Glib::RefPtr<Gtk::TreeSelection> group_selection;
|
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
Gtk::TreeView edit_group_display;
|
|
|
|
Gtk::ScrolledWindow edit_group_display_scroller;
|
2005-12-29 19:34:21 -05:00
|
|
|
Gtk::Menu* edit_group_list_menu;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void build_edit_group_list_menu ();
|
2006-01-09 23:25:47 -05:00
|
|
|
void activate_all_edit_groups ();
|
|
|
|
void disable_all_edit_groups ();
|
|
|
|
|
2006-03-09 18:44:39 -05:00
|
|
|
bool in_edit_group_row_change;
|
2006-01-09 23:25:47 -05:00
|
|
|
void edit_group_row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
|
2006-03-09 23:05:11 -05:00
|
|
|
void edit_group_name_edit (const Glib::ustring&, const Glib::ustring&);
|
2005-09-25 14:42:24 -04:00
|
|
|
void new_edit_group ();
|
|
|
|
void edit_group_list_button_clicked ();
|
|
|
|
gint edit_group_list_button_press_event (GdkEventButton* ev);
|
|
|
|
void add_edit_group (ARDOUR::RouteGroup* group);
|
2006-03-08 18:26:28 -05:00
|
|
|
void remove_selected_edit_group ();
|
|
|
|
void edit_groups_changed ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void group_flags_changed (void*, ARDOUR::RouteGroup*);
|
|
|
|
|
|
|
|
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;
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t autoscroll_x_distance;
|
2008-04-11 10:06:50 -04:00
|
|
|
double autoscroll_y_distance;
|
2008-09-10 17:27:39 -04:00
|
|
|
|
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 ();
|
2008-04-11 10:06:50 -04:00
|
|
|
void maybe_autoscroll (GdkEventMotion*);
|
2008-09-10 17:27:39 -04:00
|
|
|
void maybe_autoscroll_horizontally (GdkEventMotion*);
|
2008-09-10 11:03:30 -04:00
|
|
|
bool allow_vertical_scroll;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* trimming */
|
|
|
|
enum TrimOp {
|
|
|
|
StartTrim,
|
|
|
|
EndTrim,
|
|
|
|
ContentsTrim,
|
|
|
|
} trim_op;
|
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void start_trim (ArdourCanvas::Item*, GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
void point_trim (GdkEvent*);
|
2005-11-14 11:24:21 -05:00
|
|
|
void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
2008-09-10 11:03:30 -04:00
|
|
|
void single_contents_trim (RegionView&, nframes64_t, bool, bool, bool);
|
|
|
|
void single_start_trim (RegionView&, nframes64_t, bool, bool);
|
|
|
|
void single_end_trim (RegionView&, nframes64_t, bool, bool);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
2006-07-23 08:03:19 -04:00
|
|
|
void thaw_region_after_trim (RegionView& rv);
|
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_edit_point ();
|
|
|
|
void trim_region_from_edit_point ();
|
|
|
|
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
|
|
|
|
|
|
|
bool show_gain_after_trim;
|
|
|
|
|
|
|
|
/* Drag-n-Drop */
|
|
|
|
|
2006-03-22 12:03:00 -05:00
|
|
|
int convert_drop_to_paths (std::vector<Glib::ustring>& paths,
|
2005-12-29 19:34:21 -05:00
|
|
|
const Glib::RefPtr<Gdk::DragContext>& context,
|
2005-09-25 14:42:24 -04:00
|
|
|
gint x,
|
|
|
|
gint y,
|
2005-12-29 19:34:21 -05:00
|
|
|
const Gtk::SelectionData& data,
|
2005-09-25 14:42:24 -04:00
|
|
|
guint info,
|
|
|
|
guint time);
|
|
|
|
|
2005-12-29 19:34:21 -05:00
|
|
|
void track_canvas_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
|
2005-09-25 14:42:24 -04:00
|
|
|
gint x,
|
|
|
|
gint y,
|
2005-12-29 19:34:21 -05:00
|
|
|
const Gtk::SelectionData& data,
|
2005-09-25 14:42:24 -04:00
|
|
|
guint info,
|
|
|
|
guint time);
|
2005-12-29 19:34:21 -05:00
|
|
|
|
|
|
|
void region_list_display_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
|
2005-09-25 14:42:24 -04:00
|
|
|
gint x,
|
|
|
|
gint y,
|
2005-12-29 19:34:21 -05:00
|
|
|
const Gtk::SelectionData& data,
|
2005-09-25 14:42:24 -04:00
|
|
|
guint info,
|
|
|
|
guint time);
|
2005-12-29 19:34:21 -05:00
|
|
|
|
2005-12-30 15:38:41 -05:00
|
|
|
void drop_paths (const Glib::RefPtr<Gdk::DragContext>& context,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
const Gtk::SelectionData& data,
|
|
|
|
guint info,
|
|
|
|
guint time);
|
|
|
|
|
|
|
|
void drop_regions (const Glib::RefPtr<Gdk::DragContext>& context,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
const Gtk::SelectionData& data,
|
|
|
|
guint info,
|
|
|
|
guint time);
|
|
|
|
|
2008-02-10 13:16:25 -05:00
|
|
|
void drop_routes (const Glib::RefPtr<Gdk::DragContext>& context,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
const Gtk::SelectionData& data,
|
|
|
|
guint info,
|
|
|
|
guint time);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/* audio export */
|
|
|
|
|
2006-07-23 08:03:19 -04:00
|
|
|
int write_region_selection(RegionSelection&);
|
2006-08-29 17:21:48 -04:00
|
|
|
bool write_region (string path, boost::shared_ptr<ARDOUR::AudioRegion>);
|
2005-09-25 14:42:24 -04:00
|
|
|
void bounce_region_selection ();
|
2008-09-10 11:03:30 -04:00
|
|
|
void bounce_range_selection (bool replace);
|
2005-09-25 14:42:24 -04:00
|
|
|
void external_edit_region ();
|
|
|
|
|
|
|
|
int write_audio_selection (TimeSelection&);
|
2006-08-12 04:20:24 -04:00
|
|
|
bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, list<ARDOUR::AudioRange>&);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void write_selection ();
|
|
|
|
|
|
|
|
/* history */
|
|
|
|
|
|
|
|
UndoAction get_memento() const;
|
|
|
|
|
2006-08-12 04:20:24 -04:00
|
|
|
XMLNode *before; /* used in *_reversible_command */
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void begin_reversible_command (string cmd_name);
|
|
|
|
void commit_reversible_command ();
|
|
|
|
|
|
|
|
void update_title ();
|
2005-12-22 07:23:54 -05:00
|
|
|
void update_title_s (const string & snapshot_name);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
struct State {
|
|
|
|
Selection* selection;
|
2007-10-07 11:51:14 -04:00
|
|
|
double frames_per_unit;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-07 11:51:14 -04:00
|
|
|
State (PublicEditor const * e);
|
|
|
|
~State ();
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
void store_state (State&) const;
|
|
|
|
void restore_state (State *);
|
|
|
|
|
|
|
|
void instant_save ();
|
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
boost::shared_ptr<ARDOUR::AudioRegion> last_audition_region;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* freeze operations */
|
|
|
|
|
|
|
|
ARDOUR::InterThreadInfo freeze_status;
|
|
|
|
gint freeze_progress_timeout (void *);
|
|
|
|
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
|
|
|
|
|
|
|
/* edit-group solo + mute */
|
|
|
|
|
|
|
|
void set_edit_group_solo (ARDOUR::Route&, bool);
|
|
|
|
void set_edit_group_mute (ARDOUR::Route&, bool);
|
|
|
|
|
|
|
|
/* duplication */
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void duplicate_dialog (bool with_dialog);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-11-07 20:40:25 -05:00
|
|
|
nframes64_t event_frame (GdkEvent*, double* px = 0, double* py = 0) const;
|
|
|
|
|
|
|
|
/* returns false if mouse pointer is not in track or marker canvas
|
|
|
|
*/
|
|
|
|
bool mouse_frame (nframes64_t&, bool& in_track_canvas) const;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-11-14 11:24:21 -05:00
|
|
|
void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void start_time_fx (ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void end_time_fx (ArdourCanvas::Item*, GdkEvent*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
struct TimeFXDialog : public ArdourDialog {
|
|
|
|
ARDOUR::TimeFXRequest request;
|
2005-09-25 14:42:24 -04:00
|
|
|
Editor& editor;
|
2008-01-10 16:20:59 -05:00
|
|
|
bool pitching;
|
|
|
|
Gtk::Adjustment pitch_octave_adjustment;
|
|
|
|
Gtk::Adjustment pitch_semitone_adjustment;
|
|
|
|
Gtk::Adjustment pitch_cent_adjustment;
|
|
|
|
Gtk::SpinButton pitch_octave_spinner;
|
|
|
|
Gtk::SpinButton pitch_semitone_spinner;
|
|
|
|
Gtk::SpinButton pitch_cent_spinner;
|
2006-07-23 08:03:19 -04:00
|
|
|
RegionSelection regions;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::ProgressBar progress_bar;
|
2008-01-10 17:22:29 -05:00
|
|
|
|
|
|
|
/* SoundTouch */
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::ToggleButton quick_button;
|
|
|
|
Gtk::ToggleButton antialias_button;
|
2008-01-10 17:22:29 -05:00
|
|
|
Gtk::HBox upper_button_box;
|
|
|
|
|
|
|
|
/* RubberBand */
|
|
|
|
Gtk::ComboBoxText stretch_opts_selector;
|
|
|
|
Gtk::Label stretch_opts_label;
|
|
|
|
Gtk::ToggleButton precise_button;
|
2008-12-12 09:43:24 -05:00
|
|
|
Gtk::ToggleButton preserve_formants_button;
|
2008-01-10 17:22:29 -05:00
|
|
|
Gtk::HBox opts_box;
|
|
|
|
|
2006-05-19 22:57:38 -04:00
|
|
|
Gtk::Button* cancel_button;
|
|
|
|
Gtk::Button* action_button;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::VBox packer;
|
|
|
|
int status;
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
TimeFXDialog (Editor& e, bool for_pitch);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
gint update_progress ();
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::connection first_cancel;
|
|
|
|
sigc::connection first_delete;
|
2008-01-10 16:20:59 -05:00
|
|
|
void cancel_in_progress ();
|
|
|
|
gint delete_in_progress (GdkEventAny*);
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/* "whats mine is yours" */
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
friend class TimeFXDialog;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
TimeFXDialog* current_timefx;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
static void* timefx_thread (void *arg);
|
|
|
|
void do_timefx (TimeFXDialog&);
|
|
|
|
|
|
|
|
int time_stretch (RegionSelection&, float fraction);
|
|
|
|
int pitch_shift (RegionSelection&, float cents);
|
|
|
|
void pitch_shift_regions ();
|
|
|
|
int time_fx (RegionSelection&, float val, bool pitching);
|
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 cms_deleted ();
|
|
|
|
void current_mixer_strip_hidden ();
|
|
|
|
void current_mixer_strip_removed ();
|
|
|
|
|
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
|
|
|
|
|
|
|
/* xfades */
|
|
|
|
|
|
|
|
bool _xfade_visibility;
|
|
|
|
|
2007-05-10 22:54:43 -04:00
|
|
|
#ifdef WITH_CMT
|
2005-12-22 07:23:54 -05:00
|
|
|
void handle_new_imageframe_time_axis_view(const string & track_name, void* src) ;
|
|
|
|
void handle_new_imageframe_marker_time_axis_view(const 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) ;
|
2005-09-25 14:42:24 -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
|
|
|
|
2007-01-11 14:50:49 -05:00
|
|
|
void toggle_xfade_active (boost::weak_ptr<ARDOUR::Crossfade>);
|
|
|
|
void toggle_xfade_length (boost::weak_ptr<ARDOUR::Crossfade>);
|
|
|
|
void edit_xfade (boost::weak_ptr<ARDOUR::Crossfade>);
|
2005-09-25 14:42:24 -04:00
|
|
|
void xfade_edit_left_region ();
|
|
|
|
void xfade_edit_right_region ();
|
|
|
|
|
|
|
|
static const int32_t default_width = 995;
|
|
|
|
static const int32_t default_height = 765;
|
|
|
|
|
|
|
|
/* nudge */
|
|
|
|
|
|
|
|
Gtk::Button nudge_forward_button;
|
|
|
|
Gtk::Button nudge_backward_button;
|
|
|
|
Gtk::HBox nudge_hbox;
|
|
|
|
Gtk::VBox nudge_vbox;
|
|
|
|
AudioClock nudge_clock;
|
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
nframes64_t get_nudge_distance (nframes64_t pos, nframes64_t& next);
|
2008-01-18 22:49:52 -05:00
|
|
|
|
|
|
|
bool nudge_forward_release (GdkEventButton*);
|
|
|
|
bool nudge_backward_release (GdkEventButton*);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* audio filters */
|
|
|
|
|
2007-08-06 01:30:18 -04:00
|
|
|
void apply_filter (ARDOUR::Filter&, string cmd);
|
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
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
vector<sigc::connection> session_connections;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/* tracking step changes of track height */
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
TimeAxisView* entered_track;
|
2006-07-23 08:03:19 -04:00
|
|
|
RegionView* entered_regionview;
|
2008-01-10 17:22:29 -05:00
|
|
|
|
|
|
|
|
2008-01-10 16:20:59 -05:00
|
|
|
void ensure_entered_track_selected (bool op_acts_on_objects = false);
|
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*);
|
2005-09-25 14:42:24 -04:00
|
|
|
void set_entered_track (TimeAxisView*);
|
2006-07-23 08:03:19 -04:00
|
|
|
void set_entered_regionview (RegionView*);
|
2008-12-12 09:43:24 -05:00
|
|
|
void ensure_track_visible (TimeAxisView*);
|
2005-09-25 14:42:24 -04:00
|
|
|
gint left_automation_track ();
|
|
|
|
|
|
|
|
bool _new_regionviews_show_envelope;
|
|
|
|
|
2008-04-11 10:06:50 -04:00
|
|
|
void reset_canvas_action_sensitivity (bool);
|
2007-10-11 18:07:47 -04:00
|
|
|
void toggle_gain_envelope_visibility ();
|
|
|
|
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
|
|
|
|
|
|
|
void session_state_saved (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*);
|
|
|
|
sigc::connection edit_point_clock_connection_a;
|
|
|
|
sigc::connection edit_point_clock_connection_b;
|
|
|
|
|
|
|
|
bool get_edit_op_range (nframes64_t& start, nframes64_t& end) const;
|
|
|
|
|
2008-02-16 17:43:18 -05:00
|
|
|
void get_regions_at (RegionSelection&, nframes64_t where, const TrackSelection& ts) const;
|
|
|
|
void get_regions_after (RegionSelection&, nframes64_t where, const TrackSelection& ts) const;
|
2007-11-12 17:23:01 -05:00
|
|
|
|
2008-02-16 17:43:18 -05:00
|
|
|
void get_regions_for_action (RegionSelection&, bool allowed_entered_regionview = false);
|
2007-12-20 18:25:19 -05:00
|
|
|
|
|
|
|
sigc::connection fast_screen_update_connection;
|
|
|
|
gint start_updating ();
|
|
|
|
gint stop_updating ();
|
|
|
|
void fast_update_strips ();
|
|
|
|
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
|
|
|
|
2008-02-19 17:10:27 -05:00
|
|
|
void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
|
|
|
|
|
2008-02-01 22:57:35 -05:00
|
|
|
RhythmFerret* rhythm_ferret;
|
2009-01-20 09:46:00 -05:00
|
|
|
BundleManager* _bundle_manager;
|
2009-01-23 16:24:11 -05:00
|
|
|
GlobalPortMatrixWindow* _global_port_matrix[ARDOUR::DataType::num_types];
|
2008-03-17 16:54:03 -04:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
void fit_tracks ();
|
|
|
|
void set_track_height (uint32_t h);
|
2008-03-17 16:54:03 -04:00
|
|
|
void set_track_height_largest ();
|
|
|
|
void set_track_height_large ();
|
|
|
|
void set_track_height_larger ();
|
|
|
|
void set_track_height_normal ();
|
|
|
|
void set_track_height_smaller ();
|
|
|
|
void set_track_height_small ();
|
|
|
|
|
|
|
|
void remove_tracks ();
|
|
|
|
void toggle_tracks_active ();
|
|
|
|
void waveform_scale_chosen (Editing::WaveformScale);
|
|
|
|
|
|
|
|
bool _have_idled;
|
2008-09-10 11:03:30 -04:00
|
|
|
int resize_idle_id;
|
|
|
|
int32_t resize_idle_target;
|
|
|
|
bool idle_resize();
|
|
|
|
friend gboolean _idle_resize (gpointer);
|
|
|
|
std::vector<TimeAxisView*> pending_resizes;
|
2009-01-05 22:18:09 -05:00
|
|
|
|
|
|
|
void visible_order_range (int*, int*) const;
|
|
|
|
bool y_movement_disallowed (int, int, int, int, int, std::bitset<512> const &, std::vector<int32_t> const &) const;
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_editor_h__ */
|