X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmarker.h;h=0f01f1d7944ad8caa47e0c4d6818e5775fe00cbd;hb=c3e7746e367b5b461f0577b548c9e29854bdde06;hp=fd29f5411fcdf6c25f99717fff5641fee08ff17c;hpb=a8d2605f9a6f48f3afb09c212de9486c75856287;p=ardour.git diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h index fd29f5411f..0f01f1d794 100644 --- a/gtk2_ardour/marker.h +++ b/gtk2_ardour/marker.h @@ -23,7 +23,9 @@ #include #include #include -#include +#include + +#include #include "canvas.h" @@ -34,7 +36,7 @@ namespace ARDOUR { class PublicEditor; -class Marker : public sigc::trackable +class Marker : public PBD::Destructible { public: enum Type { @@ -57,9 +59,10 @@ class Marker : public sigc::trackable ArdourCanvas::Item& the_item() const; - void add_line (ArdourCanvas::Group*, double initial_height); + void add_line (ArdourCanvas::Group*, double y_origin, double initial_height); void show_line (); void hide_line (); + void set_line_vpos (double y_origin, double height); void set_position (nframes_t); void set_name (const string&); @@ -67,26 +70,33 @@ class Marker : public sigc::trackable nframes64_t position() const { return frame_position; } + ArdourCanvas::Group * get_parent() { return _parent; } + void reparent (ArdourCanvas::Group & parent); + void hide (); void show (); Type type () { return _type; } - + protected: PublicEditor& editor; + Pango::FontDescription* name_font; + + ArdourCanvas::Group * _parent; ArdourCanvas::Group *group; ArdourCanvas::Polygon *mark; - ArdourCanvas::Text *text; + ArdourCanvas::Pixbuf *name_pixbuf; ArdourCanvas::Points *points; - ArdourCanvas::Line *line; + ArdourCanvas::SimpleLine *line; ArdourCanvas::Points *line_points; double unit_position; nframes64_t frame_position; unsigned char shift; /* should be double, but its always small and integral */ - Type _type; - + Type _type; + int name_height; + void reposition (); };