Files
Terminal.Gui/docs/api/Terminal/Terminal.Application.html
Miguel de Icaza 971ce0bdb7 Update docs
2018-01-17 16:11:14 -05:00

600 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>Class Application
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class Application
">
<meta name="generator" content="docfx 2.18.2.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">
<meta property="docfx:navrel" content="">
<meta property="docfx:tocrel" content="../toc.html">
</head>
<body data-spy="scroll" data-target="#affix">
<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="../../logo.svg" 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 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.Application">
<h1 id="Terminal_Application" data-uid="Terminal.Application">Class Application
</h1>
<div class="markdown level0 summary"><p>The application driver for gui.cs</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">Application</span></div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.html">Terminal</a></h6>
<h6><strong>Assembly</strong>: Terminal.dll</h6>
<h5 id="Terminal_Application_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class Application</code></pre>
</div>
<h5 id="Terminal_Application_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>
You can hook up to the Iteration event to have your method
invoked on each iteration of the mainloop.
</p>
<p>
Creates a mainloop to process input events, handle timers and
other sources of data. It is accessible via the MainLoop property.
</p>
<p>
When invoked sets the SynchronizationContext to one that is tied
to the mainloop, allowing user code to use async/await.
</p></div>
<h3 id="constructors">Constructors
</h3>
<a id="Terminal_Application__ctor_" data-uid="Terminal.Application.#ctor*"></a>
<h4 id="Terminal_Application__ctor" data-uid="Terminal.Application.#ctor">Application()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Application ();</code></pre>
</div>
<h3 id="fields">Fields
</h3>
<h4 id="Terminal_Application_Driver" data-uid="Terminal.Application.Driver">Driver</h4>
<div class="markdown level1 summary"><p>The current Console Driver in use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Terminal.ConsoleDriver Driver;</code></pre>
</div>
<h5 class="fieldValue">Field 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.ConsoleDriver.html">ConsoleDriver</a></td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<h4 id="Terminal_Application_RootMouseEvent" data-uid="Terminal.Application.RootMouseEvent">RootMouseEvent</h4>
<div class="markdown level1 summary"><p>Merely a debugging aid to see the raw mouse events</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Action&lt;Terminal.MouseEvent&gt; RootMouseEvent;</code></pre>
</div>
<h5 class="fieldValue">Field 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.Action</span>&lt;<a class="xref" href="Terminal.MouseEvent.html">MouseEvent</a>&gt;</td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<a id="Terminal_Application_Current_" data-uid="Terminal.Application.Current*"></a>
<h4 id="Terminal_Application_Current" data-uid="Terminal.Application.Current">Current</h4>
<div class="markdown level1 summary"><p>The current toplevel object. This is updated when Application.Run enters and leaves and points to the current toplevel.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Terminal.Toplevel Current { get; }</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.Toplevel.html">Toplevel</a></td>
<td><p>The current.</p>
</td>
</tr>
</tbody>
</table>
<a id="Terminal_Application_MainLoop_" data-uid="Terminal.Application.MainLoop*"></a>
<h4 id="Terminal_Application_MainLoop" data-uid="Terminal.Application.MainLoop">MainLoop</h4>
<div class="markdown level1 summary"><p>The mainloop driver for the applicaiton</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Mono.Terminal.MainLoop MainLoop { get; }</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="../Mono.Terminal/Mono.Terminal.MainLoop.html">MainLoop</a></td>
<td><p>The main loop.</p>
</td>
</tr>
</tbody>
</table>
<a id="Terminal_Application_Top_" data-uid="Terminal.Application.Top*"></a>
<h4 id="Terminal_Application_Top" data-uid="Terminal.Application.Top">Top</h4>
<div class="markdown level1 summary"><p>The Toplevel object used for the application on startup.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Terminal.Toplevel Top { get; }</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.Toplevel.html">Toplevel</a></td>
<td><p>The top.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<a id="Terminal_Application_Begin_" data-uid="Terminal.Application.Begin*"></a>
<h4 id="Terminal_Application_Begin_Terminal_Toplevel_" data-uid="Terminal.Application.Begin(Terminal.Toplevel)">Begin(Toplevel)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Terminal.Application.RunState Begin (Terminal.Toplevel toplevel);</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.Toplevel.html">Toplevel</a></td>
<td><span class="parametername">toplevel</span></td>
<td><p>To be added.</p>
</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></td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<a id="Terminal_Application_End_" data-uid="Terminal.Application.End*"></a>
<h4 id="Terminal_Application_End_Terminal_Application_RunState_" data-uid="Terminal.Application.End(Terminal.Application.RunState)">End(Application+RunState)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void End (Terminal.Application.RunState rs);</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></td>
<td><span class="parametername">rs</span></td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<a id="Terminal_Application_GrabMouse_" data-uid="Terminal.Application.GrabMouse*"></a>
<h4 id="Terminal_Application_GrabMouse_Terminal_View_" data-uid="Terminal.Application.GrabMouse(Terminal.View)">GrabMouse(View)</h4>
<div class="markdown level1 summary"><p>Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void GrabMouse (Terminal.View view);</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.View.html">View</a></td>
<td><span class="parametername">view</span></td>
<td><p>View that will receive all mouse events until UngrabMouse is invoked.</p>
</td>
</tr>
</tbody>
</table>
<a id="Terminal_Application_Init_" data-uid="Terminal.Application.Init*"></a>
<h4 id="Terminal_Application_Init" data-uid="Terminal.Application.Init">Init()</h4>
<div class="markdown level1 summary"><p>Initializes the Application</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void Init ();</code></pre>
</div>
<a id="Terminal_Application_MakeCenteredRect_" data-uid="Terminal.Application.MakeCenteredRect*"></a>
<h4 id="Terminal_Application_MakeCenteredRect_Terminal_Size_" data-uid="Terminal.Application.MakeCenteredRect(Terminal.Size)">MakeCenteredRect(Size)</h4>
<div class="markdown level1 summary"><p>Returns a rectangle that is centered in the screen for the provided size.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Terminal.Rect MakeCenteredRect (Terminal.Size size);</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.Size.html">Size</a></td>
<td><span class="parametername">size</span></td>
<td><p>Size for the rectangle.</p>
</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><a class="xref" href="Terminal.Rect.html">Rect</a></td>
<td><p>The centered rect.</p>
</td>
</tr>
</tbody>
</table>
<a id="Terminal_Application_Refresh_" data-uid="Terminal.Application.Refresh*"></a>
<h4 id="Terminal_Application_Refresh" data-uid="Terminal.Application.Refresh">Refresh()</h4>
<div class="markdown level1 summary"><p>Triggers a refresh of the entire display.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void Refresh ();</code></pre>
</div>
<a id="Terminal_Application_RequestStop_" data-uid="Terminal.Application.RequestStop*"></a>
<h4 id="Terminal_Application_RequestStop" data-uid="Terminal.Application.RequestStop">RequestStop()</h4>
<div class="markdown level1 summary"><p>Stops running the most recent toplevel</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void RequestStop ();</code></pre>
</div>
<a id="Terminal_Application_Run_" data-uid="Terminal.Application.Run*"></a>
<h4 id="Terminal_Application_Run" data-uid="Terminal.Application.Run">Run()</h4>
<div class="markdown level1 summary"><p>Runs the application with the built-in toplevel view</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void Run ();</code></pre>
</div>
<a id="Terminal_Application_Run_" data-uid="Terminal.Application.Run*"></a>
<h4 id="Terminal_Application_Run_Terminal_Toplevel_" data-uid="Terminal.Application.Run(Terminal.Toplevel)">Run(Toplevel)</h4>
<div class="markdown level1 summary"><p>Runs the main loop on the given container.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void Run (Terminal.Toplevel view);</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.Toplevel.html">Toplevel</a></td>
<td><span class="parametername">view</span></td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Terminal_Application_Run_Terminal_Toplevel__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is used to start processing events
for the main application, but it is also used to
run modal dialog boxes.
</p>
<p>
To make a toplevel stop execution, set the &quot;Running&quot;
property to false.
</p></div>
<a id="Terminal_Application_RunLoop_" data-uid="Terminal.Application.RunLoop*"></a>
<h4 id="Terminal_Application_RunLoop_Terminal_Application_RunState_System_Boolean_" data-uid="Terminal.Application.RunLoop(Terminal.Application.RunState,System.Boolean)">RunLoop(Application+RunState, Boolean)</h4>
<div class="markdown level1 summary"><p>Runs the main loop for the created dialog</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void RunLoop (Terminal.Application.RunState state, bool wait = true);</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></td>
<td><span class="parametername">state</span></td>
<td><p>To be added.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">wait</span></td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Terminal_Application_RunLoop_Terminal_Application_RunState_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Use the wait parameter to control whether this is a
blocking or non-blocking call.</p>
</div>
<a id="Terminal_Application_UngrabMouse_" data-uid="Terminal.Application.UngrabMouse*"></a>
<h4 id="Terminal_Application_UngrabMouse" data-uid="Terminal.Application.UngrabMouse">UngrabMouse()</h4>
<div class="markdown level1 summary"><p>Releases the mouse grab, so mouse events will be routed to the view on which the mouse is.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void UngrabMouse ();</code></pre>
</div>
<h3 id="events">Events
</h3>
<h4 id="Terminal_Application_Iteration" data-uid="Terminal.Application.Iteration">Iteration</h4>
<div class="markdown level1 summary"><p>This event is raised on each iteration of the
main loop.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static event EventHandler Iteration;</code></pre>
</div>
<h5 class="eventType">Event Type</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.EventHandler</span></td>
<td><p>To be added.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Terminal_Application_Iteration_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>See also <span class="xref">System.Threading.Timeout</span></p>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</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>Copyright © 2015-2017 Microsoft<br>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>