MCPcopy Create free account
hub / github.com/ZDoom/Raze / OnMouseMove

Method OnMouseMove

libraries/ZWidget/src/widgets/textedit/textedit.cpp:265–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void TextEdit::OnMouseMove(const Point& pos)
266{
267 if (mouse_selecting && !ignore_mouse_events)
268 {
269 if (pos.x < 0.0 || pos.x > GetWidth())
270 {
271 if (pos.x < 0.0)
272 mouse_moves_left = true;
273 else
274 mouse_moves_left = false;
275
276 if (!readonly)
277 scroll_timer->Start(50, true);
278 }
279 else
280 {
281 scroll_timer->Stop();
282 cursor_pos = GetCharacterIndex(pos);
283 selection_length = ToOffset(cursor_pos) - ToOffset(selection_start);
284 Update();
285 }
286 }
287}
288
289bool TextEdit::OnMouseDown(const Point& pos, int key)
290{

Callers 1

OnWindowMouseMoveMethod · 0.45

Calls 2

StartMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected