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

#include <Widget.hh>

Inheritance diagram for Widget:
Collaboration diagram for Widget:

Protected Member Functions

 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
 

Additional Inherited Members

- Public Member Functions inherited from Root
notcursesget_notcurses () const
 
NotCursesget_notcurses_cpp () const
 
- 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 9 of file Widget.hh.

Constructor & Destructor Documentation

◆ Widget()

Widget ( NotCurses ncinst)
inlineexplicitprotected

Definition at line 12 of file Widget.hh.

13 : Root (ncinst)
14 {}
Root(NotCurses *ncinst)
Definition Root.hh:34
static TRet error_guard(TValue ret, TValue error_value)
Definition Root.hh:39

Member Function Documentation

◆ ensure_valid_plane() [1/2]

void ensure_valid_plane ( Plane plane) const
inlineprotected

Definition at line 23 of file Widget.hh.

24 {
25 if (!plane.is_valid ())
26 throw invalid_argument ("Invalid Plane object passed in 'plane'. Widgets must not reuse the same plane.");
27 }
Here is the call graph for this function:

◆ ensure_valid_plane() [2/2]

void ensure_valid_plane ( Plane plane) const
inlineprotected

Definition at line 16 of file Widget.hh.

17 {
18 if (plane == nullptr)
19 throw invalid_argument ("'plane' must be a valid pointer");
20 ensure_valid_plane (*plane);
21 }
void ensure_valid_plane(Plane *plane) const
Definition Widget.hh:16

◆ take_plane_ownership() [1/2]

void take_plane_ownership ( Plane plane) const
inlineprotected

Definition at line 37 of file Widget.hh.

38 {
39 plane.release_native_plane ();
40 }
Here is the call graph for this function:

◆ take_plane_ownership() [2/2]

void take_plane_ownership ( Plane plane) const
inlineprotected

Definition at line 29 of file Widget.hh.

30 {
31 if (plane == nullptr)
32 return;
33
34 take_plane_ownership (*plane);
35 }
void take_plane_ownership(Plane *plane) const
Definition Widget.hh:29

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