#define __gtk_ardour_time_axis_view_item_h__
#include <string>
-
-#include <libgnomecanvasmm/pixbuf.h>
-
+#include <gdkmm/color.h>
+#include <pangomm/fontdescription.h>
#include "pbd/signals.h"
-
#include "selectable.h"
-#include "simplerect.h"
-#include "canvas.h"
class TimeAxisView;
+namespace ArdourCanvas {
+ class Pixbuf;
+ class Rectangle;
+ class Item;
+ class Group;
+ class Text;
+}
+
using ARDOUR::framepos_t;
using ARDOUR::framecnt_t;
ArdourCanvas::Item* get_canvas_frame();
ArdourCanvas::Group* get_canvas_group();
ArdourCanvas::Item* get_name_highlight();
- ArdourCanvas::Pixbuf* get_name_pixbuf();
- virtual void set_samples_per_unit(double spu);
+ virtual void set_samples_per_pixel (double);
+
+ double get_samples_per_pixel () const;
- double get_samples_per_unit();
+ virtual void drag_start() { _dragging = true; }
+ virtual void drag_end() { _dragging = false; }
+ bool dragging() const { return _dragging; }
virtual void raise () { return; }
virtual void raise_to_top () { return; }
static Pango::FontDescription NAME_FONT;
static void set_constant_heights ();
static const double NAME_X_OFFSET;
- static const double GRAB_HANDLE_LENGTH;
+ static const double GRAB_HANDLE_TOP;
+ static const double GRAB_HANDLE_WIDTH;
/* these are not constant, but vary with the pixel size
of the font used to display the item name.
virtual void compute_colors (Gdk::Color const &);
virtual void set_colors();
virtual void set_frame_color();
+ virtual void set_frame_gradient ();
void set_trim_handle_colors();
virtual void reset_width_dependent_items (double);
void reset_name_width (double);
- void update_name_pixbuf_visibility ();
+ void update_name_text_visibility ();
static gint idle_remove_this_item(TimeAxisViewItem*, void*);
/** indicates whether the min duration constraint is active */
bool min_duration_active;
- /** samples per canvas unit */
- double samples_per_unit;
+ /** frames per canvas pixel */
+ double samples_per_pixel;
/** should the item respond to events */
bool _sensitive;
uint32_t lock_handle_color_g;
uint32_t lock_handle_color_b;
uint32_t last_item_width;
- int name_pixbuf_width;
+ int name_text_width;
bool wide_enough_for_name;
bool high_enough_for_name;
bool rect_visible;
ArdourCanvas::Group* group;
- ArdourCanvas::SimpleRect* vestigial_frame;
- ArdourCanvas::SimpleRect* frame;
- ArdourCanvas::Pixbuf* name_pixbuf;
- ArdourCanvas::SimpleRect* name_highlight;
+ ArdourCanvas::Rectangle* vestigial_frame;
+ ArdourCanvas::Rectangle* frame;
+ ArdourCanvas::Text* name_text;
+ ArdourCanvas::Rectangle* name_highlight;
/* with these two values, if frame_handle_start == 0 then frame_handle_end will also be 0 */
- ArdourCanvas::SimpleRect* frame_handle_start; ///< `frame' (fade) handle for the start of the item, or 0
- ArdourCanvas::SimpleRect* frame_handle_end; ///< `frame' (fade) handle for the end of the item, or 0
+ 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
double _height;
Visibility visibility;
bool _recregion;
bool _automation; ///< true if this is an automation region view
+ bool _dragging;
private: