VCV Rack API v2
Loading...
Searching...
No Matches
ScrollWidget.hpp
Go to the documentation of this file.
1#pragma once
2#include <ui/common.hpp>
4#include <ui/Scrollbar.hpp>
5
6
7namespace rack {
8namespace ui {
9
10
47
48
49} // namespace ui
50} // namespace rack
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
2-dimensional rectangle for graphics.
Definition math.hpp:301
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
void step() override
Advances the module by one frame.
widget::Widget * container
Definition ScrollWidget.hpp:16
void onDragMove(const DragMoveEvent &e) override
void scrollTo(math::Rect r)
bool hideScrollbars
Definition ScrollWidget.hpp:22
void onHover(const HoverEvent &e) override
Internal * internal
Definition ScrollWidget.hpp:14
math::Rect getContainerOffsetBound()
Returns the bound of allowed offset values in pixels.
math::Vec getScrollOffset()
Definition ScrollWidget.hpp:26
math::Vec getHandleOffset()
Returns the handle position relative to the scrollbar.
math::Vec offset
Definition ScrollWidget.hpp:20
Scrollbar * horizontalScrollbar
Definition ScrollWidget.hpp:17
void onDragStart(const DragStartEvent &e) override
math::Vec getHandleSize()
Returns the handle size relative to the scrollbar.
void onHoverKey(const HoverKeyEvent &e) override
void onButton(const ButtonEvent &e) override
math::Rect containerBox
Definition ScrollWidget.hpp:21
Scrollbar * verticalScrollbar
Definition ScrollWidget.hpp:18
bool isScrolling()
The user is considered scrolling with the wheel until the mouse is moved.
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
void onHoverScroll(const HoverScrollEvent &e) override
Parent must be a ScrollWidget.
Definition Scrollbar.hpp:11
A Widget that stops propagation of all recursive PositionEvents (such as ButtonEvent) but gives a cha...
Definition OpaqueWidget.hpp:12
Occurs each mouse button press or release.
Definition Widget.hpp:237
Occurs every frame on the dragged Widget.
Definition Widget.hpp:381
Occurs when a Widget begins being dragged.
Definition Widget.hpp:369
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
A node in the 2D scene graph.
Definition Widget.hpp:21