Ardour  9.0-pre0-582-g084a23a80d
AutomationLine Class Referenceabstract

#include <automation_line.h>

Inheritance diagram for AutomationLine:
[legend]

Classes

class  ContiguousControlPoints
 

Public Types

enum  VisibleAspects { Line = 0x1 , ControlPoints = 0x2 , SelectedControlPoints = 0x4 }
 

Public Member Functions

 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 ()
 
virtual Temporal::timepos_t get_origin () const
 
ArdourCanvas::Rectangledrag_base () const
 
void queue_reset ()
 
void reset ()
 
void clear ()
 
void set_fill (bool f)
 
void set_selected_points (PointSelection const &)
 
void _get_selectables (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, std::list< Selectable * > &, bool within)
 
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)
 
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 ()
 
ControlPointnth (uint32_t)
 
ControlPoint const * nth (uint32_t) const
 
uint32_t npoints () const
 
std::string name () const
 
bool visible () const
 
guint32 height () const
 
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 hide_all ()
 
void show ()
 
void set_height (guint32)
 
bool get_uses_gain_mapping () const
 
void tempo_map_changed ()
 
ArdourCanvas::Containercanvas_group () const
 
ArdourCanvas::Itemparent_group () const
 
ArdourCanvas::Itemgrab_item () const
 
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::AutomationListthe_list () const
 
void track_entered ()
 
void track_exited ()
 
bool is_last_point (ControlPoint &)
 
bool is_first_point (ControlPoint &)
 
XMLNodeget_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_tget_point_x_range () const
 
void set_maximum_time (Temporal::timepos_t const &)
 
Temporal::timepos_t maximum_time () const
 
void set_offset (Temporal::timepos_t const &)
 
Temporal::timepos_t 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
 
EditingContextediting_context () const
 
void add (std::shared_ptr< ARDOUR::AutomationControl >, GdkEvent *, Temporal::timepos_t const &, double y, bool with_guard_points)
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_change (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (PBD::Command *) const
 
virtual void rdiff (std::vector< PBD::Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from PBD::Destructible
virtual ~Destructible ()
 
virtual void drop_references ()
 
- Public Member Functions inherited from SelectableOwner
 SelectableOwner ()
 
virtual ~SelectableOwner ()
 
void get_selectables (Temporal::timepos_t const &start, Temporal::timepos_t const &end, double x, double y, std::list< Selectable * > &sl, bool within=false)
 

Protected Types

typedef std::shared_ptr< ContiguousControlPointsCCP
 

Protected Member Functions

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
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &) const
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
bool regenerate_xml_or_string_ids () const
 

Protected Attributes

std::string _name
 
guint32 _height
 
std::string _line_color
 
std::string _line_color_mod
 
uint32_t _view_index_offset
 
std::shared_ptr< ARDOUR::AutomationListalist
 
VisibleAspects _visible
 
bool terminal_points_can_slide
 
bool update_pending
 
bool have_reset_timeout
 
bool no_draw
 
bool _is_boolean
 
bool did_push
 
EditingContext_editing_context
 
ArdourCanvas::Item_parent_group
 
ArdourCanvas::Rectangle_drag_base
 
ArdourCanvas::Containergroup
 
ArdourCanvas::PolyLineline
 
ArdourCanvas::Points line_points
 
std::vector< ControlPoint * > control_points
 
std::vector< CCPcontiguous_points
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 

Private Member Functions

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)
 

Private Attributes

std::list< ControlPoint * > _drag_points
 points we are dragging More...
 
std::list< ControlPoint * > _push_points
 additional points we are dragging if "push" is enabled More...
 
bool _drag_had_movement
 true if the drag has seen movement, otherwise false More...
 
double _last_drag_fraction
 last y position of the drag, as a fraction More...
 
Temporal::timepos_t _offset
 
PBD::ScopedConnectionList _list_connections
 
Temporal::timepos_t _maximum_time
 
bool _fill
 
const ARDOUR::ParameterDescriptor _desc
 

Friends

class ContiguousControlPoints
 
class AudioRegionGainLine
 
class RegionFxLine
 

Additional Inherited Members

- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal< void()> Destroyed
 
PBD::Signal< void()> DropReferences
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 

Detailed Description

A GUI representation of an ARDOUR::AutomationList

Definition at line 63 of file automation_line.h.

Member Typedef Documentation

◆ CCP

typedef std::shared_ptr<ContiguousControlPoints> AutomationLine::CCP
protected

Definition at line 225 of file automation_line.h.

Member Enumeration Documentation

◆ VisibleAspects

Enumerator
Line 
ControlPoints 
SelectedControlPoints 

Definition at line 66 of file automation_line.h.

Constructor & Destructor Documentation

◆ AutomationLine()

AutomationLine::AutomationLine ( const std::string &  name,
EditingContext ec,
ArdourCanvas::Item parent,
ArdourCanvas::Rectangle drag_base,
std::shared_ptr< ARDOUR::AutomationList al,
const ARDOUR::ParameterDescriptor desc 
)

◆ ~AutomationLine()

virtual AutomationLine::~AutomationLine ( )
virtual

Member Function Documentation

◆ _get_selectables()

void AutomationLine::_get_selectables ( Temporal::timepos_t const &  ,
Temporal::timepos_t const &  ,
double  ,
double  ,
std::list< Selectable * > &  ,
bool  within 
)
virtual

Implements SelectableOwner.

◆ add()

void AutomationLine::add ( std::shared_ptr< ARDOUR::AutomationControl ,
GdkEvent ,
Temporal::timepos_t const &  ,
double  y,
bool  with_guard_points 
)

◆ add_visibility()

void AutomationLine::add_visibility ( VisibleAspects  )

◆ add_visible_control_point()

void AutomationLine::add_visible_control_point ( uint32_t  ,
uint32_t  ,
double  ,
double  ,
ARDOUR::AutomationList::iterator  ,
uint32_t   
)
private

◆ apply_delta()

void AutomationLine::apply_delta ( double &  val,
double  delta 
) const

◆ canvas_group()

ArdourCanvas::Container& AutomationLine::canvas_group ( ) const
inline

Definition at line 128 of file automation_line.h.

◆ clear()

void AutomationLine::clear ( )

◆ compute_delta()

double AutomationLine::compute_delta ( double  from,
double  to 
) const

◆ connect_to_list()

void AutomationLine::connect_to_list ( )
private

◆ control_point_box_size()

double AutomationLine::control_point_box_size ( )
private

◆ control_points_adjacent()

bool AutomationLine::control_points_adjacent ( double  xval,
uint32_t &  before,
uint32_t &  after 
)

◆ delta_to_string()

std::string AutomationLine::delta_to_string ( double  ) const

◆ drag_base()

ArdourCanvas::Rectangle* AutomationLine::drag_base ( ) const
inline

Definition at line 83 of file automation_line.h.

◆ drag_motion()

virtual std::pair<float, float> AutomationLine::drag_motion ( Temporal::timecnt_t const &  ,
float  ,
bool  ,
bool  with_push,
uint32_t &  final_index 
)
virtual

◆ dt_to_dx()

double AutomationLine::dt_to_dx ( Temporal::timepos_t const &  ,
Temporal::timecnt_t const &   
)

◆ dump()

void AutomationLine::dump ( std::ostream &  ) const

◆ editing_context()

EditingContext& AutomationLine::editing_context ( ) const
inline

Definition at line 180 of file automation_line.h.

◆ end_drag()

virtual void AutomationLine::end_drag ( bool  with_push,
uint32_t  final_index 
)
virtual

Reimplemented in AudioRegionGainLine, and RegionFxLine.

◆ end_draw_merge()

virtual void AutomationLine::end_draw_merge ( )
inlinevirtual

Reimplemented in AudioRegionGainLine, and RegionFxLine.

Definition at line 103 of file automation_line.h.

◆ event_handler()

virtual bool AutomationLine::event_handler ( GdkEvent )
protectedpure virtual

◆ fraction_to_string()

std::string AutomationLine::fraction_to_string ( double  ) const

◆ get_inverted_selectables()

void AutomationLine::get_inverted_selectables ( Selection ,
std::list< Selectable * > &  results 
)
virtual

Implements SelectableOwner.

◆ get_line_color()

uint32_t AutomationLine::get_line_color ( ) const

◆ get_origin()

virtual Temporal::timepos_t AutomationLine::get_origin ( ) const
virtual

Reimplemented in RegionFxLine, and MidiAutomationLine.

◆ get_point_x_range()

std::pair<Temporal::timepos_t, Temporal::timepos_t> AutomationLine::get_point_x_range ( ) const

◆ get_state()

XMLNode& AutomationLine::get_state ( ) const
virtual

Implements PBD::Stateful.

◆ get_uses_gain_mapping()

bool AutomationLine::get_uses_gain_mapping ( ) const

◆ get_verbose_cursor_relative_string()

std::string AutomationLine::get_verbose_cursor_relative_string ( double  ,
double   
) const

◆ get_verbose_cursor_string()

virtual std::string AutomationLine::get_verbose_cursor_string ( double  ) const
virtual

Reimplemented in MidiAutomationLine.

◆ grab_item()

ArdourCanvas::Item& AutomationLine::grab_item ( ) const
inline

Definition at line 130 of file automation_line.h.

◆ height()

guint32 AutomationLine::height ( ) const
inline

Definition at line 111 of file automation_line.h.

◆ hide()

void AutomationLine::hide ( )

◆ hide_all()

void AutomationLine::hide_all ( )

◆ interpolation_changed()

void AutomationLine::interpolation_changed ( ARDOUR::AutomationList::InterpolationStyle  )
private

◆ is_first_point()

bool AutomationLine::is_first_point ( ControlPoint )

◆ is_last_point()

bool AutomationLine::is_last_point ( ControlPoint )

◆ is_stepped()

bool AutomationLine::is_stepped ( ) const
private

◆ list_changed()

void AutomationLine::list_changed ( )
protected

◆ maximum_time()

Temporal::timepos_t AutomationLine::maximum_time ( ) const
inline

Definition at line 166 of file automation_line.h.

◆ memento_command_binder()

virtual MementoCommandBinder<ARDOUR::AutomationList>* AutomationLine::memento_command_binder ( )
virtual

Reimplemented in MidiAutomationLine.

◆ model_to_view_coord_x()

Temporal::timecnt_t AutomationLine::model_to_view_coord_x ( Temporal::timepos_t const &  ) const

◆ model_to_view_coord_y()

double AutomationLine::model_to_view_coord_y ( double  ) const

◆ modify_points_y()

void AutomationLine::modify_points_y ( std::vector< ControlPoint * > const &  ,
double   
)

◆ name()

std::string AutomationLine::name ( ) const
inline

Definition at line 109 of file automation_line.h.

◆ npoints()

uint32_t AutomationLine::npoints ( ) const
inline

Definition at line 107 of file automation_line.h.

◆ nth() [1/2]

ControlPoint* AutomationLine::nth ( uint32_t  )

◆ nth() [2/2]

ControlPoint const* AutomationLine::nth ( uint32_t  ) const

◆ offset()

Temporal::timepos_t AutomationLine::offset ( )
inline

Definition at line 171 of file automation_line.h.

◆ param()

ARDOUR::ParameterDescriptor const& AutomationLine::param ( ) const
inline

Definition at line 179 of file automation_line.h.

◆ parent_group()

ArdourCanvas::Item& AutomationLine::parent_group ( ) const
inline

Definition at line 129 of file automation_line.h.

◆ queue_reset()

void AutomationLine::queue_reset ( )

◆ remove_point()

virtual void AutomationLine::remove_point ( ControlPoint )
virtual

Reimplemented in AudioRegionGainLine.

◆ remove_visibility()

void AutomationLine::remove_visibility ( VisibleAspects  )

◆ reset()

void AutomationLine::reset ( )

◆ reset_callback()

void AutomationLine::reset_callback ( const Evoral::ControlList )
protected

◆ reset_line_coords()

void AutomationLine::reset_line_coords ( ControlPoint )
private

◆ session_position()

Temporal::timepos_t AutomationLine::session_position ( Temporal::timepos_t const &  ) const

◆ set_colors()

void AutomationLine::set_colors ( )

◆ set_fill()

void AutomationLine::set_fill ( bool  f)
inline

Definition at line 88 of file automation_line.h.

◆ set_height()

void AutomationLine::set_height ( guint32  )

◆ set_line_color()

void AutomationLine::set_line_color ( std::string  color,
std::string  mod = "" 
)

◆ set_list()

void AutomationLine::set_list ( std::shared_ptr< ARDOUR::AutomationList list)

◆ set_maximum_time()

void AutomationLine::set_maximum_time ( Temporal::timepos_t const &  )

◆ set_offset()

void AutomationLine::set_offset ( Temporal::timepos_t const &  )

◆ set_selected_points()

void AutomationLine::set_selected_points ( PointSelection const &  )

◆ set_state()

int AutomationLine::set_state ( const XMLNode ,
int  version 
)
virtual

Implements PBD::Stateful.

◆ set_visibility()

void AutomationLine::set_visibility ( VisibleAspects  )

◆ set_width()

void AutomationLine::set_width ( Temporal::timecnt_t const &  )

◆ show()

void AutomationLine::show ( )

◆ start_drag_common()

void AutomationLine::start_drag_common ( double  ,
float   
)
protected

◆ start_drag_line()

virtual void AutomationLine::start_drag_line ( uint32_t  ,
uint32_t  ,
float   
)
virtual

Reimplemented in AudioRegionGainLine.

◆ start_drag_multiple()

virtual void AutomationLine::start_drag_multiple ( std::list< ControlPoint * >  ,
float  ,
XMLNode  
)
virtual

Reimplemented in AudioRegionGainLine.

◆ start_drag_single()

virtual void AutomationLine::start_drag_single ( ControlPoint ,
double  ,
float   
)
virtual

Reimplemented in AudioRegionGainLine.

◆ string_to_fraction()

double AutomationLine::string_to_fraction ( std::string const &  ) const

◆ sync_model_with_view_point()

bool AutomationLine::sync_model_with_view_point ( ControlPoint )
protected

◆ sync_model_with_view_points()

bool AutomationLine::sync_model_with_view_points ( std::list< ControlPoint * >  )
protected

◆ tempo_map_changed()

void AutomationLine::tempo_map_changed ( )

◆ the_list()

std::shared_ptr<ARDOUR::AutomationList> AutomationLine::the_list ( ) const
inline

Definition at line 147 of file automation_line.h.

◆ track_entered()

void AutomationLine::track_entered ( )

◆ track_exited()

void AutomationLine::track_exited ( )

◆ update_visibility()

void AutomationLine::update_visibility ( )
private

◆ view_to_model_coord_y()

void AutomationLine::view_to_model_coord_y ( double &  ) const

◆ visible()

bool AutomationLine::visible ( ) const
inline

Definition at line 110 of file automation_line.h.

Friends And Related Function Documentation

◆ AudioRegionGainLine

friend class AudioRegionGainLine
friend

Definition at line 264 of file automation_line.h.

◆ ContiguousControlPoints

friend class ContiguousControlPoints
friend

Definition at line 223 of file automation_line.h.

◆ RegionFxLine

friend class RegionFxLine
friend

Definition at line 265 of file automation_line.h.

Member Data Documentation

◆ _desc

const ARDOUR::ParameterDescriptor AutomationLine::_desc
private

Definition at line 262 of file automation_line.h.

◆ _drag_base

ArdourCanvas::Rectangle* AutomationLine::_drag_base
protected

Definition at line 205 of file automation_line.h.

◆ _drag_had_movement

bool AutomationLine::_drag_had_movement
private

true if the drag has seen movement, otherwise false

Definition at line 240 of file automation_line.h.

◆ _drag_points

std::list<ControlPoint*> AutomationLine::_drag_points
private

points we are dragging

Definition at line 238 of file automation_line.h.

◆ _editing_context

EditingContext& AutomationLine::_editing_context
protected

Definition at line 203 of file automation_line.h.

◆ _fill

bool AutomationLine::_fill
private

Definition at line 260 of file automation_line.h.

◆ _height

guint32 AutomationLine::_height
protected

Definition at line 187 of file automation_line.h.

◆ _is_boolean

bool AutomationLine::_is_boolean
protected

Definition at line 199 of file automation_line.h.

◆ _last_drag_fraction

double AutomationLine::_last_drag_fraction
private

last y position of the drag, as a fraction

Definition at line 241 of file automation_line.h.

◆ _line_color

std::string AutomationLine::_line_color
protected

Definition at line 188 of file automation_line.h.

◆ _line_color_mod

std::string AutomationLine::_line_color_mod
protected

Definition at line 189 of file automation_line.h.

◆ _list_connections

PBD::ScopedConnectionList AutomationLine::_list_connections
private

Definition at line 255 of file automation_line.h.

◆ _maximum_time

Temporal::timepos_t AutomationLine::_maximum_time
private

maximum time that a point on this line can be at, relative to the position of its region or start of its track

Definition at line 258 of file automation_line.h.

◆ _name

std::string AutomationLine::_name
protected

Definition at line 186 of file automation_line.h.

◆ _offset

Temporal::timepos_t AutomationLine::_offset
private

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

Definition at line 245 of file automation_line.h.

◆ _parent_group

ArdourCanvas::Item& AutomationLine::_parent_group
protected

Definition at line 204 of file automation_line.h.

◆ _push_points

std::list<ControlPoint*> AutomationLine::_push_points
private

additional points we are dragging if "push" is enabled

Definition at line 239 of file automation_line.h.

◆ _view_index_offset

uint32_t AutomationLine::_view_index_offset
protected

Definition at line 190 of file automation_line.h.

◆ _visible

VisibleAspects AutomationLine::_visible
protected

Definition at line 193 of file automation_line.h.

◆ alist

std::shared_ptr<ARDOUR::AutomationList> AutomationLine::alist
protected

Definition at line 191 of file automation_line.h.

◆ contiguous_points

std::vector<CCP> AutomationLine::contiguous_points
protected

Definition at line 226 of file automation_line.h.

◆ control_points

std::vector<ControlPoint*> AutomationLine::control_points
protected

Definition at line 209 of file automation_line.h.

◆ did_push

bool AutomationLine::did_push
protected

true if we did a push at any point during the current drag

Definition at line 201 of file automation_line.h.

◆ group

ArdourCanvas::Container* AutomationLine::group
protected

Definition at line 206 of file automation_line.h.

◆ have_reset_timeout

bool AutomationLine::have_reset_timeout
protected

Definition at line 197 of file automation_line.h.

◆ line

ArdourCanvas::PolyLine* AutomationLine::line
protected

Definition at line 207 of file automation_line.h.

◆ line_points

ArdourCanvas::Points AutomationLine::line_points
protected

Definition at line 208 of file automation_line.h.

◆ no_draw

bool AutomationLine::no_draw
protected

Definition at line 198 of file automation_line.h.

◆ terminal_points_can_slide

bool AutomationLine::terminal_points_can_slide
protected

Definition at line 195 of file automation_line.h.

◆ update_pending

bool AutomationLine::update_pending
protected

Definition at line 196 of file automation_line.h.


The documentation for this class was generated from the following file: