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

Method onTextDropped

src/tools/ecode/ecode.cpp:1092–1104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1090}
1091
1092void App::onTextDropped( String text ) {
1093 Vector2f mousePos( mUISceneNode->getEventDispatcher()->getMousePosf() );
1094 Node* node = mUISceneNode->overFind( mousePos );
1095 UICodeEditor* codeEditor =
1096 mSplitter->curEditorExistsAndFocused() ? mSplitter->getCurEditor() : nullptr;
1097 if ( node && node->isType( UI_TYPE_CODEEDITOR ) )
1098 codeEditor = node->asType<UICodeEditor>();
1099 if ( codeEditor && !text.empty() ) {
1100 if ( text[text.size() - 1] != '\n' )
1101 text += '\n';
1102 codeEditor->getDocument().textInput( text );
1103 }
1104}
1105
1106App::App( const size_t& jobs, const std::vector<std::string>& args ) :
1107 mArgs( args ),

Callers

nothing calls this directly

Calls 10

getMousePosfMethod · 0.80
getCurEditorMethod · 0.80
textInputMethod · 0.80
getDocumentMethod · 0.80
getEventDispatcherMethod · 0.45
overFindMethod · 0.45
isTypeMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected