man pages: document NCREADER_OPTION_CURSOR

This commit is contained in:
nick black 2020-09-06 22:58:31 -04:00 committed by Nick Black
parent f836938ad2
commit af05ae7a92
3 changed files with 24 additions and 3 deletions

View File

@ -4,6 +4,8 @@ rearrangements of Notcurses.
* 1.7.2 (not yet released)
* Exported `ncvisual_default_blitter()`, so that the effective value of
`NCBLIT_DEFAULT` can be determined.
* Added `NCREADER_OPTION_CURSOR`, instructing the `ncreader` to make the
terminal cursor visible, and manage the cursor's placement.
* 1.7.1 (2020-08-31)
* Renamed `CELL_SIMPLE_INITIALIZER` to `CELL_CHAR_INITIALIZER`, and

View File

@ -16,9 +16,10 @@ struct ncplane;
struct ncreader;
struct notcurses;
#define NCREADER_OPTION_HORSCROLL 0x0001
#define NCREADER_OPTION_VERSCROLL 0x0002
#define NCREADER_OPTION_NOCMDKEYS 0x0004
#define NCREADER_OPTION_HORSCROLL 0x0001
#define NCREADER_OPTION_VERSCROLL 0x0002
#define NCREADER_OPTION_NOCMDKEYS 0x0004
#define NCREADER_OPTION_CURSOR 0x0008
typedef struct ncreader_options {
uint64_t tchannels; // channels used for input
@ -61,6 +62,17 @@ navigation with the arrow keys and scrolling. While the visible portion of
the **ncreader** is always the same size (**physrows** by **physcols**), the
actual text backing this visible region can grow arbitrarily large.
The following option flags are supported:
* **NCREADER_OPTION_HORSCROLL**: The visual area will be backed by a plane
that can grow arbitrarily wide.
* **NCREADER_OPTION_VERSCROLL**: The visual area will be backed by a plane
that can grow arbitrarily high.
* **NCREADER_OPTION_NOCMDKEYS**: The typical keyboard shortcuts (see below)
will not be honored.
* **NCREADER_OPTION_CURSOR**: The terminal's cursor will be made visible across
the life of the **ncreader**, and its location will be managed.
The contents of the **ncreader** can be retrieved with **ncreader_contents**.
The **ncreader** consists of at least one **ncplane** (the visible editing
@ -82,6 +94,10 @@ consumed). Otherwise, most inputs will be reproduced onto the **ncreader**
All the **ncreader**'s content is returned from **ncreader_contents**,
preserving whitespace.
"Emacs-style" keyboard shortcuts similar to those supported by **readline(3)**
and most shells are supported unless **NCREADER_OPTION_NOCMDKEYS** is provided
to **ncreader_create**.
# NOTES
Support for **NCREADER_OPTION_VERSCROLL** is not yet implemented.

View File

@ -3020,6 +3020,9 @@ API int ncplane_qrcode(struct ncplane* n, ncblitter_e blitter, int* ymax,
#define NCREADER_OPTION_VERSCROLL 0x0002ull
// Disable all editing shortcuts. By default, emacs-style keys are available.
#define NCREADER_OPTION_NOCMDKEYS 0x0004ull
// Make the terminal cursor visible across the lifetime of the ncreader, and
// have the ncreader manage the cursor's placement.
#define NCREADER_OPTION_CURSOR 0x0008ull
typedef struct ncreader_options {
uint64_t tchannels; // channels used for input