vChewing-macOS/Source/Engine
zonble 2ebc789030 Implements the associated phrases function.
Since we use states manage the input flow in McBopomofo, implementing this function becomes easy. What I did is to create a new state, Associated Phrases state, and let the key handler to emit such a state just after emitting a Committing state.

When the input method controller is under Associated Phrase state, it shows the candidate window with a tooltip, and only accept candidate keys with the shift key. The key handler uses the characters without modifiers in an NSEvent object to find if there is any matching candidate label, so I added a new member "inputTextIgnoringModifiers" to KeyHandlerInput.

I use KeyValueBlobReader to read the associated phrases. I use the cin file from OpenVanilla project but removed the head and tail of the file to pass KeyValueBlobReader's validation.
2022-01-31 13:23:49 +08:00
..
Gramambular Prevents using global state as possible. 2022-01-27 23:19:27 +08:00
Mandarin Enable IBM Keyboard Layout, no update to xib yet 2012-11-13 00:40:26 -08:00
OpenVanilla first commit 2011-09-01 23:56:26 -07:00
.gitignore Use a more tolerant parser for user phrases 2022-01-13 23:27:31 -08:00
AssociatedPhrases.cpp Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
AssociatedPhrases.h Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
CMakeLists.txt Also make PhraseReplacementMap more tolerant 2022-01-18 22:46:26 -08:00
KeyValueBlobReader.cpp Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
KeyValueBlobReader.h Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
KeyValueBlobReaderTest.cpp Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
McBopomofoLM.cpp Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
McBopomofoLM.h Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
ParselessLM.cpp Prevents loading data models repeatedly. 2022-01-30 20:27:33 +08:00
ParselessLM.h Prevents loading data models repeatedly. 2022-01-30 20:27:33 +08:00
ParselessLMBenchmark.cpp Make UserPhrasesLM more tolerant 2022-01-18 16:20:25 -08:00
ParselessLMTest.cpp Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
ParselessPhraseDB.cpp Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
ParselessPhraseDB.h Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
ParselessPhraseDBTest.cpp Use a parseless phrase db to speed up LM loading 2022-01-15 16:15:02 -08:00
PhraseReplacementMap.cpp Also make PhraseReplacementMap more tolerant 2022-01-18 22:46:26 -08:00
PhraseReplacementMap.h Update copyright headers (fixes #213) 2022-01-18 14:21:55 -08:00
PhraseReplacementMapTest.cpp Also make PhraseReplacementMap more tolerant 2022-01-18 22:46:26 -08:00
UserOverrideModel.cpp Converts the preference and non modal view controller to Swift. 2022-01-10 22:01:40 +08:00
UserOverrideModel.h Update copyright headers (fixes #213) 2022-01-18 14:21:55 -08:00
UserPhrasesLM.cpp Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
UserPhrasesLM.h Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
UserPhrasesLMTest.cpp Also make PhraseReplacementMap more tolerant 2022-01-18 22:46:26 -08:00