VCV Rack API v2
Loading...
Searching...
No Matches
RackScrollWidget.hpp
Go to the documentation of this file.
1#pragma once
2#include <app/common.hpp>
3#include <ui/ScrollWidget.hpp>
5#include <app/RackWidget.hpp>
6
7
8namespace rack {
9namespace app {
10
11
13 struct Internal;
14 Internal* internal;
15
18
21
22 void reset();
26 void setGridOffset(math::Vec gridOffset);
27 float getZoom();
30 void setZoom(float zoom);
31 void setZoom(float zoom, math::Vec pivot);
32
33 void step() override;
34 void draw(const DrawArgs& args) override;
35 void onHoverKey(const HoverKeyEvent& e) override;
36 void onHoverScroll(const HoverScrollEvent& e) override;
37 void onHover(const HoverEvent& e) override;
38 void onButton(const ButtonEvent& e) override;
39};
40
41
42} // namespace app
43} // namespace rack
#define PRIVATE
Attribute for private functions not intended to be called by plugins.
Definition common.hpp:30
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Definition RackScrollWidget.hpp:12
void onHover(const HoverEvent &e) override
void setZoom(float zoom, math::Vec pivot)
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
RackWidget * rackWidget
Definition RackScrollWidget.hpp:17
void setGridOffset(math::Vec gridOffset)
Internal * internal
Definition RackScrollWidget.hpp:14
void onButton(const ButtonEvent &e) override
void onHoverKey(const HoverKeyEvent &e) override
math::Vec getGridOffset()
Gets the top-left scroll offset in grid coordinates.
void setZoom(float zoom)
Sets the zoom level, with a pivot at the center of the scroll viewport.
void step() override
Advances the module by one frame.
widget::ZoomWidget * zoomWidget
Definition RackScrollWidget.hpp:16
void onHoverScroll(const HoverScrollEvent &e) override
Container for ModuleWidget and CableWidget.
Definition RackWidget.hpp:21
2-dimensional vector of floats, representing a point on the plane for graphics.
Definition math.hpp:189
Handles a container with Scrollbar.
Definition ScrollWidget.hpp:12
Occurs each mouse button press or release.
Definition Widget.hpp:237
Definition Widget.hpp:141
Occurs every frame when the mouse is hovering over a Widget.
Definition Widget.hpp:225
Occurs when a key is pressed, released, or repeated while the mouse is hovering a Widget.
Definition Widget.hpp:294
Occurs when the mouse scroll wheel is moved while the mouse is hovering a Widget.
Definition Widget.hpp:315
Resizes the scale of appearance and PositionEvents of children.
Definition ZoomWidget.hpp:10