TermOx
Public Member Functions | List of all members
ox::Menu Class Reference
Inheritance diagram for ox::Menu:
ox::Pair< Layout_t, First, Second >

Public Member Functions

auto append_item (Glyph_string label) -> sl::Signal< void()> &
 Append item to the end of list, displayed with label. More...
 
auto insert_item (Glyph_string label, std::size_t index) -> sl::Signal< void()> &
 Insert item at index into the Menu_list, displayed with label. More...
 
void remove_item (std::size_t index)
 Remove item a index in the Menu_list, no-op if index is invalid.
 
- Public Member Functions inherited from ox::Pair< Layout_t, First, Second >
 Pair ()
 Widgets are default constructed.
 
 Pair (Parameters p)
 
 Pair (typename First::Parameters a, typename Second::Parameters b)
 Widgets are constructed with passed in First/Second::Parameters objects.
 
 Pair (std::unique_ptr< First > a, std::unique_ptr< Second > b)
 Existing Widgets are moved into the Pair.
 
template<std::size_t Index>
auto get () -> auto &
 Get child by index.
 
template<std::size_t Index>
auto get () const -> auto const &
 Get child by index.
 

Additional Inherited Members

- Public Attributes inherited from ox::Pair< Layout_t, First, Second >
First & first
 
Second & second
 

Member Function Documentation

◆ append_item()

auto ox::Menu::append_item ( Glyph_string  label) -> sl::Signal<void()>&

Append item to the end of list, displayed with label.

Returns a Signal ref which will be called when this item is selected.

◆ insert_item()

auto ox::Menu::insert_item ( Glyph_string  label,
std::size_t  index 
) -> sl::Signal<void()>&

Insert item at index into the Menu_list, displayed with label.

Returns a Signal ref which will be called when this item is selected.


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