StoneyVCV v2
StoneyDSP Modules for VCV Rack 2.
Loading...
Searching...
No Matches
HP4.hpp
Go to the documentation of this file.
1
31#pragma once
32
33#define STONEYVCV_HP4_HPP_INCLUDED 1
34
35#if defined (STONEYVCV_BUILD_HP4)
36
37//==============================================================================
38
39#include <StoneyVCV.hpp>
41#include <StoneyVCV/plugin.hpp>
42
43//==============================================================================
44
45#include <rack.hpp>
46#include <StoneyDSP/Core.hpp>
47
48//==============================================================================
49
50#include <array>
51
52//==============================================================================
53
54namespace StoneyDSP
55{
60//==============================================================================
61
62namespace StoneyVCV
63{
68//==============================================================================
69
77namespace HP4
78{
83//==============================================================================
84
89struct HP4Module final : virtual ::rack::engine::Module
90{
91 //==========================================================================
92
93public:
94
95 //==========================================================================
96
101
106
111
116
117 //==========================================================================
118
124
130
131 //==========================================================================
132
133private:
134
135 //==========================================================================
136
139};
140
141//==============================================================================
142
147struct HP4Widget final : virtual ::rack::widget::Widget
148{
149
150 //==========================================================================
151
152public:
153
154 //==========================================================================
155
156 using DrawArgs = ::rack::widget::Widget::DrawArgs;
157
158 //==========================================================================
159
165
171
176 virtual void step() override;
177
185 virtual void draw(const ::StoneyDSP::StoneyVCV::HP4::HP4Widget::DrawArgs& args) override;
186
187 //==========================================================================
188
189private:
190
191 //==========================================================================
192
197 ::rack::widget::FramebufferWidget* hp4WidgetFrameBuffer;
198
203 ::rack::app::PanelBorder* panelBorder;
204
205 //==========================================================================
206
209};
210
211//==============================================================================
212
217struct HP4ModuleWidget final : virtual ::rack::app::ModuleWidget
218{
219
220 //==========================================================================
221
222public:
223
224 //==========================================================================
225
231
237
238 //==========================================================================
239
244 virtual void step() override;
245
246 //==========================================================================
247
248private:
249
250 //==========================================================================
251
255 const ::rack::math::Vec size;
256
260 ::rack::app::ThemedSvgPanel *panel;
261
266 ::StoneyDSP::StoneyVCV::HP4::HP4Widget *hp4Widget;
267
272 ::rack::widget::FramebufferWidget *hp4ModuleWidgetFrameBuffer;
273
274 //==========================================================================
275
280 const ::std::array<::rack::math::Vec, 4> screwsPositions;
281
286 const ::std::array<::rack::componentlibrary::ThemedScrew *, 4> screws;
287
288
289 //==========================================================================
290
295 bool lastPrefersDarkPanels;
296
297 //==========================================================================
298
301};
302
303//==============================================================================
304
316 ::std::string name = "",
317 ::std::string description = "",
318 ::std::string manualUrl = "",
319 bool hidden = true
320) noexcept(false);
321
322//==============================================================================
323
325} // namespace HP4
326
327//==============================================================================
328
330} // namespace StoneyVCV
331
332//==============================================================================
333
335} // namespace StoneyDSP
336
337//==============================================================================
338
339#endif // defined (STONEYVCV_BUILD_HP4)
340
341//==============================================================================
StoneyDSP Modules for VCV Rack 2.
StoneyDSP Modules for VCV Rack 2.
::rack::plugin::Model * createModelHP4(::std::string name="", ::std::string description="", ::std::string manualUrl="", bool hidden=true) noexcept(false)
The StoneyDSP namespace.
Definition StoneyVCV.hpp:78
StoneyDSP Modules for VCV Rack 2.
Definition StoneyVCV.hpp:125
The HP4ModuleWidget struct.
Definition HP4.hpp:218
HP4ModuleWidget(::StoneyDSP::StoneyVCV::HP4::HP4Module *module)
Construct a new HP4ModuleWidget object.
virtual ~HP4ModuleWidget() noexcept
Destroys the HP4ModuleWidget object.
The HP4Module struct.
Definition HP4.hpp:90
@ NUM_PARAMS
Number of Parameters.
Definition HP4.hpp:99
virtual ~HP4Module() noexcept
Destroys the HP4Module object.
@ NUM_INPUTS
Number of Input ports.
Definition HP4.hpp:104
IdxOutputs
Definition HP4.hpp:107
@ NUM_OUTPUTS
Number of Output ports.
Definition HP4.hpp:109
@ NUM_LIGHTS
Number of Lights.
Definition HP4.hpp:114
HP4Module()
Construct a new HP4Module object.
The HP2Widget struct.
Definition HP4.hpp:148
::rack::widget::Widget::DrawArgs DrawArgs
Definition HP4.hpp:156
HP4Widget()
Construct a new HP4Widget object.
virtual ~HP4Widget() noexcept
Destroys the HP4Widget object.