| 94 | } |
| 95 | |
| 96 | void Client::updateUI(const Json::Value& data) { |
| 97 | for (auto it = data.begin(); it != data.end(); ++it) { |
| 98 | const char* name = it.memberName(); |
| 99 | const Json::Value& value = *it; |
| 100 | if (value.isString() && strcmp(name, "candFontName") == 0) { |
| 101 | wstring fontName = utf8ToUtf16(value.asCString()); |
| 102 | textService_->setCandFontName(fontName); |
| 103 | } |
| 104 | else if (value.isInt() && strcmp(name, "candFontSize") == 0) { |
| 105 | textService_->setCandFontSize(value.asInt()); |
| 106 | } |
| 107 | else if (value.isInt() && strcmp(name, "candPerRow") == 0) { |
| 108 | textService_->setCandPerRow(value.asInt()); |
| 109 | } |
| 110 | else if (value.isBool() && strcmp(name, "candUseCursor") == 0) { |
| 111 | textService_->setCandUseCursor(value.asBool()); |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void Client::updateSelectionKeys(Json::Value& msg) { |
| 117 | // set sel keys before update candidates |
nothing calls this directly
no test coverage detected