mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-11-15 11:38:56 +08:00
265 lines
18 KiB
HTML
265 lines
18 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/screen/string.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">0.9.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('string_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="#namespaces">Namespaces</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle"><div class="title">string.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="string_8hpp__dep__incl.png" border="0" usemap="#ainclude_2ftxui_2screen_2string_8hppdep" alt=""/></div>
|
|
<map name="ainclude_2ftxui_2screen_2string_8hppdep" id="ainclude_2ftxui_2screen_2string_8hppdep">
|
|
<area shape="rect" title=" " alt="" coords="2623,5,2773,45"/>
|
|
<area shape="rect" href="ref_8hpp.html" title=" " alt="" coords="1347,93,1473,133"/>
|
|
<area shape="poly" title=" " alt="" coords="2610,35,1474,110,1473,105,2610,30"/>
|
|
<area shape="rect" href="input_8cpp.html" title=" " alt="" coords="1792,445,1943,485"/>
|
|
<area shape="poly" title=" " alt="" coords="2611,44,2563,64,2541,78,2523,95,2505,120,2498,142,2497,200,2497,291,2494,326,2486,354,2469,377,2442,400,2403,418,2350,433,2285,445,2214,453,2067,463,1943,467,1943,461,2067,458,2213,448,2284,440,2348,428,2401,413,2439,395,2465,373,2481,351,2489,325,2491,291,2491,200,2493,142,2500,117,2519,92,2538,74,2561,59,2609,39"/>
|
|
<area shape="rect" href="event_8cpp.html" title=" " alt="" coords="2532,93,2683,133"/>
|
|
<area shape="poly" title=" " alt="" coords="2670,57,2629,95,2626,91,2666,53"/>
|
|
<area shape="rect" href="text_8cpp.html" title=" " alt="" coords="2707,101,2871,126"/>
|
|
<area shape="poly" title=" " alt="" coords="2730,53,2778,98,2774,102,2726,57"/>
|
|
<area shape="rect" href="screen_8cpp.html" title=" " alt="" coords="2895,101,3090,126"/>
|
|
<area shape="poly" title=" " alt="" coords="2776,47,2954,98,2953,103,2775,52"/>
|
|
<area shape="rect" href="string_8cpp.html" title=" " alt="" coords="3114,101,3303,126"/>
|
|
<area shape="poly" title=" " alt="" coords="2787,38,3102,91,3145,98,3144,103,3102,96,2786,44"/>
|
|
<area shape="rect" href="component_8hpp.html" title=" " alt="" coords="1130,269,1309,309"/>
|
|
<area shape="poly" title=" " alt="" coords="1381,145,1242,271,1238,267,1377,141"/>
|
|
<area shape="poly" title=" " alt="" coords="1487,118,1707,142,1846,162,1990,188,2130,219,2255,257,2308,279,2354,303,2392,328,2419,356,2428,377,2426,388,2418,399,2394,412,2350,423,2222,442,2073,455,1943,463,1943,458,2073,449,2222,436,2349,418,2392,407,2415,395,2421,386,2422,378,2414,359,2388,332,2351,307,2306,284,2253,263,2129,225,1989,193,1845,168,1707,148,1487,124"/>
|
|
<area shape="rect" href="button_8cpp.html" title=" " alt="" coords="2080,357,2231,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1485,135,1620,179,1896,276,2107,355,2105,360,1894,281,1618,184,1483,140"/>
|
|
<area shape="rect" href="checkbox_8cpp.html" title=" " alt="" coords="180,357,331,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1333,118,1152,122,921,133,698,152,607,166,539,184,497,201,457,222,382,271,320,320,276,359,273,355,316,316,379,267,454,217,495,196,537,179,606,161,697,147,921,127,1151,117,1333,113"/>
|
|
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="5,357,156,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1333,119,1135,124,879,135,629,154,527,168,449,184,398,201,346,222,249,271,167,320,108,359,105,355,164,316,246,266,344,217,396,196,448,179,526,162,629,149,878,130,1134,118,1333,113"/>
|
|
<area shape="rect" href="radiobox_8cpp.html" title=" " alt="" coords="1905,357,2056,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1465,137,1941,355,1939,360,1462,142"/>
|
|
<area shape="rect" href="slider_8cpp.html" title=" " alt="" coords="2255,357,2405,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1487,129,1692,179,2022,275,2274,355,2272,360,2021,280,1691,184,1486,134"/>
|
|
<area shape="rect" href="toggle_8cpp.html" title=" " alt="" coords="355,357,505,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1333,120,1077,139,918,157,760,184,674,196,604,204,573,211,542,224,509,243,475,271,459,291,447,314,435,358,430,356,442,312,454,288,471,267,506,239,539,219,571,206,603,199,673,191,759,179,918,152,1077,134,1333,115"/>
|
|
<area shape="rect" href="component__options_8hpp.html" title=" " alt="" coords="772,181,955,221"/>
|
|
<area shape="poly" title=" " alt="" coords="1333,129,955,188,954,183,1332,124"/>
|
|
<area shape="rect" href="component_2deprecated_8hpp.html" title=" " alt="" coords="581,357,759,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1117,306,760,360,759,360,758,355,759,355,1116,301"/>
|
|
<area shape="poly" title=" " alt="" coords="1322,298,1646,332,1842,355,1858,376,1867,400,1871,445,1866,446,1862,401,1853,378,1839,360,1645,337,1322,304"/>
|
|
<area shape="poly" title=" " alt="" coords="1323,292,1655,311,1861,330,2068,355,2080,357,2079,362,2067,360,1861,335,1655,317,1322,297"/>
|
|
<area shape="rect" href="catch__event_8cpp.html" title=" " alt="" coords="784,357,935,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1128,315,936,361,934,355,1127,310"/>
|
|
<area shape="poly" title=" " alt="" coords="1117,297,772,316,558,334,342,360,331,362,330,356,342,355,557,329,772,310,1116,291"/>
|
|
<area shape="rect" href="component_8cpp.html" title=" " alt="" coords="959,357,1109,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1167,318,1076,360,1073,355,1165,313"/>
|
|
<area shape="rect" href="component__fuzzer_8cpp.html" title=" " alt="" coords="1133,357,1305,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1222,323,1222,357,1217,357,1217,323"/>
|
|
<area shape="rect" href="container_8cpp.html" title=" " alt="" coords="1329,357,1480,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1274,313,1365,355,1363,360,1271,318"/>
|
|
<area shape="poly" title=" " alt="" coords="1116,295,937,300,701,311,435,330,168,360,157,362,156,356,167,355,435,325,700,306,937,295,1116,289"/>
|
|
<area shape="poly" title=" " alt="" coords="1323,298,1886,355,1905,358,1904,363,1886,360,1322,303"/>
|
|
<area shape="rect" href="renderer_8cpp.html" title=" " alt="" coords="1504,357,1655,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1312,310,1504,355,1503,361,1311,315"/>
|
|
<area shape="rect" href="resizable__split_8cpp.html" title=" " alt="" coords="1679,357,1829,397"/>
|
|
<area shape="poly" title=" " alt="" coords="1323,302,1485,325,1666,355,1679,357,1678,362,1666,360,1484,330,1322,307"/>
|
|
<area shape="poly" title=" " alt="" coords="1322,290,1497,295,1726,307,1983,326,2242,355,2255,357,2254,362,2242,360,1983,331,1726,312,1497,301,1322,295"/>
|
|
<area shape="poly" title=" " alt="" coords="1116,303,867,327,569,360,506,368,505,363,568,355,866,322,1116,298"/>
|
|
<area shape="poly" title=" " alt="" coords="772,357,783,355,1129,302,1130,307,784,360,773,362"/>
|
|
<area shape="poly" title=" " alt="" coords="773,395,1072,424,1363,443,1613,455,1792,460,1792,465,1613,460,1363,449,1072,429,772,400"/>
|
|
<area shape="poly" title=" " alt="" coords="955,222,1142,267,1141,272,954,227"/>
|
|
<area shape="poly" title=" " alt="" coords="774,228,684,257,641,275,602,296,573,319,556,343,553,355,554,368,560,382,570,395,587,403,623,410,740,423,903,434,1095,443,1492,455,1792,460,1792,466,1492,460,1094,448,903,439,739,428,622,415,586,408,567,399,555,384,549,369,548,355,551,341,569,315,600,291,638,270,682,252,772,222"/>
|
|
<area shape="poly" title=" " alt="" coords="969,210,1445,263,1755,304,2068,355,2080,357,2079,362,2067,360,1754,310,1445,268,968,215"/>
|
|
<area shape="poly" title=" " alt="" coords="759,215,621,236,546,251,473,272,421,292,370,315,287,360,285,355,367,310,419,287,472,267,545,246,620,230,758,210"/>
|
|
<area shape="poly" title=" " alt="" coords="758,213,578,234,476,251,376,272,306,292,237,315,125,360,123,355,235,310,304,287,375,267,475,245,578,229,758,208"/>
|
|
<area shape="poly" title=" " alt="" coords="969,215,1321,267,1872,355,1905,360,1904,366,1871,360,1320,272,968,220"/>
|
|
<area shape="poly" title=" " alt="" coords="759,209,703,215,643,227,582,246,526,272,500,291,477,314,443,359,439,356,473,310,496,287,523,267,580,241,641,222,702,210,758,203"/>
|
|
</map>
|
|
</div>
|
|
</div>
|
|
<p><a href="string_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="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="func-members" name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a757b345f73bb6cde5165a4d7f0c0a298" id="r_a757b345f73bb6cde5165a4d7f0c0a298"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a757b345f73bb6cde5165a4d7f0c0a298">to_string</a> (const std::wstring &s)</td></tr>
|
|
<tr class="memdesc:a757b345f73bb6cde5165a4d7f0c0a298"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF8 std::string into a std::wstring. <br /></td></tr>
|
|
<tr class="separator:a757b345f73bb6cde5165a4d7f0c0a298"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a57429a83a46c643a81dee81e49384439" id="r_a57429a83a46c643a81dee81e49384439"><td class="memItemLeft" align="right" valign="top">std::wstring </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a57429a83a46c643a81dee81e49384439">to_wstring</a> (const std::string &s)</td></tr>
|
|
<tr class="memdesc:a57429a83a46c643a81dee81e49384439"><td class="mdescLeft"> </td><td class="mdescRight">Convert a std::wstring into a UTF8 std::string. <br /></td></tr>
|
|
<tr class="separator:a57429a83a46c643a81dee81e49384439"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a24ea52e8ef70889ef1da986837e0ff34" id="r_a24ea52e8ef70889ef1da986837e0ff34"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a24ea52e8ef70889ef1da986837e0ff34"><td class="memTemplItemLeft" align="right" valign="top">std::wstring </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a24ea52e8ef70889ef1da986837e0ff34">to_wstring</a> (T s)</td></tr>
|
|
<tr class="separator:a24ea52e8ef70889ef1da986837e0ff34"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a517b35c7721e632812d8b3a7697c4099" id="r_a517b35c7721e632812d8b3a7697c4099"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a517b35c7721e632812d8b3a7697c4099">string_width</a> (const std::string &)</td></tr>
|
|
<tr class="separator:a517b35c7721e632812d8b3a7697c4099"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a389c58d385e861cd2ef109b53fc6ef96" id="r_a389c58d385e861cd2ef109b53fc6ef96"><td class="memItemLeft" align="right" valign="top">std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a389c58d385e861cd2ef109b53fc6ef96">Utf8ToGlyphs</a> (const std::string &input)</td></tr>
|
|
<tr class="separator:a389c58d385e861cd2ef109b53fc6ef96"><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('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": "../v4.0.0/index.html", "v3.0.0": "../v3.0.0/index.html", "v2.0.0": "../v2.0.0/index.html", "v0.9": "index.html", "v0.11": "../v0.11/index.html", "v0.10": "../v0.10/index.html"};
|
|
const currentVersion = "v0.9";
|
|
|
|
// 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>
|