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

#include <Reel.hh>

Inheritance diagram for NcReel:
Collaboration diagram for NcReel:

Public Member Functions

 NcReel (Plane &plane, const ncreel_options *popts=nullptr)
 
 NcReel (Plane *plane, const ncreel_options *popts=nullptr)
 
 ~NcReel ()
 
 operator ncreel * () const noexcept
 
 operator ncreel const * () const noexcept
 
NcTabletadd (NcTablet *after, NcTablet *before, tabletcb cb, void *opaque=nullptr) const
 
NcTabletadd (NcTablet &after, NcTablet &before, tabletcb cb, void *opaque=nullptr) const noexcept
 
int get_tabletcount () const noexcept
 
bool del (NcTablet *t) const NOEXCEPT_MAYBE
 
bool del (NcTablet &t) const NOEXCEPT_MAYBE
 
bool redraw () const NOEXCEPT_MAYBE
 
NcTabletget_focused () const noexcept
 
NcTabletnext () const noexcept
 
NcTabletprev () const noexcept
 
bool offer_input (const struct ncinput *nci) const NOEXCEPT_MAYBE
 
Planeget_plane () const noexcept
 
- Public Member Functions inherited from Root
notcursesget_notcurses () const
 
NotCursesget_notcurses_cpp () const
 

Static Public Attributes

static ncreel_options default_options
 

Friends

class Plane
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 Widget (NotCurses *ncinst)
 
void ensure_valid_plane (Plane *plane) const
 
void ensure_valid_plane (Plane &plane) const
 
void take_plane_ownership (Plane *plane) const
 
void take_plane_ownership (Plane &plane) const
 
- Protected Member Functions inherited from Root
 Root (NotCurses *ncinst)
 
bool is_notcurses_stopped () const 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 14 of file Reel.hh.

Constructor & Destructor Documentation

◆ NcReel() [1/2]

NcReel ( Plane plane,
const ncreel_options popts = nullptr 
)
inlineexplicit

Definition at line 19 of file Reel.hh.

21 {
22 ensure_valid_plane (plane);
23 common_init (Utilities::to_ncplane (plane), popts);
25 }
static TRet error_guard(TValue ret, TValue error_value)
Definition Root.hh:39
static NotCurses * get_notcurses_cpp(const Root *o) noexcept
static ncplane * to_ncplane(const Plane *plane) noexcept
Widget(NotCurses *ncinst)
Definition Widget.hh:12
void take_plane_ownership(Plane *plane) const
Definition Widget.hh:29
void ensure_valid_plane(Plane *plane) const
Definition Widget.hh:16

◆ NcReel() [2/2]

NcReel ( Plane plane,
const ncreel_options popts = nullptr 
)
inlineexplicit

Definition at line 27 of file Reel.hh.

29 {
30 if (plane == nullptr)
31 throw invalid_argument ("'plane' must be a valid pointer");
32
33 ensure_valid_plane (plane);
34 common_init (Utilities::to_ncplane (plane), popts);
36 }

◆ ~NcReel()

~NcReel ( )
inline

Definition at line 38 of file Reel.hh.

39 {
41 ncreel_destroy (reel);
42 }
bool is_notcurses_stopped() const noexcept
void ncreel_destroy(ncreel *nreel)
Definition reel.c:880
Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

NcTablet * add ( NcTablet after,
NcTablet before,
tabletcb  cb,
void opaque = nullptr 
) const
inlinenoexcept

Definition at line 64 of file Reel.hh.

65 {
66 return add (&after, &before, cb, opaque);
67 }
NcTablet * add(NcTablet *after, NcTablet *before, tabletcb cb, void *opaque=nullptr) const
Definition Reel.hh:55

◆ add() [2/2]

NcTablet * add ( NcTablet after,
NcTablet before,
tabletcb  cb,
void opaque = nullptr 
) const
inline

Definition at line 55 of file Reel.hh.

56 {
57 nctablet *t = ncreel_add (reel, get_tablet (after), get_tablet (before), cb, opaque);
58 if (t == nullptr)
59 throw init_error ("Notcurses failed to create a new tablet");
60
62 }
static NcTablet * map_tablet(nctablet *t, NotCurses *ncinst=nullptr) noexcept
NotCurses * get_notcurses_cpp() const
Definition Root.hh:28
nctablet * ncreel_add(ncreel *nr, nctablet *after, nctablet *before, tabletcb cbfxn, void *opaque)
Definition reel.c:838
Here is the call graph for this function:

◆ del() [1/2]

bool del ( NcTablet t) const
inline

Definition at line 79 of file Reel.hh.

80 {
81 return del (&t);
82 }
bool del(NcTablet *t) const NOEXCEPT_MAYBE
Definition Reel.hh:74

◆ del() [2/2]

bool del ( NcTablet t) const
inline

Definition at line 74 of file Reel.hh.

75 {
76 return error_guard (ncreel_del (reel, get_tablet (t)), -1);
77 }
int ncreel_del(ncreel *nr, struct nctablet *t)
Definition reel.c:285
Here is the call graph for this function:

◆ get_focused()

NcTablet * get_focused ( ) const
inlinenoexcept

Definition at line 89 of file Reel.hh.

90 {
91 nctablet *t = ncreel_focused (reel);
92 if (t == nullptr)
93 return nullptr;
94
96 }
nctablet * ncreel_focused(ncreel *nr)
Definition reel.c:901
Here is the call graph for this function:

◆ get_plane()

Plane * get_plane ( ) const
noexcept

◆ get_tabletcount()

int get_tabletcount ( ) const
inlinenoexcept

Definition at line 69 of file Reel.hh.

70 {
71 return ncreel_tabletcount (reel);
72 }
int ncreel_tabletcount(const ncreel *nreel)
Definition reel.c:897
Here is the call graph for this function:

◆ next()

NcTablet * next ( ) const
inlinenoexcept

Definition at line 98 of file Reel.hh.

99 {
100 nctablet *t = ncreel_next (reel);
101 if (t == nullptr)
102 return nullptr;
103
105 }
nctablet * ncreel_next(ncreel *nr)
Definition reel.c:905
Here is the call graph for this function:

◆ offer_input()

bool offer_input ( const struct ncinput nci) const
inline

Definition at line 116 of file Reel.hh.

117 {
118 return error_guard<bool, bool> (ncreel_offer_input (reel, nci), false);
119 }
bool ncreel_offer_input(ncreel *n, const ncinput *nc)
Definition reel.c:925
Here is the call graph for this function:

◆ operator ncreel *()

operator ncreel * ( ) const
inlinenoexcept

Definition at line 44 of file Reel.hh.

45 {
46 return reel;
47 }

◆ operator ncreel const *()

operator ncreel const * ( ) const
inlinenoexcept

Definition at line 49 of file Reel.hh.

50 {
51 return reel;
52 }

◆ prev()

NcTablet * prev ( ) const
inlinenoexcept

Definition at line 107 of file Reel.hh.

108 {
109 nctablet *t = ncreel_prev (reel);
110 if (t == nullptr)
111 return nullptr;
112
114 }
nctablet * ncreel_prev(ncreel *nr)
Definition reel.c:915
Here is the call graph for this function:

◆ redraw()

bool redraw ( ) const
inline

Definition at line 84 of file Reel.hh.

85 {
86 return error_guard (ncreel_redraw (reel), -1);
87 }
int ncreel_redraw(ncreel *nr)
Definition reel.c:677
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Plane

friend class Plane
friend

Definition at line 142 of file Reel.hh.

Field Documentation

◆ default_options

ncreel_options default_options
static

Definition at line 17 of file Reel.hh.


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