![]() |
StoneyVCV v2
StoneyDSP Modules for VCV Rack 2.
|
#include <Widget.hpp>
Public Types | |
| using | DrawArgs = ::StoneyDSP::StoneyVCV::ComponentLibrary::Widget::DrawArgs |
Public Types inherited from StoneyDSP::StoneyVCV::ComponentLibrary::Widget | |
| using | DrawArgs = ::rack::widget::Widget::DrawArgs |
Public Member Functions | |
| SvgWidget () | |
| SvgWidget (::rack::math::Rect newBox) | |
| virtual | ~SvgWidget () noexcept |
| void | wrap () noexcept |
| void | setSvg (::std::shared_ptr<::rack::window::Svg > newSvg) |
| virtual void | draw (const ::StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::DrawArgs &args) override |
Draws the Widget to the NanoVG context. | |
Public Member Functions inherited from StoneyDSP::StoneyVCV::ComponentLibrary::Widget | |
| Widget () | |
Construct a new Widget object. | |
| Widget (::rack::math::Rect newBox) | |
Construct a new Widget object with its' position and size set using a rack::math::Rect. | |
| virtual | ~Widget () noexcept |
Destroys the Widget object. | |
| virtual void | step () override |
Advances the Widget by one frame. | |
| virtual void | onPixelRatioChange (const PixelRatioChangeEvent &e) |
Called after the App->window->pixelRatio setting is changed. | |
| const float & | getPixelRatio () const noexcept |
Protected Attributes | |
| ::std::shared_ptr<::rack::window::Svg > | svg |
Protected Attributes inherited from StoneyDSP::StoneyVCV::ComponentLibrary::Widget | |
| ::rack::math::Rect | box = ::rack::math::Rect(::rack::math::Vec(), ::rack::math::Vec(INFINITY, INFINITY)) |
Position relative to parent and size of Widget. | |
| ::rack::Widget * | parent = NULL |
Automatically set when Widget is added as a child to another Widget. | |
| ::std::list<::rack::Widget * > | children |
| bool | visible = true |
| Disables rendering but allow stepping. | |
| bool | requestedDelete = false |
If set to true, parent will delete Widget in the next step(). | |
| float | lastPixelRatio = { rack::contextGet() ->window->pixelRatio} |
| const float * | pixelRatioPtr = NULL |
Private Member Functions | |
| SvgWidget (const SvgWidget &)=delete | |
| SvgWidget & | operator= (const SvgWidget &)=delete |
| SvgWidget (SvgWidget &&)=delete | |
| SvgWidget & | operator= (SvgWidget &&)=delete |
| using StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::DrawArgs = ::StoneyDSP::StoneyVCV::ComponentLibrary::Widget::DrawArgs |
| StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::SvgWidget | ( | ) |
| StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::SvgWidget | ( | ::rack::math::Rect | newBox | ) |
|
virtualnoexcept |
|
privatedelete |
|
noexcept |
| void StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::setSvg | ( | ::std::shared_ptr<::rack::window::Svg > | newSvg | ) |
|
overridevirtual |
Draws the Widget to the NanoVG context.
Calls the superclass's draw(args) to recurse to children.
| args |
Reimplemented from StoneyDSP::StoneyVCV::ComponentLibrary::Widget.
|
privatedelete |
|
privatedelete |
|
protected |