/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "simplerect.h"
#include "waveview.h"
+using namespace std;
using namespace Editing;
using namespace ArdourCanvas;
using namespace ARDOUR;
+PBD::Signal1<void,GhostRegion*> GhostRegion::CatchDeletion;
+
GhostRegion::GhostRegion (ArdourCanvas::Group* parent, TimeAxisView& tv, TimeAxisView& source_tv, double initial_pos)
: trackview (tv)
, source_trackview (source_tv)
GhostRegion::~GhostRegion ()
{
- GoingAway (this);
+ CatchDeletion (this);
delete base_rect;
delete group;
}
{
for (vector<WaveView*>::iterator i = waves.begin(); i != waves.end(); ++i) {
(*i)->property_samples_per_unit() = spu;
- }
+ }
}
void
GhostRegion::set_height();
ht = ((trackview.current_height()) / (double) waves.size());
-
+
for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
gdouble yoff = n * ht;
(*i)->property_height() = ht;
MidiGhostRegion::MidiGhostRegion(MidiStreamView& msv, TimeAxisView& source_tv, double initial_unit_pos)
: GhostRegion(msv.midi_underlay_group, msv.trackview(), source_tv, initial_unit_pos)
{
- base_rect->lower_to_bottom();
+ base_rect->lower_to_bottom();
}
MidiGhostRegion::~MidiGhostRegion()
}
void
-MidiGhostRegion::set_samples_per_unit (double spu)
+MidiGhostRegion::set_samples_per_unit (double /*spu*/)
{
}
MidiGhostRegion::Note* note;
uint8_t note_num;
double y;
-
+
for (EventList::iterator it = events.begin(); it != events.end(); ++it) {
if ((note = dynamic_cast<MidiGhostRegion::Note*>(*it)) != 0) {
note_num = note->event->note()->note();
}
void
-MidiGhostRegion::add_hit(ArdourCanvas::CanvasHit* h)
+MidiGhostRegion::add_hit(ArdourCanvas::CanvasHit* /*h*/)
{
//events.push_back(new Hit(h, group));
}