Search code examples
cncursescurses

Ncurses and TextBox


Does something like TextBox exist in ncurses?

Requirements to TextBox:

  • ability to adequate handle KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT, KEY_BACKSPACE, KEY_DC and other.
  • adequate transfer lines.
  • save, if you need, text in char* buffer.

Solution

  • ncurses itself provides lower-level functions from which a "textbox" can be built. For instance, the dialog and cdk libraries use (n)curses to provide these features.