MCPcopy Create free account
hub / github.com/Kitware/CMake / HandleInput

Method HandleInput

Source/CursesDialog/cmCursesLongMessageForm.cxx:170–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void cmCursesLongMessageForm::HandleInput()
171{
172 if (!this->Form) {
173 return;
174 }
175
176 char debugMessage[128];
177
178 for (;;) {
179 this->PrintKeys();
180 int key = getch();
181
182#ifdef _WIN32
183 if (key == KEY_RESIZE) {
184 HandleResize();
185 }
186#endif // _WIN32
187
188 snprintf(debugMessage, sizeof(debugMessage),
189 "Message widget handling input, key: %d", key);
190 cmCursesForm::LogMessage(debugMessage);
191
192 // quit
193 if (key == 'o' || key == 'e') {
194 break;
195 }
196 if (key == KEY_DOWN || key == ctrl('n') || key == 'j') {
197 form_driver(this->Form, REQ_SCR_FLINE);
198 } else if (key == KEY_UP || key == ctrl('p') || key == 'k') {
199 form_driver(this->Form, REQ_SCR_BLINE);
200 } else if (key == KEY_NPAGE || key == ctrl('d')) {
201 form_driver(this->Form, REQ_SCR_FPAGE);
202 } else if (key == KEY_PPAGE || key == ctrl('u')) {
203 form_driver(this->Form, REQ_SCR_BPAGE);
204 }
205
206 this->UpdateStatusBar();
207 touchwin(stdscr);
208 wrefresh(stdscr);
209 }
210}

Callers

nothing calls this directly

Calls 7

PrintKeysMethod · 0.95
UpdateStatusBarMethod · 0.95
form_driverFunction · 0.85
touchwinFunction · 0.85
wrefreshFunction · 0.85
ctrlFunction · 0.70
snprintfFunction · 0.50

Tested by

no test coverage detected