TermOx
Public Types | Public Member Functions | Public Attributes | List of all members
ox::Hideable< Widget_t > Class Template Reference

Policy to make any Widget or Layout hideable with a hide() and show() method. More...

#include <hideable.hpp>

Inheritance diagram for ox::Hideable< Widget_t >:
ox::Pair< Layout_t, First, Second >

Public Types

using Parameters = typename Widget_t::Parameter
 

Public Member Functions

 Hideable (Parameters p)
 Forward constructor Parameters for the Widget_t that is being wrapped. More...
 
void show ()
 Display the held widget.
 
void hide ()
 Display nothing on the widget space.
 
auto is_hidden () const -> bool
 Return if w is hidden.
 
- 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.
 

Public Attributes

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

Detailed Description

template<typename Widget_t>
class ox::Hideable< Widget_t >

Policy to make any Widget or Layout hideable with a hide() and show() method.

Constructor & Destructor Documentation

◆ Hideable()

template<typename Widget_t >
ox::Hideable< Widget_t >::Hideable ( Parameters  p)
inlineexplicit

Forward constructor Parameters for the Widget_t that is being wrapped.

Wrapped Widget is in visible state when constructed. Access via w.


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