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

#include <MultiSelector.hh>

Inheritance diagram for MultiSelector:
Collaboration diagram for MultiSelector:

Public Member Functions

 MultiSelector (Plane *plane, const ncmultiselector_options *opts=nullptr)
 
 MultiSelector (Plane &plane, const ncmultiselector_options *opts=nullptr)
 
 ~MultiSelector ()
 
bool offer_input (const struct ncinput *ni) const noexcept
 
int get_selected (bool *selected, unsigned count) const NOEXCEPT_MAYBE
 
Planeget_plane () const noexcept
 
- Public Member Functions inherited from Root
notcursesget_notcurses () const
 
NotCursesget_notcurses_cpp () const
 

Static Public Attributes

static ncmultiselector_options default_options
 

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 MultiSelector.hh.

Constructor & Destructor Documentation

◆ MultiSelector() [1/2]

MultiSelector ( Plane plane,
const ncmultiselector_options opts = nullptr 
)
inlineexplicit

Definition at line 19 of file MultiSelector.hh.

21 {
22 ensure_valid_plane (plane);
23 common_init (Utilities::to_ncplane (plane), opts);
25 }
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

◆ MultiSelector() [2/2]

MultiSelector ( Plane plane,
const ncmultiselector_options opts = nullptr 
)
inlineexplicit

Definition at line 27 of file MultiSelector.hh.

29 {
30 ensure_valid_plane (plane);
31 common_init (Utilities::to_ncplane (plane), opts);
33 }

◆ ~MultiSelector()

~MultiSelector ( )
inline

Definition at line 35 of file MultiSelector.hh.

36 {
38 ncmultiselector_destroy (multiselector);
39 }
bool is_notcurses_stopped() const noexcept
void ncmultiselector_destroy(ncmultiselector *n)
Definition selector.c:985
Here is the call graph for this function:

Member Function Documentation

◆ get_plane()

Plane * get_plane ( ) const
noexcept
Here is the call graph for this function:

◆ get_selected()

int get_selected ( bool selected,
unsigned  count 
) const
inline

Definition at line 46 of file MultiSelector.hh.

47 {
48 return error_guard<int> (ncmultiselector_selected (multiselector, selected, count), -1);
49 }
static TRet error_guard(TValue ret, TValue error_value)
Definition Root.hh:39
int ncmultiselector_selected(ncmultiselector *n, bool *selected, unsigned count)
Definition selector.c:1002
Here is the call graph for this function:

◆ offer_input()

bool offer_input ( const struct ncinput ni) const
inlinenoexcept

Definition at line 41 of file MultiSelector.hh.

42 {
43 return ncmultiselector_offer_input (multiselector, ni);
44 }
bool ncmultiselector_offer_input(ncmultiselector *n, const ncinput *nc)
Definition selector.c:785
Here is the call graph for this function:

Field Documentation

◆ default_options

ncmultiselector_options default_options
static

Definition at line 16 of file MultiSelector.hh.


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