Files
FTXUI/zh-TW/gallery_8cpp.html
2025-12-13 19:38:34 +00:00

976 lines
66 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: gallery.cpp File Reference</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('gallery_8cpp.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="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">gallery.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a href="gallery_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0a320000c5a485508c57030f605b800a" id="r_a0a320000c5a485508c57030f605b800a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0a320000c5a485508c57030f605b800a">Wrap</a> (std::string name, <a class="el" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a> <a class="el" href="#a768a57bc667a7482ea6e7fdadf02ba90">component</a>)</td></tr>
<tr class="separator:a0a320000c5a485508c57030f605b800a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9da4cb47b7a216f0256f5d111e46745d" id="r_a9da4cb47b7a216f0256f5d111e46745d"><td class="memItemLeft" align="right" valign="top">screen&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9da4cb47b7a216f0256f5d111e46745d">Loop</a> (<a class="el" href="#a768a57bc667a7482ea6e7fdadf02ba90">component</a>)</td></tr>
<tr class="separator:a9da4cb47b7a216f0256f5d111e46745d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a117f301854808bb7c5c22b298ebd8d3e" id="r_a117f301854808bb7c5c22b298ebd8d3e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a117f301854808bb7c5c22b298ebd8d3e">menu_selected</a> = 0</td></tr>
<tr class="separator:a117f301854808bb7c5c22b298ebd8d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a905479d79c2aa8410d2fc374bc75cc5b" id="r_a905479d79c2aa8410d2fc374bc75cc5b"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a905479d79c2aa8410d2fc374bc75cc5b">menu</a> = Menu(&amp;menu_entries, &amp;<a class="el" href="#a117f301854808bb7c5c22b298ebd8d3e">menu_selected</a>)</td></tr>
<tr class="separator:a905479d79c2aa8410d2fc374bc75cc5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c94829f1a30082a58d9b378c3afdbe9" id="r_a7c94829f1a30082a58d9b378c3afdbe9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7c94829f1a30082a58d9b378c3afdbe9">toggle_selected</a> = 0</td></tr>
<tr class="separator:a7c94829f1a30082a58d9b378c3afdbe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7df206f5592b8eb0553b4b124f72e72e" id="r_a7df206f5592b8eb0553b4b124f72e72e"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7df206f5592b8eb0553b4b124f72e72e">toggle_entries</a></td></tr>
<tr class="separator:a7df206f5592b8eb0553b4b124f72e72e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31dce1c0128d7a2f28549bc690ea5f1a" id="r_a31dce1c0128d7a2f28549bc690ea5f1a"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a31dce1c0128d7a2f28549bc690ea5f1a">toggle</a> = Toggle(&amp;<a class="el" href="#a7df206f5592b8eb0553b4b124f72e72e">toggle_entries</a>, &amp;<a class="el" href="#a7c94829f1a30082a58d9b378c3afdbe9">toggle_selected</a>)</td></tr>
<tr class="separator:a31dce1c0128d7a2f28549bc690ea5f1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fc22c6267acc69c3e286346a94da94e" id="r_a0fc22c6267acc69c3e286346a94da94e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0fc22c6267acc69c3e286346a94da94e">checkbox_1_selected</a> = false</td></tr>
<tr class="separator:a0fc22c6267acc69c3e286346a94da94e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e0c54c7c3439400acf8872e55e22f74" id="r_a7e0c54c7c3439400acf8872e55e22f74"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7e0c54c7c3439400acf8872e55e22f74">checkbox_2_selected</a> = false</td></tr>
<tr class="separator:a7e0c54c7c3439400acf8872e55e22f74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e5c2ac6bf6b8f0ee5a001e14b34255f" id="r_a3e5c2ac6bf6b8f0ee5a001e14b34255f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3e5c2ac6bf6b8f0ee5a001e14b34255f">checkbox_3_selected</a> = false</td></tr>
<tr class="separator:a3e5c2ac6bf6b8f0ee5a001e14b34255f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c67da2c8c743e9a8353163dff110024" id="r_a0c67da2c8c743e9a8353163dff110024"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0c67da2c8c743e9a8353163dff110024">checkbox_4_selected</a> = false</td></tr>
<tr class="separator:a0c67da2c8c743e9a8353163dff110024"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f3d583d421b1f81dfb46e6482a010c2" id="r_a1f3d583d421b1f81dfb46e6482a010c2"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1f3d583d421b1f81dfb46e6482a010c2">checkboxes</a></td></tr>
<tr class="separator:a1f3d583d421b1f81dfb46e6482a010c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a981dd77a66be08ae4cff176eefb99b16" id="r_a981dd77a66be08ae4cff176eefb99b16"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a981dd77a66be08ae4cff176eefb99b16">radiobox_selected</a> = 0</td></tr>
<tr class="separator:a981dd77a66be08ae4cff176eefb99b16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0f61defa62c405a77336f266aa2eb93" id="r_ab0f61defa62c405a77336f266aa2eb93"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab0f61defa62c405a77336f266aa2eb93">radiobox_entries</a></td></tr>
<tr class="separator:ab0f61defa62c405a77336f266aa2eb93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f9270043301860784c4a1744ff064e1" id="r_a2f9270043301860784c4a1744ff064e1"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2f9270043301860784c4a1744ff064e1">radiobox</a> = Radiobox(&amp;<a class="el" href="#ab0f61defa62c405a77336f266aa2eb93">radiobox_entries</a>, &amp;<a class="el" href="#a981dd77a66be08ae4cff176eefb99b16">radiobox_selected</a>)</td></tr>
<tr class="separator:a2f9270043301860784c4a1744ff064e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5368e529cd0f34deb4887f2e70e7ea92" id="r_a5368e529cd0f34deb4887f2e70e7ea92"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5368e529cd0f34deb4887f2e70e7ea92">input_label</a></td></tr>
<tr class="separator:a5368e529cd0f34deb4887f2e70e7ea92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a877535c3b6ffdf230bce90c82c597d17" id="r_a877535c3b6ffdf230bce90c82c597d17"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a877535c3b6ffdf230bce90c82c597d17">input</a> = Input(&amp;<a class="el" href="#a5368e529cd0f34deb4887f2e70e7ea92">input_label</a>, &quot;placeholder&quot;)</td></tr>
<tr class="separator:a877535c3b6ffdf230bce90c82c597d17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bb2fc3ae8e0bafc513798bffcc7bd80" id="r_a3bb2fc3ae8e0bafc513798bffcc7bd80"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3bb2fc3ae8e0bafc513798bffcc7bd80">button_label</a> = &quot;Quit&quot;</td></tr>
<tr class="separator:a3bb2fc3ae8e0bafc513798bffcc7bd80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac99c8e828d6c95009d62b49fb5dfbec0" id="r_ac99c8e828d6c95009d62b49fb5dfbec0"><td class="memItemLeft" align="right" valign="top">std::function&lt; void()&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac99c8e828d6c95009d62b49fb5dfbec0">on_button_clicked_</a></td></tr>
<tr class="separator:ac99c8e828d6c95009d62b49fb5dfbec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14139799dd4b2fc41ecb6cb14936322f" id="r_a14139799dd4b2fc41ecb6cb14936322f"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a14139799dd4b2fc41ecb6cb14936322f">button</a> = Button(&amp;<a class="el" href="#a3bb2fc3ae8e0bafc513798bffcc7bd80">button_label</a>, screen.ExitLoopClosure())</td></tr>
<tr class="separator:a14139799dd4b2fc41ecb6cb14936322f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af69578c6b997f238734526def33b92b7" id="r_af69578c6b997f238734526def33b92b7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af69578c6b997f238734526def33b92b7">slider_value_1</a> = 12</td></tr>
<tr class="separator:af69578c6b997f238734526def33b92b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9276795010f180471b7dd26273058018" id="r_a9276795010f180471b7dd26273058018"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9276795010f180471b7dd26273058018">slider_value_2</a> = 56</td></tr>
<tr class="separator:a9276795010f180471b7dd26273058018"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a3716976f1505be2ffcbff4cc14a104" id="r_a2a3716976f1505be2ffcbff4cc14a104"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2a3716976f1505be2ffcbff4cc14a104">slider_value_3</a> = 128</td></tr>
<tr class="separator:a2a3716976f1505be2ffcbff4cc14a104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2dc883631510a23f84eaf3b6a6f941c" id="r_af2dc883631510a23f84eaf3b6a6f941c"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af2dc883631510a23f84eaf3b6a6f941c">sliders</a></td></tr>
<tr class="separator:af2dc883631510a23f84eaf3b6a6f941c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf5c14b236419cfc06ac31a1ada008d2" id="r_aaf5c14b236419cfc06ac31a1ada008d2"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aaf5c14b236419cfc06ac31a1ada008d2">lorel_ipsum</a></td></tr>
<tr class="separator:aaf5c14b236419cfc06ac31a1ada008d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a768a57bc667a7482ea6e7fdadf02ba90" id="r_a768a57bc667a7482ea6e7fdadf02ba90"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a768a57bc667a7482ea6e7fdadf02ba90">component</a></td></tr>
<tr class="separator:a768a57bc667a7482ea6e7fdadf02ba90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9717e7bbecb906637e86cef6da3d83c2" id="r_a9717e7bbecb906637e86cef6da3d83c2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9717e7bbecb906637e86cef6da3d83c2">return</a></td></tr>
<tr class="separator:a9717e7bbecb906637e86cef6da3d83c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a0a320000c5a485508c57030f605b800a" name="a0a320000c5a485508c57030f605b800a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a320000c5a485508c57030f605b800a">&#9670;&#160;</a></span>Wrap()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a> Wrap </td>
<td>(</td>
<td class="paramtype">std::string</td> <td class="paramname"><span class="paramname"><em>name</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a></td> <td class="paramname"><span class="paramname"><em>component</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a0">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00017">17</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00028">28</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a9da4cb47b7a216f0256f5d111e46745d" name="a9da4cb47b7a216f0256f5d111e46745d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9da4cb47b7a216f0256f5d111e46745d">&#9670;&#160;</a></span>Loop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">screen <a class="el" href="classftxui_1_1Loop.html">Loop</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="#a768a57bc667a7482ea6e7fdadf02ba90">component</a></td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a117f301854808bb7c5c22b298ebd8d3e" name="a117f301854808bb7c5c22b298ebd8d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a117f301854808bb7c5c22b298ebd8d3e">&#9670;&#160;</a></span>menu_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int menu_selected = 0</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a3">examples/component/gallery.cpp</a>, and <a class="el" href="examples_2component_2menu_multiple_8cpp-example.html#a3">examples/component/menu_multiple.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00038">38</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a905479d79c2aa8410d2fc374bc75cc5b" name="a905479d79c2aa8410d2fc374bc75cc5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a905479d79c2aa8410d2fc374bc75cc5b">&#9670;&#160;</a></span>menu</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">menu = Menu(&amp;menu_entries, &amp;<a class="el" href="#a117f301854808bb7c5c22b298ebd8d3e">menu_selected</a>)</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a4">examples/component/gallery.cpp</a>, <a class="el" href="examples_2component_2menu_8cpp-example.html#a3">examples/component/menu.cpp</a>, <a class="el" href="examples_2component_2menu_entries_8cpp-example.html#a6">examples/component/menu_entries.cpp</a>, and <a class="el" href="examples_2component_2menu_entries_animated_8cpp-example.html#a10">examples/component/menu_entries_animated.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00039">39</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a7c94829f1a30082a58d9b378c3afdbe9" name="a7c94829f1a30082a58d9b378c3afdbe9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c94829f1a30082a58d9b378c3afdbe9">&#9670;&#160;</a></span>toggle_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int toggle_selected = 0</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a5">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00043">43</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a7df206f5592b8eb0553b4b124f72e72e" name="a7df206f5592b8eb0553b4b124f72e72e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7df206f5592b8eb0553b4b124f72e72e">&#9670;&#160;</a></span>toggle_entries</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;std::string&gt; toggle_entries</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div>
<div class="line"> <span class="stringliteral">&quot;Toggle_1&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Toggle_2&quot;</span>,</div>
<div class="line"> }</div>
</div><!-- fragment --><dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a6">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00044">44</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a31dce1c0128d7a2f28549bc690ea5f1a" name="a31dce1c0128d7a2f28549bc690ea5f1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31dce1c0128d7a2f28549bc690ea5f1a">&#9670;&#160;</a></span>toggle</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">toggle = Toggle(&amp;<a class="el" href="#a7df206f5592b8eb0553b4b124f72e72e">toggle_entries</a>, &amp;<a class="el" href="#a7c94829f1a30082a58d9b378c3afdbe9">toggle_selected</a>)</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a7">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00048">48</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a0fc22c6267acc69c3e286346a94da94e" name="a0fc22c6267acc69c3e286346a94da94e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fc22c6267acc69c3e286346a94da94e">&#9670;&#160;</a></span>checkbox_1_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool checkbox_1_selected = false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a8">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00052">52</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a7e0c54c7c3439400acf8872e55e22f74" name="a7e0c54c7c3439400acf8872e55e22f74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e0c54c7c3439400acf8872e55e22f74">&#9670;&#160;</a></span>checkbox_2_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool checkbox_2_selected = false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a9">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00053">53</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a3e5c2ac6bf6b8f0ee5a001e14b34255f" name="a3e5c2ac6bf6b8f0ee5a001e14b34255f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e5c2ac6bf6b8f0ee5a001e14b34255f">&#9670;&#160;</a></span>checkbox_3_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool checkbox_3_selected = false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a10">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00054">54</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a0c67da2c8c743e9a8353163dff110024" name="a0c67da2c8c743e9a8353163dff110024"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c67da2c8c743e9a8353163dff110024">&#9670;&#160;</a></span>checkbox_4_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool checkbox_4_selected = false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a11">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00055">55</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a1f3d583d421b1f81dfb46e6482a010c2" name="a1f3d583d421b1f81dfb46e6482a010c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f3d583d421b1f81dfb46e6482a010c2">&#9670;&#160;</a></span>checkboxes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">checkboxes</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= Container::Vertical({</div>
<div class="line"> <a class="code hl_function" href="group__component.html#ga243cc8fe212cb7467025c89e84288bdb">Checkbox</a>(<span class="stringliteral">&quot;checkbox1&quot;</span>, &amp;<a class="code hl_variable" href="#a0fc22c6267acc69c3e286346a94da94e">checkbox_1_selected</a>),</div>
<div class="line"> <a class="code hl_function" href="group__component.html#ga243cc8fe212cb7467025c89e84288bdb">Checkbox</a>(<span class="stringliteral">&quot;checkbox2&quot;</span>, &amp;<a class="code hl_variable" href="#a7e0c54c7c3439400acf8872e55e22f74">checkbox_2_selected</a>),</div>
<div class="line"> <a class="code hl_function" href="group__component.html#ga243cc8fe212cb7467025c89e84288bdb">Checkbox</a>(<span class="stringliteral">&quot;checkbox3&quot;</span>, &amp;<a class="code hl_variable" href="#a3e5c2ac6bf6b8f0ee5a001e14b34255f">checkbox_3_selected</a>),</div>
<div class="line"> <a class="code hl_function" href="group__component.html#ga243cc8fe212cb7467025c89e84288bdb">Checkbox</a>(<span class="stringliteral">&quot;checkbox4&quot;</span>, &amp;<a class="code hl_variable" href="#a0c67da2c8c743e9a8353163dff110024">checkbox_4_selected</a>),</div>
<div class="line"> })</div>
<div class="ttc" id="agallery_8cpp_html_a0c67da2c8c743e9a8353163dff110024"><div class="ttname"><a href="#a0c67da2c8c743e9a8353163dff110024">checkbox_4_selected</a></div><div class="ttdeci">bool checkbox_4_selected</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00055">gallery.cpp:55</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a0fc22c6267acc69c3e286346a94da94e"><div class="ttname"><a href="#a0fc22c6267acc69c3e286346a94da94e">checkbox_1_selected</a></div><div class="ttdeci">bool checkbox_1_selected</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00052">gallery.cpp:52</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a3e5c2ac6bf6b8f0ee5a001e14b34255f"><div class="ttname"><a href="#a3e5c2ac6bf6b8f0ee5a001e14b34255f">checkbox_3_selected</a></div><div class="ttdeci">bool checkbox_3_selected</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00054">gallery.cpp:54</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a7e0c54c7c3439400acf8872e55e22f74"><div class="ttname"><a href="#a7e0c54c7c3439400acf8872e55e22f74">checkbox_2_selected</a></div><div class="ttdeci">bool checkbox_2_selected</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00053">gallery.cpp:53</a></div></div>
<div class="ttc" id="agroup__component_html_ga243cc8fe212cb7467025c89e84288bdb"><div class="ttname"><a href="group__component.html#ga243cc8fe212cb7467025c89e84288bdb">ftxui::Checkbox</a></div><div class="ttdeci">Component Checkbox(CheckboxOption options)</div><div class="ttdef"><b>Definition</b> <a href="src_2ftxui_2component_2checkbox_8cpp_source.html#l00107">src/ftxui/component/checkbox.cpp:107</a></div></div>
</div><!-- fragment --><dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a12">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00057">57</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a981dd77a66be08ae4cff176eefb99b16" name="a981dd77a66be08ae4cff176eefb99b16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a981dd77a66be08ae4cff176eefb99b16">&#9670;&#160;</a></span>radiobox_selected</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int radiobox_selected = 0</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a13">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00066">66</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="ab0f61defa62c405a77336f266aa2eb93" name="ab0f61defa62c405a77336f266aa2eb93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0f61defa62c405a77336f266aa2eb93">&#9670;&#160;</a></span>radiobox_entries</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;std::string&gt; radiobox_entries</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div>
<div class="line"> <span class="stringliteral">&quot;Radiobox 1&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Radiobox 2&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Radiobox 3&quot;</span>,</div>
<div class="line"> <span class="stringliteral">&quot;Radiobox 4&quot;</span>,</div>
<div class="line"> }</div>
</div><!-- fragment --><dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a14">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00067">67</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a2f9270043301860784c4a1744ff064e1" name="a2f9270043301860784c4a1744ff064e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f9270043301860784c4a1744ff064e1">&#9670;&#160;</a></span>radiobox</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">radiobox = Radiobox(&amp;<a class="el" href="#ab0f61defa62c405a77336f266aa2eb93">radiobox_entries</a>, &amp;<a class="el" href="#a981dd77a66be08ae4cff176eefb99b16">radiobox_selected</a>)</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2dropdown_custom_8cpp-example.html#a1">examples/component/dropdown_custom.cpp</a>, <a class="el" href="examples_2component_2gallery_8cpp-example.html#a15">examples/component/gallery.cpp</a>, <a class="el" href="examples_2component_2menu_in_frame_8cpp-example.html#a1">examples/component/menu_in_frame.cpp</a>, <a class="el" href="examples_2component_2menu_in_frame_horizontal_8cpp-example.html#a1">examples/component/menu_in_frame_horizontal.cpp</a>, and <a class="el" href="examples_2component_2radiobox_in_frame_8cpp-example.html#a1">examples/component/radiobox_in_frame.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00073">73</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a5368e529cd0f34deb4887f2e70e7ea92" name="a5368e529cd0f34deb4887f2e70e7ea92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5368e529cd0f34deb4887f2e70e7ea92">&#9670;&#160;</a></span>input_label</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string input_label</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a16">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00077">77</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a877535c3b6ffdf230bce90c82c597d17" name="a877535c3b6ffdf230bce90c82c597d17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a877535c3b6ffdf230bce90c82c597d17">&#9670;&#160;</a></span>input</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">input = Input(&amp;<a class="el" href="#a5368e529cd0f34deb4887f2e70e7ea92">input_label</a>, &quot;placeholder&quot;)</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a17">examples/component/gallery.cpp</a>, and <a class="el" href="examples_2component_2homescreen_8cpp-example.html#a1">examples/component/homescreen.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00078">78</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a3bb2fc3ae8e0bafc513798bffcc7bd80" name="a3bb2fc3ae8e0bafc513798bffcc7bd80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bb2fc3ae8e0bafc513798bffcc7bd80">&#9670;&#160;</a></span>button_label</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string button_label = &quot;Quit&quot;</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a18">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00082">82</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="ac99c8e828d6c95009d62b49fb5dfbec0" name="ac99c8e828d6c95009d62b49fb5dfbec0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac99c8e828d6c95009d62b49fb5dfbec0">&#9670;&#160;</a></span>on_button_clicked_</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::function&lt;void()&gt; on_button_clicked_</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a19">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00083">83</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a14139799dd4b2fc41ecb6cb14936322f" name="a14139799dd4b2fc41ecb6cb14936322f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14139799dd4b2fc41ecb6cb14936322f">&#9670;&#160;</a></span>button</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">button = Button(&amp;<a class="el" href="#a3bb2fc3ae8e0bafc513798bffcc7bd80">button_label</a>, screen.ExitLoopClosure())</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2button_in_frame_8cpp-example.html#a1">examples/component/button_in_frame.cpp</a>, <a class="el" href="examples_2component_2gallery_8cpp-example.html#a20">examples/component/gallery.cpp</a>, and <a class="el" href="examples_2component_2renderer_8cpp-example.html#a1">examples/component/renderer.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00084">84</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="af69578c6b997f238734526def33b92b7" name="af69578c6b997f238734526def33b92b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af69578c6b997f238734526def33b92b7">&#9670;&#160;</a></span>slider_value_1</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int slider_value_1 = 12</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a21">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00088">88</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a9276795010f180471b7dd26273058018" name="a9276795010f180471b7dd26273058018"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9276795010f180471b7dd26273058018">&#9670;&#160;</a></span>slider_value_2</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int slider_value_2 = 56</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a22">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00089">89</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a2a3716976f1505be2ffcbff4cc14a104" name="a2a3716976f1505be2ffcbff4cc14a104"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a3716976f1505be2ffcbff4cc14a104">&#9670;&#160;</a></span>slider_value_3</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int slider_value_3 = 128</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a23">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00090">90</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="af2dc883631510a23f84eaf3b6a6f941c" name="af2dc883631510a23f84eaf3b6a6f941c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2dc883631510a23f84eaf3b6a6f941c">&#9670;&#160;</a></span>sliders</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sliders</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= Container::Vertical({</div>
<div class="line"> <a class="code hl_function" href="namespaceftxui.html#aa3558d992a72679e5e9c9c7b67abd727">Slider</a>(<span class="stringliteral">&quot;R:&quot;</span>, &amp;<a class="code hl_variable" href="#af69578c6b997f238734526def33b92b7">slider_value_1</a>, 0, 256, 1),</div>
<div class="line"> <a class="code hl_function" href="namespaceftxui.html#aa3558d992a72679e5e9c9c7b67abd727">Slider</a>(<span class="stringliteral">&quot;G:&quot;</span>, &amp;<a class="code hl_variable" href="#a9276795010f180471b7dd26273058018">slider_value_2</a>, 0, 256, 1),</div>
<div class="line"> <a class="code hl_function" href="namespaceftxui.html#aa3558d992a72679e5e9c9c7b67abd727">Slider</a>(<span class="stringliteral">&quot;B:&quot;</span>, &amp;<a class="code hl_variable" href="#a2a3716976f1505be2ffcbff4cc14a104">slider_value_3</a>, 0, 256, 1),</div>
<div class="line"> })</div>
<div class="ttc" id="agallery_8cpp_html_a2a3716976f1505be2ffcbff4cc14a104"><div class="ttname"><a href="#a2a3716976f1505be2ffcbff4cc14a104">slider_value_3</a></div><div class="ttdeci">int slider_value_3</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00090">gallery.cpp:90</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a9276795010f180471b7dd26273058018"><div class="ttname"><a href="#a9276795010f180471b7dd26273058018">slider_value_2</a></div><div class="ttdeci">int slider_value_2</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00089">gallery.cpp:89</a></div></div>
<div class="ttc" id="agallery_8cpp_html_af69578c6b997f238734526def33b92b7"><div class="ttname"><a href="#af69578c6b997f238734526def33b92b7">slider_value_1</a></div><div class="ttdeci">int slider_value_1</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00088">gallery.cpp:88</a></div></div>
<div class="ttc" id="anamespaceftxui_html_aa3558d992a72679e5e9c9c7b67abd727"><div class="ttname"><a href="namespaceftxui.html#aa3558d992a72679e5e9c9c7b67abd727">ftxui::Slider</a></div><div class="ttdeci">Component Slider(SliderOption&lt; T &gt; options)</div></div>
</div><!-- fragment --><dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a24">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00091">91</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="aaf5c14b236419cfc06ac31a1ada008d2" name="aaf5c14b236419cfc06ac31a1ada008d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf5c14b236419cfc06ac31a1ada008d2">&#9670;&#160;</a></span>lorel_ipsum</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">lorel_ipsum</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= <a class="code hl_function" href="group__component.html#ga533e883e2aeea28de2b60564fcaf0361">Renderer</a>([] {</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code hl_function" href="group__dom.html#gafd28058f0ccbbdf34691a85a7cc9b2e3">vbox</a>({</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#ga75baaa2734ed76a9f478beaafa87ae57">text</a>(<span class="stringliteral">&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. &quot;</span>),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#ga75baaa2734ed76a9f478beaafa87ae57">text</a>(<span class="stringliteral">&quot;Sed do eiusmod tempor incididunt ut labore et dolore magna &quot;</span></div>
<div class="line"> <span class="stringliteral">&quot;aliqua. &quot;</span>),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#ga75baaa2734ed76a9f478beaafa87ae57">text</a>(<span class="stringliteral">&quot;Ut enim ad minim veniam, quis nostrud exercitation ullamco &quot;</span></div>
<div class="line"> <span class="stringliteral">&quot;laboris nisi ut aliquip ex ea commodo consequat. &quot;</span>),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#ga75baaa2734ed76a9f478beaafa87ae57">text</a>(<span class="stringliteral">&quot;Duis aute irure dolor in reprehenderit in voluptate velit esse &quot;</span></div>
<div class="line"> <span class="stringliteral">&quot;cillum dolore eu fugiat nulla pariatur. &quot;</span>),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#ga75baaa2734ed76a9f478beaafa87ae57">text</a>(<span class="stringliteral">&quot;Excepteur sint occaecat cupidatat non proident, sunt in culpa &quot;</span></div>
<div class="line"> <span class="stringliteral">&quot;qui officia deserunt mollit anim id est laborum. &quot;</span>),</div>
<div class="line"> </div>
<div class="line"> });</div>
<div class="line"> })</div>
<div class="ttc" id="agroup__component_html_ga533e883e2aeea28de2b60564fcaf0361"><div class="ttname"><a href="group__component.html#ga533e883e2aeea28de2b60564fcaf0361">ftxui::Renderer</a></div><div class="ttdeci">Component Renderer(Component child, std::function&lt; Element()&gt;)</div><div class="ttdoc">回傳一個新的元件,類似於 |child|,但使用 |render| 作為 Component::Render() 事件。</div><div class="ttdef"><b>Definition</b> <a href="src_2ftxui_2component_2renderer_8cpp_source.html#l00059">src/ftxui/component/renderer.cpp:59</a></div></div>
<div class="ttc" id="agroup__dom_html_ga75baaa2734ed76a9f478beaafa87ae57"><div class="ttname"><a href="group__dom.html#ga75baaa2734ed76a9f478beaafa87ae57">ftxui::text</a></div><div class="ttdeci">Element text(std::wstring text)</div><div class="ttdoc">顯示一段 Unicode 文字。</div><div class="ttdef"><b>Definition</b> <a href="text_8cpp_source.html#l00160">text.cpp:160</a></div></div>
<div class="ttc" id="agroup__dom_html_gafd28058f0ccbbdf34691a85a7cc9b2e3"><div class="ttname"><a href="group__dom.html#gafd28058f0ccbbdf34691a85a7cc9b2e3">ftxui::vbox</a></div><div class="ttdeci">Element vbox(Elements)</div><div class="ttdoc">一個垂直一個接一個顯示元素的容器。</div><div class="ttdef"><b>Definition</b> <a href="vbox_8cpp_source.html#l00095">vbox.cpp:95</a></div></div>
</div><!-- fragment --><dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2gallery_8cpp-example.html#a25">examples/component/gallery.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00099">99</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a768a57bc667a7482ea6e7fdadf02ba90" name="a768a57bc667a7482ea6e7fdadf02ba90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a768a57bc667a7482ea6e7fdadf02ba90">&#9670;&#160;</a></span>component</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">auto component</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= <a class="code hl_function" href="group__component.html#ga533e883e2aeea28de2b60564fcaf0361">Renderer</a>(layout, [&amp;] {</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code hl_function" href="group__dom.html#gafd28058f0ccbbdf34691a85a7cc9b2e3">vbox</a>({</div>
<div class="line"> <a class="code hl_variable" href="#a905479d79c2aa8410d2fc374bc75cc5b">menu</a>-&gt;Render(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#a31dce1c0128d7a2f28549bc690ea5f1a">toggle</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#a1f3d583d421b1f81dfb46e6482a010c2">checkboxes</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#a2f9270043301860784c4a1744ff064e1">radiobox</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#a877535c3b6ffdf230bce90c82c597d17">input</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#af2dc883631510a23f84eaf3b6a6f941c">sliders</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#a14139799dd4b2fc41ecb6cb14936322f">button</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> <a class="code hl_function" href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"> <a class="code hl_variable" href="#aaf5c14b236419cfc06ac31a1ada008d2">lorel_ipsum</a>-&gt;<a class="code hl_function" href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">Render</a>(),</div>
<div class="line"> }) |</div>
<div class="line"> xflex | <a class="code hl_function" href="group__dom.html#ga201220986fbdc539e42efe067985cbdb">size</a>(<a class="code hl_enumvalue" href="namespaceftxui.html#a04711c04f28aabfa0e5928a35baaec53a73c0818986b7c462c2977f57afd00522">WIDTH</a>, <a class="code hl_enumvalue" href="namespaceftxui.html#ae09f44b989d381a387329fd0a0935926a5fae95457121bd697edd588d1b64cc7c">GREATER_THAN</a>, 40) | <a class="code hl_function" href="group__dom.html#gae8537acd423d47cf07e61bd774fb1098">border</a>;</div>
<div class="line"> })</div>
<div class="ttc" id="agallery_8cpp_html_a14139799dd4b2fc41ecb6cb14936322f"><div class="ttname"><a href="#a14139799dd4b2fc41ecb6cb14936322f">button</a></div><div class="ttdeci">auto button</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00084">gallery.cpp:84</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a1f3d583d421b1f81dfb46e6482a010c2"><div class="ttname"><a href="#a1f3d583d421b1f81dfb46e6482a010c2">checkboxes</a></div><div class="ttdeci">auto checkboxes</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00057">gallery.cpp:57</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a2f9270043301860784c4a1744ff064e1"><div class="ttname"><a href="#a2f9270043301860784c4a1744ff064e1">radiobox</a></div><div class="ttdeci">auto radiobox</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00073">gallery.cpp:73</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a31dce1c0128d7a2f28549bc690ea5f1a"><div class="ttname"><a href="#a31dce1c0128d7a2f28549bc690ea5f1a">toggle</a></div><div class="ttdeci">auto toggle</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00048">gallery.cpp:48</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a877535c3b6ffdf230bce90c82c597d17"><div class="ttname"><a href="#a877535c3b6ffdf230bce90c82c597d17">input</a></div><div class="ttdeci">auto input</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00078">gallery.cpp:78</a></div></div>
<div class="ttc" id="agallery_8cpp_html_a905479d79c2aa8410d2fc374bc75cc5b"><div class="ttname"><a href="#a905479d79c2aa8410d2fc374bc75cc5b">menu</a></div><div class="ttdeci">auto menu</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00039">gallery.cpp:39</a></div></div>
<div class="ttc" id="agallery_8cpp_html_aaf5c14b236419cfc06ac31a1ada008d2"><div class="ttname"><a href="#aaf5c14b236419cfc06ac31a1ada008d2">lorel_ipsum</a></div><div class="ttdeci">auto lorel_ipsum</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00099">gallery.cpp:99</a></div></div>
<div class="ttc" id="agallery_8cpp_html_af2dc883631510a23f84eaf3b6a6f941c"><div class="ttname"><a href="#af2dc883631510a23f84eaf3b6a6f941c">sliders</a></div><div class="ttdeci">auto sliders</div><div class="ttdef"><b>Definition</b> <a href="gallery_8cpp_source.html#l00091">gallery.cpp:91</a></div></div>
<div class="ttc" id="agroup__dom_html_a02feb1564ee23b6229b82be0289c96e4"><div class="ttname"><a href="group__dom.html#a02feb1564ee23b6229b82be0289c96e4">ftxui::Node::Render</a></div><div class="ttdeci">virtual void Render(Screen &amp;screen)</div></div>
<div class="ttc" id="agroup__dom_html_ga201220986fbdc539e42efe067985cbdb"><div class="ttname"><a href="group__dom.html#ga201220986fbdc539e42efe067985cbdb">ftxui::size</a></div><div class="ttdeci">Decorator size(WidthOrHeight, Constraint, int value)</div><div class="ttdoc">限制元素的大小。</div><div class="ttdef"><b>Definition</b> <a href="src_2ftxui_2dom_2size_8cpp_source.html#l00088">src/ftxui/dom/size.cpp:88</a></div></div>
<div class="ttc" id="agroup__dom_html_gac1ef1cf6bf7cd0759ffa195071edb2a0"><div class="ttname"><a href="group__dom.html#gac1ef1cf6bf7cd0759ffa195071edb2a0">ftxui::separator</a></div><div class="ttdeci">Element separator()</div><div class="ttdoc">在兩個元素之間繪製垂直或水平分隔線。</div><div class="ttdef"><b>Definition</b> <a href="src_2ftxui_2dom_2separator_8cpp_source.html#l00133">src/ftxui/dom/separator.cpp:133</a></div></div>
<div class="ttc" id="agroup__dom_html_gae8537acd423d47cf07e61bd774fb1098"><div class="ttname"><a href="group__dom.html#gae8537acd423d47cf07e61bd774fb1098">ftxui::border</a></div><div class="ttdeci">Element border(Element)</div><div class="ttdoc">在元素周圍繪製邊框。</div><div class="ttdef"><b>Definition</b> <a href="src_2ftxui_2dom_2border_8cpp_source.html#l00227">src/ftxui/dom/border.cpp:227</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a04711c04f28aabfa0e5928a35baaec53a73c0818986b7c462c2977f57afd00522"><div class="ttname"><a href="namespaceftxui.html#a04711c04f28aabfa0e5928a35baaec53a73c0818986b7c462c2977f57afd00522">ftxui::WIDTH</a></div><div class="ttdeci">@ WIDTH</div><div class="ttdef"><b>Definition</b> <a href="elements_8hpp_source.html#l00158">elements.hpp:158</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ae09f44b989d381a387329fd0a0935926a5fae95457121bd697edd588d1b64cc7c"><div class="ttname"><a href="namespaceftxui.html#ae09f44b989d381a387329fd0a0935926a5fae95457121bd697edd588d1b64cc7c">ftxui::GREATER_THAN</a></div><div class="ttdeci">@ GREATER_THAN</div><div class="ttdef"><b>Definition</b> <a href="elements_8hpp_source.html#l00159">elements.hpp:159</a></div></div>
</div><!-- fragment --><dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2component_2button_8cpp-example.html#a4">examples/component/button.cpp</a>, <a class="el" href="examples_2component_2button_animated_8cpp-example.html#a1">examples/component/button_animated.cpp</a>, <a class="el" href="examples_2component_2canvas_animated_8cpp-example.html#a10">examples/component/canvas_animated.cpp</a>, <a class="el" href="examples_2component_2collapsible_8cpp-example.html#a3">examples/component/collapsible.cpp</a>, <a class="el" href="examples_2component_2custom_loop_8cpp-example.html#a1">examples/component/custom_loop.cpp</a>, <a class="el" href="examples_2component_2gallery_8cpp-example.html#a1">examples/component/gallery.cpp</a>, <a class="el" href="examples_2component_2input_8cpp-example.html#a5">examples/component/input.cpp</a>, <a class="el" href="examples_2component_2menu_multiple_8cpp-example.html#a1">examples/component/menu_multiple.cpp</a>, <a class="el" href="examples_2component_2modal_dialog_8cpp-example.html#a2">examples/component/modal_dialog.cpp</a>, <a class="el" href="examples_2component_2print_key_press_8cpp-example.html#a4">examples/component/print_key_press.cpp</a>, and <a class="el" href="examples_2component_2textarea_8cpp-example.html#a1">examples/component/textarea.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00127">127</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
<a id="a9717e7bbecb906637e86cef6da3d83c2" name="a9717e7bbecb906637e86cef6da3d83c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9717e7bbecb906637e86cef6da3d83c2">&#9670;&#160;</a></span>return</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">return</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="gallery_8cpp_source.html#l00150">150</a> of file <a class="el" href="gallery_8cpp_source.html">gallery.cpp</a>.</p>
</div>
</div>
</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! -->
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const projectNumber = document.getElementById('projectname');
if (!projectNumber) {
console.warn('Doxygen element with ID "projectnumber" not found. Cannot add version switcher.');
return;
}
const langs = ["en", "es", "fr", "ja", "zh-CH", "zh-TW"];
const lang_paths = {"en": "../index.html", "es": "../es/index.html", "fr": "../fr/index.html", "ja": "../ja/index.html", "zh-CH": "../zh-CH/index.html", "zh-TW": "index.html"};
const lang_display = {"en": "English", "es": "Espa\u00f1ol", "fr": "Fran\u00e7ais", "ja": "\u65e5\u672c\u8a9e", "zh-CH": "\u4e2d\u6587 (\u7b80\u4f53)", "zh-TW": "\u4e2d\u6587 (\u7e41\u9ad4)"};
const versions = ["main"];
const version_paths = {"main": "index.html"};
const currentLang = "zh-TW";
const currentVersion = "main";
// Helper function to create a styled select element
const createSelect = (options, current, paths, label, displayMap = null) => {
const select = document.createElement('select');
select.title = label;
select.onchange = function() {
const selectedValue = this.value;
if (selectedValue in paths) {
window.location.href = paths[selectedValue];
}
};
// Sort versions: 'main' first, then others numerically descending.
options.sort((a, b) => {
if (a === 'main') return -1;
if (b === 'main') return 1;
return b.localeCompare(a, undefined, { numeric: true, sensitivity: 'base' });
});
options.forEach(v => {
const option = document.createElement('option');
option.value = v;
// Use the displayMap if provided, otherwise default to the value (v)
option.textContent = displayMap ? displayMap[v] : v;
if (v === current) {
option.selected = true;
}
select.appendChild(option);
});
// Apply some styling to make it look good.
Object.assign(select.style, {
backgroundColor: 'rgba(0, 0, 0, 0.8)',
color: 'white',
border: '1px solid rgba(255, 255, 255, 0.2)',
padding: '5px',
borderRadius: '5px',
fontSize: '14px',
fontFamily: 'inherit',
margin: '0 5px 0 0',
cursor: 'pointer'
});
return select;
};
// 1. Create Language Switcher, passing the language display names map
const langSelect = createSelect(langs, currentLang, lang_paths, 'Select Language', lang_display);
// 2. Create Version Switcher
const versionSelect = createSelect(versions, currentVersion, version_paths, 'Select Version');
// 3. Create FTXUI title.
const ftxuiTitle = document.createElement('span');
ftxuiTitle.textContent = 'FTXUI: ';
Object.assign(ftxuiTitle.style, {
color: 'white',
fontSize: '20px',
fontWeight: 'bold',
marginRight: '10px'
});
// 3. Create a container to hold both selectors
const container = document.createElement('div');
container.id = 'version-lang-switchers';
Object.assign(container.style, {
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
width: 'auto'
});
container.appendChild(ftxuiTitle);
container.appendChild(langSelect);
container.appendChild(versionSelect);
Object.assign(container.style, {
backgroundColor: 'rgba(0, 0, 0, 0.5)',
padding: '5px 10px',
borderRadius: '8px'
});
// Replace the Doxygen project number element with our container.
projectNumber.replaceWith(container);
// Clean up the original Doxygen project number text if it still exists nearby
const parent = container.parentElement;
if (parent) {
const textNode = Array.from(parent.childNodes).find(n => n.nodeType === 3 && n.textContent.trim() !== '');
if (textNode) {
textNode.remove();
}
}
});
</script>
</body>
</html>