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

268 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/component/component_base.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__base_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> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">component_base.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__base_8hpp__dep__incl.png" border="0" usemap="#ainclude_2ftxui_2component_2component__base_8hppdep" alt=""/></div>
<map name="ainclude_2ftxui_2component_2component__base_8hppdep" id="ainclude_2ftxui_2component_2component__base_8hppdep">
<area shape="rect" title=" " alt="" coords="1734,5,1913,45"/>
<area shape="rect" href="component_8hpp.html" title=" " alt="" coords="1582,93,1761,133"/>
<area shape="poly" title=" " alt="" coords="1779,54,1706,96,1703,91,1777,50"/>
<area shape="rect" href="button_8cpp.html" title=" " alt="" coords="5,181,156,221"/>
<area shape="poly" title=" " alt="" coords="1720,28,1504,30,1209,39,873,59,702,75,534,96,426,115,319,138,145,184,143,179,318,133,425,109,534,91,701,70,873,54,1209,33,1504,25,1720,23"/>
<area shape="rect" href="catch__event_8cpp.html" title=" " alt="" coords="180,181,331,221"/>
<area shape="poly" title=" " alt="" coords="1720,31,1540,36,1301,47,1033,67,764,96,643,115,524,139,329,184,327,179,523,133,643,110,763,91,1033,61,1301,42,1539,31,1720,26"/>
<area shape="rect" href="checkbox_8cpp.html" title=" " alt="" coords="355,181,505,221"/>
<area shape="poly" title=" " alt="" coords="1720,35,1414,58,1226,75,1038,96,777,134,517,184,506,186,505,181,516,179,776,129,1038,91,1226,70,1414,52,1720,30"/>
<area shape="rect" href="collapsible_8cpp.html" title=" " alt="" coords="529,181,680,221"/>
<area shape="poly" title=" " alt="" coords="1720,38,1494,60,1228,96,1133,116,1038,136,941,151,865,160,789,169,692,184,681,186,680,181,691,179,788,164,864,155,940,146,1038,131,1132,110,1227,91,1493,55,1720,32"/>
<area shape="rect" href="component_8cpp.html" title=" " alt="" coords="704,181,855,221"/>
<area shape="poly" title=" " alt="" coords="1721,38,1545,60,1446,76,1348,96,1288,116,1228,136,1127,155,1048,163,968,170,866,184,855,186,854,181,866,179,967,165,1047,158,1126,150,1227,131,1287,111,1347,91,1445,70,1545,54,1720,33"/>
<area shape="rect" href="container_8cpp.html" title=" " alt="" coords="879,181,1029,221"/>
<area shape="poly" title=" " alt="" coords="1721,39,1583,60,1507,76,1434,96,1409,106,1391,116,1373,126,1348,136,1263,157,1196,166,1128,172,1041,184,1030,186,1029,181,1040,179,1127,166,1195,160,1262,152,1347,131,1371,121,1389,111,1407,101,1432,91,1506,71,1582,55,1720,34"/>
<area shape="rect" href="dropdown_8cpp.html" title=" " alt="" coords="1053,181,1204,221"/>
<area shape="poly" title=" " alt="" coords="1721,42,1613,62,1557,77,1502,96,1482,105,1468,115,1454,126,1434,136,1205,186,1203,181,1432,131,1451,121,1465,111,1479,101,1500,91,1555,72,1612,57,1720,37"/>
<area shape="rect" href="hoverable_8cpp.html" title=" " alt="" coords="1228,181,1379,221"/>
<area shape="poly" title=" " alt="" coords="1721,50,1646,70,1571,96,1536,115,1502,136,1435,163,1370,184,1369,179,1433,158,1499,131,1534,111,1569,91,1645,65,1719,45"/>
<area shape="rect" href="input_8cpp.html" title=" " alt="" coords="1599,181,1749,221"/>
<area shape="poly" title=" " alt="" coords="1816,59,1799,97,1775,135,1745,162,1713,183,1710,179,1742,158,1771,132,1795,95,1811,57"/>
<area shape="rect" href="maybe_8cpp.html" title=" " alt="" coords="1773,181,1924,221"/>
<area shape="poly" title=" " alt="" coords="1831,59,1849,181,1843,182,1825,59"/>
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="1948,181,2099,221"/>
<area shape="poly" title=" " alt="" coords="1857,52,2003,179,2000,183,1854,56"/>
<area shape="rect" href="modal_8cpp.html" title=" " alt="" coords="2123,181,2273,221"/>
<area shape="poly" title=" " alt="" coords="1877,49,2158,179,2156,184,1875,54"/>
<area shape="rect" href="radiobox_8cpp.html" title=" " alt="" coords="2297,181,2448,221"/>
<area shape="poly" title=" " alt="" coords="1896,47,2314,179,2312,184,1895,52"/>
<area shape="rect" href="renderer_8cpp.html" title=" " alt="" coords="2472,181,2623,221"/>
<area shape="poly" title=" " alt="" coords="1921,46,2117,91,2474,179,2473,184,2116,96,1920,51"/>
<area shape="rect" href="resizable__split_8cpp.html" title=" " alt="" coords="2647,181,2797,221"/>
<area shape="poly" title=" " alt="" coords="1927,41,2213,91,2424,133,2635,179,2647,181,2646,187,2633,184,2423,139,2212,96,1926,46"/>
<area shape="rect" href="slider_8cpp.html" title=" " alt="" coords="2821,181,2972,221"/>
<area shape="poly" title=" " alt="" coords="1927,36,2115,60,2330,91,2570,132,2809,179,2822,181,2821,186,2808,184,2569,137,2330,96,2114,65,1926,41"/>
<area shape="rect" href="component_2util_8cpp.html" title=" " alt="" coords="2996,181,3147,221"/>
<area shape="poly" title=" " alt="" coords="1927,33,2172,56,2465,91,2725,130,2984,179,2996,181,2995,186,2983,184,2724,135,2464,96,2172,61,1926,38"/>
<area shape="rect" href="loop_8hpp.html" title=" " alt="" coords="3157,93,3335,133"/>
<area shape="poly" title=" " alt="" coords="1926,30,2967,91,3156,103,3156,108,2967,96,1926,35"/>
<area shape="rect" href="screen__interactive_8cpp.html" title=" " alt="" coords="3346,181,3519,221"/>
<area shape="poly" title=" " alt="" coords="1926,24,2267,25,2710,33,2927,41,3118,53,3264,69,3315,79,3349,91,3375,110,3397,133,3426,180,3422,183,3393,137,3372,114,3346,96,3313,85,3263,75,3117,58,2927,47,2710,38,2267,30,1926,29"/>
<area shape="poly" title=" " alt="" coords="1568,120,860,141,460,160,294,171,168,184,157,186,156,180,167,179,293,166,459,155,859,136,1568,114"/>
<area shape="poly" title=" " alt="" coords="1568,117,1346,119,1041,128,694,148,516,164,342,184,331,186,330,180,342,179,516,159,693,143,1041,123,1346,114,1568,112"/>
<area shape="poly" title=" " alt="" coords="1568,118,1373,122,1111,132,815,152,665,166,517,184,506,186,505,180,516,179,664,161,815,147,1111,127,1373,117,1568,113"/>
<area shape="poly" title=" " alt="" coords="1568,122,1111,149,869,166,692,184,681,186,680,180,691,179,868,161,1111,143,1568,117"/>
<area shape="poly" title=" " alt="" coords="1568,124,1197,151,1006,168,866,184,855,186,854,180,866,179,1005,163,1197,146,1568,119"/>
<area shape="rect" href="component__fuzzer_8cpp.html" title=" " alt="" coords="1403,181,1575,221"/>
<area shape="poly" title=" " alt="" coords="1620,142,1530,184,1528,179,1618,137"/>
<area shape="poly" title=" " alt="" coords="1569,125,1327,147,1184,164,1041,184,1030,186,1029,181,1040,179,1183,158,1327,142,1568,120"/>
<area shape="poly" title=" " alt="" coords="1569,130,1403,154,1216,184,1205,186,1204,181,1215,179,1402,148,1568,125"/>
<area shape="poly" title=" " alt="" coords="1578,139,1379,185,1378,180,1577,134"/>
<area shape="poly" title=" " alt="" coords="1675,147,1676,181,1671,181,1670,147"/>
<area shape="poly" title=" " alt="" coords="1724,137,1811,179,1809,184,1721,142"/>
<area shape="poly" title=" " alt="" coords="1762,134,1948,179,1947,184,1761,139"/>
<area shape="poly" title=" " alt="" coords="1775,126,1933,149,2110,179,2123,181,2122,186,2110,184,1932,154,1774,131"/>
<area shape="poly" title=" " alt="" coords="1775,120,2009,142,2285,179,2297,181,2296,186,2284,184,2008,148,1774,125"/>
<area shape="poly" title=" " alt="" coords="1775,117,2082,137,2271,155,2460,179,2472,181,2471,186,2459,184,2270,160,2082,142,1775,122"/>
<area shape="poly" title=" " alt="" coords="1774,114,1939,121,2154,132,2393,151,2634,179,2647,181,2646,186,2634,184,2393,156,2153,137,1939,126,1774,120"/>
<area shape="poly" title=" " alt="" coords="1774,113,1967,117,2225,128,2516,147,2809,179,2821,181,2821,186,2808,184,2515,153,2224,133,1967,122,1774,118"/>
<area shape="poly" title=" " alt="" coords="1774,112,1994,114,2294,123,2637,144,2812,159,2984,179,2996,181,2995,186,2983,184,2812,164,2637,149,2294,129,1994,120,1774,117"/>
<area shape="rect" href="loop_8cpp.html" title=" " alt="" coords="3171,181,3321,221"/>
<area shape="poly" title=" " alt="" coords="3249,147,3249,181,3243,181,3243,147"/>
<area shape="poly" title=" " alt="" coords="3300,137,3393,179,3391,184,3298,141"/>
</map>
</div>
</div>
<p><a href="component__base_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 &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classftxui_1_1ComponentBase.html">ComponentBase</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">It implement rendering itself as <a class="el" href="namespaceftxui.html#a2bc31f2d685189e5c61d2293a1f51b4f">ftxui::Element</a>. It implement keyboard navigation by responding to <a class="el" href="structftxui_1_1Event.html" title="Represent an event. It can be key press event, a terminal resize, or more ...">ftxui::Event</a>. <a href="classftxui_1_1ComponentBase.html#details">More...</a><br /></td></tr>
<tr class="separator:"><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>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui_1_1animation.html">ftxui::animation</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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:af1479ede01dbf087342534ab4ada11d3" id="r_af1479ede01dbf087342534ab4ada11d3"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a> = std::shared_ptr&lt;<a class="el" href="classftxui_1_1ComponentBase.html">ComponentBase</a>&gt;</td></tr>
<tr class="separator:af1479ede01dbf087342534ab4ada11d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d4ccad0c8a07d5b0cb4b2e690ffc90c" id="r_a3d4ccad0c8a07d5b0cb4b2e690ffc90c"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a3d4ccad0c8a07d5b0cb4b2e690ffc90c">Components</a> = std::vector&lt;<a class="el" href="namespaceftxui.html#af1479ede01dbf087342534ab4ada11d3">Component</a>&gt;</td></tr>
<tr class="separator:a3d4ccad0c8a07d5b0cb4b2e690ffc90c"><td class="memSeparator" colspan="2">&#160;</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": "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>