2022-04-09 19:42:02 -04:00
|
|
|
#include "DebugSupportSettings.h"
|
2022-04-10 10:51:33 -04:00
|
|
|
#include <cassert>
|
2022-04-09 19:42:02 -04:00
|
|
|
|
|
|
|
#define PREF_DEBUGGER_MONOSPACE_FONT_FACE_NAME ("debugger.monospacefont.facename")
|
|
|
|
#define PREF_DEBUGGER_MONOSPACE_FONT_SIZE ("debugger.monospacefont.size")
|
|
|
|
|
|
|
|
void CDebugSupportSettings::Initialize(Framework::CConfig* config)
|
|
|
|
{
|
|
|
|
//Needs to be initialized only once
|
|
|
|
assert(!m_config);
|
|
|
|
m_config = config;
|
2022-04-10 10:52:53 -04:00
|
|
|
|
2022-04-09 19:42:02 -04:00
|
|
|
RegisterPreferences();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CDebugSupportSettings::RegisterPreferences()
|
|
|
|
{
|
|
|
|
m_config->RegisterPreferenceString(PREF_DEBUGGER_MONOSPACE_FONT_FACE_NAME, "Courier New");
|
|
|
|
m_config->RegisterPreferenceInteger(PREF_DEBUGGER_MONOSPACE_FONT_SIZE, 8);
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string CDebugSupportSettings::GetMonospaceFontFaceName()
|
|
|
|
{
|
|
|
|
return m_config->GetPreferenceString(PREF_DEBUGGER_MONOSPACE_FONT_FACE_NAME);
|
|
|
|
}
|
|
|
|
|
|
|
|
int CDebugSupportSettings::GetMonospaceFontSize()
|
|
|
|
{
|
|
|
|
return m_config->GetPreferenceInteger(PREF_DEBUGGER_MONOSPACE_FONT_SIZE);
|
|
|
|
}
|