Terminal.Gui.Application.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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. <meta name="generator" content="docfx 2.18.2.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="">
  18. <meta property="docfx:tocrel" content="../toc.html">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix">
  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="../../logo.svg" 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 role="main" class="container body-content hide-when-search">
  54. <div class="sidenav hide-when-search">
  55. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  56. <div class="sidetoggle collapse" id="sidetoggle">
  57. <div id="sidetoc"></div>
  58. </div>
  59. </div>
  60. <div class="article row grid-right">
  61. <div class="col-md-10">
  62. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Application">
  63. <h1 id="Terminal_Gui_Application" data-uid="Terminal.Gui.Application">Class Application
  64. </h1>
  65. <div class="markdown level0 summary"><p>The application driver for gui.cs</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <div class="inheritance">
  69. <h5>Inheritance</h5>
  70. <div class="level0"><span class="xref">System.Object</span></div>
  71. <div class="level1"><span class="xref">Application</span></div>
  72. </div>
  73. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  74. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  75. <h5 id="Terminal_Gui_Application_syntax">Syntax</h5>
  76. <div class="codewrapper">
  77. <pre><code class="lang-csharp hljs">public static class Application</code></pre>
  78. </div>
  79. <h5 id="Terminal_Gui_Application_remarks"><strong>Remarks</strong></h5>
  80. <div class="markdown level0 remarks"><p>
  81. You can hook up to the Iteration event to have your method
  82. invoked on each iteration of the mainloop.
  83. </p>
  84. <p>
  85. Creates a mainloop to process input events, handle timers and
  86. other sources of data. It is accessible via the MainLoop property.
  87. </p>
  88. <p>
  89. When invoked sets the SynchronizationContext to one that is tied
  90. to the mainloop, allowing user code to use async/await.
  91. </p></div>
  92. <h3 id="fields">Fields
  93. </h3>
  94. <h4 id="Terminal_Gui_Application_Driver" data-uid="Terminal.Gui.Application.Driver">Driver</h4>
  95. <div class="markdown level1 summary"><p>The current Console Driver in use.</p>
  96. </div>
  97. <div class="markdown level1 conceptual"></div>
  98. <h5 class="decalaration">Declaration</h5>
  99. <div class="codewrapper">
  100. <pre><code class="lang-csharp hljs">public static Terminal.Gui.ConsoleDriver Driver;</code></pre>
  101. </div>
  102. <h5 class="fieldValue">Field Value</h5>
  103. <table class="table table-bordered table-striped table-condensed">
  104. <thead>
  105. <tr>
  106. <th>Type</th>
  107. <th>Description</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. <tr>
  112. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  113. <td><p>To be added.</p>
  114. </td>
  115. </tr>
  116. </tbody>
  117. </table>
  118. <h4 id="Terminal_Gui_Application_RootMouseEvent" data-uid="Terminal.Gui.Application.RootMouseEvent">RootMouseEvent</h4>
  119. <div class="markdown level1 summary"><p>Merely a debugging aid to see the raw mouse events</p>
  120. </div>
  121. <div class="markdown level1 conceptual"></div>
  122. <h5 class="decalaration">Declaration</h5>
  123. <div class="codewrapper">
  124. <pre><code class="lang-csharp hljs">public static Action&lt;Terminal.Gui.MouseEvent&gt; RootMouseEvent;</code></pre>
  125. </div>
  126. <h5 class="fieldValue">Field Value</h5>
  127. <table class="table table-bordered table-striped table-condensed">
  128. <thead>
  129. <tr>
  130. <th>Type</th>
  131. <th>Description</th>
  132. </tr>
  133. </thead>
  134. <tbody>
  135. <tr>
  136. <td><span class="xref">System.Action</span>&lt;<a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a>&gt;</td>
  137. <td><p>To be added.</p>
  138. </td>
  139. </tr>
  140. </tbody>
  141. </table>
  142. <h4 id="Terminal_Gui_Application_UseSystemConsole" data-uid="Terminal.Gui.Application.UseSystemConsole">UseSystemConsole</h4>
  143. <div class="markdown level1 summary"><p>If set, it forces the use of the System.Console-based driver.</p>
  144. </div>
  145. <div class="markdown level1 conceptual"></div>
  146. <h5 class="decalaration">Declaration</h5>
  147. <div class="codewrapper">
  148. <pre><code class="lang-csharp hljs">public static bool UseSystemConsole;</code></pre>
  149. </div>
  150. <h5 class="fieldValue">Field Value</h5>
  151. <table class="table table-bordered table-striped table-condensed">
  152. <thead>
  153. <tr>
  154. <th>Type</th>
  155. <th>Description</th>
  156. </tr>
  157. </thead>
  158. <tbody>
  159. <tr>
  160. <td><span class="xref">System.Boolean</span></td>
  161. <td><p>To be added.</p>
  162. </td>
  163. </tr>
  164. </tbody>
  165. </table>
  166. <h3 id="properties">Properties
  167. </h3>
  168. <a id="Terminal_Gui_Application_Current_" data-uid="Terminal.Gui.Application.Current*"></a>
  169. <h4 id="Terminal_Gui_Application_Current" data-uid="Terminal.Gui.Application.Current">Current</h4>
  170. <div class="markdown level1 summary"><p>The current toplevel object. This is updated when Application.Run enters and leaves and points to the current toplevel.</p>
  171. </div>
  172. <div class="markdown level1 conceptual"></div>
  173. <h5 class="decalaration">Declaration</h5>
  174. <div class="codewrapper">
  175. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Toplevel Current { get; }</code></pre>
  176. </div>
  177. <h5 class="propertyValue">Property Value</h5>
  178. <table class="table table-bordered table-striped table-condensed">
  179. <thead>
  180. <tr>
  181. <th>Type</th>
  182. <th>Description</th>
  183. </tr>
  184. </thead>
  185. <tbody>
  186. <tr>
  187. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  188. <td><p>The current.</p>
  189. </td>
  190. </tr>
  191. </tbody>
  192. </table>
  193. <a id="Terminal_Gui_Application_MainLoop_" data-uid="Terminal.Gui.Application.MainLoop*"></a>
  194. <h4 id="Terminal_Gui_Application_MainLoop" data-uid="Terminal.Gui.Application.MainLoop">MainLoop</h4>
  195. <div class="markdown level1 summary"><p>The mainloop driver for the applicaiton</p>
  196. </div>
  197. <div class="markdown level1 conceptual"></div>
  198. <h5 class="decalaration">Declaration</h5>
  199. <div class="codewrapper">
  200. <pre><code class="lang-csharp hljs">public static Mono.Terminal.MainLoop MainLoop { get; }</code></pre>
  201. </div>
  202. <h5 class="propertyValue">Property Value</h5>
  203. <table class="table table-bordered table-striped table-condensed">
  204. <thead>
  205. <tr>
  206. <th>Type</th>
  207. <th>Description</th>
  208. </tr>
  209. </thead>
  210. <tbody>
  211. <tr>
  212. <td><a class="xref" href="../Mono.Terminal/Mono.Terminal.MainLoop.html">MainLoop</a></td>
  213. <td><p>The main loop.</p>
  214. </td>
  215. </tr>
  216. </tbody>
  217. </table>
  218. <a id="Terminal_Gui_Application_Top_" data-uid="Terminal.Gui.Application.Top*"></a>
  219. <h4 id="Terminal_Gui_Application_Top" data-uid="Terminal.Gui.Application.Top">Top</h4>
  220. <div class="markdown level1 summary"><p>The Toplevel object used for the application on startup.</p>
  221. </div>
  222. <div class="markdown level1 conceptual"></div>
  223. <h5 class="decalaration">Declaration</h5>
  224. <div class="codewrapper">
  225. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Toplevel Top { get; }</code></pre>
  226. </div>
  227. <h5 class="propertyValue">Property Value</h5>
  228. <table class="table table-bordered table-striped table-condensed">
  229. <thead>
  230. <tr>
  231. <th>Type</th>
  232. <th>Description</th>
  233. </tr>
  234. </thead>
  235. <tbody>
  236. <tr>
  237. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  238. <td><p>The top.</p>
  239. </td>
  240. </tr>
  241. </tbody>
  242. </table>
  243. <h3 id="methods">Methods
  244. </h3>
  245. <a id="Terminal_Gui_Application_Begin_" data-uid="Terminal.Gui.Application.Begin*"></a>
  246. <h4 id="Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Application.Begin(Terminal.Gui.Toplevel)">Begin(Toplevel)</h4>
  247. <div class="markdown level1 summary"><p>Building block API: Prepares the provided toplevel for execution.</p>
  248. </div>
  249. <div class="markdown level1 conceptual"></div>
  250. <h5 class="decalaration">Declaration</h5>
  251. <div class="codewrapper">
  252. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Application.RunState Begin (Terminal.Gui.Toplevel toplevel);</code></pre>
  253. </div>
  254. <h5 class="parameters">Parameters</h5>
  255. <table class="table table-bordered table-striped table-condensed">
  256. <thead>
  257. <tr>
  258. <th>Type</th>
  259. <th>Name</th>
  260. <th>Description</th>
  261. </tr>
  262. </thead>
  263. <tbody>
  264. <tr>
  265. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  266. <td><span class="parametername">toplevel</span></td>
  267. <td><p>Toplevel to prepare execution for.</p>
  268. </td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. <h5 class="returns">Returns</h5>
  273. <table class="table table-bordered table-striped table-condensed">
  274. <thead>
  275. <tr>
  276. <th>Type</th>
  277. <th>Description</th>
  278. </tr>
  279. </thead>
  280. <tbody>
  281. <tr>
  282. <td></td>
  283. <td><p>The runstate handle that needs to be passed to the End() method upon completion.</p>
  284. </td>
  285. </tr>
  286. </tbody>
  287. </table>
  288. <h5 id="Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel__remarks">Remarks</h5>
  289. <div class="markdown level1 remarks"><p>This method prepares the provided toplevel for running with the focus,
  290. it adds this to the list of toplevels, sets up the mainloop to process the
  291. event, lays out the subviews, focuses the first element, and draws the
  292. toplevel in the screen. This is usually followed by executing
  293. the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(Application+RunState, Boolean)</a> method, and then the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(Application+RunState)</a> method upon termination which will
  294. undo these changes.</p>
  295. </div>
  296. <a id="Terminal_Gui_Application_End_" data-uid="Terminal.Gui.Application.End*"></a>
  297. <h4 id="Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_" data-uid="Terminal.Gui.Application.End(Terminal.Gui.Application.RunState)">End(Application+RunState)</h4>
  298. <div class="markdown level1 summary"><p>Building block API: completes the exection of a Toplevel that was started with Begin.</p>
  299. </div>
  300. <div class="markdown level1 conceptual"></div>
  301. <h5 class="decalaration">Declaration</h5>
  302. <div class="codewrapper">
  303. <pre><code class="lang-csharp hljs">public static void End (Terminal.Gui.Application.RunState runState);</code></pre>
  304. </div>
  305. <h5 class="parameters">Parameters</h5>
  306. <table class="table table-bordered table-striped table-condensed">
  307. <thead>
  308. <tr>
  309. <th>Type</th>
  310. <th>Name</th>
  311. <th>Description</th>
  312. </tr>
  313. </thead>
  314. <tbody>
  315. <tr>
  316. <td></td>
  317. <td><span class="parametername">runState</span></td>
  318. <td><p>The runstate returned by the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> method.</p>
  319. </td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. <a id="Terminal_Gui_Application_GrabMouse_" data-uid="Terminal.Gui.Application.GrabMouse*"></a>
  324. <h4 id="Terminal_Gui_Application_GrabMouse_Terminal_Gui_View_" data-uid="Terminal.Gui.Application.GrabMouse(Terminal.Gui.View)">GrabMouse(View)</h4>
  325. <div class="markdown level1 summary"><p>Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called.</p>
  326. </div>
  327. <div class="markdown level1 conceptual"></div>
  328. <h5 class="decalaration">Declaration</h5>
  329. <div class="codewrapper">
  330. <pre><code class="lang-csharp hljs">public static void GrabMouse (Terminal.Gui.View view);</code></pre>
  331. </div>
  332. <h5 class="parameters">Parameters</h5>
  333. <table class="table table-bordered table-striped table-condensed">
  334. <thead>
  335. <tr>
  336. <th>Type</th>
  337. <th>Name</th>
  338. <th>Description</th>
  339. </tr>
  340. </thead>
  341. <tbody>
  342. <tr>
  343. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  344. <td><span class="parametername">view</span></td>
  345. <td><p>View that will receive all mouse events until UngrabMouse is invoked.</p>
  346. </td>
  347. </tr>
  348. </tbody>
  349. </table>
  350. <a id="Terminal_Gui_Application_Init_" data-uid="Terminal.Gui.Application.Init*"></a>
  351. <h4 id="Terminal_Gui_Application_Init" data-uid="Terminal.Gui.Application.Init">Init()</h4>
  352. <div class="markdown level1 summary"><p>Initializes the Application</p>
  353. </div>
  354. <div class="markdown level1 conceptual"></div>
  355. <h5 class="decalaration">Declaration</h5>
  356. <div class="codewrapper">
  357. <pre><code class="lang-csharp hljs">public static void Init ();</code></pre>
  358. </div>
  359. <a id="Terminal_Gui_Application_MakeCenteredRect_" data-uid="Terminal.Gui.Application.MakeCenteredRect*"></a>
  360. <h4 id="Terminal_Gui_Application_MakeCenteredRect_Terminal_Gui_Size_" data-uid="Terminal.Gui.Application.MakeCenteredRect(Terminal.Gui.Size)">MakeCenteredRect(Size)</h4>
  361. <div class="markdown level1 summary"><p>Returns a rectangle that is centered in the screen for the provided size.</p>
  362. </div>
  363. <div class="markdown level1 conceptual"></div>
  364. <h5 class="decalaration">Declaration</h5>
  365. <div class="codewrapper">
  366. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Rect MakeCenteredRect (Terminal.Gui.Size size);</code></pre>
  367. </div>
  368. <h5 class="parameters">Parameters</h5>
  369. <table class="table table-bordered table-striped table-condensed">
  370. <thead>
  371. <tr>
  372. <th>Type</th>
  373. <th>Name</th>
  374. <th>Description</th>
  375. </tr>
  376. </thead>
  377. <tbody>
  378. <tr>
  379. <td><a class="xref" href="Terminal.Gui.Size.html">Size</a></td>
  380. <td><span class="parametername">size</span></td>
  381. <td><p>Size for the rectangle.</p>
  382. </td>
  383. </tr>
  384. </tbody>
  385. </table>
  386. <h5 class="returns">Returns</h5>
  387. <table class="table table-bordered table-striped table-condensed">
  388. <thead>
  389. <tr>
  390. <th>Type</th>
  391. <th>Description</th>
  392. </tr>
  393. </thead>
  394. <tbody>
  395. <tr>
  396. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  397. <td><p>The centered rect.</p>
  398. </td>
  399. </tr>
  400. </tbody>
  401. </table>
  402. <a id="Terminal_Gui_Application_Refresh_" data-uid="Terminal.Gui.Application.Refresh*"></a>
  403. <h4 id="Terminal_Gui_Application_Refresh" data-uid="Terminal.Gui.Application.Refresh">Refresh()</h4>
  404. <div class="markdown level1 summary"><p>Triggers a refresh of the entire display.</p>
  405. </div>
  406. <div class="markdown level1 conceptual"></div>
  407. <h5 class="decalaration">Declaration</h5>
  408. <div class="codewrapper">
  409. <pre><code class="lang-csharp hljs">public static void Refresh ();</code></pre>
  410. </div>
  411. <a id="Terminal_Gui_Application_RequestStop_" data-uid="Terminal.Gui.Application.RequestStop*"></a>
  412. <h4 id="Terminal_Gui_Application_RequestStop" data-uid="Terminal.Gui.Application.RequestStop">RequestStop()</h4>
  413. <div class="markdown level1 summary"><p>Stops running the most recent toplevel</p>
  414. </div>
  415. <div class="markdown level1 conceptual"></div>
  416. <h5 class="decalaration">Declaration</h5>
  417. <div class="codewrapper">
  418. <pre><code class="lang-csharp hljs">public static void RequestStop ();</code></pre>
  419. </div>
  420. <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
  421. <h4 id="Terminal_Gui_Application_Run" data-uid="Terminal.Gui.Application.Run">Run()</h4>
  422. <div class="markdown level1 summary"><p>Runs the application with the built-in toplevel view</p>
  423. </div>
  424. <div class="markdown level1 conceptual"></div>
  425. <h5 class="decalaration">Declaration</h5>
  426. <div class="codewrapper">
  427. <pre><code class="lang-csharp hljs">public static void Run ();</code></pre>
  428. </div>
  429. <a id="Terminal_Gui_Application_Run_" data-uid="Terminal.Gui.Application.Run*"></a>
  430. <h4 id="Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Application.Run(Terminal.Gui.Toplevel)">Run(Toplevel)</h4>
  431. <div class="markdown level1 summary"><p>Runs the main loop on the given container.</p>
  432. </div>
  433. <div class="markdown level1 conceptual"></div>
  434. <h5 class="decalaration">Declaration</h5>
  435. <div class="codewrapper">
  436. <pre><code class="lang-csharp hljs">public static void Run (Terminal.Gui.Toplevel view);</code></pre>
  437. </div>
  438. <h5 class="parameters">Parameters</h5>
  439. <table class="table table-bordered table-striped table-condensed">
  440. <thead>
  441. <tr>
  442. <th>Type</th>
  443. <th>Name</th>
  444. <th>Description</th>
  445. </tr>
  446. </thead>
  447. <tbody>
  448. <tr>
  449. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  450. <td><span class="parametername">view</span></td>
  451. <td><p>To be added.</p>
  452. </td>
  453. </tr>
  454. </tbody>
  455. </table>
  456. <h5 id="Terminal_Gui_Application_Run_Terminal_Gui_Toplevel__remarks">Remarks</h5>
  457. <div class="markdown level1 remarks"><p>
  458. This method is used to start processing events
  459. for the main application, but it is also used to
  460. run modal dialog boxes.
  461. </p>
  462. <p>
  463. To make a toplevel stop execution, set the &quot;Running&quot;
  464. property to false.
  465. </p>
  466. <p>
  467. This is equivalent to calling Begin on the toplevel view, followed by RunLoop with the
  468. returned value, and then calling end on the return value.
  469. </p>
  470. <p>
  471. Alternatively, if your program needs to control the main loop and needs to
  472. process events manually, you can invoke Begin to set things up manually and then
  473. repeatedly call RunLoop with the wait parameter set to false. By doing this
  474. the RunLoop method will only process any pending events, timers, idle handlers and
  475. then return control immediately.
  476. </p></div>
  477. <a id="Terminal_Gui_Application_RunLoop_" data-uid="Terminal.Gui.Application.RunLoop*"></a>
  478. <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(Application+RunState, Boolean)</h4>
  479. <div class="markdown level1 summary"><p>Building block API: Runs the main loop for the created dialog</p>
  480. </div>
  481. <div class="markdown level1 conceptual"></div>
  482. <h5 class="decalaration">Declaration</h5>
  483. <div class="codewrapper">
  484. <pre><code class="lang-csharp hljs">public static void RunLoop (Terminal.Gui.Application.RunState state, bool wait = true);</code></pre>
  485. </div>
  486. <h5 class="parameters">Parameters</h5>
  487. <table class="table table-bordered table-striped table-condensed">
  488. <thead>
  489. <tr>
  490. <th>Type</th>
  491. <th>Name</th>
  492. <th>Description</th>
  493. </tr>
  494. </thead>
  495. <tbody>
  496. <tr>
  497. <td></td>
  498. <td><span class="parametername">state</span></td>
  499. <td><p>The state returned by the Begin method.</p>
  500. </td>
  501. </tr>
  502. <tr>
  503. <td><span class="xref">System.Boolean</span></td>
  504. <td><span class="parametername">wait</span></td>
  505. <td><p>By default this is true which will execute the runloop waiting for events, if you pass false, you can use this method to run a single iteration of the events.</p>
  506. </td>
  507. </tr>
  508. </tbody>
  509. </table>
  510. <h5 id="Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean__remarks">Remarks</h5>
  511. <div class="markdown level1 remarks"><p>Use the wait parameter to control whether this is a
  512. blocking or non-blocking call.</p>
  513. </div>
  514. <a id="Terminal_Gui_Application_UngrabMouse_" data-uid="Terminal.Gui.Application.UngrabMouse*"></a>
  515. <h4 id="Terminal_Gui_Application_UngrabMouse" data-uid="Terminal.Gui.Application.UngrabMouse">UngrabMouse()</h4>
  516. <div class="markdown level1 summary"><p>Releases the mouse grab, so mouse events will be routed to the view on which the mouse is.</p>
  517. </div>
  518. <div class="markdown level1 conceptual"></div>
  519. <h5 class="decalaration">Declaration</h5>
  520. <div class="codewrapper">
  521. <pre><code class="lang-csharp hljs">public static void UngrabMouse ();</code></pre>
  522. </div>
  523. <h3 id="events">Events
  524. </h3>
  525. <h4 id="Terminal_Gui_Application_Iteration" data-uid="Terminal.Gui.Application.Iteration">Iteration</h4>
  526. <div class="markdown level1 summary"><p>This event is raised on each iteration of the
  527. main loop.</p>
  528. </div>
  529. <div class="markdown level1 conceptual"></div>
  530. <h5 class="decalaration">Declaration</h5>
  531. <div class="codewrapper">
  532. <pre><code class="lang-csharp hljs">public static event EventHandler Iteration;</code></pre>
  533. </div>
  534. <h5 class="eventType">Event Type</h5>
  535. <table class="table table-bordered table-striped table-condensed">
  536. <thead>
  537. <tr>
  538. <th>Type</th>
  539. <th>Description</th>
  540. </tr>
  541. </thead>
  542. <tbody>
  543. <tr>
  544. <td><span class="xref">System.EventHandler</span></td>
  545. <td><p>To be added.</p>
  546. </td>
  547. </tr>
  548. </tbody>
  549. </table>
  550. <h5 id="Terminal_Gui_Application_Iteration_remarks">Remarks</h5>
  551. <div class="markdown level1 remarks"><p>See also <span class="xref">System.Threading.Timeout</span></p>
  552. </div>
  553. </article>
  554. </div>
  555. <div class="hidden-sm col-md-2" role="complementary">
  556. <div class="sideaffix">
  557. <div class="contribution">
  558. <ul class="nav">
  559. </ul>
  560. </div>
  561. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  562. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  563. </nav>
  564. </div>
  565. </div>
  566. </div>
  567. </div>
  568. <footer>
  569. <div class="grad-bottom"></div>
  570. <div class="footer">
  571. <div class="container">
  572. <span class="pull-right">
  573. <a href="#top">Back to top</a>
  574. </span>
  575. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  576. </div>
  577. </div>
  578. </footer>
  579. </div>
  580. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  581. <script type="text/javascript" src="../../styles/docfx.js"></script>
  582. <script type="text/javascript" src="../../styles/main.js"></script>
  583. </body>
  584. </html>