fix computation of Text bounding box to respect _clamped_width
[ardour.git] / gtk2_ardour / time_axis_view_item.h
index f6f72b77bda6af0f5f8f70f82ae4a6eb1c603969..6a81080e96fe65007383c016d964a9a120a71acd 100644 (file)
@@ -21,6 +21,7 @@
 #define __gtk_ardour_time_axis_view_item_h__
 
 #include <string>
+#include <gdk/gdk.h>
 #include <gdkmm/color.h>
 #include <pangomm/fontdescription.h>
 #include "pbd/signals.h"
@@ -73,6 +74,8 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
        void set_y (double);
        void set_color (Gdk::Color const &);
 
+        uint32_t get_fill_color () const;
+
        ArdourCanvas::Item* get_canvas_frame();
        ArdourCanvas::Group* get_canvas_group();
        ArdourCanvas::Item* get_name_highlight();
@@ -156,7 +159,9 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
 
        TimeAxisViewItem (const TimeAxisViewItem&);
 
-       void init (const std::string&, double, Gdk::Color const &, framepos_t, framepos_t, Visibility, bool, bool);
+        void init (ArdourCanvas::Group*, double, Gdk::Color const &, framepos_t, framepos_t, Visibility, bool, bool);
+
+        virtual bool canvas_group_event (GdkEvent*);
 
        virtual void compute_colors (Gdk::Color const &);
        virtual void set_colors();
@@ -244,6 +249,8 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
        ArdourCanvas::Rectangle* frame_handle_start; ///< `frame' (fade) handle for the start of the item, or 0
        ArdourCanvas::Rectangle* frame_handle_end; ///< `frame' (fade) handle for the end of the item, or 0
 
+        bool frame_handle_crossing (GdkEvent*, ArdourCanvas::Rectangle*);
+
        double _height;
        Visibility visibility;
        bool _recregion;