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

Method onMouseUp

src/tools/ecode/plugins/autocomplete/autocompleteplugin.cpp:1363–1383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1361}
1362
1363bool AutoCompletePlugin::onMouseUp( UICodeEditor* editor, const Vector2i& position,
1364 const Uint32& flags ) {
1365 if ( mSuggestions.empty() || !mSuggestionsEditor || mSuggestionsEditor != editor )
1366 return false;
1367
1368 Vector2f localPos( editor->convertToNodeSpace( position.asFloat() ) );
1369 if ( mBoxRect.contains( localPos ) ) {
1370 if ( flags & EE_BUTTON_WUMASK ) {
1371 mSuggestionsStartIndex = eemax( 0, mSuggestionsStartIndex - mSuggestionsMaxVisible );
1372 editor->invalidateDraw();
1373 return true;
1374 } else if ( flags & EE_BUTTON_WDMASK ) {
1375 mSuggestionsStartIndex =
1376 eemax( 0, eemin( (int)mSuggestions.size() - mSuggestionsMaxVisible,
1377 mSuggestionsStartIndex + mSuggestionsMaxVisible ) );
1378 editor->invalidateDraw();
1379 return true;
1380 }
1381 }
1382 return false;
1383}
1384
1385bool AutoCompletePlugin::onMouseDoubleClick( UICodeEditor* editor, const Vector2i& position,
1386 const Uint32& flags ) {

Callers 1

inputCallbackFunction · 0.45

Calls 8

eemaxFunction · 0.85
eeminFunction · 0.85
convertToNodeSpaceMethod · 0.80
invalidateDrawMethod · 0.80
emptyMethod · 0.45
asFloatMethod · 0.45
containsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected