| 45 | } |
| 46 | |
| 47 | void 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 | |
| 67 | void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm, |
| 68 | WINDOW* /*unused*/) |
no test coverage detected