VCV Rack API v2
Loading...
Searching...
No Matches
SvgPanel.hpp
Go to the documentation of this file.
1#pragma once
2#include <app/common.hpp>
6#include <settings.hpp>
7
8
9namespace rack {
10namespace app {
11
12
14 void draw(const DrawArgs& args) override;
15};
16
17
22 std::shared_ptr<window::Svg> svg;
23
25 void step() override;
26 void setBackground(std::shared_ptr<window::Svg> svg);
27};
28
29
31
32
34 std::shared_ptr<window::Svg> lightSvg;
35 std::shared_ptr<window::Svg> darkSvg;
36
37 void setBackground(std::shared_ptr<window::Svg> lightSvg, std::shared_ptr<window::Svg> darkSvg) {
38 this->lightSvg = lightSvg;
39 this->darkSvg = darkSvg;
41 }
42
47};
48
49
50} // namespace app
51} // namespace rack
#define DEPRECATED
Attribute for deprecated functions and symbols.
Definition common.hpp:26
DEPRECATED typedef SvgPanel SVGPanel
Definition SvgPanel.hpp:30
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Definition SvgPanel.hpp:13
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
Definition SvgPanel.hpp:18
std::shared_ptr< window::Svg > svg
Definition SvgPanel.hpp:22
PanelBorder * panelBorder
Definition SvgPanel.hpp:21
widget::FramebufferWidget * fb
Definition SvgPanel.hpp:19
widget::SvgWidget * sw
Definition SvgPanel.hpp:20
void step() override
Advances the module by one frame.
void setBackground(std::shared_ptr< window::Svg > svg)
Definition SvgPanel.hpp:33
std::shared_ptr< window::Svg > lightSvg
Definition SvgPanel.hpp:34
std::shared_ptr< window::Svg > darkSvg
Definition SvgPanel.hpp:35
void setBackground(std::shared_ptr< window::Svg > lightSvg, std::shared_ptr< window::Svg > darkSvg)
Definition SvgPanel.hpp:37
void step() override
Advances the module by one frame.
Definition SvgPanel.hpp:43
Caches its children's draw() result to a framebuffer image.
Definition FramebufferWidget.hpp:12
Owns and draws a window::Svg.
Definition SvgWidget.hpp:10
A Widget that does not respond to events and does not pass events to children.
Definition TransparentWidget.hpp:10
Definition Widget.hpp:141
A node in the 2D scene graph.
Definition Widget.hpp:21