summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_dspload_ui.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-09-24 23:20:15 +0200
committerRobin Gareus <robin@gareus.org>2018-09-25 00:13:08 +0200
commitf7b93ee7b947ea1932b3c2ede6af19abb04a2555 (patch)
treeb9dba5399ca31aa3e587fe9512927ce030a53b3e /gtk2_ardour/plugin_dspload_ui.h
parent4bdf0dad20e27088b14b1bed9cd1f5c369dd876b (diff)
Separate Plugin DSP load UI implementation
Diffstat (limited to 'gtk2_ardour/plugin_dspload_ui.h')
-rw-r--r--gtk2_ardour/plugin_dspload_ui.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_dspload_ui.h b/gtk2_ardour/plugin_dspload_ui.h
new file mode 100644
index 0000000000..a78b55f2bd
--- /dev/null
+++ b/gtk2_ardour/plugin_dspload_ui.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2018 Robin Gareus <robin@gareus.org>
+ *
+ * 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 _gtkardour_plugin_dspload_ui_h_
+#define _gtkardour_plugin_dspload_ui_h_
+
+#include <gtkmm/widget.h>
+#include <gtkmm/table.h>
+#include <gtkmm/label.h>
+#include <gtkmm/drawingarea.h>
+#include <gtkmm/separator.h>
+
+#include "widgets/ardour_button.h"
+
+#include "ardour/plugin_insert.h"
+
+class PluginLoadStatsGui : public Gtk::Table
+{
+public:
+ PluginLoadStatsGui (boost::shared_ptr<ARDOUR::PluginInsert>);
+
+ void start_updating ();
+ void stop_updating ();
+
+private:
+ void update_cpu_label ();
+ bool draw_bar (GdkEventExpose*);
+ void clear_stats () {
+ _insert->clear_stats ();
+ }
+
+ boost::shared_ptr<ARDOUR::PluginInsert> _insert;
+ sigc::connection update_cpu_label_connection;
+
+ Gtk::Label _lbl_min;
+ Gtk::Label _lbl_max;
+ Gtk::Label _lbl_avg;
+ Gtk::Label _lbl_dev;
+
+ ArdourWidgets::ArdourButton _reset_button;
+ Gtk::DrawingArea _darea;
+
+ uint64_t _min, _max;
+ double _avg, _dev;
+ bool _valid;
+};
+
+#endif