Files
FTXUI/en/v4.0.0/dropdown_8cpp_source.html
2025-11-12 12:56:59 +00:00

279 lines
32 KiB
HTML

<!-- 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: src/ftxui/component/dropdown.cpp 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">4.0.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('dropdown_8cpp_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">dropdown.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="dropdown_8cpp.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">#include &lt;algorithm&gt;</span> <span class="comment">// for max, min</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include &lt;functional&gt;</span> <span class="comment">// for function</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &lt;memory&gt;</span> <span class="comment">// for __shared_ptr_access, shared_ptr, allocator</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;string&gt;</span> <span class="comment">// for string</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;<a class="code" href="component_8hpp.html">ftxui/component/component.hpp</a>&quot;</span> <span class="comment">// for Maybe, Checkbox, Make, Radiobox, Vertical, Dropdown</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;<a class="code" href="component__base_8hpp.html">ftxui/component/component_base.hpp</a>&quot;</span> <span class="comment">// for Component, ComponentBase</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;<a class="code" href="component__options_8hpp.html">ftxui/component/component_options.hpp</a>&quot;</span> <span class="comment">// for CheckboxOption, EntryState</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &quot;<a class="code" href="elements_8hpp.html">ftxui/dom/elements.hpp</a>&quot;</span> <span class="comment">// for operator|, Element, border, filler, operator|=, separator, size, text, vbox, frame, vscroll_indicator, hbox, HEIGHT, LESS_THAN, bold, inverted</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;<a class="code" href="ref_8hpp.html">ftxui/util/ref.hpp</a>&quot;</span> <span class="comment">// for ConstStringListRef</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceftxui.html">ftxui</a> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="foldopen" id="foldopen00014" data-start="{" data-end="}">
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="namespaceftxui.html#aa22bddff4aeed66e20f30d0715596999"> 14</a></span><a class="code hl_typedef" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a> <a class="code hl_function" href="namespaceftxui.html#aa22bddff4aeed66e20f30d0715596999">Dropdown</a>(<a class="code hl_class" href="classftxui_1_1ConstStringListRef.html">ConstStringListRef</a> entries, <span class="keywordtype">int</span>* selected) {</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">class </span>Impl : <span class="keyword">public</span> <a class="code hl_class" href="classftxui_1_1ComponentBase.html">ComponentBase</a> {</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> Impl(<a class="code hl_class" href="classftxui_1_1ConstStringListRef.html">ConstStringListRef</a> entries, <span class="keywordtype">int</span>* selected)</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> : entries_(entries), selected_(selected) {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_struct" href="structftxui_1_1CheckboxOption.html">CheckboxOption</a> option;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> option.<a class="code hl_variable" href="structftxui_1_1CheckboxOption.html#afe14c161494dad905597e75661c7b6a0">transform</a> = [](<span class="keyword">const</span> <a class="code hl_struct" href="namespaceftxui.html#structftxui_1_1EntryState">EntryState</a>&amp; s) {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">auto</span> prefix = <a class="code hl_function" href="namespaceftxui.html#a75baaa2734ed76a9f478beaafa87ae57">text</a>(s.state ? <span class="stringliteral">&quot;&quot;</span> : <span class="stringliteral">&quot;&quot;</span>); <span class="comment">// NOLINT</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">auto</span> t = <a class="code hl_function" href="namespaceftxui.html#a75baaa2734ed76a9f478beaafa87ae57">text</a>(s.label);</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">if</span> (s.active) {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> t |= <a class="code hl_function" href="namespaceftxui.html#a353c769068e25303eb41fa2da565c604">bold</a>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> }</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">if</span> (s.focused) {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> t |= <a class="code hl_function" href="namespaceftxui.html#a672456b8f2091b615a30ff755418b37b">inverted</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> }</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceftxui.html#a552ba6d33b3c9bec586b99fba4c243ac">hbox</a>({prefix, t});</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> };</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> checkbox_ = <a class="code hl_function" href="namespaceftxui.html#a04e40e348dee25bbbfce0a13bf234e19">Checkbox</a>(&amp;title_, &amp;show_, option),</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> radiobox_ = <a class="code hl_function" href="namespaceftxui.html#a0d757f667caaff5287cb8702f52186ee">Radiobox</a>(entries_, selected_);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> Add(Container::Vertical({</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> checkbox_,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <a class="code hl_function" href="namespaceftxui.html#a20b66a70c1cd4ff3f0ff571a4507d2b4">Maybe</a>(radiobox_, &amp;show_),</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }));</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <a class="code hl_typedef" href="namespaceftxui.html#a2bc31f2d685189e5c61d2293a1f51b4f">Element</a> <a class="code hl_function" href="namespaceftxui.html#ad4b8aa9392f56ba41e2b421e046a7d83">Render</a>()<span class="keyword"> override </span>{</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> *selected_ = std::min((<span class="keywordtype">int</span>)entries_.size() - 1, std::max(0, *selected_));</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> title_ = entries_[*selected_];</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span> (show_) {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">const</span> <span class="keywordtype">int</span> max_height = 12;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceftxui.html#afd28058f0ccbbdf34691a85a7cc9b2e3">vbox</a>({</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> checkbox_-&gt;Render(),</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_function" href="namespaceftxui.html#ac1ef1cf6bf7cd0759ffa195071edb2a0">separator</a>(),</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> radiobox_-&gt;Render() | <a class="code hl_function" href="namespaceftxui.html#a1974176e676afdb96d203e8e0f579219">vscroll_indicator</a> | <a class="code hl_function" href="namespaceftxui.html#ad0d6a96f6e1fb6d67d9fa6323062a737">frame</a> |</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_function" href="namespaceftxui.html#adbda408cdd76f3bbd9c4e863672b7122">size</a>(<a class="code hl_enumvalue" href="namespaceftxui.html#a224b9163917ac32fc95a60d8c1eec3aaa38b9241136017b93ea2755a49cf0a000">HEIGHT</a>, <a class="code hl_enumvalue" href="namespaceftxui.html#ae09f44b989d381a387329fd0a0935926a41b05932cd237b2b133fff1ade85bed5">LESS_THAN</a>, max_height),</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }) |</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_function" href="namespaceftxui.html#ae8537acd423d47cf07e61bd774fb1098">border</a>;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceftxui.html#afd28058f0ccbbdf34691a85a7cc9b2e3">vbox</a>({</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> checkbox_-&gt;Render() | <a class="code hl_function" href="namespaceftxui.html#ae8537acd423d47cf07e61bd774fb1098">border</a>,</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_function" href="namespaceftxui.html#ac2a9ed2d22ec3c8811b61f4a901ed367">filler</a>(),</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> });</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <a class="code hl_class" href="classftxui_1_1ConstStringListRef.html">ConstStringListRef</a> entries_;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">bool</span> show_ = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">int</span>* selected_;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> std::string title_;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <a class="code hl_typedef" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a> checkbox_;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_typedef" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a> radiobox_;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> };</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceftxui.html#a2b8973dc71334f1d98e2e6f55de8b5ae">Make&lt;Impl&gt;</a>(entries, selected);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>} <span class="comment">// namespace ftxui</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment">// Copyright 2021 Arthur Sonzogni. All rights reserved.</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</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="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment">// the LICENSE file.</span></div>
<div class="ttc" id="aclassftxui_1_1ComponentBase_html"><div class="ttname"><a href="classftxui_1_1ComponentBase.html">ftxui::ComponentBase</a></div><div class="ttdoc">It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...</div><div class="ttdef"><b>Definition</b> <a href="component__base_8hpp_source.html#l00027">component_base.hpp:27</a></div></div>
<div class="ttc" id="aclassftxui_1_1ConstStringListRef_html"><div class="ttname"><a href="classftxui_1_1ConstStringListRef.html">ftxui::ConstStringListRef</a></div><div class="ttdoc">An adapter. Reference a list of strings.</div><div class="ttdef"><b>Definition</b> <a href="ref_8hpp_source.html#l00083">ref.hpp:83</a></div></div>
<div class="ttc" id="acomponent_8hpp_html"><div class="ttname"><a href="component_8hpp.html">component.hpp</a></div></div>
<div class="ttc" id="acomponent__base_8hpp_html"><div class="ttname"><a href="component__base_8hpp.html">component_base.hpp</a></div></div>
<div class="ttc" id="acomponent__options_8hpp_html"><div class="ttname"><a href="component__options_8hpp.html">component_options.hpp</a></div></div>
<div class="ttc" id="aelements_8hpp_html"><div class="ttname"><a href="elements_8hpp.html">elements.hpp</a></div></div>
<div class="ttc" id="anamespaceftxui_html"><div class="ttname"><a href="namespaceftxui.html">ftxui</a></div><div class="ttdef"><b>Definition</b> <a href="animation_8hpp_source.html#l00009">animation.hpp:9</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a04e40e348dee25bbbfce0a13bf234e19"><div class="ttname"><a href="namespaceftxui.html#a04e40e348dee25bbbfce0a13bf234e19">ftxui::Checkbox</a></div><div class="ttdeci">Component Checkbox(ConstStringRef label, bool *checked, Ref&lt; CheckboxOption &gt; option=CheckboxOption::Simple())</div><div class="ttdoc">Draw checkable element.</div><div class="ttdef"><b>Definition</b> <a href="checkbox_8cpp_source.html#l00112">checkbox.cpp:112</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a0d757f667caaff5287cb8702f52186ee"><div class="ttname"><a href="namespaceftxui.html#a0d757f667caaff5287cb8702f52186ee">ftxui::Radiobox</a></div><div class="ttdeci">Component Radiobox(ConstStringListRef entries, int *selected_, Ref&lt; RadioboxOption &gt; option={})</div><div class="ttdoc">A list of element, where only one can be selected.</div><div class="ttdef"><b>Definition</b> <a href="radiobox_8cpp_source.html#l00211">radiobox.cpp:211</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a1974176e676afdb96d203e8e0f579219"><div class="ttname"><a href="namespaceftxui.html#a1974176e676afdb96d203e8e0f579219">ftxui::vscroll_indicator</a></div><div class="ttdeci">Element vscroll_indicator(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="scroll__indicator_8cpp_source.html#l00019">scroll_indicator.cpp:19</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a20b66a70c1cd4ff3f0ff571a4507d2b4"><div class="ttname"><a href="namespaceftxui.html#a20b66a70c1cd4ff3f0ff571a4507d2b4">ftxui::Maybe</a></div><div class="ttdeci">Component Maybe(Component, const bool *show)</div><div class="ttdoc">Decorate a component |child|. It is shown only when |show| is true. @params child the compoennt to de...</div><div class="ttdef"><b>Definition</b> <a href="maybe_8cpp_source.html#l00067">maybe.cpp:67</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a224b9163917ac32fc95a60d8c1eec3aaa38b9241136017b93ea2755a49cf0a000"><div class="ttname"><a href="namespaceftxui.html#a224b9163917ac32fc95a60d8c1eec3aaa38b9241136017b93ea2755a49cf0a000">ftxui::HEIGHT</a></div><div class="ttdeci">@ HEIGHT</div><div class="ttdef"><b>Definition</b> <a href="elements_8hpp_source.html#l00127">elements.hpp:127</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a2b8973dc71334f1d98e2e6f55de8b5ae"><div class="ttname"><a href="namespaceftxui.html#a2b8973dc71334f1d98e2e6f55de8b5ae">ftxui::Make</a></div><div class="ttdeci">std::shared_ptr&lt; T &gt; Make(Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition</b> <a href="component_8hpp_source.html#l00025">component.hpp:25</a></div></div>
<div class="ttc" id="anamespaceftxui_html_a2bc31f2d685189e5c61d2293a1f51b4f"><div class="ttname"><a href="namespaceftxui.html#a2bc31f2d685189e5c61d2293a1f51b4f">ftxui::Element</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; Element</div><div class="ttdef"><b>Definition</b> <a href="elements_8hpp_source.html#l00018">elements.hpp:18</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_a552ba6d33b3c9bec586b99fba4c243ac"><div class="ttname"><a href="namespaceftxui.html#a552ba6d33b3c9bec586b99fba4c243ac">ftxui::hbox</a></div><div class="ttdeci">Element hbox(Elements)</div><div class="ttdoc">A container displaying elements horizontally one by one.</div><div class="ttdef"><b>Definition</b> <a href="hbox_8cpp_source.html#l00077">hbox.cpp:77</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_a75baaa2734ed76a9f478beaafa87ae57"><div class="ttname"><a href="namespaceftxui.html#a75baaa2734ed76a9f478beaafa87ae57">ftxui::text</a></div><div class="ttdeci">Element text(std::wstring text)</div><div class="ttdoc">Display a piece of unicode text.</div><div class="ttdef"><b>Definition</b> <a href="text_8cpp_source.html#l00111">text.cpp:111</a></div></div>
<div class="ttc" id="anamespaceftxui_html_aa22bddff4aeed66e20f30d0715596999"><div class="ttname"><a href="namespaceftxui.html#aa22bddff4aeed66e20f30d0715596999">ftxui::Dropdown</a></div><div class="ttdeci">Component Dropdown(ConstStringListRef entries, int *selected)</div><div class="ttdef"><b>Definition</b> <a href="#l00014">dropdown.cpp:14</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ac1ef1cf6bf7cd0759ffa195071edb2a0"><div class="ttname"><a href="namespaceftxui.html#ac1ef1cf6bf7cd0759ffa195071edb2a0">ftxui::separator</a></div><div class="ttdeci">Element separator()</div><div class="ttdoc">Draw a vertical or horizontal separation in between two other elements.</div><div class="ttdef"><b>Definition</b> <a href="separator_8cpp_source.html#l00128">separator.cpp:128</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ac2a9ed2d22ec3c8811b61f4a901ed367"><div class="ttname"><a href="namespaceftxui.html#ac2a9ed2d22ec3c8811b61f4a901ed367">ftxui::filler</a></div><div class="ttdeci">Element filler()</div><div class="ttdoc">An element that will take expand proportionnally to the space left in a container.</div><div class="ttdef"><b>Definition</b> <a href="flex_8cpp_source.html#l00095">flex.cpp:95</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ad0d6a96f6e1fb6d67d9fa6323062a737"><div class="ttname"><a href="namespaceftxui.html#ad0d6a96f6e1fb6d67d9fa6323062a737">ftxui::frame</a></div><div class="ttdeci">Element frame(Element)</div><div class="ttdoc">Allow an element to be displayed inside a 'virtual' area. It size can be larger than its container....</div><div class="ttdef"><b>Definition</b> <a href="frame_8cpp_source.html#l00142">frame.cpp:142</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ad4b8aa9392f56ba41e2b421e046a7d83"><div class="ttname"><a href="namespaceftxui.html#ad4b8aa9392f56ba41e2b421e046a7d83">ftxui::Render</a></div><div class="ttdeci">void Render(Screen &amp;screen, const Element &amp;element)</div><div class="ttdoc">Display an element on a ftxui::Screen.</div><div class="ttdef"><b>Definition</b> <a href="node_8cpp_source.html#l00044">node.cpp:44</a></div></div>
<div class="ttc" id="anamespaceftxui_html_adbda408cdd76f3bbd9c4e863672b7122"><div class="ttname"><a href="namespaceftxui.html#adbda408cdd76f3bbd9c4e863672b7122">ftxui::size</a></div><div class="ttdeci">Decorator size(Direction, Constraint, int value)</div><div class="ttdoc">Apply a constraint on the size of an element.</div><div class="ttdef"><b>Definition</b> <a href="size_8cpp_source.html#l00085">size.cpp:85</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ae09f44b989d381a387329fd0a0935926a41b05932cd237b2b133fff1ade85bed5"><div class="ttname"><a href="namespaceftxui.html#ae09f44b989d381a387329fd0a0935926a41b05932cd237b2b133fff1ade85bed5">ftxui::LESS_THAN</a></div><div class="ttdeci">@ LESS_THAN</div><div class="ttdef"><b>Definition</b> <a href="elements_8hpp_source.html#l00128">elements.hpp:128</a></div></div>
<div class="ttc" id="anamespaceftxui_html_ae8537acd423d47cf07e61bd774fb1098"><div class="ttname"><a href="namespaceftxui.html#ae8537acd423d47cf07e61bd774fb1098">ftxui::border</a></div><div class="ttdeci">Element border(Element)</div><div class="ttdoc">Draw a border around the element.</div><div class="ttdef"><b>Definition</b> <a href="border_8cpp_source.html#l00200">border.cpp:200</a></div></div>
<div class="ttc" id="anamespaceftxui_html_af1479ede01dbf087342534ab4ada11d3"><div class="ttname"><a href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">ftxui::Component</a></div><div class="ttdeci">std::shared_ptr&lt; ComponentBase &gt; Component</div><div class="ttdef"><b>Definition</b> <a href="component__base_8hpp_source.html#l00021">component_base.hpp:21</a></div></div>
<div class="ttc" id="anamespaceftxui_html_afd28058f0ccbbdf34691a85a7cc9b2e3"><div class="ttname"><a href="namespaceftxui.html#afd28058f0ccbbdf34691a85a7cc9b2e3">ftxui::vbox</a></div><div class="ttdeci">Element vbox(Elements)</div><div class="ttdoc">A container displaying elements vertically one by one.</div><div class="ttdef"><b>Definition</b> <a href="vbox_8cpp_source.html#l00078">vbox.cpp:78</a></div></div>
<div class="ttc" id="anamespaceftxui_html_structftxui_1_1EntryState"><div class="ttname"><a href="namespaceftxui.html#structftxui_1_1EntryState">ftxui::EntryState</a></div><div class="ttdoc">arguments for |ButtonOption::transform|, |CheckboxOption::transform|, |Radiobox::transform|,...</div><div class="ttdef"><b>Definition</b> <a href="component__options_8hpp_source.html#l00019">component_options.hpp:19</a></div></div>
<div class="ttc" id="aref_8hpp_html"><div class="ttname"><a href="ref_8hpp.html">ref.hpp</a></div></div>
<div class="ttc" id="astructftxui_1_1CheckboxOption_html"><div class="ttname"><a href="structftxui_1_1CheckboxOption.html">ftxui::CheckboxOption</a></div><div class="ttdoc">Option for the Checkbox component.</div><div class="ttdef"><b>Definition</b> <a href="component__options_8hpp_source.html#l00124">component_options.hpp:124</a></div></div>
<div class="ttc" id="astructftxui_1_1CheckboxOption_html_afe14c161494dad905597e75661c7b6a0"><div class="ttname"><a href="structftxui_1_1CheckboxOption.html#afe14c161494dad905597e75661c7b6a0">ftxui::CheckboxOption::transform</a></div><div class="ttdeci">std::function&lt; Element(const EntryState &amp;)&gt; transform</div><div class="ttdef"><b>Definition</b> <a href="component__options_8hpp_source.html#l00129">component_options.hpp:129</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('projectnumber');
if (!projectNumber) {
console.warn('Doxygen element with ID "projectnumber" not found. Cannot add version switcher.');
return;
}
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": "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": "../v0.11/index.html", "v0.10": "../v0.10/index.html"};
const currentVersion = "v4.0.0";
// Sort versions: 'main' first, then others numerically descending.
versions.sort((a, b) => {
if (a === 'main') return -1;
if (b === 'main') return 1;
return b.localeCompare(a, undefined, { numeric: true, sensitivity: 'base' });
});
const select = document.createElement('select');
select.onchange = function() {
const selectedVersion = this.value;
// Navigate directly to the pre-calculated relative path.
if (selectedVersion !== currentVersion) {
window.location.href = version_paths[selectedVersion];
}
};
versions.forEach(v => {
const option = document.createElement('option');
option.value = v;
option.textContent = v;
if (v === currentVersion) {
option.selected = true;
}
select.appendChild(option);
});
// Replace the Doxygen project number element with our dropdown.
projectNumber.replaceWith(select);
// 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',
marginLeft: '10px',
cursor: 'pointer'
});
});
</script>
</body>
</html>