ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <predictivedialog.h>

Inheritance diagram for GUI::PredictiveDialog:
Collaboration diagram for GUI::PredictiveDialog:

List of all members.

Classes

struct  Dict

Public Member Functions

 PredictiveDialog ()
 ~PredictiveDialog ()
virtual void reflowLayout ()
virtual void handleCommand (GUI::CommandSender *sender, uint32 cmd, uint32 data)
virtual void handleKeyUp (Common::KeyState state)
virtual void handleKeyDown (Common::KeyState state)
const char * getResult () const

Private Types

enum  ButtonId {
  kButton1Act = 0, kButton2Act = 1, kButton3Act = 2, kButton4Act = 3,
  kButton5Act = 4, kButton6Act = 5, kButton7Act = 6, kButton8Act = 7,
  kButton9Act = 8, kNextAct = 9, kAddAct = 10, kDelAct = 11,
  kCancelAct = 12, kOkAct = 13, kModeAct = 14, kButton0Act = 15,
  kNoAct = -1
}
enum  { kButtonCount = kButton0Act + 1 }
enum  { kRepeatDelay = 500 }
enum  { kMaxLineLen = 80, kMaxWordLen = 24, kMaxWord = 50 }

Private Member Functions

uint8 countWordsInString (const char *const str)
void bringWordtoTop (char *str, int wordnum)
void loadDictionary (Common::SeekableReadStream *in, Dict &dict)
void loadAllDictionary (Dict &dict)
void addWordToDict ()
void addWord (Dict &dict, const Common::String &word, const Common::String &code)
bool searchWord (const char *const where, const Common::String &whatCode)
int binarySearch (const char *const *const dictLine, const Common::String &code, const int dictLineCount)
bool matchWord ()
void processButton (ButtonId active)
void pressEditText ()
void saveUserDictToFile ()
void mergeDicts ()
void updateHighLightedButton (ButtonId active)

Private Attributes

Dict _unitedDict
Dict _predictiveDict
Dict _userDict
int _mode
ButtonId _lastButton
bool _userDictHasChanged
int _wordNumber
uint8 _numMatchingWords
char _predictiveResult [40]
Common::String _currentCode
Common::String _currentWord
Common::String _prefix
uint32 _curTime
uint32 _lastTime
ButtonId _lastPressedButton
ButtonId _curPressedButton
char _temp [kMaxWordLen+1]
int _repeatcount [kMaxWordLen]
char * _memoryList [kMaxWord]
int _numMemory
Common::String _search
bool _navigationWithKeys
bool _needRefresh
EditTextWidget_editText
ButtonWidget_button [kButtonCount]

Detailed Description

Definition at line 36 of file predictivedialog.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
kButtonCount 

Definition at line 70 of file predictivedialog.h.

anonymous enum [private]
Enumerator:
kRepeatDelay 

Definition at line 74 of file predictivedialog.h.

anonymous enum [private]
Enumerator:
kMaxLineLen 
kMaxWordLen 
kMaxWord 

Definition at line 78 of file predictivedialog.h.

Enumerator:
kButton1Act 
kButton2Act 
kButton3Act 
kButton4Act 
kButton5Act 
kButton6Act 
kButton7Act 
kButton8Act 
kButton9Act 
kNextAct 
kAddAct 
kDelAct 
kCancelAct 
kOkAct 
kModeAct 
kButton0Act 
kNoAct 

Definition at line 50 of file predictivedialog.h.


Constructor & Destructor Documentation

GUI::PredictiveDialog::PredictiveDialog (  ) 

Definition at line 70 of file predictivedialog.cpp.

GUI::PredictiveDialog::~PredictiveDialog (  ) 

Definition at line 150 of file predictivedialog.cpp.


Member Function Documentation

void GUI::PredictiveDialog::addWord ( Dict dict,
const Common::String word,
const Common::String code 
) [private]

Definition at line 781 of file predictivedialog.cpp.

void GUI::PredictiveDialog::addWordToDict (  )  [private]

Definition at line 902 of file predictivedialog.cpp.

int GUI::PredictiveDialog::binarySearch ( const char *const *const   dictLine,
const Common::String code,
const int  dictLineCount 
) [private]

Definition at line 694 of file predictivedialog.cpp.

void GUI::PredictiveDialog::bringWordtoTop ( char *  str,
int  wordnum 
) [private]

Definition at line 665 of file predictivedialog.cpp.

uint8 GUI::PredictiveDialog::countWordsInString ( const char *const   str  )  [private]

Definition at line 643 of file predictivedialog.cpp.

const char* GUI::PredictiveDialog::getResult (  )  const [inline]

Reimplemented from GUI::Dialog.

Definition at line 47 of file predictivedialog.h.

void GUI::PredictiveDialog::handleCommand ( GUI::CommandSender sender,
uint32  cmd,
uint32  data 
) [virtual]

Reimplemented from GUI::Dialog.

Definition at line 374 of file predictivedialog.cpp.

void GUI::PredictiveDialog::handleKeyDown ( Common::KeyState  state  )  [virtual]

Reimplemented from GUI::Dialog.

Definition at line 201 of file predictivedialog.cpp.

void GUI::PredictiveDialog::handleKeyUp ( Common::KeyState  state  )  [virtual]

Reimplemented from GUI::Dialog.

Definition at line 194 of file predictivedialog.cpp.

void GUI::PredictiveDialog::loadAllDictionary ( Dict dict  )  [private]

Definition at line 972 of file predictivedialog.cpp.

void GUI::PredictiveDialog::loadDictionary ( Common::SeekableReadStream in,
Dict dict 
) [private]

Definition at line 911 of file predictivedialog.cpp.

bool GUI::PredictiveDialog::matchWord (  )  [private]

Definition at line 717 of file predictivedialog.cpp.

void GUI::PredictiveDialog::mergeDicts (  )  [private]

Definition at line 610 of file predictivedialog.cpp.

void GUI::PredictiveDialog::pressEditText (  )  [private]

Definition at line 993 of file predictivedialog.cpp.

void GUI::PredictiveDialog::processButton ( ButtonId  active  )  [private]

Definition at line 444 of file predictivedialog.cpp.

void GUI::PredictiveDialog::reflowLayout (  )  [virtual]

Reimplemented from GUI::Dialog.

Definition at line 159 of file predictivedialog.cpp.

void GUI::PredictiveDialog::saveUserDictToFile (  )  [private]

Definition at line 178 of file predictivedialog.cpp.

bool GUI::PredictiveDialog::searchWord ( const char *const   where,
const Common::String whatCode 
) [private]

Definition at line 760 of file predictivedialog.cpp.

void GUI::PredictiveDialog::updateHighLightedButton ( ButtonId  active  )  [private]

Definition at line 366 of file predictivedialog.cpp.


Member Data Documentation

ButtonWidget* GUI::PredictiveDialog::_button[kButtonCount] [private]

Definition at line 148 of file predictivedialog.h.

Definition at line 132 of file predictivedialog.h.

Definition at line 120 of file predictivedialog.h.

Definition at line 132 of file predictivedialog.h.

char* GUI::PredictiveDialog::_memoryList[kMaxWord] [private]

Definition at line 139 of file predictivedialog.h.

Definition at line 119 of file predictivedialog.h.

Definition at line 144 of file predictivedialog.h.

Definition at line 145 of file predictivedialog.h.

Definition at line 140 of file predictivedialog.h.

Definition at line 116 of file predictivedialog.h.

Definition at line 126 of file predictivedialog.h.

int GUI::PredictiveDialog::_repeatcount[kMaxWordLen] [private]

Definition at line 137 of file predictivedialog.h.

char GUI::PredictiveDialog::_temp[kMaxWordLen+1] [private]

Definition at line 136 of file predictivedialog.h.

Definition at line 115 of file predictivedialog.h.

Definition at line 117 of file predictivedialog.h.

Definition at line 122 of file predictivedialog.h.

Definition at line 124 of file predictivedialog.h.


The documentation for this class was generated from the following files:


Generated on Sat May 18 2019 05:06:42 for ResidualVM by doxygen 1.7.1
curved edge   curved edge