Files
FTXUI/en/v2.0.0/component__options_8hpp.html
2025-12-13 19:38:34 +00:00

414 lines
23 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: include/ftxui/component/component_options.hpp 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>
<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">2.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('component__options_8hpp.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="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">component_options.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><div id="dynsection-0" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> This graph shows which files directly or indirectly include this file:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="component__options_8hpp__dep__incl.png" border="0" usemap="#ainclude_2ftxui_2component_2component__options_8hppdep" alt=""/></div>
<map name="ainclude_2ftxui_2component_2component__options_8hppdep" id="ainclude_2ftxui_2component_2component__options_8hppdep">
<area shape="rect" title=" " alt="" coords="1503,5,1685,45"/>
<area shape="rect" href="component_8hpp.html" title=" " alt="" coords="1505,93,1683,133"/>
<area shape="poly" title=" " alt="" coords="1597,59,1597,93,1591,93,1591,59"/>
<area shape="rect" href="input_8cpp.html" title=" " alt="" coords="1576,269,1727,309"/>
<area shape="poly" title=" " alt="" coords="1489,28,1284,30,1010,39,699,60,540,76,385,96,244,110,103,124,50,137,30,146,17,156,9,168,9,182,17,199,33,219,55,229,101,238,252,253,461,264,706,273,1210,282,1576,285,1576,290,1210,287,706,278,461,269,251,258,100,243,53,234,30,223,12,202,4,183,4,166,13,152,27,141,48,132,102,119,243,104,384,91,539,70,698,54,1009,34,1284,25,1489,23"/>
<area shape="rect" href="button_8cpp.html" title=" " alt="" coords="44,181,195,221"/>
<area shape="poly" title=" " alt="" coords="1489,31,1319,37,1098,48,851,67,602,96,488,115,375,139,189,184,188,179,374,134,487,110,602,91,850,62,1097,43,1319,31,1489,26"/>
<area shape="rect" href="checkbox_8cpp.html" title=" " alt="" coords="219,181,369,221"/>
<area shape="poly" title=" " alt="" coords="1489,35,1195,57,1015,74,836,96,707,116,608,135,381,184,370,186,369,181,380,179,607,130,706,111,835,91,1015,69,1194,51,1489,30"/>
<area shape="rect" href="collapsible_8cpp.html" title=" " alt="" coords="393,181,544,221"/>
<area shape="poly" title=" " alt="" coords="1489,43,1079,99,818,139,556,184,545,186,544,181,555,179,818,134,1078,94,1488,37"/>
<area shape="rect" href="dropdown_8cpp.html" title=" " alt="" coords="2241,181,2392,221"/>
<area shape="poly" title=" " alt="" coords="1686,46,2242,179,2241,184,1685,51"/>
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="2416,181,2567,221"/>
<area shape="poly" title=" " alt="" coords="1699,42,1975,91,2189,133,2404,179,2417,181,2415,187,2403,184,2188,139,1974,96,1698,47"/>
<area shape="rect" href="radiobox_8cpp.html" title=" " alt="" coords="2591,181,2741,221"/>
<area shape="poly" title=" " alt="" coords="1699,37,1884,60,2094,91,2337,132,2579,179,2591,181,2590,186,2577,184,2336,137,2094,96,1883,66,1698,42"/>
<area shape="rect" href="toggle_8cpp.html" title=" " alt="" coords="2765,181,2916,221"/>
<area shape="poly" title=" " alt="" coords="1700,33,1942,57,2230,91,2493,130,2755,179,2766,181,2765,186,2754,184,2492,135,2230,96,1942,62,1699,38"/>
<area shape="rect" href="component_2deprecated_8hpp.html" title=" " alt="" coords="1689,181,1867,221"/>
<area shape="poly" title=" " alt="" coords="1640,137,1731,179,1729,184,1638,142"/>
<area shape="poly" title=" " alt="" coords="1612,145,1627,180,1650,269,1645,270,1622,182,1607,147"/>
<area shape="poly" title=" " alt="" coords="1491,117,1260,118,941,127,576,147,389,163,206,184,195,186,194,180,206,179,389,158,576,142,941,121,1260,113,1491,111"/>
<area shape="rect" href="catch__event_8cpp.html" title=" " alt="" coords="1892,181,2043,221"/>
<area shape="poly" title=" " alt="" coords="1690,134,1893,180,1891,185,1688,139"/>
<area shape="poly" title=" " alt="" coords="1491,118,1287,121,1011,131,697,151,537,165,381,184,370,186,369,180,380,179,537,160,697,145,1010,125,1286,116,1491,112"/>
<area shape="poly" title=" " alt="" coords="1491,119,1314,124,1081,135,819,154,556,184,545,186,544,180,555,179,819,149,1081,130,1314,119,1491,114"/>
<area shape="rect" href="component_8cpp.html" title=" " alt="" coords="2067,181,2217,221"/>
<area shape="poly" title=" " alt="" coords="1698,125,1865,148,2054,179,2067,181,2066,186,2054,184,1864,154,1697,130"/>
<area shape="rect" href="component__fuzzer_8cpp.html" title=" " alt="" coords="568,181,740,221"/>
<area shape="poly" title=" " alt="" coords="1491,122,1161,142,957,160,752,184,741,186,740,180,751,179,956,155,1161,137,1491,116"/>
<area shape="rect" href="container_8cpp.html" title=" " alt="" coords="764,181,915,221"/>
<area shape="poly" title=" " alt="" coords="1491,124,1234,146,1080,163,926,184,915,186,914,181,926,179,1079,157,1233,140,1491,119"/>
<area shape="poly" title=" " alt="" coords="1697,120,1941,142,2085,158,2229,179,2241,181,2240,186,2228,184,2084,164,1940,147,1697,125"/>
<area shape="rect" href="maybe_8cpp.html" title=" " alt="" coords="939,181,1089,221"/>
<area shape="poly" title=" " alt="" coords="1491,129,1309,152,1101,184,1090,186,1089,181,1100,179,1308,147,1490,124"/>
<area shape="poly" title=" " alt="" coords="1697,116,2014,136,2209,154,2404,179,2416,181,2415,186,2403,184,2208,160,2013,142,1697,122"/>
<area shape="poly" title=" " alt="" coords="1697,114,1866,120,2086,132,2331,151,2578,179,2591,181,2590,186,2578,184,2331,156,2085,137,1866,125,1697,120"/>
<area shape="rect" href="renderer_8cpp.html" title=" " alt="" coords="1113,181,1264,221"/>
<area shape="poly" title=" " alt="" coords="1491,139,1276,184,1265,186,1264,181,1275,179,1490,133"/>
<area shape="rect" href="resizable__split_8cpp.html" title=" " alt="" coords="1288,181,1439,221"/>
<area shape="poly" title=" " alt="" coords="1532,141,1415,184,1413,179,1530,136"/>
<area shape="rect" href="slider_8cpp.html" title=" " alt="" coords="1463,181,1613,221"/>
<area shape="poly" title=" " alt="" coords="1576,146,1553,183,1548,180,1572,144"/>
<area shape="poly" title=" " alt="" coords="1697,113,1894,117,2157,127,2454,147,2606,161,2754,179,2766,180,2765,186,2754,184,2605,166,2454,152,2156,132,1893,122,1697,118"/>
<area shape="poly" title=" " alt="" coords="1732,178,1641,136,1643,131,1734,173"/>
<area shape="poly" title=" " alt="" coords="1740,232,1681,271,1678,267,1737,227"/>
</map>
</div>
</div>
<p><a href="component__options_8hpp_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="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structftxui_1_1MenuOption" id="r_structftxui_1_1MenuOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1MenuOption">MenuOption</a></td></tr>
<tr class="memdesc:structftxui_1_1MenuOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Menu component. <a href="namespaceftxui.html#structftxui_1_1MenuOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1MenuOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1MenuEntryOption" id="r_structftxui_1_1MenuEntryOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1MenuEntryOption">MenuEntryOption</a></td></tr>
<tr class="memdesc:structftxui_1_1MenuEntryOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the MenuEntry component. <a href="namespaceftxui.html#structftxui_1_1MenuEntryOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1MenuEntryOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1ButtonOption" id="r_structftxui_1_1ButtonOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1ButtonOption">ButtonOption</a></td></tr>
<tr class="memdesc:structftxui_1_1ButtonOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Button component. <a href="namespaceftxui.html#structftxui_1_1ButtonOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1ButtonOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1CheckboxOption" id="r_structftxui_1_1CheckboxOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1CheckboxOption">CheckboxOption</a></td></tr>
<tr class="memdesc:structftxui_1_1CheckboxOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Checkbox component. <a href="namespaceftxui.html#structftxui_1_1CheckboxOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1CheckboxOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1InputOption" id="r_structftxui_1_1InputOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1InputOption">InputOption</a></td></tr>
<tr class="memdesc:structftxui_1_1InputOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Input component. <a href="namespaceftxui.html#structftxui_1_1InputOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1InputOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1RadioboxOption" id="r_structftxui_1_1RadioboxOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1RadioboxOption">RadioboxOption</a></td></tr>
<tr class="memdesc:structftxui_1_1RadioboxOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Radiobox component. <a href="namespaceftxui.html#structftxui_1_1RadioboxOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1RadioboxOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1ToggleOption" id="r_structftxui_1_1ToggleOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1ToggleOption">ToggleOption</a></td></tr>
<tr class="memdesc:structftxui_1_1ToggleOption"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Toggle component. <a href="namespaceftxui.html#structftxui_1_1ToggleOption">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1ToggleOption"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html">ftxui</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structftxui_1_1MenuOption" id="structftxui_1_1MenuOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1MenuOption">&#9670;&#160;</a></span>ftxui::MenuOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::MenuOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1MenuEntryOption" id="structftxui_1_1MenuEntryOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1MenuEntryOption">&#9670;&#160;</a></span>ftxui::MenuEntryOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::MenuEntryOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1ButtonOption" id="structftxui_1_1ButtonOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1ButtonOption">&#9670;&#160;</a></span>ftxui::ButtonOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::ButtonOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1CheckboxOption" id="structftxui_1_1CheckboxOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1CheckboxOption">&#9670;&#160;</a></span>ftxui::CheckboxOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::CheckboxOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1InputOption" id="structftxui_1_1InputOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1InputOption">&#9670;&#160;</a></span>ftxui::InputOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::InputOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1RadioboxOption" id="structftxui_1_1RadioboxOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1RadioboxOption">&#9670;&#160;</a></span>ftxui::RadioboxOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::RadioboxOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1ToggleOption" id="structftxui_1_1ToggleOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1ToggleOption">&#9670;&#160;</a></span>ftxui::ToggleOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::ToggleOption</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</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": "index.html", "v0.9": "../v0.9/index.html", "v0.11": "../v0.11/index.html", "v0.10": "../v0.10/index.html"};
const currentLang = "en";
const currentVersion = "v2.0.0";
// 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>