#include "ardour/utils.h"
#include "ardour/region_factory.h"
#include "ardour/source_factory.h"
+#include "ardour/session.h"
#include <bitset>
{
if (_drag) {
_drag->item()->ungrab (event->button.time);
+ delete _drag;
+ _drag = 0;
}
/* single mouse clicks on any of these item types operate
atv->add_automation_event (item, event, where, event->button.y);
}
return true;
-
break;
default:
} else {
/* make sure we stop */
session->request_transport_speed (0.0);
- }
+ }
break;
default:
Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos, double ypos)
{
char buf[128];
- SMPTE::Time smpte;
+ Timecode::Time timecode;
BBT_Time bbt;
int hours, mins;
nframes64_t frame_rate;
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, bbt.bars, bbt.beats, bbt.ticks);
break;
- case AudioClock::SMPTE:
- session->smpte_time (frame, smpte);
- snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ case AudioClock::Timecode:
+ session->timecode_time (frame, timecode);
+ snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
break;
case AudioClock::MinSec:
if (xpos >= 0 && ypos >=0) {
set_verbose_canvas_cursor (buf, xpos + offset, ypos + offset);
- }
- else {
+ } else {
set_verbose_canvas_cursor (buf, _drag->current_pointer_x() + offset - horizontal_adjustment.get_value(), _drag->current_pointer_y() + offset - vertical_adjustment.get_value() + canvas_timebars_vsize);
}
show_verbose_canvas_cursor ();
Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset, double xpos, double ypos)
{
char buf[128];
- SMPTE::Time smpte;
+ Timecode::Time timecode;
BBT_Time sbbt;
BBT_Time ebbt;
int hours, mins;
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, ebbt.bars, ebbt.beats, ebbt.ticks);
break;
- case AudioClock::SMPTE:
- session->smpte_duration (end - start, smpte);
- snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ case AudioClock::Timecode:
+ session->timecode_duration (end - start, timecode);
+ snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
break;
case AudioClock::MinSec:
{
/* no brushing without a useful snap setting */
- switch (snap_mode) {
+ switch (_snap_mode) {
case SnapMagnetic:
return; /* can't work because it allows region to be placed anywhere */
default:
break; /* OK */
}
- switch (snap_type) {
+ switch (_snap_type) {
case SnapToMark:
return;