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

#include <Reader.hh>

Inheritance diagram for Reader:
Collaboration diagram for Reader:

Public Member Functions

 Reader (Plane *plane, const ncreader_options *opts)
 
 Reader (Plane &plane, const ncreader_options *opts)
 
 ~Reader ()
 
bool clear () const NOEXCEPT_MAYBE
 
int move_left () const noexcept
 
int move_right () const noexcept
 
int move_up () const noexcept
 
int move_down () const noexcept
 
bool write_egc (const char *egc) const NOEXCEPT_MAYBE
 
charget_contents () const noexcept
 
Planeget_plane () const noexcept
 
- Public Member Functions inherited from Root
notcursesget_notcurses () const
 
NotCursesget_notcurses_cpp () const
 

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 13 of file Reader.hh.

Constructor & Destructor Documentation

◆ Reader() [1/2]

Reader ( Plane plane,
const ncreader_options opts 
)
inlineexplicit

Definition at line 16 of file Reader.hh.

18 {
19 ensure_valid_plane (plane);
20 common_init (Utilities::to_ncplane (plane), opts);
22 }
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
const struct ncplane_options * opts
Definition notcurses.h:3483

◆ Reader() [2/2]

Reader ( Plane plane,
const ncreader_options opts 
)
inlineexplicit

Definition at line 24 of file Reader.hh.

26 {
27 ensure_valid_plane (plane);
28 common_init (Utilities::to_ncplane (plane), opts);
30 }

◆ ~Reader()

~Reader ( )
inline

Definition at line 32 of file Reader.hh.

33 {
35 ncreader_destroy (reader, nullptr);
36 }
bool is_notcurses_stopped() const noexcept
void ncreader_destroy(ncreader *n, char **contents)
Definition reader.c:17
Here is the call graph for this function:

Member Function Documentation

◆ clear()

bool clear ( ) const
inline

Definition at line 38 of file Reader.hh.

39 {
40 bool ret = ncreader_clear (reader) != 0;
41 return error_guard_cond<bool, bool> (ret, ret);
42 }
static TRet error_guard(TValue ret, TValue error_value)
Definition Root.hh:39
int ncreader_clear(ncreader *n)
Definition reader.c:73
Here is the call graph for this function:

◆ get_contents()

char * get_contents ( ) const
inlinenoexcept

Definition at line 74 of file Reader.hh.

75 {
76 return ncreader_contents(reader);
77 }
char * ncreader_contents(const ncreader *n)
Definition reader.c:413
Here is the call graph for this function:

◆ get_plane()

Plane * get_plane ( ) const
inlinenoexcept

Definition at line 79 of file Reader.hh.

80 {
81 return Plane::map_plane (ncreader_plane (reader));
82 }
static Plane * map_plane(ncplane *ncp, Plane *associated_plane=nullptr) noexcept
ncplane * ncreader_plane(ncreader *n)
Definition reader.c:80
Here is the call graph for this function:

◆ move_down()

int move_down ( ) const
inlinenoexcept

Definition at line 64 of file Reader.hh.

65 {
66 return ncreader_move_down (reader);
67 }
int ncreader_move_down(ncreader *n)
Definition reader.c:202
Here is the call graph for this function:

◆ move_left()

int move_left ( ) const
inlinenoexcept

Definition at line 49 of file Reader.hh.

50 {
51 return ncreader_move_left (reader);
52 }
int ncreader_move_left(ncreader *n)
Definition reader.c:115
Here is the call graph for this function:

◆ move_right()

int move_right ( ) const
inlinenoexcept

Definition at line 54 of file Reader.hh.

55 {
56 return ncreader_move_right (reader);
57 }
int ncreader_move_right(ncreader *n)
Definition reader.c:152
Here is the call graph for this function:

◆ move_up()

int move_up ( ) const
inlinenoexcept

Definition at line 59 of file Reader.hh.

60 {
61 return ncreader_move_up (reader);
62 }
int ncreader_move_up(ncreader *n)
Definition reader.c:187
Here is the call graph for this function:

◆ write_egc()

bool write_egc ( const char egc) const
inline

Definition at line 69 of file Reader.hh.

70 {
71 return error_guard (ncreader_write_egc (reader, egc), -1);
72 }
const char * egc
Definition egcpool.h:173
int ncreader_write_egc(ncreader *n, const char *egc)
Definition reader.c:216
Here is the call graph for this function:

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