VCV Rack API
v2
Loading...
Searching...
No Matches
SvgWidget.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
widget/Widget.hpp
>
3
4
5
namespace
rack
{
6
namespace
widget {
7
8
10
struct
SvgWidget
:
Widget
{
11
std::shared_ptr<window::Svg>
svg
;
12
13
SvgWidget
();
14
16
void
wrap
();
17
19
void
setSvg
(std::shared_ptr<window::Svg>
svg
);
20
DEPRECATED
void
setSVG
(std::shared_ptr<window::Svg>
svg
) {
21
setSvg
(
svg
);
22
}
23
24
void
draw
(
const
DrawArgs
& args)
override
;
25
};
26
27
28
DEPRECATED
typedef
SvgWidget
SVGWidget
;
29
30
31
}
// namespace widget
32
}
// namespace rack
Widget.hpp
DEPRECATED
#define DEPRECATED
Attribute for deprecated functions and symbols.
Definition
common.hpp:26
rack::widget::SVGWidget
DEPRECATED typedef SvgWidget SVGWidget
Definition
SvgWidget.hpp:28
rack
Root namespace for the Rack API.
Definition
AudioDisplay.hpp:9
rack::widget::SvgWidget
Owns and draws a window::Svg.
Definition
SvgWidget.hpp:10
rack::widget::SvgWidget::setSvg
void setSvg(std::shared_ptr< window::Svg > svg)
Sets and wraps the SVG.
rack::widget::SvgWidget::setSVG
DEPRECATED void setSVG(std::shared_ptr< window::Svg > svg)
Definition
SvgWidget.hpp:20
rack::widget::SvgWidget::SvgWidget
SvgWidget()
rack::widget::SvgWidget::wrap
void wrap()
Sets the box size to the SVG image size.
rack::widget::SvgWidget::draw
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
rack::widget::SvgWidget::svg
std::shared_ptr< window::Svg > svg
Definition
SvgWidget.hpp:11
rack::widget::Widget::DrawArgs
Definition
Widget.hpp:141
rack::widget::Widget
A node in the 2D scene graph.
Definition
Widget.hpp:21
include
widget
SvgWidget.hpp
Generated by
1.12.0