Files
FTXUI/examples_2component_2flexbox_gallery_8cpp-example.html
2025-09-09 05:48:11 +00:00

426 lines
34 KiB
HTML

<!-- HTML header for doxygen 1.9.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FTXUI: examples/component/flexbox_gallery.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="doxygen-awesome-fragment-copy-button.js"></script>
<script type="text/javascript" src="doxygen-awesome-paragraph-link.js"></script>
<script type="text/javascript" src="doxygen-awesome-interactive-toc.js"></script>
<script type="text/javascript" src="doxygen-awesome-tabs.js"></script>
<script type="module">
DoxygenAwesomeFragmentCopyButton.init()
DoxygenAwesomeParagraphLink.init()
DoxygenAwesomeInteractiveToc.init()
DoxygenAwesomeTabs.init()
await new Promise(r => window.addEventListener('DOMContentLoaded', r));
// Remove title when a img[alt='title-img'] is present.
// Find an image with the alt "img-title".
const img = document.querySelector("img[alt='title-img']");
const header = document.querySelector(".headertitle");
if (img && header) {
// Hide the header title progressively.
header.style.display = "none";
// Show progressively the image.
img.style.maxHeight = "40vh";
img.style.maxWidth = "100%";
img.style.objectFit = "contain";
}
// In the "examples.html" page. Turn every link with text
// "examples/<...>
//
// Add a "demo" link toward.
// https://arthursonzogni.github.io/FTXUI/examples/?file=<...>
const examples = document.querySelectorAll("a")
examples.forEach((example) => {
if (!example.textContent.startsWith("examples/")) {
return;
}
// Remove the ".cpp" extension from the example name.
const exampleName = example.textContent.replace("examples/", "").replace(".cpp", "");
const a = document.createElement("a");
a.textContent = "[demo]";
a.href = "https://arthursonzogni.github.io/FTXUI/examples/?file=" + exampleName;
a.style.marginRight= "1em";
a.style.fontWeight = "bold";
example.parentElement.insertBefore(a, example)
});
// If the current URL ends with -example.html, we can add a link to the demo
// as well using the div.title textContent.
const url = new URL(window.location.href);
if (url.pathname.endsWith("-example.html")) {
// Get the title text.
const title = document.querySelector("div.title").textContent;
const example = title.replace("examples/", "").replace(".cpp", "");
// Create a link to the demo.
const a = document.createElement("a");
a.textContent = "[demo]";
a.href = "https://arthursonzogni.github.io/FTXUI/examples/?file=" + example;
a.style.marginLeft = "1em";
a.style.fontWeight = "bold";
a.style.display = "inline-block";
// Insert the link after the title.
const titleDiv = document.querySelector("div.title");
if (titleDiv) {
titleDiv.insertBefore(a, titleDiv.nextSibling);
}
}
</script>
<script type="module">
// Click on the navtree, except for the main page where this is already done
// automatically.
let delay = 0;
while(true) {
const navtree = document.querySelector("div.item.selected");
if (!navtree) {
delay *= 2;
delay += 1;
await new Promise(resolve => setTimeout(resolve, delay));
continue;
}
// Include only selected navtree items.
console.log("navtree.textContent", navtree.textContent);
if (!navtree.textContent.includes("Getting Started") &&
!navtree.textContent.includes("Installation") &&
!navtree.textContent.includes("ftxui / screen") &&
!navtree.textContent.includes("ftxui / dom") &&
!navtree.textContent.includes("ftxui / component") &&
!navtree.textContent.includes("Reference")) {
break;
}
// Find the first link inside the navtree.
const link = navtree.querySelector("a");
if (link) {
// Simulate a click on the link.
link.click();
break;
}
}
</script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">FTXUI<span id="projectnumber">&#160;6.1.9</span>
</div>
<div id="projectbrief">C++ functional terminal UI.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('examples_2component_2flexbox_gallery_8cpp-example.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">examples/component/flexbox_gallery.cpp</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><span class="comment">// Copyright 2020 Arthur Sonzogni. All rights reserved.</span></div>
<div class="line"><span class="comment">// Use of this source code is governed by the MIT license that can be found in</span></div>
<div class="line"><span class="comment">// the LICENSE file.</span></div>
<div class="line"><span class="preprocessor">#include &lt;stddef.h&gt;</span> <span class="comment">// for size_t</span></div>
<div class="line"><span class="preprocessor">#include &lt;memory&gt;</span> <span class="comment">// for shared_ptr, __shared_ptr_access, allocator</span></div>
<div class="line"><span class="preprocessor">#include &lt;string&gt;</span> <span class="comment">// for string, basic_string, to_string, operator+, char_traits</span></div>
<div class="line"><span class="preprocessor">#include &lt;vector&gt;</span> <span class="comment">// for vector</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="captured__mouse_8hpp.html">ftxui/component/captured_mouse.hpp</a>&quot;</span> <span class="comment">// for ftxui</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="component_8hpp.html">ftxui/component/component.hpp</a>&quot;</span> <span class="comment">// for Radiobox, Vertical, Checkbox, Horizontal, Renderer, ResizableSplitBottom, ResizableSplitRight</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="component__base_8hpp.html">ftxui/component/component_base.hpp</a>&quot;</span> <span class="comment">// for ComponentBase</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="screen__interactive_8hpp.html">ftxui/component/screen_interactive.hpp</a>&quot;</span> <span class="comment">// for ScreenInteractive</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="elements_8hpp.html">ftxui/dom/elements.hpp</a>&quot;</span> <span class="comment">// for text, window, operator|, vbox, hbox, Element, flexbox, bgcolor, filler, flex, size, border, hcenter, color, EQUAL, bold, dim, notflex, xflex_grow, yflex_grow, HEIGHT, WIDTH</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="flexbox__config_8hpp.html">ftxui/dom/flexbox_config.hpp</a>&quot;</span> <span class="comment">// for FlexboxConfig, FlexboxConfig::AlignContent, FlexboxConfig::JustifyContent, FlexboxConfig::AlignContent::Center, FlexboxConfig::AlignItems, FlexboxConfig::Direction, FlexboxConfig::JustifyContent::Center, FlexboxConfig::Wrap</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="color_8hpp.html">ftxui/screen/color.hpp</a>&quot;</span> <span class="comment">// for Color, Color::Black</span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">using namespace </span><a class="code hl_namespace" href="namespaceftxui.html">ftxui</a>;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a id="a0" name="a0"></a><a class="code hl_function" href="examples_2component_2button_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <span class="keyword">auto</span> screen = ScreenInteractive::Fullscreen();</div>
<div class="line"> </div>
<div class="line"> <span class="keywordtype">int</span> direction_index = 0;</div>
<div class="line"> <span class="keywordtype">int</span> wrap_index = 0;</div>
<div class="line"> <span class="keywordtype">int</span> justify_content_index = 0;</div>
<div class="line"> <span class="keywordtype">int</span> align_items_index = 0;</div>
<div class="line"> <span class="keywordtype">int</span> align_content_index = 0;</div>
<div class="line"> </div>
<div class="line"> std::vector&lt;std::string&gt; directions = {</div>
<div class="line"> <span class="stringliteral">&quot;Row&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;RowInversed&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Column&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;ColumnInversed&quot;</span>,</div>
<div class="line"> };</div>
<div class="line"> </div>
<div class="line"> std::vector&lt;std::string&gt; wraps = {</div>
<div class="line"> <span class="stringliteral">&quot;NoWrap&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Wrap&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;WrapInversed&quot;</span>,</div>
<div class="line"> };</div>
<div class="line"> </div>
<div class="line"> std::vector&lt;std::string&gt; justify_content = {</div>
<div class="line"> <span class="stringliteral">&quot;FlexStart&quot;</span>, <span class="stringliteral">&quot;FlexEnd&quot;</span>, <span class="stringliteral">&quot;Center&quot;</span>, <span class="stringliteral">&quot;Stretch&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;SpaceBetween&quot;</span>, <span class="stringliteral">&quot;SpaceAround&quot;</span>, <span class="stringliteral">&quot;SpaceEvenly&quot;</span>,</div>
<div class="line"> };</div>
<div class="line"> </div>
<div class="line"> std::vector&lt;std::string&gt; align_items = {</div>
<div class="line"> <span class="stringliteral">&quot;FlexStart&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;FlexEnd&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Center&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Stretch&quot;</span>,</div>
<div class="line"> };</div>
<div class="line"> </div>
<div class="line"> std::vector&lt;std::string&gt; align_content = {</div>
<div class="line"> <span class="stringliteral">&quot;FlexStart&quot;</span>, <span class="stringliteral">&quot;FlexEnd&quot;</span>, <span class="stringliteral">&quot;Center&quot;</span>, <span class="stringliteral">&quot;Stretch&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;SpaceBetween&quot;</span>, <span class="stringliteral">&quot;SpaceAround&quot;</span>, <span class="stringliteral">&quot;SpaceEvenly&quot;</span>,</div>
<div class="line"> };</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> radiobox_direction = Radiobox(&amp;directions, &amp;direction_index);</div>
<div class="line"> <span class="keyword">auto</span> radiobox_wrap = Radiobox(&amp;wraps, &amp;wrap_index);</div>
<div class="line"> <span class="keyword">auto</span> radiobox_justify_content =</div>
<div class="line"> Radiobox(&amp;justify_content, &amp;justify_content_index);</div>
<div class="line"> <span class="keyword">auto</span> radiobox_align_items = Radiobox(&amp;align_items, &amp;align_items_index);</div>
<div class="line"> <span class="keyword">auto</span> radiobox_align_content = Radiobox(&amp;align_content, &amp;align_content_index);</div>
<div class="line"> </div>
<div class="line"> <span class="keywordtype">bool</span> element_xflex_grow = <span class="keyword">false</span>;</div>
<div class="line"> <span class="keywordtype">bool</span> element_yflex_grow = <span class="keyword">false</span>;</div>
<div class="line"> <span class="keywordtype">bool</span> group_xflex_grow = <span class="keyword">true</span>;</div>
<div class="line"> <span class="keywordtype">bool</span> group_yflex_grow = <span class="keyword">true</span>;</div>
<div class="line"> <span class="keyword">auto</span> checkbox_element_xflex_grow =</div>
<div class="line"> Checkbox(<span class="stringliteral">&quot;element |= xflex_grow&quot;</span>, &amp;element_xflex_grow);</div>
<div class="line"> <span class="keyword">auto</span> checkbox_element_yflex_grow =</div>
<div class="line"> Checkbox(<span class="stringliteral">&quot;element |= yflex_grow&quot;</span>, &amp;element_yflex_grow);</div>
<div class="line"> <span class="keyword">auto</span> checkbox_group_xflex_grow =</div>
<div class="line"> Checkbox(<span class="stringliteral">&quot;group |= xflex_grow&quot;</span>, &amp;group_xflex_grow);</div>
<div class="line"> <span class="keyword">auto</span> checkbox_group_yflex_grow =</div>
<div class="line"> Checkbox(<span class="stringliteral">&quot;group |= yflex_grow&quot;</span>, &amp;group_yflex_grow);</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> <a id="a1" name="a1"></a><a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a> = [&amp;](<span class="keywordtype">size_t</span> dimx, <span class="keywordtype">size_t</span> dimy, <span class="keywordtype">size_t</span> index) {</div>
<div class="line"> std::string title = std::to_string(dimx) + <span class="stringliteral">&quot;x&quot;</span> + std::to_string(dimy);</div>
<div class="line"> <span class="keyword">auto</span> element = window(text(title) | hcenter | bold,</div>
<div class="line"> text(std::to_string(index)) | hcenter | dim) |</div>
<div class="line"> size(WIDTH, EQUAL, dimx) | size(HEIGHT, EQUAL, dimy) |</div>
<div class="line"> bgcolor(Color::HSV(index * 25, 255, 255)) |</div>
<div class="line"> color(Color::Black);</div>
<div class="line"> <span class="keywordflow">if</span> (element_xflex_grow) {</div>
<div class="line"> element = element | xflex_grow;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">if</span> (element_yflex_grow) {</div>
<div class="line"> element = element | yflex_grow;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> element;</div>
<div class="line"> };</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> content_renderer = Renderer([&amp;] {</div>
<div class="line"> <a id="_a2" name="_a2"></a><a class="code hl_struct" href="group__dom.html#structftxui_1_1FlexboxConfig">FlexboxConfig</a> config;</div>
<div class="line"> config.<a id="a3" name="a3"></a><a class="code hl_variable" href="group__dom.html#a53421c695d00016ab925777d423b4eb6">direction</a> = <span class="keyword">static_cast&lt;</span><a class="code hl_enumeration" href="group__dom.html#a224b9163917ac32fc95a60d8c1eec3aa">FlexboxConfig::Direction</a><span class="keyword">&gt;</span>(direction_index);</div>
<div class="line"> config.<a id="a4" name="a4"></a><a class="code hl_variable" href="group__dom.html#a68b5470ece4f0a492cc1d2057c9bd5e0">wrap</a> = <span class="keyword">static_cast&lt;</span><a class="code hl_enumeration" href="group__dom.html#a6c844a611650cf7e956dbe269a0e72ab">FlexboxConfig::Wrap</a><span class="keyword">&gt;</span>(wrap_index);</div>
<div class="line"> config.<a id="a5" name="a5"></a><a class="code hl_variable" href="group__dom.html#ab3173252829e796ee1c100b447243748">justify_content</a> =</div>
<div class="line"> <span class="keyword">static_cast&lt;</span><a class="code hl_enumeration" href="group__dom.html#ac6e5ab18dcac465ee2ac9a0d8b4a82d2">FlexboxConfig::JustifyContent</a><span class="keyword">&gt;</span>(justify_content_index);</div>
<div class="line"> config.<a id="a6" name="a6"></a><a class="code hl_variable" href="group__dom.html#a1514fd3d64965c521555fdc2cf2002ce">align_items</a> =</div>
<div class="line"> <span class="keyword">static_cast&lt;</span><a class="code hl_enumeration" href="group__dom.html#a821af961ece5fe13540ad48b54c7a9e7">FlexboxConfig::AlignItems</a><span class="keyword">&gt;</span>(align_items_index);</div>
<div class="line"> config.<a id="a7" name="a7"></a><a class="code hl_variable" href="group__dom.html#a103275cb09167852e469450cf8471256">align_content</a> =</div>
<div class="line"> <span class="keyword">static_cast&lt;</span><a class="code hl_enumeration" href="group__dom.html#a1f99410fd0fc632a5bc2497b6a447420">FlexboxConfig::AlignContent</a><span class="keyword">&gt;</span>(align_content_index);</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> group = flexbox(</div>
<div class="line"> {</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(8, 4, 0),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(9, 6, 1),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(11, 6, 2),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(10, 4, 3),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(13, 7, 4),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(12, 4, 5),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(12, 5, 6),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(10, 4, 7),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(12, 4, 8),</div>
<div class="line"> <a class="code hl_function" href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a>(10, 5, 9),</div>
<div class="line"> },</div>
<div class="line"> config);</div>
<div class="line"> </div>
<div class="line"> group = group | bgcolor(Color::Black);</div>
<div class="line"> </div>
<div class="line"> group = group | notflex;</div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">if</span> (!group_xflex_grow) {</div>
<div class="line"> group = hbox(group, filler());</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">if</span> (!group_yflex_grow) {</div>
<div class="line"> group = vbox(group, filler());</div>
<div class="line"> }</div>
<div class="line"> </div>
<div class="line"> group = group | flex;</div>
<div class="line"> <span class="keywordflow">return</span> group;</div>
<div class="line"> });</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> center = <a class="code hl_struct" href="group__dom.html#structftxui_1_1FlexboxConfig">FlexboxConfig</a>()</div>
<div class="line"> .<a id="a8" name="a8"></a><a class="code hl_function" href="group__dom.html#ae47b5b0d793d0c2312e4805a1f40012a">Set</a>(FlexboxConfig::JustifyContent::Center)</div>
<div class="line"> .<a class="code hl_function" href="group__dom.html#ae47b5b0d793d0c2312e4805a1f40012a">Set</a>(FlexboxConfig::AlignContent::Center);</div>
<div class="line"> <span class="keywordtype">int</span> space_right = 10;</div>
<div class="line"> <span class="keywordtype">int</span> space_bottom = 1;</div>
<div class="line"> content_renderer = ResizableSplitRight(</div>
<div class="line"> Renderer([&amp;] { <span class="keywordflow">return</span> flexbox({text(<span class="stringliteral">&quot;resizable&quot;</span>)}, center); }),</div>
<div class="line"> content_renderer, &amp;space_right);</div>
<div class="line"> content_renderer = ResizableSplitBottom(</div>
<div class="line"> Renderer([&amp;] { <span class="keywordflow">return</span> flexbox({text(<span class="stringliteral">&quot;resizable&quot;</span>)}, center); }),</div>
<div class="line"> content_renderer, &amp;space_bottom);</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> main_container = Container::Vertical({</div>
<div class="line"> Container::Horizontal({</div>
<div class="line"> radiobox_direction,</div>
<div class="line"> radiobox_wrap,</div>
<div class="line"> Container::Vertical({</div>
<div class="line"> checkbox_element_xflex_grow,</div>
<div class="line"> checkbox_element_yflex_grow,</div>
<div class="line"> checkbox_group_xflex_grow,</div>
<div class="line"> checkbox_group_yflex_grow,</div>
<div class="line"> }),</div>
<div class="line"> }),</div>
<div class="line"> Container::Horizontal({</div>
<div class="line"> radiobox_justify_content,</div>
<div class="line"> radiobox_align_items,</div>
<div class="line"> radiobox_align_content,</div>
<div class="line"> }),</div>
<div class="line"> content_renderer,</div>
<div class="line"> });</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">auto</span> main_renderer = Renderer(main_container, [&amp;] {</div>
<div class="line"> <span class="keywordflow">return</span> vbox({</div>
<div class="line"> vbox({hbox({</div>
<div class="line"> window(text(<span class="stringliteral">&quot;FlexboxConfig::Direction&quot;</span>),</div>
<div class="line"> radiobox_direction-&gt;Render()),</div>
<div class="line"> window(text(<span class="stringliteral">&quot;FlexboxConfig::Wrap&quot;</span>), radiobox_wrap-&gt;Render()),</div>
<div class="line"> window(text(<span class="stringliteral">&quot;Misc:&quot;</span>),</div>
<div class="line"> vbox({</div>
<div class="line"> checkbox_element_xflex_grow-&gt;Render(),</div>
<div class="line"> checkbox_element_yflex_grow-&gt;Render(),</div>
<div class="line"> checkbox_group_xflex_grow-&gt;Render(),</div>
<div class="line"> checkbox_group_yflex_grow-&gt;Render(),</div>
<div class="line"> })),</div>
<div class="line"> }),</div>
<div class="line"> hbox({</div>
<div class="line"> window(text(<span class="stringliteral">&quot;FlexboxConfig::JustifyContent&quot;</span>),</div>
<div class="line"> radiobox_justify_content-&gt;Render()),</div>
<div class="line"> window(text(<span class="stringliteral">&quot;FlexboxConfig::AlignItems&quot;</span>),</div>
<div class="line"> radiobox_align_items-&gt;Render()),</div>
<div class="line"> window(text(<span class="stringliteral">&quot;FlexboxConfig::AlignContent&quot;</span>),</div>
<div class="line"> radiobox_align_content-&gt;Render()),</div>
<div class="line"> })}),</div>
<div class="line"> content_renderer-&gt;Render() | flex | border,</div>
<div class="line"> });</div>
<div class="line"> });</div>
<div class="line"> </div>
<div class="line"> screen.Loop(main_renderer);</div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="acaptured__mouse_8hpp_html"><div class="ttname"><a href="captured__mouse_8hpp.html">captured_mouse.hpp</a></div></div>
<div class="ttc" id="acolor_8hpp_html"><div class="ttname"><a href="color_8hpp.html">color.hpp</a></div></div>
<div class="ttc" id="acomponent_8hpp_html"><div class="ttname"><a href="component_8hpp.html">component.hpp</a></div></div>
<div class="ttc" id="acomponent__base_8hpp_html"><div class="ttname"><a href="component__base_8hpp.html">component_base.hpp</a></div></div>
<div class="ttc" id="aelements_8hpp_html"><div class="ttname"><a href="elements_8hpp.html">elements.hpp</a></div></div>
<div class="ttc" id="aexamples_2component_2button_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="examples_2component_2button_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="examples_2component_2button_8cpp_source.html#l00033">examples/component/button.cpp:33</a></div></div>
<div class="ttc" id="aexamples_2component_2focus_8cpp_html_a9ffb8a33ec5d0133f63f791d526df1c7"><div class="ttname"><a href="examples_2component_2focus_8cpp.html#a9ffb8a33ec5d0133f63f791d526df1c7">make_box</a></div><div class="ttdeci">Element make_box(int x, int y)</div><div class="ttdef"><b>Definition</b> <a href="examples_2component_2focus_8cpp_source.html#l00017">examples/component/focus.cpp:17</a></div></div>
<div class="ttc" id="aflexbox__config_8hpp_html"><div class="ttname"><a href="flexbox__config_8hpp.html">flexbox_config.hpp</a></div></div>
<div class="ttc" id="agroup__dom_html_a103275cb09167852e469450cf8471256"><div class="ttname"><a href="group__dom.html#a103275cb09167852e469450cf8471256">ftxui::FlexboxConfig::align_content</a></div><div class="ttdeci">AlignContent align_content</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00105">flexbox_config.hpp:105</a></div></div>
<div class="ttc" id="agroup__dom_html_a1514fd3d64965c521555fdc2cf2002ce"><div class="ttname"><a href="group__dom.html#a1514fd3d64965c521555fdc2cf2002ce">ftxui::FlexboxConfig::align_items</a></div><div class="ttdeci">AlignItems align_items</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00089">flexbox_config.hpp:89</a></div></div>
<div class="ttc" id="agroup__dom_html_a1f99410fd0fc632a5bc2497b6a447420"><div class="ttname"><a href="group__dom.html#a1f99410fd0fc632a5bc2497b6a447420">ftxui::FlexboxConfig::AlignContent</a></div><div class="ttdeci">AlignContent</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00094">flexbox_config.hpp:94</a></div></div>
<div class="ttc" id="agroup__dom_html_a224b9163917ac32fc95a60d8c1eec3aa"><div class="ttname"><a href="group__dom.html#a224b9163917ac32fc95a60d8c1eec3aa">ftxui::FlexboxConfig::Direction</a></div><div class="ttdeci">Direction</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00032">flexbox_config.hpp:32</a></div></div>
<div class="ttc" id="agroup__dom_html_a53421c695d00016ab925777d423b4eb6"><div class="ttname"><a href="group__dom.html#a53421c695d00016ab925777d423b4eb6">ftxui::FlexboxConfig::direction</a></div><div class="ttdeci">Direction direction</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00039">flexbox_config.hpp:39</a></div></div>
<div class="ttc" id="agroup__dom_html_a68b5470ece4f0a492cc1d2057c9bd5e0"><div class="ttname"><a href="group__dom.html#a68b5470ece4f0a492cc1d2057c9bd5e0">ftxui::FlexboxConfig::wrap</a></div><div class="ttdeci">Wrap wrap</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00049">flexbox_config.hpp:49</a></div></div>
<div class="ttc" id="agroup__dom_html_a6c844a611650cf7e956dbe269a0e72ab"><div class="ttname"><a href="group__dom.html#a6c844a611650cf7e956dbe269a0e72ab">ftxui::FlexboxConfig::Wrap</a></div><div class="ttdeci">Wrap</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00043">flexbox_config.hpp:43</a></div></div>
<div class="ttc" id="agroup__dom_html_a821af961ece5fe13540ad48b54c7a9e7"><div class="ttname"><a href="group__dom.html#a821af961ece5fe13540ad48b54c7a9e7">ftxui::FlexboxConfig::AlignItems</a></div><div class="ttdeci">AlignItems</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00083">flexbox_config.hpp:83</a></div></div>
<div class="ttc" id="agroup__dom_html_ab3173252829e796ee1c100b447243748"><div class="ttname"><a href="group__dom.html#ab3173252829e796ee1c100b447243748">ftxui::FlexboxConfig::justify_content</a></div><div class="ttdeci">JustifyContent justify_content</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00078">flexbox_config.hpp:78</a></div></div>
<div class="ttc" id="agroup__dom_html_ac6e5ab18dcac465ee2ac9a0d8b4a82d2"><div class="ttname"><a href="group__dom.html#ac6e5ab18dcac465ee2ac9a0d8b4a82d2">ftxui::FlexboxConfig::JustifyContent</a></div><div class="ttdeci">JustifyContent</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00056">flexbox_config.hpp:56</a></div></div>
<div class="ttc" id="agroup__dom_html_ae47b5b0d793d0c2312e4805a1f40012a"><div class="ttname"><a href="group__dom.html#ae47b5b0d793d0c2312e4805a1f40012a">ftxui::FlexboxConfig::Set</a></div><div class="ttdeci">FlexboxConfig &amp; Set(FlexboxConfig::Direction)</div><div class="ttdoc">Set the flexbox direction.</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8cpp_source.html#l00009">flexbox_config.cpp:9</a></div></div>
<div class="ttc" id="agroup__dom_html_structftxui_1_1FlexboxConfig"><div class="ttname"><a href="group__dom.html#structftxui_1_1FlexboxConfig">ftxui::FlexboxConfig</a></div><div class="ttdoc">FlexboxConfig is a configuration structure that defines the layout properties for a flexbox container...</div><div class="ttdef"><b>Definition</b> <a href="flexbox__config_8hpp_source.html#l00027">flexbox_config.hpp:27</a></div></div>
<div class="ttc" id="anamespaceftxui_html"><div class="ttname"><a href="namespaceftxui.html">ftxui</a></div><div class="ttdoc">The FTXUI ftxui:: namespace.</div><div class="ttdef"><b>Definition</b> <a href="animation_8hpp_source.html#l00010">animation.hpp:10</a></div></div>
<div class="ttc" id="ascreen__interactive_8hpp_html"><div class="ttname"><a href="screen__interactive_8hpp.html">screen_interactive.hpp</a></div></div>
</div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.8-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
</ul>
</div>
</body>
</html>