MCPcopy Create free account
hub / github.com/DISTRHO/DPF / onMouse

Function onMouse

tests/widgets/ResizeHandle.hpp:86–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 bool onMouse(const MouseEvent& ev) override
87 {
88 if (ev.button != 1)
89 return false;
90
91 if (ev.press && area.contains(ev.pos))
92 {
93 isResizing = true;
94 resizingSize = Size<double>(getWidth(), getHeight());
95 lastResizePoint = ev.pos;
96 return true;
97 }
98
99 if (isResizing && ! ev.press)
100 {
101 isResizing = false;
102 recheckCursor(ev.pos);
103 return true;
104 }
105
106 return false;
107 }
108
109 bool onMotion(const MotionEvent& ev) override
110 {

Callers

nothing calls this directly

Calls 4

recheckCursorFunction · 0.70
getWidthFunction · 0.50
getHeightFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected