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

The ThemedParamPanelWidget struct. More...

#include <ParamWidget.hpp>

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

Public Types

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

 ThemedParamPanelWidget ()
 Constructs a new ThemedParamPanelWidget object.
 
virtual ~ThemedParamPanelWidget () noexcept
 Destroys the ThemedParamPanelWidget object.
 
virtual void step () override
 Advances the ThemedParamPanelWidget by one frame.
 
virtual void draw (const ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::DrawArgs &args) override
 Renders the ThemedParamPanelWidget to the NanoVG context.
 
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
 

Public Attributes

::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::Type type = ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::Type::KNOB
 

Protected Attributes

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

 ThemedParamPanelWidget (const ThemedParamPanelWidget &)=delete
 
ThemedParamPanelWidgetoperator= (const ThemedParamPanelWidget &)=delete
 
 ThemedParamPanelWidget (ThemedParamPanelWidget &&)=delete
 
ThemedParamPanelWidgetoperator= (ThemedParamPanelWidget &&)=delete
 

Private Attributes

const boolprefersDarkPanelsPtr = NULL
 {&::rack::settings::preferDarkPanels}
 

Detailed Description

The ThemedParamPanelWidget struct.

Provides a themed panel background which can fit around instances of the ThemedParamWidget struct on a Module's panel.

Carries a labelText member for writing a text label corresponding to the port's purpose.

Member Typedef Documentation

◆ DrawArgs

Member Enumeration Documentation

◆ Type

Constructor & Destructor Documentation

◆ ThemedParamPanelWidget() [1/3]

StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::ThemedParamPanelWidget ( )

Constructs a new ThemedParamPanelWidget object.

◆ ~ThemedParamPanelWidget()

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

Destroys the ThemedParamPanelWidget object.

◆ ThemedParamPanelWidget() [2/3]

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

◆ ThemedParamPanelWidget() [3/3]

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

Member Function Documentation

◆ step()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::step ( )
overridevirtual

Advances the ThemedParamPanelWidget by one frame.

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

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

Reimplemented in StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget.

◆ draw()

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

Renders the ThemedParamPanelWidget to the NanoVG context.

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

Parameters
args

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

Reimplemented in StoneyDSP::StoneyVCV::ComponentLibrary::ThemedRoundKnobPanelWidget.

◆ getPrefersDarkPanels()

virtual const bool & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::getPrefersDarkPanels ( ) const
virtualnoexcept

◆ setFontSize()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::setFontSize ( const float newFontSize)
virtualnoexcept

◆ getFontSize()

virtual const float & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::getFontSize ( ) const
virtualnoexcept

◆ setLeading()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::setLeading ( const float newLeading)
virtualnoexcept

◆ getLeading()

virtual const float & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::getLeading ( ) const
virtualnoexcept

◆ setLabelText()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::setLabelText ( const ::std::string &  newLabelText)
virtualnoexcept

◆ getLabelText()

virtual const ::std::string & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::getLabelText ( ) const
virtualnoexcept

◆ setIsBipolar()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::setIsBipolar ( const bool newIsBipolar)
virtual

◆ getIsBipolar()

virtual const bool & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::getIsBipolar ( ) const
virtualnoexcept

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ type

◆ fontSize

float StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::fontSize = 8.0F
protected

◆ leading

float StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::leading = 4.0F
protected

◆ labelText

::std::string StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::labelText = ""
protected

◆ isBipolar

bool StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::isBipolar
protected

◆ prefersDarkPanelsPtr

const bool* StoneyDSP::StoneyVCV::ComponentLibrary::ThemedParamPanelWidget::prefersDarkPanelsPtr = NULL
private

{&::rack::settings::preferDarkPanels}


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