Files
FTXUI/en/v0.11/component__options_8hpp_source.html

379 lines
48 KiB
HTML
Raw Normal View History

<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FTXUI: include/ftxui/component/component_options.hpp Source File</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>
<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_extra.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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">FTXUI
&#160;<span id="projectnumber">0.11.0</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('component__options_8hpp_source.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">component_options.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="component__options_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;<a class="code" href="elements_8hpp.html">ftxui/dom/elements.hpp</a>&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;<a class="code" href="ref_8hpp.html">ftxui/util/ref.hpp</a>&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceftxui.html">ftxui</a> {</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"></span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">/// @brief Option for the Menu component.</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00011" data-start="{" data-end="};">
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 11</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1MenuOption">MenuOption</a> {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a"> 12</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a">style_normal</a> = <a class="code hl_function" href="namespaceftxui.html#a1bfd3885ac8b40dc82a1103725003c07">nothing</a>; <span class="comment">///&lt; style.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9"> 13</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9">style_focused</a> = <a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>; <span class="comment">///&lt; Style when focused.</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083"> 14</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083">style_selected</a> = <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e"> 15</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e">style_selected_focused</a> =</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a>(<a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>) | <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected and focused.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"></span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> /// Called when the selected entry changes.</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a"> 19</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a">on_change</a> = [] {};<span class="comment"></span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment"> /// Called when the user presses enter.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535"> 21</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535">on_enter</a> = [] {};</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a93d5d37708b77971a666b73486017835"> 23</a></span> <a class="code hl_class" href="classftxui_1_1Ref.html">Ref&lt;int&gt;</a> <a class="code hl_variable" href="namespaceftxui.html#a93d5d37708b77971a666b73486017835">focused_entry</a> = 0;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>};</div>
</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment"></span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">/// @brief Option for the MenuEntry component.</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="};">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 28</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1MenuEntryOption">MenuEntryOption</a> {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a"> 29</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a">style_normal</a> = <a class="code hl_function" href="namespaceftxui.html#a1bfd3885ac8b40dc82a1103725003c07">nothing</a>; <span class="comment">///&lt; style.</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9"> 30</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9">style_focused</a> = <a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>; <span class="comment">///&lt; Style when focused.</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083"> 31</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083">style_selected</a> = <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected.</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e"> 32</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e">style_selected_focused</a> =</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a>(<a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>) | <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected and focused.</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>};</div>
</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment"></span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">/// @brief Option for the Button component.</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00038" data-start="{" data-end="};">
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 38</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1ButtonOption">ButtonOption</a> {<span class="comment"></span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment"> /// Whether to show a border around the button.</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="namespaceftxui.html#adcfcd0968104c40653bbbf51ec6ea23b"> 40</a></span><span class="comment"></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="namespaceftxui.html#adcfcd0968104c40653bbbf51ec6ea23b">border</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>};</div>
</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment"></span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// @brief Option for the Checkbox component.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00045" data-start="{" data-end="};">
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 45</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1CheckboxOption">CheckboxOption</a> {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a44a7f1250e18c7e4d4d78803b83e2dda"> 46</a></span> std::string <a class="code hl_variable" href="namespaceftxui.html#a44a7f1250e18c7e4d4d78803b83e2dda">style_checked</a> = <span class="stringliteral">&quot;&quot;</span>; <span class="comment">///&lt; Prefix for a &quot;checked&quot; state.</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a158c49f391a0116a6e6f44831fb37264"> 47</a></span> std::string <a class="code hl_variable" href="namespaceftxui.html#a158c49f391a0116a6e6f44831fb37264">style_unchecked</a> = <span class="stringliteral">&quot;&quot;</span>; <span class="comment">///&lt; Prefix for a &quot;unchecked&quot; state.</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a"> 48</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a">style_normal</a> = <a class="code hl_function" href="namespaceftxui.html#a1bfd3885ac8b40dc82a1103725003c07">nothing</a>; <span class="comment">///&lt; style.</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9"> 49</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9">style_focused</a> = <a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>; <span class="comment">///&lt; Style when focused.</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083"> 50</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083">style_selected</a> = <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected.</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e"> 51</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e">style_selected_focused</a> =</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a>(<a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>) | <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected and focused.</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment"></span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment"> /// Called when the user change the state.</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a"> 55</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a">on_change</a> = []() {};</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>};</div>
</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment"></span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// @brief Option for the Input component.</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00060" data-start="{" data-end="};">
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 60</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1InputOption">InputOption</a> {<span class="comment"></span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment"> /// Called when the content changes.</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a"> 62</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a">on_change</a> = [] {};<span class="comment"></span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> /// Called when the user presses enter.</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535"> 64</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535">on_enter</a> = [] {};</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"></span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// Obscure the input content using &#39;*&#39;.</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a927bd46792ffe38c7545a764d847d066"> 67</a></span><span class="comment"></span> <a class="code hl_class" href="classftxui_1_1Ref.html">Ref&lt;bool&gt;</a> <a class="code hl_variable" href="namespaceftxui.html#a927bd46792ffe38c7545a764d847d066">password</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"></span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"> /// When set different from -1, this attributes is used to store the cursor</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment"> /// position.</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a699547942204afa70864e0e6df94c96c"> 71</a></span><span class="comment"></span> <a class="code hl_class" href="classftxui_1_1Ref.html">Ref&lt;int&gt;</a> <a class="code hl_variable" href="namespaceftxui.html#a699547942204afa70864e0e6df94c96c">cursor_position</a> = -1;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>};</div>
</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"></span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment">/// @brief Option for the Radiobox component.</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00076" data-start="{" data-end="};">
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 76</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1RadioboxOption">RadioboxOption</a> {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a44a7f1250e18c7e4d4d78803b83e2dda"> 77</a></span> std::string <a class="code hl_variable" href="namespaceftxui.html#a44a7f1250e18c7e4d4d78803b83e2dda">style_checked</a> = <span class="stringliteral">&quot;&quot;</span>; <span class="comment">///&lt; Prefix for a &quot;checked&quot; state.</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a158c49f391a0116a6e6f44831fb37264"> 78</a></span> std::string <a class="code hl_variable" href="namespaceftxui.html#a158c49f391a0116a6e6f44831fb37264">style_unchecked</a> = <span class="stringliteral">&quot;&quot;</span>; <span class="comment">///&lt; Prefix for a &quot;unchecked&quot; state.</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a"> 79</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a">style_normal</a> = <a class="code hl_function" href="namespaceftxui.html#a1bfd3885ac8b40dc82a1103725003c07">nothing</a>; <span class="comment">///&lt; style.</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9"> 80</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9">style_focused</a> = <a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>; <span class="comment">///&lt; Style when focused.</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083"> 81</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083">style_selected</a> = <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected.</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e"> 82</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e">style_selected_focused</a> =</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a>(<a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>) | <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected and focused.</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"></span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// Called when the selected entry changes.</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a"> 86</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a">on_change</a> = []() {};</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a93d5d37708b77971a666b73486017835"> 88</a></span> <a class="code hl_class" href="classftxui_1_1Ref.html">Ref&lt;int&gt;</a> <a class="code hl_variable" href="namespaceftxui.html#a93d5d37708b77971a666b73486017835">focused_entry</a> = 0;</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>};</div>
</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"></span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment">/// @brief Option for the Toggle component.</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment">/// @ingroup component</span></div>
<div class="foldopen" id="foldopen00093" data-start="{" data-end="};">
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="namespaceftxui.html"> 93</a></span><span class="comment"></span><span class="keyword">struct </span><a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1ToggleOption">ToggleOption</a> {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a"> 94</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a">style_normal</a> = <a class="code hl_function" href="namespaceftxui.html#a1bfd3885ac8b40dc82a1103725003c07">nothing</a>; <span class="comment">///&lt; style.</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9"> 95</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9">style_focused</a> = <a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>; <span class="comment">///&lt; Style when focused.</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083"> 96</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083">style_selected</a> = <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected.</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e"> 97</a></span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a> <a class="code hl_variable" href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e">style_selected_focused</a> =</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_typedef" href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">Decorator</a>(<a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>) | <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>; <span class="comment">///&lt; Style when selected and focused.</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"></span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> /// Called when the selected entry changes.</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a"> 101</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a">on_change</a> = [] {};<span class="comment"></span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> /// Called when the user presses enter.</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535"> 103</a></span><span class="comment"></span> std::function&lt;void()&gt; <a class="code hl_variable" href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535">on_enter</a> = [] {};</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="namespaceftxui.html#a93d5d37708b77971a666b73486017835"> 105</a></span> <a class="code hl_class" href="classftxui_1_1Ref.html">Ref&lt;int&gt;</a> <a class="code hl_variable" href="namespaceftxui.html#a93d5d37708b77971a666b73486017835">focused_entry</a> = 0;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>};</div>
</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>} <span class="comment">// namespace ftxui</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor">#endif </span><span class="comment">/* end of include guard: FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="comment">// Copyright 2021 Arthur Sonzogni. All rights reserved.</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="comment">// Use of this source code is governed by the MIT license that can be found in</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment">// the LICENSE file.</span></div>
<div class="ttc" id="aclassftxui_1_1Ref_html"><div class="ttname"><a href="classftxui_1_1Ref.html">ftxui::Ref</a></div><div class="ttdoc">An adapter. Own or reference an mutable object.</div><div class="ttdef"><b>Definition</b> <a href="ref_8hpp_source.html#l00027">ref.hpp:27</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="anamespaceftxui_html"><div class="ttname"><a href="namespaceftxui.html">ftxui</a></div><div class="ttdef"><b>Definition</b> <a href="captured__mouse_8hpp_source.html#l00006">captured_mouse.hpp:6</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a158c49f391a0116a6e6f44831fb37264"><div class="ttname"><a href="namespaceftxui.html#a158c49f391a0116a6e6f44831fb37264">ftxui::CheckboxOption::style_unchecked</a></div><div class="ttdeci">std::string style_unchecked</div><div class="ttdoc">Prefix for a &quot;unchecked&quot; state.</div><div class="ttdef"><b>Definition</b> <a href="#l00047">component_options.hpp:47</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a164021903e9ac6f1357e4186582891e3"><div class="ttname"><a href="namespaceftxui.html#a164021903e9ac6f1357e4186582891e3">ftxui::Decorator</a></div><div class="ttdeci">std::function&lt; Element(Element)&gt; Decorator</div><div class="ttdef"><b>Definition</b> <a href="elements_8hpp_source.html#l00017">elements.hpp:17</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a1bfd3885ac8b40dc82a1103725003c07"><div class="ttname"><a href="namespaceftxui.html#a1bfd3885ac8b40dc82a1103725003c07">ftxui::nothing</a></div><div class="ttdeci">Element nothing(Element element)</div><div class="ttdoc">A decoration doing absolutely nothing.</div><div class="ttdef"><b>Definition</b> <a href="util_8cpp_source.html#l00025">util.cpp:25</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a22426a18ba7f39b5548959d04e7263e9"><div class="ttname"><a href="namespaceftxui.html#a22426a18ba7f39b5548959d04e7263e9">ftxui::MenuOption::style_focused</a></div><div class="ttdeci">Decorator style_focused</div><div class="ttdoc">Style when focused.</div><div class="ttdef"><b>Definition</b> <a href="#l00013">component_options.hpp:13</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a353c769068e25303eb41fa2da565c604"><div class="ttname"><a href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">ftxui::bold</a></div><div class="ttdeci">Element bold(Element)</div><div class="ttdoc">Use a bold font, for elements with more emphasis.</div><div class="ttdef"><b>Definition</b> <a href="bold_8cpp_source.html#l00028">bold.cpp:28</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a44a7f1250e18c7e4d4d78803b83e2dda"><div class="ttname"><a href="namespaceftxui.html#a44a7f1250e18c7e4d4d78803b83e2dda">ftxui::CheckboxOption::style_checked</a></div><div class="ttdeci">std::string style_checked</div><div class="ttdoc">Prefix for a &quot;checked&quot; state.</div><div class="ttdef"><b>Definition</b> <a href="#l00046">component_options.hpp:46</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a4ba9530701be07334a17c0184747c535"><div class="ttname"><a href="namespaceftxui.html#a4ba9530701be07334a17c0184747c535">ftxui::MenuOption::on_enter</a></div><div class="ttdeci">std::function&lt; void()&gt; on_enter</div><div class="ttdoc">Called when the user presses enter.</div><div class="ttdef"><b>Definition</b> <a href="#l00021">component_options.hpp:21</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a672456b8f2091b615a30ff755418b37b"><div class="ttname"><a href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">ftxui::inverted</a></div><div class="ttdeci">Element inverted(Element)</div><div class="ttdoc">Add a filter that will invert the foreground and the background colors.</div><div class="ttdef"><b>Definition</b> <a href="inverted_8cpp_source.html#l00029">inverted.cpp:29</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a699547942204afa70864e0e6df94c96c"><div class="ttname"><a href="namespaceftxui.html#a699547942204afa70864e0e6df94c96c">ftxui::InputOption::cursor_position</a></div><div class="ttdeci">Ref&lt; int &gt; cursor_position</div><div class="ttdef"><b>Definition</b> <a href="#l00071">component_options.hpp:71</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a77320a4cdcf2c581eab7169d814e021e"><div class="ttname"><a href="namespaceftxui.html#a77320a4cdcf2c581eab7169d814e021e">ftxui::MenuOption::style_selected_focused</a></div><div class="ttdeci">Decorator style_selected_focused</div><div class="ttdoc">Style when selected and focused.</div><div class="ttdef"><b>Definition</b> <a href="#l00015">component_options.hpp:15</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a867a831f426456e6779b65b7b2c06083"><div class="ttname"><a href="namespaceftxui.html#a867a831f426456e6779b65b7b2c06083">ftxui::MenuOption::style_selected</a></div><div class="ttdeci">Decorator style_selected</div><div class="ttdoc">Style when selected.</div><div class="ttdef"><b>Definition</b> <a href="#l00014">component_options.hpp:14</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a927bd46792ffe38c7545a764d847d066"><div class="ttname"><a href="namespaceftxui.html#a927bd46792ffe38c7545a764d847d066">ftxui::InputOption::password</a></div><div class="ttdeci">Ref&lt; bool &gt; password</div><div class="ttdoc">Obscure the input content using '*'.</div><div class="ttdef"><b>Definition</b> <a href="#l00067">component_options.hpp:67</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a93d5d37708b77971a666b73486017835"><div class="ttname"><a href="namespaceftxui.html#a93d5d37708b77971a666b73486017835">ftxui::MenuOption::focused_entry</a></div><div class="ttdeci">Ref&lt; int &gt; focused_entry</div><div class="ttdef"><b>Definition</b> <a href="#l00023">component_options.hpp:23</a></div></div>
<div class="ttc" id="anamespaceftxui_html_abdfe3c83deeec2323ff90248815b8f0a"><div class="ttname"><a href="namespaceftxui.html#abdfe3c83deeec2323ff90248815b8f0a">ftxui::MenuOption::on_change</a></div><div class="ttdeci">std::function&lt; void()&gt; on_change</div><div class="ttdoc">Called when the selected entry changes.</div><div class="ttdef"><b>Definition</b> <a href="#l00019">component_options.hpp:19</a></div></div>
<div class="ttc" id="anamespaceftxui_html_adcfcd0968104c40653bbbf51ec6ea23b"><div class="ttname"><a href="namespaceftxui.html#adcfcd0968104c40653bbbf51ec6ea23b">ftxui::ButtonOption::border</a></div><div class="ttdeci">bool border</div><div class="ttdoc">Whether to show a border around the button.</div><div class="ttdef"><b>Definition</b> <a href="#l00040">component_options.hpp:40</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ae7939473100375eef976e64e6d51549a"><div class="ttname"><a href="namespaceftxui.html#ae7939473100375eef976e64e6d51549a">ftxui::MenuOption::style_normal</a></div><div class="ttdeci">Decorator style_normal</div><div class="ttdoc">style.</div><div class="ttdef"><b>Definition</b> <a href="#l00012">component_options.hpp:12</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1ButtonOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1ButtonOption">ftxui::ButtonOption</a></div><div class="ttdoc">Option for the Button component.</div><div class="ttdef"><b>Definition</b> <a href="#l00038">component_options.hpp:38</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1CheckboxOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1CheckboxOption">ftxui::CheckboxOption</a></div><div class="ttdoc">Option for the Checkbox component.</div><div class="ttdef"><b>Definition</b> <a href="#l00045">component_options.hpp:45</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1InputOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1InputOption">ftxui::InputOption</a></div><div class="ttdoc">Option for the Input component.</div><div class="ttdef"><b>Definition</b> <a href="#l00060">component_options.hpp:60</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1MenuEntryOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1MenuEntryOption">ftxui::MenuEntryOption</a></div><div class="ttdoc">Option for the MenuEntry component.</div><div class="ttdef"><b>Definition</b> <a href="#l00028">component_options.hpp:28</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1MenuOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1MenuOption">ftxui::MenuOption</a></div><div class="ttdoc">Option for the Menu component.</div><div class="ttdef"><b>Definition</b> <a href="#l00011">component_options.hpp:11</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1RadioboxOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1RadioboxOption">ftxui::RadioboxOption</a></div><div class="ttdoc">Option for the Radiobox component.</div><div class="ttdef"><b>Definition</b> <a href="#l00076">component_options.hpp:76</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1ToggleOption"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1ToggleOption">ftxui::ToggleOption</a></div><div class="ttdoc">Option for the Toggle component.</div><div class="ttdef"><b>Definition</b> <a href="#l00093">component_options.hpp:93</a></div></div>
<div class="ttc" id="aref_8hpp_html"><div class="ttname"><a href="ref_8hpp.html">ref.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- 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": "../../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", "v6.1.9", "v6.1.8", "v6.1.7", "v6.1.6", "v6.1.5", "v6.1.4", "v6.1.3", "v6.1.2", "v6.1.1", "v6.1.0", "v6.0.2", "v6.0.1", "v6.0.0", "v5.0.0", "v4.1.1", "v4.1.0", "v4.0.0", "v3.0.0", "v2.0.0", "v0.9", "v0.11", "v0.10"];
const version_paths = {"main": "../../index.html", "v6.1.9": "../v6.1.9/index.html", "v6.1.8": "../v6.1.8/index.html", "v6.1.7": "../v6.1.7/index.html", "v6.1.6": "../v6.1.6/index.html", "v6.1.5": "../v6.1.5/index.html", "v6.1.4": "../v6.1.4/index.html", "v6.1.3": "../v6.1.3/index.html", "v6.1.2": "../v6.1.2/index.html", "v6.1.1": "../v6.1.1/index.html", "v6.1.0": "../v6.1.0/index.html", "v6.0.2": "../v6.0.2/index.html", "v6.0.1": "../v6.0.1/index.html", "v6.0.0": "../v6.0.0/index.html", "v5.0.0": "../v5.0.0/index.html", "v4.1.1": "../v4.1.1/index.html", "v4.1.0": "../v4.1.0/index.html", "v4.0.0": "../v4.0.0/index.html", "v3.0.0": "../v3.0.0/index.html", "v2.0.0": "../v2.0.0/index.html", "v0.9": "../v0.9/index.html", "v0.11": "index.html", "v0.10": "../v0.10/index.html"};
const currentLang = "en";
const currentVersion = "v0.11";
// 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>