ardour
|
#include <automation_line.h>
Classes | |
class | ContiguousControlPoints |
Public Types | |
enum | VisibleAspects { Line = 0x1, ControlPoints = 0x2, SelectedControlPoints = 0x4 } |
Public Member Functions | |
AutomationLine (const std::string &name, TimeAxisView &tv, ArdourCanvas::Item &parent, boost::shared_ptr< ARDOUR::AutomationList > al, const ARDOUR::ParameterDescriptor &desc, Evoral::TimeConverter< double, ARDOUR::framepos_t > *converter=0) | |
virtual | ~AutomationLine () |
void | queue_reset () |
void | reset () |
void | clear () |
void | set_selected_points (PointSelection const &) |
void | get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, 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) |
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< double, float > | drag_motion (double, float, bool, bool with_push, uint32_t &final_index) |
virtual void | end_drag (bool with_push, uint32_t final_index) |
ControlPoint * | nth (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 (uint32_t) |
uint32_t | get_line_color () const |
void | set_visibility (VisibleAspects) |
void | add_visibility (VisibleAspects) |
void | remove_visibility (VisibleAspects) |
void | hide () |
void | set_height (guint32) |
void | set_uses_gain_mapping (bool yn) |
bool | get_uses_gain_mapping () const |
ArdourCanvas::Container & | canvas_group () const |
ArdourCanvas::Item & | parent_group () const |
ArdourCanvas::Item & | grab_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 | fraction_to_relative_string (double, double) const |
double | string_to_fraction (std::string const &) const |
void | view_to_model_coord (double &x, double &y) const |
void | view_to_model_coord_y (double &) const |
void | model_to_view_coord (double &x, double &y) const |
void | model_to_view_coord_y (double &) const |
void | set_list (boost::shared_ptr< ARDOUR::AutomationList > list) |
boost::shared_ptr < ARDOUR::AutomationList > | the_list () const |
void | track_entered () |
void | track_exited () |
bool | is_last_point (ControlPoint &) |
bool | is_first_point (ControlPoint &) |
XMLNode & | get_state (void) |
int | set_state (const XMLNode &, int version) |
void | set_colors () |
void | modify_point_y (ControlPoint &, double) |
virtual MementoCommandBinder < ARDOUR::AutomationList > * | memento_command_binder () |
const Evoral::TimeConverter < double, ARDOUR::framepos_t > & | time_converter () const |
std::pair< ARDOUR::framepos_t, ARDOUR::framepos_t > | get_point_x_range () const |
void | set_maximum_time (ARDOUR::framecnt_t) |
ARDOUR::framecnt_t | maximum_time () const |
void | set_offset (ARDOUR::framecnt_t) |
void | set_width (ARDOUR::framecnt_t) |
framepos_t | session_position (ARDOUR::AutomationList::const_iterator) const |
Public Member Functions inherited from PBD::Stateful | |
Stateful () | |
virtual | ~Stateful () |
virtual bool | apply_changes (PropertyBase const &) |
PropertyChange | apply_changes (PropertyList const &) |
const OwnedPropertyList & | properties () const |
void | add_property (PropertyBase &s) |
void | add_extra_xml (XMLNode &) |
XMLNode * | extra_xml (const std::string &str, bool add_if_missing=false) |
void | save_extra_xml (const XMLNode &) |
const PBD::ID & | id () const |
bool | set_id (const XMLNode &) |
void | set_id (const std::string &) |
void | reset_id () |
void | clear_changes () |
virtual void | clear_owned_changes () |
PropertyList * | get_changes_as_properties (Command *) const |
virtual void | rdiff (std::vector< Command * > &) const |
bool | changed () const |
virtual PropertyList * | property_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 | |
Destructible () | |
virtual | ~Destructible () |
void | drop_references () |
Public Attributes | |
TimeAxisView & | trackview |
Public Attributes inherited from PBD::Stateful | |
PBD::Signal1< void, const PropertyChange & > | PropertyChanged |
Public Attributes inherited from PBD::Destructible | |
PBD::Signal0< void > | Destroyed |
PBD::Signal0< void > | DropReferences |
Protected Types | |
typedef boost::shared_ptr < ContiguousControlPoints > | CCP |
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 *) |
Protected Member Functions inherited from PBD::Stateful | |
void | add_instant_xml (XMLNode &, const std::string &directory_path) |
XMLNode * | instant_xml (const std::string &str, const std::string &directory_path) |
void | add_properties (XMLNode &) |
PropertyChange | set_values (XMLNode const &) |
virtual void | post_set (const PropertyChange &) |
virtual void | send_change (const PropertyChange &) |
virtual void | mid_thaw (const PropertyChange &) |
Protected Attributes | |
std::string | _name |
guint32 | _height |
uint32_t | _line_color |
boost::shared_ptr < ARDOUR::AutomationList > | alist |
Evoral::TimeConverter< double, ARDOUR::framepos_t > * | _time_converter |
bool | _our_time_converter |
VisibleAspects | _visible |
bool | _uses_gain_mapping |
bool | terminal_points_can_slide |
bool | update_pending |
bool | have_timeout |
bool | no_draw |
bool | _is_boolean |
bool | did_push |
ArdourCanvas::Item & | _parent_group |
ArdourCanvas::Container * | group |
ArdourCanvas::PolyLine * | line |
ArdourCanvas::Points | line_points |
std::vector< ControlPoint * > | control_points |
std::vector< CCP > | contiguous_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 | _drag_x |
last x position of the drag, in units More... | |
double | _drag_distance |
total x movement of the drag, in canvas units More... | |
double | _last_drag_fraction |
last y position of the drag, as a fraction More... | |
ARDOUR::framecnt_t | _offset |
PBD::ScopedConnectionList | _list_connections |
ARDOUR::framecnt_t | _maximum_time |
const ARDOUR::ParameterDescriptor | _desc |
Friends | |
class | ContiguousControlPoints |
class | AudioRegionGainLine |
Additional Inherited Members | |
Static Public Attributes inherited from PBD::Stateful | |
static int | current_state_version = 0 |
static int | loading_state_version = 0 |
A GUI representation of an ARDOUR::AutomationList
Definition at line 55 of file automation_line.h.
|
protected |
Definition at line 202 of file automation_line.h.
Enumerator | |
---|---|
Line | |
ControlPoints | |
SelectedControlPoints |
Definition at line 58 of file automation_line.h.
AutomationLine::AutomationLine | ( | const std::string & | name, |
TimeAxisView & | tv, | ||
ArdourCanvas::Item & | parent, | ||
boost::shared_ptr< ARDOUR::AutomationList > | al, | ||
const ARDOUR::ParameterDescriptor & | desc, | ||
Evoral::TimeConverter< double, ARDOUR::framepos_t > * | converter = 0 |
||
) |
converter | A TimeConverter whose origin_b is the start time of the AutomationList in session frames. This will not be deleted by AutomationLine. |
Definition at line 77 of file automation_line.cc.
|
virtual |
Definition at line 133 of file automation_line.cc.
void AutomationLine::add_visibility | ( | VisibleAspects | va | ) |
Definition at line 1127 of file automation_line.cc.
|
private |
Definition at line 1266 of file automation_line.cc.
|
inline |
Definition at line 113 of file automation_line.h.
void AutomationLine::clear | ( | ) |
Definition at line 1108 of file automation_line.cc.
|
private |
Definition at line 1313 of file automation_line.cc.
|
private |
Definition at line 212 of file automation_line.cc.
bool AutomationLine::control_points_adjacent | ( | double | xval, |
uint32_t & | before, | ||
uint32_t & | after | ||
) |
Definition at line 825 of file automation_line.cc.
|
virtual |
Should be called to indicate motion during a drag.
x | New x position of the drag in canvas units, or undefined if ignore_x == true. |
fraction | New y fraction. |
Definition at line 641 of file automation_line.cc.
|
virtual |
Should be called to indicate the end of a drag
Reimplemented in AudioRegionGainLine.
Definition at line 749 of file automation_line.cc.
|
protectedvirtual |
Definition at line 144 of file automation_line.cc.
string AutomationLine::fraction_to_relative_string | ( | double | original, |
double | fraction | ||
) | const |
original | an old y-axis fraction |
fraction | the new y fraction |
Definition at line 405 of file automation_line.cc.
string AutomationLine::fraction_to_string | ( | double | fraction | ) | const |
fraction | y fraction |
Definition at line 375 of file automation_line.cc.
void AutomationLine::get_inverted_selectables | ( | Selection & | , |
std::list< Selectable * > & | results | ||
) |
Definition at line 929 of file automation_line.cc.
|
inline |
Definition at line 100 of file automation_line.h.
pair< framepos_t, framepos_t > AutomationLine::get_point_x_range | ( | ) | const |
Definition at line 1346 of file automation_line.cc.
void AutomationLine::get_selectables | ( | ARDOUR::framepos_t | start, |
ARDOUR::framepos_t | end, | ||
double | botfrac, | ||
double | topfrac, | ||
std::list< Selectable * > & | results | ||
) |
Get selectable points within an area.
start | Start position in session frames. |
end | End position in session frames. |
bot | Bottom y range, as a fraction of line height, where 0 is the bottom of the line. |
top | Top y range, as a fraction of line height, where 0 is the bottom of the line. |
result | Filled in with selectable things; in this case, ControlPoints. |
Definition at line 907 of file automation_line.cc.
|
virtual |
Implements PBD::Stateful.
Definition at line 1172 of file automation_line.cc.
|
inline |
Definition at line 109 of file automation_line.h.
string AutomationLine::get_verbose_cursor_relative_string | ( | double | original, |
double | fraction | ||
) | const |
Definition at line 346 of file automation_line.cc.
|
virtual |
Reimplemented in MidiAutomationLine.
Definition at line 335 of file automation_line.cc.
|
inline |
Definition at line 115 of file automation_line.h.
|
inline |
Definition at line 97 of file automation_line.h.
void AutomationLine::hide | ( | ) |
Definition at line 202 of file automation_line.cc.
|
private |
Called when our list has announced that its interpolation style has changed
Definition at line 1258 of file automation_line.cc.
bool AutomationLine::is_first_point | ( | ControlPoint & | cp | ) |
Definition at line 872 of file automation_line.cc.
bool AutomationLine::is_last_point | ( | ControlPoint & | cp | ) |
Definition at line 853 of file automation_line.cc.
|
private |
Definition at line 150 of file automation_line.cc.
|
protected |
Definition at line 963 of file automation_line.cc.
|
inline |
Definition at line 151 of file automation_line.h.
|
virtual |
Reimplemented in MidiAutomationLine.
Definition at line 1324 of file automation_line.cc.
void AutomationLine::model_to_view_coord | ( | double & | x, |
double & | y | ||
) | const |
Definition at line 1250 of file automation_line.cc.
void AutomationLine::model_to_view_coord_y | ( | double & | y | ) | const |
Definition at line 1227 of file automation_line.cc.
void AutomationLine::modify_point_y | ( | ControlPoint & | cp, |
double | y | ||
) |
Definition at line 275 of file automation_line.cc.
|
inline |
Definition at line 95 of file automation_line.h.
|
inline |
Definition at line 93 of file automation_line.h.
ControlPoint * AutomationLine::nth | ( | uint32_t | n | ) |
Definition at line 255 of file automation_line.cc.
ControlPoint const * AutomationLine::nth | ( | uint32_t | n | ) | const |
Definition at line 265 of file automation_line.cc.
|
inline |
Definition at line 114 of file automation_line.h.
void AutomationLine::queue_reset | ( | ) |
Definition at line 1087 of file automation_line.cc.
|
virtual |
Reimplemented in AudioRegionGainLine.
Definition at line 885 of file automation_line.cc.
void AutomationLine::remove_visibility | ( | VisibleAspects | va | ) |
Definition at line 1148 of file automation_line.cc.
void AutomationLine::reset | ( | ) |
Definition at line 1073 of file automation_line.cc.
|
protected |
Definition at line 974 of file automation_line.cc.
|
private |
Definition at line 313 of file automation_line.cc.
framepos_t AutomationLine::session_position | ( | ARDOUR::AutomationList::const_iterator | ) | const |
Definition at line 1359 of file automation_line.cc.
void AutomationLine::set_colors | ( | ) |
Definition at line 954 of file automation_line.cc.
void AutomationLine::set_height | ( | guint32 | h | ) |
Definition at line 223 of file automation_line.cc.
void AutomationLine::set_line_color | ( | uint32_t | color | ) |
Definition at line 239 of file automation_line.cc.
void AutomationLine::set_list | ( | boost::shared_ptr< ARDOUR::AutomationList > | list | ) |
Definition at line 1119 of file automation_line.cc.
void AutomationLine::set_maximum_time | ( | ARDOUR::framecnt_t | t | ) |
Set the maximum time that points on this line can be at, relative to the start of the track or region that it is on.
Definition at line 1333 of file automation_line.cc.
void AutomationLine::set_offset | ( | ARDOUR::framecnt_t | off | ) |
Definition at line 1365 of file automation_line.cc.
void AutomationLine::set_selected_points | ( | PointSelection const & | points | ) |
Definition at line 935 of file automation_line.cc.
|
virtual |
Implements PBD::Stateful.
Definition at line 1179 of file automation_line.cc.
void AutomationLine::set_uses_gain_mapping | ( | bool | yn | ) |
Definition at line 246 of file automation_line.cc.
void AutomationLine::set_visibility | ( | VisibleAspects | va | ) |
Definition at line 1139 of file automation_line.cc.
void AutomationLine::set_width | ( | ARDOUR::framecnt_t | ) |
|
protected |
Common parts of starting a drag.
x | Starting x position in units, or 0 if x is being ignored. |
fraction | Starting y position (as a fraction of the track height, where 0 is the bottom and 1 the top) |
Definition at line 621 of file automation_line.cc.
|
virtual |
Start dragging a line vertically (with no change in x)
i1 | Control point index of the `left' point on the line. |
i2 | Control point index of the `right' point on the line. |
fraction | Initial y position (as a fraction of the track height, where 0 is the bottom and 1 the top) |
Definition at line 493 of file automation_line.cc.
|
virtual |
Start dragging multiple points (with no change in x)
cp | Points to drag. |
fraction | Initial y position (as a fraction of the track height, where 0 is the bottom and 1 the top) |
Definition at line 513 of file automation_line.cc.
|
virtual |
Start dragging a single point, possibly adding others if the supplied point is selected and there are other selected points.
cp | Point to drag. |
x | Initial x position (units). |
fraction | Initial y position (as a fraction of the track height, where 0 is the bottom and 1 the top) |
Reimplemented in AudioRegionGainLine.
Definition at line 467 of file automation_line.cc.
double AutomationLine::string_to_fraction | ( | std::string const & | ) | const |
s | Value string in the form as returned by fraction_to_string. |
Definition at line 440 of file automation_line.cc.
|
protected |
Definition at line 787 of file automation_line.cc.
|
protected |
Definition at line 322 of file automation_line.cc.
|
inline |
Definition at line 128 of file automation_line.h.
|
inline |
Definition at line 144 of file automation_line.h.
void AutomationLine::track_entered | ( | ) |
Definition at line 1160 of file automation_line.cc.
void AutomationLine::track_exited | ( | ) |
Definition at line 1166 of file automation_line.cc.
|
private |
Definition at line 157 of file automation_line.cc.
void AutomationLine::view_to_model_coord | ( | double & | x, |
double & | y | ||
) | const |
Definition at line 1186 of file automation_line.cc.
void AutomationLine::view_to_model_coord_y | ( | double & | y | ) | const |
Definition at line 1193 of file automation_line.cc.
|
inline |
Definition at line 96 of file automation_line.h.
|
friend |
Definition at line 241 of file automation_line.h.
|
friend |
Definition at line 200 of file automation_line.h.
|
private |
Definition at line 239 of file automation_line.h.
|
private |
total x movement of the drag, in canvas units
Definition at line 219 of file automation_line.h.
|
private |
true if the drag has seen movement, otherwise false
Definition at line 217 of file automation_line.h.
|
private |
points we are dragging
Definition at line 215 of file automation_line.h.
|
private |
last x position of the drag, in units
Definition at line 218 of file automation_line.h.
|
protected |
Definition at line 163 of file automation_line.h.
|
protected |
Definition at line 178 of file automation_line.h.
|
private |
last y position of the drag, as a fraction
Definition at line 220 of file automation_line.h.
|
protected |
Definition at line 164 of file automation_line.h.
|
private |
Definition at line 234 of file automation_line.h.
|
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 237 of file automation_line.h.
|
protected |
Definition at line 162 of file automation_line.h.
|
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 224 of file automation_line.h.
|
protected |
true if _time_converter belongs to us (ie we should delete it on destruction)
Definition at line 169 of file automation_line.h.
|
protected |
Definition at line 182 of file automation_line.h.
|
private |
additional points we are dragging if "push" is enabled
Definition at line 216 of file automation_line.h.
|
protected |
Definition at line 167 of file automation_line.h.
|
protected |
Definition at line 173 of file automation_line.h.
|
protected |
Definition at line 171 of file automation_line.h.
|
protected |
Definition at line 166 of file automation_line.h.
|
protected |
Definition at line 203 of file automation_line.h.
|
protected |
Definition at line 186 of file automation_line.h.
|
protected |
true if we did a push at any point during the current drag
Definition at line 180 of file automation_line.h.
|
protected |
Definition at line 183 of file automation_line.h.
|
protected |
Definition at line 176 of file automation_line.h.
|
protected |
Definition at line 184 of file automation_line.h.
|
protected |
Definition at line 185 of file automation_line.h.
|
protected |
Definition at line 177 of file automation_line.h.
|
protected |
Definition at line 174 of file automation_line.h.
TimeAxisView& AutomationLine::trackview |
Definition at line 111 of file automation_line.h.
|
protected |
Definition at line 175 of file automation_line.h.