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

#include <RoundKnobWidget.hpp>

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

Public Types

using DrawArgs = ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::DrawArgs
 
- Public Types inherited from StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget
enum  Type { KNOB , SLIDER , BUTTON , SWITCH }
 
using DrawArgs = ::StoneyDSP::StoneyVCV::ComponentLibrary::TransparentWidget::DrawArgs
 
- Public Types inherited from StoneyDSP::StoneyVCV::ComponentLibrary::TransparentWidget
using DrawArgs = ::StoneyDSP::StoneyVCV::ComponentLibrary::Widget::DrawArgs
 
- Public Types inherited from StoneyDSP::StoneyVCV::ComponentLibrary::Widget
using DrawArgs = ::rack::widget::Widget::DrawArgs
 

Public Member Functions

 ThemedRoundKnobPanelWidget ()
 
virtual ~ThemedRoundKnobPanelWidget () noexcept
 
virtual void step () override
 Advances the ThemedParamPanelWidget by one frame.
 
float radiansToDegrees (const float &radians)
 
::rack::math::Vec radiusToXY (const float &radius, float angle, float rotation=0.0F)
 
virtual void draw (const ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::DrawArgs &args) override
 Renders the ThemedParamPanelWidget to the NanoVG context.
 
virtual void setMinAngle (const float &newMinAngle)
 
virtual const floatgetMinAngle () const noexcept
 
virtual void setMaxAngle (const float &newMaxAngle)
 
virtual const floatgetMaxAngle () const noexcept
 
- Public Member Functions inherited from StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget
 ThemedParamPanelWidget ()
 Constructs a new ThemedParamPanelWidget object.
 
virtual ~ThemedParamPanelWidget () noexcept
 Destroys the ThemedParamPanelWidget object.
 
virtual const boolgetPrefersDarkPanels () const noexcept
 
virtual void setFontSize (const float &newFontSize) noexcept
 
virtual const floatgetFontSize () const noexcept
 
virtual void setLeading (const float &newLeading) noexcept
 
virtual const floatgetLeading () const noexcept
 
virtual void setLabelText (const ::std::string &newLabelText) noexcept
 
virtual const ::std::string & getLabelText () const noexcept
 
virtual void setIsBipolar (const bool &newIsBipolar)
 
virtual const boolgetIsBipolar () const noexcept
 
- Public Member Functions inherited from StoneyDSP::StoneyVCV::ComponentLibrary::TransparentWidget
 TransparentWidget ()
 
 TransparentWidget (::rack::math::Rect newBox)
 
virtual ~TransparentWidget () noexcept
 
- 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 onPixelRatioChange (const PixelRatioChangeEvent &e)
 Called after the App->window->pixelRatio setting is changed.
 
const floatgetPixelRatio () const noexcept
 

Protected Attributes

float minAngle = (0.0F - (5.0F / 6.0F)) * M_PI
 
float maxAngle = (5.0F / 6.0F) * M_PI
 
- Protected Attributes inherited from StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget
float fontSize = 8.0F
 
float leading = 4.0F
 
::std::string labelText = ""
 
bool isBipolar
 
- 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

 ThemedRoundKnobPanelWidget (const ThemedRoundKnobPanelWidget &)=delete
 
ThemedRoundKnobPanelWidgetoperator= (const ThemedRoundKnobPanelWidget &)=delete
 
 ThemedRoundKnobPanelWidget (ThemedRoundKnobPanelWidget &&)=delete
 
ThemedRoundKnobPanelWidgetoperator= (ThemedRoundKnobPanelWidget &&)=delete
 

Additional Inherited Members

- Public Attributes inherited from StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget
::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::Type type = ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::Type::KNOB
 

Member Typedef Documentation

◆ DrawArgs

Constructor & Destructor Documentation

◆ ThemedRoundKnobPanelWidget() [1/3]

StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::ThemedRoundKnobPanelWidget ( )
inline

◆ ~ThemedRoundKnobPanelWidget()

virtual StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::~ThemedRoundKnobPanelWidget ( )
inlinevirtualnoexcept

◆ ThemedRoundKnobPanelWidget() [2/3]

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

◆ ThemedRoundKnobPanelWidget() [3/3]

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

Member Function Documentation

◆ step()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::step ( )
inlineoverridevirtual

Advances the ThemedParamPanelWidget by one frame.

Calls the superclass's step() method internally to recurse the children.

Reimplemented from StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget.

◆ radiansToDegrees()

float StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::radiansToDegrees ( const float radians)
inline

◆ radiusToXY()

::rack::math::Vec StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::radiusToXY ( const float radius,
float  angle,
float  rotation = 0.0F 
)
inline

◆ draw()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::draw ( const ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::DrawArgs args)
inlineoverridevirtual

Renders the ThemedParamPanelWidget to the NanoVG context.

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

Parameters
args

Use the 'ranges' iterable to draw a list of lines on the knob panel, indicating useful positions such as the knob's minimum and maximum positions, the default position when double-clicked, the mid-point for bi-polar knobs, and snap points, if any.

TODO: This widget should read the values - specified in radians - carried by the 'ranges' vector member. It purposely makes no attempts at creating equidistant spaces between given 'ranges', allowing for any arbitrary position(s) to be marked out on the knob panel. If some spacing scheme is required, calculate that on the outside after instanstating this class, and pass the results as an iterable to a setRanges() method - be aware that the method re-allocates if your number of ranges is greater than the default, or previously

  • specified, number of ranges, since the container type is dynamic.

Reimplemented from StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget.

◆ setMinAngle()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::setMinAngle ( const float newMinAngle)
inlinevirtual

◆ getMinAngle()

virtual const float & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::getMinAngle ( ) const
inlinevirtualnoexcept

◆ setMaxAngle()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::setMaxAngle ( const float newMaxAngle)
inlinevirtual

◆ getMaxAngle()

virtual const float & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::getMaxAngle ( ) const
inlinevirtualnoexcept

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ minAngle

float StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::minAngle = (0.0F - (5.0F / 6.0F)) * M_PI
protected

◆ maxAngle

float StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget::maxAngle = (5.0F / 6.0F) * M_PI
protected

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