summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DasherInterface.h
Unidiff
Diffstat (limited to 'inputmethods/dasher/DasherInterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/DasherInterface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/inputmethods/dasher/DasherInterface.h b/inputmethods/dasher/DasherInterface.h
index 6338801..7c4496f 100644
--- a/inputmethods/dasher/DasherInterface.h
+++ b/inputmethods/dasher/DasherInterface.h
@@ -1,137 +1,137 @@
1// DasherInterface.h 1// DasherInterface.h
2// 2//
3///////////////////////////////////////////////////////////////////////////// 3/////////////////////////////////////////////////////////////////////////////
4// 4//
5// Copyright (c) 2002 Iain Murray 5// Copyright (c) 2002 Iain Murray
6// 6//
7///////////////////////////////////////////////////////////////////////////// 7/////////////////////////////////////////////////////////////////////////////
8 8
9 9
10 10
11#ifndef __DasherInterface_h__ 11#ifndef __DasherInterface_h__
12#define __DasherInterface_h__ 12#define __DasherInterface_h__
13 13
14// TODO - there is a list of things to be configurable in my notes 14// TODO - there is a list of things to be configurable in my notes
15// Check that everything that is not self-contained within the GUI is covered. 15// Check that everything that is not self-contained within the GUI is covered.
16 16
17#include "MSVC_Unannoy.h" 17#include "MSVC_Unannoy.h"
18#include "NoClones.h" 18#include "NoClones.h"
19 19
20#include "DasherWidgetInterface.h" 20#include "DasherWidgetInterface.h"
21#include "DasherAppInterface.h" 21#include "DasherAppInterface.h"
22#include "DasherSettingsInterface.h" 22#include "DasherSettingsInterface.h"
23 23
24#include "DasherScreen.h" 24#include "DasherScreen.h"
25#include "Alphabet.h" 25#include "Alphabet.h"
26#include "AlphIO.h" 26#include "AlphIO.h"
27#include "LanguageModel.h" 27#include "LanguageModel.h"
28#include "DasherModel.h" 28#include "DasherModel.h"
29#include "DashEdit.h" 29#include "DashEdit.h"
30#include "DasherView.h" 30#include "DasherView.h"
31 31
32#include "MSVC_Unannoy.h" 32#include "MSVC_Unannoy.h"
33#include <map> 33#include <map>
34 34
35namespace Dasher {class CDasherInterface;} 35namespace Dasher {class CDasherInterface;}
36class Dasher::CDasherInterface : private NoClones, 36class Dasher::CDasherInterface : private NoClones,
37 public CDasherWidgetInterface, public CDasherAppInterface, public CDasherSettingsInterface 37 public CDasherWidgetInterface, public CDasherAppInterface, public CDasherSettingsInterface
38{ 38{
39public: 39public:
40 CDasherInterface(); 40 CDasherInterface();
41 ~CDasherInterface(); 41 virtual ~CDasherInterface();
42 42
43 //! Tell the core which CSettingsStore should be used 43 //! Tell the core which CSettingsStore should be used
44 void SetSettingsStore(CSettingsStore* SettingsStore); 44 void SetSettingsStore(CSettingsStore* SettingsStore);
45 45
46 //! Tell the core which CDasherSettingsInterface should be used 46 //! Tell the core which CDasherSettingsInterface should be used
47 // 47 //
48 //! Provide a pointer to an instance of CDasherSettingsInterface in 48 //! Provide a pointer to an instance of CDasherSettingsInterface in
49 //! order to allow for platform dependent configuration of certain 49 //! order to allow for platform dependent configuration of certain
50 //! options 50 //! options
51 void SetSettingsUI(CDasherSettingsInterface* SettingsUI); 51 void SetSettingsUI(CDasherSettingsInterface* SettingsUI);
52 52
53 //! Set the path for user specific configuration and files 53 //! Set the path for user specific configuration and files
54 void SetUserLocation(std::string UserLocation); 54 void SetUserLocation(std::string UserLocation);
55 55
56 //! Set the path for system-wide configuration and files 56 //! Set the path for system-wide configuration and files
57 void SetSystemLocation(std::string SystemLocation); 57 void SetSystemLocation(std::string SystemLocation);
58 58
59 // Widget Interface 59 // Widget Interface
60 // ----------------------------------------------------- 60 // -----------------------------------------------------
61 void Start(); 61 void Start();
62 62
63 void TapOn(int MouseX, int MouseY, unsigned long Time); // Times in milliseconds 63 void TapOn(int MouseX, int MouseY, unsigned long Time); // Times in milliseconds
64 void PauseAt(int MouseX, int MouseY); // are required to make 64 void PauseAt(int MouseX, int MouseY); // are required to make
65 void Unpause(unsigned long Time); // Dasher run at the 65 void Unpause(unsigned long Time); // Dasher run at the
66 void Redraw(); // correct speed. 66 void Redraw(); // correct speed.
67 67
68 void ChangeScreen(); // The widgets need to tell the engine when they have been 68 void ChangeScreen(); // The widgets need to tell the engine when they have been
69 void ChangeEdit(); // affected by external interaction 69 void ChangeEdit(); // affected by external interaction
70 70
71 unsigned int GetNumberSymbols(); // These are needed so widgets know 71 unsigned int GetNumberSymbols(); // These are needed so widgets know
72 const std::string& GetDisplayText(symbol Symbol); // how to render the alphabet. All 72 const std::string& GetDisplayText(symbol Symbol); // how to render the alphabet. All
73 const std::string& GetEditText(symbol Symbol); // strings are encoded in UTF-8 73 const std::string& GetEditText(symbol Symbol); // strings are encoded in UTF-8
74 int GetTextColour(symbol Symbol); // the foreground colour of the text 74 int GetTextColour(symbol Symbol); // the foreground colour of the text
75 Opts::ScreenOrientations GetAlphabetOrientation(); 75 Opts::ScreenOrientations GetAlphabetOrientation();
76 Opts::AlphabetTypes GetAlphabetType(); 76 Opts::AlphabetTypes GetAlphabetType();
77 const std::string& GetTrainFile(); 77 const std::string& GetTrainFile();
78 78
79 // App Interface 79 // App Interface
80 // ----------------------------------------------------- 80 // -----------------------------------------------------
81 81
82 // std::map<int, std::string>& GetAlphabets(); // map<key, value> int is a UID string can change. Store UID in preferences. Display string to user. 82 // std::map<int, std::string>& GetAlphabets(); // map<key, value> int is a UID string can change. Store UID in preferences. Display string to user.
83 // std::vector<std::string>& GetAlphabets(); 83 // std::vector<std::string>& GetAlphabets();
84 // std::vector<std::string>& GetLangModels(); 84 // std::vector<std::string>& GetLangModels();
85 // std::vector<std::string>& GetViews(); 85 // std::vector<std::string>& GetViews();
86 86
87 void ChangeScreen(CDasherScreen* NewScreen); // We may change the widgets Dasher uses 87 void ChangeScreen(CDasherScreen* NewScreen); // We may change the widgets Dasher uses
88 void ChangeEdit(CDashEditbox* NewEdit); // at run time. 88 void ChangeEdit(CDashEditbox* NewEdit); // at run time.
89 89
90 void Train(std::string* TrainString, bool IsMore); // Training by string segments or file 90 void Train(std::string* TrainString, bool IsMore); // Training by string segments or file
91 void TrainFile(std::string Filename); // all training data must be in UTF-8. 91 void TrainFile(std::string Filename); // all training data must be in UTF-8.
92 92
93 void GetFontSizes(std::vector<int> *FontSizes); 93 void GetFontSizes(std::vector<int> *FontSizes);
94 94
95 double GetCurCPM(); // App may want to display characters per minute 95 double GetCurCPM(); // App may want to display characters per minute
96 double GetCurFPS(); // or frames per second. 96 double GetCurFPS(); // or frames per second.
97 97
98 // Customize alphabet 98 // Customize alphabet
99 void GetAlphabets(std::vector< std::string >* AlphabetList); 99 void GetAlphabets(std::vector< std::string >* AlphabetList);
100 const CAlphIO::AlphInfo& GetInfo(const std::string& AlphID); 100 const CAlphIO::AlphInfo& GetInfo(const std::string& AlphID);
101 void SetInfo(const CAlphIO::AlphInfo& NewInfo); 101 void SetInfo(const CAlphIO::AlphInfo& NewInfo);
102 void DeleteAlphabet(const std::string& AlphID); 102 void DeleteAlphabet(const std::string& AlphID);
103 103
104 // Settings Interface (options saved between sessions) 104 // Settings Interface (options saved between sessions)
105 // ----------------------------------------------------- 105 // -----------------------------------------------------
106 106
107 void ChangeAlphabet(const std::string& NewAlphabetID); 107 void ChangeAlphabet(const std::string& NewAlphabetID);
108 void ChangeMaxBitRate(double NewMaxBitRate); 108 void ChangeMaxBitRate(double NewMaxBitRate);
109 void ChangeLanguageModel(unsigned int NewLanguageModelID); 109 void ChangeLanguageModel(unsigned int NewLanguageModelID);
110 void ChangeView(unsigned int NewViewID); 110 void ChangeView(unsigned int NewViewID);
111 void ChangeOrientation(Opts::ScreenOrientations Orientation); 111 void ChangeOrientation(Opts::ScreenOrientations Orientation);
112 void SetFileEncoding(Opts::FileEncodingFormats Encoding); 112 void SetFileEncoding(Opts::FileEncodingFormats Encoding);
113 // TODO Color customization. 113 // TODO Color customization.
114 114
115 void ShowToolbar(bool Value); 115 void ShowToolbar(bool Value);
116 void ShowToolbarText(bool Value); 116 void ShowToolbarText(bool Value);
117 void ShowToolbarLargeIcons(bool Value); 117 void ShowToolbarLargeIcons(bool Value);
118 void ShowSpeedSlider(bool Value); 118 void ShowSpeedSlider(bool Value);
119 void FixLayout(bool Value); 119 void FixLayout(bool Value);
120 void TimeStampNewFiles(bool Value); 120 void TimeStampNewFiles(bool Value);
121 void CopyAllOnStop(bool Value); 121 void CopyAllOnStop(bool Value);
122 void DrawMouse(bool Value); 122 void DrawMouse(bool Value);
123 void StartOnSpace(bool Value); 123 void StartOnSpace(bool Value);
124 void StartOnLeft(bool Value); 124 void StartOnLeft(bool Value);
125 void KeyControl(bool Value); 125 void KeyControl(bool Value);
126 void WindowPause(bool Value); 126 void WindowPause(bool Value);
127 void SetEditFont(std::string Name, long Size); 127 void SetEditFont(std::string Name, long Size);
128 void SetDasherFont(std::string Name); 128 void SetDasherFont(std::string Name);
129 void SetDasherFontSize(FontSize fontsize); 129 void SetDasherFontSize(FontSize fontsize);
130 void SetDasherDimensions(bool Value); 130 void SetDasherDimensions(bool Value);
131 131
132private: 132private:
133 CAlphabet* m_Alphabet; 133 CAlphabet* m_Alphabet;
134 CLanguageModel* m_LanguageModel; 134 CLanguageModel* m_LanguageModel;
135 CDasherModel* m_DasherModel; 135 CDasherModel* m_DasherModel;
136 CDashEditbox* m_DashEditbox; 136 CDashEditbox* m_DashEditbox;
137 CDasherScreen* m_DasherScreen; 137 CDasherScreen* m_DasherScreen;