summaryrefslogtreecommitdiff
path: root/plugins/ZamTube/ZamTubeUI.hpp
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2014-04-11 18:05:42 +1000
committerDamien Zammit <damien@zamaudio.com>2014-04-11 18:05:42 +1000
commit07feedb66d79dc5f0051e8383d850d8a725e3870 (patch)
treefeacef61f0fd1f056454797708f86de0d4bb5773 /plugins/ZamTube/ZamTubeUI.hpp
parente3ace76151c24b6bc0e0d39df51288c3b9e7c28b (diff)
Added ZamTube DSP
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Diffstat (limited to 'plugins/ZamTube/ZamTubeUI.hpp')
-rw-r--r--plugins/ZamTube/ZamTubeUI.hpp90
1 files changed, 90 insertions, 0 deletions
diff --git a/plugins/ZamTube/ZamTubeUI.hpp b/plugins/ZamTube/ZamTubeUI.hpp
new file mode 100644
index 0000000..5b17d74
--- /dev/null
+++ b/plugins/ZamTube/ZamTubeUI.hpp
@@ -0,0 +1,90 @@
+/*
+ * Wobble Juice Plugin
+ * Copyright (C) 2014 Andre Sklenar <andre.sklenar@gmail.com>, www.juicelab.cz
+ *
+ * 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 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.
+ *
+ * For a full copy of the GNU General Public License see the doc/GPL.txt file.
+ */
+
+#ifndef WOBBLEJUICEUI_HPP_INCLUDED
+#define WOBBLEJUICEUI_HPP_INCLUDED
+
+#include "DistrhoUI.hpp"
+
+#include "ImageAboutWindow.hpp"
+#include "ImageButton.hpp"
+#include "ImageKnob.hpp"
+#include "ImageSlider.hpp"
+
+#include "ZamTubeArtwork.hpp"
+#include "ZamTubePlugin.hpp"
+
+using DGL::Image;
+using DGL::ImageAboutWindow;
+using DGL::ImageButton;
+using DGL::ImageKnob;
+
+START_NAMESPACE_DISTRHO
+
+// -----------------------------------------------------------------------
+
+class ZamTubeUI : public UI,
+ public ImageButton::Callback,
+ public ImageKnob::Callback
+{
+public:
+ ZamTubeUI();
+ ~ZamTubeUI() override;
+
+protected:
+ // -------------------------------------------------------------------
+ // Information
+
+ unsigned int d_getWidth() const noexcept override
+ {
+ return ZamTubeArtwork::backgroundWidth;
+ }
+
+ unsigned int d_getHeight() const noexcept override
+ {
+ return ZamTubeArtwork::backgroundHeight;
+ }
+
+ // -------------------------------------------------------------------
+ // DSP Callbacks
+
+ void d_parameterChanged(uint32_t index, float value) ;
+ void d_programChanged(uint32_t index) ;
+
+ // -------------------------------------------------------------------
+ // Widget Callbacks
+
+ void imageButtonClicked(ImageButton* button, int) override;
+ void imageKnobDragStarted(ImageKnob* knob) override;
+ void imageKnobDragFinished(ImageKnob* knob) override;
+ void imageKnobValueChanged(ImageKnob* knob, float value) override;
+
+ void onDisplay() override;
+
+private:
+ Image fImgBackground;
+ ImageAboutWindow fAboutWindow;
+
+ ImageKnob* fKnobAttack;
+ ImageButton* fButtonAbout;
+};
+
+// -----------------------------------------------------------------------
+
+END_NAMESPACE_DISTRHO
+
+#endif // WOBBLEJUICEUI_HPP_INCLUDED