MCPcopy Create free account
hub / github.com/EasyIME/PIME / updateUI

Method updateUI

PIMETextService/PIMEClient.cpp:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void 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
116void Client::updateSelectionKeys(Json::Value& msg) {
117 // set sel keys before update candidates

Callers

nothing calls this directly

Calls 6

setCandFontNameMethod · 0.80
setCandFontSizeMethod · 0.80
setCandPerRowMethod · 0.80
setCandUseCursorMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected