2 Copyright (C) 1999 Paul Davis
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.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_meterbridgestrip_h__
21 #define __ardour_meterbridgestrip_h__
23 #include <sigc++/signal.h>
25 #include <gtkmm/box.h>
26 #include <gtkmm/widget.h>
27 #include <gtkmm/eventbox.h>
28 #include <gtkmm/label.h>
29 #include <gtkmm/frame.h>
31 #include <gtkmm2ext/fastmeter.h>
41 struct SelectionResult;
44 class MeterBridgeStrip : public sigc::trackable
48 MeterBridgeStrip (ARDOUR::AudioEngine &,
54 nframes_t meter_hold);
56 void update (); /* called by meter timeout handler from ARDOUR_UI */
58 Gtk::Box &above_box() { return above_meter_vbox; }
59 Gtk::Box &below_box() { return below_meter_vbox; }
60 Gtk::Widget &meter_widget() { return meter; }
62 guint32 meter_width() const { return 8; }
67 void set_meter_on (bool yn);
68 bool get_meter_on () const { return meter_on; }
70 ARDOUR::Route& route() const { return _route; }
73 ARDOUR::AudioEngine& engine;
74 ARDOUR::Session& session;
75 ARDOUR::Route& _route;
77 Gtk::EventBox label_ebox;
79 bool meter_clear_pending;
80 bool over_clear_pending;
82 Gtkmm2ext::FastMeter meter;
85 Gtk::VBox above_meter_vbox;
86 Gtk::VBox below_meter_vbox;
88 Gtk::HBox over_long_hbox;
89 Gtk::HBox over_long_vbox;
90 Gtk::EventBox over_long_button;
91 Gtk::Frame over_long_frame;
92 Gtk::Label over_long_label;
94 Gtk::HBox over_short_hbox;
95 Gtk::HBox over_short_vbox;
96 Gtk::EventBox over_short_button;
97 Gtk::Frame over_short_frame;
98 Gtk::Label over_short_label;
100 guint32 last_over_short;
101 guint32 last_over_long;
103 gint gui_clear_overs (GdkEventButton *);
104 gint label_button_press_release (GdkEventButton *);
107 #endif /* __ardour_meterbridgestrip_h__ */