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

Method HandleResize

Source/CursesDialog/cmCursesForm.cxx:52–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void cmCursesForm::HandleResize()
53{
54 endwin();
55 if (!initscr()) {
56 static char const errmsg[] = "Error: ncurses initialization failed\n";
57#ifdef _WIN32
58 fprintf(stderr, "%s", errmsg);
59#else
60 auto r = write(STDERR_FILENO, errmsg, sizeof(errmsg) - 1);
61 static_cast<void>(r);
62#endif // _WIN32
63 exit(1);
64 }
65 noecho(); /* Echo off */
66 cbreak(); /* nl- or cr not needed */
67 keypad(stdscr, true); /* Use key symbols as KEY_DOWN */
68 refresh();
69 int x;
70 int y;
71 getmaxyx(stdscr, y, x);
72 this->Render(1, 1, x, y);
73 this->UpdateStatusBar();
74}

Callers 1

onsigFunction · 0.80

Calls 9

endwinFunction · 0.85
initscrFunction · 0.85
writeFunction · 0.85
noechoFunction · 0.85
cbreakFunction · 0.85
keypadFunction · 0.85
refreshFunction · 0.85
RenderMethod · 0.45
UpdateStatusBarMethod · 0.45

Tested by

no test coverage detected