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

Function scrollCallback

src/window/Window.cpp:210–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210static void scrollCallback(GLFWwindow* win, double x, double y) {
211 contextSet((Context*) glfwGetWindowUserPointer(win));
212 math::Vec scrollDelta = math::Vec(x, y);
213#if defined ARCH_MAC
214 scrollDelta = scrollDelta.mult(10.0);
215#else
216 scrollDelta = scrollDelta.mult(50.0);
217#endif
218
219 APP->event->handleScroll(APP->window->internal->lastMousePos, scrollDelta);
220}
221
222
223static void charCallback(GLFWwindow* win, unsigned int codepoint) {

Callers

nothing calls this directly

Calls 4

contextSetFunction · 0.85
VecClass · 0.85
multMethod · 0.80
handleScrollMethod · 0.80

Tested by

no test coverage detected