--- /dev/null
+#ifndef LIBR2C2_TRACKATTACHMENT_H_
+#define LIBR2C2_TRACKATTACHMENT_H_
+
+#include "object.h"
+#include "trackiter.h"
+
+namespace R2C2 {
+
+class TrackAttachment: public Object
+{
+protected:
+ TrackIter track;
+ float offset;
+
+ TrackAttachment(Layout &);
+public:
+ virtual ~TrackAttachment();
+
+ const TrackIter &get_track_iter() const { return track; }
+ Track *get_track() const { return track.track(); }
+ unsigned get_entry() const { return track.entry(); }
+ float get_offset() const { return offset; }
+protected:
+ void attach_to(const TrackIter &, float);
+ void attach_to_closest(float);
+ float find_offset(const TrackIter &, const Vector &);
+
+public:
+ virtual Track *get_parent() const { return track.track(); }
+};
+
+} // namespace R2C2
+
+#endif