Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CustomAlphabet.cpp

Go to the documentation of this file.
00001 // CustomAlphabet.cpp
00002 //
00004 //
00005 // Copyright (c) 2002 Iain Murray
00006 //
00008 
00009 
00010 #include "CustomAlphabet.h"
00011 
00012 using namespace Dasher;
00013 using namespace std;
00014 
00015 
00016 CCustomAlphabet::CCustomAlphabet(const CAlphIO::AlphInfo& AlphInfo)
00017 {
00018         // Set miscellaneous options
00019         SetOrientation(AlphInfo.Orientation);
00020         SetLanguage(AlphInfo.Type);
00021         SetTrainingFile(AlphInfo.TrainingFile);
00022         
00023         // Add all the characters.
00024         for (unsigned int i=0; i<AlphInfo.Groups.size(); i++) { // loop groups
00025                 for (unsigned int j=0; j<AlphInfo.Groups[i].Characters.size(); j++) { // loop characters
00026                         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);
00027                 }
00028                 StartNewGroup();
00029         }
00030         
00031         // Set Space character if requested
00032 
00033         // This line makes it a bit easier for our WindowsCE compiler
00034         std::string empty="";
00035 
00036         if (AlphInfo.SpaceCharacter.Text != empty ) {
00037                 AddChar(AlphInfo.SpaceCharacter.Text, AlphInfo.SpaceCharacter.Display, AlphInfo.SpaceCharacter.Colour, AlphInfo.SpaceCharacter.Foreground);
00038                 SetSpaceSymbol();
00039         }
00040 }

Generated on Sat Nov 5 16:16:00 2005 for OPIE by  doxygen 1.4.2