33#define STONEYVCV_COMPONENTLIBRARY_ROUNDKNOB_HPP_INCLUDED 1
35#if defined (STONEYVCV_BUILD_COMPONENTLIBRARY)
47#include <StoneyDSP/Core.hpp>
71namespace ComponentLibrary
101 DBG(
"Constructing StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget");
110 DBG(
"Destroying StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget");
120 return ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::step();
132 return ::rack::math::Vec(
138 virtual void draw(const ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::DrawArgs &
args)
override
141 const auto &size = this->
getSize();
154 ::std::shared_ptr<::rack::window::Font>
font =
APP->window->loadFont(
155 ::rack::asset::system(
"res/fonts/DejaVuSans.ttf"
163 ::nvgFontFaceId(
args.vg,
font->handle);
167 ::nvgTextAlign(
args.vg,
168 ::NVGalign::NVG_ALIGN_CENTER | ::NVGalign::NVG_ALIGN_BASELINE
176 this->getLabelText().c_str(),
181 ::nvgBeginPath(
args.vg);
220 ::std::vector<::rack::math::Vec>
ranges;
256 (size.x * 0.5F) +
range.x,
257 (size.y * 0.5F) +
range.y
266 ::nvgStrokeWidth(
args.vg, (5.0F / 6.0F));
268 ::nvgStroke(
args.vg);
269 ::nvgClosePath(
args.vg);
271 return ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::draw(
args);
322 : ::rack::app::SvgKnob(),
325 this->minAngle = (0.0F - (5.0F / 6.0F)) *
M_PI;
326 this->maxAngle = (5.0F / 6.0F) *
M_PI;
328 this->bg = new ::rack::widget::SvgWidget;
329 this->fb->addChildBelow(this->bg, this->
tw);
340 ::rack::widget::SvgWidget* bg =
NULL;
359 ::rack::window::Svg::load(
360 ::rack::asset::system(
361 "res/ComponentLibrary/RoundBlackKnob.svg"
367 ::rack::window::Svg::load(
368 ::rack::asset::system(
369 "res/ComponentLibrary/RoundBlackKnob_bg.svg"
399 ::rack::window::Svg::load(
400 ::rack::asset::system(
401 "res/ComponentLibrary/RoundSmallBlackKnob.svg"
407 ::rack::window::Svg::load(
408 ::rack::asset::system(
409 "res/ComponentLibrary/RoundSmallBlackKnob_bg.svg"
437 ::rack::window::Svg::load(
438 ::rack::asset::system(
439 "res/ComponentLibrary/RoundLargeBlackKnob.svg"
445 ::rack::window::Svg::load(
446 ::rack::asset::system(
447 "res/ComponentLibrary/RoundLargeBlackKnob_bg.svg"
475 ::rack::window::Svg::load(
476 ::rack::asset::system(
477 "res/ComponentLibrary/RoundBigBlackKnob.svg"
483 ::rack::window::Svg::load(
484 ::rack::asset::system(
485 "res/ComponentLibrary/RoundBigBlackKnob_bg.svg"
513 ::rack::window::Svg::load(
514 ::rack::asset::system(
515 "res/ComponentLibrary/RoundHugeBlackKnob.svg"
521 ::rack::window::Svg::load(
522 ::rack::asset::system(
523 "res/ComponentLibrary/RoundHugeBlackKnob_bg.svg"
573 this->minAngle = -0.75 *
M_PI;
574 this->maxAngle = 0.75 *
M_PI;
578 ::rack::asset::system(
579 "res/ComponentLibrary/Trimpot.svg"
585 ::rack::asset::system(
586 "res/ComponentLibrary/Trimpot_bg.svg"
StoneyDSP Modules for VCV Rack 2.
StoneyDSP Modules for VCV Rack 2.
#define DBG(msg,...)
Definition StoneyVCV.hpp:46
const ::NVGcolor bgPortLight
const ::NVGcolor bgPortDark
The StoneyDSP namespace.
Definition StoneyVCV.hpp:78
Definition RoundKnobWidget.hpp:467
RoundBigBlackKnob()
Definition RoundKnobWidget.hpp:471
virtual ~RoundBigBlackKnob() noexcept
Definition RoundKnobWidget.hpp:491
Definition RoundKnobWidget.hpp:351
RoundBlackKnob()
Definition RoundKnobWidget.hpp:354
virtual ~RoundBlackKnob() noexcept
Definition RoundKnobWidget.hpp:376
Definition RoundKnobWidget.hpp:543
RoundBlackSnapKnob()
Definition RoundKnobWidget.hpp:547
virtual ~RoundBlackSnapKnob() noexcept
Definition RoundKnobWidget.hpp:553
Definition RoundKnobWidget.hpp:505
RoundHugeBlackKnob()
Definition RoundKnobWidget.hpp:509
virtual ~RoundHugeBlackKnob() noexcept
Definition RoundKnobWidget.hpp:529
Definition RoundKnobWidget.hpp:320
RoundKnob()
Definition RoundKnobWidget.hpp:321
virtual ~RoundKnob() noexcept
Definition RoundKnobWidget.hpp:332
Definition RoundKnobWidget.hpp:429
RoundLargeBlackKnob()
Definition RoundKnobWidget.hpp:433
virtual ~RoundLargeBlackKnob() noexcept
Definition RoundKnobWidget.hpp:453
Definition RoundKnobWidget.hpp:391
virtual ~RoundSmallBlackKnob() noexcept
Definition RoundKnobWidget.hpp:415
RoundSmallBlackKnob()
Definition RoundKnobWidget.hpp:395
Definition RoundKnobWidget.hpp:567
Trimpot()
Definition RoundKnobWidget.hpp:570
virtual ~Trimpot() noexcept
Definition RoundKnobWidget.hpp:592
Definition StoneyVCV.hpp:125