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 () override
void reflowLayout () override
void handleCommand (GUI::CommandSender *sender, uint32 cmd, uint32 data) override
void handleKeyUp (Common::KeyState state) override
void handleKeyDown (Common::KeyState state) override
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
bool _isPressed
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 (  )  [override]

Definition at line 152 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 792 of file predictivedialog.cpp.

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

Definition at line 913 of file predictivedialog.cpp.

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

Definition at line 705 of file predictivedialog.cpp.

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

Definition at line 676 of file predictivedialog.cpp.

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

Definition at line 654 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 
) [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 383 of file predictivedialog.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 205 of file predictivedialog.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 196 of file predictivedialog.cpp.

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

Definition at line 983 of file predictivedialog.cpp.

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

Definition at line 922 of file predictivedialog.cpp.

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

Definition at line 728 of file predictivedialog.cpp.

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

Definition at line 621 of file predictivedialog.cpp.

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

Definition at line 1004 of file predictivedialog.cpp.

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

Definition at line 453 of file predictivedialog.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 161 of file predictivedialog.cpp.

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

Definition at line 180 of file predictivedialog.cpp.

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

Definition at line 771 of file predictivedialog.cpp.

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

Definition at line 375 of file predictivedialog.cpp.


Member Data Documentation

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

Definition at line 150 of file predictivedialog.h.

Definition at line 132 of file predictivedialog.h.

Definition at line 146 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 30 2020 05:03:22 for ResidualVM by doxygen 1.7.1
curved edge   curved edge