22 #ifndef GUI_PREDICTIVEDIALOG_H 23 #define GUI_PREDICTIVEDIALOG_H 25 #include "gui/dialog.h" 26 #include "common/str.h" 27 #include "common/stream.h" 33 class PicButtonWidget;
40 void reflowLayout()
override;
46 const char *getResult()
const {
return _predictiveResult; }
70 kButtonCount = kButton0Act + 1
84 Dict() : dictLine(
nullptr), dictText(
nullptr), dictActLine(
nullptr),
85 dictLineCount(0), dictTextSize(0) {}
86 ~Dict() { free(dictText); }
96 uint8 countWordsInString(
const char *
const str);
97 void bringWordtoTop(
char *str,
int wordnum);
99 void loadAllDictionary(Dict &dict);
100 void addWordToDict();
102 bool searchWord(
const char *
const where,
const Common::String &whatCode);
103 int binarySearch(
const char *
const *
const dictLine,
const Common::String &code,
const int dictLineCount);
105 void processButton(ButtonId active);
106 void pressEditText();
108 void saveUserDictToFile();
112 void updateHighLightedButton(ButtonId active);
115 Dict _predictiveDict;
119 ButtonId _lastButton;
121 bool _userDictHasChanged;
124 uint8 _numMatchingWords;
125 char _predictiveResult[40];
131 uint32 _curTime, _lastTime;
132 ButtonId _lastPressedButton;
133 ButtonId _curPressedButton;
135 char _temp[kMaxWordLen + 1];
136 int _repeatcount[kMaxWordLen];
138 char *_memoryList[kMaxWord];
143 bool _navigationWithKeys;
Definition: predictivedialog.h:35
Definition: edittext.h:32
Definition: keyboard.h:294