2 Copyright (C) 2001 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.
20 #ifndef __gtk_ardour_marker_h__
21 #define __gtk_ardour_marker_h__
25 #include <ardour/ardour.h>
26 #include <sigc++/signal.h>
37 class Marker : public sigc::trackable
53 Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type,
54 nframes_t frame = 0, bool handle_events = true);
58 ArdourCanvas::Item& the_item() const;
60 void set_position (nframes_t);
61 void set_name (const string&);
62 void set_color_rgba (uint32_t rgba);
67 Type type () { return _type; }
72 ArdourCanvas::Group *group;
73 ArdourCanvas::Polygon *mark;
74 ArdourCanvas::Text *text;
75 ArdourCanvas::Points *points;
78 nframes_t frame_position;
79 unsigned char shift; /* should be double, but its always small and integral */
85 class TempoMarker : public Marker
88 TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&);
91 ARDOUR::TempoSection& tempo() const { return _tempo; }
94 ARDOUR::TempoSection& _tempo;
97 class MeterMarker : public Marker
100 MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&);
103 ARDOUR::MeterSection& meter() const { return _meter; }
106 ARDOUR::MeterSection& _meter;
109 #endif /* __gtk_ardour_marker_h__ */