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

Method loadLayout

src/tools/uieditor/uieditor.cpp:299–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299std::pair<UITab*, UICodeEditor*> App::loadLayout( std::string file, bool updateCurrentLayout ) {
300 mUIContainer->getContainer()->closeAllChildren();
301 mUISceneNode->update( Time::Zero );
302
303 Uint32 marker = String::hash( updateCurrentLayout ? file : mCurrentLayout );
304
305 mUISceneNode->getStyleSheet().removeAllWithMarker( marker );
306 mUISceneNode->loadLayoutFromFile( file, mUIContainer, marker );
307
308 if ( updateCurrentLayout ) {
309 tryUpdateWatch( file );
310
311 mCurrentLayout = file;
312
313 if ( !mSplitter->isDocumentOpen( file ) ) {
314 SceneManager::instance()->setCurrentUISceneNode( mAppUISceneNode );
315 auto d = mSplitter->loadFileFromPathInNewTab( file );
316 SceneManager::instance()->setCurrentUISceneNode( mUISceneNode );
317 return d;
318 }
319 }
320
321 return std::make_pair( nullptr, nullptr );
322}
323
324void App::saveTmpDocument( TextDocument& doc,
325 std::function<void( const std::string& tmpPath )> action ) {

Callers

nothing calls this directly

Calls 9

hashFunction · 0.85
closeAllChildrenMethod · 0.80
removeAllWithMarkerMethod · 0.80
loadLayoutFromFileMethod · 0.80
isDocumentOpenMethod · 0.80
setCurrentUISceneNodeMethod · 0.80
getContainerMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected