X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmarker.h;h=e23c79b4bb3ed18436c99e7de94433ad6fad7244;hb=dc0139d4af4d246f6dcafb04425e3f1198c347c3;hp=3a3339d31881370d33a90495a2f590a37b6e5a22;hpb=ad017365f7a73f8ba57f667cc1aa36478b48c50e;p=ardour.git diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h index 3a3339d318..e23c79b4bb 100644 --- a/gtk2_ardour/marker.h +++ b/gtk2_ardour/marker.h @@ -38,7 +38,11 @@ namespace ARDOUR { class PublicEditor; -class Marker : public sigc::trackable +/** Location Marker + * + * Editor ruler representation of a location marker or range on the timeline. + */ +class ArdourMarker : public sigc::trackable { public: enum Type { @@ -56,12 +60,14 @@ class Marker : public sigc::trackable }; - Marker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, Type, + ArdourMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, Type, framepos_t frame = 0, bool handle_events = true); - virtual ~Marker (); + virtual ~ArdourMarker (); - static PBD::Signal1 CatchDeletion; + static PBD::Signal1 CatchDeletion; + + static void setup_sizes (const double timebar_height); ArdourCanvas::Item& the_item() const; @@ -71,6 +77,7 @@ class Marker : public sigc::trackable void set_position (framepos_t); void set_name (const std::string&); + void set_points_color (uint32_t rgba); void set_color_rgba (uint32_t rgba); void setup_line (); @@ -117,6 +124,7 @@ class Marker : public sigc::trackable bool _line_shown; double _canvas_height; uint32_t _color; + uint32_t _points_color; double _left_label_limit; ///< the number of pixels available to the left of this marker for a label double _right_label_limit; ///< the number of pixels available to the right of this marker for a label double _label_offset; @@ -127,11 +135,11 @@ class Marker : public sigc::trackable private: /* disallow copy construction */ - Marker (Marker const &); - Marker & operator= (Marker const &); + ArdourMarker (ArdourMarker const &); + ArdourMarker & operator= (ArdourMarker const &); }; -class TempoMarker : public Marker +class TempoMarker : public ArdourMarker { public: TempoMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, ARDOUR::TempoSection&); @@ -139,11 +147,12 @@ class TempoMarker : public Marker ARDOUR::TempoSection& tempo() const { return _tempo; } + void update_height_mark (const double ratio); private: ARDOUR::TempoSection& _tempo; }; -class MeterMarker : public Marker +class MeterMarker : public ArdourMarker { public: MeterMarker (PublicEditor& editor, ArdourCanvas::Container &, guint32 rgba, const std::string& text, ARDOUR::MeterSection&);