X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Fport_matrix_component.h;h=c61d7ec67dcd1db3188c9bf201ed69f9a580dd24;hb=4774527c5b1cdff807c1932bc93cf317401042a5;hp=d4cc8619b6bf6d401f7316eb09d92d796236a542;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/gtk2_ardour/port_matrix_component.h b/gtk2_ardour/port_matrix_component.h index d4cc8619b6..c61d7ec67d 100644 --- a/gtk2_ardour/port_matrix_component.h +++ b/gtk2_ardour/port_matrix_component.h @@ -31,6 +31,7 @@ class PortGroup; class PortGroupList; namespace ARDOUR { + class Bundle; class BundleChannel; } @@ -47,8 +48,11 @@ public: virtual double parent_to_component_x (double x) const = 0; virtual double component_to_parent_y (double y) const = 0; virtual double parent_to_component_y (double y) const = 0; - virtual void mouseover_changed (PortMatrixNode const &) = 0; + virtual void mouseover_changed (std::list const &) = 0; virtual void draw_extra (cairo_t *) = 0; + virtual void button_press (double, double, GdkEventButton *) {} + virtual void button_release (double, double, GdkEventButton *) {} + virtual void motion (double, double) {} void set_show_ports (bool); void setup (); @@ -74,7 +78,7 @@ public: /** @return grid spacing */ static uint32_t grid_spacing () { - return 32; + return 24; } protected: @@ -101,7 +105,7 @@ protected: /** @return space around the connection indicator */ static uint32_t connection_indicator_pad () { - return 8; + return 6; } static uint32_t mouseover_line_width () { @@ -134,7 +138,7 @@ protected: } /** @return colour to paint grid squares when they can't be associated */ - static Gdk::Color unknown_colour () { + static Gdk::Color non_connectable_colour () { return Gdk::Color ("#cccccc"); } @@ -169,8 +173,8 @@ protected: void set_source_rgb (cairo_t *, Gdk::Color const &); void set_source_rgba (cairo_t *, Gdk::Color const &, double); uint32_t group_size (boost::shared_ptr) const; - uint32_t channel_to_position (ARDOUR::BundleChannel, PortGroupList const *) const; - std::pair, ARDOUR::BundleChannel> position_to_group_and_channel (uint32_t, PortGroupList const *) const; + uint32_t channel_to_position (ARDOUR::BundleChannel, boost::shared_ptr) const; + virtual ARDOUR::BundleChannel position_to_channel (double, double, boost::shared_ptr) const; /** Render the complete component to a cairo context. */ virtual void render (cairo_t *) = 0;