author | mickeyl <mickeyl> | 2003-09-27 11:29:26 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-09-27 11:29:26 (UTC) |
commit | 651b6c612db4e809c506973996f2580c4158ac3a (patch) (side-by-side diff) | |
tree | 8c8edc86e4b206dd4542a6b556ad1a319d6698ab /inputmethods/dasher/CustomAlphabet.cpp | |
parent | d1a11b45e805fe7771ea05944757d767c3c4c8ea (diff) | |
download | opie-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.cpp | 40 |
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 @@ +// CustomAlphabet.cpp +// +///////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) 2002 Iain Murray +// +///////////////////////////////////////////////////////////////////////////// + + +#include "CustomAlphabet.h" + +using namespace Dasher; +using namespace std; + + +CCustomAlphabet::CCustomAlphabet(const CAlphIO::AlphInfo& AlphInfo) +{ + // Set miscellaneous options + SetOrientation(AlphInfo.Orientation); + SetLanguage(AlphInfo.Type); + SetTrainingFile(AlphInfo.TrainingFile); + + // Add all the characters. + for (unsigned int i=0; i<AlphInfo.Groups.size(); i++) { // loop groups + for (unsigned int j=0; j<AlphInfo.Groups[i].Characters.size(); j++) { // loop characters + 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); + } + StartNewGroup(); + } + + // Set Space character if requested + + // This line makes it a bit easier for our WindowsCE compiler + std::string empty=""; + + if (AlphInfo.SpaceCharacter.Text != empty ) { + AddChar(AlphInfo.SpaceCharacter.Text, AlphInfo.SpaceCharacter.Display, AlphInfo.SpaceCharacter.Colour, AlphInfo.SpaceCharacter.Foreground); + SetSpaceSymbol(); + } +} |