TermOx
|
Provides a set-like interface to Layout_t. More...
#include <set.hpp>
Public Types | |
using | Child_t = typename Layout_t::Child_t |
using | Key_t = std::invoke_result_t< Projection, std::add_const_t< std::add_lvalue_reference_t< typename Layout_t::Child_t > >> |
Public Member Functions | |
auto | insert_child (std::unique_ptr< Child_t > child) -> Child_t & |
Insert child into correct position based on Projection and Comparison. | |
template<typename Widget_t = Child_t, typename... Args> | |
auto | make_child (Args &&... args) -> Widget_t & |
Create a Widget and insert it into the list of children. More... | |
auto | find_child (Key_t const &key) -> Child_t * |
Find a child widget by its key type(the result of the Projection fn). More... | |
Provides a set-like interface to Layout_t.
Projection transforms a Layout::Child_t into a comparable. Comparison is fed the output of Projection, used to find insertion pos. Comparison{}(Projection{}(element), Projection{}(child));
|
inline |
Find a child widget by its key type(the result of the Projection fn).
Uses the Projection function on each child until a result equal to key
is found. Retuns nullptr if no child found.
|
inline |