Ardour  9.0-pre0-582-g084a23a80d
port_matrix_body.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Carl Hetherington <carl@carlh.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #pragma once
20 
21 #include <gtkmm/eventbox.h>
22 #include "port_group.h"
23 #include "port_matrix_types.h"
24 
25 class PortMatrix;
28 class PortMatrixGrid;
30 
35 {
36 public:
39 
40  void setup ();
41 
42  uint32_t full_scroll_width ();
43  uint32_t alloc_scroll_width ();
44  uint32_t full_scroll_height ();
45  uint32_t alloc_scroll_height ();
46 
47  uint32_t xoffset () const {
48  return _xoffset;
49  }
50  void set_xoffset (uint32_t);
51  uint32_t yoffset () const {
52  return _yoffset;
53  }
54  void set_yoffset (uint32_t);
55 
57 
58  void set_mouseover (PortMatrixNode const &);
59  void set_mouseover (std::list<PortMatrixNode> const &);
60  std::list<PortMatrixNode> mouseover () const {
61  return _mouseover;
62  }
63 
66  std::pair<uint32_t, uint32_t> max_size () const;
67 
68  uint32_t column_labels_border_x () const;
69  uint32_t column_labels_height () const;
70 
71  sigc::signal<void> DimensionsChanged;
72 
73 protected:
81 
82 private:
86  void update_bundles ();
87  void set_cairo_clip (cairo_t *, Gdk::Rectangle const &) const;
88 
93  std::list<PortMatrixComponent*> _components;
94 
95  uint32_t _alloc_width;
96  uint32_t _alloc_height;
97  uint32_t _xoffset;
98  uint32_t _yoffset;
101 
102  std::list<PortMatrixNode> _mouseover;
104 
106 };
107 
bool on_button_release_event(GdkEventButton *)
This is a default handler for the signal signal_button_release_event().
PortMatrixColumnLabels * _column_labels
bool _ignore_component_size_changed
void highlight_associated_channels(int, ARDOUR::BundleChannel)
PortMatrixGrid * _grid
bool on_button_press_event(GdkEventButton *)
This is a default handler for the signal signal_button_press_event().
uint32_t _column_labels_height
PBD::ScopedConnectionList _bundle_connections
sigc::signal< void > DimensionsChanged
void rebuild_and_draw_column_labels()
std::list< PortMatrixNode > _mouseover
uint32_t column_labels_border_x() const
void set_cairo_clip(cairo_t *, Gdk::Rectangle const &) const
uint32_t xoffset() const
void rebuild_and_draw_row_labels()
uint32_t _alloc_height
allocated height
void set_mouseover(PortMatrixNode const &)
void on_size_allocate(Gtk::Allocation &)
This is a default handler for the signal signal_size_allocate().
void compute_rectangles()
bool on_motion_notify_event(GdkEventMotion *)
This is a default handler for the signal signal_motion_notify_event().
void set_yoffset(uint32_t)
std::list< PortMatrixNode > mouseover() const
bool on_expose_event(GdkEventExpose *)
This is a default handler for the signal signal_expose_event().
bool on_leave_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_leave_notify_event().
PortMatrixBody(PortMatrix *)
uint32_t full_scroll_height()
uint32_t yoffset() const
PortMatrix * _matrix
uint32_t alloc_scroll_height()
void set_mouseover(std::list< PortMatrixNode > const &)
uint32_t full_scroll_width()
PortMatrixRowLabels * _row_labels
std::list< PortMatrixComponent * > _components
uint32_t _alloc_width
allocated width
std::pair< uint32_t, uint32_t > max_size() const
uint32_t alloc_scroll_width()
void component_size_changed()
void set_xoffset(uint32_t)
void update_bundles()
uint32_t column_labels_height() const
void on_size_request(Gtk::Requisition *)
This is a default handler for the signal signal_size_request().
void rebuild_and_draw_grid()
uint32_t _column_labels_border_x