renaming: AutomationLineBase => AutomationLine, AutomationLine => EditorAutomationLine
This commit is contained in:
parent
90c8726c6d
commit
56ce9c33c0
@ -43,7 +43,7 @@
|
||||
|
||||
#include "audio_clip_editor.h"
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -1301,13 +1301,13 @@ AudioRegionView::update_envelope_visibility ()
|
||||
}
|
||||
|
||||
if (trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseContent ) {
|
||||
_fx_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::ControlPoints|AutomationLine::Line));
|
||||
_fx_line->set_visibility (EditorAutomationLine::VisibleAspects(EditorAutomationLine::ControlPoints|EditorAutomationLine::Line));
|
||||
_fx_line->canvas_group().raise_to_top ();
|
||||
} else if (UIConfiguration::instance().get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
|
||||
_fx_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::Line));
|
||||
_fx_line->set_visibility (EditorAutomationLine::VisibleAspects(EditorAutomationLine::Line));
|
||||
_fx_line->canvas_group().raise_to_top ();
|
||||
} else {
|
||||
_fx_line->set_visibility (AutomationLine::VisibleAspects(0));
|
||||
_fx_line->set_visibility (EditorAutomationLine::VisibleAspects(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "line_merger.h"
|
||||
#include "region_view.h"
|
||||
#include "time_axis_view_item.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "enums.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
@ -221,7 +221,7 @@ protected:
|
||||
|
||||
void transients_changed();
|
||||
|
||||
AutomationLine::VisibleAspects automation_line_visibility () const;
|
||||
EditorAutomationLine::VisibleAspects automation_line_visibility () const;
|
||||
void redisplay (bool) {}
|
||||
|
||||
private:
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "ardour/panner_shell.h"
|
||||
|
||||
#include "audio_time_axis.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "enums.h"
|
||||
#include "gui_thread.h"
|
||||
#include "automation_time_axis.h"
|
||||
|
@ -58,7 +58,7 @@ class Selection;
|
||||
class Selectable;
|
||||
class RegionView;
|
||||
class AudioRegionView;
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class AutomationGainLine;
|
||||
class AutomationPanLine;
|
||||
class TimeSelection;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,8 +23,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __ardour_automation_line_h__
|
||||
#define __ardour_automation_line_h__
|
||||
#ifndef __gtk2_ardour_automation_line_base_h__
|
||||
#define __gtk2_ardour_automation_line_base_h__
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
@ -45,39 +45,220 @@
|
||||
#include "canvas/container.h"
|
||||
#include "canvas/poly_line.h"
|
||||
|
||||
#include "automation_line_base.h"
|
||||
namespace ArdourCanvas {
|
||||
class Rectangle;
|
||||
}
|
||||
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class ControlPoint;
|
||||
class PointSelection;
|
||||
class TimeAxisView;
|
||||
class AutomationTimeAxisView;
|
||||
class Selectable;
|
||||
class Selection;
|
||||
class PublicEditor;
|
||||
class EditingContext;
|
||||
|
||||
|
||||
/** A GUI representation of an ARDOUR::AutomationList within the main editor
|
||||
* (i.e. in a TimeAxisView
|
||||
*/
|
||||
|
||||
class AutomationLine : public AutomationLineBase
|
||||
/** A GUI representation of an ARDOUR::AutomationList */
|
||||
class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
||||
{
|
||||
public:
|
||||
AutomationLine (const std::string& name,
|
||||
TimeAxisView& tv,
|
||||
ArdourCanvas::Item& parent,
|
||||
std::shared_ptr<ARDOUR::AutomationList> al,
|
||||
const ARDOUR::ParameterDescriptor& desc);
|
||||
enum VisibleAspects {
|
||||
Line = 0x1,
|
||||
ControlPoints = 0x2,
|
||||
SelectedControlPoints = 0x4
|
||||
};
|
||||
|
||||
AutomationLine (const std::string& name,
|
||||
EditingContext& ec,
|
||||
ArdourCanvas::Item& parent,
|
||||
ArdourCanvas::Rectangle* drag_base,
|
||||
std::shared_ptr<ARDOUR::AutomationList> al,
|
||||
const ARDOUR::ParameterDescriptor& desc);
|
||||
|
||||
virtual ~AutomationLine ();
|
||||
|
||||
TimeAxisView& trackview;
|
||||
virtual Temporal::timepos_t get_origin () const;
|
||||
|
||||
protected:
|
||||
virtual bool event_handler (GdkEvent*);
|
||||
ArdourCanvas::Rectangle* drag_base() const { return _drag_base; }
|
||||
|
||||
void queue_reset ();
|
||||
void reset ();
|
||||
void clear ();
|
||||
void set_fill (bool f) { _fill = f; } // owner needs to call set_height
|
||||
|
||||
void set_selected_points (PointSelection const &);
|
||||
void get_selectables (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, std::list<Selectable*>&);
|
||||
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
|
||||
|
||||
virtual void remove_point (ControlPoint&);
|
||||
bool control_points_adjacent (double xval, uint32_t& before, uint32_t& after);
|
||||
|
||||
/* dragging API */
|
||||
virtual void start_drag_single (ControlPoint*, double, float);
|
||||
virtual void start_drag_line (uint32_t, uint32_t, float);
|
||||
virtual void start_drag_multiple (std::list<ControlPoint*>, float, XMLNode *);
|
||||
virtual std::pair<float, float> drag_motion (Temporal::timecnt_t const &, float, bool, bool with_push, uint32_t& final_index);
|
||||
virtual void end_drag (bool with_push, uint32_t final_index);
|
||||
virtual void end_draw_merge () {}
|
||||
|
||||
ControlPoint* nth (uint32_t);
|
||||
ControlPoint const * nth (uint32_t) const;
|
||||
uint32_t npoints() const { return control_points.size(); }
|
||||
|
||||
std::string name() const { return _name; }
|
||||
bool visible() const { return _visible != VisibleAspects(0); }
|
||||
guint32 height() const { return _height; }
|
||||
|
||||
void set_line_color (std::string color, std::string mod = "");
|
||||
uint32_t get_line_color() const;
|
||||
|
||||
void set_visibility (VisibleAspects);
|
||||
void add_visibility (VisibleAspects);
|
||||
void remove_visibility (VisibleAspects);
|
||||
|
||||
void hide ();
|
||||
void set_height (guint32);
|
||||
|
||||
bool get_uses_gain_mapping () const;
|
||||
void tempo_map_changed ();
|
||||
|
||||
ArdourCanvas::Container& canvas_group() const { return *group; }
|
||||
ArdourCanvas::Item& parent_group() const { return _parent_group; }
|
||||
ArdourCanvas::Item& grab_item() const { return *line; }
|
||||
|
||||
virtual std::string get_verbose_cursor_string (double) const;
|
||||
std::string get_verbose_cursor_relative_string (double, double) const;
|
||||
std::string fraction_to_string (double) const;
|
||||
std::string delta_to_string (double) const;
|
||||
double string_to_fraction (std::string const &) const;
|
||||
|
||||
void view_to_model_coord_y (double &) const;
|
||||
|
||||
double model_to_view_coord_y (double) const;
|
||||
Temporal::timecnt_t model_to_view_coord_x (Temporal::timepos_t const &) const;
|
||||
|
||||
double compute_delta (double from, double to) const;
|
||||
void apply_delta (double& val, double delta) const;
|
||||
|
||||
void set_list(std::shared_ptr<ARDOUR::AutomationList> list);
|
||||
std::shared_ptr<ARDOUR::AutomationList> the_list() const { return alist; }
|
||||
|
||||
void track_entered();
|
||||
void track_exited();
|
||||
|
||||
bool is_last_point (ControlPoint &);
|
||||
bool is_first_point (ControlPoint &);
|
||||
|
||||
XMLNode& get_state () const;
|
||||
int set_state (const XMLNode&, int version);
|
||||
void set_colors();
|
||||
|
||||
void modify_points_y (std::vector<ControlPoint*> const&, double);
|
||||
|
||||
virtual MementoCommandBinder<ARDOUR::AutomationList>* memento_command_binder ();
|
||||
|
||||
std::pair<Temporal::timepos_t, Temporal::timepos_t> get_point_x_range () const;
|
||||
|
||||
void set_maximum_time (Temporal::timepos_t const &);
|
||||
Temporal::timepos_t maximum_time () const {
|
||||
return _maximum_time;
|
||||
}
|
||||
|
||||
void set_offset (Temporal::timepos_t const &);
|
||||
Temporal::timepos_t offset () { return _offset; }
|
||||
void set_width (Temporal::timecnt_t const &);
|
||||
|
||||
Temporal::timepos_t session_position (Temporal::timepos_t const &) const;
|
||||
void dump (std::ostream&) const;
|
||||
|
||||
double dt_to_dx (Temporal::timepos_t const &, Temporal::timecnt_t const &);
|
||||
|
||||
ARDOUR::ParameterDescriptor const & param() const { return _desc; }
|
||||
EditingContext& editing_context() const { return _editing_context; }
|
||||
|
||||
protected:
|
||||
|
||||
std::string _name;
|
||||
guint32 _height;
|
||||
std::string _line_color;
|
||||
std::string _line_color_mod;
|
||||
uint32_t _view_index_offset;
|
||||
std::shared_ptr<ARDOUR::AutomationList> alist;
|
||||
|
||||
VisibleAspects _visible;
|
||||
|
||||
bool terminal_points_can_slide;
|
||||
bool update_pending;
|
||||
bool have_reset_timeout;
|
||||
bool no_draw;
|
||||
bool _is_boolean;
|
||||
/** true if we did a push at any point during the current drag */
|
||||
bool did_push;
|
||||
|
||||
EditingContext& _editing_context;
|
||||
ArdourCanvas::Item& _parent_group;
|
||||
ArdourCanvas::Rectangle* _drag_base;
|
||||
ArdourCanvas::Container* group;
|
||||
ArdourCanvas::PolyLine* line; /* line */
|
||||
ArdourCanvas::Points line_points; /* coordinates for canvas line */
|
||||
std::vector<ControlPoint*> control_points; /* visible control points */
|
||||
|
||||
class ContiguousControlPoints : public std::list<ControlPoint*> {
|
||||
public:
|
||||
ContiguousControlPoints (AutomationLine& al);
|
||||
Temporal::timecnt_t clamp_dt (Temporal::timecnt_t const & dx, Temporal::timepos_t const & region_limit);
|
||||
void move (Temporal::timecnt_t const &, double dvalue);
|
||||
void compute_x_bounds ();
|
||||
private:
|
||||
AutomationLine& line;
|
||||
Temporal::timepos_t before_x;
|
||||
Temporal::timepos_t after_x;
|
||||
};
|
||||
|
||||
friend class ContiguousControlPoints;
|
||||
|
||||
typedef std::shared_ptr<ContiguousControlPoints> CCP;
|
||||
std::vector<CCP> contiguous_points;
|
||||
|
||||
bool sync_model_with_view_point (ControlPoint&);
|
||||
bool sync_model_with_view_points (std::list<ControlPoint*>);
|
||||
void start_drag_common (double, float);
|
||||
|
||||
void reset_callback (const Evoral::ControlList&);
|
||||
void list_changed ();
|
||||
|
||||
virtual bool event_handler (GdkEvent*) = 0;
|
||||
|
||||
private:
|
||||
std::list<ControlPoint*> _drag_points; ///< points we are dragging
|
||||
std::list<ControlPoint*> _push_points; ///< additional points we are dragging if "push" is enabled
|
||||
bool _drag_had_movement; ///< true if the drag has seen movement, otherwise false
|
||||
double _last_drag_fraction; ///< last y position of the drag, as a fraction
|
||||
/** offset from the start of the automation list to the start of the line, so that
|
||||
* a +ve offset means that the 0 on the line is at _offset in the list
|
||||
*/
|
||||
Temporal::timepos_t _offset;
|
||||
|
||||
bool is_stepped() const;
|
||||
void update_visibility ();
|
||||
void reset_line_coords (ControlPoint&);
|
||||
void add_visible_control_point (uint32_t, uint32_t, double, double, ARDOUR::AutomationList::iterator, uint32_t);
|
||||
double control_point_box_size ();
|
||||
void connect_to_list ();
|
||||
void interpolation_changed (ARDOUR::AutomationList::InterpolationStyle);
|
||||
|
||||
PBD::ScopedConnectionList _list_connections;
|
||||
|
||||
/** maximum time that a point on this line can be at, relative to the position of its region or start of its track */
|
||||
Temporal::timepos_t _maximum_time;
|
||||
|
||||
bool _fill;
|
||||
|
||||
const ARDOUR::ParameterDescriptor _desc;
|
||||
|
||||
friend class AudioRegionGainLine;
|
||||
friend class RegionFxLine;
|
||||
};
|
||||
|
||||
#endif /* __ardour_automation_line_h__ */
|
||||
#endif /* __gtk2_ardour_automation_line_base_h__ */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,264 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2017 Paul Davis <paul@linuxaudiosystems.com>
|
||||
* Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
|
||||
* Copyright (C) 2005 Nick Mainsbridge <mainsbridge@gmail.com>
|
||||
* Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
|
||||
* Copyright (C) 2006 Hans Fugal <hans@fugal.net>
|
||||
* Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
|
||||
* Copyright (C) 2007-2015 David Robillard <d@drobilla.net>
|
||||
* Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __gtk2_ardour_automation_line_base_h__
|
||||
#define __gtk2_ardour_automation_line_base_h__
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include "pbd/undo.h"
|
||||
#include "pbd/statefuldestructible.h"
|
||||
#include "pbd/memento_command.h"
|
||||
|
||||
#include "ardour/automation_list.h"
|
||||
#include "ardour/parameter_descriptor.h"
|
||||
#include "ardour/types.h"
|
||||
|
||||
#include "canvas/types.h"
|
||||
#include "canvas/container.h"
|
||||
#include "canvas/poly_line.h"
|
||||
|
||||
namespace ArdourCanvas {
|
||||
class Rectangle;
|
||||
}
|
||||
|
||||
class AutomationLine;
|
||||
class ControlPoint;
|
||||
class PointSelection;
|
||||
class TimeAxisView;
|
||||
class AutomationTimeAxisView;
|
||||
class Selectable;
|
||||
class Selection;
|
||||
class EditingContext;
|
||||
|
||||
/** A GUI representation of an ARDOUR::AutomationList */
|
||||
class AutomationLineBase : public sigc::trackable, public PBD::StatefulDestructible
|
||||
{
|
||||
public:
|
||||
enum VisibleAspects {
|
||||
Line = 0x1,
|
||||
ControlPoints = 0x2,
|
||||
SelectedControlPoints = 0x4
|
||||
};
|
||||
|
||||
AutomationLineBase (const std::string& name,
|
||||
EditingContext& ec,
|
||||
ArdourCanvas::Item& parent,
|
||||
ArdourCanvas::Rectangle* drag_base,
|
||||
std::shared_ptr<ARDOUR::AutomationList> al,
|
||||
const ARDOUR::ParameterDescriptor& desc);
|
||||
|
||||
virtual ~AutomationLineBase ();
|
||||
|
||||
virtual Temporal::timepos_t get_origin () const;
|
||||
|
||||
ArdourCanvas::Rectangle* drag_base() const { return _drag_base; }
|
||||
|
||||
void queue_reset ();
|
||||
void reset ();
|
||||
void clear ();
|
||||
void set_fill (bool f) { _fill = f; } // owner needs to call set_height
|
||||
|
||||
void set_selected_points (PointSelection const &);
|
||||
void get_selectables (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, std::list<Selectable*>&);
|
||||
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
|
||||
|
||||
virtual void remove_point (ControlPoint&);
|
||||
bool control_points_adjacent (double xval, uint32_t& before, uint32_t& after);
|
||||
|
||||
/* dragging API */
|
||||
virtual void start_drag_single (ControlPoint*, double, float);
|
||||
virtual void start_drag_line (uint32_t, uint32_t, float);
|
||||
virtual void start_drag_multiple (std::list<ControlPoint*>, float, XMLNode *);
|
||||
virtual std::pair<float, float> drag_motion (Temporal::timecnt_t const &, float, bool, bool with_push, uint32_t& final_index);
|
||||
virtual void end_drag (bool with_push, uint32_t final_index);
|
||||
virtual void end_draw_merge () {}
|
||||
|
||||
ControlPoint* nth (uint32_t);
|
||||
ControlPoint const * nth (uint32_t) const;
|
||||
uint32_t npoints() const { return control_points.size(); }
|
||||
|
||||
std::string name() const { return _name; }
|
||||
bool visible() const { return _visible != VisibleAspects(0); }
|
||||
guint32 height() const { return _height; }
|
||||
|
||||
void set_line_color (std::string color, std::string mod = "");
|
||||
uint32_t get_line_color() const;
|
||||
|
||||
void set_visibility (VisibleAspects);
|
||||
void add_visibility (VisibleAspects);
|
||||
void remove_visibility (VisibleAspects);
|
||||
|
||||
void hide ();
|
||||
void set_height (guint32);
|
||||
|
||||
bool get_uses_gain_mapping () const;
|
||||
void tempo_map_changed ();
|
||||
|
||||
ArdourCanvas::Container& canvas_group() const { return *group; }
|
||||
ArdourCanvas::Item& parent_group() const { return _parent_group; }
|
||||
ArdourCanvas::Item& grab_item() const { return *line; }
|
||||
|
||||
virtual std::string get_verbose_cursor_string (double) const;
|
||||
std::string get_verbose_cursor_relative_string (double, double) const;
|
||||
std::string fraction_to_string (double) const;
|
||||
std::string delta_to_string (double) const;
|
||||
double string_to_fraction (std::string const &) const;
|
||||
|
||||
void view_to_model_coord_y (double &) const;
|
||||
|
||||
double model_to_view_coord_y (double) const;
|
||||
Temporal::timecnt_t model_to_view_coord_x (Temporal::timepos_t const &) const;
|
||||
|
||||
double compute_delta (double from, double to) const;
|
||||
void apply_delta (double& val, double delta) const;
|
||||
|
||||
void set_list(std::shared_ptr<ARDOUR::AutomationList> list);
|
||||
std::shared_ptr<ARDOUR::AutomationList> the_list() const { return alist; }
|
||||
|
||||
void track_entered();
|
||||
void track_exited();
|
||||
|
||||
bool is_last_point (ControlPoint &);
|
||||
bool is_first_point (ControlPoint &);
|
||||
|
||||
XMLNode& get_state () const;
|
||||
int set_state (const XMLNode&, int version);
|
||||
void set_colors();
|
||||
|
||||
void modify_points_y (std::vector<ControlPoint*> const&, double);
|
||||
|
||||
virtual MementoCommandBinder<ARDOUR::AutomationList>* memento_command_binder ();
|
||||
|
||||
std::pair<Temporal::timepos_t, Temporal::timepos_t> get_point_x_range () const;
|
||||
|
||||
void set_maximum_time (Temporal::timepos_t const &);
|
||||
Temporal::timepos_t maximum_time () const {
|
||||
return _maximum_time;
|
||||
}
|
||||
|
||||
void set_offset (Temporal::timepos_t const &);
|
||||
Temporal::timepos_t offset () { return _offset; }
|
||||
void set_width (Temporal::timecnt_t const &);
|
||||
|
||||
Temporal::timepos_t session_position (Temporal::timepos_t const &) const;
|
||||
void dump (std::ostream&) const;
|
||||
|
||||
double dt_to_dx (Temporal::timepos_t const &, Temporal::timecnt_t const &);
|
||||
|
||||
ARDOUR::ParameterDescriptor const & param() const { return _desc; }
|
||||
EditingContext& editing_context() const { return _editing_context; }
|
||||
|
||||
protected:
|
||||
|
||||
std::string _name;
|
||||
guint32 _height;
|
||||
std::string _line_color;
|
||||
std::string _line_color_mod;
|
||||
uint32_t _view_index_offset;
|
||||
std::shared_ptr<ARDOUR::AutomationList> alist;
|
||||
|
||||
VisibleAspects _visible;
|
||||
|
||||
bool terminal_points_can_slide;
|
||||
bool update_pending;
|
||||
bool have_reset_timeout;
|
||||
bool no_draw;
|
||||
bool _is_boolean;
|
||||
/** true if we did a push at any point during the current drag */
|
||||
bool did_push;
|
||||
|
||||
EditingContext& _editing_context;
|
||||
ArdourCanvas::Item& _parent_group;
|
||||
ArdourCanvas::Rectangle* _drag_base;
|
||||
ArdourCanvas::Container* group;
|
||||
ArdourCanvas::PolyLine* line; /* line */
|
||||
ArdourCanvas::Points line_points; /* coordinates for canvas line */
|
||||
std::vector<ControlPoint*> control_points; /* visible control points */
|
||||
|
||||
class ContiguousControlPoints : public std::list<ControlPoint*> {
|
||||
public:
|
||||
ContiguousControlPoints (AutomationLineBase& al);
|
||||
Temporal::timecnt_t clamp_dt (Temporal::timecnt_t const & dx, Temporal::timepos_t const & region_limit);
|
||||
void move (Temporal::timecnt_t const &, double dvalue);
|
||||
void compute_x_bounds ();
|
||||
private:
|
||||
AutomationLineBase& line;
|
||||
Temporal::timepos_t before_x;
|
||||
Temporal::timepos_t after_x;
|
||||
};
|
||||
|
||||
friend class ContiguousControlPoints;
|
||||
|
||||
typedef std::shared_ptr<ContiguousControlPoints> CCP;
|
||||
std::vector<CCP> contiguous_points;
|
||||
|
||||
bool sync_model_with_view_point (ControlPoint&);
|
||||
bool sync_model_with_view_points (std::list<ControlPoint*>);
|
||||
void start_drag_common (double, float);
|
||||
|
||||
void reset_callback (const Evoral::ControlList&);
|
||||
void list_changed ();
|
||||
|
||||
virtual bool event_handler (GdkEvent*) = 0;
|
||||
|
||||
private:
|
||||
std::list<ControlPoint*> _drag_points; ///< points we are dragging
|
||||
std::list<ControlPoint*> _push_points; ///< additional points we are dragging if "push" is enabled
|
||||
bool _drag_had_movement; ///< true if the drag has seen movement, otherwise false
|
||||
double _last_drag_fraction; ///< last y position of the drag, as a fraction
|
||||
/** offset from the start of the automation list to the start of the line, so that
|
||||
* a +ve offset means that the 0 on the line is at _offset in the list
|
||||
*/
|
||||
Temporal::timepos_t _offset;
|
||||
|
||||
bool is_stepped() const;
|
||||
void update_visibility ();
|
||||
void reset_line_coords (ControlPoint&);
|
||||
void add_visible_control_point (uint32_t, uint32_t, double, double, ARDOUR::AutomationList::iterator, uint32_t);
|
||||
double control_point_box_size ();
|
||||
void connect_to_list ();
|
||||
void interpolation_changed (ARDOUR::AutomationList::InterpolationStyle);
|
||||
|
||||
PBD::ScopedConnectionList _list_connections;
|
||||
|
||||
/** maximum time that a point on this line can be at, relative to the position of its region or start of its track */
|
||||
Temporal::timepos_t _maximum_time;
|
||||
|
||||
bool _fill;
|
||||
|
||||
const ARDOUR::ParameterDescriptor _desc;
|
||||
|
||||
friend class AudioRegionGainLine;
|
||||
friend class RegionFxLine;
|
||||
};
|
||||
|
||||
#endif /* __gtk2_ardour_automation_line_base_h__ */
|
||||
|
@ -96,14 +96,14 @@ AutomationRegionView::init (bool /*wfd*/)
|
||||
void
|
||||
AutomationRegionView::create_line (std::shared_ptr<ARDOUR::AutomationList> list)
|
||||
{
|
||||
_line = std::shared_ptr<AutomationLine> (new MidiAutomationLine(
|
||||
_line = std::shared_ptr<EditorAutomationLine> (new MidiAutomationLine(
|
||||
ARDOUR::EventTypeMap::instance().to_symbol(list->parameter()),
|
||||
trackview, *get_canvas_group(), list,
|
||||
std::dynamic_pointer_cast<ARDOUR::MidiRegion> (_region),
|
||||
_parameter));
|
||||
_line->set_colors();
|
||||
_line->set_height ((uint32_t)rint(trackview.current_height() - 2.5 - NAME_HIGHLIGHT_SIZE));
|
||||
_line->set_visibility (AutomationLine::VisibleAspects (AutomationLine::Line|AutomationLine::ControlPoints));
|
||||
_line->set_visibility (EditorAutomationLine::VisibleAspects (EditorAutomationLine::Line|EditorAutomationLine::ControlPoints));
|
||||
_line->set_maximum_time (timepos_t (_region->length()));
|
||||
_line->set_offset (_region->start ());
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "region_view.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "enums.h"
|
||||
#include "line_merger.h"
|
||||
|
||||
@ -61,7 +61,7 @@ public:
|
||||
inline AutomationTimeAxisView* automation_view() const
|
||||
{ return dynamic_cast<AutomationTimeAxisView*>(&trackview); }
|
||||
|
||||
std::shared_ptr<AutomationLine> line() { return _line; }
|
||||
std::shared_ptr<EditorAutomationLine> line() { return _line; }
|
||||
|
||||
// We are a ghost. Meta ghosts? Crazy talk.
|
||||
virtual GhostRegion* add_ghost(TimeAxisView&) { return 0; }
|
||||
@ -91,7 +91,7 @@ protected:
|
||||
|
||||
private:
|
||||
Evoral::Parameter _parameter;
|
||||
std::shared_ptr<AutomationLine> _line;
|
||||
std::shared_ptr<EditorAutomationLine> _line;
|
||||
PBD::ScopedConnection _mouse_mode_connection;
|
||||
};
|
||||
|
||||
|
@ -129,7 +129,7 @@ AutomationStreamView::add_region_view_internal (std::shared_ptr<Region> region,
|
||||
|
||||
/* setup automation state for this region */
|
||||
if (_automation_view.parameter().type() != MidiVelocityAutomation) {
|
||||
std::shared_ptr<AutomationLine> line = dynamic_cast<AutomationRegionView*>(region_view)->line ();
|
||||
std::shared_ptr<EditorAutomationLine> line = dynamic_cast<AutomationRegionView*>(region_view)->line ();
|
||||
if (line && line->the_list()) {
|
||||
line->the_list()->set_automation_state (automation_state ());
|
||||
}
|
||||
@ -209,7 +209,7 @@ AutomationStreamView::automation_state () const
|
||||
return _pending_automation_state;
|
||||
}
|
||||
|
||||
std::shared_ptr<AutomationLine> line = ((AutomationRegionView*) region_views.front())->line ();
|
||||
std::shared_ptr<EditorAutomationLine> line = ((AutomationRegionView*) region_views.front())->line ();
|
||||
if (!line || !line->the_list()) {
|
||||
return Off;
|
||||
}
|
||||
@ -289,10 +289,10 @@ AutomationStreamView::set_selected_points (PointSelection& ps)
|
||||
}
|
||||
}
|
||||
|
||||
list<std::shared_ptr<AutomationLineBase> >
|
||||
list<std::shared_ptr<AutomationLine> >
|
||||
AutomationStreamView::get_lines () const
|
||||
{
|
||||
list<std::shared_ptr<AutomationLineBase> > lines;
|
||||
list<std::shared_ptr<AutomationLine> > lines;
|
||||
|
||||
for (auto const & rv : region_views) {
|
||||
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (rv);
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
void get_selectables (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, std::list<Selectable*> &, bool within = false);
|
||||
void set_selected_points (PointSelection &);
|
||||
|
||||
std::list<std::shared_ptr<AutomationLineBase> > get_lines () const;
|
||||
std::list<std::shared_ptr<AutomationLine> > get_lines () const;
|
||||
|
||||
bool paste (Temporal::timepos_t const & pos,
|
||||
unsigned paste_count,
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include "gui_thread.h"
|
||||
#include "mergeable_line.h"
|
||||
#include "route_time_axis.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "paste_context.h"
|
||||
#include "public_editor.h"
|
||||
#include "selection.h"
|
||||
@ -340,8 +340,8 @@ AutomationTimeAxisView::add_contents (bool show_regions)
|
||||
|
||||
assert (_control);
|
||||
|
||||
std::shared_ptr<AutomationLine> line (
|
||||
new AutomationLine (
|
||||
std::shared_ptr<EditorAutomationLine> line (
|
||||
new EditorAutomationLine (
|
||||
ARDOUR::EventTypeMap::instance().to_symbol(_parameter),
|
||||
*this,
|
||||
*_canvas_display,
|
||||
@ -987,7 +987,7 @@ AutomationTimeAxisView::clear_lines ()
|
||||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::add_line (std::shared_ptr<AutomationLine> line)
|
||||
AutomationTimeAxisView::add_line (std::shared_ptr<EditorAutomationLine> line)
|
||||
{
|
||||
if (_control && line) {
|
||||
assert(line->the_list() == _control->list());
|
||||
@ -1008,7 +1008,7 @@ AutomationTimeAxisView::add_line (std::shared_ptr<AutomationLine> line)
|
||||
/* pick up the current state */
|
||||
automation_state_changed ();
|
||||
|
||||
line->add_visibility (AutomationLine::Line);
|
||||
line->add_visibility (EditorAutomationLine::Line);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -1084,10 +1084,10 @@ AutomationTimeAxisView::has_automation () const
|
||||
return ( (_line && _line->npoints() > 0) || (_view && _view->has_automation()) );
|
||||
}
|
||||
|
||||
list<std::shared_ptr<AutomationLineBase> >
|
||||
list<std::shared_ptr<AutomationLine> >
|
||||
AutomationTimeAxisView::lines () const
|
||||
{
|
||||
list<std::shared_ptr<AutomationLineBase> > lines;
|
||||
list<std::shared_ptr<AutomationLine> > lines;
|
||||
|
||||
if (_line) {
|
||||
lines.push_back (_line);
|
||||
@ -1167,7 +1167,7 @@ AutomationTimeAxisView::parse_state_id (
|
||||
void
|
||||
AutomationTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
|
||||
{
|
||||
list<std::shared_ptr<AutomationLineBase> > lines;
|
||||
list<std::shared_ptr<AutomationLine> > lines;
|
||||
|
||||
if (_line) {
|
||||
cut_copy_clear_one (*_line, selection, op);
|
||||
@ -1179,7 +1179,7 @@ AutomationTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
|
||||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::cut_copy_clear_one (AutomationLineBase& line, Selection& selection, CutCopyOp op)
|
||||
AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& selection, CutCopyOp op)
|
||||
{
|
||||
std::shared_ptr<Evoral::ControlList> what_we_got;
|
||||
std::shared_ptr<AutomationList> alist (line.the_list());
|
||||
|
@ -54,8 +54,8 @@ class PublicEditor;
|
||||
class TimeSelection;
|
||||
class RegionSelection;
|
||||
class PointSelection;
|
||||
class AutomationLineBase;
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class Selection;
|
||||
class Selectable;
|
||||
class AutomationStreamView;
|
||||
@ -92,11 +92,11 @@ public:
|
||||
|
||||
void clear_lines ();
|
||||
|
||||
/** @return Our AutomationLine, if this view has one, or 0 if it uses AutomationRegionViews */
|
||||
std::shared_ptr<AutomationLine> line() { return _line; }
|
||||
/** @return Our EditorAutomationLine, if this view has one, or 0 if it uses AutomationRegionViews */
|
||||
std::shared_ptr<EditorAutomationLine> line() { return _line; }
|
||||
|
||||
/** @return All AutomationLines associated with this view */
|
||||
std::list<std::shared_ptr<AutomationLineBase> > lines () const;
|
||||
/** @return All EditorAutomationLines associated with this view */
|
||||
std::list<std::shared_ptr<AutomationLine> > lines () const;
|
||||
|
||||
AutomationStreamView* automation_view() const { return _view; }
|
||||
|
||||
@ -167,7 +167,7 @@ protected:
|
||||
Evoral::Parameter _parameter;
|
||||
|
||||
ArdourCanvas::Rectangle* _base_rect;
|
||||
std::shared_ptr<AutomationLine> _line;
|
||||
std::shared_ptr<EditorAutomationLine> _line;
|
||||
|
||||
std::string _name;
|
||||
|
||||
@ -194,7 +194,7 @@ protected:
|
||||
|
||||
bool _show_regions;
|
||||
|
||||
void add_line (std::shared_ptr<AutomationLine>);
|
||||
void add_line (std::shared_ptr<EditorAutomationLine>);
|
||||
|
||||
void clear_clicked ();
|
||||
void hide_clicked ();
|
||||
@ -203,7 +203,7 @@ protected:
|
||||
|
||||
void build_display_menu ();
|
||||
|
||||
void cut_copy_clear_one (AutomationLineBase&, Selection&, Editing::CutCopyOp);
|
||||
void cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
|
||||
bool paste_one (Temporal::timepos_t const &, unsigned, float times, const Selection&, ItemCounts& counts, bool greedy=false);
|
||||
void route_going_away ();
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "control_point.h"
|
||||
#include "automation_line_base.h"
|
||||
#include "automation_line.h"
|
||||
#include "public_editor.h"
|
||||
#include "ui_config.h"
|
||||
|
||||
@ -33,7 +33,7 @@ using namespace PBD;
|
||||
|
||||
PBD::Signal1<void, ControlPoint *> ControlPoint::CatchDeletion;
|
||||
|
||||
ControlPoint::ControlPoint (AutomationLineBase& al)
|
||||
ControlPoint::ControlPoint (AutomationLine& al)
|
||||
: _line (al)
|
||||
{
|
||||
_model = al.the_list()->end();
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "selectable.h"
|
||||
|
||||
class AutomationLineBase;
|
||||
class AutomationLine;
|
||||
class ControlPoint;
|
||||
class PointSelection;
|
||||
class TimeAxisView;
|
||||
@ -46,7 +46,7 @@ namespace ArdourCanvas {
|
||||
class ControlPoint : public Selectable
|
||||
{
|
||||
public:
|
||||
ControlPoint (AutomationLineBase& al);
|
||||
ControlPoint (AutomationLine& al);
|
||||
ControlPoint (const ControlPoint&, bool dummy_arg_to_force_special_copy_constructor);
|
||||
virtual ~ControlPoint ();
|
||||
|
||||
@ -80,17 +80,17 @@ public:
|
||||
|
||||
ArdourCanvas::Item& item() const;
|
||||
|
||||
/* used from ~AutomationLine */
|
||||
/* used from ~EditorAutomationLine */
|
||||
void unset_item () { _item = 0 ; }
|
||||
|
||||
ARDOUR::AutomationList::iterator model() const { return _model; }
|
||||
AutomationLineBase& line() const { return _line; }
|
||||
AutomationLine& line() const { return _line; }
|
||||
|
||||
static PBD::Signal1<void, ControlPoint *> CatchDeletion;
|
||||
|
||||
private:
|
||||
ArdourCanvas::Rectangle * _item;
|
||||
AutomationLineBase& _line;
|
||||
AutomationLine& _line;
|
||||
ARDOUR::AutomationList::iterator _model;
|
||||
uint32_t _view_index;
|
||||
bool _can_slide;
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "gtkmm2ext/gtk_ui.h"
|
||||
|
||||
#include "automation_line_base.h"
|
||||
#include "automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "control_point_dialog.h"
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include "actions.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "automation_line_base.h"
|
||||
#include "automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "edit_note_dialog.h"
|
||||
#include "editing_context.h"
|
||||
@ -2656,7 +2656,7 @@ EditingContext::get_draw_length_as_beats (bool& success, timepos_t const & posit
|
||||
void
|
||||
EditingContext::select_automation_line (GdkEventButton* event, ArdourCanvas::Item* item, ARDOUR::SelectionOperation op)
|
||||
{
|
||||
AutomationLineBase* al = reinterpret_cast<AutomationLineBase*> (item->get_data ("line"));
|
||||
AutomationLine* al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
|
||||
std::list<Selectable*> selectables;
|
||||
double mx = event->x;
|
||||
double my = event->y;
|
||||
|
@ -109,7 +109,7 @@ class AudioClock;
|
||||
class AudioRegionView;
|
||||
class AudioStreamView;
|
||||
class AudioTimeAxisView;
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class AutomationSelection;
|
||||
class AutomationTimeAxisView;
|
||||
class BundleManager;
|
||||
@ -1494,7 +1494,7 @@ private:
|
||||
bool canvas_control_point_event (GdkEvent* event,ArdourCanvas::Item*, ControlPoint*);
|
||||
bool canvas_velocity_event (GdkEvent* event,ArdourCanvas::Item*);
|
||||
bool canvas_velocity_base_event (GdkEvent* event,ArdourCanvas::Item*);
|
||||
bool canvas_line_event (GdkEvent* event,ArdourCanvas::Item*, AutomationLine*);
|
||||
bool canvas_line_event (GdkEvent* event,ArdourCanvas::Item*, EditorAutomationLine*);
|
||||
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*);
|
||||
|
56
gtk2_ardour/editor_automation_line.cc
Normal file
56
gtk2_ardour/editor_automation_line.cc
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2017 Paul Davis <paul@linuxaudiosystems.com>
|
||||
* Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
|
||||
* Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
|
||||
* Copyright (C) 2006 Hans Fugal <hans@fugal.net>
|
||||
* Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
|
||||
* Copyright (C) 2007-2015 David Robillard <d@drobilla.net>
|
||||
* Copyright (C) 2007 Doug McLain <doug@nostar.net>
|
||||
* Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
|
||||
* Copyright (C) 2014-2016 Nick Mainsbridge <mainsbridge@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "editor_automation_line.h"
|
||||
#include "public_editor.h"
|
||||
#include "time_axis_view.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
/** @param converter A TimeConverter whose origin_b is the start time of the AutomationList in session samples.
|
||||
* This will not be deleted by EditorAutomationLine.
|
||||
*/
|
||||
EditorAutomationLine::EditorAutomationLine (const string& name,
|
||||
TimeAxisView& tv,
|
||||
ArdourCanvas::Item& parent,
|
||||
std::shared_ptr<AutomationList> al,
|
||||
const ParameterDescriptor& desc)
|
||||
: AutomationLine (name, tv.editor(), parent, nullptr, al, desc)
|
||||
, trackview (tv)
|
||||
{
|
||||
line->set_data ("trackview", &trackview);
|
||||
}
|
||||
|
||||
EditorAutomationLine::~EditorAutomationLine ()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
EditorAutomationLine::event_handler (GdkEvent* event)
|
||||
{
|
||||
return trackview.editor().canvas_line_event (event, line, this);
|
||||
}
|
83
gtk2_ardour/editor_automation_line.h
Normal file
83
gtk2_ardour/editor_automation_line.h
Normal file
@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2017 Paul Davis <paul@linuxaudiosystems.com>
|
||||
* Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
|
||||
* Copyright (C) 2005 Nick Mainsbridge <mainsbridge@gmail.com>
|
||||
* Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
|
||||
* Copyright (C) 2006 Hans Fugal <hans@fugal.net>
|
||||
* Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
|
||||
* Copyright (C) 2007-2015 David Robillard <d@drobilla.net>
|
||||
* Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __ardour_automation_line_h__
|
||||
#define __ardour_automation_line_h__
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include "pbd/undo.h"
|
||||
#include "pbd/statefuldestructible.h"
|
||||
#include "pbd/memento_command.h"
|
||||
|
||||
#include "ardour/automation_list.h"
|
||||
#include "ardour/parameter_descriptor.h"
|
||||
#include "ardour/types.h"
|
||||
|
||||
#include "canvas/types.h"
|
||||
#include "canvas/container.h"
|
||||
#include "canvas/poly_line.h"
|
||||
|
||||
#include "automation_line.h"
|
||||
|
||||
class AutomationLine;
|
||||
class ControlPoint;
|
||||
class PointSelection;
|
||||
class TimeAxisView;
|
||||
class AutomationTimeAxisView;
|
||||
class Selectable;
|
||||
class Selection;
|
||||
class PublicEditor;
|
||||
|
||||
|
||||
/** A GUI representation of an ARDOUR::AutomationList within the main editor
|
||||
* (i.e. in a TimeAxisView
|
||||
*/
|
||||
|
||||
class EditorAutomationLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
EditorAutomationLine (const std::string& name,
|
||||
TimeAxisView& tv,
|
||||
ArdourCanvas::Item& parent,
|
||||
std::shared_ptr<ARDOUR::AutomationList> al,
|
||||
const ARDOUR::ParameterDescriptor& desc);
|
||||
|
||||
|
||||
virtual ~EditorAutomationLine ();
|
||||
|
||||
TimeAxisView& trackview;
|
||||
|
||||
protected:
|
||||
virtual bool event_handler (GdkEvent*);
|
||||
};
|
||||
|
||||
#endif /* __ardour_automation_line_h__ */
|
||||
|
@ -1262,7 +1262,7 @@ Editor::which_canvas_cursor(ItemType type) const
|
||||
case GainLineItem:
|
||||
cursor = _cursors->cross_hair;
|
||||
break;
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
cursor = _cursors->cross_hair;
|
||||
break;
|
||||
case StartSelectionTrimItem:
|
||||
@ -1431,7 +1431,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
||||
}
|
||||
break;
|
||||
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
if (mouse_mode == MouseDraw || mouse_mode == MouseObject) {
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
if (line) {
|
||||
@ -1523,7 +1523,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
||||
|
||||
switch (item_type) {
|
||||
case GainLineItem:
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
case ControlPointItem:
|
||||
/* these do not affect the current entered track state */
|
||||
clear_entered_track = false;
|
||||
@ -1544,7 +1544,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
||||
bool
|
||||
Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent*, ItemType item_type)
|
||||
{
|
||||
AutomationLine* al;
|
||||
EditorAutomationLine* al;
|
||||
ArdourMarker *marker;
|
||||
TempoMarker *t_marker;
|
||||
MeterMarker *m_marker;
|
||||
@ -1563,8 +1563,8 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent*, ItemType item_type)
|
||||
break;
|
||||
|
||||
case GainLineItem:
|
||||
case AutomationLineItem:
|
||||
al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
|
||||
case EditorAutomationLineItem:
|
||||
al = reinterpret_cast<EditorAutomationLine*> (item->get_data ("line"));
|
||||
{
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
if (line) {
|
||||
|
@ -47,9 +47,9 @@
|
||||
#include "audio_streamview.h"
|
||||
#include "audio_time_axis.h"
|
||||
#include "region_gain_line.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor_drag.h"
|
||||
#include "midi_time_axis.h"
|
||||
@ -636,7 +636,7 @@ Editor::canvas_control_point_event (GdkEvent *event, ArdourCanvas::Item* item, C
|
||||
case GDK_2BUTTON_PRESS:
|
||||
case GDK_3BUTTON_PRESS:
|
||||
clicked_control_point = cp;
|
||||
clicked_axisview = &dynamic_cast<AutomationLine*> (&cp->line())->trackview;
|
||||
clicked_axisview = &dynamic_cast<EditorAutomationLine*> (&cp->line())->trackview;
|
||||
clicked_routeview = dynamic_cast<RouteTimeAxisView*>(clicked_axisview);
|
||||
clicked_regionview = 0;
|
||||
break;
|
||||
@ -660,7 +660,7 @@ Editor::canvas_velocity_base_event (GdkEvent *event, ArdourCanvas::Item* item)
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, AutomationLine* al)
|
||||
Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, EditorAutomationLine* al)
|
||||
{
|
||||
ItemType type;
|
||||
RegionFxLine* rfl;
|
||||
@ -670,7 +670,7 @@ Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, Automation
|
||||
clicked_regionview = &rfl->region_view ();
|
||||
}
|
||||
} else {
|
||||
type = AutomationLineItem;
|
||||
type = EditorAutomationLineItem;
|
||||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
clicked_regionview = 0;
|
||||
}
|
||||
|
@ -4935,7 +4935,7 @@ ControlPointDrag::active (Editing::MouseMode m)
|
||||
}
|
||||
|
||||
/* otherwise active if the point is on an automation line (ie not if its on a region gain line) */
|
||||
return dynamic_cast<AutomationLineBase*> (&(_point->line ())) != 0;
|
||||
return dynamic_cast<AutomationLine*> (&(_point->line ())) != 0;
|
||||
}
|
||||
|
||||
LineDrag::LineDrag (Editor& e, ArdourCanvas::Item* i)
|
||||
@ -4962,7 +4962,7 @@ LineDrag::~LineDrag ()
|
||||
void
|
||||
LineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
|
||||
{
|
||||
_line = reinterpret_cast<AutomationLineBase*> (_item->get_data ("line"));
|
||||
_line = reinterpret_cast<AutomationLine*> (_item->get_data ("line"));
|
||||
assert (_line);
|
||||
|
||||
_item = &_line->grab_item ();
|
||||
@ -6399,7 +6399,7 @@ AutomationRangeDrag::AutomationRangeDrag (EditingContext& ec, list<RegionView*>
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::Drags, "New AutomationRangeDrag\n");
|
||||
|
||||
list<std::shared_ptr<AutomationLineBase>> lines;
|
||||
list<std::shared_ptr<AutomationLine>> lines;
|
||||
|
||||
for (list<RegionView*>::const_iterator i = v.begin (); i != v.end (); ++i) {
|
||||
if (AudioRegionView* audio_view = dynamic_cast<AudioRegionView*> (*i)) {
|
||||
@ -6414,16 +6414,16 @@ AutomationRangeDrag::AutomationRangeDrag (EditingContext& ec, list<RegionView*>
|
||||
setup (lines);
|
||||
}
|
||||
|
||||
/** @param lines AutomationLines to drag.
|
||||
* @param offset Offset from the session start to the points in the AutomationLines.
|
||||
/** @param lines EditorAutomationLines to drag.
|
||||
* @param offset Offset from the session start to the points in the EditorAutomationLines.
|
||||
*/
|
||||
void
|
||||
AutomationRangeDrag::setup (list<std::shared_ptr<AutomationLineBase>> const& lines)
|
||||
AutomationRangeDrag::setup (list<std::shared_ptr<AutomationLine>> const& lines)
|
||||
{
|
||||
/* find the lines that overlap the ranges being dragged */
|
||||
list<std::shared_ptr<AutomationLineBase>>::const_iterator i = lines.begin ();
|
||||
list<std::shared_ptr<AutomationLine>>::const_iterator i = lines.begin ();
|
||||
while (i != lines.end ()) {
|
||||
list<std::shared_ptr<AutomationLineBase>>::const_iterator j = i;
|
||||
list<std::shared_ptr<AutomationLine>>::const_iterator j = i;
|
||||
++j;
|
||||
|
||||
pair<timepos_t, timepos_t> r = (*i)->get_point_x_range ();
|
||||
@ -6458,7 +6458,7 @@ AutomationRangeDrag::setup (list<std::shared_ptr<AutomationLineBase>> const& lin
|
||||
i = j;
|
||||
}
|
||||
|
||||
/* Now ::lines contains the AutomationLines that somehow overlap our drag */
|
||||
/* Now ::lines contains the EditorAutomationLines that somehow overlap our drag */
|
||||
}
|
||||
|
||||
double
|
||||
@ -7306,7 +7306,7 @@ FreehandLineDrag<OrderedPointList,OrderedPoint>::motion (GdkEvent* ev, bool firs
|
||||
dragging_line = new ArdourCanvas::PolyLine (parent ? parent : item());
|
||||
dragging_line->set_ignore_events (true);
|
||||
dragging_line->set_outline_width (2.0);
|
||||
dragging_line->set_outline_color (UIConfiguration::instance().color ("automation line")); // XXX -> get color from AutomationLine
|
||||
dragging_line->set_outline_color (UIConfiguration::instance().color ("automation line")); // XXX -> get color from EditorAutomationLine
|
||||
dragging_line->raise_to_top ();
|
||||
|
||||
/* for freehand drawing, we only support left->right direction, for now. */
|
||||
|
@ -84,7 +84,7 @@ class TempoMarker;
|
||||
class TempoCurve;
|
||||
class ControlPoint;
|
||||
class AudioRegionView;
|
||||
class AutomationLineBase;
|
||||
class AutomationLine;
|
||||
class AutomationTimeAxisView;
|
||||
class VelocityDisplay;
|
||||
|
||||
@ -1250,7 +1250,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
AutomationLineBase* _line;
|
||||
AutomationLine* _line;
|
||||
double _fixed_grab_x;
|
||||
double _fixed_grab_y;
|
||||
double _cumulative_y_drag;
|
||||
@ -1487,7 +1487,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void setup (std::list<std::shared_ptr<AutomationLineBase> > const &);
|
||||
void setup (std::list<std::shared_ptr<AutomationLine> > const &);
|
||||
double y_fraction (double global_y_position) const;
|
||||
double value (std::shared_ptr<ARDOUR::AutomationList> list, Temporal::timepos_t const & x) const;
|
||||
|
||||
@ -1495,7 +1495,7 @@ private:
|
||||
|
||||
/** A line that is part of the drag */
|
||||
struct Line {
|
||||
std::shared_ptr<AutomationLineBase> line; ///< the line
|
||||
std::shared_ptr<AutomationLine> line; ///< the line
|
||||
std::list<ControlPoint*> points; ///< points to drag on the line
|
||||
std::pair<Temporal::timepos_t, Temporal::timepos_t> range; ///< the range of all points on the line, in session time
|
||||
XMLNode* state; ///< the XML state node before the drag
|
||||
|
@ -35,7 +35,7 @@ enum ItemType {
|
||||
SelectionItem,
|
||||
ControlPointItem,
|
||||
GainLineItem,
|
||||
AutomationLineItem,
|
||||
EditorAutomationLineItem,
|
||||
MeterMarkerItem,
|
||||
BBTMarkerItem,
|
||||
TempoCurveItem,
|
||||
|
@ -516,7 +516,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
|
||||
|
||||
case GainLineItem:
|
||||
if (eff_mouse_mode != MouseRange) {
|
||||
AutomationLine* argl = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
|
||||
EditorAutomationLine* argl = reinterpret_cast<EditorAutomationLine*> (item->get_data ("line"));
|
||||
|
||||
std::list<Selectable*> selectables;
|
||||
uint32_t before, after;
|
||||
@ -559,7 +559,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
|
||||
}
|
||||
break;
|
||||
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
if (eff_mouse_mode != MouseRange && eff_mouse_mode != MouseDraw) {
|
||||
select_automation_line (&event->button, item, op);
|
||||
}
|
||||
@ -857,7 +857,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
return true;
|
||||
break;
|
||||
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
_drags->set (new LineDrag (*this, item), event);
|
||||
return true;
|
||||
break;
|
||||
@ -998,7 +998,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
return true;
|
||||
break;
|
||||
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
_drags->set (new LineDrag (*this, item), event);
|
||||
return true;
|
||||
break;
|
||||
@ -1158,7 +1158,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
break;
|
||||
}
|
||||
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
/* fallthrough */
|
||||
case AutomationTrackItem:
|
||||
{
|
||||
@ -1640,7 +1640,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
case PlayheadCursorItem:
|
||||
case MarkerItem:
|
||||
case GainLineItem:
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
case StartSelectionTrimItem:
|
||||
case EndSelectionTrimItem:
|
||||
case SelectionMarkerItem:
|
||||
@ -1918,7 +1918,7 @@ Editor::can_remove_control_point (ArdourCanvas::Item* item)
|
||||
abort(); /*NOTREACHED*/
|
||||
}
|
||||
|
||||
AutomationLineBase& line (control_point->line());
|
||||
AutomationLine& line (control_point->line());
|
||||
if (dynamic_cast<RegionFxLine*> (&line)) {
|
||||
/* we shouldn't remove the first or last gain point in region gain lines */
|
||||
if (line.is_last_point(*control_point) || line.is_first_point(*control_point)) {
|
||||
|
@ -89,7 +89,7 @@
|
||||
#include "audio_region_view.h"
|
||||
#include "audio_streamview.h"
|
||||
#include "audio_time_axis.h"
|
||||
#include "automation_line_base.h"
|
||||
#include "automation_line.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "control_point.h"
|
||||
#include "debug.h"
|
||||
@ -4817,10 +4817,10 @@ Editor::cut_copy (CutCopyOp op)
|
||||
|
||||
struct AutomationRecord {
|
||||
AutomationRecord () : state (0) , line (nullptr) {}
|
||||
AutomationRecord (XMLNode* s, const AutomationLineBase* l) : state (s) , line (l) {}
|
||||
AutomationRecord (XMLNode* s, const AutomationLine* l) : state (s) , line (l) {}
|
||||
|
||||
XMLNode* state; ///< state before any operation
|
||||
const AutomationLineBase* line; ///< line this came from
|
||||
const AutomationLine* line; ///< line this came from
|
||||
std::shared_ptr<Evoral::ControlList> copy; ///< copied events for the cut buffer
|
||||
};
|
||||
|
||||
@ -4843,7 +4843,7 @@ Editor::cut_copy_points (Editing::CutCopyOp op, timepos_t const & earliest_time)
|
||||
timepos_t earliest (earliest_time);
|
||||
|
||||
/* XXX: not ideal, as there may be more than one track involved in the point selection */
|
||||
AutomationLine* line = dynamic_cast<AutomationLine*> (&selection->points.front()->line());
|
||||
EditorAutomationLine* line = dynamic_cast<EditorAutomationLine*> (&selection->points.front()->line());
|
||||
assert (line);
|
||||
_last_cut_copy_source_track = &line->trackview;
|
||||
|
||||
@ -4856,7 +4856,7 @@ Editor::cut_copy_points (Editing::CutCopyOp op, timepos_t const & earliest_time)
|
||||
|
||||
/* Go through all selected points, making an AutomationRecord for each distinct AutomationList */
|
||||
for (auto & selected_point : selection->points) {
|
||||
const AutomationLineBase& line (selected_point->line());
|
||||
const AutomationLine& line (selected_point->line());
|
||||
const std::shared_ptr<AutomationList> al = line.the_list();
|
||||
if (lists.find (al) == lists.end ()) {
|
||||
/* We haven't seen this list yet, so make a record for it. This includes
|
||||
@ -4909,7 +4909,7 @@ Editor::cut_copy_points (Editing::CutCopyOp op, timepos_t const & earliest_time)
|
||||
|
||||
/* Remove each selected point from its AutomationList */
|
||||
for (auto & selected_point : selection->points) {
|
||||
AutomationLineBase& line (selected_point->line ());
|
||||
AutomationLine& line (selected_point->line ());
|
||||
std::shared_ptr<AutomationList> al = line.the_list();
|
||||
|
||||
bool erase = true;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "audio_time_axis.h"
|
||||
#include "audio_region_view.h"
|
||||
#include "audio_streamview.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor_regions.h"
|
||||
#include "editor_cursors.h"
|
||||
|
@ -160,7 +160,7 @@ setup_gtk_ardour_enums ()
|
||||
REGISTER_ENUM (SelectionItem);
|
||||
REGISTER_ENUM (ControlPointItem);
|
||||
REGISTER_ENUM (GainLineItem);
|
||||
REGISTER_ENUM (AutomationLineItem);
|
||||
REGISTER_ENUM (EditorAutomationLineItem);
|
||||
REGISTER_ENUM (MeterMarkerItem);
|
||||
REGISTER_ENUM (TempoCurveItem);
|
||||
REGISTER_ENUM (TempoMarkerItem);
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "editing_context.h"
|
||||
#include "mergeable_line.h"
|
||||
#include "route_time_axis.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "ardour/types.h"
|
||||
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class RouteTimeAxisView;
|
||||
class EditingContext;
|
||||
|
||||
@ -38,7 +38,7 @@ class AutomationControl;
|
||||
class MergeableLine
|
||||
{
|
||||
public:
|
||||
MergeableLine (std::shared_ptr<AutomationLine> l, std::shared_ptr<ARDOUR::AutomationControl> c,
|
||||
MergeableLine (std::shared_ptr<EditorAutomationLine> l, std::shared_ptr<ARDOUR::AutomationControl> c,
|
||||
std::function<Temporal::timepos_t(Temporal::timepos_t const &)> tf,
|
||||
std::function<void(ARDOUR::AutoState)> asc,
|
||||
std::function<void()> ctc)
|
||||
@ -53,7 +53,7 @@ class MergeableLine
|
||||
void merge_drawn_line (EditingContext& e, ARDOUR::Session& s, Evoral::ControlList::OrderedPoints& points, bool thin);
|
||||
|
||||
private:
|
||||
std::shared_ptr<AutomationLine> _line;
|
||||
std::shared_ptr<EditorAutomationLine> _line;
|
||||
std::shared_ptr<ARDOUR::AutomationControl> _control;
|
||||
std::function<Temporal::timepos_t(Temporal::timepos_t const &)> time_filter;
|
||||
std::function<void(ARDOUR::AutoState)> automation_state_callback;
|
||||
|
@ -38,7 +38,7 @@ MidiAutomationLine::MidiAutomationLine (
|
||||
std::shared_ptr<ARDOUR::AutomationList> list,
|
||||
std::shared_ptr<ARDOUR::MidiRegion> region,
|
||||
Evoral::Parameter parameter)
|
||||
: AutomationLine (name, tav, parent, list, parameter)
|
||||
: EditorAutomationLine (name, tav, parent, list, parameter)
|
||||
, _region (region)
|
||||
, _parameter (parameter)
|
||||
{
|
||||
@ -72,26 +72,26 @@ MidiAutomationLine::get_verbose_cursor_string (double fraction) const
|
||||
using namespace MIDI::Name;
|
||||
|
||||
if (_parameter.type() != ARDOUR::MidiCCAutomation) {
|
||||
return AutomationLine::get_verbose_cursor_string(fraction);
|
||||
return EditorAutomationLine::get_verbose_cursor_string(fraction);
|
||||
}
|
||||
|
||||
MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(trackview.get_parent());
|
||||
if (!mtv) {
|
||||
return AutomationLine::get_verbose_cursor_string(fraction);
|
||||
return EditorAutomationLine::get_verbose_cursor_string(fraction);
|
||||
}
|
||||
|
||||
const uint8_t channel = mtv->get_preferred_midi_channel();
|
||||
std::shared_ptr<const ValueNameList> value_names = mtv->route()->instrument_info().value_name_list_by_control (channel, _parameter.id());
|
||||
|
||||
if (!value_names) {
|
||||
return AutomationLine::get_verbose_cursor_string(fraction);
|
||||
return EditorAutomationLine::get_verbose_cursor_string(fraction);
|
||||
}
|
||||
|
||||
const uint16_t cc_value = floor(std::max(std::min(fraction * 127.0, 127.0), 0.0));
|
||||
|
||||
std::shared_ptr<const Value> value = value_names->max_value_below(cc_value);
|
||||
if (!value) {
|
||||
return AutomationLine::get_verbose_cursor_string(fraction);
|
||||
return EditorAutomationLine::get_verbose_cursor_string(fraction);
|
||||
}
|
||||
|
||||
return value->name();
|
||||
|
@ -18,7 +18,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class MidiRegion;
|
||||
@ -27,7 +27,7 @@ namespace ARDOUR {
|
||||
/** Stub class so that lines for MIDI AutomationRegionViews can use the correct
|
||||
* MementoCommandBinder.
|
||||
*/
|
||||
class MidiAutomationLine : public AutomationLine
|
||||
class MidiAutomationLine : public EditorAutomationLine
|
||||
{
|
||||
public:
|
||||
MidiAutomationLine (const std::string&, TimeAxisView&, ArdourCanvas::Item&,
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "widgets/ardour_button.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "midi_cue_editor.h"
|
||||
|
@ -29,7 +29,7 @@ MidiCueAutomationLine::MidiCueAutomationLine (const std::string&
|
||||
ArdourCanvas::Rectangle* drag_base,
|
||||
std::shared_ptr<ARDOUR::AutomationList> al,
|
||||
const ARDOUR::ParameterDescriptor& desc)
|
||||
: AutomationLineBase (name, ec, parent, drag_base, al, desc)
|
||||
: AutomationLine (name, ec, parent, drag_base, al, desc)
|
||||
{
|
||||
_drag_base->set_data ("line", this);
|
||||
_drag_base->Event.connect (sigc::mem_fun (*this, &MidiCueAutomationLine::base_event_handler));
|
||||
@ -44,5 +44,5 @@ MidiCueAutomationLine::base_event_handler (GdkEvent* ev)
|
||||
bool
|
||||
MidiCueAutomationLine::event_handler (GdkEvent* ev)
|
||||
{
|
||||
return _editing_context.typed_event (line, ev, AutomationLineItem);
|
||||
return _editing_context.typed_event (line, ev, EditorAutomationLineItem);
|
||||
}
|
||||
|
@ -19,9 +19,9 @@
|
||||
#ifndef __gtk2_ardour_midi_cue_automation_line_h__
|
||||
#define __gtk2_ardour_midi_cue_automation_line_h__
|
||||
|
||||
#include "automation_line_base.h"
|
||||
#include "automation_line.h"
|
||||
|
||||
class MidiCueAutomationLine : public AutomationLineBase
|
||||
class MidiCueAutomationLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
MidiCueAutomationLine (const std::string& name,
|
||||
|
@ -544,7 +544,7 @@ MidiCueEditor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event
|
||||
return true;
|
||||
break;
|
||||
|
||||
case AutomationLineItem: {
|
||||
case EditorAutomationLineItem: {
|
||||
ARDOUR::SelectionOperation op = ArdourKeyboard::selection_type (event->button.state);
|
||||
select_automation_line (&event->button, item, op);
|
||||
return true;
|
||||
@ -1525,7 +1525,7 @@ MidiCueEditor::which_canvas_cursor (ItemType type) const
|
||||
case GainLineItem:
|
||||
cursor = _cursors->cross_hair;
|
||||
break;
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
cursor = _cursors->cross_hair;
|
||||
break;
|
||||
case StartSelectionTrimItem:
|
||||
@ -1566,18 +1566,18 @@ MidiCueEditor::which_canvas_cursor (ItemType type) const
|
||||
bool
|
||||
MidiCueEditor::enter_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType item_type)
|
||||
{
|
||||
AutomationLine* al;
|
||||
EditorAutomationLine* al;
|
||||
|
||||
choose_canvas_cursor_on_entry (item_type);
|
||||
|
||||
switch (item_type) {
|
||||
case AutomationTrackItem:
|
||||
/* item is the base rectangle */
|
||||
al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
|
||||
al = reinterpret_cast<EditorAutomationLine*> (item->get_data ("line"));
|
||||
al->track_entered ();
|
||||
break;
|
||||
|
||||
case AutomationLineItem:
|
||||
case EditorAutomationLineItem:
|
||||
{
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
|
||||
@ -1596,7 +1596,7 @@ MidiCueEditor::enter_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType i
|
||||
bool
|
||||
MidiCueEditor::leave_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType item_type)
|
||||
{
|
||||
AutomationLine* al;
|
||||
EditorAutomationLine* al;
|
||||
|
||||
if (!_enter_stack.empty()) {
|
||||
_enter_stack.pop_back();
|
||||
@ -1607,8 +1607,8 @@ MidiCueEditor::leave_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType i
|
||||
_verbose_cursor->hide ();
|
||||
break;
|
||||
|
||||
case AutomationLineItem:
|
||||
al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
|
||||
case EditorAutomationLineItem:
|
||||
al = reinterpret_cast<EditorAutomationLine*> (item->get_data ("line"));
|
||||
{
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
if (line) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "widgets/ardour_button.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "midi_time_axis.h"
|
||||
#include "midi_view.h"
|
||||
#include "time_axis_view_item.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "enums.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -76,7 +76,7 @@
|
||||
#include "ardour/velocity_control.h"
|
||||
|
||||
#include "ardour_message.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "automation_time_axis.h"
|
||||
#include "editor.h"
|
||||
#include "enums.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "widgets/ardour_button.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "region_view.h"
|
||||
#include "midi_view_background.h"
|
||||
#include "time_axis_view_item.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "enums.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -86,7 +86,7 @@ namespace Gtk {
|
||||
}
|
||||
|
||||
class AudioRegionView;
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class AutomationTimeAxisView;
|
||||
class ControlPoint;
|
||||
class DragManager;
|
||||
@ -361,7 +361,7 @@ public:
|
||||
virtual bool canvas_control_point_event (GdkEvent* event, ArdourCanvas::Item*, ControlPoint*) = 0;
|
||||
virtual bool canvas_velocity_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_velocity_base_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_line_event (GdkEvent* event, ArdourCanvas::Item*, AutomationLine*) = 0;
|
||||
virtual bool canvas_line_event (GdkEvent* event, ArdourCanvas::Item*, EditorAutomationLine*) = 0;
|
||||
virtual bool canvas_selection_rect_event (GdkEvent* event, ArdourCanvas::Item*, SelectionRect*) = 0;
|
||||
virtual bool canvas_selection_start_trim_event (GdkEvent* event, ArdourCanvas::Item*, SelectionRect*) = 0;
|
||||
virtual bool canvas_selection_end_trim_event (GdkEvent* event, ArdourCanvas::Item*, SelectionRect*) = 0;
|
||||
|
@ -27,7 +27,7 @@
|
||||
using namespace ARDOUR;
|
||||
|
||||
RegionFxLine::RegionFxLine (std::string const& name, RegionView& r, ArdourCanvas::Container& parent, std::shared_ptr<AutomationList> l, ParameterDescriptor const& d)
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, l, d)
|
||||
: EditorAutomationLine (name, r.get_time_axis_view(), parent, l, d)
|
||||
, _rv (r)
|
||||
{
|
||||
terminal_points_can_slide = false;
|
||||
@ -35,7 +35,7 @@ RegionFxLine::RegionFxLine (std::string const& name, RegionView& r, ArdourCanvas
|
||||
}
|
||||
|
||||
RegionFxLine::RegionFxLine (std::string const& name, RegionView& r, ArdourCanvas::Container& parent, std::shared_ptr<ARDOUR::AutomationControl> ac)
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, ac->alist (), ac->desc ())
|
||||
: EditorAutomationLine (name, r.get_time_axis_view(), parent, ac->alist (), ac->desc ())
|
||||
, _rv (r)
|
||||
, _ac (ac)
|
||||
{
|
||||
@ -70,14 +70,14 @@ void
|
||||
RegionFxLine::end_drag (bool with_push, uint32_t final_index)
|
||||
{
|
||||
enable_automation ();
|
||||
AutomationLine::end_drag (with_push, final_index);
|
||||
EditorAutomationLine::end_drag (with_push, final_index);
|
||||
}
|
||||
|
||||
void
|
||||
RegionFxLine::end_draw_merge ()
|
||||
{
|
||||
enable_automation ();
|
||||
AutomationLine::end_draw_merge ();
|
||||
EditorAutomationLine::end_draw_merge ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -19,11 +19,11 @@
|
||||
#ifndef __ardour_gtk_region_fx_line_h__
|
||||
#define __ardour_gtk_region_fx_line_h__
|
||||
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
|
||||
class RegionView;
|
||||
|
||||
class RegionFxLine : public AutomationLine
|
||||
class RegionFxLine : public EditorAutomationLine
|
||||
{
|
||||
public:
|
||||
RegionFxLine (std::string const&, RegionView&, ArdourCanvas::Container&, std::shared_ptr<ARDOUR::AutomationList>, ARDOUR::ParameterDescriptor const&);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "canvas/fwd.h"
|
||||
|
||||
#include "time_axis_view_item.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "enums.h"
|
||||
#include "marker.h"
|
||||
|
||||
|
@ -1968,7 +1968,7 @@ RouteTimeAxisView::add_existing_processor_automation_curves (std::weak_ptr<Proce
|
||||
for (set<Evoral::Parameter>::iterator i = existing.begin(); i != existing.end(); ++i) {
|
||||
|
||||
Evoral::Parameter param (*i);
|
||||
std::shared_ptr<AutomationLine> al;
|
||||
std::shared_ptr<EditorAutomationLine> al;
|
||||
|
||||
std::shared_ptr<AutomationControl> control = std::dynamic_pointer_cast<AutomationControl>(processor->control(*i, false));
|
||||
if (!control || control->flags () & Controllable::HiddenControl) {
|
||||
@ -2227,7 +2227,7 @@ RouteTimeAxisView::processors_changed (RouteProcessorChange c)
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<AutomationLine>
|
||||
std::shared_ptr<EditorAutomationLine>
|
||||
RouteTimeAxisView::find_processor_automation_curve (std::shared_ptr<Processor> processor, Evoral::Parameter what)
|
||||
{
|
||||
ProcessorAutomationNode* pan;
|
||||
@ -2238,7 +2238,7 @@ RouteTimeAxisView::find_processor_automation_curve (std::shared_ptr<Processor> p
|
||||
}
|
||||
}
|
||||
|
||||
return std::shared_ptr<AutomationLine>();
|
||||
return std::shared_ptr<EditorAutomationLine>();
|
||||
}
|
||||
|
||||
void
|
||||
@ -2606,7 +2606,7 @@ RouteTimeAxisView::automation_child(Evoral::Parameter param, PBD::ID ctrl_id)
|
||||
return std::shared_ptr<AutomationTimeAxisView>();
|
||||
}
|
||||
|
||||
std::shared_ptr<AutomationLineBase>
|
||||
std::shared_ptr<AutomationLine>
|
||||
RouteTimeAxisView::automation_child_by_alist_id (PBD::ID alist_id)
|
||||
{
|
||||
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
|
||||
|
@ -69,7 +69,7 @@ class Selection;
|
||||
class RegionSelection;
|
||||
class Selectable;
|
||||
class AutomationTimeAxisView;
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class TimeSelection;
|
||||
class RouteGroupMenu;
|
||||
class ItemCounts;
|
||||
@ -201,13 +201,13 @@ protected:
|
||||
std::shared_ptr<AutomationTimeAxisView>
|
||||
find_atav_by_ctrl (std::shared_ptr<ARDOUR::AutomationControl>, bool route_owned_only = true);
|
||||
|
||||
std::shared_ptr<AutomationLine>
|
||||
std::shared_ptr<EditorAutomationLine>
|
||||
find_processor_automation_curve (std::shared_ptr<ARDOUR::Processor> i, Evoral::Parameter);
|
||||
|
||||
void add_processor_automation_curve (std::shared_ptr<ARDOUR::Processor> r, Evoral::Parameter);
|
||||
void add_existing_processor_automation_curves (std::weak_ptr<ARDOUR::Processor>);
|
||||
|
||||
std::shared_ptr<AutomationLineBase> automation_child_by_alist_id (PBD::ID);
|
||||
std::shared_ptr<AutomationLine> automation_child_by_alist_id (PBD::ID);
|
||||
|
||||
void reset_processor_automation_curves ();
|
||||
|
||||
@ -270,7 +270,7 @@ protected:
|
||||
|
||||
std::map<std::shared_ptr<PBD::Controllable>, Gtk::CheckMenuItem*> ctrl_item_map;
|
||||
|
||||
typedef std::vector<std::shared_ptr<AutomationLine> > ProcessorAutomationCurves;
|
||||
typedef std::vector<std::shared_ptr<EditorAutomationLine> > ProcessorAutomationCurves;
|
||||
ProcessorAutomationCurves processor_automation_curves;
|
||||
/** parameter -> menu item map for the plugin automation menu */
|
||||
ParameterMenuMap _subplugin_menu_map;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
||||
#include "audio_region_view.h"
|
||||
#include "automation_line_base.h"
|
||||
#include "automation_line.h"
|
||||
#include "debug.h"
|
||||
#include "gui_thread.h"
|
||||
#include "midi_cut_buffer.h"
|
||||
@ -540,7 +540,7 @@ Selection::add (std::shared_ptr<Evoral::ControlList> cl)
|
||||
}
|
||||
|
||||
/* The original may change so we must store a copy (not a pointer) here.
|
||||
* e.g AutomationLine rewrites the list with gain mapping.
|
||||
* e.g EditorAutomationLine rewrites the list with gain mapping.
|
||||
* the downside is that we can't perform duplicate checks.
|
||||
* This code was changed in response to #6842
|
||||
*/
|
||||
@ -1165,7 +1165,7 @@ Selection::get_state () const
|
||||
}
|
||||
|
||||
for (auto & cp : points) {
|
||||
AutomationLine* al = dynamic_cast<AutomationLine*> (&cp->line());
|
||||
EditorAutomationLine* al = dynamic_cast<EditorAutomationLine*> (&cp->line());
|
||||
assert (al);
|
||||
AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (&al->trackview);
|
||||
if (atv) {
|
||||
@ -1315,7 +1315,7 @@ Selection::set_state (XMLNode const & node, int)
|
||||
vector <ControlPoint *> cps;
|
||||
|
||||
if (stv) {
|
||||
std::shared_ptr<AutomationLineBase> li = stv->automation_child_by_alist_id (alist_id);
|
||||
std::shared_ptr<AutomationLine> li = stv->automation_child_by_alist_id (alist_id);
|
||||
if (li) {
|
||||
ControlPoint* cp = li->nth(view_index);
|
||||
if (cp) {
|
||||
|
@ -52,7 +52,7 @@ class RegionView;
|
||||
class Selectable;
|
||||
class EditingContext;
|
||||
class MidiRegionView;
|
||||
class AutomationLine;
|
||||
class EditorAutomationLine;
|
||||
class ControlPoint;
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -621,7 +621,7 @@ StreamView::get_selectables (timepos_t const & start, timepos_t const & end, dou
|
||||
if (_trackview.editor().internal_editing()) {
|
||||
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (*i);
|
||||
if (arv && arv->fx_line ()) {
|
||||
/* Note: AutomationLine::get_selectables() uses trackview.current_height (),
|
||||
/* Note: EditorAutomationLine::get_selectables() uses trackview.current_height (),
|
||||
* disregarding Stacked layer display height
|
||||
*/
|
||||
double const c = height; // child_height (); // XXX
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "public_editor.h"
|
||||
#include "stripable_time_axis.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
@ -192,7 +192,7 @@ StripableTimeAxisView::automation_child(Evoral::Parameter param, PBD::ID)
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<AutomationLineBase>
|
||||
std::shared_ptr<AutomationLine>
|
||||
StripableTimeAxisView::automation_child_by_alist_id (PBD::ID alist_id)
|
||||
{
|
||||
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
|
||||
@ -203,7 +203,7 @@ StripableTimeAxisView::automation_child_by_alist_id (PBD::ID alist_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::shared_ptr<AutomationLine> ();
|
||||
return std::shared_ptr<EditorAutomationLine> ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
virtual void create_automation_child (const Evoral::Parameter& param, bool show) = 0;
|
||||
virtual std::shared_ptr<AutomationTimeAxisView> automation_child (Evoral::Parameter param, PBD::ID ctrl_id = PBD::ID(0));
|
||||
|
||||
virtual std::shared_ptr<AutomationLineBase> automation_child_by_alist_id (PBD::ID);
|
||||
virtual std::shared_ptr<AutomationLine> automation_child_by_alist_id (PBD::ID);
|
||||
|
||||
void request_redraw ();
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "automation_line.h"
|
||||
#include "editor_automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "editor.h"
|
||||
#include "region_view.h"
|
||||
|
@ -49,7 +49,6 @@ gtk2_ardour_sources = [
|
||||
'audio_time_axis.cc',
|
||||
'automation_controller.cc',
|
||||
'automation_line.cc',
|
||||
'automation_line_base.cc',
|
||||
'automation_region_view.cc',
|
||||
'automation_streamview.cc',
|
||||
'automation_time_axis.cc',
|
||||
@ -78,6 +77,7 @@ gtk2_ardour_sources = [
|
||||
'editing_context.cc',
|
||||
'editor.cc',
|
||||
'editor_actions.cc',
|
||||
'editor_automation_line.cc',
|
||||
'editor_audio_import.cc',
|
||||
'editor_pt_import.cc',
|
||||
'editor_audiotrack.cc',
|
||||
|
Loading…
Reference in New Issue
Block a user