From 11bbce74479994e8ee9420112f80a01eb2944f28 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 15 Sep 2016 19:08:08 +0200 Subject: Added new inline display for showing load progress. --- plugin/drumgizmo_plugin.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'plugin/drumgizmo_plugin.h') 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 #include +#include +#include + class DrumGizmoPlugin #ifdef LV2 : public PluginLV2 @@ -94,6 +97,14 @@ public: const std::vector& output_samples, size_t count) override; + // + // Inline GUI + // + bool hasInlineGUI() override; + void onInlineRedraw(std::size_t width, + std::size_t max_height, + InlineDrawContext& context) override; + // // GUI // @@ -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 plugin_gui; std::shared_ptr drumgizmo; + std::uint32_t inlineDisplayBuffer[1024*1024]; }; -- cgit v1.2.3