Notcurses 3.0.13
a blingful library for TUIs and character graphics
Loading...
Searching...
No Matches
Pile Class Reference

#include <Pile.hh>

Inheritance diagram for Pile:
Collaboration diagram for Pile:

Public Member Functions

 Pile (ncplane_options const *nopts, NotCurses *ncinst=nullptr)
 
bool render () const NOEXCEPT_MAYBE
 
bool rasterize () const NOEXCEPT_MAYBE
 
bool show () const NOEXCEPT_MAYBE
 
- Public Member Functions inherited from Plane
 Plane (Plane &&other)
 
 Plane (Plane const &other)
 
 Plane (Plane const &other, void *opaque)
 
 Plane (Plane *n, int rows, int cols, int yoff, int xoff, void *opaque=nullptr)
 
 Plane (const Plane *n, int rows, int cols, int yoff, int xoff, void *opaque=nullptr)
 
 Plane (Plane *n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
 
 Plane (const Plane *n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
 
 Plane (const Plane &n, int rows, int cols, int yoff, int xoff, void *opaque=nullptr)
 
 Plane (unsigned rows, unsigned cols, int yoff, int xoff, void *opaque=nullptr, NotCurses *ncinst=nullptr)
 
 Plane (Plane &n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
 
 Plane (Plane const &n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
 
 Plane (Plane &n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
 
 Plane (Plane const &n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
 
 Plane (Plane *n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
 
 Plane (Plane const *n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
 
 Plane (ncplane *_plane) noexcept
 
 ~Plane () noexcept
 
 operator ncplane * () noexcept
 
 operator ncplane const * () const noexcept
 
void center_abs (int *y, int *x) const noexcept
 
ncplaneto_ncplane () const noexcept
 
bool resize_maximize () const NOEXCEPT_MAYBE
 
bool resize_realign () const NOEXCEPT_MAYBE
 
bool resize (int keepy, int keepx, int keepleny, int keeplenx, int yoff, int xoff, int ylen, int xlen) const NOEXCEPT_MAYBE
 
bool pulse (const timespec *ts, fadecb fader, void *curry) const NOEXCEPT_MAYBE
 
int gradient (int y, int x, unsigned ylen, unsigned xlen, const char *egc, uint16_t stylemask, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) const NOEXCEPT_MAYBE
 
int gradient2x1 (int y, int x, unsigned ylen, unsigned xlen, uint32_t ul, uint32_t ur, uint32_t ll, uint32_t lr) const NOEXCEPT_MAYBE
 
void greyscale () const noexcept
 
bool resize (int ylen, int xlen) const NOEXCEPT_MAYBE
 
bool fadeout (timespec *ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
 
bool fadeout (timespec &ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
 
bool fadeout (timespec const &ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
 
bool fadeout (const timespec *ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
 
bool fadein (timespec *ts, fadecb fader=nullptr) const NOEXCEPT_MAYBE
 
bool fadein (timespec &ts, fadecb fader=nullptr) const NOEXCEPT_MAYBE
 
bool fadein (timespec const &ts, fadecb fader=nullptr) const NOEXCEPT_MAYBE
 
bool fadein (const timespec *ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
 
void erase () const noexcept
 
int get_abs_x () const noexcept
 
int get_abs_y () const noexcept
 
int get_x () const noexcept
 
int get_y () const noexcept
 
int get_align (NCAlign align, int c) const NOEXCEPT_MAYBE
 
int get_halign (NCAlign align, int c) const NOEXCEPT_MAYBE
 
int get_valign (NCAlign align, int r) const NOEXCEPT_MAYBE
 
void get_dim (unsigned *rows, unsigned *cols) const noexcept
 
void get_dim (unsigned &rows, unsigned &cols) const noexcept
 
unsigned get_dim_x () const noexcept
 
unsigned get_dim_y () const noexcept
 
void get_abs_yx (int *y, int *x) const noexcept
 
void get_yx (int *y, int *x) const noexcept
 
void get_yx (int &y, int &x) const noexcept
 
Planeget_parent () const noexcept
 
Planereparent (Plane *newparent=nullptr) const noexcept
 
Planereparent (const Plane *newparent) const noexcept
 
Planereparent (const Plane &newparent) const noexcept
 
Planereparent_family (Plane *newparent=nullptr) const noexcept
 
Planereparent_family (const Plane *newparent) const noexcept
 
Planereparent_family (const Plane &newparent) const noexcept
 
void home () const noexcept
 
bool move (int y, int x) const NOEXCEPT_MAYBE
 
void move_top () noexcept
 
void move_bottom () noexcept
 
bool move_below (Plane &below) const NOEXCEPT_MAYBE
 
bool move_below (Plane *below) const
 
bool move_above (Plane &above) const NOEXCEPT_MAYBE
 
bool move_above (Plane *above) const
 
bool mergedown (Plane &dst, unsigned begsrcy, unsigned begsrcx, unsigned leny, unsigned lenx, unsigned dsty, unsigned dstx) const
 
bool mergedown (Plane *dst, int begsrcy, int begsrcx, unsigned leny, unsigned lenx, int dsty, int dstx) const
 
bool mergedown_simple (Plane &dst) const
 
bool mergedown_simple (Plane *dst) const
 
bool cursor_move (int y, int x) const NOEXCEPT_MAYBE
 
void get_cursor_yx (unsigned *y, unsigned *x) const noexcept
 
void get_cursor_yx (unsigned &y, unsigned &x) const noexcept
 
unsigned cursor_y () const noexcept
 
unsigned cursor_x () const noexcept
 
int putc (const Cell &c) const NOEXCEPT_MAYBE
 
int putc (const Cell *c) const
 
int putc (int y, int x, Cell const &c) const NOEXCEPT_MAYBE
 
int putc (int y, int x, Cell const *c) const NOEXCEPT_MAYBE
 
int putc (char c, bool retain_styling=false) const NOEXCEPT_MAYBE
 
int putc (int y, int x, char c) const NOEXCEPT_MAYBE
 
int putc (const char *gclust, size_t *sbytes=nullptr, bool retain_styling=false) const NOEXCEPT_MAYBE
 
int putc (int y, int x, const char *gclust, size_t *sbytes=nullptr) const NOEXCEPT_MAYBE
 
int putc (const wchar_t *gclust, size_t *sbytes=nullptr, bool retain_styling=false) const NOEXCEPT_MAYBE
 
int putc (int y, int x, const wchar_t *gclust, size_t *sbytes=nullptr) const NOEXCEPT_MAYBE
 
int putwch (int y, int x, wchar_t w) const NOEXCEPT_MAYBE
 
int putwch (wchar_t w) const NOEXCEPT_MAYBE
 
int putwc_stained (wchar_t w) const NOEXCEPT_MAYBE
 
int putstr (const char *gclustarr) const NOEXCEPT_MAYBE
 
int putstr (int y, int x, const char *gclustarr) const NOEXCEPT_MAYBE
 
int putstr (int y, NCAlign atype, const char *s) const NOEXCEPT_MAYBE
 
int putstr (const wchar_t *gclustarr) const NOEXCEPT_MAYBE
 
int putstr (int y, int x, const wchar_t *gclustarr) const NOEXCEPT_MAYBE
 
int putstr (int y, NCAlign atype, const wchar_t *gcluststyles) const NOEXCEPT_MAYBE
 
int putstr_stained (const wchar_t *gclustarr) const NOEXCEPT_MAYBE
 
int putstr_stained (const char *s) const NOEXCEPT_MAYBE
 
int printf_stained (const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
 
int va_start (va, format)
 
 va_end (va)
 
return error_guard (ret, -1)
 
int printf (const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
 
int va_start (va, format)
 
 va_end (va)
 
return error_guard (ret, -1)
 
int printf (int y, int x, const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
 
int va_start (va, format)
 
 va_end (va)
 
return error_guard (ret, -1)
 
int printf (int y, NCAlign align, const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
 
int va_start (va, format)
 
 va_end (va)
 
return error_guard (ret, -1)
 
int vprintf_stained (const char *format, va_list ap) const NOEXCEPT_MAYBE
 
int vprintf (const char *format, va_list ap) const NOEXCEPT_MAYBE
 
int vprintf (int y, int x, const char *format, va_list ap) const NOEXCEPT_MAYBE
 
int vprintf (int y, NCAlign align, const char *format, va_list ap) const NOEXCEPT_MAYBE
 
int hline (const Cell &c, unsigned len) const NOEXCEPT_MAYBE
 
int hline (const Cell &c, unsigned len, uint64_t c1, uint64_t c2) const NOEXCEPT_MAYBE
 
int vline (const Cell &c, unsigned len) const NOEXCEPT_MAYBE
 
int vline (const Cell &c, unsigned len, uint64_t c1, uint64_t c2) const NOEXCEPT_MAYBE
 
bool load_box (uint16_t styles, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl, const char *gclusters) const NOEXCEPT_MAYBE
 
bool load_box (CellStyle style, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl, const char *gclusters) const NOEXCEPT_MAYBE
 
bool load_rounded_box (uint16_t styles, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
 
bool load_rounded_box (CellStyle style, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
 
bool load_double_box (uint16_t styles, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
 
bool load_double_box (CellStyle style, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
 
bool box (const Cell &ul, const Cell &ur, const Cell &ll, const Cell &lr, const Cell &hline, const Cell &vline, int ystop, int xstop, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool box_sized (const Cell &ul, const Cell &ur, const Cell &ll, const Cell &lr, const Cell &hline, const Cell &vline, int ylen, int xlen, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool rounded_box (uint16_t styles, uint64_t channels, int ystop, int xstop, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool rounded_box_sized (uint16_t styles, uint64_t channels, int ylen, int xlen, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool double_box (uint16_t styles, uint64_t channels, int ystop, int xstop, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool double_box_sized (uint16_t styles, uint64_t channels, int ylen, int xlen, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool perimeter (const Cell &ul, const Cell &ur, const Cell &ll, const Cell &lr, const Cell &hline, const Cell &vline, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool perimeter_rounded (uint16_t stylemask, uint64_t channels, unsigned ctlword) const NOEXCEPT_MAYBE
 
bool perimeter_double (uint16_t stylemask, uint64_t channels, unsigned ctlword) const NOEXCEPT_MAYBE
 
int polyfill (int y, int x, const Cell &c) const NOEXCEPT_MAYBE
 
uint32_trgba (ncblitter_e blit, unsigned begy, unsigned begx, unsigned leny, unsigned lenx) const noexcept
 
charcontent (unsigned begy, unsigned begx, unsigned leny, unsigned lenx) const noexcept
 
uint64_t get_channels () const noexcept
 
unsigned get_bchannel () const noexcept
 
unsigned get_fchannel () const noexcept
 
unsigned get_fg_rgb () const noexcept
 
unsigned get_bg_rgb () const noexcept
 
unsigned get_fg_alpha () const noexcept
 
void set_channels (uint64_t channels) const noexcept
 
bool set_fg_alpha (unsigned alpha) const NOEXCEPT_MAYBE
 
unsigned get_bg_alpha () const noexcept
 
bool set_bg_alpha (unsigned alpha) const NOEXCEPT_MAYBE
 
unsigned get_fg_rgb8 (unsigned *r, unsigned *g, unsigned *b) const noexcept
 
bool set_fg_rgb8 (int r, int g, int b, bool clipped=false) const NOEXCEPT_MAYBE
 
bool set_fg_palindex (int idx) const NOEXCEPT_MAYBE
 
bool set_fg_rgb (uint32_t channel) const NOEXCEPT_MAYBE
 
void set_fg_default () const noexcept
 
unsigned get_bg_rgb8 (unsigned *r, unsigned *g, unsigned *b) const noexcept
 
bool set_bg_rgb8 (int r, int g, int b, bool clipped=false) const NOEXCEPT_MAYBE
 
bool set_bg_palindex (int idx) const NOEXCEPT_MAYBE
 
bool set_bg_rgb (uint32_t channel) const NOEXCEPT_MAYBE
 
void set_bg_default () const noexcept
 
bool set_scrolling (bool scrollp) const noexcept
 
unsigned get_styles () const noexcept
 
void styles_set (CellStyle styles) const noexcept
 
void styles_on (CellStyle styles) const noexcept
 
void styles_off (CellStyle styles) const noexcept
 
int format (int y, int x, unsigned ylen, unsigned xlen, uint16_t stylemask) const NOEXCEPT_MAYBE
 
int stain (int y, int x, unsigned ylen, unsigned xlen, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) const NOEXCEPT_MAYBE
 
Planeget_below () const noexcept
 
Planeget_above () const noexcept
 
bool set_base_cell (Cell &c) const NOEXCEPT_MAYBE
 
bool set_base (const char *egc, uint16_t stylemask, uint64_t channels) const NOEXCEPT_MAYBE
 
bool get_base (Cell &c) const NOEXCEPT_MAYBE
 
int at_cursor (Cell &c) const NOEXCEPT_MAYBE
 
int at_cursor (Cell *c) const noexcept
 
charat_cursor (uint16_t *stylemask, uint64_t *channels) const
 
int get_at (int y, int x, Cell &c) const NOEXCEPT_MAYBE
 
int get_at (int y, int x, Cell *c) const
 
charget_at (int y, int x, uint16_t *stylemask, uint64_t *channels) const
 
voidset_userptr (void *opaque) const noexcept
 
template<typename T >
Tset_userptr (T *opaque) const noexcept
 
voidget_userptr () const noexcept
 
template<typename T >
Tget_userptr () const noexcept
 
NcReelncreel_create (const ncreel_options *popts=nullptr)
 
int load_egc32 (Cell &cell, uint32_t egc) const NOEXCEPT_MAYBE
 
int load (Cell &cell, const char *gcluster) const NOEXCEPT_MAYBE
 
bool load (Cell &cell, char ch) const NOEXCEPT_MAYBE
 
int prime (Cell &cell, const char *gcluster, uint16_t styles, uint64_t channels) const NOEXCEPT_MAYBE
 
void release (Cell &cell) const noexcept
 
int duplicate (Cell &target, Cell &source) const NOEXCEPT_MAYBE
 
int duplicate (Cell &target, Cell const &source) const NOEXCEPT_MAYBE
 
int duplicate (Cell &target, Cell *source) const
 
int duplicate (Cell &target, Cell const *source) const
 
int duplicate (Cell *target, Cell *source) const
 
int duplicate (Cell *target, Cell const *source) const
 
int duplicate (Cell *target, Cell &source) const
 
int duplicate (Cell *target, Cell const &source) const
 
void translate (const Plane *dst, int *y=nullptr, int *x=nullptr) const noexcept
 
void translate (const Plane &dst, int *y=nullptr, int *x=nullptr) const noexcept
 
bool translate_abs (int *y=nullptr, int *x=nullptr) const NOEXCEPT_MAYBE
 
bool rotate_cw () const NOEXCEPT_MAYBE
 
bool rotate_ccw () const noexcept
 
charstrdup (Cell const &cell) const noexcept
 
charextract (Cell const &cell, uint16_t *stylemask=nullptr, uint64_t *channels=nullptr)
 
const charget_extended_gcluster (Cell &cell) const noexcept
 
const charget_extended_gcluster (Cell const &cell) const noexcept
 
bool blit_bgrx (const void *data, int linesize, const struct ncvisual_options *vopts) const NOEXCEPT_MAYBE
 
bool blit_rgba (const void *data, int linesize, const struct ncvisual_options *vopts) const NOEXCEPT_MAYBE
 
int qrcode (unsigned *ymax, unsigned *xmax, const void *data, size_t len) const NOEXCEPT_MAYBE
 
bool is_descendant_of (const Plane &ancestor) const noexcept
 
bool is_fg_default () const noexcept
 
bool is_bg_default () const noexcept
 
bool is_valid () const noexcept
 
void set_resizecb (int(*resizecb)(struct ncplane *)) const noexcept
 
- Public Member Functions inherited from Root
notcursesget_notcurses () const
 
NotCursesget_notcurses_cpp () const
 

Static Public Member Functions

static Planetop_with (const Plane &plane) noexcept
 
static Planebottom_with (const Plane &plane) noexcept
 
- Static Public Member Functions inherited from Plane
static void translate (const Plane *src, const Plane *dst, int *y=nullptr, int *x=nullptr)
 
static void translate (const Plane &src, const Plane &dst, int *y=nullptr, int *x=nullptr) noexcept
 
static Planemap_plane (ncplane *ncp, Plane *associated_plane=nullptr) noexcept
 

Additional Inherited Members

- Data Fields inherited from Plane
int ret = ncplane_vprintf_stained (plane, format, va)
 
- Protected Member Functions inherited from Plane
 Plane (ncplane *_plane, bool _is_stdplane)
 
 Plane (NotCurses *ncinst=nullptr)
 
void set_plane (ncplane *_plane)
 
void release_native_plane () noexcept
 
- Protected Member Functions inherited from Root
 Root (NotCurses *ncinst)
 
bool is_notcurses_stopped () const noexcept
 
- Static Protected Member Functions inherited from Plane
static void unmap_plane (Plane *p) noexcept
 
- Static Protected Member Functions inherited from Root
template<typename TRet = bool, typename TValue = int>
static TRet error_guard (TValue ret, TValue error_value)
 
template<typename TRet = bool, typename TValue = int>
static TRet error_guard_cond (TValue ret, bool error_value)
 
- Static Protected Attributes inherited from Root
static constexpr char ncpp_invalid_state_message [] = "notcurses++ is in an invalid state (already stopped?)"
 

Detailed Description

Definition at line 12 of file Pile.hh.

Constructor & Destructor Documentation

◆ Pile()

Pile ( ncplane_options const nopts,
NotCurses ncinst = nullptr 
)
inline

Definition at line 15 of file Pile.hh.

16 : Plane (ncinst)
17 {
18 if (nopts == nullptr) {
19 throw invalid_argument ("'nopts' must be a valid pointer");
20 }
21
22 notcurses *n;
23 if (ncinst == nullptr) {
25 } else {
26 n = *ncinst;
27 }
28
29 ncplane *pile = ncpile_create (n, nopts);
30 if (pile == nullptr) {
31 throw init_error ("Notcurses failed to create a new pile");
32 }
33
34 set_plane (pile);
35 }
static NotCurses & get_instance()
Definition NotCurses.hh:49
Plane(Plane &&other)
Definition Plane.hh:24
return error_guard(ret, -1)
void set_plane(ncplane *_plane)
Definition Plane.hh:1268
ncplane * ncpile_create(notcurses *nc, const struct ncplane_options *nopts)
Definition notcurses.c:711
vopts n
Definition notcurses.h:3502
Here is the call graph for this function:

Member Function Documentation

◆ bottom_with()

static Plane * bottom_with ( const Plane plane)
inlinestaticnoexcept

Definition at line 66 of file Pile.hh.

67 {
68 ncplane* ret = ncpile_bottom (const_cast<Plane&>(plane));
69 if (ret == nullptr) {
70 return nullptr;
71 }
72
73 return map_plane (ret);
74 }
static Plane * map_plane(ncplane *ncp, Plane *associated_plane=nullptr) noexcept
ncplane * ncpile_bottom(ncplane *n)
Definition notcurses.c:2544
Here is the call graph for this function:

◆ rasterize()

bool rasterize ( ) const
inline

Definition at line 42 of file Pile.hh.

43 {
44 return error_guard (ncpile_rasterize (to_ncplane ()), -1);
45 }
ncplane * to_ncplane() const noexcept
Definition Plane.hh:179
int ncpile_rasterize(ncplane *n)
Definition render.c:1517
Here is the call graph for this function:

◆ render()

bool render ( ) const
inline

Definition at line 37 of file Pile.hh.

38 {
39 return error_guard (ncpile_render (to_ncplane ()), -1);
40 }
int ncpile_render(ncplane *n)
Definition render.c:1569
Here is the call graph for this function:

◆ show()

bool show ( ) const
inline

Definition at line 47 of file Pile.hh.

48 {
49 if (!render ()) {
50 return false;
51 }
52
53 return rasterize ();
54 }
bool render() const NOEXCEPT_MAYBE
Definition Pile.hh:37
bool rasterize() const NOEXCEPT_MAYBE
Definition Pile.hh:42

◆ top_with()

static Plane * top_with ( const Plane plane)
inlinestaticnoexcept

Definition at line 56 of file Pile.hh.

57 {
58 ncplane* ret = ncpile_top (const_cast<Plane&>(plane));
59 if (ret == nullptr) {
60 return nullptr;
61 }
62
63 return map_plane (ret);
64 }
ncplane * ncpile_top(ncplane *n)
Definition notcurses.c:2540
Here is the call graph for this function:

The documentation for this class was generated from the following file: