morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
alignment.hpp File Reference

morph::ui::Align and morph::ui::Justify: where a container places its children across its axis and along it. The view tree, the authoring API and the backends share them. Specified in docs/spec/ui/backend_contract.md, "The cross axis". More...

#include <cstdint>

Go to the source code of this file.

Enumerations

enum class  morph::ui::Align : std::uint8_t { Stretch , Start , Center , End }
 Where a child is placed across its container's axis: a column's horizontally, a row's vertically, a grid cell's content vertically in its row. More...
enum class  morph::ui::Justify : std::uint8_t { Start , Center , End , Between }
 Where a stack places its spare length along its axis, while no shown child stretches. More...

Detailed Description

morph::ui::Align and morph::ui::Justify: where a container places its children across its axis and along it. The view tree, the authoring API and the backends share them. Specified in docs/spec/ui/backend_contract.md, "The cross axis".

Definition in file alignment.hpp.

Enumeration Type Documentation

◆ Align

enum class morph::ui::Align : std::uint8_t
strong

Where a child is placed across its container's axis: a column's horizontally, a row's vertically, a grid cell's content vertically in its row.

Enumerator
Stretch 

A content child fills the cross extent; one its maximum stops sits at the start.

Start 

At the start: left in a column, top in a row or grid.

Center 

Centred.

End 

At the end: right in a column, bottom in a row or grid.

Definition at line 15 of file alignment.hpp.

◆ Justify

enum class morph::ui::Justify : std::uint8_t
strong

Where a stack places its spare length along its axis, while no shown child stretches.

Enumerator
Start 

Packed at the start.

Center 

Packed in the middle.

End 

Packed at the end.

Between 

In equal gaps between the children, never less than the stack's gap.

Definition at line 23 of file alignment.hpp.