MCPcopy Create free account
hub / github.com/SpartanJ/eepp / onMouseDown

Method onMouseDown

src/eepp/ui/uitextinput.cpp:403–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403Uint32 UITextInput::onMouseDown( const Vector2i& position, const Uint32& flags ) {
404 int endPos = selCurEnd();
405
406 if ( getInput()->isShiftPressed() )
407 mSelecting = true;
408
409 UITextView::onMouseDown( position, flags );
410
411 if ( NULL != getEventDispatcher() && isTextSelectionEnabled() && ( flags & EE_BUTTON_LMASK ) &&
412 getEventDispatcher()->getMouseDownNode() == this && !mMouseDown ) {
413 getInput()->captureMouse( true );
414 mMouseDown = true;
415 }
416
417 if ( endPos != selCurEnd() && -1 != selCurEnd() ) {
418 resetWaitCursor();
419 }
420
421 return 1;
422}
423
424Uint32 UITextInput::onMouseUp( const Vector2i& position, const Uint32& flags ) {
425 if ( flags & EE_BUTTON_LMASK ) {

Callers

nothing calls this directly

Calls 4

selCurEndFunction · 0.85
isShiftPressedMethod · 0.80
getMouseDownNodeMethod · 0.80
captureMouseMethod · 0.80

Tested by

no test coverage detected