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

342 lines
22 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">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('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="1536,5,1719,45"/>
<area shape="rect" href="component_8hpp.html" title=" " alt="" coords="1475,93,1654,133"/>
<area shape="poly" title=" " alt="" coords="1607,58,1581,95,1576,92,1603,55"/>
<area shape="rect" href="button_8cpp.html" title=" " alt="" coords="5,181,156,221"/>
<area shape="poly" title=" " alt="" coords="1522,29,1334,33,1084,43,803,63,660,77,520,96,415,115,312,138,143,184,142,179,311,133,414,110,519,91,659,72,802,57,1084,37,1333,27,1522,24"/>
<area shape="rect" href="checkbox_8cpp.html" title=" " alt="" coords="180,181,331,221"/>
<area shape="poly" title=" " alt="" coords="1522,32,1173,51,955,69,737,96,623,115,511,139,326,184,324,179,510,134,622,110,736,91,955,64,1172,45,1522,27"/>
<area shape="rect" href="collapsible_8cpp.html" title=" " alt="" coords="355,181,505,221"/>
<area shape="poly" title=" " alt="" coords="1523,37,1270,60,969,96,841,117,742,136,517,184,506,186,505,181,516,179,741,131,840,111,968,91,1269,54,1522,32"/>
<area shape="rect" href="dropdown_8cpp.html" title=" " alt="" coords="529,181,680,221"/>
<area shape="poly" title=" " alt="" coords="1522,45,1154,103,692,184,681,186,680,181,691,179,1153,98,1521,40"/>
<area shape="rect" href="input_8cpp.html" title=" " alt="" coords="2472,181,2623,221"/>
<area shape="poly" title=" " alt="" coords="1647,55,1680,97,1701,116,1725,131,1755,143,1791,152,1878,165,1979,171,2086,173,2298,172,2388,173,2461,179,2472,180,2471,186,2460,184,2388,178,2298,177,2086,178,1979,177,1878,171,1790,158,1753,148,1722,136,1697,120,1676,100,1643,59"/>
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="2647,181,2797,221"/>
<area shape="poly" title=" " alt="" coords="1665,52,1775,131,1856,150,1958,162,2076,167,2201,169,2446,169,2551,172,2636,179,2647,180,2646,186,2635,184,2551,177,2446,175,2201,175,2076,173,1958,167,1855,155,1773,136,1662,56"/>
<area shape="rect" href="radiobox_8cpp.html" title=" " alt="" coords="2821,181,2972,221"/>
<area shape="poly" title=" " alt="" coords="1683,49,1766,91,1795,113,1808,123,1826,131,1868,142,1918,151,2036,163,2171,168,2314,170,2594,169,2714,171,2810,179,2822,180,2821,186,2810,184,2714,177,2594,174,2314,175,2171,174,2036,168,1917,157,1867,147,1824,136,1805,127,1792,118,1763,96,1680,53"/>
<area shape="rect" href="slider_8cpp.html" title=" " alt="" coords="2996,181,3147,221"/>
<area shape="poly" title=" " alt="" coords="1707,47,1760,67,1814,91,1830,102,1842,113,1853,123,1870,131,1918,144,1974,155,2108,168,2260,173,2422,173,2739,169,2876,171,2985,179,2996,180,2995,186,2984,184,2876,176,2739,175,2422,178,2260,178,2107,173,1974,160,1917,149,1868,136,1850,127,1838,117,1827,106,1811,96,1758,72,1705,52"/>
<area shape="rect" href="component__options_8cpp.html" title=" " alt="" coords="1881,93,2062,133"/>
<area shape="poly" title=" " alt="" coords="1717,46,1897,91,1895,96,1715,51"/>
<area shape="poly" title=" " alt="" coords="1462,116,1229,118,908,126,540,147,352,163,168,184,157,186,156,180,167,179,351,158,540,142,908,121,1229,113,1462,111"/>
<area shape="rect" href="catch__event_8cpp.html" title=" " alt="" coords="1752,181,1903,221"/>
<area shape="poly" title=" " alt="" coords="1636,135,1771,179,1769,184,1634,140"/>
<area shape="poly" title=" " alt="" coords="1462,117,1256,121,978,131,661,150,500,165,342,184,331,186,330,180,342,179,500,160,661,145,977,125,1256,115,1462,112"/>
<area shape="poly" title=" " alt="" coords="1462,119,1283,124,1048,135,783,154,517,184,506,186,505,180,516,179,783,149,1047,130,1283,119,1461,113"/>
<area shape="rect" href="component_8cpp.html" title=" " alt="" coords="1927,181,2077,221"/>
<area shape="poly" title=" " alt="" coords="1668,131,1916,179,1927,181,1926,186,1915,184,1667,136"/>
<area shape="rect" href="component__fuzzer_8cpp.html" title=" " alt="" coords="2101,181,2273,221"/>
<area shape="poly" title=" " alt="" coords="1668,130,1673,131,1790,145,1882,154,1973,163,2090,179,2101,180,2100,186,2090,184,1973,168,1881,159,1790,151,1672,136,1667,135"/>
<area shape="rect" href="container_8cpp.html" title=" " alt="" coords="2297,181,2448,221"/>
<area shape="poly" title=" " alt="" coords="1668,130,1673,131,1845,147,1980,153,2114,159,2286,179,2298,180,2297,186,2286,184,2114,165,1979,158,1845,152,1672,136,1667,135"/>
<area shape="poly" title=" " alt="" coords="1462,121,1119,140,906,158,692,184,681,186,680,180,691,179,905,153,1119,134,1461,115"/>
<area shape="rect" href="hoverable_8cpp.html" title=" " alt="" coords="704,181,855,221"/>
<area shape="poly" title=" " alt="" coords="1461,123,1191,145,1029,162,866,184,855,186,854,181,866,179,1028,157,1191,140,1461,118"/>
<area shape="poly" title=" " alt="" coords="1668,130,1673,131,1793,142,1894,149,2067,152,2240,157,2342,165,2461,179,2472,180,2471,186,2460,184,2341,170,2240,162,2067,157,1894,154,1792,148,1672,136,1667,135"/>
<area shape="rect" href="maybe_8cpp.html" title=" " alt="" coords="879,181,1029,221"/>
<area shape="poly" title=" " alt="" coords="1462,128,1266,151,1041,184,1030,186,1029,181,1040,179,1265,146,1461,123"/>
<area shape="poly" title=" " alt="" coords="1668,125,1724,131,1862,140,1980,145,2180,147,2380,153,2497,163,2636,179,2647,180,2646,186,2635,184,2497,168,2380,159,2180,153,1980,150,1862,146,1723,136,1667,130"/>
<area shape="rect" href="modal_8cpp.html" title=" " alt="" coords="1053,181,1204,221"/>
<area shape="poly" title=" " alt="" coords="1463,136,1216,184,1205,186,1204,181,1215,179,1462,131"/>
<area shape="poly" title=" " alt="" coords="1668,122,1774,131,1932,139,2066,143,2293,144,2520,150,2653,161,2810,179,2822,180,2821,186,2810,184,2653,166,2520,156,2293,149,2066,148,1932,145,1774,136,1668,127"/>
<area shape="rect" href="renderer_8cpp.html" title=" " alt="" coords="1228,181,1379,221"/>
<area shape="poly" title=" " alt="" coords="1495,140,1361,184,1360,179,1493,135"/>
<area shape="rect" href="resizable__split_8cpp.html" title=" " alt="" coords="1403,181,1553,221"/>
<area shape="poly" title=" " alt="" coords="1538,145,1499,183,1495,179,1534,141"/>
<area shape="poly" title=" " alt="" coords="1668,120,1825,131,2002,138,2151,141,2406,141,2529,143,2660,148,2809,159,2985,179,2996,180,2995,186,2984,184,2809,164,2660,153,2528,148,2406,146,2151,147,2001,144,1825,136,1668,125"/>
<area shape="rect" href="component_2util_8cpp.html" title=" " alt="" coords="1577,181,1728,221"/>
<area shape="poly" title=" " alt="" coords="1596,141,1635,179,1631,183,1592,145"/>
</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_1EntryState" id="r_structftxui_1_1EntryState"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1EntryState">EntryState</a></td></tr>
<tr class="memdesc:structftxui_1_1EntryState"><td class="mdescLeft">&#160;</td><td class="mdescRight">arguments for |ButtonOption::transform|, |CheckboxOption::transform|, |Radiobox::transform|, |MenuEntryOption::transform|, |MenuOption::transform|. <a href="namespaceftxui.html#structftxui_1_1EntryState">More...</a><br /></td></tr>
<tr class="separator:structftxui_1_1EntryState"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structftxui_1_1UnderlineOption.html">UnderlineOption</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structftxui_1_1AnimatedColorOption.html">AnimatedColorOption</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option about a potentially animated color. <a href="structftxui_1_1AnimatedColorOption.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1AnimatedColorsOption" id="r_structftxui_1_1AnimatedColorsOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1AnimatedColorsOption">AnimatedColorsOption</a></td></tr>
<tr class="separator:structftxui_1_1AnimatedColorsOption"><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:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structftxui_1_1MenuOption.html">MenuOption</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Menu component. <a href="structftxui_1_1MenuOption.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structftxui_1_1ButtonOption.html">ButtonOption</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the AnimatedButton component. <a href="structftxui_1_1ButtonOption.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structftxui_1_1CheckboxOption.html">CheckboxOption</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Checkbox component. <a href="structftxui_1_1CheckboxOption.html#details">More...</a><br /></td></tr>
<tr class="separator:"><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:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structftxui_1_1RadioboxOption.html">RadioboxOption</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Option for the Radiobox component. <a href="structftxui_1_1RadioboxOption.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structftxui_1_1SliderOption" id="r_structftxui_1_1SliderOption"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#structftxui_1_1SliderOption">SliderOption&lt; T &gt;</a></td></tr>
<tr class="separator:structftxui_1_1SliderOption"><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_1EntryState" id="structftxui_1_1EntryState"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1EntryState">&#9670;&#160;</a></span>ftxui::EntryState</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::EntryState</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a name="structftxui_1_1AnimatedColorsOption" id="structftxui_1_1AnimatedColorsOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1AnimatedColorsOption">&#9670;&#160;</a></span>ftxui::AnimatedColorsOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::AnimatedColorsOption</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_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_1SliderOption" id="structftxui_1_1SliderOption"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structftxui_1_1SliderOption">&#9670;&#160;</a></span>ftxui::SliderOption</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ftxui::SliderOption</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('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>