Diffstat (limited to 'inputmethods/dasher/DasherInterface.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/dasher/DasherInterface.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/inputmethods/dasher/DasherInterface.cpp b/inputmethods/dasher/DasherInterface.cpp index bb5b85e..4699687 100644 --- a/inputmethods/dasher/DasherInterface.cpp +++ b/inputmethods/dasher/DasherInterface.cpp @@ -4,53 +4,70 @@ // // Copyright (c) 2002 Iain Murray // ///////////////////////////////////////////////////////////////////////////// #include "DasherInterface.h" //#include "EnglishAlphabet.h" #include "CustomAlphabet.h" #include "DasherViewSquare.h" #include "PPMLanguageModel.h" #include <iostream> namespace { #include "stdio.h" } using namespace Dasher; using namespace std; const string CDasherInterface::EmptyString = ""; CDasherInterface::CDasherInterface() - : m_DashEditbox(0), m_DasherScreen(0), m_LanguageModel(0), TrainContext(0), m_Alphabet(0), - m_DasherModel(0), m_DasherView(0), AlphabetID(""), LanguageModelID(-1), ViewID(-1), - m_MaxBitRate(-1), m_Orientation(Opts::LeftToRight), m_SettingsStore(0), m_SettingsUI(0), - m_UserLocation("usr_"), m_SystemLocation("sys_"), m_AlphIO(0), m_TrainFile(""), - m_DasherFont(""), m_EditFont(""), m_EditFontSize(0), m_DrawKeyboard(false) + : m_Alphabet(0), + m_LanguageModel(0), + m_DasherModel(0), + m_DashEditbox(0), + m_DasherScreen(0), + m_DasherView(0), + m_SettingsStore(0), + m_SettingsUI(0), + m_AlphIO(0), + TrainContext(0), + AlphabetID(""), + LanguageModelID(-1), + ViewID(-1), + m_MaxBitRate(-1), + m_DrawKeyboard(false), + m_Orientation(Opts::LeftToRight), + m_UserLocation("usr_"), + m_SystemLocation("sys_"), + m_TrainFile(""), + m_DasherFont(""), + m_EditFont(""), + m_EditFontSize(0) { } CDasherInterface::~CDasherInterface() { if (m_LanguageModel) m_LanguageModel->ReleaseNodeContext(TrainContext); delete m_DasherModel; // The order of some of these deletions matters delete m_LanguageModel; // eg DasherModel has a pointer to LanguageModel. delete m_Alphabet; // DM baulks if LM is deleted before it is. delete m_DasherView; // Do NOT delete Edit box or Screen. This class did not create them. } void CDasherInterface::SetSettingsStore(CSettingsStore* SettingsStore) { delete m_SettingsStore; m_SettingsStore = SettingsStore; this->SettingsDefaults(m_SettingsStore); } |