StoneyVCV v2
StoneyDSP Modules for VCV Rack 2.
Loading...
Searching...
No Matches
HP1.hpp
Go to the documentation of this file.
1
31#pragma once
32
33#define STONEYVCV_HP1_HPP_INCLUDED 1
34
35#if defined (STONEYVCV_BUILD_HP1)
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 HP1
78{
83//==============================================================================
84
89struct HP1Module 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 HP1Widget final : virtual ::rack::widget::Widget
148{
149 //==========================================================================
150
151public:
152
153 using DrawArgs = ::rack::widget::Widget::DrawArgs;
154
155 //==========================================================================
156
162
168
169 //==========================================================================
170
175 virtual void step() override;
176
184 virtual void draw(const ::StoneyDSP::StoneyVCV::HP1::HP1Widget::DrawArgs& args) override;
185
186 //==========================================================================
187
188private:
189
190 //==========================================================================
191
196 ::rack::widget::FramebufferWidget *hp1WidgetFrameBuffer;
197
202 ::rack::app::PanelBorder *panelBorder;
203
204 //==========================================================================
205
208};
209
210//==============================================================================
211
216struct HP1ModuleWidget final : virtual ::rack::app::ModuleWidget
217{
218
219 //==========================================================================
220
221public:
222
223 //==========================================================================
224
232
238
239 //==========================================================================
240
245 virtual void step() override;
246
247 //==========================================================================
248
249private:
250
251 //==========================================================================
252
256 const ::rack::math::Vec size;
257
261 ::rack::app::ThemedSvgPanel *panel;
262
267 ::StoneyDSP::StoneyVCV::HP1::HP1Widget *hp1Widget;
268
273 ::rack::widget::FramebufferWidget *hp1ModuleWidgetFrameBuffer;
274
275 //==========================================================================
276
281 const ::std::array<::rack::math::Vec, 2> screwsPositions;
282
287 const ::std::array<::rack::componentlibrary::ThemedScrew *, 2> screws;
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 HP1
326
327//==============================================================================
328
330} // namespace StoneyVCV
331
332//==============================================================================
333
335} // namespace StoneyDSP
336
337//==============================================================================
338
339#endif // defined (STONEYVCV_BUILD_HP1)
340
341//==============================================================================
StoneyDSP Modules for VCV Rack 2.
StoneyDSP Modules for VCV Rack 2.
::rack::plugin::Model * createModelHP1(::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 HP1ModuleWidget struct.
Definition HP1.hpp:217
HP1ModuleWidget(::StoneyDSP::StoneyVCV::HP1::HP1Module *module)
Construct a new HP1ModuleWidget object.
virtual ~HP1ModuleWidget() noexcept
Destroys the HP1ModuleWidget object.
The HP1Module struct.
Definition HP1.hpp:90
@ NUM_INPUTS
Number of Input ports.
Definition HP1.hpp:104
HP1Module()
Construct a new HP1Module object.
IdxOutputs
Definition HP1.hpp:107
@ NUM_OUTPUTS
Number of Output ports.
Definition HP1.hpp:109
virtual ~HP1Module() noexcept
Destroys the HP1Module object.
@ NUM_PARAMS
Number of Parameters.
Definition HP1.hpp:99
@ NUM_LIGHTS
Number of Lights.
Definition HP1.hpp:114
The HP1Widget struct.
Definition HP1.hpp:148
::rack::widget::Widget::DrawArgs DrawArgs
Definition HP1.hpp:153
HP1Widget()
Construct a new HP1Widget object.
virtual ~HP1Widget() noexcept
Destroys the HP1Widget object.