7
#include "Precompiled.h"
8
#include "ScopeManager.h"
9
#include "CommandManager.h"
10
#include "SettingsManager.h"
12
template <> tools::ScopeManager* MyGUI::Singleton<tools::ScopeManager>::msInstance = nullptr;
13
template <> const char* MyGUI::Singleton<tools::ScopeManager>::mClassTypeName = "ScopeManager";
18
ScopeManager::ScopeManager()
22
ScopeManager::~ScopeManager()
26
void ScopeManager::initialise()
28
CommandManager::getInstance().getEvent("Command_ChangeScope")->connect(this, &ScopeManager::commandChangeScope);
30
mCurrentScope = SettingsManager::getInstance().getValue("Editor/DefaultScope");
33
void ScopeManager::shutdown()
37
void ScopeManager::commandChangeScope(const MyGUI::UString& _commandName, bool& _result)
39
if (CommandManager::getInstance().getCommandData() != mCurrentScope)
41
mCurrentScope = CommandManager::getInstance().getCommandData();
42
eventChangeScope(mCurrentScope);
48
const std::string& ScopeManager::getCurrentScope() const