HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
tt::flow_layout Class Reference

#include <ttauri/flow_layout.hpp>

Public Member Functions

void clear () noexcept
 
size_t nr_items () const noexcept
 
void update (ssize_t index, float extent, ranged_int< 3 > resistance, float margin) noexcept
 
float minimum_size () const noexcept
 
void set_size (float total_size) noexcept
 Update the layout of all items based on the total size.
 
float size () const noexcept
 Calculate the size of the combined items in the layout.
 
std::pair< float, float > get_offset_and_size (ssize_t first, ssize_t last) const noexcept
 
std::pair< float, float > get_offset_and_size (ssize_t index) const noexcept
 
void reserve (ssize_t new_size) noexcept
 Grow layout to include upto new_size of items.
 

Detailed Description

Layout algorithm.

Member Function Documentation

◆ get_offset_and_size()

std::pair< float, float > tt::flow_layout::get_offset_and_size ( ssize_t first,
ssize_t last ) const
inlinenoexcept
Parameters
firstThe first index
lastThe index one beyond the last.

◆ reserve()

void tt::flow_layout::reserve ( ssize_t new_size)
inlinenoexcept

Grow layout to include upto new_size of items.

◆ set_size()

void tt::flow_layout::set_size ( float total_size)
inlinenoexcept

Update the layout of all items based on the total size.

◆ size()

float tt::flow_layout::size ( ) const
inlinenoexcept

Calculate the size of the combined items in the layout.

Precondition
set_size() must be called.

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