summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_body.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-27 04:21:13 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-27 04:21:13 +0000
commit9cc7b452ebb8fe8f348ad6aad18054703700da18 (patch)
treea54d33c5f608b321823665baec607ee4f83d5f70 /gtk2_ardour/port_matrix_body.h
parent7e1b86aceeef477e13b4c35f524034d909acd92c (diff)
First cut at mouseovers for the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@4446 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_body.h')
-rw-r--r--gtk2_ardour/port_matrix_body.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/gtk2_ardour/port_matrix_body.h b/gtk2_ardour/port_matrix_body.h
index c9fd8bdb65..2a68a251bf 100644
--- a/gtk2_ardour/port_matrix_body.h
+++ b/gtk2_ardour/port_matrix_body.h
@@ -24,6 +24,7 @@
#include "port_matrix_row_labels.h"
#include "port_matrix_grid.h"
#include "port_group.h"
+#include "port_matrix_types.h"
class PortMatrix;
@@ -58,21 +59,35 @@ public:
uint32_t full_scroll_height ();
uint32_t alloc_scroll_height ();
+ uint32_t xoffset () const {
+ return _xoffset;
+ }
void set_xoffset (uint32_t);
+ uint32_t yoffset () const {
+ return _yoffset;
+ }
void set_yoffset (uint32_t);
void rebuild_and_draw_grid ();
-
+
+ void set_mouseover (PortMatrixNode const &);
+ PortMatrixNode mouseover () const {
+ return _mouseover;
+ }
+
protected:
bool on_expose_event (GdkEventExpose *);
void on_size_request (Gtk::Requisition *);
void on_size_allocate (Gtk::Allocation &);
bool on_button_press_event (GdkEventButton *);
-
+ bool on_enter_notify_event (GdkEventCrossing *);
+ bool on_motion_notify_event (GdkEventMotion *);
+
private:
void compute_rectangles ();
void rebuild_and_draw_column_labels ();
void rebuild_and_draw_row_labels ();
+ void update_bundles ();
PortMatrix* _port_matrix;
PortMatrixColumnLabels _column_labels;
@@ -87,12 +102,15 @@ private:
Gdk::Rectangle _grid_rect;
uint32_t _xoffset;
uint32_t _yoffset;
+ bool _pointer_inside;
/// bundles to offer for columns
PortGroupList _column_ports;
/// bundles to offer for rows
PortGroupList _row_ports;
+ PortMatrixNode _mouseover;
+
std::list<sigc::connection> _bundle_connections;
};