StoneyVCV v2
StoneyDSP Modules for VCV Rack 2.
Loading...
Searching...
No Matches
StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget Struct Reference

#include <Widget.hpp>

Inheritance diagram for StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget:
[legend]
Collaboration diagram for StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget:
[legend]

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 floatgetPixelRatio () 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 floatpixelRatioPtr = NULL
 

Private Member Functions

 SvgWidget (const SvgWidget &)=delete
 
SvgWidgetoperator= (const SvgWidget &)=delete
 
 SvgWidget (SvgWidget &&)=delete
 
SvgWidgetoperator= (SvgWidget &&)=delete
 

Member Typedef Documentation

◆ DrawArgs

Constructor & Destructor Documentation

◆ SvgWidget() [1/4]

StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::SvgWidget ( )

◆ SvgWidget() [2/4]

StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::SvgWidget ( ::rack::math::Rect  newBox)

◆ ~SvgWidget()

virtual StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::~SvgWidget ( )
virtualnoexcept

◆ SvgWidget() [3/4]

StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::SvgWidget ( const SvgWidget )
privatedelete

◆ SvgWidget() [4/4]

StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::SvgWidget ( SvgWidget &&  )
privatedelete

Member Function Documentation

◆ wrap()

void StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::wrap ( )
noexcept

◆ setSvg()

void StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::setSvg ( ::std::shared_ptr<::rack::window::Svg >  newSvg)

◆ draw()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::draw ( const ::StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::DrawArgs args)
overridevirtual

Draws the Widget to the NanoVG context.

Calls the superclass's draw(args) to recurse to children.

Parameters
args

Reimplemented from StoneyDSP::StoneyVCV::ComponentLibrary::Widget.

◆ operator=() [1/2]

SvgWidget & StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::operator= ( const SvgWidget )
privatedelete

◆ operator=() [2/2]

SvgWidget & StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::operator= ( SvgWidget &&  )
privatedelete

Member Data Documentation

◆ svg

::std::shared_ptr<::rack::window::Svg> StoneyDSP::StoneyVCV::ComponentLibrary::SvgWidget::svg
protected

The documentation for this struct was generated from the following file: