summaryrefslogtreecommitdiff
path: root/gtk2_ardour/marker.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-12 22:51:54 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-12 22:51:54 +0000
commit8496f57fd49f1fd74d2c8662a91088374fb662ba (patch)
tree9a4b5c26b91e3b8f1a0bbfb179e76e5cd90918e5 /gtk2_ardour/marker.h
parent08b303c334bc74ec9c5a4dc5292cc59f377e3f75 (diff)
Prevent marker labels overlapping. Fixes #3535.
git-svn-id: svn://localhost/ardour2/branches/3.0@8015 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/marker.h')
-rw-r--r--gtk2_ardour/marker.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index 18eea0963e..efe2c8ee78 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -84,6 +84,15 @@ class Marker : public sigc::trackable
Type type () { return _type; }
+ void set_left_label_limit (double);
+ void set_right_label_limit (double);
+
+ std::string name () const {
+ return _name;
+ }
+
+ bool label_on_left () const;
+
protected:
PublicEditor& editor;
@@ -98,6 +107,7 @@ class Marker : public sigc::trackable
ArdourCanvas::SimpleLine* _line;
ArdourCanvas::Points *line_points;
+ std::string _name;
double unit_position;
framepos_t frame_position;
double _shift;
@@ -108,9 +118,12 @@ class Marker : public sigc::trackable
bool _line_shown;
double _canvas_height;
uint32_t _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
void reposition ();
void setup_line_x ();
+ void setup_name_pixbuf ();
};
class TempoMarker : public Marker