VCV Rack API v2
rack::componentlibrary::VCVLightBezel< TLightBase > Struct Template Reference

#include <componentlibrary.hpp>

Inheritance diagram for rack::componentlibrary::VCVLightBezel< TLightBase >:
Collaboration diagram for rack::componentlibrary::VCVLightBezel< TLightBase >:

Public Member Functions

 VCVLightBezel ()
app::ModuleLightWidgetgetLight ()
- Public Member Functions inherited from rack::componentlibrary::VCVBezel
 VCVBezel ()
- Public Member Functions inherited from rack::app::SvgSwitch
 SvgSwitch ()
 ~SvgSwitch ()
void addFrame (std::shared_ptr< window::Svg > svg)
 Adds an SVG file to represent the next switch position. More...
void onDragStart (const DragStartEvent &e) override
void onDragEnd (const DragEndEvent &e) override
void onChange (const ChangeEvent &e) override
- Public Member Functions inherited from rack::app::Switch
 Switch ()
 ~Switch ()
void initParamQuantity () override
 Configures ParamQuantity properties based on the type of ParamWidget. More...
void step () override
 Advances the module by one frame. More...
void onDoubleClick (const DoubleClickEvent &e) override
void onDragStart (const DragStartEvent &e) override
void onDragEnd (const DragEndEvent &e) override
- Public Member Functions inherited from rack::app::ParamWidget
 ParamWidget ()
 ~ParamWidget ()
virtual void initParamQuantity ()
 Configures ParamQuantity properties based on the type of ParamWidget. More...
engine::ParamQuantitygetParamQuantity ()
void createTooltip ()
void destroyTooltip ()
void step () override
 Advances the module by one frame. More...
void draw (const DrawArgs &args) override
 Draws the widget to the NanoVG context. More...
void onButton (const ButtonEvent &e) override
void onDoubleClick (const DoubleClickEvent &e) override
void onEnter (const EnterEvent &e) override
void onLeave (const LeaveEvent &e) override
void createContextMenu ()
virtual void appendContextMenu (ui::Menu *menu)
 Override to add custom menu items at the bottom of the parameter context menu. More...
void resetAction ()
- Public Member Functions inherited from rack::widget::OpaqueWidget
void onHover (const HoverEvent &e) override
void onButton (const ButtonEvent &e) override
void onHoverKey (const HoverKeyEvent &e) override
void onHoverText (const HoverTextEvent &e) override
void onHoverScroll (const HoverScrollEvent &e) override
void onDragHover (const DragHoverEvent &e) override
void onPathDrop (const PathDropEvent &e) override
- Public Member Functions inherited from rack::widget::Widget
virtual ~Widget ()
math::Rect getBox ()
void setBox (math::Rect box)
math::Vec getPosition ()
void setPosition (math::Vec pos)
math::Vec getSize ()
void setSize (math::Vec size)
widget::WidgetgetParent ()
bool isVisible ()
void setVisible (bool visible)
void show ()
void hide ()
void requestDelete ()
virtual math::Rect getChildrenBoundingBox ()
 Returns the smallest rectangle containing this widget's children (visible and invisible) in its local coordinates. More...
virtual math::Rect getVisibleChildrenBoundingBox ()
bool isDescendantOf (Widget *ancestor)
 Returns whether ancestor is a parent or distant parent of this widget. More...
virtual math::Vec getRelativeOffset (math::Vec v, Widget *ancestor)
 Returns v (given in local coordinates) transformed into the coordinate system of ancestor. More...
math::Vec getAbsoluteOffset (math::Vec v)
 Returns v transformed into world/root/global/absolute coordinates. More...
virtual float getRelativeZoom (Widget *ancestor)
 Returns the zoom level in the coordinate system of ancestor. More...
float getAbsoluteZoom ()
virtual math::Rect getViewport (math::Rect r)
 Returns a subset of the given Rect bounded by the box of this widget and all ancestors. More...
template<class T >
T * getAncestorOfType ()
template<class T >
T * getFirstDescendantOfType ()
bool hasChild (Widget *child)
 Checks if the given widget is a child of this widget. More...
void addChild (Widget *child)
 Adds widget to the top of the children. More...
void addChildBottom (Widget *child)
 Adds widget to the bottom of the children. More...
void addChildBelow (Widget *child, Widget *sibling)
 Adds widget directly below another widget. More...
void addChildAbove (Widget *child, Widget *sibling)
void removeChild (Widget *child)
 Removes widget from list of children if it exists. More...
void clearChildren ()
 Removes and deletes all children. More...
virtual void step ()
 Advances the module by one frame. More...
virtual void draw (const DrawArgs &args)
 Draws the widget to the NanoVG context. More...
virtual DEPRECATED void draw (NVGcontext *vg)
 Override draw(const DrawArgs &args) instead. More...
virtual void drawLayer (const DrawArgs &args, int layer)
 Draw additional layers. More...
void drawChild (Widget *child, const DrawArgs &args, int layer=0)
 Draws a particular child. More...
template<typename TMethod , class TEvent >
void recurseEvent (TMethod f, const TEvent &e)
 Recurses an event to all visible Widgets. More...
template<typename TMethod , class TEvent >
void recursePositionEvent (TMethod f, const TEvent &e)
 Recurses an event to all visible Widgets until it is consumed. More...
virtual void onHover (const HoverEvent &e)
virtual void onButton (const ButtonEvent &e)
virtual void onDoubleClick (const DoubleClickEvent &e)
virtual void onHoverKey (const HoverKeyEvent &e)
virtual void onHoverText (const HoverTextEvent &e)
virtual void onHoverScroll (const HoverScrollEvent &e)
virtual void onEnter (const EnterEvent &e)
virtual void onLeave (const LeaveEvent &e)
virtual void onSelect (const SelectEvent &e)
virtual void onDeselect (const DeselectEvent &e)
virtual void onSelectKey (const SelectKeyEvent &e)
virtual void onSelectText (const SelectTextEvent &e)
virtual void onDragStart (const DragStartEvent &e)
virtual void onDragEnd (const DragEndEvent &e)
virtual void onDragMove (const DragMoveEvent &e)
virtual void onDragHover (const DragHoverEvent &e)
virtual void onDragEnter (const DragEnterEvent &e)
virtual void onDragLeave (const DragLeaveEvent &e)
virtual void onDragDrop (const DragDropEvent &e)
virtual void onPathDrop (const PathDropEvent &e)
virtual void onAction (const ActionEvent &e)
virtual void onChange (const ChangeEvent &e)
virtual void onDirty (const DirtyEvent &e)
virtual void onReposition (const RepositionEvent &e)
virtual void onResize (const ResizeEvent &e)
virtual void onAdd (const AddEvent &e)
virtual void onRemove (const RemoveEvent &e)
virtual void onShow (const ShowEvent &e)
virtual void onHide (const HideEvent &e)
virtual void onContextCreate (const ContextCreateEvent &e)
virtual void onContextDestroy (const ContextDestroyEvent &e)
- Public Member Functions inherited from rack::WeakBase
 ~WeakBase ()
size_t getWeakCount ()

Public Attributes

- Public Attributes inherited from rack::app::SvgSwitch
Internal * internal
std::vector< std::shared_ptr< window::Svg > > frames
bool latch = false
 Use frames 0 and 1 when the mouse is pressed and released, instead of using the param value as the frame index. More...
- Public Attributes inherited from rack::app::Switch
Internal * internal
bool momentary = false
 Instead of incrementing values on each click, sets maxValue on press and minValue on release. More...
- Public Attributes inherited from rack::app::ParamWidget
Internal * internal
engine::Modulemodule = NULL
int paramId = -1
- Public Attributes inherited from rack::widget::Widget
math::Rect box = math::Rect(math::Vec(), math::Vec(INFINITY, INFINITY))
 Position relative to parent and size of widget. More...
Widgetparent = NULL
 Automatically set when Widget is added as a child to another Widget. More...
std::list< Widget * > children
bool visible = true
 Disables rendering but allow stepping. More...
bool requestedDelete = false
 If set to true, parent will delete Widget in the next step(). More...
- Public Attributes inherited from rack::WeakBase
WeakHandleweakHandle = nullptr

Additional Inherited Members

- Public Types inherited from rack::widget::Widget
using BaseEvent = widget::BaseEvent

Constructor & Destructor Documentation

◆ VCVLightBezel()

template<typename TLightBase = WhiteLight>
rack::componentlibrary::VCVLightBezel< TLightBase >::VCVLightBezel ( )

Member Function Documentation

◆ getLight()

template<typename TLightBase = WhiteLight>
app::ModuleLightWidget * rack::componentlibrary::VCVLightBezel< TLightBase >::getLight ( )

Member Data Documentation

◆ light

template<typename TLightBase = WhiteLight>
app::ModuleLightWidget* rack::componentlibrary::VCVLightBezel< TLightBase >::light

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