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

Method OnReturn

Source/CursesDialog/cmCursesStringWidget.cxx:47–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void cmCursesStringWidget::OnReturn(cmCursesMainForm* fm, WINDOW* /*unused*/)
48{
49 if (this->InEdit) {
50 cmCursesForm::LogMessage("String widget leaving edit.");
51 this->SetInEdit(false);
52 fm->PrintKeys();
53 this->OriginalString.clear();
54 // trick to force forms to update the field buffer
55 FORM* form = fm->GetForm();
56 form_driver(form, REQ_NEXT_FIELD);
57 form_driver(form, REQ_PREV_FIELD);
58 this->Done = true;
59 } else {
60 cmCursesForm::LogMessage("String widget entering edit.");
61 this->SetInEdit(true);
62 fm->PrintKeys();
63 this->OriginalString = field_buffer(this->Field, 0);
64 }
65}
66
67void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm,
68 WINDOW* /*unused*/)

Callers 1

HandleInputMethod · 0.95

Calls 6

SetInEditMethod · 0.95
form_driverFunction · 0.85
field_bufferFunction · 0.85
GetFormMethod · 0.80
PrintKeysMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected