| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632 |
- <!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
- ">
-
- <link rel="shortcut icon" href="../../favicon.ico">
- <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
- <link rel="stylesheet" href="../../styles/docfx.css">
- <link rel="stylesheet" href="../../styles/main.css">
- <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.Application">
- <h1 id="Terminal_Gui_Application" data-uid="Terminal.Gui.Application" class="text-break">Class Application
- </h1>
- <div class="markdown level0 summary">A static, singleton class providing the main application driver for Terminal.Gui apps.</div>
- <div class="markdown level0 conceptual"></div>
- <div class="inheritance">
- <h5>Inheritance</h5>
- <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
- <div class="level1"><span class="xref">Application</span></div>
- </div>
- <div class="inheritedMembers">
- <h5>Inherited Members</h5>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
- </div>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
- </div>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
- </div>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
- </div>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
- </div>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
- </div>
- <div>
- <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
- </div>
- </div>
- <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a></h6>
- <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
- <h5 id="Terminal_Gui_Application_syntax">Syntax</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static class Application</code></pre>
- </div>
- <h5 id="Terminal_Gui_Application_remarks"><strong>Remarks</strong></h5>
- <div class="markdown level0 remarks"><p>
- Creates a instance of <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> to process input events, handle timers and
- other sources of data. It is accessible via the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> property.
- </p>
- <p>
- You can hook up to the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Iteration">Iteration</a> event to have your method
- invoked on each iteration of the <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a>.
- </p>
- <p>
- When invoked sets the SynchronizationContext to one that is tied
- to the mainloop, allowing user code to use async/await.
- </p></div>
- <h5 id="Terminal_Gui_Application_examples"><strong>Examples</strong></h5>
- <pre><code class="lang-csharp">// A simple Terminal.Gui app that creates a window with a frame and title with
- // 5 rows/columns of padding.
- Application.Init();
- var win = new Window ("Hello World - CTRL-Q to quit") {
- X = 5,
- Y = 5,
- Width = Dim.Fill (5),
- Height = Dim.Fill (5)
- };
- Application.Top.Add(win);
- Application.Run();
- Application.Shutdown();</code></pre>
- <h3 id="fields">Fields
- </h3>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Driver.md&value=---%0Auid%3A%20Terminal.Gui.Application.Driver%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L65">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_Driver" data-uid="Terminal.Gui.Application.Driver">Driver</h4>
- <div class="markdown level1 summary">The current <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> in use.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static ConsoleDriver Driver</code></pre>
- </div>
- <h5 class="fieldValue">Field Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Iteration.md&value=---%0Auid%3A%20Terminal.Gui.Application.Iteration%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L261">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_Iteration" data-uid="Terminal.Gui.Application.Iteration">Iteration</h4>
- <div class="markdown level1 summary">This event is raised on each iteration of the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Action Iteration</code></pre>
- </div>
- <h5 class="fieldValue">Field Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_Iteration_remarks">Remarks</h5>
- <div class="markdown level1 remarks">See also <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.timeout">Timeout</a></div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Resized.md&value=---%0Auid%3A%20Terminal.Gui.Application.Resized%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1578">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_Resized" data-uid="Terminal.Gui.Application.Resized">Resized</h4>
- <div class="markdown level1 summary">Invoked when the terminal was resized. The new size of the terminal is provided.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Action<Application.ResizedEventArgs> Resized</code></pre>
- </div>
- <h5 class="fieldValue">Field Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.ResizedEventArgs.html">ResizedEventArgs</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RootKeyEvent.md&value=---%0Auid%3A%20Terminal.Gui.Application.RootKeyEvent%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L785">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_RootKeyEvent" data-uid="Terminal.Gui.Application.RootKeyEvent">RootKeyEvent</h4>
- <div class="markdown level1 summary"><p>
- Called for new KeyPress events before any processing is performed or
- views evaluate. Use for global key handling and/or debugging.
- </p>
- <p>Return true to suppress the KeyPress event</p></div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Func<KeyEvent, bool> RootKeyEvent</code></pre>
- </div>
- <h5 class="fieldValue">Field Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RootMouseEvent.md&value=---%0Auid%3A%20Terminal.Gui.Application.RootMouseEvent%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L776">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_RootMouseEvent" data-uid="Terminal.Gui.Application.RootMouseEvent">RootMouseEvent</h4>
- <div class="markdown level1 summary">Merely a debugging aid to see the raw mouse events</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Action<MouseEvent> RootMouseEvent</code></pre>
- </div>
- <h5 class="fieldValue">Field Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h3 id="properties">Properties
- </h3>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_AlternateBackwardKey.md&value=---%0Auid%3A%20Terminal.Gui.Application.AlternateBackwardKey%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L168">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_AlternateBackwardKey_" data-uid="Terminal.Gui.Application.AlternateBackwardKey*"></a>
- <h4 id="Terminal_Gui_Application_AlternateBackwardKey" data-uid="Terminal.Gui.Application.AlternateBackwardKey">AlternateBackwardKey</h4>
- <div class="markdown level1 summary">Alternative key to navigate backwards through views. Shift+Ctrl+Tab is the primary key.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Key AlternateBackwardKey { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered 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>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_AlternateForwardKey.md&value=---%0Auid%3A%20Terminal.Gui.Application.AlternateForwardKey%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L145">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_AlternateForwardKey_" data-uid="Terminal.Gui.Application.AlternateForwardKey*"></a>
- <h4 id="Terminal_Gui_Application_AlternateForwardKey" data-uid="Terminal.Gui.Application.AlternateForwardKey">AlternateForwardKey</h4>
- <div class="markdown level1 summary">Alternative key to navigate forwards through views. Ctrl+Tab is the primary key.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Key AlternateForwardKey { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered 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>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Current.md&value=---%0Auid%3A%20Terminal.Gui.Application.Current%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L106">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Current_" data-uid="Terminal.Gui.Application.Current*"></a>
- <h4 id="Terminal_Gui_Application_Current" data-uid="Terminal.Gui.Application.Current">Current</h4>
- <div class="markdown level1 summary">The current <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> object. This is updated when <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func<Exception, bool>)</a> enters and leaves to point to the current <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> .</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Toplevel Current { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td>The current.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_EnableConsoleScrolling.md&value=---%0Auid%3A%20Terminal.Gui.Application.EnableConsoleScrolling%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L131">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_EnableConsoleScrolling_" data-uid="Terminal.Gui.Application.EnableConsoleScrolling*"></a>
- <h4 id="Terminal_Gui_Application_EnableConsoleScrolling" data-uid="Terminal.Gui.Application.EnableConsoleScrolling">EnableConsoleScrolling</h4>
- <div class="markdown level1 summary">The current <a class="xref" href="Terminal.Gui.ConsoleDriver.html#Terminal_Gui_ConsoleDriver_EnableConsoleScrolling">EnableConsoleScrolling</a> used in the terminal.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">[Obsolete("This API is deprecated and has no impact when enabled.", false)]
- public static bool EnableConsoleScrolling { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_EnableConsoleScrolling_remarks">Remarks</h5>
- <div class="markdown level1 remarks"><p>
- If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> (the default) the height of the Terminal.Gui application (<a class="xref" href="Terminal.Gui.ConsoleDriver.html#Terminal_Gui_ConsoleDriver_Rows">Rows</a>)
- tracks to the height of the visible console view when the console is resized. In this case
- scrolling in the console will be disabled and all <a class="xref" href="Terminal.Gui.ConsoleDriver.html#Terminal_Gui_ConsoleDriver_Rows">Rows</a> will remain visible.
- </p>
- <p>
- If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> then height of the Terminal.Gui application <a class="xref" href="Terminal.Gui.ConsoleDriver.html#Terminal_Gui_ConsoleDriver_Rows">Rows</a> only tracks
- the height of the visible console view when the console is made larger (the application will only grow in height, never shrink).
- In this case console scrolling is enabled and the contents (<a class="xref" href="Terminal.Gui.ConsoleDriver.html#Terminal_Gui_ConsoleDriver_Rows">Rows</a> high) will scroll
- as the console scrolls.
- </p>
- <p>This API is deprecated and has no impact when enabled.</p>
- <p>This API was previously named 'HeightAsBuffer` but was renamed to make its purpose more clear.</p></div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_ExitRunLoopAfterFirstIteration.md&value=---%0Auid%3A%20Terminal.Gui.Application.ExitRunLoopAfterFirstIteration%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L232">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_ExitRunLoopAfterFirstIteration_" data-uid="Terminal.Gui.Application.ExitRunLoopAfterFirstIteration*"></a>
- <h4 id="Terminal_Gui_Application_ExitRunLoopAfterFirstIteration" data-uid="Terminal.Gui.Application.ExitRunLoopAfterFirstIteration">ExitRunLoopAfterFirstIteration</h4>
- <div class="markdown level1 summary">Set to true to cause the RunLoop method to exit after the first iterations.
- Set to false (the default) to cause the RunLoop to continue running until Application.RequestStop() is called.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static bool ExitRunLoopAfterFirstIteration { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_HeightAsBuffer.md&value=---%0Auid%3A%20Terminal.Gui.Application.HeightAsBuffer%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L137">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_HeightAsBuffer_" data-uid="Terminal.Gui.Application.HeightAsBuffer*"></a>
- <h4 id="Terminal_Gui_Application_HeightAsBuffer" data-uid="Terminal.Gui.Application.HeightAsBuffer">HeightAsBuffer</h4>
- <div class="markdown level1 summary">This API is deprecated; use <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_EnableConsoleScrolling">EnableConsoleScrolling</a> instead.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">[Obsolete("This API is deprecated and has no impact when enabled.", false)]
- public static bool HeightAsBuffer { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_IsMouseDisabled.md&value=---%0Auid%3A%20Terminal.Gui.Application.IsMouseDisabled%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L226">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_IsMouseDisabled_" data-uid="Terminal.Gui.Application.IsMouseDisabled*"></a>
- <h4 id="Terminal_Gui_Application_IsMouseDisabled" data-uid="Terminal.Gui.Application.IsMouseDisabled">IsMouseDisabled</h4>
- <div class="markdown level1 summary">Disable or enable the mouse. The mouse is enabled by default.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static bool IsMouseDisabled { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MainLoop.md&value=---%0Auid%3A%20Terminal.Gui.Application.MainLoop%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L221">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MainLoop_" data-uid="Terminal.Gui.Application.MainLoop*"></a>
- <h4 id="Terminal_Gui_Application_MainLoop" data-uid="Terminal.Gui.Application.MainLoop">MainLoop</h4>
- <div class="markdown level1 summary">The <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> driver for the application</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static MainLoop MainLoop { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a></td>
- <td>The main loop.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MdiChildes.md&value=---%0Auid%3A%20Terminal.Gui.Application.MdiChildes%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L70">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MdiChildes_" data-uid="Terminal.Gui.Application.MdiChildes*"></a>
- <h4 id="Terminal_Gui_Application_MdiChildes" data-uid="Terminal.Gui.Application.MdiChildes">MdiChildes</h4>
- <div class="markdown level1 summary">Gets all the Mdi childes which represent all the not modal <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiTop">MdiTop</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static List<Toplevel> MdiChildes { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MdiTop.md&value=---%0Auid%3A%20Terminal.Gui.Application.MdiTop%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L87">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MdiTop_" data-uid="Terminal.Gui.Application.MdiTop*"></a>
- <h4 id="Terminal_Gui_Application_MdiTop" data-uid="Terminal.Gui.Application.MdiTop">MdiTop</h4>
- <div class="markdown level1 summary">The <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> object used for the application on startup which <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_IsMdiContainer">IsMdiContainer</a> is true.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Toplevel MdiTop { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MouseGrabView.md&value=---%0Auid%3A%20Terminal.Gui.Application.MouseGrabView%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L693">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MouseGrabView_" data-uid="Terminal.Gui.Application.MouseGrabView*"></a>
- <h4 id="Terminal_Gui_Application_MouseGrabView" data-uid="Terminal.Gui.Application.MouseGrabView">MouseGrabView</h4>
- <div class="markdown level1 summary">The view that grabbed the mouse, to where will be routed all the mouse events.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static View MouseGrabView { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered 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>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_QuitKey.md&value=---%0Auid%3A%20Terminal.Gui.Application.QuitKey%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L191">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_QuitKey_" data-uid="Terminal.Gui.Application.QuitKey*"></a>
- <h4 id="Terminal_Gui_Application_QuitKey" data-uid="Terminal.Gui.Application.QuitKey">QuitKey</h4>
- <div class="markdown level1 summary">Gets or sets the key to quit the application.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Key QuitKey { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered 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>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_SupportedCultures.md&value=---%0Auid%3A%20Terminal.Gui.Application.SupportedCultures%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L207">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_SupportedCultures_" data-uid="Terminal.Gui.Application.SupportedCultures*"></a>
- <h4 id="Terminal_Gui_Application_SupportedCultures" data-uid="Terminal.Gui.Application.SupportedCultures">SupportedCultures</h4>
- <div class="markdown level1 summary">Gets all supported cultures by the application without the invariant language.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static List<CultureInfo> SupportedCultures { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo">CultureInfo</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Top.md&value=---%0Auid%3A%20Terminal.Gui.Application.Top%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L100">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Top_" data-uid="Terminal.Gui.Application.Top*"></a>
- <h4 id="Terminal_Gui_Application_Top" data-uid="Terminal.Gui.Application.Top">Top</h4>
- <div class="markdown level1 summary">The <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> object used for the application on startup (<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Top">Top</a>)</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Toplevel Top { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td>The top.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UseSystemConsole.md&value=---%0Auid%3A%20Terminal.Gui.Application.UseSystemConsole%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L319">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_UseSystemConsole_" data-uid="Terminal.Gui.Application.UseSystemConsole*"></a>
- <h4 id="Terminal_Gui_Application_UseSystemConsole" data-uid="Terminal.Gui.Application.UseSystemConsole">UseSystemConsole</h4>
- <div class="markdown level1 summary">If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>, forces the use of the System.Console-based (see <a class="xref" href="Terminal.Gui.NetDriver.html">NetDriver</a>) driver. The default is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static bool UseSystemConsole { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_WantContinuousButtonPressedView.md&value=---%0Auid%3A%20Terminal.Gui.Application.WantContinuousButtonPressedView%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L111">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_WantContinuousButtonPressedView_" data-uid="Terminal.Gui.Application.WantContinuousButtonPressedView*"></a>
- <h4 id="Terminal_Gui_Application_WantContinuousButtonPressedView" data-uid="Terminal.Gui.Application.WantContinuousButtonPressedView">WantContinuousButtonPressedView</h4>
- <div class="markdown level1 summary">The current <a class="xref" href="Terminal.Gui.View.html">View</a> object that wants continuous mouse button pressed events.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static View WantContinuousButtonPressedView { get; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered 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>
- <h3 id="methods">Methods
- </h3>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_.md&value=---%0Auid%3A%20Terminal.Gui.Application.Begin(Terminal.Gui.Toplevel)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L960">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Begin_" data-uid="Terminal.Gui.Application.Begin*"></a>
- <h4 id="Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Application.Begin(Terminal.Gui.Toplevel)">Begin(Toplevel)</h4>
- <div class="markdown level1 summary">Building block API: Prepares the provided <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> for execution.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Application.RunState Begin(Toplevel toplevel)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td><span class="parametername">toplevel</span></td>
- <td>The <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> to prepare execution for.</td>
- </tr>
- </tbody>
- </table>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
- <td>The <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> handle that needs to be passed to the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(RunState)</a> method upon completion.</td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel__remarks">Remarks</h5>
- <div class="markdown level1 remarks">This method prepares the provided toplevel for running with the focus,
- it adds this to the list of toplevels, sets up the mainloop to process the
- event, lays out the subviews, focuses the first element, and draws the
- toplevel in the screen. This is usually followed by executing
- the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(RunState, bool)</a> method, and then the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(RunState)</a> method upon termination which will
- undo these changes.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_DoEvents.md&value=---%0Auid%3A%20Terminal.Gui.Application.DoEvents%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1689">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_DoEvents_" data-uid="Terminal.Gui.Application.DoEvents*"></a>
- <h4 id="Terminal_Gui_Application_DoEvents" data-uid="Terminal.Gui.Application.DoEvents">DoEvents()</h4>
- <div class="markdown level1 summary">Wakes up the mainloop that might be waiting on input, must be thread safe.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void DoEvents()</code></pre>
- </div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_.md&value=---%0Auid%3A%20Terminal.Gui.Application.End(Terminal.Gui.Application.RunState)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1056">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_End_" data-uid="Terminal.Gui.Application.End*"></a>
- <h4 id="Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_" data-uid="Terminal.Gui.Application.End(Terminal.Gui.Application.RunState)">End(RunState)</h4>
- <div class="markdown level1 summary">Building block API: completes the execution of a <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> that was started with <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> .</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void End(Application.RunState runState)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
- <td><span class="parametername">runState</span></td>
- <td>The <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> returned by the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> method.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_EnsuresTopOnFront.md&value=---%0Auid%3A%20Terminal.Gui.Application.EnsuresTopOnFront%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1697">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_EnsuresTopOnFront_" data-uid="Terminal.Gui.Application.EnsuresTopOnFront*"></a>
- <h4 id="Terminal_Gui_Application_EnsuresTopOnFront" data-uid="Terminal.Gui.Application.EnsuresTopOnFront">EnsuresTopOnFront()</h4>
- <div class="markdown level1 summary">Ensures that the superview of the most focused view is on front.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void EnsuresTopOnFront()</code></pre>
- </div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_GrabMouse_Terminal_Gui_View_.md&value=---%0Auid%3A%20Terminal.Gui.Application.GrabMouse(Terminal.Gui.View)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L720">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_GrabMouse_" data-uid="Terminal.Gui.Application.GrabMouse*"></a>
- <h4 id="Terminal_Gui_Application_GrabMouse_Terminal_Gui_View_" data-uid="Terminal.Gui.Application.GrabMouse(Terminal.Gui.View)">GrabMouse(View)</h4>
- <div class="markdown level1 summary">Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void GrabMouse(View view)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
- <td><span class="parametername">view</span></td>
- <td>View that will receive all mouse events until UngrabMouse is invoked.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_.md&value=---%0Auid%3A%20Terminal.Gui.Application.Init(Terminal.Gui.ConsoleDriver%2CTerminal.Gui.IMainLoopDriver)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L351">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Init_" data-uid="Terminal.Gui.Application.Init*"></a>
- <h4 id="Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_" data-uid="Terminal.Gui.Application.Init(Terminal.Gui.ConsoleDriver,Terminal.Gui.IMainLoopDriver)">Init(ConsoleDriver, IMainLoopDriver)</h4>
- <div class="markdown level1 summary">Initializes a new instance of <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a> Application.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void Init(ConsoleDriver driver = null, IMainLoopDriver mainLoopDriver = null)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
- <td><span class="parametername">driver</span></td>
- <td>The <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> to use. If not specified the default driver for the
- platform will be used (see <a class="xref" href="Terminal.Gui.WindowsDriver.html">WindowsDriver</a>, <a class="xref" href="Terminal.Gui.CursesDriver.html">CursesDriver</a>, and <a class="xref" href="Terminal.Gui.NetDriver.html">NetDriver</a>).</td>
- </tr>
- <tr>
- <td><a class="xref" href="Terminal.Gui.IMainLoopDriver.html">IMainLoopDriver</a></td>
- <td><span class="parametername">mainLoopDriver</span></td>
- <td>Specifies the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> to use.
- Must not be <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> if <code class="paramref">driver</code> is not <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MakeCenteredRect_Terminal_Gui_Size_.md&value=---%0Auid%3A%20Terminal.Gui.Application.MakeCenteredRect(Terminal.Gui.Size)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L268">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MakeCenteredRect_" data-uid="Terminal.Gui.Application.MakeCenteredRect*"></a>
- <h4 id="Terminal_Gui_Application_MakeCenteredRect_Terminal_Gui_Size_" data-uid="Terminal.Gui.Application.MakeCenteredRect(Terminal.Gui.Size)">MakeCenteredRect(Size)</h4>
- <div class="markdown level1 summary">Returns a rectangle that is centered in the screen for the provided size.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static Rect MakeCenteredRect(Size size)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Size.html">Size</a></td>
- <td><span class="parametername">size</span></td>
- <td>Size for the rectangle.</td>
- </tr>
- </tbody>
- </table>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
- <td>The centered rect.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MoveNext.md&value=---%0Auid%3A%20Terminal.Gui.Application.MoveNext%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1627">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MoveNext_" data-uid="Terminal.Gui.Application.MoveNext*"></a>
- <h4 id="Terminal_Gui_Application_MoveNext" data-uid="Terminal.Gui.Application.MoveNext">MoveNext()</h4>
- <div class="markdown level1 summary">Move to the next Mdi child from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiTop">MdiTop</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void MoveNext()</code></pre>
- </div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MovePrevious.md&value=---%0Auid%3A%20Terminal.Gui.Application.MovePrevious%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1650">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_MovePrevious_" data-uid="Terminal.Gui.Application.MovePrevious*"></a>
- <h4 id="Terminal_Gui_Application_MovePrevious" data-uid="Terminal.Gui.Application.MovePrevious">MovePrevious()</h4>
- <div class="markdown level1 summary">Move to the previous Mdi child from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiTop">MdiTop</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void MovePrevious()</code></pre>
- </div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Refresh.md&value=---%0Auid%3A%20Terminal.Gui.Application.Refresh%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1168">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Refresh_" data-uid="Terminal.Gui.Application.Refresh*"></a>
- <h4 id="Terminal_Gui_Application_Refresh" data-uid="Terminal.Gui.Application.Refresh">Refresh()</h4>
- <div class="markdown level1 summary">Triggers a refresh of the entire display.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void Refresh()</code></pre>
- </div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_.md&value=---%0Auid%3A%20Terminal.Gui.Application.RequestStop(Terminal.Gui.Toplevel)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1490">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_RequestStop_" data-uid="Terminal.Gui.Application.RequestStop*"></a>
- <h4 id="Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Application.RequestStop(Terminal.Gui.Toplevel)">RequestStop(Toplevel)</h4>
- <div class="markdown level1 summary">Stops running the most recent <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> or the <code class="paramref">top</code> if provided.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void RequestStop(Toplevel top = null)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td><span class="parametername">top</span></td>
- <td>The toplevel to request stop.</td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel__remarks">Remarks</h5>
- <div class="markdown level1 remarks"><p>
- This will cause <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func<Exception, bool>)</a> to return.
- </p>
- <p>
- Calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a> is equivalent to setting the <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Running</a> property on the currently running <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> to false.
- </p></div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__.md&value=---%0Auid%3A%20Terminal.Gui.Application.Run(System.Func%7BSystem.Exception%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1367">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
- <h4 id="Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__" data-uid="Terminal.Gui.Application.Run(System.Func{System.Exception,System.Boolean})">Run(Func<Exception, bool>)</h4>
- <div class="markdown level1 summary">Runs the application by calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a> with the value of <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Top">Top</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void Run(Func<Exception, bool> errorHandler = null)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td>
- <td><span class="parametername">errorHandler</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean___remarks">Remarks</h5>
- <div class="markdown level1 remarks">See <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a> for more details.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__.md&value=---%0Auid%3A%20Terminal.Gui.Application.Run(Terminal.Gui.Toplevel%2CSystem.Func%7BSystem.Exception%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1449">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
- <h4 id="Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__" data-uid="Terminal.Gui.Application.Run(Terminal.Gui.Toplevel,System.Func{System.Exception,System.Boolean})">Run(Toplevel, Func<Exception, bool>)</h4>
- <div class="markdown level1 summary">Runs the main loop on the given <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> container.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void Run(Toplevel view, Func<Exception, bool> errorHandler = null)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td><span class="parametername">view</span></td>
- <td>The <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> to run modally.</td>
- </tr>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td>
- <td><span class="parametername">errorHandler</span></td>
- <td>RELEASE builds only: Handler for any unhandled exceptions (resumes when returns true, rethrows when null).</td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean___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 other modal <a class="xref" href="Terminal.Gui.View.html">View</a>s such as <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> boxes.
- </p>
- <p>
- To make a <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a> stop execution, call <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a>.
- </p>
- <p>
- Calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a> is equivalent to calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a>, followed by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(RunState, bool)</a>,
- and then calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(RunState)</a>.
- </p>
- <p>
- Alternatively, to have a program control the main loop and
- process events manually, call <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> to set things up manually and then
- repeatedly call <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(RunState, bool)</a> with the wait parameter set to false. By doing this
- the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(RunState, bool)</a> method will only process any pending events, timers, idle handlers and
- then return control immediately.
- </p>
- <p>
- RELEASE builds only: When <code class="paramref">errorHandler</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> any exeptions will be rethrown.
- Otheriwse, if <code class="paramref">errorHandler</code> will be called. If <code class="paramref">errorHandler</code>
- returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(RunState, bool)</a> will resume; otherwise
- this method will exit.
- </p></div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_.md&value=---%0Auid%3A%20Terminal.Gui.Application.RunLoop(Terminal.Gui.Application.RunState%2CSystem.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1194">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_RunLoop_" data-uid="Terminal.Gui.Application.RunLoop*"></a>
- <h4 id="Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_" data-uid="Terminal.Gui.Application.RunLoop(Terminal.Gui.Application.RunState,System.Boolean)">RunLoop(RunState, bool)</h4>
- <div class="markdown level1 summary">Building block API: Runs the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> for the created <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void RunLoop(Application.RunState state, bool wait = true)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
- <td><span class="parametername">state</span></td>
- <td>The state returned by the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> method.</td>
- </tr>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td><span class="parametername">wait</span></td>
- <td>By default this is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> which will execute the runloop waiting for events,
- if set to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>, a single iteration will execute.</td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean__remarks">Remarks</h5>
- <div class="markdown level1 remarks">Use the <code class="paramref">wait</code> parameter to control whether this is a blocking or non-blocking call.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RunMainLoopIteration_Terminal_Gui_Application_RunState__System_Boolean_System_Boolean__.md&value=---%0Auid%3A%20Terminal.Gui.Application.RunMainLoopIteration(Terminal.Gui.Application.RunState%40%2CSystem.Boolean%2CSystem.Boolean%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1218">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_RunMainLoopIteration_" data-uid="Terminal.Gui.Application.RunMainLoopIteration*"></a>
- <h4 id="Terminal_Gui_Application_RunMainLoopIteration_Terminal_Gui_Application_RunState__System_Boolean_System_Boolean__" data-uid="Terminal.Gui.Application.RunMainLoopIteration(Terminal.Gui.Application.RunState@,System.Boolean,System.Boolean@)">RunMainLoopIteration(ref RunState, bool, ref bool)</h4>
- <div class="markdown level1 summary">Run one iteration of the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void RunMainLoopIteration(ref Application.RunState state, bool wait, ref bool firstIteration)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
- <td><span class="parametername">state</span></td>
- <td>The state returned by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a>.</td>
- </tr>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td><span class="parametername">wait</span></td>
- <td>If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> will execute the runloop waiting for events. If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>
- will return after a single iteration.</td>
- </tr>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
- <td><span class="parametername">firstIteration</span></td>
- <td>Set to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if this is the first run loop iteration. Upon return,
- it will be set to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> if at least one iteration happened.</td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Run__1_System_Func_System_Exception_System_Boolean__Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_.md&value=---%0Auid%3A%20Terminal.Gui.Application.Run%60%601(System.Func%7BSystem.Exception%2CSystem.Boolean%7D%2CTerminal.Gui.ConsoleDriver%2CTerminal.Gui.IMainLoopDriver)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1392">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
- <h4 id="Terminal_Gui_Application_Run__1_System_Func_System_Exception_System_Boolean__Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_" data-uid="Terminal.Gui.Application.Run``1(System.Func{System.Exception,System.Boolean},Terminal.Gui.ConsoleDriver,Terminal.Gui.IMainLoopDriver)">Run<T>(Func<Exception, bool>, ConsoleDriver, IMainLoopDriver)</h4>
- <div class="markdown level1 summary">Runs the application by calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a>
- with a new instance of the specified <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>-derived class.
- <p>
- Calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a> first is not needed as this function will initialze the application.
- </p>
- <p>
- <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Shutdown">Shutdown()</a> must be called when the application is closing (typically after Run> has
- returned) to ensure resources are cleaned up and terminal settings restored.
- </p></div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void Run<T>(Func<Exception, bool> errorHandler = null, ConsoleDriver driver = null, IMainLoopDriver mainLoopDriver = null) where T : Toplevel, new()</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td>
- <td><span class="parametername">errorHandler</span></td>
- <td></td>
- </tr>
- <tr>
- <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
- <td><span class="parametername">driver</span></td>
- <td>The <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> to use. If not specified the default driver for the
- platform will be used (<a class="xref" href="Terminal.Gui.WindowsDriver.html">WindowsDriver</a>, <a class="xref" href="Terminal.Gui.CursesDriver.html">CursesDriver</a>, or <a class="xref" href="Terminal.Gui.NetDriver.html">NetDriver</a>).
- This parameteter must be <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> if <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a> has already been called.</td>
- </tr>
- <tr>
- <td><a class="xref" href="Terminal.Gui.IMainLoopDriver.html">IMainLoopDriver</a></td>
- <td><span class="parametername">mainLoopDriver</span></td>
- <td>Specifies the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> to use.</td>
- </tr>
- </tbody>
- </table>
- <h5 class="typeParameters">Type Parameters</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="parametername">T</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_Run__1_System_Func_System_Exception_System_Boolean__Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver__remarks">Remarks</h5>
- <div class="markdown level1 remarks">See <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a> for more details.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Shutdown.md&value=---%0Auid%3A%20Terminal.Gui.Application.Shutdown%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1113">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_Shutdown_" data-uid="Terminal.Gui.Application.Shutdown*"></a>
- <h4 id="Terminal_Gui_Application_Shutdown" data-uid="Terminal.Gui.Application.Shutdown">Shutdown()</h4>
- <div class="markdown level1 summary">Shutdown an application initialized with <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a>.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void Shutdown()</code></pre>
- </div>
- <h5 id="Terminal_Gui_Application_Shutdown_remarks">Remarks</h5>
- <div class="markdown level1 remarks">Shutdown must be called for every call to <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a> or <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func<Exception, bool>)</a>
- to ensure all resources are cleaned up (Disposed) and terminal settings are restored.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UngrabMouse.md&value=---%0Auid%3A%20Terminal.Gui.Application.UngrabMouse%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L734">View Source</a>
- </span>
- <a id="Terminal_Gui_Application_UngrabMouse_" data-uid="Terminal.Gui.Application.UngrabMouse*"></a>
- <h4 id="Terminal_Gui_Application_UngrabMouse" data-uid="Terminal.Gui.Application.UngrabMouse">UngrabMouse()</h4>
- <div class="markdown level1 summary">Releases the mouse grab, so mouse events will be routed to the view on which the mouse is.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static void UngrabMouse()</code></pre>
- </div>
- <h3 id="events">Events
- </h3>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_GrabbedMouse.md&value=---%0Auid%3A%20Terminal.Gui.Application.GrabbedMouse%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L708">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_GrabbedMouse" data-uid="Terminal.Gui.Application.GrabbedMouse">GrabbedMouse</h4>
- <div class="markdown level1 summary">Event to be invoked when a view grab the mouse.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static event Action<View> GrabbedMouse</code></pre>
- </div>
- <h5 class="eventType">Event Type</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="Terminal.Gui.View.html">View</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_GrabbingMouse.md&value=---%0Auid%3A%20Terminal.Gui.Application.GrabbingMouse%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L698">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_GrabbingMouse" data-uid="Terminal.Gui.Application.GrabbingMouse">GrabbingMouse</h4>
- <div class="markdown level1 summary">Invoked when a view wants to grab the mouse; can be canceled.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static event Func<View, bool> GrabbingMouse</code></pre>
- </div>
- <h5 class="eventType">Event Type</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="Terminal.Gui.View.html">View</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_NotifyNewRunState.md&value=---%0Auid%3A%20Terminal.Gui.Application.NotifyNewRunState%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L243">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_NotifyNewRunState" data-uid="Terminal.Gui.Application.NotifyNewRunState">NotifyNewRunState</h4>
- <div class="markdown level1 summary">Notify that a new <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> was created (<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> was called). The token is created in
- <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> and this event will be fired before that function exits.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static event Action<Application.RunState> NotifyNewRunState</code></pre>
- </div>
- <h5 class="eventType">Event Type</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_NotifyNewRunState_remarks">Remarks</h5>
- <div class="markdown level1 remarks">If <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_ExitRunLoopAfterFirstIteration">ExitRunLoopAfterFirstIteration</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> callers to
- <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> must also subscribe to <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_NotifyStopRunState">NotifyStopRunState</a>
- and manually dispose of the <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> token when the application is done.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_NotifyStopRunState.md&value=---%0Auid%3A%20Terminal.Gui.Application.NotifyStopRunState%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L253">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_NotifyStopRunState" data-uid="Terminal.Gui.Application.NotifyStopRunState">NotifyStopRunState</h4>
- <div class="markdown level1 summary">Notify that a existent <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is stopping (<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(RunState)</a> was called).</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static event Action<Toplevel> NotifyStopRunState</code></pre>
- </div>
- <h5 class="eventType">Event Type</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 id="Terminal_Gui_Application_NotifyStopRunState_remarks">Remarks</h5>
- <div class="markdown level1 remarks">If <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_ExitRunLoopAfterFirstIteration">ExitRunLoopAfterFirstIteration</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> callers to
- <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> must also subscribe to <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_NotifyStopRunState">NotifyStopRunState</a>
- and manually dispose of the <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> token when the application is done.</div>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UnGrabbedMouse.md&value=---%0Auid%3A%20Terminal.Gui.Application.UnGrabbedMouse%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L713">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_UnGrabbedMouse" data-uid="Terminal.Gui.Application.UnGrabbedMouse">UnGrabbedMouse</h4>
- <div class="markdown level1 summary">Event to be invoked when a view ungrab the mouse.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static event Action<View> UnGrabbedMouse</code></pre>
- </div>
- <h5 class="eventType">Event Type</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="Terminal.Gui.View.html">View</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <span class="small pull-right mobile-hide">
- <span class="divider">|</span>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UnGrabbingMouse.md&value=---%0Auid%3A%20Terminal.Gui.Application.UnGrabbingMouse%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
- </span>
- <span class="small pull-right mobile-hide">
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L703">View Source</a>
- </span>
- <h4 id="Terminal_Gui_Application_UnGrabbingMouse" data-uid="Terminal.Gui.Application.UnGrabbingMouse">UnGrabbingMouse</h4>
- <div class="markdown level1 summary">Invoked when a view wants ungrab the mouse; can be canceled.</div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="declaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static event Func<View, bool> UnGrabbingMouse</code></pre>
- </div>
- <h5 class="eventType">Event Type</h5>
- <table class="table table-bordered table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="Terminal.Gui.View.html">View</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </article>
- </div>
- <div class="hidden-sm col-md-2" role="complementary">
- <div class="sideaffix">
- <div class="contribution">
- <ul class="nav">
- <li>
- <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application.md&value=---%0Auid%3A%20Terminal.Gui.Application%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
- </li>
- <li>
- <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L59" class="contribution-link">View Source</a>
- </li>
- </ul>
- </div>
- <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.min.js"></script>
- <script type="text/javascript" src="../../styles/docfx.js"></script>
- <script type="text/javascript" src="../../styles/main.js"></script>
- </body>
- </html>
|