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.
21 #ifndef __ardour_meterbridgestrip_h__
22 #define __ardour_meterbridgestrip_h__
24 #include <sigc++/signal.h>
26 #include <gtkmm/box.h>
27 #include <gtkmm/widget.h>
28 #include <gtkmm/eventbox.h>
29 #include <gtkmm/label.h>
30 #include <gtkmm/frame.h>
32 #include <gtkmm2ext/fastmeter.h>
42 struct SelectionResult;
45 class MeterBridgeStrip : public sigc::trackable
49 MeterBridgeStrip (ARDOUR::AudioEngine &,
53 jack_nframes_t long_over,
54 jack_nframes_t short_over,
55 jack_nframes_t meter_hold);
57 void update (); /* called by meter timeout handler from ARDOUR_UI */
59 Gtk::Box &above_box() { return above_meter_vbox; }
60 Gtk::Box &below_box() { return below_meter_vbox; }
61 Gtk::Widget &meter_widget() { return meter; }
63 guint32 meter_width() const { return 8; }
68 void set_meter_on (bool yn);
69 bool get_meter_on () const { return meter_on; }
71 ARDOUR::Route& route() const { return _route; }
74 ARDOUR::AudioEngine& engine;
75 ARDOUR::Session& session;
76 ARDOUR::Route& _route;
78 Gtk::EventBox label_ebox;
80 bool meter_clear_pending;
81 bool over_clear_pending;
83 Gtkmm2ext::FastMeter meter;
86 Gtk::VBox above_meter_vbox;
87 Gtk::VBox below_meter_vbox;
89 Gtk::HBox over_long_hbox;
90 Gtk::HBox over_long_vbox;
91 Gtk::EventBox over_long_button;
92 Gtk::Frame over_long_frame;
93 Gtk::Label over_long_label;
95 Gtk::HBox over_short_hbox;
96 Gtk::HBox over_short_vbox;
97 Gtk::EventBox over_short_button;
98 Gtk::Frame over_short_frame;
99 Gtk::Label over_short_label;
101 guint32 last_over_short;
102 guint32 last_over_long;
104 gint gui_clear_overs (GdkEventButton *);
105 gint label_button_press_release (GdkEventButton *);
108 #endif /* __ardour_meterbridgestrip_h__ */