Terminal.Gui.Application.html 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class Application
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Application
  11. ">
  12. <link rel="shortcut icon" href="../../favicon.ico">
  13. <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
  14. <link rel="stylesheet" href="../../styles/docfx.css">
  15. <link rel="stylesheet" href="../../styles/main.css">
  16. <meta property="docfx:navrel" content="../../toc.html">
  17. <meta property="docfx:tocrel" content="toc.html">
  18. <meta property="docfx:rel" content="../../">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div class="container body-content">
  54. <div id="search-results">
  55. <div class="search-list">Search Results for <span></span></div>
  56. <div class="sr-items">
  57. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  58. </div>
  59. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  60. </div>
  61. </div>
  62. <div role="main" class="container body-content hide-when-search">
  63. <div class="sidenav hide-when-search">
  64. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  65. <div class="sidetoggle collapse" id="sidetoggle">
  66. <div id="sidetoc"></div>
  67. </div>
  68. </div>
  69. <div class="article row grid-right">
  70. <div class="col-md-10">
  71. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Application">
  72. <h1 id="Terminal_Gui_Application" data-uid="Terminal.Gui.Application" class="text-break">Class Application
  73. </h1>
  74. <div class="markdown level0 summary">A static, singleton class providing the main application driver for Terminal.Gui apps.</div>
  75. <div class="markdown level0 conceptual"></div>
  76. <div class="inheritance">
  77. <h5>Inheritance</h5>
  78. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  79. <div class="level1"><span class="xref">Application</span></div>
  80. </div>
  81. <div class="inheritedMembers">
  82. <h5>Inherited Members</h5>
  83. <div>
  84. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  85. </div>
  86. <div>
  87. <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>
  88. </div>
  89. <div>
  90. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  91. </div>
  92. <div>
  93. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  94. </div>
  95. <div>
  96. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  97. </div>
  98. <div>
  99. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
  103. </div>
  104. </div>
  105. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a></h6>
  106. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  107. <h5 id="Terminal_Gui_Application_syntax">Syntax</h5>
  108. <div class="codewrapper">
  109. <pre><code class="lang-csharp hljs">public static class Application</code></pre>
  110. </div>
  111. <h5 id="Terminal_Gui_Application_remarks"><strong>Remarks</strong></h5>
  112. <div class="markdown level0 remarks"><p>
  113. Creates a instance of <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> to process input events, handle timers and
  114. other sources of data. It is accessible via the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> property.
  115. </p>
  116. <p>
  117. 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
  118. invoked on each iteration of the <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a>.
  119. </p>
  120. <p>
  121. When invoked sets the SynchronizationContext to one that is tied
  122. to the mainloop, allowing user code to use async/await.
  123. </p></div>
  124. <h5 id="Terminal_Gui_Application_examples"><strong>Examples</strong></h5>
  125. <pre><code class="lang-csharp">// A simple Terminal.Gui app that creates a window with a frame and title with
  126. // 5 rows/columns of padding.
  127. Application.Init();
  128. var win = new Window ("Hello World - CTRL-Q to quit") {
  129. X = 5,
  130. Y = 5,
  131. Width = Dim.Fill (5),
  132. Height = Dim.Fill (5)
  133. };
  134. Application.Top.Add(win);
  135. Application.Run();
  136. Application.Shutdown();</code></pre>
  137. <h3 id="fields">Fields
  138. </h3>
  139. <span class="small pull-right mobile-hide">
  140. <span class="divider">|</span>
  141. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Driver.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Driver%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  142. </span>
  143. <span class="small pull-right mobile-hide">
  144. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L65">View Source</a>
  145. </span>
  146. <h4 id="Terminal_Gui_Application_Driver" data-uid="Terminal.Gui.Application.Driver">Driver</h4>
  147. <div class="markdown level1 summary">The current <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> in use.</div>
  148. <div class="markdown level1 conceptual"></div>
  149. <h5 class="declaration">Declaration</h5>
  150. <div class="codewrapper">
  151. <pre><code class="lang-csharp hljs">public static ConsoleDriver Driver</code></pre>
  152. </div>
  153. <h5 class="fieldValue">Field Value</h5>
  154. <table class="table table-bordered table-condensed">
  155. <thead>
  156. <tr>
  157. <th>Type</th>
  158. <th>Description</th>
  159. </tr>
  160. </thead>
  161. <tbody>
  162. <tr>
  163. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  164. <td></td>
  165. </tr>
  166. </tbody>
  167. </table>
  168. <span class="small pull-right mobile-hide">
  169. <span class="divider">|</span>
  170. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Iteration.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Iteration%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  171. </span>
  172. <span class="small pull-right mobile-hide">
  173. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L261">View Source</a>
  174. </span>
  175. <h4 id="Terminal_Gui_Application_Iteration" data-uid="Terminal.Gui.Application.Iteration">Iteration</h4>
  176. <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>
  177. <div class="markdown level1 conceptual"></div>
  178. <h5 class="declaration">Declaration</h5>
  179. <div class="codewrapper">
  180. <pre><code class="lang-csharp hljs">public static Action Iteration</code></pre>
  181. </div>
  182. <h5 class="fieldValue">Field Value</h5>
  183. <table class="table table-bordered table-condensed">
  184. <thead>
  185. <tr>
  186. <th>Type</th>
  187. <th>Description</th>
  188. </tr>
  189. </thead>
  190. <tbody>
  191. <tr>
  192. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></td>
  193. <td></td>
  194. </tr>
  195. </tbody>
  196. </table>
  197. <h5 id="Terminal_Gui_Application_Iteration_remarks">Remarks</h5>
  198. <div class="markdown level1 remarks">See also <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.timeout">Timeout</a></div>
  199. <span class="small pull-right mobile-hide">
  200. <span class="divider">|</span>
  201. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Resized.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Resized%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  202. </span>
  203. <span class="small pull-right mobile-hide">
  204. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1578">View Source</a>
  205. </span>
  206. <h4 id="Terminal_Gui_Application_Resized" data-uid="Terminal.Gui.Application.Resized">Resized</h4>
  207. <div class="markdown level1 summary">Invoked when the terminal was resized. The new size of the terminal is provided.</div>
  208. <div class="markdown level1 conceptual"></div>
  209. <h5 class="declaration">Declaration</h5>
  210. <div class="codewrapper">
  211. <pre><code class="lang-csharp hljs">public static Action&lt;Application.ResizedEventArgs&gt; Resized</code></pre>
  212. </div>
  213. <h5 class="fieldValue">Field Value</h5>
  214. <table class="table table-bordered table-condensed">
  215. <thead>
  216. <tr>
  217. <th>Type</th>
  218. <th>Description</th>
  219. </tr>
  220. </thead>
  221. <tbody>
  222. <tr>
  223. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.ResizedEventArgs.html">ResizedEventArgs</a>&gt;</td>
  224. <td></td>
  225. </tr>
  226. </tbody>
  227. </table>
  228. <span class="small pull-right mobile-hide">
  229. <span class="divider">|</span>
  230. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RootKeyEvent.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.RootKeyEvent%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  231. </span>
  232. <span class="small pull-right mobile-hide">
  233. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L785">View Source</a>
  234. </span>
  235. <h4 id="Terminal_Gui_Application_RootKeyEvent" data-uid="Terminal.Gui.Application.RootKeyEvent">RootKeyEvent</h4>
  236. <div class="markdown level1 summary"><p>
  237. Called for new KeyPress events before any processing is performed or
  238. views evaluate. Use for global key handling and/or debugging.
  239. </p>
  240. <p>Return true to suppress the KeyPress event</p></div>
  241. <div class="markdown level1 conceptual"></div>
  242. <h5 class="declaration">Declaration</h5>
  243. <div class="codewrapper">
  244. <pre><code class="lang-csharp hljs">public static Func&lt;KeyEvent, bool&gt; RootKeyEvent</code></pre>
  245. </div>
  246. <h5 class="fieldValue">Field Value</h5>
  247. <table class="table table-bordered table-condensed">
  248. <thead>
  249. <tr>
  250. <th>Type</th>
  251. <th>Description</th>
  252. </tr>
  253. </thead>
  254. <tbody>
  255. <tr>
  256. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>&gt;</td>
  257. <td></td>
  258. </tr>
  259. </tbody>
  260. </table>
  261. <span class="small pull-right mobile-hide">
  262. <span class="divider">|</span>
  263. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RootMouseEvent.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.RootMouseEvent%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  264. </span>
  265. <span class="small pull-right mobile-hide">
  266. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L776">View Source</a>
  267. </span>
  268. <h4 id="Terminal_Gui_Application_RootMouseEvent" data-uid="Terminal.Gui.Application.RootMouseEvent">RootMouseEvent</h4>
  269. <div class="markdown level1 summary">Merely a debugging aid to see the raw mouse events</div>
  270. <div class="markdown level1 conceptual"></div>
  271. <h5 class="declaration">Declaration</h5>
  272. <div class="codewrapper">
  273. <pre><code class="lang-csharp hljs">public static Action&lt;MouseEvent&gt; RootMouseEvent</code></pre>
  274. </div>
  275. <h5 class="fieldValue">Field Value</h5>
  276. <table class="table table-bordered table-condensed">
  277. <thead>
  278. <tr>
  279. <th>Type</th>
  280. <th>Description</th>
  281. </tr>
  282. </thead>
  283. <tbody>
  284. <tr>
  285. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a>&gt;</td>
  286. <td></td>
  287. </tr>
  288. </tbody>
  289. </table>
  290. <h3 id="properties">Properties
  291. </h3>
  292. <span class="small pull-right mobile-hide">
  293. <span class="divider">|</span>
  294. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_AlternateBackwardKey.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.AlternateBackwardKey%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  295. </span>
  296. <span class="small pull-right mobile-hide">
  297. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L168">View Source</a>
  298. </span>
  299. <a id="Terminal_Gui_Application_AlternateBackwardKey_" data-uid="Terminal.Gui.Application.AlternateBackwardKey*"></a>
  300. <h4 id="Terminal_Gui_Application_AlternateBackwardKey" data-uid="Terminal.Gui.Application.AlternateBackwardKey">AlternateBackwardKey</h4>
  301. <div class="markdown level1 summary">Alternative key to navigate backwards through views. Shift+Ctrl+Tab is the primary key.</div>
  302. <div class="markdown level1 conceptual"></div>
  303. <h5 class="declaration">Declaration</h5>
  304. <div class="codewrapper">
  305. <pre><code class="lang-csharp hljs">public static Key AlternateBackwardKey { get; set; }</code></pre>
  306. </div>
  307. <h5 class="propertyValue">Property Value</h5>
  308. <table class="table table-bordered table-condensed">
  309. <thead>
  310. <tr>
  311. <th>Type</th>
  312. <th>Description</th>
  313. </tr>
  314. </thead>
  315. <tbody>
  316. <tr>
  317. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  318. <td></td>
  319. </tr>
  320. </tbody>
  321. </table>
  322. <span class="small pull-right mobile-hide">
  323. <span class="divider">|</span>
  324. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_AlternateForwardKey.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.AlternateForwardKey%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  325. </span>
  326. <span class="small pull-right mobile-hide">
  327. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L145">View Source</a>
  328. </span>
  329. <a id="Terminal_Gui_Application_AlternateForwardKey_" data-uid="Terminal.Gui.Application.AlternateForwardKey*"></a>
  330. <h4 id="Terminal_Gui_Application_AlternateForwardKey" data-uid="Terminal.Gui.Application.AlternateForwardKey">AlternateForwardKey</h4>
  331. <div class="markdown level1 summary">Alternative key to navigate forwards through views. Ctrl+Tab is the primary key.</div>
  332. <div class="markdown level1 conceptual"></div>
  333. <h5 class="declaration">Declaration</h5>
  334. <div class="codewrapper">
  335. <pre><code class="lang-csharp hljs">public static Key AlternateForwardKey { get; set; }</code></pre>
  336. </div>
  337. <h5 class="propertyValue">Property Value</h5>
  338. <table class="table table-bordered table-condensed">
  339. <thead>
  340. <tr>
  341. <th>Type</th>
  342. <th>Description</th>
  343. </tr>
  344. </thead>
  345. <tbody>
  346. <tr>
  347. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  348. <td></td>
  349. </tr>
  350. </tbody>
  351. </table>
  352. <span class="small pull-right mobile-hide">
  353. <span class="divider">|</span>
  354. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Current.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Current%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  355. </span>
  356. <span class="small pull-right mobile-hide">
  357. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L106">View Source</a>
  358. </span>
  359. <a id="Terminal_Gui_Application_Current_" data-uid="Terminal.Gui.Application.Current*"></a>
  360. <h4 id="Terminal_Gui_Application_Current" data-uid="Terminal.Gui.Application.Current">Current</h4>
  361. <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&lt;Exception, bool&gt;)</a> enters and leaves to point to the current <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> .</div>
  362. <div class="markdown level1 conceptual"></div>
  363. <h5 class="declaration">Declaration</h5>
  364. <div class="codewrapper">
  365. <pre><code class="lang-csharp hljs">public static Toplevel Current { get; }</code></pre>
  366. </div>
  367. <h5 class="propertyValue">Property Value</h5>
  368. <table class="table table-bordered table-condensed">
  369. <thead>
  370. <tr>
  371. <th>Type</th>
  372. <th>Description</th>
  373. </tr>
  374. </thead>
  375. <tbody>
  376. <tr>
  377. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  378. <td>The current.</td>
  379. </tr>
  380. </tbody>
  381. </table>
  382. <span class="small pull-right mobile-hide">
  383. <span class="divider">|</span>
  384. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_EnableConsoleScrolling.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.EnableConsoleScrolling%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  385. </span>
  386. <span class="small pull-right mobile-hide">
  387. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L131">View Source</a>
  388. </span>
  389. <a id="Terminal_Gui_Application_EnableConsoleScrolling_" data-uid="Terminal.Gui.Application.EnableConsoleScrolling*"></a>
  390. <h4 id="Terminal_Gui_Application_EnableConsoleScrolling" data-uid="Terminal.Gui.Application.EnableConsoleScrolling">EnableConsoleScrolling</h4>
  391. <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>
  392. <div class="markdown level1 conceptual"></div>
  393. <h5 class="declaration">Declaration</h5>
  394. <div class="codewrapper">
  395. <pre><code class="lang-csharp hljs">[Obsolete(&quot;This API is deprecated and has no impact when enabled.&quot;, false)]
  396. public static bool EnableConsoleScrolling { get; set; }</code></pre>
  397. </div>
  398. <h5 class="propertyValue">Property Value</h5>
  399. <table class="table table-bordered table-condensed">
  400. <thead>
  401. <tr>
  402. <th>Type</th>
  403. <th>Description</th>
  404. </tr>
  405. </thead>
  406. <tbody>
  407. <tr>
  408. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  409. <td></td>
  410. </tr>
  411. </tbody>
  412. </table>
  413. <h5 id="Terminal_Gui_Application_EnableConsoleScrolling_remarks">Remarks</h5>
  414. <div class="markdown level1 remarks"><p>
  415. 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>)
  416. tracks to the height of the visible console view when the console is resized. In this case
  417. 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.
  418. </p>
  419. <p>
  420. 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
  421. the height of the visible console view when the console is made larger (the application will only grow in height, never shrink).
  422. 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
  423. as the console scrolls.
  424. </p>
  425. <p>This API is deprecated and has no impact when enabled.</p>
  426. <p>This API was previously named 'HeightAsBuffer` but was renamed to make its purpose more clear.</p></div>
  427. <span class="small pull-right mobile-hide">
  428. <span class="divider">|</span>
  429. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_ExitRunLoopAfterFirstIteration.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.ExitRunLoopAfterFirstIteration%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  430. </span>
  431. <span class="small pull-right mobile-hide">
  432. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L232">View Source</a>
  433. </span>
  434. <a id="Terminal_Gui_Application_ExitRunLoopAfterFirstIteration_" data-uid="Terminal.Gui.Application.ExitRunLoopAfterFirstIteration*"></a>
  435. <h4 id="Terminal_Gui_Application_ExitRunLoopAfterFirstIteration" data-uid="Terminal.Gui.Application.ExitRunLoopAfterFirstIteration">ExitRunLoopAfterFirstIteration</h4>
  436. <div class="markdown level1 summary">Set to true to cause the RunLoop method to exit after the first iterations.
  437. Set to false (the default) to cause the RunLoop to continue running until Application.RequestStop() is called.</div>
  438. <div class="markdown level1 conceptual"></div>
  439. <h5 class="declaration">Declaration</h5>
  440. <div class="codewrapper">
  441. <pre><code class="lang-csharp hljs">public static bool ExitRunLoopAfterFirstIteration { get; set; }</code></pre>
  442. </div>
  443. <h5 class="propertyValue">Property Value</h5>
  444. <table class="table table-bordered table-condensed">
  445. <thead>
  446. <tr>
  447. <th>Type</th>
  448. <th>Description</th>
  449. </tr>
  450. </thead>
  451. <tbody>
  452. <tr>
  453. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  454. <td></td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. <span class="small pull-right mobile-hide">
  459. <span class="divider">|</span>
  460. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_HeightAsBuffer.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.HeightAsBuffer%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  461. </span>
  462. <span class="small pull-right mobile-hide">
  463. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L137">View Source</a>
  464. </span>
  465. <a id="Terminal_Gui_Application_HeightAsBuffer_" data-uid="Terminal.Gui.Application.HeightAsBuffer*"></a>
  466. <h4 id="Terminal_Gui_Application_HeightAsBuffer" data-uid="Terminal.Gui.Application.HeightAsBuffer">HeightAsBuffer</h4>
  467. <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>
  468. <div class="markdown level1 conceptual"></div>
  469. <h5 class="declaration">Declaration</h5>
  470. <div class="codewrapper">
  471. <pre><code class="lang-csharp hljs">[Obsolete(&quot;This API is deprecated and has no impact when enabled.&quot;, false)]
  472. public static bool HeightAsBuffer { get; set; }</code></pre>
  473. </div>
  474. <h5 class="propertyValue">Property Value</h5>
  475. <table class="table table-bordered table-condensed">
  476. <thead>
  477. <tr>
  478. <th>Type</th>
  479. <th>Description</th>
  480. </tr>
  481. </thead>
  482. <tbody>
  483. <tr>
  484. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  485. <td></td>
  486. </tr>
  487. </tbody>
  488. </table>
  489. <span class="small pull-right mobile-hide">
  490. <span class="divider">|</span>
  491. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_IsMouseDisabled.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.IsMouseDisabled%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  492. </span>
  493. <span class="small pull-right mobile-hide">
  494. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L226">View Source</a>
  495. </span>
  496. <a id="Terminal_Gui_Application_IsMouseDisabled_" data-uid="Terminal.Gui.Application.IsMouseDisabled*"></a>
  497. <h4 id="Terminal_Gui_Application_IsMouseDisabled" data-uid="Terminal.Gui.Application.IsMouseDisabled">IsMouseDisabled</h4>
  498. <div class="markdown level1 summary">Disable or enable the mouse. The mouse is enabled by default.</div>
  499. <div class="markdown level1 conceptual"></div>
  500. <h5 class="declaration">Declaration</h5>
  501. <div class="codewrapper">
  502. <pre><code class="lang-csharp hljs">public static bool IsMouseDisabled { get; set; }</code></pre>
  503. </div>
  504. <h5 class="propertyValue">Property Value</h5>
  505. <table class="table table-bordered table-condensed">
  506. <thead>
  507. <tr>
  508. <th>Type</th>
  509. <th>Description</th>
  510. </tr>
  511. </thead>
  512. <tbody>
  513. <tr>
  514. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  515. <td></td>
  516. </tr>
  517. </tbody>
  518. </table>
  519. <span class="small pull-right mobile-hide">
  520. <span class="divider">|</span>
  521. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MainLoop.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MainLoop%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  522. </span>
  523. <span class="small pull-right mobile-hide">
  524. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L221">View Source</a>
  525. </span>
  526. <a id="Terminal_Gui_Application_MainLoop_" data-uid="Terminal.Gui.Application.MainLoop*"></a>
  527. <h4 id="Terminal_Gui_Application_MainLoop" data-uid="Terminal.Gui.Application.MainLoop">MainLoop</h4>
  528. <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>
  529. <div class="markdown level1 conceptual"></div>
  530. <h5 class="declaration">Declaration</h5>
  531. <div class="codewrapper">
  532. <pre><code class="lang-csharp hljs">public static MainLoop MainLoop { get; }</code></pre>
  533. </div>
  534. <h5 class="propertyValue">Property Value</h5>
  535. <table class="table table-bordered table-condensed">
  536. <thead>
  537. <tr>
  538. <th>Type</th>
  539. <th>Description</th>
  540. </tr>
  541. </thead>
  542. <tbody>
  543. <tr>
  544. <td><a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a></td>
  545. <td>The main loop.</td>
  546. </tr>
  547. </tbody>
  548. </table>
  549. <span class="small pull-right mobile-hide">
  550. <span class="divider">|</span>
  551. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MdiChildes.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MdiChildes%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  552. </span>
  553. <span class="small pull-right mobile-hide">
  554. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L70">View Source</a>
  555. </span>
  556. <a id="Terminal_Gui_Application_MdiChildes_" data-uid="Terminal.Gui.Application.MdiChildes*"></a>
  557. <h4 id="Terminal_Gui_Application_MdiChildes" data-uid="Terminal.Gui.Application.MdiChildes">MdiChildes</h4>
  558. <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>
  559. <div class="markdown level1 conceptual"></div>
  560. <h5 class="declaration">Declaration</h5>
  561. <div class="codewrapper">
  562. <pre><code class="lang-csharp hljs">public static List&lt;Toplevel&gt; MdiChildes { get; }</code></pre>
  563. </div>
  564. <h5 class="propertyValue">Property Value</h5>
  565. <table class="table table-bordered table-condensed">
  566. <thead>
  567. <tr>
  568. <th>Type</th>
  569. <th>Description</th>
  570. </tr>
  571. </thead>
  572. <tbody>
  573. <tr>
  574. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>&gt;</td>
  575. <td></td>
  576. </tr>
  577. </tbody>
  578. </table>
  579. <span class="small pull-right mobile-hide">
  580. <span class="divider">|</span>
  581. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MdiTop.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MdiTop%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  582. </span>
  583. <span class="small pull-right mobile-hide">
  584. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L87">View Source</a>
  585. </span>
  586. <a id="Terminal_Gui_Application_MdiTop_" data-uid="Terminal.Gui.Application.MdiTop*"></a>
  587. <h4 id="Terminal_Gui_Application_MdiTop" data-uid="Terminal.Gui.Application.MdiTop">MdiTop</h4>
  588. <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>
  589. <div class="markdown level1 conceptual"></div>
  590. <h5 class="declaration">Declaration</h5>
  591. <div class="codewrapper">
  592. <pre><code class="lang-csharp hljs">public static Toplevel MdiTop { get; }</code></pre>
  593. </div>
  594. <h5 class="propertyValue">Property Value</h5>
  595. <table class="table table-bordered table-condensed">
  596. <thead>
  597. <tr>
  598. <th>Type</th>
  599. <th>Description</th>
  600. </tr>
  601. </thead>
  602. <tbody>
  603. <tr>
  604. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  605. <td></td>
  606. </tr>
  607. </tbody>
  608. </table>
  609. <span class="small pull-right mobile-hide">
  610. <span class="divider">|</span>
  611. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MouseGrabView.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MouseGrabView%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  612. </span>
  613. <span class="small pull-right mobile-hide">
  614. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L693">View Source</a>
  615. </span>
  616. <a id="Terminal_Gui_Application_MouseGrabView_" data-uid="Terminal.Gui.Application.MouseGrabView*"></a>
  617. <h4 id="Terminal_Gui_Application_MouseGrabView" data-uid="Terminal.Gui.Application.MouseGrabView">MouseGrabView</h4>
  618. <div class="markdown level1 summary">The view that grabbed the mouse, to where will be routed all the mouse events.</div>
  619. <div class="markdown level1 conceptual"></div>
  620. <h5 class="declaration">Declaration</h5>
  621. <div class="codewrapper">
  622. <pre><code class="lang-csharp hljs">public static View MouseGrabView { get; }</code></pre>
  623. </div>
  624. <h5 class="propertyValue">Property Value</h5>
  625. <table class="table table-bordered table-condensed">
  626. <thead>
  627. <tr>
  628. <th>Type</th>
  629. <th>Description</th>
  630. </tr>
  631. </thead>
  632. <tbody>
  633. <tr>
  634. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  635. <td></td>
  636. </tr>
  637. </tbody>
  638. </table>
  639. <span class="small pull-right mobile-hide">
  640. <span class="divider">|</span>
  641. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_QuitKey.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.QuitKey%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  642. </span>
  643. <span class="small pull-right mobile-hide">
  644. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L191">View Source</a>
  645. </span>
  646. <a id="Terminal_Gui_Application_QuitKey_" data-uid="Terminal.Gui.Application.QuitKey*"></a>
  647. <h4 id="Terminal_Gui_Application_QuitKey" data-uid="Terminal.Gui.Application.QuitKey">QuitKey</h4>
  648. <div class="markdown level1 summary">Gets or sets the key to quit the application.</div>
  649. <div class="markdown level1 conceptual"></div>
  650. <h5 class="declaration">Declaration</h5>
  651. <div class="codewrapper">
  652. <pre><code class="lang-csharp hljs">public static Key QuitKey { get; set; }</code></pre>
  653. </div>
  654. <h5 class="propertyValue">Property Value</h5>
  655. <table class="table table-bordered table-condensed">
  656. <thead>
  657. <tr>
  658. <th>Type</th>
  659. <th>Description</th>
  660. </tr>
  661. </thead>
  662. <tbody>
  663. <tr>
  664. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  665. <td></td>
  666. </tr>
  667. </tbody>
  668. </table>
  669. <span class="small pull-right mobile-hide">
  670. <span class="divider">|</span>
  671. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_SupportedCultures.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.SupportedCultures%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  672. </span>
  673. <span class="small pull-right mobile-hide">
  674. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L207">View Source</a>
  675. </span>
  676. <a id="Terminal_Gui_Application_SupportedCultures_" data-uid="Terminal.Gui.Application.SupportedCultures*"></a>
  677. <h4 id="Terminal_Gui_Application_SupportedCultures" data-uid="Terminal.Gui.Application.SupportedCultures">SupportedCultures</h4>
  678. <div class="markdown level1 summary">Gets all supported cultures by the application without the invariant language.</div>
  679. <div class="markdown level1 conceptual"></div>
  680. <h5 class="declaration">Declaration</h5>
  681. <div class="codewrapper">
  682. <pre><code class="lang-csharp hljs">public static List&lt;CultureInfo&gt; SupportedCultures { get; }</code></pre>
  683. </div>
  684. <h5 class="propertyValue">Property Value</h5>
  685. <table class="table table-bordered table-condensed">
  686. <thead>
  687. <tr>
  688. <th>Type</th>
  689. <th>Description</th>
  690. </tr>
  691. </thead>
  692. <tbody>
  693. <tr>
  694. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo">CultureInfo</a>&gt;</td>
  695. <td></td>
  696. </tr>
  697. </tbody>
  698. </table>
  699. <span class="small pull-right mobile-hide">
  700. <span class="divider">|</span>
  701. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Top.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Top%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  702. </span>
  703. <span class="small pull-right mobile-hide">
  704. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L100">View Source</a>
  705. </span>
  706. <a id="Terminal_Gui_Application_Top_" data-uid="Terminal.Gui.Application.Top*"></a>
  707. <h4 id="Terminal_Gui_Application_Top" data-uid="Terminal.Gui.Application.Top">Top</h4>
  708. <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>
  709. <div class="markdown level1 conceptual"></div>
  710. <h5 class="declaration">Declaration</h5>
  711. <div class="codewrapper">
  712. <pre><code class="lang-csharp hljs">public static Toplevel Top { get; }</code></pre>
  713. </div>
  714. <h5 class="propertyValue">Property Value</h5>
  715. <table class="table table-bordered table-condensed">
  716. <thead>
  717. <tr>
  718. <th>Type</th>
  719. <th>Description</th>
  720. </tr>
  721. </thead>
  722. <tbody>
  723. <tr>
  724. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  725. <td>The top.</td>
  726. </tr>
  727. </tbody>
  728. </table>
  729. <span class="small pull-right mobile-hide">
  730. <span class="divider">|</span>
  731. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UseSystemConsole.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.UseSystemConsole%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  732. </span>
  733. <span class="small pull-right mobile-hide">
  734. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L319">View Source</a>
  735. </span>
  736. <a id="Terminal_Gui_Application_UseSystemConsole_" data-uid="Terminal.Gui.Application.UseSystemConsole*"></a>
  737. <h4 id="Terminal_Gui_Application_UseSystemConsole" data-uid="Terminal.Gui.Application.UseSystemConsole">UseSystemConsole</h4>
  738. <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>
  739. <div class="markdown level1 conceptual"></div>
  740. <h5 class="declaration">Declaration</h5>
  741. <div class="codewrapper">
  742. <pre><code class="lang-csharp hljs">public static bool UseSystemConsole { get; set; }</code></pre>
  743. </div>
  744. <h5 class="propertyValue">Property Value</h5>
  745. <table class="table table-bordered table-condensed">
  746. <thead>
  747. <tr>
  748. <th>Type</th>
  749. <th>Description</th>
  750. </tr>
  751. </thead>
  752. <tbody>
  753. <tr>
  754. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  755. <td></td>
  756. </tr>
  757. </tbody>
  758. </table>
  759. <span class="small pull-right mobile-hide">
  760. <span class="divider">|</span>
  761. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_WantContinuousButtonPressedView.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.WantContinuousButtonPressedView%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  762. </span>
  763. <span class="small pull-right mobile-hide">
  764. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L111">View Source</a>
  765. </span>
  766. <a id="Terminal_Gui_Application_WantContinuousButtonPressedView_" data-uid="Terminal.Gui.Application.WantContinuousButtonPressedView*"></a>
  767. <h4 id="Terminal_Gui_Application_WantContinuousButtonPressedView" data-uid="Terminal.Gui.Application.WantContinuousButtonPressedView">WantContinuousButtonPressedView</h4>
  768. <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>
  769. <div class="markdown level1 conceptual"></div>
  770. <h5 class="declaration">Declaration</h5>
  771. <div class="codewrapper">
  772. <pre><code class="lang-csharp hljs">public static View WantContinuousButtonPressedView { get; }</code></pre>
  773. </div>
  774. <h5 class="propertyValue">Property Value</h5>
  775. <table class="table table-bordered table-condensed">
  776. <thead>
  777. <tr>
  778. <th>Type</th>
  779. <th>Description</th>
  780. </tr>
  781. </thead>
  782. <tbody>
  783. <tr>
  784. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  785. <td></td>
  786. </tr>
  787. </tbody>
  788. </table>
  789. <h3 id="methods">Methods
  790. </h3>
  791. <span class="small pull-right mobile-hide">
  792. <span class="divider">|</span>
  793. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Begin(Terminal.Gui.Toplevel)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  794. </span>
  795. <span class="small pull-right mobile-hide">
  796. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L960">View Source</a>
  797. </span>
  798. <a id="Terminal_Gui_Application_Begin_" data-uid="Terminal.Gui.Application.Begin*"></a>
  799. <h4 id="Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Application.Begin(Terminal.Gui.Toplevel)">Begin(Toplevel)</h4>
  800. <div class="markdown level1 summary">Building block API: Prepares the provided <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> for execution.</div>
  801. <div class="markdown level1 conceptual"></div>
  802. <h5 class="declaration">Declaration</h5>
  803. <div class="codewrapper">
  804. <pre><code class="lang-csharp hljs">public static Application.RunState Begin(Toplevel toplevel)</code></pre>
  805. </div>
  806. <h5 class="parameters">Parameters</h5>
  807. <table class="table table-bordered table-condensed">
  808. <thead>
  809. <tr>
  810. <th>Type</th>
  811. <th>Name</th>
  812. <th>Description</th>
  813. </tr>
  814. </thead>
  815. <tbody>
  816. <tr>
  817. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  818. <td><span class="parametername">toplevel</span></td>
  819. <td>The <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> to prepare execution for.</td>
  820. </tr>
  821. </tbody>
  822. </table>
  823. <h5 class="returns">Returns</h5>
  824. <table class="table table-bordered table-condensed">
  825. <thead>
  826. <tr>
  827. <th>Type</th>
  828. <th>Description</th>
  829. </tr>
  830. </thead>
  831. <tbody>
  832. <tr>
  833. <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
  834. <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>
  835. </tr>
  836. </tbody>
  837. </table>
  838. <h5 id="Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel__remarks">Remarks</h5>
  839. <div class="markdown level1 remarks">This method prepares the provided toplevel for running with the focus,
  840. it adds this to the list of toplevels, sets up the mainloop to process the
  841. event, lays out the subviews, focuses the first element, and draws the
  842. toplevel in the screen. This is usually followed by executing
  843. 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
  844. undo these changes.</div>
  845. <span class="small pull-right mobile-hide">
  846. <span class="divider">|</span>
  847. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_DoEvents.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.DoEvents%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  848. </span>
  849. <span class="small pull-right mobile-hide">
  850. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1689">View Source</a>
  851. </span>
  852. <a id="Terminal_Gui_Application_DoEvents_" data-uid="Terminal.Gui.Application.DoEvents*"></a>
  853. <h4 id="Terminal_Gui_Application_DoEvents" data-uid="Terminal.Gui.Application.DoEvents">DoEvents()</h4>
  854. <div class="markdown level1 summary">Wakes up the mainloop that might be waiting on input, must be thread safe.</div>
  855. <div class="markdown level1 conceptual"></div>
  856. <h5 class="declaration">Declaration</h5>
  857. <div class="codewrapper">
  858. <pre><code class="lang-csharp hljs">public static void DoEvents()</code></pre>
  859. </div>
  860. <span class="small pull-right mobile-hide">
  861. <span class="divider">|</span>
  862. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.End(Terminal.Gui.Application.RunState)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  863. </span>
  864. <span class="small pull-right mobile-hide">
  865. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1056">View Source</a>
  866. </span>
  867. <a id="Terminal_Gui_Application_End_" data-uid="Terminal.Gui.Application.End*"></a>
  868. <h4 id="Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_" data-uid="Terminal.Gui.Application.End(Terminal.Gui.Application.RunState)">End(RunState)</h4>
  869. <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>
  870. <div class="markdown level1 conceptual"></div>
  871. <h5 class="declaration">Declaration</h5>
  872. <div class="codewrapper">
  873. <pre><code class="lang-csharp hljs">public static void End(Application.RunState runState)</code></pre>
  874. </div>
  875. <h5 class="parameters">Parameters</h5>
  876. <table class="table table-bordered table-condensed">
  877. <thead>
  878. <tr>
  879. <th>Type</th>
  880. <th>Name</th>
  881. <th>Description</th>
  882. </tr>
  883. </thead>
  884. <tbody>
  885. <tr>
  886. <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
  887. <td><span class="parametername">runState</span></td>
  888. <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>
  889. </tr>
  890. </tbody>
  891. </table>
  892. <span class="small pull-right mobile-hide">
  893. <span class="divider">|</span>
  894. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_EnsuresTopOnFront.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.EnsuresTopOnFront%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  895. </span>
  896. <span class="small pull-right mobile-hide">
  897. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1697">View Source</a>
  898. </span>
  899. <a id="Terminal_Gui_Application_EnsuresTopOnFront_" data-uid="Terminal.Gui.Application.EnsuresTopOnFront*"></a>
  900. <h4 id="Terminal_Gui_Application_EnsuresTopOnFront" data-uid="Terminal.Gui.Application.EnsuresTopOnFront">EnsuresTopOnFront()</h4>
  901. <div class="markdown level1 summary">Ensures that the superview of the most focused view is on front.</div>
  902. <div class="markdown level1 conceptual"></div>
  903. <h5 class="declaration">Declaration</h5>
  904. <div class="codewrapper">
  905. <pre><code class="lang-csharp hljs">public static void EnsuresTopOnFront()</code></pre>
  906. </div>
  907. <span class="small pull-right mobile-hide">
  908. <span class="divider">|</span>
  909. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_GrabMouse_Terminal_Gui_View_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.GrabMouse(Terminal.Gui.View)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  910. </span>
  911. <span class="small pull-right mobile-hide">
  912. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L720">View Source</a>
  913. </span>
  914. <a id="Terminal_Gui_Application_GrabMouse_" data-uid="Terminal.Gui.Application.GrabMouse*"></a>
  915. <h4 id="Terminal_Gui_Application_GrabMouse_Terminal_Gui_View_" data-uid="Terminal.Gui.Application.GrabMouse(Terminal.Gui.View)">GrabMouse(View)</h4>
  916. <div class="markdown level1 summary">Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called.</div>
  917. <div class="markdown level1 conceptual"></div>
  918. <h5 class="declaration">Declaration</h5>
  919. <div class="codewrapper">
  920. <pre><code class="lang-csharp hljs">public static void GrabMouse(View view)</code></pre>
  921. </div>
  922. <h5 class="parameters">Parameters</h5>
  923. <table class="table table-bordered table-condensed">
  924. <thead>
  925. <tr>
  926. <th>Type</th>
  927. <th>Name</th>
  928. <th>Description</th>
  929. </tr>
  930. </thead>
  931. <tbody>
  932. <tr>
  933. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  934. <td><span class="parametername">view</span></td>
  935. <td>View that will receive all mouse events until UngrabMouse is invoked.</td>
  936. </tr>
  937. </tbody>
  938. </table>
  939. <span class="small pull-right mobile-hide">
  940. <span class="divider">|</span>
  941. <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&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Init(Terminal.Gui.ConsoleDriver%2CTerminal.Gui.IMainLoopDriver)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  942. </span>
  943. <span class="small pull-right mobile-hide">
  944. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L351">View Source</a>
  945. </span>
  946. <a id="Terminal_Gui_Application_Init_" data-uid="Terminal.Gui.Application.Init*"></a>
  947. <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>
  948. <div class="markdown level1 summary">Initializes a new instance of <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a> Application.</div>
  949. <div class="markdown level1 conceptual"></div>
  950. <h5 class="declaration">Declaration</h5>
  951. <div class="codewrapper">
  952. <pre><code class="lang-csharp hljs">public static void Init(ConsoleDriver driver = null, IMainLoopDriver mainLoopDriver = null)</code></pre>
  953. </div>
  954. <h5 class="parameters">Parameters</h5>
  955. <table class="table table-bordered table-condensed">
  956. <thead>
  957. <tr>
  958. <th>Type</th>
  959. <th>Name</th>
  960. <th>Description</th>
  961. </tr>
  962. </thead>
  963. <tbody>
  964. <tr>
  965. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  966. <td><span class="parametername">driver</span></td>
  967. <td>The <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> to use. If not specified the default driver for the
  968. 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>
  969. </tr>
  970. <tr>
  971. <td><a class="xref" href="Terminal.Gui.IMainLoopDriver.html">IMainLoopDriver</a></td>
  972. <td><span class="parametername">mainLoopDriver</span></td>
  973. <td>Specifies the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> to use.
  974. 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>
  975. </tr>
  976. </tbody>
  977. </table>
  978. <span class="small pull-right mobile-hide">
  979. <span class="divider">|</span>
  980. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MakeCenteredRect_Terminal_Gui_Size_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MakeCenteredRect(Terminal.Gui.Size)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  981. </span>
  982. <span class="small pull-right mobile-hide">
  983. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L268">View Source</a>
  984. </span>
  985. <a id="Terminal_Gui_Application_MakeCenteredRect_" data-uid="Terminal.Gui.Application.MakeCenteredRect*"></a>
  986. <h4 id="Terminal_Gui_Application_MakeCenteredRect_Terminal_Gui_Size_" data-uid="Terminal.Gui.Application.MakeCenteredRect(Terminal.Gui.Size)">MakeCenteredRect(Size)</h4>
  987. <div class="markdown level1 summary">Returns a rectangle that is centered in the screen for the provided size.</div>
  988. <div class="markdown level1 conceptual"></div>
  989. <h5 class="declaration">Declaration</h5>
  990. <div class="codewrapper">
  991. <pre><code class="lang-csharp hljs">public static Rect MakeCenteredRect(Size size)</code></pre>
  992. </div>
  993. <h5 class="parameters">Parameters</h5>
  994. <table class="table table-bordered table-condensed">
  995. <thead>
  996. <tr>
  997. <th>Type</th>
  998. <th>Name</th>
  999. <th>Description</th>
  1000. </tr>
  1001. </thead>
  1002. <tbody>
  1003. <tr>
  1004. <td><a class="xref" href="Terminal.Gui.Size.html">Size</a></td>
  1005. <td><span class="parametername">size</span></td>
  1006. <td>Size for the rectangle.</td>
  1007. </tr>
  1008. </tbody>
  1009. </table>
  1010. <h5 class="returns">Returns</h5>
  1011. <table class="table table-bordered table-condensed">
  1012. <thead>
  1013. <tr>
  1014. <th>Type</th>
  1015. <th>Description</th>
  1016. </tr>
  1017. </thead>
  1018. <tbody>
  1019. <tr>
  1020. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  1021. <td>The centered rect.</td>
  1022. </tr>
  1023. </tbody>
  1024. </table>
  1025. <span class="small pull-right mobile-hide">
  1026. <span class="divider">|</span>
  1027. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MoveNext.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MoveNext%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1028. </span>
  1029. <span class="small pull-right mobile-hide">
  1030. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1627">View Source</a>
  1031. </span>
  1032. <a id="Terminal_Gui_Application_MoveNext_" data-uid="Terminal.Gui.Application.MoveNext*"></a>
  1033. <h4 id="Terminal_Gui_Application_MoveNext" data-uid="Terminal.Gui.Application.MoveNext">MoveNext()</h4>
  1034. <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>
  1035. <div class="markdown level1 conceptual"></div>
  1036. <h5 class="declaration">Declaration</h5>
  1037. <div class="codewrapper">
  1038. <pre><code class="lang-csharp hljs">public static void MoveNext()</code></pre>
  1039. </div>
  1040. <span class="small pull-right mobile-hide">
  1041. <span class="divider">|</span>
  1042. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_MovePrevious.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.MovePrevious%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1043. </span>
  1044. <span class="small pull-right mobile-hide">
  1045. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1650">View Source</a>
  1046. </span>
  1047. <a id="Terminal_Gui_Application_MovePrevious_" data-uid="Terminal.Gui.Application.MovePrevious*"></a>
  1048. <h4 id="Terminal_Gui_Application_MovePrevious" data-uid="Terminal.Gui.Application.MovePrevious">MovePrevious()</h4>
  1049. <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>
  1050. <div class="markdown level1 conceptual"></div>
  1051. <h5 class="declaration">Declaration</h5>
  1052. <div class="codewrapper">
  1053. <pre><code class="lang-csharp hljs">public static void MovePrevious()</code></pre>
  1054. </div>
  1055. <span class="small pull-right mobile-hide">
  1056. <span class="divider">|</span>
  1057. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Refresh.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Refresh%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1058. </span>
  1059. <span class="small pull-right mobile-hide">
  1060. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1168">View Source</a>
  1061. </span>
  1062. <a id="Terminal_Gui_Application_Refresh_" data-uid="Terminal.Gui.Application.Refresh*"></a>
  1063. <h4 id="Terminal_Gui_Application_Refresh" data-uid="Terminal.Gui.Application.Refresh">Refresh()</h4>
  1064. <div class="markdown level1 summary">Triggers a refresh of the entire display.</div>
  1065. <div class="markdown level1 conceptual"></div>
  1066. <h5 class="declaration">Declaration</h5>
  1067. <div class="codewrapper">
  1068. <pre><code class="lang-csharp hljs">public static void Refresh()</code></pre>
  1069. </div>
  1070. <span class="small pull-right mobile-hide">
  1071. <span class="divider">|</span>
  1072. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.RequestStop(Terminal.Gui.Toplevel)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1073. </span>
  1074. <span class="small pull-right mobile-hide">
  1075. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1490">View Source</a>
  1076. </span>
  1077. <a id="Terminal_Gui_Application_RequestStop_" data-uid="Terminal.Gui.Application.RequestStop*"></a>
  1078. <h4 id="Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Application.RequestStop(Terminal.Gui.Toplevel)">RequestStop(Toplevel)</h4>
  1079. <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>
  1080. <div class="markdown level1 conceptual"></div>
  1081. <h5 class="declaration">Declaration</h5>
  1082. <div class="codewrapper">
  1083. <pre><code class="lang-csharp hljs">public static void RequestStop(Toplevel top = null)</code></pre>
  1084. </div>
  1085. <h5 class="parameters">Parameters</h5>
  1086. <table class="table table-bordered table-condensed">
  1087. <thead>
  1088. <tr>
  1089. <th>Type</th>
  1090. <th>Name</th>
  1091. <th>Description</th>
  1092. </tr>
  1093. </thead>
  1094. <tbody>
  1095. <tr>
  1096. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  1097. <td><span class="parametername">top</span></td>
  1098. <td>The toplevel to request stop.</td>
  1099. </tr>
  1100. </tbody>
  1101. </table>
  1102. <h5 id="Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel__remarks">Remarks</h5>
  1103. <div class="markdown level1 remarks"><p>
  1104. This will cause <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func&lt;Exception, bool&gt;)</a> to return.
  1105. </p>
  1106. <p>
  1107. 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.
  1108. </p></div>
  1109. <span class="small pull-right mobile-hide">
  1110. <span class="divider">|</span>
  1111. <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&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Run(System.Func%7BSystem.Exception%2CSystem.Boolean%7D)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1112. </span>
  1113. <span class="small pull-right mobile-hide">
  1114. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1367">View Source</a>
  1115. </span>
  1116. <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
  1117. <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&lt;Exception, bool&gt;)</h4>
  1118. <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&lt;Exception, bool&gt;)</a> with the value of <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Top">Top</a>.</div>
  1119. <div class="markdown level1 conceptual"></div>
  1120. <h5 class="declaration">Declaration</h5>
  1121. <div class="codewrapper">
  1122. <pre><code class="lang-csharp hljs">public static void Run(Func&lt;Exception, bool&gt; errorHandler = null)</code></pre>
  1123. </div>
  1124. <h5 class="parameters">Parameters</h5>
  1125. <table class="table table-bordered table-condensed">
  1126. <thead>
  1127. <tr>
  1128. <th>Type</th>
  1129. <th>Name</th>
  1130. <th>Description</th>
  1131. </tr>
  1132. </thead>
  1133. <tbody>
  1134. <tr>
  1135. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<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>&gt;</td>
  1136. <td><span class="parametername">errorHandler</span></td>
  1137. <td></td>
  1138. </tr>
  1139. </tbody>
  1140. </table>
  1141. <h5 id="Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean___remarks">Remarks</h5>
  1142. <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&lt;Exception, bool&gt;)</a> for more details.</div>
  1143. <span class="small pull-right mobile-hide">
  1144. <span class="divider">|</span>
  1145. <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&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Run(Terminal.Gui.Toplevel%2CSystem.Func%7BSystem.Exception%2CSystem.Boolean%7D)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1146. </span>
  1147. <span class="small pull-right mobile-hide">
  1148. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1449">View Source</a>
  1149. </span>
  1150. <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
  1151. <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&lt;Exception, bool&gt;)</h4>
  1152. <div class="markdown level1 summary">Runs the main loop on the given <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> container.</div>
  1153. <div class="markdown level1 conceptual"></div>
  1154. <h5 class="declaration">Declaration</h5>
  1155. <div class="codewrapper">
  1156. <pre><code class="lang-csharp hljs">public static void Run(Toplevel view, Func&lt;Exception, bool&gt; errorHandler = null)</code></pre>
  1157. </div>
  1158. <h5 class="parameters">Parameters</h5>
  1159. <table class="table table-bordered table-condensed">
  1160. <thead>
  1161. <tr>
  1162. <th>Type</th>
  1163. <th>Name</th>
  1164. <th>Description</th>
  1165. </tr>
  1166. </thead>
  1167. <tbody>
  1168. <tr>
  1169. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  1170. <td><span class="parametername">view</span></td>
  1171. <td>The <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> to run modally.</td>
  1172. </tr>
  1173. <tr>
  1174. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<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>&gt;</td>
  1175. <td><span class="parametername">errorHandler</span></td>
  1176. <td>RELEASE builds only: Handler for any unhandled exceptions (resumes when returns true, rethrows when null).</td>
  1177. </tr>
  1178. </tbody>
  1179. </table>
  1180. <h5 id="Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean___remarks">Remarks</h5>
  1181. <div class="markdown level1 remarks"><p>
  1182. This method is used to start processing events
  1183. for the main application, but it is also used to
  1184. 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.
  1185. </p>
  1186. <p>
  1187. 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&lt;Exception, bool&gt;)</a> stop execution, call <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a>.
  1188. </p>
  1189. <p>
  1190. 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&lt;Exception, bool&gt;)</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>,
  1191. and then calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(RunState)</a>.
  1192. </p>
  1193. <p>
  1194. Alternatively, to have a program control the main loop and
  1195. 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
  1196. 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
  1197. 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
  1198. then return control immediately.
  1199. </p>
  1200. <p>
  1201. 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.
  1202. Otheriwse, if <code class="paramref">errorHandler</code> will be called. If <code class="paramref">errorHandler</code>
  1203. 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
  1204. this method will exit.
  1205. </p></div>
  1206. <span class="small pull-right mobile-hide">
  1207. <span class="divider">|</span>
  1208. <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&amp;value=---%0Auid%3A%20Terminal.Gui.Application.RunLoop(Terminal.Gui.Application.RunState%2CSystem.Boolean)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1209. </span>
  1210. <span class="small pull-right mobile-hide">
  1211. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1194">View Source</a>
  1212. </span>
  1213. <a id="Terminal_Gui_Application_RunLoop_" data-uid="Terminal.Gui.Application.RunLoop*"></a>
  1214. <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>
  1215. <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>
  1216. <div class="markdown level1 conceptual"></div>
  1217. <h5 class="declaration">Declaration</h5>
  1218. <div class="codewrapper">
  1219. <pre><code class="lang-csharp hljs">public static void RunLoop(Application.RunState state, bool wait = true)</code></pre>
  1220. </div>
  1221. <h5 class="parameters">Parameters</h5>
  1222. <table class="table table-bordered table-condensed">
  1223. <thead>
  1224. <tr>
  1225. <th>Type</th>
  1226. <th>Name</th>
  1227. <th>Description</th>
  1228. </tr>
  1229. </thead>
  1230. <tbody>
  1231. <tr>
  1232. <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
  1233. <td><span class="parametername">state</span></td>
  1234. <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>
  1235. </tr>
  1236. <tr>
  1237. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1238. <td><span class="parametername">wait</span></td>
  1239. <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,
  1240. if set to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>, a single iteration will execute.</td>
  1241. </tr>
  1242. </tbody>
  1243. </table>
  1244. <h5 id="Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean__remarks">Remarks</h5>
  1245. <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>
  1246. <span class="small pull-right mobile-hide">
  1247. <span class="divider">|</span>
  1248. <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&amp;value=---%0Auid%3A%20Terminal.Gui.Application.RunMainLoopIteration(Terminal.Gui.Application.RunState%40%2CSystem.Boolean%2CSystem.Boolean%40)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1249. </span>
  1250. <span class="small pull-right mobile-hide">
  1251. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1218">View Source</a>
  1252. </span>
  1253. <a id="Terminal_Gui_Application_RunMainLoopIteration_" data-uid="Terminal.Gui.Application.RunMainLoopIteration*"></a>
  1254. <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>
  1255. <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>
  1256. <div class="markdown level1 conceptual"></div>
  1257. <h5 class="declaration">Declaration</h5>
  1258. <div class="codewrapper">
  1259. <pre><code class="lang-csharp hljs">public static void RunMainLoopIteration(ref Application.RunState state, bool wait, ref bool firstIteration)</code></pre>
  1260. </div>
  1261. <h5 class="parameters">Parameters</h5>
  1262. <table class="table table-bordered table-condensed">
  1263. <thead>
  1264. <tr>
  1265. <th>Type</th>
  1266. <th>Name</th>
  1267. <th>Description</th>
  1268. </tr>
  1269. </thead>
  1270. <tbody>
  1271. <tr>
  1272. <td><a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a></td>
  1273. <td><span class="parametername">state</span></td>
  1274. <td>The state returned by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a>.</td>
  1275. </tr>
  1276. <tr>
  1277. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1278. <td><span class="parametername">wait</span></td>
  1279. <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>
  1280. will return after a single iteration.</td>
  1281. </tr>
  1282. <tr>
  1283. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1284. <td><span class="parametername">firstIteration</span></td>
  1285. <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,
  1286. 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>
  1287. </tr>
  1288. </tbody>
  1289. </table>
  1290. <span class="small pull-right mobile-hide">
  1291. <span class="divider">|</span>
  1292. <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&amp;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&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1293. </span>
  1294. <span class="small pull-right mobile-hide">
  1295. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1392">View Source</a>
  1296. </span>
  1297. <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
  1298. <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&lt;T&gt;(Func&lt;Exception, bool&gt;, ConsoleDriver, IMainLoopDriver)</h4>
  1299. <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&lt;Exception, bool&gt;)</a>
  1300. with a new instance of the specified <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>-derived class.
  1301. <p>
  1302. 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.
  1303. </p>
  1304. <p>
  1305. <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&gt; has
  1306. returned) to ensure resources are cleaned up and terminal settings restored.
  1307. </p></div>
  1308. <div class="markdown level1 conceptual"></div>
  1309. <h5 class="declaration">Declaration</h5>
  1310. <div class="codewrapper">
  1311. <pre><code class="lang-csharp hljs">public static void Run&lt;T&gt;(Func&lt;Exception, bool&gt; errorHandler = null, ConsoleDriver driver = null, IMainLoopDriver mainLoopDriver = null) where T : Toplevel, new()</code></pre>
  1312. </div>
  1313. <h5 class="parameters">Parameters</h5>
  1314. <table class="table table-bordered table-condensed">
  1315. <thead>
  1316. <tr>
  1317. <th>Type</th>
  1318. <th>Name</th>
  1319. <th>Description</th>
  1320. </tr>
  1321. </thead>
  1322. <tbody>
  1323. <tr>
  1324. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<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>&gt;</td>
  1325. <td><span class="parametername">errorHandler</span></td>
  1326. <td></td>
  1327. </tr>
  1328. <tr>
  1329. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  1330. <td><span class="parametername">driver</span></td>
  1331. <td>The <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> to use. If not specified the default driver for the
  1332. 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>).
  1333. 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>
  1334. </tr>
  1335. <tr>
  1336. <td><a class="xref" href="Terminal.Gui.IMainLoopDriver.html">IMainLoopDriver</a></td>
  1337. <td><span class="parametername">mainLoopDriver</span></td>
  1338. <td>Specifies the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MainLoop">MainLoop</a> to use.</td>
  1339. </tr>
  1340. </tbody>
  1341. </table>
  1342. <h5 class="typeParameters">Type Parameters</h5>
  1343. <table class="table table-bordered table-condensed">
  1344. <thead>
  1345. <tr>
  1346. <th>Name</th>
  1347. <th>Description</th>
  1348. </tr>
  1349. </thead>
  1350. <tbody>
  1351. <tr>
  1352. <td><span class="parametername">T</span></td>
  1353. <td></td>
  1354. </tr>
  1355. </tbody>
  1356. </table>
  1357. <h5 id="Terminal_Gui_Application_Run__1_System_Func_System_Exception_System_Boolean__Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver__remarks">Remarks</h5>
  1358. <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&lt;Exception, bool&gt;)</a> for more details.</div>
  1359. <span class="small pull-right mobile-hide">
  1360. <span class="divider">|</span>
  1361. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_Shutdown.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.Shutdown%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1362. </span>
  1363. <span class="small pull-right mobile-hide">
  1364. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L1113">View Source</a>
  1365. </span>
  1366. <a id="Terminal_Gui_Application_Shutdown_" data-uid="Terminal.Gui.Application.Shutdown*"></a>
  1367. <h4 id="Terminal_Gui_Application_Shutdown" data-uid="Terminal.Gui.Application.Shutdown">Shutdown()</h4>
  1368. <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>
  1369. <div class="markdown level1 conceptual"></div>
  1370. <h5 class="declaration">Declaration</h5>
  1371. <div class="codewrapper">
  1372. <pre><code class="lang-csharp hljs">public static void Shutdown()</code></pre>
  1373. </div>
  1374. <h5 id="Terminal_Gui_Application_Shutdown_remarks">Remarks</h5>
  1375. <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&lt;Exception, bool&gt;)</a>
  1376. to ensure all resources are cleaned up (Disposed) and terminal settings are restored.</div>
  1377. <span class="small pull-right mobile-hide">
  1378. <span class="divider">|</span>
  1379. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UngrabMouse.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.UngrabMouse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1380. </span>
  1381. <span class="small pull-right mobile-hide">
  1382. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L734">View Source</a>
  1383. </span>
  1384. <a id="Terminal_Gui_Application_UngrabMouse_" data-uid="Terminal.Gui.Application.UngrabMouse*"></a>
  1385. <h4 id="Terminal_Gui_Application_UngrabMouse" data-uid="Terminal.Gui.Application.UngrabMouse">UngrabMouse()</h4>
  1386. <div class="markdown level1 summary">Releases the mouse grab, so mouse events will be routed to the view on which the mouse is.</div>
  1387. <div class="markdown level1 conceptual"></div>
  1388. <h5 class="declaration">Declaration</h5>
  1389. <div class="codewrapper">
  1390. <pre><code class="lang-csharp hljs">public static void UngrabMouse()</code></pre>
  1391. </div>
  1392. <h3 id="events">Events
  1393. </h3>
  1394. <span class="small pull-right mobile-hide">
  1395. <span class="divider">|</span>
  1396. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_GrabbedMouse.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.GrabbedMouse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1397. </span>
  1398. <span class="small pull-right mobile-hide">
  1399. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L708">View Source</a>
  1400. </span>
  1401. <h4 id="Terminal_Gui_Application_GrabbedMouse" data-uid="Terminal.Gui.Application.GrabbedMouse">GrabbedMouse</h4>
  1402. <div class="markdown level1 summary">Event to be invoked when a view grab the mouse.</div>
  1403. <div class="markdown level1 conceptual"></div>
  1404. <h5 class="declaration">Declaration</h5>
  1405. <div class="codewrapper">
  1406. <pre><code class="lang-csharp hljs">public static event Action&lt;View&gt; GrabbedMouse</code></pre>
  1407. </div>
  1408. <h5 class="eventType">Event Type</h5>
  1409. <table class="table table-bordered table-condensed">
  1410. <thead>
  1411. <tr>
  1412. <th>Type</th>
  1413. <th>Description</th>
  1414. </tr>
  1415. </thead>
  1416. <tbody>
  1417. <tr>
  1418. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.View.html">View</a>&gt;</td>
  1419. <td></td>
  1420. </tr>
  1421. </tbody>
  1422. </table>
  1423. <span class="small pull-right mobile-hide">
  1424. <span class="divider">|</span>
  1425. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_GrabbingMouse.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.GrabbingMouse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1426. </span>
  1427. <span class="small pull-right mobile-hide">
  1428. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L698">View Source</a>
  1429. </span>
  1430. <h4 id="Terminal_Gui_Application_GrabbingMouse" data-uid="Terminal.Gui.Application.GrabbingMouse">GrabbingMouse</h4>
  1431. <div class="markdown level1 summary">Invoked when a view wants to grab the mouse; can be canceled.</div>
  1432. <div class="markdown level1 conceptual"></div>
  1433. <h5 class="declaration">Declaration</h5>
  1434. <div class="codewrapper">
  1435. <pre><code class="lang-csharp hljs">public static event Func&lt;View, bool&gt; GrabbingMouse</code></pre>
  1436. </div>
  1437. <h5 class="eventType">Event Type</h5>
  1438. <table class="table table-bordered table-condensed">
  1439. <thead>
  1440. <tr>
  1441. <th>Type</th>
  1442. <th>Description</th>
  1443. </tr>
  1444. </thead>
  1445. <tbody>
  1446. <tr>
  1447. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="Terminal.Gui.View.html">View</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>&gt;</td>
  1448. <td></td>
  1449. </tr>
  1450. </tbody>
  1451. </table>
  1452. <span class="small pull-right mobile-hide">
  1453. <span class="divider">|</span>
  1454. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_NotifyNewRunState.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.NotifyNewRunState%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1455. </span>
  1456. <span class="small pull-right mobile-hide">
  1457. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L243">View Source</a>
  1458. </span>
  1459. <h4 id="Terminal_Gui_Application_NotifyNewRunState" data-uid="Terminal.Gui.Application.NotifyNewRunState">NotifyNewRunState</h4>
  1460. <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
  1461. <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>
  1462. <div class="markdown level1 conceptual"></div>
  1463. <h5 class="declaration">Declaration</h5>
  1464. <div class="codewrapper">
  1465. <pre><code class="lang-csharp hljs">public static event Action&lt;Application.RunState&gt; NotifyNewRunState</code></pre>
  1466. </div>
  1467. <h5 class="eventType">Event Type</h5>
  1468. <table class="table table-bordered table-condensed">
  1469. <thead>
  1470. <tr>
  1471. <th>Type</th>
  1472. <th>Description</th>
  1473. </tr>
  1474. </thead>
  1475. <tbody>
  1476. <tr>
  1477. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.Application.html">Application</a>.<a class="xref" href="Terminal.Gui.Application.RunState.html">RunState</a>&gt;</td>
  1478. <td></td>
  1479. </tr>
  1480. </tbody>
  1481. </table>
  1482. <h5 id="Terminal_Gui_Application_NotifyNewRunState_remarks">Remarks</h5>
  1483. <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
  1484. <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>
  1485. and manually dispose of the <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> token when the application is done.</div>
  1486. <span class="small pull-right mobile-hide">
  1487. <span class="divider">|</span>
  1488. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_NotifyStopRunState.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.NotifyStopRunState%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1489. </span>
  1490. <span class="small pull-right mobile-hide">
  1491. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L253">View Source</a>
  1492. </span>
  1493. <h4 id="Terminal_Gui_Application_NotifyStopRunState" data-uid="Terminal.Gui.Application.NotifyStopRunState">NotifyStopRunState</h4>
  1494. <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>
  1495. <div class="markdown level1 conceptual"></div>
  1496. <h5 class="declaration">Declaration</h5>
  1497. <div class="codewrapper">
  1498. <pre><code class="lang-csharp hljs">public static event Action&lt;Toplevel&gt; NotifyStopRunState</code></pre>
  1499. </div>
  1500. <h5 class="eventType">Event Type</h5>
  1501. <table class="table table-bordered table-condensed">
  1502. <thead>
  1503. <tr>
  1504. <th>Type</th>
  1505. <th>Description</th>
  1506. </tr>
  1507. </thead>
  1508. <tbody>
  1509. <tr>
  1510. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>&gt;</td>
  1511. <td></td>
  1512. </tr>
  1513. </tbody>
  1514. </table>
  1515. <h5 id="Terminal_Gui_Application_NotifyStopRunState_remarks">Remarks</h5>
  1516. <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
  1517. <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>
  1518. and manually dispose of the <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> token when the application is done.</div>
  1519. <span class="small pull-right mobile-hide">
  1520. <span class="divider">|</span>
  1521. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UnGrabbedMouse.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.UnGrabbedMouse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1522. </span>
  1523. <span class="small pull-right mobile-hide">
  1524. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L713">View Source</a>
  1525. </span>
  1526. <h4 id="Terminal_Gui_Application_UnGrabbedMouse" data-uid="Terminal.Gui.Application.UnGrabbedMouse">UnGrabbedMouse</h4>
  1527. <div class="markdown level1 summary">Event to be invoked when a view ungrab the mouse.</div>
  1528. <div class="markdown level1 conceptual"></div>
  1529. <h5 class="declaration">Declaration</h5>
  1530. <div class="codewrapper">
  1531. <pre><code class="lang-csharp hljs">public static event Action&lt;View&gt; UnGrabbedMouse</code></pre>
  1532. </div>
  1533. <h5 class="eventType">Event Type</h5>
  1534. <table class="table table-bordered table-condensed">
  1535. <thead>
  1536. <tr>
  1537. <th>Type</th>
  1538. <th>Description</th>
  1539. </tr>
  1540. </thead>
  1541. <tbody>
  1542. <tr>
  1543. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.View.html">View</a>&gt;</td>
  1544. <td></td>
  1545. </tr>
  1546. </tbody>
  1547. </table>
  1548. <span class="small pull-right mobile-hide">
  1549. <span class="divider">|</span>
  1550. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application_UnGrabbingMouse.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application.UnGrabbingMouse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1551. </span>
  1552. <span class="small pull-right mobile-hide">
  1553. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L703">View Source</a>
  1554. </span>
  1555. <h4 id="Terminal_Gui_Application_UnGrabbingMouse" data-uid="Terminal.Gui.Application.UnGrabbingMouse">UnGrabbingMouse</h4>
  1556. <div class="markdown level1 summary">Invoked when a view wants ungrab the mouse; can be canceled.</div>
  1557. <div class="markdown level1 conceptual"></div>
  1558. <h5 class="declaration">Declaration</h5>
  1559. <div class="codewrapper">
  1560. <pre><code class="lang-csharp hljs">public static event Func&lt;View, bool&gt; UnGrabbingMouse</code></pre>
  1561. </div>
  1562. <h5 class="eventType">Event Type</h5>
  1563. <table class="table table-bordered table-condensed">
  1564. <thead>
  1565. <tr>
  1566. <th>Type</th>
  1567. <th>Description</th>
  1568. </tr>
  1569. </thead>
  1570. <tbody>
  1571. <tr>
  1572. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="Terminal.Gui.View.html">View</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>&gt;</td>
  1573. <td></td>
  1574. </tr>
  1575. </tbody>
  1576. </table>
  1577. </article>
  1578. </div>
  1579. <div class="hidden-sm col-md-2" role="complementary">
  1580. <div class="sideaffix">
  1581. <div class="contribution">
  1582. <ul class="nav">
  1583. <li>
  1584. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Application.md&amp;value=---%0Auid%3A%20Terminal.Gui.Application%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
  1585. </li>
  1586. <li>
  1587. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Application.cs/#L59" class="contribution-link">View Source</a>
  1588. </li>
  1589. </ul>
  1590. </div>
  1591. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  1592. <h5>In this article</h5>
  1593. <div></div>
  1594. </nav>
  1595. </div>
  1596. </div>
  1597. </div>
  1598. </div>
  1599. <footer>
  1600. <div class="grad-bottom"></div>
  1601. <div class="footer">
  1602. <div class="container">
  1603. <span class="pull-right">
  1604. <a href="#top">Back to top</a>
  1605. </span>
  1606. <span>Generated by <strong>DocFX</strong></span>
  1607. </div>
  1608. </div>
  1609. </footer>
  1610. </div>
  1611. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  1612. <script type="text/javascript" src="../../styles/docfx.js"></script>
  1613. <script type="text/javascript" src="../../styles/main.js"></script>
  1614. </body>
  1615. </html>