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

Function onMouse

examples/Info/ResizeHandle.hpp:90–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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