summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_body.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/port_matrix_body.h')
-rw-r--r--gtk2_ardour/port_matrix_body.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk2_ardour/port_matrix_body.h b/gtk2_ardour/port_matrix_body.h
index 503bb3ab62..bb2d592fe8 100644
--- a/gtk2_ardour/port_matrix_body.h
+++ b/gtk2_ardour/port_matrix_body.h
@@ -33,7 +33,12 @@ class PortMatrix;
class PortMatrixBody : public Gtk::EventBox
{
public:
- PortMatrixBody (PortMatrix *);
+ enum Arrangement {
+ TOP_AND_RIGHT,
+ BOTTOM_AND_LEFT
+ };
+
+ PortMatrixBody (PortMatrix *, Arrangement);
/** @return bundles to offer for columns */
std::vector<boost::shared_ptr<ARDOUR::Bundle> > const & column_bundles () {
@@ -67,7 +72,7 @@ protected:
bool on_button_press_event (GdkEventButton *);
private:
- void compute_divs ();
+ void compute_rectangles ();
void repaint_column_labels ();
void repaint_row_labels ();
@@ -76,10 +81,12 @@ private:
PortMatrixRowLabels _row_labels;
PortMatrixGrid _grid;
+ Arrangement _arrangement;
uint32_t _alloc_width; ///< allocated width
uint32_t _alloc_height; ///< allocated height
- uint32_t _alloc_xdiv; ///< position of the division between grid and row labels
- uint32_t _alloc_ydiv; ///< position of the division between column labels and grid
+ Gdk::Rectangle _column_labels_rect;
+ Gdk::Rectangle _row_labels_rect;
+ Gdk::Rectangle _grid_rect;
uint32_t _xoffset;
uint32_t _yoffset;