X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftime_axis_view_item.h;h=49cd615d6aacdc2fcd59cb34fc9ee76614f9695b;hb=4bfc5ddf71728c1f14a3fbff5dab4986fbabe15c;hp=04072d1a8e3840f58d49264f52877f622af12cae;hpb=becf857f48dd021307fca75082d29b95b4ffd539;p=ardour.git diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index 04072d1a8e..49cd615d6a 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -33,8 +33,8 @@ namespace ArdourCanvas { class Pixbuf; class Rectangle; class Item; - class Group; - class Text; + class Container; + class Text; } using ARDOUR::framepos_t; @@ -46,7 +46,7 @@ using ARDOUR::framecnt_t; class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList { - public: +public: virtual ~TimeAxisViewItem(); virtual bool set_position(framepos_t, void*, double* delta = 0); @@ -76,10 +76,10 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList void set_color (uint32_t); void set_name_text_color (); - uint32_t get_fill_color () const; + virtual uint32_t get_fill_color () const; ArdourCanvas::Item* get_canvas_frame(); - ArdourCanvas::Group* get_canvas_group(); + ArdourCanvas::Item* get_canvas_group(); ArdourCanvas::Item* get_name_highlight(); virtual void set_samples_per_pixel (double); @@ -95,9 +95,6 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList virtual void lower () { return; } virtual void lower_to_bottom () { return; } - virtual void hide_rect (); - virtual void show_rect (); - /** @return true if the name area should respond to events */ bool name_active() const { return name_connected; } @@ -109,27 +106,13 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList 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. - */ + * of the font used to display the item name. + */ static int NAME_HEIGHT; static double NAME_Y_OFFSET; static double NAME_HIGHLIGHT_SIZE; static double NAME_HIGHLIGHT_THRESH; - /* if this is 1.0, we move the right boundary - of the item frame so that it is 1 pixel - after the end of the item. This gives nice - effects when splitting items. - - if this is zero, the right edge coincides - with the end of the item, and things don't - look so nice. - - this exists to allow easy debugging of the - two scenarios. - */ - static const double RIGHT_EDGE_SHIFT; - /** * Emitted when this Group has been removed. * This is different to the CatchDeletion signal in that this signal @@ -169,15 +152,15 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList FullWidthNameHighlight = 0x80 }; - protected: - TimeAxisViewItem (const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, uint32_t fill_color, - framepos_t, framecnt_t, bool recording = false, bool automation = false, Visibility v = Visibility (0)); +protected: + TimeAxisViewItem (const std::string &, ArdourCanvas::Item&, TimeAxisView&, double, uint32_t fill_color, + framepos_t, framecnt_t, bool recording = false, bool automation = false, Visibility v = Visibility (0)); TimeAxisViewItem (const TimeAxisViewItem&); - void init (ArdourCanvas::Group*, double, uint32_t, framepos_t, framepos_t, Visibility, bool, bool); + void init (ArdourCanvas::Item*, double, uint32_t, framepos_t, framepos_t, Visibility, bool, bool); - virtual bool canvas_group_event (GdkEvent*); + virtual bool canvas_group_event (GdkEvent*); virtual void set_colors(); virtual void set_frame_color(); @@ -227,22 +210,16 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList /** true if the name should respond to events */ bool name_connected; - /** true if a small vestigial rect should be shown when the item gets very narrow */ - bool show_vestigial; - uint32_t fill_color; - virtual uint32_t fill_opacity() const; - uint32_t last_item_width; int name_text_width; bool wide_enough_for_name; bool high_enough_for_name; - bool rect_visible; - ArdourCanvas::Group* group; - ArdourCanvas::Rectangle* vestigial_frame; + ArdourCanvas::Container* group; ArdourCanvas::Rectangle* frame; + ArdourCanvas::Rectangle* selection_frame; ArdourCanvas::Text* name_text; ArdourCanvas::Rectangle* name_highlight; @@ -250,20 +227,20 @@ 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*); + bool frame_handle_crossing (GdkEvent*, ArdourCanvas::Rectangle*); double _height; Visibility visibility; + std::string fill_color_name; bool _recregion; bool _automation; ///< true if this is an automation region view bool _dragging; + double _width; private: - double _width; - void parameter_changed (std::string); - void manage_name_highlight (); - void manage_name_text (); + void manage_name_highlight (); + void manage_name_text (); }; /* class TimeAxisViewItem */