MCPcopy Create free account
hub / github.com/VCVRack/Rack / scrollTo

Method scrollTo

src/ui/ScrollWidget.cpp:37–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37void ScrollWidget::scrollTo(math::Rect r) {
38 math::Rect bound = math::Rect::fromMinMax(r.getBottomRight().minus(box.size), r.pos);
39 offset = offset.clampSafe(bound);
40}
41
42
43math::Rect ScrollWidget::getContainerOffsetBound() {

Callers 1

onSelectMethod · 0.80

Calls 3

minusMethod · 0.80
getBottomRightMethod · 0.80
clampSafeMethod · 0.80

Tested by

no test coverage detected