HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Friends
hi::v1::grid_cell Class Reference

#include <hikogui/layout/grid_cell.hpp>

Public Member Functions

constexpr grid_cell (grid_cell const &)=delete
 
constexpr grid_cell (grid_cell &&other) noexcept
 
constexpr grid_celloperator= (grid_cell const &)=delete
 
constexpr grid_celloperator= (grid_cell &&other) noexcept
 
constexpr grid_cell (grid &grid) noexcept
 
constexpr grid_cell (grid_cell const &parent, uint8_t col_begin, uint8_t row_begin, uint8_t col_end, uint8_t row_end) noexcept
 
constexpr grid_cell (grid_cell const &parent, uint8_t col_begin, uint8_t row_begin) noexcept
 
constexpr grid_cell (grid_cell const &parent, std::string_view address) noexcept
 
constexpr bool empty () const noexcept
 Check if this cell has a location.
 
constexpr void clear () noexcept
 Clear the cell.
 
constexpr void set_location (uint8_t col_begin, uint8_t row_begin, uint8_t col_end, uint8_t row_end) noexcept
 Set the location of a cell.
 
constexpr void set_location (uint8_t col, uint8_t row) noexcept
 Set the location of a cell.
 
constexpr void set_location (std::string_view address) noexcept
 Set the location and span of a cell based on the spreadsheet address.
 
constexpr void set_location () noexcept
 Set the location to the origin of the grid.
 
constexpr void set_parent (grid_cell const &parent) noexcept
 Set the parent for this child-cell.
 
constexpr void unset_parent (grid_cell const &parent) noexcept
 Remove the parent for this child-cell.
 
constexpr void set_priority (int8_t width_priority, int8_t height_priority) noexcept
 
constexpr void set_priority (int8_t priority=0) noexcept
 
constexpr void set_margin (hi::margins margin) noexcept
 
constexpr void set_margin (float margins) noexcept
 
constexpr void set_constraints (hi::extent2 minimum, hi::extent2 maximum, hi::extent2 wrap) noexcept
 
constexpr void set_constraints (hi::extent2 minimum, hi::extent2 maximum) noexcept
 
constexpr void set_constraints (hi::extent2 size) noexcept
 
constexpr void set_size (hi::extent2 size) noexcept
 
constexpr aarectangle rectangle () const noexcept
 

Friends

constexpr friend bool operator== (grid_cell const &, grid_cell const &) noexcept=default
 

Detailed Description

A cell in a grid.

Member Function Documentation

◆ clear()

constexpr void hi::v1::grid_cell::clear ( )
constexprnoexcept

Clear the cell.

This will remove the parent, location, constraints and layout.

◆ empty()

constexpr bool hi::v1::grid_cell::empty ( ) const
constexprnoexcept

Check if this cell has a location.

◆ set_location() [1/4]

constexpr void hi::v1::grid_cell::set_location ( )
inlineconstexprnoexcept

Set the location to the origin of the grid.

◆ set_location() [2/4]

constexpr void hi::v1::grid_cell::set_location ( std::string_view address)
inlineconstexprnoexcept

Set the location and span of a cell based on the spreadsheet address.

Parameters
addressA spreadsheet like address.

◆ set_location() [3/4]

constexpr void hi::v1::grid_cell::set_location ( uint8_t col,
uint8_t row )
inlineconstexprnoexcept

Set the location of a cell.

Note
This will create a col-span and row-span of 1.
Parameters
col_beginThe column in the grid.
row_beginThe row in the grid.

◆ set_location() [4/4]

constexpr void hi::v1::grid_cell::set_location ( uint8_t col_begin,
uint8_t row_begin,
uint8_t col_end,
uint8_t row_end )
constexprnoexcept

Set the location of a cell.

Parameters
col_beginThe first column in a col-span.
row_beginThe first row in a row-span.
col_endOne beyond the last column in a col-span.
row_endOne beyond the last row in a row-span.

◆ set_parent()

constexpr void hi::v1::grid_cell::set_parent ( grid_cell const & parent)
constexprnoexcept

Set the parent for this child-cell.

Parameters
parentA parent cell.

◆ unset_parent()

constexpr void hi::v1::grid_cell::unset_parent ( grid_cell const & parent)
constexprnoexcept

Remove the parent for this child-cell.

A cell without a parent would be the window-widget or overlay-widget.

Note
If there is no parent then the location must be (0, 0).

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