summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DasherAppInterface.h
Unidiff
Diffstat (limited to 'inputmethods/dasher/DasherAppInterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/DasherAppInterface.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/inputmethods/dasher/DasherAppInterface.h b/inputmethods/dasher/DasherAppInterface.h
new file mode 100644
index 0000000..c4f011c
--- a/dev/null
+++ b/inputmethods/dasher/DasherAppInterface.h
@@ -0,0 +1,72 @@
1// DasherAppInterface.h
2//
3/////////////////////////////////////////////////////////////////////////////
4//
5// Copyright (c) 2002 Iain Murray
6//
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef __DasherAppInterface_h__
10#define __DasherAppInterface_h__
11
12#include "DasherScreen.h"
13#include "DashEdit.h"
14#include "AlphIO.h"
15#include <string>
16#include <vector>
17
18namespace Dasher {class CDasherAppInterface;}
19class Dasher::CDasherAppInterface
20{
21public:
22 // We may change the widgets Dasher uses at run time
23
24 //! Change the screen being used by the core to NewScreen
25 virtual void ChangeScreen(CDasherScreen* NewScreen)=0;
26
27 //! Change the editbox being used by the core to NewEdit
28 virtual void ChangeEdit(CDashEditbox* NewEdit)=0;
29
30 // Training by string segments or file all training data must be in UTF-8.
31 //! Train the core on Trainstring
32 //
33 //! \param TrainString UTF-8 encoded string to train the core on
34 //! \param IsMore True if more text is to follow as part of the same
35 //! logical sequence, false otherwise (this allows the model to make
36 //! assumptions regarding whether the final character provided is in
37 //! the middle of a word or not)
38 virtual void Train(std::string* TrainString, bool IsMore)=0;
39
40 //! Train the core on the file in Filename.
41 //
42 //! The file should contain UTF-8 encoded text
43 virtual void TrainFile(std::string Filename)=0;
44
45 // App may want to display characters per minute or frames per second.
46
47 //! Tell the interface how many font sizes there are and what they are
48
49 virtual void GetFontSizes(std::vector<int> *FontSizes)=0;
50
51 //! Provides the number of characters per minute input. (Not implemented)
52 virtual double GetCurCPM()=0;
53
54 //! Provides the framerate that Dasher is runnin at. (Not implemented)
55 virtual double GetCurFPS()=0;
56
57 // Customize alphabet
58 //! Get a vector containing a list of alphabet names available to Dasher
59 virtual void GetAlphabets(std::vector< std::string >* AlphabetList)=0;
60
61 //! Return an AlphInfo object containing the alphabet with name AlphID
62 virtual const CAlphIO::AlphInfo& GetInfo(const std::string& AlphID)=0;
63
64 //! Save a new or modified AlphInfo object
65 virtual void SetInfo(const CAlphIO::AlphInfo& NewInfo)=0;
66
67 //! Delete the alphabet with name AlphID
68 virtual void DeleteAlphabet(const std::string& AlphID)=0;
69};
70
71
72#endif /* #ifndef __DasherAppInterface_h__ */