Files
Terminal.Gui/docs/api/Terminal.Gui/Terminal.Gui.IAutocomplete.html
2022-07-23 14:03:43 -06:00

579 lines
22 KiB
HTML

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Interface IAutocomplete
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface IAutocomplete
">
<meta name="generator" content="docfx 2.59.3.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<link href="https://fonts.googleapis.com/css?family=Source Sans Pro" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source Code Pro" rel="stylesheet">
<meta property="docfx:navrel" content="../../toc.html">
<meta property="docfx:tocrel" content="toc.html">
<meta property="docfx:rel" content="../../">
</head> <body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../images/logo48.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list">Search Results for <span></span></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Terminal.Gui.IAutocomplete">
<h1 id="Terminal_Gui_IAutocomplete" data-uid="Terminal.Gui.IAutocomplete" class="text-break">Interface IAutocomplete
</h1>
<div class="markdown level0 summary">
Renders an overlay on another view at a given point that allows selecting
from a range of &apos;autocomplete&apos; options.
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
<h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
<h5 id="Terminal_Gui_IAutocomplete_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface IAutocomplete</code></pre>
</div>
<h3 id="properties">Properties
</h3>
<a id="Terminal_Gui_IAutocomplete_AllSuggestions_" data-uid="Terminal.Gui.IAutocomplete.AllSuggestions*"></a>
<h4 id="Terminal_Gui_IAutocomplete_AllSuggestions" data-uid="Terminal.Gui.IAutocomplete.AllSuggestions">AllSuggestions</h4>
<div class="markdown level1 summary">
The full set of all strings that can be suggested.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">List&lt;string&gt; AllSuggestions { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_CloseKey_" data-uid="Terminal.Gui.IAutocomplete.CloseKey*"></a>
<h4 id="Terminal_Gui_IAutocomplete_CloseKey" data-uid="Terminal.Gui.IAutocomplete.CloseKey">CloseKey</h4>
<div class="markdown level1 summary">
The key that the user can press to close the currently popped autocomplete menu
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Key CloseKey { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_ColorScheme_" data-uid="Terminal.Gui.IAutocomplete.ColorScheme*"></a>
<h4 id="Terminal_Gui_IAutocomplete_ColorScheme" data-uid="Terminal.Gui.IAutocomplete.ColorScheme">ColorScheme</h4>
<div class="markdown level1 summary">
The colors to use to render the overlay. Accessing this property before
the Application has been initialized will cause an error
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">ColorScheme ColorScheme { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.ColorScheme.html">ColorScheme</a></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_HostControl_" data-uid="Terminal.Gui.IAutocomplete.HostControl*"></a>
<h4 id="Terminal_Gui_IAutocomplete_HostControl" data-uid="Terminal.Gui.IAutocomplete.HostControl">HostControl</h4>
<div class="markdown level1 summary">
The host control that will use autocomplete.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">View HostControl { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_MaxHeight_" data-uid="Terminal.Gui.IAutocomplete.MaxHeight*"></a>
<h4 id="Terminal_Gui_IAutocomplete_MaxHeight" data-uid="Terminal.Gui.IAutocomplete.MaxHeight">MaxHeight</h4>
<div class="markdown level1 summary">
The maximum number of visible rows in the autocomplete dropdown to render
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int MaxHeight { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_MaxWidth_" data-uid="Terminal.Gui.IAutocomplete.MaxWidth*"></a>
<h4 id="Terminal_Gui_IAutocomplete_MaxWidth" data-uid="Terminal.Gui.IAutocomplete.MaxWidth">MaxWidth</h4>
<div class="markdown level1 summary">
The maximum width of the autocomplete dropdown
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int MaxWidth { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_PopupInsideContainer_" data-uid="Terminal.Gui.IAutocomplete.PopupInsideContainer*"></a>
<h4 id="Terminal_Gui_IAutocomplete_PopupInsideContainer" data-uid="Terminal.Gui.IAutocomplete.PopupInsideContainer">PopupInsideContainer</h4>
<div class="markdown level1 summary">
Gets or sets where the popup will be displayed.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool PopupInsideContainer { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_Reopen_" data-uid="Terminal.Gui.IAutocomplete.Reopen*"></a>
<h4 id="Terminal_Gui_IAutocomplete_Reopen" data-uid="Terminal.Gui.IAutocomplete.Reopen">Reopen</h4>
<div class="markdown level1 summary">
The key that the user can press to reopen the currently popped autocomplete menu
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Key Reopen { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_SelectedIdx_" data-uid="Terminal.Gui.IAutocomplete.SelectedIdx*"></a>
<h4 id="Terminal_Gui_IAutocomplete_SelectedIdx" data-uid="Terminal.Gui.IAutocomplete.SelectedIdx">SelectedIdx</h4>
<div class="markdown level1 summary">
The currently selected index into <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_Suggestions">Suggestions</a> that the user has highlighted
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int SelectedIdx { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_SelectionKey_" data-uid="Terminal.Gui.IAutocomplete.SelectionKey*"></a>
<h4 id="Terminal_Gui_IAutocomplete_SelectionKey" data-uid="Terminal.Gui.IAutocomplete.SelectionKey">SelectionKey</h4>
<div class="markdown level1 summary">
The key that the user must press to accept the currently selected autocomplete suggestion
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Key SelectionKey { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_Suggestions_" data-uid="Terminal.Gui.IAutocomplete.Suggestions*"></a>
<h4 id="Terminal_Gui_IAutocomplete_Suggestions" data-uid="Terminal.Gui.IAutocomplete.Suggestions">Suggestions</h4>
<div class="markdown level1 summary">
The strings that form the current list of suggestions to render
based on what the user has typed so far.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">ReadOnlyCollection&lt;string&gt; Suggestions { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.ObjectModel.ReadOnlyCollection</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_Visible_" data-uid="Terminal.Gui.IAutocomplete.Visible*"></a>
<h4 id="Terminal_Gui_IAutocomplete_Visible" data-uid="Terminal.Gui.IAutocomplete.Visible">Visible</h4>
<div class="markdown level1 summary">
True if the autocomplete should be considered open and visible
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Visible { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<a id="Terminal_Gui_IAutocomplete_ClearSuggestions_" data-uid="Terminal.Gui.IAutocomplete.ClearSuggestions*"></a>
<h4 id="Terminal_Gui_IAutocomplete_ClearSuggestions" data-uid="Terminal.Gui.IAutocomplete.ClearSuggestions">ClearSuggestions()</h4>
<div class="markdown level1 summary">
Clears <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_Suggestions">Suggestions</a>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void ClearSuggestions()</code></pre>
</div>
<a id="Terminal_Gui_IAutocomplete_GenerateSuggestions_" data-uid="Terminal.Gui.IAutocomplete.GenerateSuggestions*"></a>
<h4 id="Terminal_Gui_IAutocomplete_GenerateSuggestions" data-uid="Terminal.Gui.IAutocomplete.GenerateSuggestions">GenerateSuggestions()</h4>
<div class="markdown level1 summary">
Populates <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_Suggestions">Suggestions</a> with all strings in <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_AllSuggestions">AllSuggestions</a> that
match with the current cursor position/text in the <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_HostControl">HostControl</a>.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void GenerateSuggestions()</code></pre>
</div>
<a id="Terminal_Gui_IAutocomplete_MouseEvent_" data-uid="Terminal.Gui.IAutocomplete.MouseEvent*"></a>
<h4 id="Terminal_Gui_IAutocomplete_MouseEvent_Terminal_Gui_MouseEvent_System_Boolean_" data-uid="Terminal.Gui.IAutocomplete.MouseEvent(Terminal.Gui.MouseEvent,System.Boolean)">MouseEvent(MouseEvent, Boolean)</h4>
<div class="markdown level1 summary">
Handle mouse events before <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_HostControl">HostControl</a> e.g. to make mouse events like
report/click apply to the autocomplete control instead of changing the cursor position in
the underlying text view.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool MouseEvent(MouseEvent me, bool fromHost = false)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
<td><span class="parametername">me</span></td>
<td>The mouse event.</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">fromHost</span></td>
<td>If was called from the popup or from the host.</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><code>true</code>if the mouse can be handled <code>false</code>otherwise.</td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_ProcessKey_" data-uid="Terminal.Gui.IAutocomplete.ProcessKey*"></a>
<h4 id="Terminal_Gui_IAutocomplete_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.IAutocomplete.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
<div class="markdown level1 summary">
Handle key events before <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_HostControl">HostControl</a> e.g. to make key events like
up/down apply to the autocomplete control instead of changing the cursor position in
the underlying text view.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool ProcessKey(KeyEvent kb)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
<td><span class="parametername">kb</span></td>
<td>The key event.</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><code>true</code>if the key can be handled <code>false</code>otherwise.</td>
</tr>
</tbody>
</table>
<a id="Terminal_Gui_IAutocomplete_RenderOverlay_" data-uid="Terminal.Gui.IAutocomplete.RenderOverlay*"></a>
<h4 id="Terminal_Gui_IAutocomplete_RenderOverlay_Terminal_Gui_Point_" data-uid="Terminal.Gui.IAutocomplete.RenderOverlay(Terminal.Gui.Point)">RenderOverlay(Point)</h4>
<div class="markdown level1 summary">
Renders the autocomplete dialog inside the given <a class="xref" href="Terminal.Gui.IAutocomplete.html#Terminal_Gui_IAutocomplete_HostControl">HostControl</a> at the
given point.
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void RenderOverlay(Point renderAt)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Terminal.Gui.Point.html">Point</a></td>
<td><span class="parametername">renderAt</span></td>
<td></td>
</tr>
</tbody>
</table>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>