}
/* playhead cursor */
- assert (_drag == 0);
- _drag = new CursorDrag (this, &playhead_cursor->canvas_item, false);
- _drag->start_grab (reinterpret_cast<GdkEvent *> (ev));
+ _drags->set (new CursorDrag (this, &playhead_cursor->canvas_item, false), reinterpret_cast<GdkEvent *> (ev));
_dragging_playhead = true;
}
gint x,y;
Gdk::ModifierType state;
- if (_drag) {
- _drag->end_grab (reinterpret_cast<GdkEvent*> (ev));
- delete _drag;
- _drag = 0;
+ if (_drags->active ()) {
+ _drags->end_grab (reinterpret_cast<GdkEvent*> (ev));
_dragging_playhead = false;
}
return FALSE;
}
- if (_drag) {
- _drag->motion_handler (reinterpret_cast<GdkEvent*> (ev), false);
+ if (_drags->active ()) {
+ _drags->motion_handler (reinterpret_cast<GdkEvent*> (ev), false);
}
return TRUE;
bbt_ruler_scale = bbt_over;
switch (_snap_type) {
- case SnapToAThirdBeat:
+ case SnapToBeatDiv2:
+ bbt_beat_subdivision = 2;
+ break;
+ case SnapToBeatDiv3:
bbt_beat_subdivision = 3;
break;
- case SnapToAQuarterBeat:
+ case SnapToBeatDiv4:
bbt_beat_subdivision = 4;
break;
- case SnapToAEighthBeat:
+ case SnapToBeatDiv5:
+ bbt_beat_subdivision = 5;
+ bbt_accent_modulo = 2; // XXX YIKES
+ break;
+ case SnapToBeatDiv6:
+ bbt_beat_subdivision = 6;
+ bbt_accent_modulo = 2; // XXX YIKES
+ break;
+ case SnapToBeatDiv7:
+ bbt_beat_subdivision = 7;
+ bbt_accent_modulo = 2; // XXX YIKES
+ break;
+ case SnapToBeatDiv8:
bbt_beat_subdivision = 8;
bbt_accent_modulo = 2;
break;
- case SnapToASixteenthBeat:
+ case SnapToBeatDiv10:
+ bbt_beat_subdivision = 10;
+ bbt_accent_modulo = 2; // XXX YIKES
+ break;
+ case SnapToBeatDiv12:
+ bbt_beat_subdivision = 12;
+ bbt_accent_modulo = 3;
+ break;
+ case SnapToBeatDiv14:
+ bbt_beat_subdivision = 14;
+ bbt_accent_modulo = 3; // XXX YIKES!
+ break;
+ case SnapToBeatDiv16:
bbt_beat_subdivision = 16;
bbt_accent_modulo = 4;
break;
- case SnapToAThirtysecondBeat:
+ case SnapToBeatDiv24:
+ bbt_beat_subdivision = 24;
+ bbt_accent_modulo = 6;
+ break;
+ case SnapToBeatDiv28:
+ bbt_beat_subdivision = 28;
+ bbt_accent_modulo = 7;
+ break;
+ case SnapToBeatDiv32:
bbt_beat_subdivision = 32;
bbt_accent_modulo = 8;
break;