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

Dasher::CDasherInterface Class Reference

#include </home/clem/local/src/opie/inputmethods/dasher/DasherInterface.h>

Inheritance diagram for Dasher::CDasherInterface:

Inheritance graph
[legend]
Collaboration diagram for Dasher::CDasherInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CDasherInterface ()
virtual ~CDasherInterface ()
void SetSettingsStore (CSettingsStore *SettingsStore)
 Tell the core which CSettingsStore should be used.
void SetSettingsUI (CDasherSettingsInterface *SettingsUI)
 Tell the core which CDasherSettingsInterface should be used.
void SetUserLocation (std::string UserLocation)
 Set the path for user specific configuration and files.
void SetSystemLocation (std::string SystemLocation)
 Set the path for system-wide configuration and files.
void Start ()
 Signal to the core that the model should be started.
void TapOn (int MouseX, int MouseY, unsigned long Time)
 Signal an input location.
void PauseAt (int MouseX, int MouseY)
 Signal an input event and pause the simulation.
void Unpause (unsigned long Time)
 Unpause the simulation.
void Redraw ()
 Signal that the core should redraw the screen.
void ChangeScreen ()
 Signal the core that a change has occured to the screen. (Unneeded).
void ChangeEdit ()
 Signal the core that a change has occued to the editbox. (Unneeded).
unsigned int GetNumberSymbols ()
 Request the number of symbols in the current alphabet.
const std::string & GetDisplayText (symbol Symbol)
const std::string & GetEditText (symbol Symbol)
int GetTextColour (symbol Symbol)
Opts::ScreenOrientations GetAlphabetOrientation ()
 (Eg, left to right for English, right to left for Hebrew)
Opts::AlphabetTypes GetAlphabetType ()
 Returns the codepage for the current alphabet.
const std::string & GetTrainFile ()
 Provides a fully qualified path to the training file for the alphabet.
void ChangeScreen (CDasherScreen *NewScreen)
 Change the screen being used by the core to NewScreen.
void ChangeEdit (CDashEditbox *NewEdit)
 Change the editbox being used by the core to NewEdit.
void Train (std::string *TrainString, bool IsMore)
 Train the core on Trainstring.
void TrainFile (std::string Filename)
 The file should contain UTF-8 encoded text.
void GetFontSizes (std::vector< int > *FontSizes)
 Tell the interface how many font sizes there are and what they are.
double GetCurCPM ()
 Provides the number of characters per minute input. (Not implemented).
double GetCurFPS ()
 Provides the framerate that Dasher is runnin at. (Not implemented).
void GetAlphabets (std::vector< std::string > *AlphabetList)
 Get a vector containing a list of alphabet names available to Dasher.
const CAlphIO::AlphInfoGetInfo (const std::string &AlphID)
 Return an AlphInfo object containing the alphabet with name AlphID.
void SetInfo (const CAlphIO::AlphInfo &NewInfo)
 Save a new or modified AlphInfo object.
void DeleteAlphabet (const std::string &AlphID)
 Delete the alphabet with name AlphID.
void ChangeAlphabet (const std::string &NewAlphabetID)
 Change the alphabet in use to NewAlphabetID.
void ChangeMaxBitRate (double NewMaxBitRate)
 Change the maximum bitrate (effectively the speed) of Dasher.
void ChangeLanguageModel (unsigned int NewLanguageModelID)
 Generate a new langage model. Not usually needed.
void ChangeView (unsigned int NewViewID)
 Generate a new view of the model. Call it with 0 when starting up.
void ChangeOrientation (Opts::ScreenOrientations Orientation)
 Change the orientation (l->r, r->l, so on) of the model.
void SetFileEncoding (Opts::FileEncodingFormats Encoding)
 Set the file encoding of output files to Encoding.
void ShowToolbar (bool Value)
 True if toolbar should be shown, false otherwise.
void ShowToolbarText (bool Value)
 True if toolbar should show text, false otherwse.
void ShowToolbarLargeIcons (bool Value)
 True if toolbar should have large icons, false otherwise.
void ShowSpeedSlider (bool Value)
 True if the speed slider should be shown, false otherwise.
void FixLayout (bool Value)
 True if the window layout should be fixed, false otherwise.
void TimeStampNewFiles (bool Value)
 True if new files should be timestamped, false otherwise.
void CopyAllOnStop (bool Value)
 True if all text should be copied to clipboard when Dasher is stopped, false otherwise.
void DrawMouse (bool Value)
 True if a box should be drawn to represent the logical position of the mouse.
void StartOnSpace (bool Value)
 Should Dasher start and stop on space bar?
void StartOnLeft (bool Value)
 Should Dasher start and stop on left mouse button?
void KeyControl (bool Value)
 Should Dasher be keyboard controlled?
void WindowPause (bool Value)
 Should Dasher pause when the pointer leaves the window?
void SetEditFont (std::string Name, long Size)
 Set the editbox font.
void SetDasherFont (std::string Name)
 Set the canvas font.
void SetDasherFontSize (FontSize fontsize)
void SetDasherDimensions (bool Value)
 Set the number of dimensions of input (either 1 or 2).

Private Member Functions

void CreateDasherModel ()

Private Attributes

CAlphabetm_Alphabet
CLanguageModelm_LanguageModel
CDasherModelm_DasherModel
CDashEditboxm_DashEditbox
CDasherScreenm_DasherScreen
CDasherViewm_DasherView
CSettingsStorem_SettingsStore
CDasherSettingsInterfacem_SettingsUI
CAlphIOm_AlphIO
CLanguageModel::CNodeContextTrainContext
std::string AlphabetID
int LanguageModelID
int ViewID
double m_MaxBitRate
bool m_CopyAllOnStop
bool m_DrawMouse
bool m_DrawKeyboard
bool m_StartSpace
bool m_StartLeft
bool m_KeyControl
bool m_Dimensions
bool m_WindowPause
Opts::ScreenOrientations m_Orientation
std::string m_UserLocation
std::string m_SystemLocation
std::string m_TrainFile
std::string m_DasherFont
std::string m_EditFont
int m_EditFontSize

Static Private Attributes

static const std::string EmptyString = ""

Constructor & Destructor Documentation

CDasherInterface::CDasherInterface  ) 
 

Definition at line 27 of file DasherInterface.cpp.

CDasherInterface::~CDasherInterface  )  [virtual]
 

Definition at line 54 of file DasherInterface.cpp.

References m_Alphabet, m_DasherModel, m_DasherView, m_LanguageModel, Dasher::CLanguageModel::ReleaseNodeContext(), and TrainContext.


Member Function Documentation

void CDasherInterface::ChangeAlphabet const std::string &  NewAlphabetID  )  [virtual]
 

Change the alphabet in use to NewAlphabetID.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 176 of file DasherInterface.cpp.

References Dasher::Opts::Alphabet, Dasher::Keys::ALPHABET_ID, AlphabetID, Dasher::CDasherSettingsInterface::ChangeAlphabet(), ChangeLanguageModel(), ChangeOrientation(), Dasher::CAlphIO::GetInfo(), Dasher::CAlphabet::GetTrainingFile(), LanguageModelID, m_Alphabet, m_AlphIO, m_DashEditbox, m_DasherScreen, m_LanguageModel, m_Orientation, m_SettingsStore, m_SettingsUI, m_SystemLocation, m_TrainFile, m_UserLocation, Redraw(), Dasher::CDasherScreen::SetInterface(), Dasher::CDashEditbox::SetInterface(), CSettingsStore::SetStringOption(), and Start().

void CDasherInterface::ChangeEdit CDashEditbox NewEdit  )  [virtual]
 

Change the editbox being used by the core to NewEdit.

Implements Dasher::CDasherAppInterface.

Definition at line 575 of file DasherInterface.cpp.

References ChangeEdit(), CSettingsStore::GetBoolOption(), m_DashEditbox, m_EditFont, m_EditFontSize, m_SettingsStore, Dasher::CDashEditbox::New(), Dasher::CDashEditbox::SetFont(), Dasher::CDashEditbox::SetInterface(), Dasher::Keys::TIME_STAMP, and Dasher::CDashEditbox::TimeStampNewFiles().

void CDasherInterface::ChangeEdit  )  [virtual]
 

Signal the core that a change has occued to the editbox. (Unneeded).

Implements Dasher::CDasherWidgetInterface.

Definition at line 565 of file DasherInterface.cpp.

References CreateDasherModel(), m_DasherModel, m_DasherView, Dasher::CDasherView::Render(), and Dasher::CDasherModel::Start().

Referenced by ChangeEdit(), and QtDasherScreen::QtDasherScreen().

void CDasherInterface::ChangeLanguageModel unsigned int  NewLanguageModelID  )  [virtual]
 

Generate a new langage model. Not usually needed.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 235 of file DasherInterface.cpp.

References CreateDasherModel(), Dasher::CLanguageModel::GetRootNodeContext(), LanguageModelID, m_Alphabet, m_DasherModel, m_LanguageModel, m_SystemLocation, m_UserLocation, Dasher::CLanguageModel::ReleaseNodeContext(), Opie::Internal::string(), TrainContext, and TrainFile().

Referenced by ChangeAlphabet(), and QtDasherScreen::QtDasherScreen().

void CDasherInterface::ChangeMaxBitRate double  NewMaxBitRate  )  [virtual]
 

Change the maximum bitrate (effectively the speed) of Dasher.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 218 of file DasherInterface.cpp.

References Dasher::CDasherSettingsInterface::ChangeMaxBitRate(), Dasher::CDasherView::DrawKeyboard(), m_DasherModel, m_DasherView, m_DrawKeyboard, m_MaxBitRate, m_SettingsStore, m_SettingsUI, Dasher::Keys::MAX_BITRATE_TIMES100, NULL, CSettingsStore::SetLongOption(), and Dasher::CDasherModel::SetMaxBitrate().

Referenced by QtDasherPlugin::QtDasherPlugin().

void CDasherInterface::ChangeOrientation Opts::ScreenOrientations  Orientation  )  [virtual]
 

Change the orientation (l->r, r->l, so on) of the model.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 291 of file DasherInterface.cpp.

References Dasher::Opts::Alphabet, Dasher::CDasherSettingsInterface::ChangeOrientation(), Dasher::CDasherView::ChangeOrientation(), GetAlphabetOrientation(), m_DasherView, m_Orientation, m_SettingsStore, m_SettingsUI, Dasher::Keys::SCREEN_ORIENTATION, and CSettingsStore::SetLongOption().

Referenced by ChangeAlphabet().

void CDasherInterface::ChangeScreen CDasherScreen NewScreen  )  [virtual]
 

Change the screen being used by the core to NewScreen.

Implements Dasher::CDasherAppInterface.

Definition at line 267 of file DasherInterface.cpp.

References ChangeScreen(), m_DasherFont, m_DasherScreen, Redraw(), Dasher::CDasherScreen::SetFont(), and Dasher::CDasherScreen::SetInterface().

void CDasherInterface::ChangeScreen  )  [virtual]
 

Signal the core that a change has occured to the screen. (Unneeded).

Implements Dasher::CDasherWidgetInterface.

Definition at line 256 of file DasherInterface.cpp.

References Dasher::CDasherView::ChangeScreen(), ChangeView(), m_DasherScreen, m_DasherView, and ViewID.

Referenced by ChangeScreen(), and QtDasherScreen::QtDasherScreen().

void CDasherInterface::ChangeView unsigned int  NewViewID  )  [virtual]
 

Generate a new view of the model. Call it with 0 when starting up.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 277 of file DasherInterface.cpp.

References Dasher::Opts::Alphabet, GetAlphabetOrientation(), m_DasherModel, m_DasherScreen, m_DasherView, m_Orientation, and ViewID.

Referenced by ChangeScreen(), CreateDasherModel(), and QtDasherScreen::QtDasherScreen().

void CDasherInterface::CopyAllOnStop bool  Value  )  [virtual]
 

True if all text should be copied to clipboard when Dasher is stopped, false otherwise.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 374 of file DasherInterface.cpp.

References Dasher::Keys::COPY_ALL_ON_STOP, Dasher::CDasherSettingsInterface::CopyAllOnStop(), m_CopyAllOnStop, m_SettingsStore, m_SettingsUI, and CSettingsStore::SetBoolOption().

void CDasherInterface::CreateDasherModel  )  [private]
 

Definition at line 103 of file DasherInterface.cpp.

References ChangeView(), m_DashEditbox, m_DasherModel, m_Dimensions, m_LanguageModel, m_MaxBitRate, Dasher::CDasherModel::SetMaxBitrate(), and ViewID.

Referenced by ChangeEdit(), and ChangeLanguageModel().

void CDasherInterface::DeleteAlphabet const std::string &  AlphID  )  [virtual]
 

Delete the alphabet with name AlphID.

Implements Dasher::CDasherAppInterface.

Definition at line 556 of file DasherInterface.cpp.

References Dasher::CAlphIO::Delete(), m_AlphIO, m_SystemLocation, and m_UserLocation.

void CDasherInterface::DrawMouse bool  Value  )  [virtual]
 

True if a box should be drawn to represent the logical position of the mouse.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 383 of file DasherInterface.cpp.

References Dasher::Keys::DRAW_MOUSE, Dasher::CDasherSettingsInterface::DrawMouse(), m_DrawMouse, m_SettingsStore, m_SettingsUI, and CSettingsStore::SetBoolOption().

void CDasherInterface::FixLayout bool  Value  )  [virtual]
 

True if the window layout should be fixed, false otherwise.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 354 of file DasherInterface.cpp.

References Dasher::Keys::FIX_LAYOUT, Dasher::CDasherSettingsInterface::FixLayout(), m_SettingsStore, m_SettingsUI, and CSettingsStore::SetBoolOption().

Opts::ScreenOrientations CDasherInterface::GetAlphabetOrientation  )  [virtual]
 

(Eg, left to right for English, right to left for Hebrew)

Implements Dasher::CDasherWidgetInterface.

Definition at line 512 of file DasherInterface.cpp.

References Dasher::CAlphabet::GetOrientation(), and m_Alphabet.

Referenced by ChangeOrientation(), and ChangeView().

void CDasherInterface::GetAlphabets std::vector< std::string > *  AlphabetList  )  [virtual]
 

Get a vector containing a list of alphabet names available to Dasher.

Implements Dasher::CDasherAppInterface.

Definition at line 530 of file DasherInterface.cpp.

References Dasher::CAlphIO::GetAlphabets(), m_AlphIO, m_SystemLocation, and m_UserLocation.

Opts::AlphabetTypes CDasherInterface::GetAlphabetType  )  [virtual]
 

Returns the codepage for the current alphabet.

Implements Dasher::CDasherWidgetInterface.

Definition at line 518 of file DasherInterface.cpp.

References Dasher::CAlphabet::GetType(), and m_Alphabet.

double CDasherInterface::GetCurCPM  )  [virtual]
 

Provides the number of characters per minute input. (Not implemented).

Implements Dasher::CDasherAppInterface.

Definition at line 642 of file DasherInterface.cpp.

double CDasherInterface::GetCurFPS  )  [virtual]
 

Provides the framerate that Dasher is runnin at. (Not implemented).

Implements Dasher::CDasherAppInterface.

Definition at line 649 of file DasherInterface.cpp.

const string & CDasherInterface::GetDisplayText symbol  Symbol  ) 
 

Definition at line 486 of file DasherInterface.cpp.

References EmptyString, Dasher::CAlphabet::GetDisplayText(), and m_Alphabet.

Referenced by QtDasherScreen::DrawText().

const string & CDasherInterface::GetEditText symbol  Symbol  ) 
 

Definition at line 495 of file DasherInterface.cpp.

References EmptyString, Dasher::CAlphabet::GetText(), and m_Alphabet.

Referenced by QtDasherPlugin::output().

void CDasherInterface::GetFontSizes std::vector< int > *  FontSizes  )  [virtual]
 

Tell the interface how many font sizes there are and what they are.

Implements Dasher::CDasherAppInterface.

Definition at line 628 of file DasherInterface.cpp.

const CAlphIO::AlphInfo & CDasherInterface::GetInfo const std::string &  AlphID  )  [virtual]
 

Return an AlphInfo object containing the alphabet with name AlphID.

Implements Dasher::CDasherAppInterface.

Definition at line 538 of file DasherInterface.cpp.

References Dasher::CAlphIO::GetInfo(), m_AlphIO, m_SystemLocation, and m_UserLocation.

unsigned int CDasherInterface::GetNumberSymbols  )  [virtual]
 

Request the number of symbols in the current alphabet.

Implements Dasher::CDasherWidgetInterface.

Definition at line 477 of file DasherInterface.cpp.

References Dasher::CAlphabet::GetNumberSymbols(), and m_Alphabet.

int CDasherInterface::GetTextColour symbol  Symbol  ) 
 

Definition at line 503 of file DasherInterface.cpp.

References Dasher::CAlphabet::GetTextColour(), and m_Alphabet.

const std::string & CDasherInterface::GetTrainFile  )  [virtual]
 

Provides a fully qualified path to the training file for the alphabet.

Implements Dasher::CDasherWidgetInterface.

Definition at line 524 of file DasherInterface.cpp.

References m_TrainFile.

void CDasherInterface::KeyControl bool  Value  )  [virtual]
 

Should Dasher be keyboard controlled?

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 410 of file DasherInterface.cpp.

References Dasher::Keys::KEY_CONTROL, Dasher::CDasherSettingsInterface::KeyControl(), m_KeyControl, m_SettingsStore, m_SettingsUI, and CSettingsStore::SetBoolOption().

void CDasherInterface::PauseAt int  MouseX,
int  MouseY
[virtual]
 

Signal an input event and pause the simulation.

Implements Dasher::CDasherWidgetInterface.

Definition at line 126 of file DasherInterface.cpp.

References Dasher::CDashEditbox::CopyAll(), Dasher::CDasherView::FlushAt(), m_CopyAllOnStop, m_DashEditbox, m_DasherView, and Dasher::CDashEditbox::write_to_file().

Referenced by QtDasherScreen::mouseReleaseEvent().

void CDasherInterface::Redraw  )  [virtual]
 

Signal that the core should redraw the screen.

Implements Dasher::CDasherWidgetInterface.

Definition at line 147 of file DasherInterface.cpp.

References Dasher::CDasherView::Display(), m_DasherView, and Dasher::CDasherView::Render().

Referenced by ChangeAlphabet(), ChangeScreen(), QtDasherPlugin::resetState(), SetDasherFont(), and SetDasherFontSize().

void CDasherInterface::SetDasherDimensions bool  Value  )  [virtual]
 

Set the number of dimensions of input (either 1 or 2).

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 463 of file DasherInterface.cpp.

References Dasher::Keys::DASHER_DIMENSIONS, m_DasherModel, m_Dimensions, m_SettingsStore, m_SettingsUI, Dasher::CDasherModel::Set_dimensions(), CSettingsStore::SetBoolOption(), and Dasher::CDasherSettingsInterface::SetDasherDimensions().

void CDasherInterface::SetDasherFont std::string  Name  )  [virtual]
 

Set the canvas font.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 443 of file DasherInterface.cpp.

References Dasher::Keys::DASHER_FONT, m_DasherFont, m_DasherScreen, m_SettingsStore, Redraw(), Dasher::CDasherScreen::SetFont(), and CSettingsStore::SetStringOption().

void CDasherInterface::SetDasherFontSize FontSize  fontsize  ) 
 

Definition at line 453 of file DasherInterface.cpp.

References Dasher::Keys::DASHER_FONTSIZE, m_DasherScreen, m_SettingsStore, Redraw(), Dasher::CDasherScreen::SetFontSize(), and CSettingsStore::SetLongOption().

void CDasherInterface::SetEditFont std::string  Name,
long  Size
[virtual]
 

Set the editbox font.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 428 of file DasherInterface.cpp.

References Dasher::Keys::EDIT_FONT, Dasher::Keys::EDIT_FONT_SIZE, m_DashEditbox, m_EditFont, m_EditFontSize, m_SettingsStore, m_SettingsUI, Dasher::CDasherSettingsInterface::SetEditFont(), Dasher::CDashEditbox::SetFont(), CSettingsStore::SetLongOption(), and CSettingsStore::SetStringOption().

void CDasherInterface::SetFileEncoding Opts::FileEncodingFormats  Encoding  )  [virtual]
 

Set the file encoding of output files to Encoding.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 307 of file DasherInterface.cpp.

References Dasher::Keys::FILE_ENCODING, m_DashEditbox, m_SettingsStore, m_SettingsUI, Dasher::CDasherSettingsInterface::SetFileEncoding(), and CSettingsStore::SetLongOption().

void CDasherInterface::SetInfo const CAlphIO::AlphInfo NewInfo  )  [virtual]
 

Save a new or modified AlphInfo object.

Implements Dasher::CDasherAppInterface.

Definition at line 547 of file DasherInterface.cpp.

References m_AlphIO, m_SystemLocation, m_UserLocation, and Dasher::CAlphIO::SetInfo().

void CDasherInterface::SetSettingsStore CSettingsStore SettingsStore  ) 
 

Tell the core which CSettingsStore should be used.

Definition at line 66 of file DasherInterface.cpp.

References m_SettingsStore, and Dasher::CDasherSettingsInterface::SettingsDefaults().

Referenced by QtDasherScreen::QtDasherScreen().

void CDasherInterface::SetSettingsUI CDasherSettingsInterface SettingsUI  ) 
 

Tell the core which CDasherSettingsInterface should be used.

Provide a pointer to an instance of CDasherSettingsInterface in order to allow for platform dependent configuration of certain options

Definition at line 74 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, and Dasher::CDasherSettingsInterface::SettingsDefaults().

void CDasherInterface::SetSystemLocation std::string  SystemLocation  ) 
 

Set the path for system-wide configuration and files.

Definition at line 94 of file DasherInterface.cpp.

References m_SystemLocation.

Referenced by QtDasherPlugin::QtDasherPlugin().

void CDasherInterface::SetUserLocation std::string  UserLocation  ) 
 

Set the path for user specific configuration and files.

Definition at line 83 of file DasherInterface.cpp.

References Dasher::CAlphabet::GetTrainingFile(), m_Alphabet, m_TrainFile, and m_UserLocation.

void CDasherInterface::ShowSpeedSlider bool  Value  )  [virtual]
 

True if the speed slider should be shown, false otherwise.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 345 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, CSettingsStore::SetBoolOption(), Dasher::Keys::SHOW_SLIDER, and Dasher::CDasherSettingsInterface::ShowSpeedSlider().

void CDasherInterface::ShowToolbar bool  Value  )  [virtual]
 

True if toolbar should be shown, false otherwise.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 318 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, CSettingsStore::SetBoolOption(), Dasher::Keys::SHOW_TOOLBAR, and Dasher::CDasherSettingsInterface::ShowToolbar().

void CDasherInterface::ShowToolbarLargeIcons bool  Value  )  [virtual]
 

True if toolbar should have large icons, false otherwise.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 336 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, CSettingsStore::SetBoolOption(), Dasher::Keys::SHOW_LARGE_ICONS, and Dasher::CDasherSettingsInterface::ShowToolbarLargeIcons().

void CDasherInterface::ShowToolbarText bool  Value  )  [virtual]
 

True if toolbar should show text, false otherwse.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 327 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, CSettingsStore::SetBoolOption(), Dasher::Keys::SHOW_TOOLBAR_TEXT, and Dasher::CDasherSettingsInterface::ShowToolbarText().

void CDasherInterface::Start  )  [virtual]
 

Signal to the core that the model should be started.

Call this function before providing input coordinates and whenever reinitialising Dasher

Implements Dasher::CDasherWidgetInterface.

Definition at line 119 of file DasherInterface.cpp.

References m_DasherModel, and Dasher::CDasherModel::Start().

Referenced by ChangeAlphabet(), QtDasherPlugin::QtDasherPlugin(), and QtDasherPlugin::resetState().

void CDasherInterface::StartOnLeft bool  Value  )  [virtual]
 

Should Dasher start and stop on left mouse button?

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 401 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, m_StartLeft, CSettingsStore::SetBoolOption(), Dasher::Keys::START_MOUSE, and Dasher::CDasherSettingsInterface::StartOnLeft().

void CDasherInterface::StartOnSpace bool  Value  )  [virtual]
 

Should Dasher start and stop on space bar?

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 392 of file DasherInterface.cpp.

References m_SettingsStore, m_SettingsUI, m_StartSpace, CSettingsStore::SetBoolOption(), Dasher::Keys::START_SPACE, and Dasher::CDasherSettingsInterface::StartOnSpace().

void CDasherInterface::TapOn int  MouseX,
int  MouseY,
unsigned long  Time
[virtual]
 

Signal an input location.

Signal an input event. This may be the current location of the mouse or a stylus tap, for example

Parameters:
MouseX The mouse X coordinate, in screen coordinates
MouseY The mouse Y coordinate, in screen coordinates
Time Time in milliseconds, required to keep Dasher running at the correct speed

Implements Dasher::CDasherWidgetInterface.

Definition at line 158 of file DasherInterface.cpp.

References Dasher::CDasherView::Display(), Dasher::CDasherView::DrawKeyboard(), Dasher::CDasherView::DrawMouse(), m_DasherModel, m_DasherView, m_DrawKeyboard, m_DrawMouse, Dasher::CDasherModel::NewFrame(), Dasher::CDasherView::Render(), and Dasher::CDasherView::TapOnDisplay().

Referenced by QtDasherScreen::timer().

void CDasherInterface::TimeStampNewFiles bool  Value  )  [virtual]
 

True if new files should be timestamped, false otherwise.

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 363 of file DasherInterface.cpp.

References m_DashEditbox, m_SettingsStore, m_SettingsUI, CSettingsStore::SetBoolOption(), Dasher::Keys::TIME_STAMP, Dasher::CDashEditbox::TimeStampNewFiles(), and Dasher::CDasherSettingsInterface::TimeStampNewFiles().

void CDasherInterface::Train std::string *  TrainString,
bool  IsMore
[virtual]
 

Train the core on Trainstring.

Parameters:
TrainString UTF-8 encoded string to train the core on
IsMore True if more text is to follow as part of the same logical sequence, false otherwise (this allows the model to make assumptions regarding whether the final character provided is in the middle of a word or not)

Implements Dasher::CDasherAppInterface.

Definition at line 587 of file DasherInterface.cpp.

References Dasher::CLanguageModel::LearnText(), m_LanguageModel, and TrainContext.

void CDasherInterface::TrainFile std::string  Filename  )  [virtual]
 

The file should contain UTF-8 encoded text.

Implements Dasher::CDasherAppInterface.

Definition at line 600 of file DasherInterface.cpp.

References Dasher::CLanguageModel::LearnText(), m_LanguageModel, Opie::Internal::string(), and TrainContext.

Referenced by ChangeLanguageModel().

void CDasherInterface::Unpause unsigned long  Time  )  [virtual]
 

Unpause the simulation.

Parameters:
Time should be in milliscones and should be consistent with previous time values

Implements Dasher::CDasherWidgetInterface.

Definition at line 138 of file DasherInterface.cpp.

References m_DashEditbox, m_DasherModel, Dasher::CDasherModel::Reset_framerate(), and Dasher::CDashEditbox::unflush().

Referenced by QtDasherScreen::mousePressEvent(), and QtDasherPlugin::QtDasherPlugin().

void CDasherInterface::WindowPause bool  Value  )  [virtual]
 

Should Dasher pause when the pointer leaves the window?

Reimplemented from Dasher::CDasherSettingsInterface.

Definition at line 419 of file DasherInterface.cpp.

References m_KeyControl, m_SettingsStore, m_SettingsUI, CSettingsStore::SetBoolOption(), Dasher::Keys::WINDOW_PAUSE, and Dasher::CDasherSettingsInterface::WindowPause().


Member Data Documentation

std::string Dasher::CDasherInterface::AlphabetID [private]
 

Definition at line 145 of file DasherInterface.h.

Referenced by ChangeAlphabet().

const string CDasherInterface::EmptyString = "" [static, private]
 

Definition at line 24 of file DasherInterface.cpp.

Referenced by GetDisplayText(), and GetEditText().

int Dasher::CDasherInterface::LanguageModelID [private]
 

Definition at line 146 of file DasherInterface.h.

Referenced by ChangeAlphabet(), and ChangeLanguageModel().

CAlphabet* Dasher::CDasherInterface::m_Alphabet [private]
 

Definition at line 133 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeLanguageModel(), GetAlphabetOrientation(), GetAlphabetType(), GetDisplayText(), GetEditText(), GetNumberSymbols(), GetTextColour(), SetUserLocation(), and ~CDasherInterface().

CAlphIO* Dasher::CDasherInterface::m_AlphIO [private]
 

Definition at line 141 of file DasherInterface.h.

Referenced by ChangeAlphabet(), DeleteAlphabet(), GetAlphabets(), GetInfo(), and SetInfo().

bool Dasher::CDasherInterface::m_CopyAllOnStop [private]
 

Definition at line 149 of file DasherInterface.h.

Referenced by CopyAllOnStop(), and PauseAt().

CDashEditbox* Dasher::CDasherInterface::m_DashEditbox [private]
 

Definition at line 136 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeEdit(), CreateDasherModel(), PauseAt(), SetEditFont(), SetFileEncoding(), TimeStampNewFiles(), and Unpause().

std::string Dasher::CDasherInterface::m_DasherFont [private]
 

Definition at line 161 of file DasherInterface.h.

Referenced by ChangeScreen(), and SetDasherFont().

CDasherModel* Dasher::CDasherInterface::m_DasherModel [private]
 

Definition at line 135 of file DasherInterface.h.

Referenced by ChangeEdit(), ChangeLanguageModel(), ChangeMaxBitRate(), ChangeView(), CreateDasherModel(), SetDasherDimensions(), Start(), TapOn(), Unpause(), and ~CDasherInterface().

CDasherScreen* Dasher::CDasherInterface::m_DasherScreen [private]
 

Definition at line 137 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeScreen(), ChangeView(), SetDasherFont(), and SetDasherFontSize().

CDasherView* Dasher::CDasherInterface::m_DasherView [private]
 

Definition at line 138 of file DasherInterface.h.

Referenced by ChangeEdit(), ChangeMaxBitRate(), ChangeOrientation(), ChangeScreen(), ChangeView(), PauseAt(), Redraw(), TapOn(), and ~CDasherInterface().

bool Dasher::CDasherInterface::m_Dimensions [private]
 

Definition at line 155 of file DasherInterface.h.

Referenced by CreateDasherModel(), and SetDasherDimensions().

bool Dasher::CDasherInterface::m_DrawKeyboard [private]
 

Definition at line 151 of file DasherInterface.h.

Referenced by ChangeMaxBitRate(), and TapOn().

bool Dasher::CDasherInterface::m_DrawMouse [private]
 

Definition at line 150 of file DasherInterface.h.

Referenced by DrawMouse(), and TapOn().

std::string Dasher::CDasherInterface::m_EditFont [private]
 

Definition at line 162 of file DasherInterface.h.

Referenced by ChangeEdit(), and SetEditFont().

int Dasher::CDasherInterface::m_EditFontSize [private]
 

Definition at line 163 of file DasherInterface.h.

Referenced by ChangeEdit(), and SetEditFont().

bool Dasher::CDasherInterface::m_KeyControl [private]
 

Definition at line 154 of file DasherInterface.h.

Referenced by KeyControl(), and WindowPause().

CLanguageModel* Dasher::CDasherInterface::m_LanguageModel [private]
 

Definition at line 134 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeLanguageModel(), CreateDasherModel(), Train(), TrainFile(), and ~CDasherInterface().

double Dasher::CDasherInterface::m_MaxBitRate [private]
 

Definition at line 148 of file DasherInterface.h.

Referenced by ChangeMaxBitRate(), and CreateDasherModel().

Opts::ScreenOrientations Dasher::CDasherInterface::m_Orientation [private]
 

Definition at line 157 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeOrientation(), and ChangeView().

CSettingsStore* Dasher::CDasherInterface::m_SettingsStore [private]
 

Definition at line 139 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeEdit(), ChangeMaxBitRate(), ChangeOrientation(), CopyAllOnStop(), DrawMouse(), FixLayout(), KeyControl(), SetDasherDimensions(), SetDasherFont(), SetDasherFontSize(), SetEditFont(), SetFileEncoding(), SetSettingsStore(), SetSettingsUI(), ShowSpeedSlider(), ShowToolbar(), ShowToolbarLargeIcons(), ShowToolbarText(), StartOnLeft(), StartOnSpace(), TimeStampNewFiles(), and WindowPause().

CDasherSettingsInterface* Dasher::CDasherInterface::m_SettingsUI [private]
 

Definition at line 140 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeMaxBitRate(), ChangeOrientation(), CopyAllOnStop(), DrawMouse(), FixLayout(), KeyControl(), SetDasherDimensions(), SetEditFont(), SetFileEncoding(), SetSettingsUI(), ShowSpeedSlider(), ShowToolbar(), ShowToolbarLargeIcons(), ShowToolbarText(), StartOnLeft(), StartOnSpace(), TimeStampNewFiles(), and WindowPause().

bool Dasher::CDasherInterface::m_StartLeft [private]
 

Definition at line 153 of file DasherInterface.h.

Referenced by StartOnLeft().

bool Dasher::CDasherInterface::m_StartSpace [private]
 

Definition at line 152 of file DasherInterface.h.

Referenced by StartOnSpace().

std::string Dasher::CDasherInterface::m_SystemLocation [private]
 

Definition at line 159 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeLanguageModel(), DeleteAlphabet(), GetAlphabets(), GetInfo(), SetInfo(), and SetSystemLocation().

std::string Dasher::CDasherInterface::m_TrainFile [private]
 

Definition at line 160 of file DasherInterface.h.

Referenced by ChangeAlphabet(), GetTrainFile(), and SetUserLocation().

std::string Dasher::CDasherInterface::m_UserLocation [private]
 

Definition at line 158 of file DasherInterface.h.

Referenced by ChangeAlphabet(), ChangeLanguageModel(), DeleteAlphabet(), GetAlphabets(), GetInfo(), SetInfo(), and SetUserLocation().

bool Dasher::CDasherInterface::m_WindowPause [private]
 

Definition at line 156 of file DasherInterface.h.

CLanguageModel::CNodeContext* Dasher::CDasherInterface::TrainContext [private]
 

Definition at line 143 of file DasherInterface.h.

Referenced by ChangeLanguageModel(), Train(), TrainFile(), and ~CDasherInterface().

int Dasher::CDasherInterface::ViewID [private]
 

Definition at line 147 of file DasherInterface.h.

Referenced by ChangeScreen(), ChangeView(), and CreateDasherModel().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:58:30 2005 for OPIE by  doxygen 1.4.2