summaryrefslogtreecommitdiff
path: root/plugin/drumgizmo_plugin.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-09-15 19:08:08 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-09-15 19:08:08 +0200
commit11bbce74479994e8ee9420112f80a01eb2944f28 (patch)
tree5b4139e83f2b43f05db8872c118e7e5557fedcda /plugin/drumgizmo_plugin.h
parentf9831fe56a5d0543ef059b00f5885ccdb2f3c676 (diff)
Added new inline display for showing load progress.
Diffstat (limited to 'plugin/drumgizmo_plugin.h')
-rw-r--r--plugin/drumgizmo_plugin.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugin/drumgizmo_plugin.h b/plugin/drumgizmo_plugin.h
index 2e3da26..de4f4af 100644
--- a/plugin/drumgizmo_plugin.h
+++ b/plugin/drumgizmo_plugin.h
@@ -50,6 +50,9 @@
#include <audiooutputengine.h>
#include <plugingui.h>
+#include <texturedbox.h>
+#include <imagecache.h>
+
class DrumGizmoPlugin
#ifdef LV2
: public PluginLV2
@@ -95,6 +98,14 @@ public:
size_t count) override;
//
+ // Inline GUI
+ //
+ bool hasInlineGUI() override;
+ void onInlineRedraw(std::size_t width,
+ std::size_t max_height,
+ InlineDrawContext& context) override;
+
+ //
// GUI
//
bool hasGUI() override;
@@ -174,7 +185,30 @@ private:
Settings settings;
ConfigStringIO config_string_io;
+ SettingsGetter settingsGetter{settings};
+
+ GUI::ImageCache imageCache;
+ GUI::TexturedBox box{imageCache, ":progress.png",
+ 0, 0, // atlas offset (x, y)
+ 6, 1, 6, // dx1, dx2, dx3
+ 11, 0, 0}; // dy1, dy2, dy3
+
+ GUI::TexturedBox bar_red{imageCache, ":progress.png",
+ 13, 0, // atlas offset (x, y)
+ 2, 1, 2, // dx1, dx2, dx3
+ 11, 0, 0}; // dy1, dy2, dy3
+
+ GUI::TexturedBox bar_green{imageCache, ":progress.png",
+ 18, 0, // atlas offset (x, y)
+ 2, 1, 2, // dx1, dx2, dx3
+ 11, 0, 0}; // dy1, dy2, dy3
+
+ GUI::TexturedBox bar_blue{imageCache, ":progress.png",
+ 23, 0, // atlas offset (x, y)
+ 2, 1, 2, // dx1, dx2, dx3
+ 11, 0, 0}; // dy1, dy2, dy3
std::shared_ptr<GUI::PluginGUI> plugin_gui;
std::shared_ptr<DrumGizmo> drumgizmo;
+ std::uint32_t inlineDisplayBuffer[1024*1024];
};