2005-09-25 14:42:24 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 1999-2002 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_meter_bridge_h__
|
|
|
|
#define __ardour_meter_bridge_h__
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <gtkmm/eventbox.h>
|
|
|
|
#include <gtkmm/viewport.h>
|
|
|
|
#include <gtkmm/scrolledwindow.h>
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/fixed.h>
|
|
|
|
#include <gtkmm/frame.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "ardour_dialog.h"
|
|
|
|
|
|
|
|
class MeterBridgeStrip;
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class Session;
|
|
|
|
class Route;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MeterBridge : public ArdourDialog
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
MeterBridge ();
|
|
|
|
~MeterBridge ();
|
|
|
|
|
|
|
|
void set_session (ARDOUR::Session*);
|
|
|
|
void clear_all_meters ();
|
|
|
|
void start_metering ();
|
|
|
|
void stop_metering ();
|
|
|
|
void toggle_metering ();
|
|
|
|
|
|
|
|
protected:
|
2005-11-12 22:53:51 -05:00
|
|
|
void on_map ();
|
|
|
|
void on_unmap ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
/* diskstream/recorder display */
|
2005-11-12 22:53:51 -05:00
|
|
|
Gtk::Adjustment hadjustment;
|
|
|
|
Gtk::Adjustment vadjustment;
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Viewport meter_viewport;
|
|
|
|
Gtk::ScrolledWindow meter_scroller;
|
|
|
|
Gtk::EventBox meter_scroll_base;
|
|
|
|
Gtk::HBox meter_scroller_hpacker;
|
|
|
|
Gtk::VBox meter_scroller_vpacker;
|
|
|
|
Gtk::VBox metering_vpacker;
|
|
|
|
Gtk::VBox metering_hpacker;
|
|
|
|
|
|
|
|
Gtk::VBox metering_vbox;
|
|
|
|
Gtk::HBox metering_hbox;
|
|
|
|
Gtk::Fixed upper_metering_box;
|
|
|
|
Gtk::Fixed lower_metering_box;
|
|
|
|
Gtk::Fixed meter_base;
|
|
|
|
Gtk::Frame meter_frame;
|
|
|
|
|
|
|
|
list<MeterBridgeStrip*> meters;
|
|
|
|
|
|
|
|
bool metering;
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::connection metering_connection;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void update ();
|
|
|
|
|
|
|
|
void add_route (ARDOUR::Route*);
|
|
|
|
void remove_route (ARDOUR::Route*);
|
|
|
|
void session_gone(); /* overrides ArdourDialog::session_gone() */
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_meter_bridge_h__ (*/
|