summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/CustomAlphabet.cpp
authormickeyl <mickeyl>2003-09-27 11:29:26 (UTC)
committer mickeyl <mickeyl>2003-09-27 11:29:26 (UTC)
commit651b6c612db4e809c506973996f2580c4158ac3a (patch) (unidiff)
tree8c8edc86e4b206dd4542a6b556ad1a319d6698ab /inputmethods/dasher/CustomAlphabet.cpp
parentd1a11b45e805fe7771ea05944757d767c3c4c8ea (diff)
downloadopie-651b6c612db4e809c506973996f2580c4158ac3a.zip
opie-651b6c612db4e809c506973996f2580c4158ac3a.tar.gz
opie-651b6c612db4e809c506973996f2580c4158ac3a.tar.bz2
merge dasher which has been introduced in BRANCH first (wtf?) into HEAD
Diffstat (limited to 'inputmethods/dasher/CustomAlphabet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/CustomAlphabet.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/inputmethods/dasher/CustomAlphabet.cpp b/inputmethods/dasher/CustomAlphabet.cpp
new file mode 100644
index 0000000..deb0f6d
--- a/dev/null
+++ b/inputmethods/dasher/CustomAlphabet.cpp
@@ -0,0 +1,40 @@
1// CustomAlphabet.cpp
2//
3/////////////////////////////////////////////////////////////////////////////
4//
5// Copyright (c) 2002 Iain Murray
6//
7/////////////////////////////////////////////////////////////////////////////
8
9
10#include "CustomAlphabet.h"
11
12using namespace Dasher;
13using namespace std;
14
15
16CCustomAlphabet::CCustomAlphabet(const CAlphIO::AlphInfo& AlphInfo)
17{
18 // Set miscellaneous options
19 SetOrientation(AlphInfo.Orientation);
20 SetLanguage(AlphInfo.Type);
21 SetTrainingFile(AlphInfo.TrainingFile);
22
23 // Add all the characters.
24 for (unsigned int i=0; i<AlphInfo.Groups.size(); i++) { // loop groups
25 for (unsigned int j=0; j<AlphInfo.Groups[i].Characters.size(); j++) { // loop characters
26 AddChar(AlphInfo.Groups[i].Characters[j].Text, AlphInfo.Groups[i].Characters[j].Display, AlphInfo.Groups[i].Characters[j].Colour, AlphInfo.Groups[i].Characters[j].Foreground);
27 }
28 StartNewGroup();
29 }
30
31 // Set Space character if requested
32
33 // This line makes it a bit easier for our WindowsCE compiler
34 std::string empty="";
35
36 if (AlphInfo.SpaceCharacter.Text != empty ) {
37 AddChar(AlphInfo.SpaceCharacter.Text, AlphInfo.SpaceCharacter.Display, AlphInfo.SpaceCharacter.Colour, AlphInfo.SpaceCharacter.Foreground);
38 SetSpaceSymbol();
39 }
40}