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

Method onMessage

src/tools/ecode/uitreeviewfs.cpp:229–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229Uint32 UITreeViewFS::onMessage( const NodeMessage* msg ) {
230 if ( msg->getMsg() == NodeMessage::Drop ) {
231 const NodeDropMessage* dropMsg = static_cast<const NodeDropMessage*>( msg );
232 static constexpr auto expectedType =
233 static_cast<Uint32>( CustomWidgets::UI_TYPE_TREEVIEWCELLFS );
234 if ( dropMsg->getSender()->isType( expectedType ) &&
235 dropMsg->getDroppedNode()->isType( expectedType ) ) {
236 auto dst = dropMsg->getSender()->asType<UITreeViewCellFS>()->getCurrentPath();
237 moveFiles( mSrcDragMultiplePaths, dst );
238 return 1;
239 }
240 }
241 return UITreeView::onMessage( msg );
242}
243
244void UITreeViewFS::moveFiles( const std::vector<std::string>& paths, const std::string& dstDir ) {
245 if ( paths.empty() )

Callers

nothing calls this directly

Calls 4

onMessageFunction · 0.85
getSenderMethod · 0.80
getDroppedNodeMethod · 0.80
isTypeMethod · 0.45

Tested by

no test coverage detected