TermOx
Classes | Public Member Functions | List of all members
ox::layout::detail::Layout_span< Get_policy_t > Class Template Reference

Container view to iterate over a Widget's children, yielding layout info. More...

#include <layout_span.hpp>

Public Member Functions

template<typename Iter >
 Layout_span (Iter first, Iter last, int primary_length, Get_policy_t &&get_policy)
 Construct, only considers children from first up to last.
 
auto begin_max ()
 Return iterator to the first element, will skip when length == max. More...
 
auto begin_min ()
 Return iterator to the first element, will skip when length == min. More...
 
auto end () -> Container_t::iterator
 
auto total_stretch () const -> double
 
auto total_inverse_stretch () const -> double
 
auto entire_length () const -> int
 
auto size () const -> std::size_t
 
auto get_results () const -> std::vector< int >
 

Detailed Description

template<typename Get_policy_t>
class ox::layout::detail::Layout_span< Get_policy_t >

Container view to iterate over a Widget's children, yielding layout info.

Shrinks on each iteration by dropping elements that have reached some limit. Get_policy_t: A functor type <Size_policy const&(Widget const&)> Used to retrieve a Size_policy to work with.

Member Function Documentation

◆ begin_max()

template<typename Get_policy_t >
auto ox::layout::detail::Layout_span< Get_policy_t >::begin_max ( )
inline

Return iterator to the first element, will skip when length == max.

Size_policy::max will be used as limit.

◆ begin_min()

template<typename Get_policy_t >
auto ox::layout::detail::Layout_span< Get_policy_t >::begin_min ( )
inline

Return iterator to the first element, will skip when length == min.

Size_policy::min will be used as limit.


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