mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
333 lines
21 KiB
HTML
333 lines
21 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/captured_mouse.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
|
||
|
|
 <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&dn=expat.txt MIT */
|
||
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||
|
|
/* @license-end */
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&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&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&dn=expat.txt MIT */
|
||
|
|
$(function(){initNavTree('captured__mouse_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> |
|
||
|
|
<a href="#namespaces">Namespaces</a> |
|
||
|
|
<a href="#typedef-members">Typedefs</a> </div>
|
||
|
|
<div class="headertitle"><div class="title">captured_mouse.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="captured__mouse_8hpp__dep__incl.png" border="0" usemap="#ainclude_2ftxui_2component_2captured__mouse_8hppdep" alt=""/></div>
|
||
|
|
<map name="ainclude_2ftxui_2component_2captured__mouse_8hppdep" id="ainclude_2ftxui_2component_2captured__mouse_8hppdep">
|
||
|
|
<area shape="rect" title=" " alt="" coords="940,5,1119,45"/>
|
||
|
|
<area shape="rect" href="component__base_8hpp.html" title=" " alt="" coords="1369,93,1548,133"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1133,44,1370,92,1369,97,1132,50"/>
|
||
|
|
<area shape="rect" href="input_8cpp.html" title=" " alt="" coords="1915,357,2066,397"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1133,26,1439,32,1845,45,2247,64,2414,76,2540,91,2636,109,2709,128,2875,179,2926,189,2972,192,3054,193,3091,198,3127,209,3162,232,3196,268,3205,290,3202,301,3195,311,3178,319,3145,326,3037,339,2712,358,2346,371,2066,377,2066,372,2346,365,2712,353,3037,333,3144,321,3176,314,3192,307,3198,299,3199,290,3191,271,3158,236,3125,214,3090,203,3054,198,2972,197,2925,194,2874,184,2708,134,2635,114,2540,96,2413,82,2246,69,1845,50,1438,38,1133,31"/>
|
||
|
|
<area shape="rect" href="button_8cpp.html" title=" " alt="" coords="203,269,354,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="927,38,790,58,715,74,642,96,542,137,447,186,366,234,308,271,305,267,363,229,445,181,540,132,640,91,714,69,789,53,926,33"/>
|
||
|
|
<area shape="rect" href="checkbox_8cpp.html" title=" " alt="" coords="3030,269,3181,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1133,26,1418,32,1791,45,2159,64,2311,76,2427,91,2611,129,2790,178,2945,228,3056,267,3054,272,2943,233,2789,184,2610,134,2426,96,2311,82,2158,69,1791,50,1417,38,1132,31"/>
|
||
|
|
<area shape="rect" href="component_8cpp.html" title=" " alt="" coords="430,269,581,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="926,42,844,59,753,86,707,105,663,127,620,153,582,183,544,228,517,270,513,268,539,225,578,179,617,149,660,122,705,100,751,81,843,53,925,36"/>
|
||
|
|
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="605,269,755,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="998,56,903,133,784,224,712,271,709,267,781,219,900,129,995,52"/>
|
||
|
|
<area shape="rect" href="radiobox_8cpp.html" title=" " alt="" coords="779,269,930,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1011,58,870,271,865,268,1007,55"/>
|
||
|
|
<area shape="rect" href="renderer_8cpp.html" title=" " alt="" coords="2506,269,2657,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1132,29,1469,48,1908,80,2122,100,2308,124,2450,150,2499,164,2531,179,2551,199,2565,223,2580,268,2575,270,2560,225,2547,202,2528,184,2497,169,2449,155,2307,129,2121,106,1908,85,1469,53,1132,34"/>
|
||
|
|
<area shape="rect" href="resizable__split_8cpp.html" title=" " alt="" coords="2681,269,2831,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1133,23,1332,26,1599,35,1901,55,2055,71,2206,91,2308,106,2388,122,2466,143,2564,179,2656,223,2729,267,2726,272,2653,228,2562,184,2465,148,2387,127,2308,112,2205,96,2054,76,1901,61,1598,40,1331,31,1132,29"/>
|
||
|
|
<area shape="rect" href="slider_8cpp.html" title=" " alt="" coords="954,269,1105,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1032,59,1032,269,1027,269,1027,59"/>
|
||
|
|
<area shape="rect" href="toggle_8cpp.html" title=" " alt="" coords="2855,269,3006,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1133,26,1400,33,1746,45,2085,64,2226,77,2332,91,2416,108,2479,128,2622,179,2879,267,2877,272,2620,184,2478,133,2414,114,2332,96,2225,82,2085,70,1746,51,1400,38,1132,31"/>
|
||
|
|
<area shape="rect" href="screen__interactive_8cpp.html" title=" " alt="" coords="5,269,179,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="926,35,745,55,642,72,541,96,419,137,301,186,200,234,127,272,125,267,198,229,299,181,417,132,539,91,641,67,744,49,926,30"/>
|
||
|
|
<area shape="rect" href="screen__interactive_8hpp.html" title=" " alt="" coords="592,181,771,221"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="927,48,862,67,799,96,769,116,741,139,699,183,695,179,738,135,766,111,796,91,860,62,926,43"/>
|
||
|
|
<area shape="rect" href="component_8hpp.html" title=" " alt="" coords="1577,181,1756,221"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1518,136,1622,179,1620,184,1516,141"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,112,1781,118,1912,127,2047,140,2176,160,2291,187,2341,203,2384,222,2419,243,2445,268,2454,289,2445,311,2419,330,2381,345,2334,357,2280,366,2167,376,2066,379,2066,374,2167,370,2280,360,2332,352,2379,340,2416,326,2441,308,2449,289,2440,271,2415,248,2381,227,2339,208,2290,192,2175,165,2046,145,1912,132,1780,123,1562,117"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1356,116,1203,119,1009,129,795,149,686,164,581,184,508,203,437,226,322,272,320,267,435,221,506,198,579,179,685,159,794,144,1009,123,1203,114,1355,111"/>
|
||
|
|
<area shape="rect" href="catch__event_8cpp.html" title=" " alt="" coords="2105,269,2255,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,133,1769,179,2112,267,2111,272,1767,184,1561,138"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,115,2141,137,2459,156,2591,167,2691,179,2791,197,2889,221,3048,267,3047,272,2887,226,2789,203,2690,184,2590,172,2459,161,2141,143,1562,120"/>
|
||
|
|
<area shape="rect" href="collapsible_8cpp.html" title=" " alt="" coords="2279,269,2430,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,127,1867,179,2093,225,2280,268,2279,273,2092,231,1866,184,1561,133"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1356,123,1145,143,1022,161,901,184,842,203,783,224,582,274,581,269,782,219,840,198,899,179,1021,155,1144,138,1355,118"/>
|
||
|
|
<area shape="rect" href="container_8cpp.html" title=" " alt="" coords="1129,269,1279,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1421,143,1233,271,1230,267,1418,139"/>
|
||
|
|
<area shape="rect" href="dropdown_8cpp.html" title=" " alt="" coords="1303,269,1454,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1447,147,1390,270,1385,268,1442,145"/>
|
||
|
|
<area shape="rect" href="maybe_8cpp.html" title=" " alt="" coords="1478,269,1629,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1478,144,1545,268,1541,270,1473,147"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1356,132,1217,154,1063,184,887,229,741,272,739,267,885,224,1062,179,1216,149,1355,126"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1370,139,1202,184,913,272,912,267,1201,179,1369,134"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,114,1798,121,2085,134,2342,153,2434,165,2488,179,2516,198,2540,221,2573,268,2569,271,2536,225,2513,202,2486,184,2433,170,2342,158,2085,139,1797,127,1561,120"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,113,1785,119,2064,130,2334,149,2446,163,2530,179,2587,197,2641,221,2727,267,2725,272,2639,225,2585,202,2529,184,2445,168,2334,155,2064,136,1785,124,1561,119"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1401,141,1077,272,1075,267,1399,136"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1562,115,2097,135,2388,154,2508,166,2599,179,2679,197,2758,221,2886,267,2884,272,2757,226,2678,202,2598,184,2507,171,2387,159,2097,141,1562,120"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1356,116,1181,118,953,127,698,148,568,164,442,184,358,203,276,226,142,272,140,267,274,221,357,197,441,179,567,158,697,143,953,122,1181,113,1356,111"/>
|
||
|
|
<area shape="rect" href="component_2deprecated_8hpp.html" title=" " alt="" coords="1901,269,2080,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1744,222,1913,267,1911,272,1743,228"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1668,235,1675,273,1682,292,1694,307,1709,318,1730,328,1787,344,1915,366,1915,371,1785,349,1728,333,1706,323,1690,311,1678,294,1669,275,1663,236"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1564,208,1069,227,745,246,418,272,354,279,354,274,417,267,745,241,1069,222,1563,203"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1770,215,2092,267,2105,269,2104,274,2092,272,1769,220"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1770,199,1995,201,2306,210,2660,230,2842,246,3019,267,3030,268,3029,274,3018,272,2841,252,2660,236,2305,215,1995,207,1770,205"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1770,208,1999,231,2268,267,2280,269,2279,274,2268,272,1998,236,1769,214"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1564,207,1381,211,1139,222,867,242,592,272,581,274,580,268,592,267,866,236,1139,217,1381,206,1564,201"/>
|
||
|
|
<area shape="rect" href="component__fuzzer_8cpp.html" title=" " alt="" coords="1705,269,1877,309"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1707,227,1765,267,1762,271,1704,231"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1564,222,1291,272,1280,274,1279,269,1290,267,1563,217"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1591,228,1442,272,1441,267,1589,223"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1632,232,1580,271,1577,267,1629,228"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1563,208,1210,227,989,245,767,272,756,274,755,268,766,267,988,240,1209,222,1563,203"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1563,211,1282,232,1112,249,942,272,931,274,930,269,941,267,1111,244,1282,227,1563,206"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1770,207,2072,231,2443,267,2506,275,2506,280,2442,272,2072,236,1770,213"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1770,202,1942,207,2166,219,2417,238,2670,267,2681,268,2680,274,2669,272,2417,243,2166,224,1942,213,1770,207"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1564,215,1357,238,1116,272,1105,274,1104,269,1116,267,1356,233,1563,210"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1770,200,1969,204,2236,214,2539,234,2693,249,2844,267,2856,268,2855,274,2844,272,2693,254,2538,239,2236,220,1969,210,1770,206"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1913,268,1745,224,1746,219,1915,263"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="1993,323,1993,357,1988,357,1988,323"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="579,218,482,239,443,254,419,271,411,290,413,299,419,307,440,317,485,325,630,340,833,351,1071,360,1559,370,1915,373,1915,378,1559,375,1071,365,833,357,630,345,484,330,439,322,416,311,408,301,406,290,415,268,441,249,480,234,578,213"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="580,227,355,275,354,269,579,222"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="632,230,545,272,543,267,629,225"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="683,235,683,269,678,269,678,235"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="733,225,818,267,816,272,730,230"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="772,222,954,267,953,272,770,227"/>
|
||
|
|
<area shape="poly" title=" " alt="" coords="578,218,397,241,191,272,180,274,179,269,190,267,397,236,578,212"/>
|
||
|
|
</map>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<p><a href="captured__mouse_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:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classftxui_1_1CapturedMouseInterface.html">CapturedMouseInterface</a></td></tr>
|
||
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </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  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html">ftxui</a></td></tr>
|
||
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
|
</table><table class="memberdecls">
|
||
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||
|
|
Typedefs</h2></td></tr>
|
||
|
|
<tr class="memitem:a24b663cb6b0b262055c94d3a03bdd274" id="r_a24b663cb6b0b262055c94d3a03bdd274"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a24b663cb6b0b262055c94d3a03bdd274">CapturedMouse</a> = std::unique_ptr<<a class="el" href="classftxui_1_1CapturedMouseInterface.html">CapturedMouseInterface</a>></td></tr>
|
||
|
|
<tr class="separator:a24b663cb6b0b262055c94d3a03bdd274"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
|
</table>
|
||
|
|
</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>
|