[manpages] new notcurses_pile.3, cleanups

This commit is contained in:
nick black 2021-11-28 01:20:52 -05:00 committed by nick black
parent 207b037464
commit 37856d9ae3
6 changed files with 77 additions and 26 deletions

View File

@ -54,19 +54,20 @@
<h3>C library (section 3)</h3>
<a href="notcurses_capabilities.3.html">notcurses_capabilities</a>—runtime capability detection<br/>
<a href="notcurses_cell.3.html">notcurses_cell</a>—operations on <tt>nccell</tt> objects<br/>
<a href="notcurses_channels.3.html">notcurses_channels</a>—operations on the <tt>channel</tt> type<br/>
<a href="notcurses_channels.3.html">notcurses_channels</a>—operations on the <tt>ncchannel</tt> type<br/>
<a href="notcurses_core.3.html">notcurses_core</a>—linking against a minimal Notcurses<br/>
<a href="notcurses_direct.3.html">notcurses_direct</a>minimal notcurses instances for styling text<br/>
<a href="notcurses_direct.3.html">notcurses_direct</a>the Direct Mode API<br/>
<a href="notcurses_fade.3.html">notcurses_fade</a>—fading and pulsing for <tt>ncplane</tt>s<br/>
<a href="notcurses_fds.3.html">notcurses_fds</a>—dumping file descriptors/subprocesses to <tt>ncplane</tt>s<br/>
<a href="notcurses_init.3.html">notcurses_init</a>—initialization<br/>
<a href="notcurses_input.3.html">notcurses_input</a>—collecting input<br/>
<a href="notcurses_lines.3.html">notcurses_lines</a>—drawing lines and boxes on <tt>ncplane</tt>s<br/>
<a href="notcurses_menu.3.html">notcurses_menu</a>menus on the top or bottom rows<br/>
<a href="notcurses_menu.3.html">notcurses_menu</a>operations on <tt>ncmenu</tt> objects<br/>
<a href="notcurses_metric.3.html">notcurses_metric</a>—fixed-width formatting with metric suffixes<br/>
<a href="notcurses_multiselector.3.html">notcurses_multiselector</a>—high-level widget for selecting items from a set<br/>
<a href="notcurses_output.3.html">notcurses_output</a>—drawing text on <tt>ncplane</tt>s<br/>
<a href="notcurses_palette.3.html">notcurses_palette</a>—operations on notcurses palettes<br/>
<a href="notcurses_palette.3.html">notcurses_palette</a>—operations on <tt>ncpalette</tt> objects<br/>
<a href="notcurses_pile.3.html">notcurses_plane</a>—operations on Notcurses piles<br/>
<a href="notcurses_plane.3.html">notcurses_plane</a>—operations on <tt>ncplane</tt> objects<br/>
<a href="notcurses_plot.3.html">notcurses_plot</a>—drawing histograms and lineplots<br/>
<a href="notcurses_progbar.3.html">notcurses_progbar</a>—drawing progress bars<br/>
@ -75,7 +76,7 @@
<a href="notcurses_refresh.3.html">notcurses_refresh</a>—refresh an externally-damaged display<br/>
<a href="notcurses_render.3.html">notcurses_render</a>—sync the physical display to a virtual pile<br/>
<a href="notcurses_selector.3.html">notcurses_selector</a>—high-level widget for selecting one item from a set<br/>
<a href="notcurses_stats.3.html">notcurses_stats</a>notcurses runtime statistics<br/>
<a href="notcurses_stats.3.html">notcurses_stats</a>Notcurses runtime statistics<br/>
<a href="notcurses_stdplane.3.html">notcurses_stdplane</a>—acquire the standard <tt>ncplane</tt><br/>
<a href="notcurses_stop.3.html">notcurses_stop</a>—collapse the context<br/>
<a href="notcurses_tabbed.3.html">notcurses_tabbed</a>—tabbed interface widget<br/>

View File

@ -83,6 +83,8 @@ moved to another pile, one pile always exists, known as the standard pile.
Note that rasterizing a pile will replace all content within its margins.
For more information, see **notcurses_pile(3)**.
## Ncplanes
Following initialization, a single ncplane exists, the "standard plane" (see
@ -193,6 +195,7 @@ order to turn most error returns into exceptions.
**notcurses_multiselector(3)**,
**notcurses_output(3)**,
**notcurses_palette(3)**,
**notcurses_pile(3)**,
**notcurses_plane(3)**,
**notcurses_plot(3)**,
**notcurses_progbar(3)**,

View File

@ -4,7 +4,7 @@
# NAME
notcurses_direct - minimal notcurses instances for styling text
notcurses_direct - the Direct Mode API
# SYNOPSIS

View File

@ -4,7 +4,7 @@
# NAME
notcurses_menu - operations on menus
notcurses_menu - operations on ncmenu objects
# SYNOPSIS

View File

@ -0,0 +1,56 @@
% notcurses_pile(3)
% nick black <nickblack@linux.com>
% v2.4.98
# NAME
notcurses_pile - operations on Notcurses piles
# SYNOPSIS
**struct ncplane* notcurses_top(struct notcurses* ***n***);**
**struct ncplane* notcurses_bottom(struct notcurses* ***n***);**
**struct ncplane* ncpile_top(struct ncplane* ***n***);**
**struct ncplane* ncpile_bottom(struct ncplane* ***n***);**
# DESCRIPTION
Notcurses does not export the **ncpile** type, nor any functionality that
uses it directly. Piles are nonetheless an important concept in Notcurses.
Functions which operate on piles (e.g. **ncpile_render(3)** are invoked
with any **ncplane** within that pile.
Piles are collections of **ncplane**s, independent from one another for
purposes of rendering and also thread-safety. While only one pile can be
rasterized (written to the display) at a time, arbitrary concurrent actions
can be safely performed on distinct piles. Piles do not compose: rasterizing
a pile destroys any overlapping material.
A pile is created in one of three ways:
* **ncpile_create(3)** is called,
* **ncvisual_blit(3)** is called with a **NULL** target plane ***n***, or
* **ncplane_reparent(3)** is called with ***n*** equal to ***newparent***,
and ***n*** is not already a root plane.
A pile is destroyed whenever its last **ncplane** is destroyed, or
reparented into some other pile.
The planes of a pile are totally ordered along the z-axis. **ncpile_top** and
**ncpile_bottom** return the topmost and bottommost planes, respectively, of
the pile containing their argument. **notcurses_top** and **notcurses_bottom**
do the same for the standard pile.
# NOTES
# BUGS
# SEE ALSO
**notcurses(3)**,
**notcurses_plane(3)**,
**notcurses_render(3)**,
**notcurses_visual(3)**

View File

@ -28,12 +28,12 @@ typedef struct ncplane_options {
int margin_b, margin_r; // bottom and right margins
} ncplane_options;
#define NCSTYLE_ITALIC 0x0020u
#define NCSTYLE_UNDERLINE 0x0010u
#define NCSTYLE_UNDERCURL 0x0008u
#define NCSTYLE_BOLD 0x0004u
#define NCSTYLE_STRUCK 0x0002u
#define NCSTYLE_BLINK 0x0001u
#define NCSTYLE_MASK 0xffffu
#define NCSTYLE_ITALIC 0x0010u
#define NCSTYLE_UNDERLINE 0x0008u
#define NCSTYLE_UNDERCURL 0x0004u
#define NCSTYLE_BOLD 0x0002u
#define NCSTYLE_STRUCK 0x0001u
#define NCSTYLE_NONE 0
```
@ -41,14 +41,6 @@ typedef struct ncplane_options {
**struct ncplane* ncpile_create(struct notcurses* ***n***, const ncplane_options* ***nopts***);**
**struct ncplane* notcurses_top(struct notcurses* ***n***);**
**struct ncplane* notcurses_bottom(struct notcurses* ***n***);**
**struct ncplane* ncpile_top(struct ncplane* ***n***);**
**struct ncplane* ncpile_bottom(struct ncplane* ***n***);**
**struct ncplane* ncplane_reparent(struct ncplane* ***n***, struct ncplane* ***newparent***);**
**struct ncplane* ncplane_reparent_family(struct ncplane* ***n***, struct ncplane* ***newparent***);**
@ -233,7 +225,7 @@ typedef struct ncplane_options {
**char* ncplane_name(const struct ncplane* ***n***);**
## DESCRIPTION
# DESCRIPTION
Ncplanes are the fundamental drawing object of notcurses. All output functions
take a **struct ncplane** as an argument. They can be any size, and placed
@ -401,6 +393,8 @@ plane is placed immediately atop its new parent on its new pile's z-axis.
When **ncplane_reparent_family** is used, all planes bound to the reparented
plane are moved along with it. Their relative z-order is maintained.
More information is available from **notcurses_pile(3)**.
## Binding
The planes of a pile make up a directed acyclic forest. Planes bound to
@ -475,10 +469,6 @@ plane is the bottommost plane, NULL is returned. It cannot fail.
**ncplane_set_scrolling** returns **true** if scrolling was previously enabled,
and **false** otherwise.
**ncpile_top** and **ncpile_bottom** return the topmost and bottommost planes,
respectively, of the pile containing their argument. **notcurses_top** and
**notcurses_bottom** do the same for the standard pile.
**ncplane_at_yx** and **ncplane_at_cursor** return a heap-allocated copy of the
EGC at the relevant cell, or **NULL** if the cell is invalid. The caller should
free this result. **ncplane_at_yx_cell** and **ncplane_at_cursor_cell** instead
@ -537,5 +527,6 @@ notcurses_refresh(nc);
**notcurses_capabilities(3)**,
**notcurses_cell(3)**,
**notcurses_output(3)**,
**notcurses_pile(3)**,
**notcurses_stdplane(3)**,
**notcurses_visual(3)**