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

Method onDragStart

src/app/SvgSwitch.cpp:39–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38
39void SvgSwitch::onDragStart(const DragStartEvent& e) {
40 Switch::onDragStart(e);
41 if (e.button != GLFW_MOUSE_BUTTON_LEFT)
42 return;
43
44 // Set down frame if latch
45 if (latch) {
46 if (frames.size() >= 2) {
47 sw->setSvg(frames[1]);
48 fb->setDirty();
49 }
50 }
51}
52
53
54void SvgSwitch::onDragEnd(const DragEndEvent& e) {

Callers

nothing calls this directly

Calls 3

setDirtyMethod · 0.80
sizeMethod · 0.45
setSvgMethod · 0.45

Tested by

no test coverage detected