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

The ThemedPortPanelWidget struct. More...

#include <PortWidget.hpp>

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

Public Types

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

 ThemedPortPanelWidget ()
 Constructs a new ThemedPortPanelWidget object.
 
virtual ~ThemedPortPanelWidget () noexcept
 Destroys the ThemedPortPanelWidget object.
 
virtual void step () override
 Advances the ThemedPortPanelWidget by one frame.
 
virtual void draw (const ::StoneyDSP::StoneyVCV::ComponentLibrary::ThemedPortPanelWidget::DrawArgs &args) override
 Renders the ThemedPortPanelWidget to the NanoVG context.
 
virtual const boolgetPrefersDarkPanels () const noexcept
 
virtual void setLabelText (const ::std::string &newLabelText) noexcept
 
virtual const ::std::string & getLabelText () const noexcept
 
virtual void setIsOutput (const bool &newIsOutput) noexcept
 
virtual const boolgetIsOutput () 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

::std::string labelText
 
bool isOutput
 Set whether the parent is an input or an output port.
 
- 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

 ThemedPortPanelWidget (const ThemedPortPanelWidget &)=delete
 
ThemedPortPanelWidgetoperator= (const ThemedPortPanelWidget &)=delete
 
 ThemedPortPanelWidget (ThemedPortPanelWidget &&)=delete
 
ThemedPortPanelWidgetoperator= (ThemedPortPanelWidget &&)=delete
 

Private Attributes

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

Detailed Description

The ThemedPortPanelWidget struct.

Provides a themed panel background which can fit around instances of the ThemedPortWidget 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

Constructor & Destructor Documentation

◆ ThemedPortPanelWidget() [1/3]

StoneyDSP::StoneyVCV::ComponentLibrary::ThemedPortPanelWidget::ThemedPortPanelWidget ( )

Constructs a new ThemedPortPanelWidget object.

◆ ~ThemedPortPanelWidget()

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

Destroys the ThemedPortPanelWidget object.

◆ ThemedPortPanelWidget() [2/3]

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

◆ ThemedPortPanelWidget() [3/3]

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

Member Function Documentation

◆ step()

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

Advances the ThemedPortPanelWidget by one frame.

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

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

◆ draw()

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

Renders the ThemedPortPanelWidget to the NanoVG context.

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

Parameters
args

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

◆ getPrefersDarkPanels()

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

◆ setLabelText()

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

◆ getLabelText()

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

◆ setIsOutput()

virtual void StoneyDSP::StoneyVCV::ComponentLibrary::ThemedPortPanelWidget::setIsOutput ( const bool newIsOutput)
virtualnoexcept

◆ getIsOutput()

virtual const bool & StoneyDSP::StoneyVCV::ComponentLibrary::ThemedPortPanelWidget::getIsOutput ( ) const
virtualnoexcept

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ labelText

::std::string StoneyDSP::StoneyVCV::ComponentLibrary::ThemedPortPanelWidget::labelText
protected

◆ isOutput

bool StoneyDSP::StoneyVCV::ComponentLibrary::ThemedPortPanelWidget::isOutput
protected

Set whether the parent is an input or an output port.

◆ prefersDarkPanelsPtr

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

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


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