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

Method onMouseDown

src/tools/ecode/plugins/debugger/debuggerplugin.cpp:1775–1797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1773}
1774
1775bool DebuggerPlugin::onMouseDown( UICodeEditor* editor, const Vector2i& position,
1776 const Uint32& flags ) {
1777 if ( !( flags & ( EE_BUTTON_LMASK | EE_BUTTON_RMASK ) ) )
1778 return false;
1779 Float offset = editor->getGutterLocalStartOffset( this );
1780 Vector2f localPos( editor->convertToNodeSpace( position.asFloat() ) );
1781 if ( localPos.x >= editor->getPixelsPadding().Left + offset &&
1782 localPos.x < editor->getPixelsPadding().Left + offset + editor->getGutterSpace( this ) +
1783 editor->getLineNumberPaddingLeft() &&
1784 localPos.y > editor->getPluginsTopSpace() ) {
1785 if ( editor->getUISceneNode()->getEventDispatcher()->isFirstPress() ) {
1786 auto cursorPos( editor->resolveScreenPosition( position.asFloat() ) );
1787 if ( ( flags & EE_BUTTON_RMASK ) &&
1788 hasBreakpoint( editor->getDocument().getFilePath(), cursorPos.line() + 1 ) ) {
1789 breakpointToggleEnabled( &editor->getDocument(), cursorPos.line() + 1 );
1790 } else {
1791 setBreakpoint( editor, cursorPos.line() + 1 );
1792 }
1793 }
1794 return true;
1795 }
1796 return false;
1797}
1798
1799bool DebuggerPlugin::isSupportedByAnyDebugger( const std::string& language ) {
1800 for ( const auto& dap : mDaps ) {

Callers 1

inputCallbackFunction · 0.45

Calls 10

convertToNodeSpaceMethod · 0.80
getGutterSpaceMethod · 0.80
isFirstPressMethod · 0.80
resolveScreenPositionMethod · 0.80
getFilePathMethod · 0.80
getDocumentMethod · 0.80
asFloatMethod · 0.45
getEventDispatcherMethod · 0.45
getUISceneNodeMethod · 0.45

Tested by

no test coverage detected