2 Copyright (C) 2003 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include "pbd/error.h"
23 #include "pbd/stacktrace.h"
25 #include "ardour/types.h"
26 #include "ardour/ardour.h"
28 #include "gtkmm2ext/utils.h"
29 #include "gtkmm2ext/gui_thread.h"
31 #include "canvas/container.h"
32 #include "canvas/rectangle.h"
33 #include "canvas/debug.h"
34 #include "canvas/text.h"
35 #include "canvas/colors.h"
37 #include "ardour/profile.h"
39 #include "ardour_ui.h"
41 * ardour_ui.h was moved up in the include list
42 * due to a conflicting definition of 'Rect' between
43 * Apple's MacTypes.h file and GTK
46 #include "public_editor.h"
47 #include "time_axis_view_item.h"
48 #include "time_axis_view.h"
50 #include "rgb_macros.h"
55 using namespace Editing;
58 using namespace ARDOUR;
59 using namespace ARDOUR_UI_UTILS;
60 using namespace Gtkmm2ext;
62 Pango::FontDescription TimeAxisViewItem::NAME_FONT;
63 const double TimeAxisViewItem::NAME_X_OFFSET = 15.0;
64 const double TimeAxisViewItem::GRAB_HANDLE_TOP = 0.0;
65 const double TimeAxisViewItem::GRAB_HANDLE_WIDTH = 10.0;
67 int TimeAxisViewItem::NAME_HEIGHT;
68 double TimeAxisViewItem::NAME_Y_OFFSET;
69 double TimeAxisViewItem::NAME_HIGHLIGHT_SIZE;
70 double TimeAxisViewItem::NAME_HIGHLIGHT_THRESH;
73 TimeAxisViewItem::set_constant_heights ()
75 NAME_FONT = Pango::FontDescription (ARDOUR_UI::config()->get_SmallFont());
81 Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (X_("Hg")); /* ascender + descender */
85 layout->set_font_description (NAME_FONT);
86 get_pixel_size (layout, width, height);
88 layout = foo.create_pango_layout (X_("H")); /* just the ascender */
92 /* Config->get_show_name_highlight) == true:
93 Y_OFFSET is measured from bottom of the time axis view item.
94 Config->get_show_name_highlight) == false:
95 Y_OFFSET is measured from the top of the time axis view item.
98 if (Config->get_show_name_highlight()) {
99 NAME_Y_OFFSET = height + 1;
100 NAME_HIGHLIGHT_SIZE = height + 2;
103 NAME_HIGHLIGHT_SIZE = 0;
105 NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 3;
109 * Construct a new TimeAxisViewItem.
111 * @param it_name the unique name of this item
112 * @param parent the parent canvas group
113 * @param tv the TimeAxisView we are going to be added to
114 * @param spu samples per unit
116 * @param start the start point of this item
117 * @param duration the duration of this item
118 * @param recording true if this is a recording region view
119 * @param automation true if this is an automation region view
121 TimeAxisViewItem::TimeAxisViewItem(
122 const string & it_name, ArdourCanvas::Item& parent, TimeAxisView& tv, double spu, uint32_t base_color,
123 framepos_t start, framecnt_t duration, bool recording, bool automation, Visibility vis
126 , frame_position (-1)
127 , item_name (it_name)
128 , selection_frame (0)
130 , _recregion (recording)
131 , _automation (automation)
135 init (&parent, spu, base_color, start, duration, vis, true, true);
138 TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
141 , PBD::ScopedConnectionList()
142 , trackview (other.trackview)
143 , frame_position (-1)
144 , item_name (other.item_name)
145 , selection_frame (0)
147 , _recregion (other._recregion)
148 , _automation (other._automation)
149 , _dragging (other._dragging)
152 /* share the other's parent, but still create a new group */
154 ArdourCanvas::Item* parent = other.group->parent();
156 _selected = other._selected;
158 init (parent, other.samples_per_pixel, other.fill_color, other.frame_position,
159 other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name);
163 TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_color,
164 framepos_t start, framepos_t duration, Visibility vis,
165 bool wide, bool high)
167 group = new ArdourCanvas::Container (parent);
168 CANVAS_DEBUG_NAME (group, string_compose ("TAVI group for %1", get_item_name()));
169 group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
171 fill_color = base_color;
172 _fill_color_name = "region base";
173 samples_per_pixel = fpp;
174 frame_position = start;
175 item_duration = duration;
176 name_connected = false;
177 position_locked = false;
178 max_item_duration = ARDOUR::max_framepos;
179 min_item_duration = 0;
180 show_vestigial = true;
185 wide_enough_for_name = wide;
186 high_enough_for_name = high;
191 warning << "Time Axis Item Duration == 0" << endl;
194 if (visibility & ShowFrame) {
195 frame = new ArdourCanvas::TimeRectangle (group,
196 ArdourCanvas::Rect (0.0, 0.0,
197 trackview.editor().sample_to_pixel(duration),
198 trackview.current_height()));
200 frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT));
202 CANVAS_DEBUG_NAME (frame, string_compose ("frame for %1", get_item_name()));
205 frame->set_outline_color (ARDOUR_UI::config()->color ("recording rect"));
207 frame->set_outline_color (ARDOUR_UI::config()->color ("time axis frame"));
211 if (Config->get_show_name_highlight() && (visibility & ShowNameHighlight)) {
216 if (visibility & FullWidthNameHighlight) {
217 width = trackview.editor().sample_to_pixel(item_duration);
219 width = trackview.editor().sample_to_pixel(item_duration) - 2.0;
222 name_highlight = new ArdourCanvas::Rectangle (group,
223 ArdourCanvas::Rect (start,
224 trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE,
226 trackview.current_height() - 1.0));
227 CANVAS_DEBUG_NAME (name_highlight, string_compose ("name highlight for %1", get_item_name()));
228 name_highlight->set_data ("timeaxisviewitem", this);
229 name_highlight->set_outline_what (ArdourCanvas::Rectangle::TOP);
230 name_highlight->set_outline_color (RGBA_TO_UINT (0,0,0,255));
236 if (visibility & ShowNameText) {
237 name_text = new ArdourCanvas::Text (group);
238 CANVAS_DEBUG_NAME (name_text, string_compose ("name text for %1", get_item_name()));
239 if (Config->get_show_name_highlight()) {
240 name_text->set_position (ArdourCanvas::Duple (NAME_X_OFFSET, trackview.current_height() - NAME_Y_OFFSET));
242 name_text->set_position (ArdourCanvas::Duple (NAME_X_OFFSET, NAME_Y_OFFSET));
244 name_text->set_font_description (NAME_FONT);
245 name_text->set_ignore_events (true);
250 /* create our grab handles used for trimming/duration etc */
251 if (!_recregion && !_automation) {
252 double top = TimeAxisViewItem::GRAB_HANDLE_TOP;
253 double width = TimeAxisViewItem::GRAB_HANDLE_WIDTH;
255 frame_handle_start = new ArdourCanvas::Rectangle (group, ArdourCanvas::Rect (0.0, top, width, trackview.current_height()));
256 CANVAS_DEBUG_NAME (frame_handle_start, "TAVI frame handle start");
257 frame_handle_start->set_outline (false);
258 frame_handle_start->set_fill (false);
259 frame_handle_start->Event.connect (sigc::bind (sigc::mem_fun (*this, &TimeAxisViewItem::frame_handle_crossing), frame_handle_start));
261 frame_handle_end = new ArdourCanvas::Rectangle (group, ArdourCanvas::Rect (0.0, top, width, trackview.current_height()));
262 CANVAS_DEBUG_NAME (frame_handle_end, "TAVI frame handle end");
263 frame_handle_end->set_outline (false);
264 frame_handle_end->set_fill (false);
265 frame_handle_end->Event.connect (sigc::bind (sigc::mem_fun (*this, &TimeAxisViewItem::frame_handle_crossing), frame_handle_end));
267 frame_handle_start = frame_handle_end = 0;
270 set_color (base_color);
272 set_duration (item_duration, this);
273 set_position (start, this);
275 Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&TimeAxisViewItem::parameter_changed, this, _1), gui_context ());
276 ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &TimeAxisViewItem::parameter_changed));
279 TimeAxisViewItem::~TimeAxisViewItem()
285 TimeAxisViewItem::canvas_group_event (GdkEvent* /*ev*/)
291 TimeAxisViewItem::hide_rect ()
293 rect_visible = false;
296 if (name_highlight) {
297 name_highlight->set_outline_what (ArdourCanvas::Rectangle::What (0));
298 name_highlight->set_fill_color (UINT_RGBA_CHANGE_A (fill_color, 64));
303 TimeAxisViewItem::show_rect ()
308 if (name_highlight) {
309 name_highlight->set_outline_what (ArdourCanvas::Rectangle::TOP);
310 name_highlight->set_fill_color (fill_color);
315 * Set the position of this item on the timeline.
317 * @param pos the new position
318 * @param src the identity of the object that initiated the change
319 * @return true on success
323 TimeAxisViewItem::set_position(framepos_t pos, void* src, double* delta)
325 if (position_locked) {
329 frame_position = pos;
331 double new_unit_pos = trackview.editor().sample_to_pixel (pos);
334 (*delta) = new_unit_pos - group->position().x;
339 if (new_unit_pos == group->position().x) {
344 group->set_x_position (new_unit_pos);
346 PositionChanged (frame_position, src); /* EMIT_SIGNAL */
351 /** @return position of this item on the timeline */
353 TimeAxisViewItem::get_position() const
355 return frame_position;
359 * Set the duration of this item.
361 * @param dur the new duration of this item
362 * @param src the identity of the object that initiated the change
363 * @return true on success
367 TimeAxisViewItem::set_duration (framecnt_t dur, void* src)
369 if ((dur > max_item_duration) || (dur < min_item_duration)) {
370 warning << string_compose (
371 P_("new duration %1 frame is out of bounds for %2", "new duration of %1 frames is out of bounds for %2", dur),
372 get_item_name(), dur)
383 reset_width_dependent_items (trackview.editor().sample_to_pixel (dur));
385 DurationChanged (dur, src); /* EMIT_SIGNAL */
389 /** @return duration of this item */
391 TimeAxisViewItem::get_duration() const
393 return item_duration;
397 * Set the maximum duration that this item can have.
399 * @param dur the new maximum duration
400 * @param src the identity of the object that initiated the change
403 TimeAxisViewItem::set_max_duration(framecnt_t dur, void* src)
405 max_item_duration = dur;
406 MaxDurationChanged(max_item_duration, src); /* EMIT_SIGNAL */
409 /** @return the maximum duration that this item may have */
411 TimeAxisViewItem::get_max_duration() const
413 return max_item_duration;
417 * Set the minimum duration that this item may have.
419 * @param the minimum duration that this item may be set to
420 * @param src the identity of the object that initiated the change
423 TimeAxisViewItem::set_min_duration(framecnt_t dur, void* src)
425 min_item_duration = dur;
426 MinDurationChanged(max_item_duration, src); /* EMIT_SIGNAL */
429 /** @return the minimum duration that this item mey have */
431 TimeAxisViewItem::get_min_duration() const
433 return min_item_duration;
437 * Set whether this item is locked to its current position.
438 * Locked items cannot be moved until the item is unlocked again.
440 * @param yn true to lock this item to its current position
441 * @param src the identity of the object that initiated the change
444 TimeAxisViewItem::set_position_locked(bool yn, void* src)
446 position_locked = yn;
447 set_trim_handle_colors();
448 PositionLockChanged (position_locked, src); /* EMIT_SIGNAL */
451 /** @return true if this item is locked to its current position */
453 TimeAxisViewItem::get_position_locked() const
455 return position_locked;
459 * Set whether the maximum duration constraint is active.
461 * @param active set true to enforce the max duration constraint
462 * @param src the identity of the object that initiated the change
465 TimeAxisViewItem::set_max_duration_active (bool active, void* /*src*/)
467 max_duration_active = active;
470 /** @return true if the maximum duration constraint is active */
472 TimeAxisViewItem::get_max_duration_active() const
474 return max_duration_active;
478 * Set whether the minimum duration constraint is active.
480 * @param active set true to enforce the min duration constraint
481 * @param src the identity of the object that initiated the change
485 TimeAxisViewItem::set_min_duration_active (bool active, void* /*src*/)
487 min_duration_active = active;
490 /** @return true if the maximum duration constraint is active */
492 TimeAxisViewItem::get_min_duration_active() const
494 return min_duration_active;
498 * Set the name of this item.
500 * @param new_name the new name of this item
501 * @param src the identity of the object that initiated the change
505 TimeAxisViewItem::set_item_name(std::string new_name, void* src)
507 if (new_name != item_name) {
508 std::string temp_name = item_name;
509 item_name = new_name;
510 NameChanged (item_name, temp_name, src); /* EMIT_SIGNAL */
514 /** @return the name of this item */
516 TimeAxisViewItem::get_item_name() const
522 * Set selection status.
524 * @param yn true if this item is currently selected
527 TimeAxisViewItem::set_selected(bool yn)
529 if (_selected == yn) {
533 Selectable::set_selected (yn);
535 set_name_text_color ();
537 if (_selected && frame) {
538 if (!selection_frame) {
539 selection_frame = new ArdourCanvas::TimeRectangle (group);
540 selection_frame->set_fill (false);
541 selection_frame->set_outline_color (ARDOUR_UI::config()->color ("selected time axis frame"));
542 selection_frame->set_ignore_events (true);
544 selection_frame->set (frame->get().shrink (1.0));
545 selection_frame->show ();
547 if (selection_frame) {
548 selection_frame->hide ();
553 /** @return the TimeAxisView that this item is on */
555 TimeAxisViewItem::get_time_axis_view () const
561 * Set the displayed item text.
562 * This item is the visual text name displayed on the canvas item, this can be different to the name of the item.
564 * @param new_name the new name text to display
568 TimeAxisViewItem::set_name_text(const string& new_name)
574 name_text_width = pixel_width (new_name, NAME_FONT) + 2;
575 name_text->set (new_name);
580 * Set the height of this item.
582 * @param h new height
585 TimeAxisViewItem::set_height (double height)
589 manage_name_highlight ();
591 if (visibility & ShowNameText) {
592 if (Config->get_show_name_highlight()) {
593 name_text->set_y_position (height - NAME_Y_OFFSET);
595 name_text->set_y_position (NAME_Y_OFFSET);
602 frame->set_y1 (height);
604 if (frame_handle_start) {
605 frame_handle_start->set_y1 (height);
606 frame_handle_end->set_y1 (height);
609 if (selection_frame) {
610 selection_frame->set (frame->get().shrink (1.0));
614 if (vestigial_frame) {
615 vestigial_frame->set_y0 (1.0);
616 vestigial_frame->set_y1 (height);
623 TimeAxisViewItem::manage_name_highlight ()
625 if (!name_highlight) {
629 if (_height < NAME_HIGHLIGHT_THRESH) {
630 high_enough_for_name = false;
632 high_enough_for_name = true;
636 wide_enough_for_name = false;
638 wide_enough_for_name = true;
641 if (name_highlight && wide_enough_for_name && high_enough_for_name) {
643 name_highlight->show();
644 name_highlight->set (ArdourCanvas::Rect (1.0, (double) _height - NAME_HIGHLIGHT_SIZE, _width, (double) _height - 1.0));
647 name_highlight->hide();
654 TimeAxisViewItem::set_color (uint32_t base_color)
656 fill_color = base_color;
661 TimeAxisViewItem::get_canvas_frame()
667 TimeAxisViewItem::get_canvas_group()
673 TimeAxisViewItem::get_name_highlight()
675 return name_highlight;
679 * Convenience method to set the various canvas item colors
682 TimeAxisViewItem::set_colors()
686 if (name_highlight) {
687 name_highlight->set_fill_color (fill_color);
690 set_name_text_color ();
691 set_trim_handle_colors();
695 TimeAxisViewItem::set_name_text_color ()
704 if (Config->get_show_name_highlight()) {
705 /* name text will always be on top of name highlight, which
706 will always use our fill color.
710 /* name text will be on top of the item, whose color
711 may vary depending on various conditions.
713 f = get_fill_color ();
716 name_text->set_color (ArdourCanvas::contrasting_text_color (f));
720 TimeAxisViewItem::fill_opacity () const
723 /* if the frame/rect is marked as "invisible", then the
724 fill should be translucent.parent.
733 uint32_t col = ARDOUR_UI::config()->color_mod (_fill_color_name, _fill_color_name);
734 return UINT_RGBA_A (col);
738 TimeAxisViewItem::get_fill_color () const
741 uint32_t o = fill_opacity ();
745 f = ARDOUR_UI::config()->color ("selected region base");
748 /* some condition of this item has set fill opacity to
749 * zero, but it has been selected, so use a mid-way
750 * alpha value to make it reasonably visible.
758 f = ARDOUR_UI::config()->color ("recording rect");
760 if ((!Config->get_show_name_highlight() || high_enough_for_name) && !ARDOUR_UI::config()->get_color_regions_using_track_color()) {
761 f = ARDOUR_UI::config()->color_mod (_fill_color_name, _fill_color_name);
768 return UINT_RGBA_CHANGE_A (f, o);
772 * Sets the frame color depending on whether this item is selected
775 TimeAxisViewItem::set_frame_color()
781 frame->set_fill_color (get_fill_color());
782 set_frame_gradient ();
785 uint32_t f = ARDOUR_UI::config()->color ("time axis frame");
788 /* make the frame outline be visible but rather transparent */
789 f = UINT_RGBA_CHANGE_A (f, 64);
792 frame->set_outline_color (f);
797 TimeAxisViewItem::set_frame_gradient ()
799 if (ARDOUR_UI::config()->get_timeline_item_gradient_depth() == 0.0) {
800 frame->set_gradient (ArdourCanvas::Fill::StopList (), 0);
804 ArdourCanvas::Fill::StopList stops;
807 ArdourCanvas::Color f (get_fill_color());
809 /* need to get alpha value */
810 ArdourCanvas::color_to_rgba (f, r, g, b, a);
812 stops.push_back (std::make_pair (0.0, f));
814 /* now a darker version */
816 ArdourCanvas::color_to_hsv (f, h, s, v);
818 v = min (1.0, v * (1.0 - ARDOUR_UI::config()->get_timeline_item_gradient_depth()));
820 ArdourCanvas::Color darker = ArdourCanvas::hsva_to_color (h, s, v, a);
821 stops.push_back (std::make_pair (1.0, darker));
823 frame->set_gradient (stops, true);
827 * Set the colors of the start and end trim handle depending on object state
830 TimeAxisViewItem::set_trim_handle_colors()
833 /* Leave them transparent for now */
834 if (frame_handle_start) {
835 frame_handle_start->set_fill_color (0x00000000);
836 frame_handle_end->set_fill_color (0x00000000);
839 if (frame_handle_start) {
840 if (position_locked) {
841 frame_handle_start->set_fill_color (ARDOUR_UI::config()->get_TrimHandleLocked());
842 frame_handle_end->set_fill_color (ARDOUR_UI::config()->get_TrimHandleLocked());
844 frame_handle_start->set_fill_color (ARDOUR_UI::config()->get_TrimHandle());
845 frame_handle_end->set_fill_color (ARDOUR_UI::config()->get_TrimHandle());
852 TimeAxisViewItem::frame_handle_crossing (GdkEvent* ev, ArdourCanvas::Rectangle* item)
855 case GDK_LEAVE_NOTIFY:
856 /* always hide the handle whenever we leave, no matter what mode */
857 item->set_fill (false);
859 case GDK_ENTER_NOTIFY:
860 if (trackview.editor().effective_mouse_mode() == Editing::MouseObject &&
861 !trackview.editor().internal_editing()) {
862 /* never set this to be visible in internal
863 edit mode. Note, however, that we do need to
864 undo visibility (LEAVE_NOTIFY case above) no
865 matter what the mode is.
867 item->set_fill (true);
876 /** @return the frames per pixel */
878 TimeAxisViewItem::get_samples_per_pixel () const
880 return samples_per_pixel;
883 /** Set the frames per pixel of this item.
884 * This item is used to determine the relative visual size and position of this item
885 * based upon its duration and start value.
887 * @param fpp the new frames per pixel
890 TimeAxisViewItem::set_samples_per_pixel (double fpp)
892 samples_per_pixel = fpp;
893 set_position (this->get_position(), this);
894 reset_width_dependent_items ((double) get_duration() / samples_per_pixel);
898 TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
900 _width = pixel_width;
902 manage_name_highlight ();
905 if (pixel_width < 2.0) {
907 if (show_vestigial) {
909 if (!vestigial_frame) {
910 vestigial_frame = new ArdourCanvas::TimeRectangle (group, ArdourCanvas::Rect (0.0, 0.0, 2.0, trackview.current_height()));
911 CANVAS_DEBUG_NAME (vestigial_frame, string_compose ("vestigial frame for %1", get_item_name()));
912 vestigial_frame->set_outline_color (ARDOUR_UI::config()->color ("vestigial frame"));
913 vestigial_frame->set_fill_color (ARDOUR_UI::config()->color ("vestigial frame"));
914 vestigial_frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT));
917 vestigial_frame->show();
924 if (frame_handle_start) {
925 frame_handle_start->hide();
926 frame_handle_end->hide();
930 if (vestigial_frame) {
931 vestigial_frame->hide();
936 frame->set_x1 (pixel_width);
938 if (selection_frame) {
939 selection_frame->set (frame->get().shrink (1.0));
943 if (frame_handle_start) {
944 if (pixel_width < (3 * TimeAxisViewItem::GRAB_HANDLE_WIDTH)) {
946 * there's less than GRAB_HANDLE_WIDTH of the region between
947 * the right-hand end of frame_handle_start and the left-hand
948 * end of frame_handle_end, so disable the handles
951 frame_handle_start->hide();
952 frame_handle_end->hide();
954 frame_handle_start->show();
955 frame_handle_end->set_x0 (pixel_width - (TimeAxisViewItem::GRAB_HANDLE_WIDTH));
956 frame_handle_end->set_x1 (pixel_width);
957 frame_handle_end->show();
964 TimeAxisViewItem::manage_name_text ()
966 int visible_name_width;
972 if (!wide_enough_for_name || !high_enough_for_name) {
977 if (name_text->text().empty()) {
981 visible_name_width = name_text_width;
983 if (visible_name_width > _width - NAME_X_OFFSET) {
984 visible_name_width = _width - NAME_X_OFFSET;
987 if (visible_name_width < 1) {
990 name_text->clamp_width (visible_name_width);
996 * Callback used to remove this time axis item during the gtk idle loop.
997 * This is used to avoid deleting the obejct while inside the remove_this_item
1000 * @param item the TimeAxisViewItem to remove.
1001 * @param src the identity of the object that initiated the change.
1004 TimeAxisViewItem::idle_remove_this_item(TimeAxisViewItem* item, void* src)
1006 item->ItemRemoved (item->get_item_name(), src); /* EMIT_SIGNAL */
1013 TimeAxisViewItem::set_y (double y)
1015 group->set_y_position (y);
1019 TimeAxisViewItem::parameter_changed (string p)
1021 if (p == "color-regions-using-track-color") {
1023 } else if (p == "timeline-item-gradient-depth") {
1024 set_frame_gradient ();
1029 TimeAxisViewItem::drag_start ()
1036 TimeAxisViewItem::drag_end ()