/*
- Copyright (C) 2012 Paul Davis
- Author: Robin Gareus
-
- 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.
-
-*/
+ * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2016 Paul Davis <paul@linuxaudiosystems.com>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#ifndef __ardour_meterbridge_h__
#define __ardour_meterbridge_h__
public ARDOUR::SessionHandlePtr,
public Gtkmm2ext::VisibilityTracker
{
- public:
+public:
static Meterbridge* instance();
~Meterbridge();
void show_window ();
bool hide_window (GdkEventAny *ev);
- private:
+private:
Meterbridge ();
static Meterbridge* _instance;
void session_going_away ();
void sync_order_keys ();
- void resync_order ();
+ void resync_order (PBD::PropertyChange what_changed = ARDOUR::Properties::order);
mutable Glib::Threads::Mutex _resync_mutex;
struct MeterBridgeStrip {
}
};
- struct MeterOrderRouteSorter {
+ struct MeterOrderRouteSorter
+ {
bool operator() (struct MeterBridgeStrip ma, struct MeterBridgeStrip mb) {
boost::shared_ptr<ARDOUR::Route> a = ma.s->route();
boost::shared_ptr<ARDOUR::Route> b = mb.s->route();
/* everything comes before b */
return true;
}
- return a->order_key () < b->order_key ();
+ return ARDOUR::Stripable::Sorter (true) (a, b);
}
};