Terminal.Gui.Toplevel.html 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141
  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 Toplevel
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Toplevel
  11. ">
  12. <meta name="generator" content="docfx 2.56.6.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="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Toplevel">
  73. <h1 id="Terminal_Gui_Toplevel" data-uid="Terminal.Gui.Toplevel" class="text-break">Class Toplevel
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Toplevel views can be modally executed.
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><span class="xref">System.Object</span></div>
  82. <div class="level1"><a class="xref" href="Terminal.Gui.Responder.html">Responder</a></div>
  83. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  84. <div class="level3"><span class="xref">Toplevel</span></div>
  85. <div class="level4"><a class="xref" href="Terminal.Gui.Window.html">Window</a></div>
  86. </div>
  87. <div classs="implements">
  88. <h5>Implements</h5>
  89. <div><span class="xref">System.IDisposable</span></div>
  90. <div><span class="xref">System.ComponentModel.ISupportInitializeNotification</span></div>
  91. <div><span class="xref">System.ComponentModel.ISupportInitialize</span></div>
  92. </div>
  93. <div class="inheritedMembers">
  94. <h5>Inherited Members</h5>
  95. <div>
  96. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Added">View.Added</a>
  97. </div>
  98. <div>
  99. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Removed">View.Removed</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Enter">View.Enter</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Leave">View.Leave</a>
  106. </div>
  107. <div>
  108. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseEnter">View.MouseEnter</a>
  109. </div>
  110. <div>
  111. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseLeave">View.MouseLeave</a>
  112. </div>
  113. <div>
  114. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseClick">View.MouseClick</a>
  115. </div>
  116. <div>
  117. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HotKey">View.HotKey</a>
  118. </div>
  119. <div>
  120. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HotKeySpecifier">View.HotKeySpecifier</a>
  121. </div>
  122. <div>
  123. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Shortcut">View.Shortcut</a>
  124. </div>
  125. <div>
  126. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ShortcutTag">View.ShortcutTag</a>
  127. </div>
  128. <div>
  129. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ShortcutAction">View.ShortcutAction</a>
  130. </div>
  131. <div>
  132. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Data">View.Data</a>
  133. </div>
  134. <div>
  135. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Driver">View.Driver</a>
  136. </div>
  137. <div>
  138. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Subviews">View.Subviews</a>
  139. </div>
  140. <div>
  141. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TabIndexes">View.TabIndexes</a>
  142. </div>
  143. <div>
  144. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TabIndex">View.TabIndex</a>
  145. </div>
  146. <div>
  147. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TabStop">View.TabStop</a>
  148. </div>
  149. <div>
  150. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Id">View.Id</a>
  151. </div>
  152. <div>
  153. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsCurrentTop">View.IsCurrentTop</a>
  154. </div>
  155. <div>
  156. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantMousePositionReports">View.WantMousePositionReports</a>
  157. </div>
  158. <div>
  159. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantContinuousButtonPressed">View.WantContinuousButtonPressed</a>
  160. </div>
  161. <div>
  162. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">View.Frame</a>
  163. </div>
  164. <div>
  165. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStyle">View.LayoutStyle</a>
  166. </div>
  167. <div>
  168. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">View.Bounds</a>
  169. </div>
  170. <div>
  171. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_X">View.X</a>
  172. </div>
  173. <div>
  174. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Y">View.Y</a>
  175. </div>
  176. <div>
  177. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Width">View.Width</a>
  178. </div>
  179. <div>
  180. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Height">View.Height</a>
  181. </div>
  182. <div>
  183. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SuperView">View.SuperView</a>
  184. </div>
  185. <div>
  186. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay">View.SetNeedsDisplay()</a>
  187. </div>
  188. <div>
  189. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearLayoutNeeded">View.ClearLayoutNeeded()</a>
  190. </div>
  191. <div>
  192. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay_Terminal_Gui_Rect_">View.SetNeedsDisplay(Rect)</a>
  193. </div>
  194. <div>
  195. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetChildNeedsDisplay">View.SetChildNeedsDisplay()</a>
  196. </div>
  197. <div>
  198. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">View.Add(View[])</a>
  199. </div>
  200. <div>
  201. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewToFront_Terminal_Gui_View_">View.BringSubviewToFront(View)</a>
  202. </div>
  203. <div>
  204. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewToBack_Terminal_Gui_View_">View.SendSubviewToBack(View)</a>
  205. </div>
  206. <div>
  207. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewBackwards_Terminal_Gui_View_">View.SendSubviewBackwards(View)</a>
  208. </div>
  209. <div>
  210. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewForward_Terminal_Gui_View_">View.BringSubviewForward(View)</a>
  211. </div>
  212. <div>
  213. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear">View.Clear()</a>
  214. </div>
  215. <div>
  216. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear_Terminal_Gui_Rect_">View.Clear(Rect)</a>
  217. </div>
  218. <div>
  219. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(Int32, Int32)</a>
  220. </div>
  221. <div>
  222. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClipToBounds">View.ClipToBounds()</a>
  223. </div>
  224. <div>
  225. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetClip_Terminal_Gui_Rect_">View.SetClip(Rect)</a>
  226. </div>
  227. <div>
  228. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawFrame_Terminal_Gui_Rect_System_Int32_System_Boolean_">View.DrawFrame(Rect, Int32, Boolean)</a>
  229. </div>
  230. <div>
  231. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawHotString_NStack_ustring_Terminal_Gui_Attribute_Terminal_Gui_Attribute_">View.DrawHotString(ustring, Attribute, Attribute)</a>
  232. </div>
  233. <div>
  234. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawHotString_NStack_ustring_System_Boolean_Terminal_Gui_ColorScheme_">View.DrawHotString(ustring, Boolean, ColorScheme)</a>
  235. </div>
  236. <div>
  237. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Move_System_Int32_System_Int32_">View.Move(Int32, Int32)</a>
  238. </div>
  239. <div>
  240. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_PositionCursor">View.PositionCursor()</a>
  241. </div>
  242. <div>
  243. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HasFocus">View.HasFocus</a>
  244. </div>
  245. <div>
  246. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnAdded_Terminal_Gui_View_">View.OnAdded(View)</a>
  247. </div>
  248. <div>
  249. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnRemoved_Terminal_Gui_View_">View.OnRemoved(View)</a>
  250. </div>
  251. <div>
  252. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnEnter_Terminal_Gui_View_">View.OnEnter(View)</a>
  253. </div>
  254. <div>
  255. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnLeave_Terminal_Gui_View_">View.OnLeave(View)</a>
  256. </div>
  257. <div>
  258. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Focused">View.Focused</a>
  259. </div>
  260. <div>
  261. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MostFocused">View.MostFocused</a>
  262. </div>
  263. <div>
  264. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ColorScheme">View.ColorScheme</a>
  265. </div>
  266. <div>
  267. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddRune_System_Int32_System_Int32_System_Rune_">View.AddRune(Int32, Int32, Rune)</a>
  268. </div>
  269. <div>
  270. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  271. </div>
  272. <div>
  273. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawContent">View.DrawContent</a>
  274. </div>
  275. <div>
  276. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContent_Terminal_Gui_Rect_">View.OnDrawContent(Rect)</a>
  277. </div>
  278. <div>
  279. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetFocus">View.SetFocus()</a>
  280. </div>
  281. <div>
  282. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyPress">View.KeyPress</a>
  283. </div>
  284. <div>
  285. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessHotKey_Terminal_Gui_KeyEvent_">View.ProcessHotKey(KeyEvent)</a>
  286. </div>
  287. <div>
  288. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyDown">View.KeyDown</a>
  289. </div>
  290. <div>
  291. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyUp">View.KeyUp</a>
  292. </div>
  293. <div>
  294. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnsureFocus">View.EnsureFocus()</a>
  295. </div>
  296. <div>
  297. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst">View.FocusFirst()</a>
  298. </div>
  299. <div>
  300. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusLast">View.FocusLast()</a>
  301. </div>
  302. <div>
  303. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusPrev">View.FocusPrev()</a>
  304. </div>
  305. <div>
  306. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusNext">View.FocusNext()</a>
  307. </div>
  308. <div>
  309. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStarted">View.LayoutStarted</a>
  310. </div>
  311. <div>
  312. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutComplete">View.LayoutComplete</a>
  313. </div>
  314. <div>
  315. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Initialized">View.Initialized</a>
  316. </div>
  317. <div>
  318. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutSubviews">View.LayoutSubviews()</a>
  319. </div>
  320. <div>
  321. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Text">View.Text</a>
  322. </div>
  323. <div>
  324. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AutoSize">View.AutoSize</a>
  325. </div>
  326. <div>
  327. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TextAlignment">View.TextAlignment</a>
  328. </div>
  329. <div>
  330. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsInitialized">View.IsInitialized</a>
  331. </div>
  332. <div>
  333. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ToString">View.ToString()</a>
  334. </div>
  335. <div>
  336. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEnter_Terminal_Gui_MouseEvent_">View.OnMouseEnter(MouseEvent)</a>
  337. </div>
  338. <div>
  339. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseLeave_Terminal_Gui_MouseEvent_">View.OnMouseLeave(MouseEvent)</a>
  340. </div>
  341. <div>
  342. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEvent_Terminal_Gui_MouseEvent_">View.OnMouseEvent(MouseEvent)</a>
  343. </div>
  344. <div>
  345. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseClick_Terminal_Gui_View_MouseEventArgs_">View.OnMouseClick(View.MouseEventArgs)</a>
  346. </div>
  347. <div>
  348. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Dispose_System_Boolean_">View.Dispose(Boolean)</a>
  349. </div>
  350. <div>
  351. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BeginInit">View.BeginInit()</a>
  352. </div>
  353. <div>
  354. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EndInit">View.EndInit()</a>
  355. </div>
  356. <div>
  357. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Visible">View.Visible</a>
  358. </div>
  359. <div>
  360. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetWidth_System_Int32_System_Int32__">View.SetWidth(Int32, Int32)</a>
  361. </div>
  362. <div>
  363. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetHeight_System_Int32_System_Int32__">View.SetHeight(Int32, Int32)</a>
  364. </div>
  365. <div>
  366. <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_MouseEvent_Terminal_Gui_MouseEvent_">Responder.MouseEvent(MouseEvent)</a>
  367. </div>
  368. <div>
  369. <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_Dispose">Responder.Dispose()</a>
  370. </div>
  371. <div>
  372. <span class="xref">System.Object.Equals(System.Object)</span>
  373. </div>
  374. <div>
  375. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  376. </div>
  377. <div>
  378. <span class="xref">System.Object.GetHashCode()</span>
  379. </div>
  380. <div>
  381. <span class="xref">System.Object.GetType()</span>
  382. </div>
  383. <div>
  384. <span class="xref">System.Object.MemberwiseClone()</span>
  385. </div>
  386. <div>
  387. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  388. </div>
  389. </div>
  390. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  391. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  392. <h5 id="Terminal_Gui_Toplevel_syntax">Syntax</h5>
  393. <div class="codewrapper">
  394. <pre><code class="lang-csharp hljs">public class Toplevel : View, IDisposable, ISupportInitializeNotification, ISupportInitialize</code></pre>
  395. </div>
  396. <h5 id="Terminal_Gui_Toplevel_remarks"><strong>Remarks</strong></h5>
  397. <div class="markdown level0 remarks">
  398. <p>
  399. Toplevels can be modally executing views, started 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, Boolean&gt;)</a>.
  400. They return control to the caller when <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop">RequestStop()</a> has
  401. been called (which sets the <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Running</a> property to false).
  402. </p>
  403. <p>
  404. A Toplevel is created when an application initialzies Terminal.Gui by callling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a>.
  405. The application Toplevel can be accessed via <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Top">Top</a>. Additional Toplevels can be created
  406. and run (e.g. <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>s. To run a Toplevel, create the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> and
  407. call <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, Boolean&gt;)</a>.
  408. </p>
  409. <p>
  410. Toplevels can also opt-in to more sophisticated initialization
  411. by implementing <span class="xref">System.ComponentModel.ISupportInitialize</span>. When they do
  412. so, the <span class="xref">System.ComponentModel.ISupportInitialize.BeginInit()</span> and
  413. <span class="xref">System.ComponentModel.ISupportInitialize.EndInit()</span> methods will be called
  414. before running the view.
  415. If first-run-only initialization is preferred, the <span class="xref">System.ComponentModel.ISupportInitializeNotification</span>
  416. can be implemented too, in which case the <span class="xref">System.ComponentModel.ISupportInitialize</span>
  417. methods will only be called if <span class="xref">System.ComponentModel.ISupportInitializeNotification.IsInitialized</span>
  418. is <span class="xref">false</span>. This allows proper <a class="xref" href="Terminal.Gui.View.html">View</a> inheritance hierarchies
  419. to override base class layout code optimally by doing so only on first run,
  420. instead of on every run.
  421. </p>
  422. </div>
  423. <h3 id="constructors">Constructors
  424. </h3>
  425. <a id="Terminal_Gui_Toplevel__ctor_" data-uid="Terminal.Gui.Toplevel.#ctor*"></a>
  426. <h4 id="Terminal_Gui_Toplevel__ctor" data-uid="Terminal.Gui.Toplevel.#ctor">Toplevel()</h4>
  427. <div class="markdown level1 summary">
  428. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Computed">Computed</a> layout, defaulting to full screen.
  429. </div>
  430. <div class="markdown level1 conceptual"></div>
  431. <h5 class="decalaration">Declaration</h5>
  432. <div class="codewrapper">
  433. <pre><code class="lang-csharp hljs">public Toplevel()</code></pre>
  434. </div>
  435. <a id="Terminal_Gui_Toplevel__ctor_" data-uid="Terminal.Gui.Toplevel.#ctor*"></a>
  436. <h4 id="Terminal_Gui_Toplevel__ctor_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Toplevel.#ctor(Terminal.Gui.Rect)">Toplevel(Rect)</h4>
  437. <div class="markdown level1 summary">
  438. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with the specified absolute layout.
  439. </div>
  440. <div class="markdown level1 conceptual"></div>
  441. <h5 class="decalaration">Declaration</h5>
  442. <div class="codewrapper">
  443. <pre><code class="lang-csharp hljs">public Toplevel(Rect frame)</code></pre>
  444. </div>
  445. <h5 class="parameters">Parameters</h5>
  446. <table class="table table-bordered table-striped table-condensed">
  447. <thead>
  448. <tr>
  449. <th>Type</th>
  450. <th>Name</th>
  451. <th>Description</th>
  452. </tr>
  453. </thead>
  454. <tbody>
  455. <tr>
  456. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  457. <td><span class="parametername">frame</span></td>
  458. <td>A superview-relative rectangle specifying the location and size for the new Toplevel</td>
  459. </tr>
  460. </tbody>
  461. </table>
  462. <h3 id="properties">Properties
  463. </h3>
  464. <a id="Terminal_Gui_Toplevel_CanFocus_" data-uid="Terminal.Gui.Toplevel.CanFocus*"></a>
  465. <h4 id="Terminal_Gui_Toplevel_CanFocus" data-uid="Terminal.Gui.Toplevel.CanFocus">CanFocus</h4>
  466. <div class="markdown level1 summary">
  467. Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> can focus.
  468. </div>
  469. <div class="markdown level1 conceptual"></div>
  470. <h5 class="decalaration">Declaration</h5>
  471. <div class="codewrapper">
  472. <pre><code class="lang-csharp hljs">public override bool CanFocus { get; }</code></pre>
  473. </div>
  474. <h5 class="propertyValue">Property Value</h5>
  475. <table class="table table-bordered table-striped table-condensed">
  476. <thead>
  477. <tr>
  478. <th>Type</th>
  479. <th>Description</th>
  480. </tr>
  481. </thead>
  482. <tbody>
  483. <tr>
  484. <td><span class="xref">System.Boolean</span></td>
  485. <td><code>true</code> if can focus; otherwise, <code>false</code>.</td>
  486. </tr>
  487. </tbody>
  488. </table>
  489. <h5 class="overrides">Overrides</h5>
  490. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_CanFocus">View.CanFocus</a></div>
  491. <a id="Terminal_Gui_Toplevel_MenuBar_" data-uid="Terminal.Gui.Toplevel.MenuBar*"></a>
  492. <h4 id="Terminal_Gui_Toplevel_MenuBar" data-uid="Terminal.Gui.Toplevel.MenuBar">MenuBar</h4>
  493. <div class="markdown level1 summary">
  494. Gets or sets the menu for this Toplevel
  495. </div>
  496. <div class="markdown level1 conceptual"></div>
  497. <h5 class="decalaration">Declaration</h5>
  498. <div class="codewrapper">
  499. <pre><code class="lang-csharp hljs">public MenuBar MenuBar { get; set; }</code></pre>
  500. </div>
  501. <h5 class="propertyValue">Property Value</h5>
  502. <table class="table table-bordered table-striped table-condensed">
  503. <thead>
  504. <tr>
  505. <th>Type</th>
  506. <th>Description</th>
  507. </tr>
  508. </thead>
  509. <tbody>
  510. <tr>
  511. <td><a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a></td>
  512. <td></td>
  513. </tr>
  514. </tbody>
  515. </table>
  516. <a id="Terminal_Gui_Toplevel_Modal_" data-uid="Terminal.Gui.Toplevel.Modal*"></a>
  517. <h4 id="Terminal_Gui_Toplevel_Modal" data-uid="Terminal.Gui.Toplevel.Modal">Modal</h4>
  518. <div class="markdown level1 summary">
  519. Determines whether the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> is modal or not.
  520. Causes <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a> to propagate keys upwards
  521. by default unless set to <span class="xref">true</span>.
  522. </div>
  523. <div class="markdown level1 conceptual"></div>
  524. <h5 class="decalaration">Declaration</h5>
  525. <div class="codewrapper">
  526. <pre><code class="lang-csharp hljs">public bool Modal { get; set; }</code></pre>
  527. </div>
  528. <h5 class="propertyValue">Property Value</h5>
  529. <table class="table table-bordered table-striped table-condensed">
  530. <thead>
  531. <tr>
  532. <th>Type</th>
  533. <th>Description</th>
  534. </tr>
  535. </thead>
  536. <tbody>
  537. <tr>
  538. <td><span class="xref">System.Boolean</span></td>
  539. <td></td>
  540. </tr>
  541. </tbody>
  542. </table>
  543. <a id="Terminal_Gui_Toplevel_Running_" data-uid="Terminal.Gui.Toplevel.Running*"></a>
  544. <h4 id="Terminal_Gui_Toplevel_Running" data-uid="Terminal.Gui.Toplevel.Running">Running</h4>
  545. <div class="markdown level1 summary">
  546. Gets or sets whether the <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> for this <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> is running or not.
  547. </div>
  548. <div class="markdown level1 conceptual"></div>
  549. <h5 class="decalaration">Declaration</h5>
  550. <div class="codewrapper">
  551. <pre><code class="lang-csharp hljs">public bool Running { get; set; }</code></pre>
  552. </div>
  553. <h5 class="propertyValue">Property Value</h5>
  554. <table class="table table-bordered table-striped table-condensed">
  555. <thead>
  556. <tr>
  557. <th>Type</th>
  558. <th>Description</th>
  559. </tr>
  560. </thead>
  561. <tbody>
  562. <tr>
  563. <td><span class="xref">System.Boolean</span></td>
  564. <td></td>
  565. </tr>
  566. </tbody>
  567. </table>
  568. <h5 id="Terminal_Gui_Toplevel_Running_remarks">Remarks</h5>
  569. <div class="markdown level1 remarks">
  570. Setting this property directly is discouraged. Use <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop">RequestStop()</a> instead.
  571. </div>
  572. <a id="Terminal_Gui_Toplevel_StatusBar_" data-uid="Terminal.Gui.Toplevel.StatusBar*"></a>
  573. <h4 id="Terminal_Gui_Toplevel_StatusBar" data-uid="Terminal.Gui.Toplevel.StatusBar">StatusBar</h4>
  574. <div class="markdown level1 summary">
  575. Gets or sets the status bar for this Toplevel
  576. </div>
  577. <div class="markdown level1 conceptual"></div>
  578. <h5 class="decalaration">Declaration</h5>
  579. <div class="codewrapper">
  580. <pre><code class="lang-csharp hljs">public StatusBar StatusBar { get; set; }</code></pre>
  581. </div>
  582. <h5 class="propertyValue">Property Value</h5>
  583. <table class="table table-bordered table-striped table-condensed">
  584. <thead>
  585. <tr>
  586. <th>Type</th>
  587. <th>Description</th>
  588. </tr>
  589. </thead>
  590. <tbody>
  591. <tr>
  592. <td><a class="xref" href="Terminal.Gui.StatusBar.html">StatusBar</a></td>
  593. <td></td>
  594. </tr>
  595. </tbody>
  596. </table>
  597. <h3 id="methods">Methods
  598. </h3>
  599. <a id="Terminal_Gui_Toplevel_Add_" data-uid="Terminal.Gui.Toplevel.Add*"></a>
  600. <h4 id="Terminal_Gui_Toplevel_Add_Terminal_Gui_View_" data-uid="Terminal.Gui.Toplevel.Add(Terminal.Gui.View)">Add(View)</h4>
  601. <div class="markdown level1 summary">
  602. Adds a subview (child) to this view.
  603. </div>
  604. <div class="markdown level1 conceptual"></div>
  605. <h5 class="decalaration">Declaration</h5>
  606. <div class="codewrapper">
  607. <pre><code class="lang-csharp hljs">public override void Add(View view)</code></pre>
  608. </div>
  609. <h5 class="parameters">Parameters</h5>
  610. <table class="table table-bordered table-striped table-condensed">
  611. <thead>
  612. <tr>
  613. <th>Type</th>
  614. <th>Name</th>
  615. <th>Description</th>
  616. </tr>
  617. </thead>
  618. <tbody>
  619. <tr>
  620. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  621. <td><span class="parametername">view</span></td>
  622. <td></td>
  623. </tr>
  624. </tbody>
  625. </table>
  626. <h5 class="overrides">Overrides</h5>
  627. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">View.Add(View)</a></div>
  628. <h5 id="Terminal_Gui_Toplevel_Add_Terminal_Gui_View__remarks">Remarks</h5>
  629. <div class="markdown level1 remarks">
  630. The Views that have been added to this view can be retrieved via the <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Subviews">Subviews</a> property. See also <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Remove_Terminal_Gui_View_">Remove(View)</a> <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_RemoveAll">RemoveAll()</a>
  631. </div>
  632. <a id="Terminal_Gui_Toplevel_Create_" data-uid="Terminal.Gui.Toplevel.Create*"></a>
  633. <h4 id="Terminal_Gui_Toplevel_Create" data-uid="Terminal.Gui.Toplevel.Create">Create()</h4>
  634. <div class="markdown level1 summary">
  635. Convenience factory method that creates a new Toplevel with the current terminal dimensions.
  636. </div>
  637. <div class="markdown level1 conceptual"></div>
  638. <h5 class="decalaration">Declaration</h5>
  639. <div class="codewrapper">
  640. <pre><code class="lang-csharp hljs">public static Toplevel Create()</code></pre>
  641. </div>
  642. <h5 class="returns">Returns</h5>
  643. <table class="table table-bordered table-striped table-condensed">
  644. <thead>
  645. <tr>
  646. <th>Type</th>
  647. <th>Description</th>
  648. </tr>
  649. </thead>
  650. <tbody>
  651. <tr>
  652. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  653. <td>The create.</td>
  654. </tr>
  655. </tbody>
  656. </table>
  657. <a id="Terminal_Gui_Toplevel_OnKeyDown_" data-uid="Terminal.Gui.Toplevel.OnKeyDown*"></a>
  658. <h4 id="Terminal_Gui_Toplevel_OnKeyDown_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.OnKeyDown(Terminal.Gui.KeyEvent)">OnKeyDown(KeyEvent)</h4>
  659. <div class="markdown level1 summary"></div>
  660. <div class="markdown level1 conceptual"></div>
  661. <h5 class="decalaration">Declaration</h5>
  662. <div class="codewrapper">
  663. <pre><code class="lang-csharp hljs">public override bool OnKeyDown(KeyEvent keyEvent)</code></pre>
  664. </div>
  665. <h5 class="parameters">Parameters</h5>
  666. <table class="table table-bordered table-striped table-condensed">
  667. <thead>
  668. <tr>
  669. <th>Type</th>
  670. <th>Name</th>
  671. <th>Description</th>
  672. </tr>
  673. </thead>
  674. <tbody>
  675. <tr>
  676. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  677. <td><span class="parametername">keyEvent</span></td>
  678. <td>Contains the details about the key that produced the event.</td>
  679. </tr>
  680. </tbody>
  681. </table>
  682. <h5 class="returns">Returns</h5>
  683. <table class="table table-bordered table-striped table-condensed">
  684. <thead>
  685. <tr>
  686. <th>Type</th>
  687. <th>Description</th>
  688. </tr>
  689. </thead>
  690. <tbody>
  691. <tr>
  692. <td><span class="xref">System.Boolean</span></td>
  693. <td></td>
  694. </tr>
  695. </tbody>
  696. </table>
  697. <h5 class="overrides">Overrides</h5>
  698. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyDown_Terminal_Gui_KeyEvent_">View.OnKeyDown(KeyEvent)</a></div>
  699. <a id="Terminal_Gui_Toplevel_OnKeyUp_" data-uid="Terminal.Gui.Toplevel.OnKeyUp*"></a>
  700. <h4 id="Terminal_Gui_Toplevel_OnKeyUp_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.OnKeyUp(Terminal.Gui.KeyEvent)">OnKeyUp(KeyEvent)</h4>
  701. <div class="markdown level1 summary"></div>
  702. <div class="markdown level1 conceptual"></div>
  703. <h5 class="decalaration">Declaration</h5>
  704. <div class="codewrapper">
  705. <pre><code class="lang-csharp hljs">public override bool OnKeyUp(KeyEvent keyEvent)</code></pre>
  706. </div>
  707. <h5 class="parameters">Parameters</h5>
  708. <table class="table table-bordered table-striped table-condensed">
  709. <thead>
  710. <tr>
  711. <th>Type</th>
  712. <th>Name</th>
  713. <th>Description</th>
  714. </tr>
  715. </thead>
  716. <tbody>
  717. <tr>
  718. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  719. <td><span class="parametername">keyEvent</span></td>
  720. <td>Contains the details about the key that produced the event.</td>
  721. </tr>
  722. </tbody>
  723. </table>
  724. <h5 class="returns">Returns</h5>
  725. <table class="table table-bordered table-striped table-condensed">
  726. <thead>
  727. <tr>
  728. <th>Type</th>
  729. <th>Description</th>
  730. </tr>
  731. </thead>
  732. <tbody>
  733. <tr>
  734. <td><span class="xref">System.Boolean</span></td>
  735. <td></td>
  736. </tr>
  737. </tbody>
  738. </table>
  739. <h5 class="overrides">Overrides</h5>
  740. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyUp_Terminal_Gui_KeyEvent_">View.OnKeyUp(KeyEvent)</a></div>
  741. <a id="Terminal_Gui_Toplevel_ProcessColdKey_" data-uid="Terminal.Gui.Toplevel.ProcessColdKey*"></a>
  742. <h4 id="Terminal_Gui_Toplevel_ProcessColdKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.ProcessColdKey(Terminal.Gui.KeyEvent)">ProcessColdKey(KeyEvent)</h4>
  743. <div class="markdown level1 summary">
  744. This method can be overwritten by views that
  745. want to provide accelerator functionality
  746. (Alt-key for example), but without
  747. interefering with normal ProcessKey behavior.
  748. </div>
  749. <div class="markdown level1 conceptual"></div>
  750. <h5 class="decalaration">Declaration</h5>
  751. <div class="codewrapper">
  752. <pre><code class="lang-csharp hljs">public override bool ProcessColdKey(KeyEvent keyEvent)</code></pre>
  753. </div>
  754. <h5 class="parameters">Parameters</h5>
  755. <table class="table table-bordered table-striped table-condensed">
  756. <thead>
  757. <tr>
  758. <th>Type</th>
  759. <th>Name</th>
  760. <th>Description</th>
  761. </tr>
  762. </thead>
  763. <tbody>
  764. <tr>
  765. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  766. <td><span class="parametername">keyEvent</span></td>
  767. <td>Contains the details about the key that produced the event.</td>
  768. </tr>
  769. </tbody>
  770. </table>
  771. <h5 class="returns">Returns</h5>
  772. <table class="table table-bordered table-striped table-condensed">
  773. <thead>
  774. <tr>
  775. <th>Type</th>
  776. <th>Description</th>
  777. </tr>
  778. </thead>
  779. <tbody>
  780. <tr>
  781. <td><span class="xref">System.Boolean</span></td>
  782. <td></td>
  783. </tr>
  784. </tbody>
  785. </table>
  786. <h5 class="overrides">Overrides</h5>
  787. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessColdKey_Terminal_Gui_KeyEvent_">View.ProcessColdKey(KeyEvent)</a></div>
  788. <h5 id="Terminal_Gui_Toplevel_ProcessColdKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  789. <div class="markdown level1 remarks">
  790. <p>
  791. After keys are sent to the subviews on the
  792. current view, all the view are
  793. processed and the key is passed to the views
  794. to allow some of them to process the keystroke
  795. as a cold-key. </p>
  796. <p>
  797. This functionality is used, for example, by
  798. default buttons to act on the enter key.
  799. Processing this as a hot-key would prevent
  800. non-default buttons from consuming the enter
  801. keypress when they have the focus.
  802. </p>
  803. </div>
  804. <a id="Terminal_Gui_Toplevel_ProcessKey_" data-uid="Terminal.Gui.Toplevel.ProcessKey*"></a>
  805. <h4 id="Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  806. <div class="markdown level1 summary">
  807. If the view is focused, gives the view a
  808. chance to process the keystroke.
  809. </div>
  810. <div class="markdown level1 conceptual"></div>
  811. <h5 class="decalaration">Declaration</h5>
  812. <div class="codewrapper">
  813. <pre><code class="lang-csharp hljs">public override bool ProcessKey(KeyEvent keyEvent)</code></pre>
  814. </div>
  815. <h5 class="parameters">Parameters</h5>
  816. <table class="table table-bordered table-striped table-condensed">
  817. <thead>
  818. <tr>
  819. <th>Type</th>
  820. <th>Name</th>
  821. <th>Description</th>
  822. </tr>
  823. </thead>
  824. <tbody>
  825. <tr>
  826. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  827. <td><span class="parametername">keyEvent</span></td>
  828. <td>Contains the details about the key that produced the event.</td>
  829. </tr>
  830. </tbody>
  831. </table>
  832. <h5 class="returns">Returns</h5>
  833. <table class="table table-bordered table-striped table-condensed">
  834. <thead>
  835. <tr>
  836. <th>Type</th>
  837. <th>Description</th>
  838. </tr>
  839. </thead>
  840. <tbody>
  841. <tr>
  842. <td><span class="xref">System.Boolean</span></td>
  843. <td></td>
  844. </tr>
  845. </tbody>
  846. </table>
  847. <h5 class="overrides">Overrides</h5>
  848. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessKey_Terminal_Gui_KeyEvent_">View.ProcessKey(KeyEvent)</a></div>
  849. <h5 id="Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  850. <div class="markdown level1 remarks">
  851. <p>
  852. Views can override this method if they are
  853. interested in processing the given keystroke.
  854. If they consume the keystroke, they must
  855. return true to stop the keystroke from being
  856. processed by other widgets or consumed by the
  857. widget engine. If they return false, the
  858. keystroke will be passed using the ProcessColdKey
  859. method to other views to process.
  860. </p>
  861. <p>
  862. The View implementation does nothing but return false,
  863. so it is not necessary to call base.ProcessKey if you
  864. derive directly from View, but you should if you derive
  865. other View subclasses.
  866. </p>
  867. </div>
  868. <a id="Terminal_Gui_Toplevel_Redraw_" data-uid="Terminal.Gui.Toplevel.Redraw*"></a>
  869. <h4 id="Terminal_Gui_Toplevel_Redraw_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Toplevel.Redraw(Terminal.Gui.Rect)">Redraw(Rect)</h4>
  870. <div class="markdown level1 summary">
  871. Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
  872. </div>
  873. <div class="markdown level1 conceptual"></div>
  874. <h5 class="decalaration">Declaration</h5>
  875. <div class="codewrapper">
  876. <pre><code class="lang-csharp hljs">public override void Redraw(Rect bounds)</code></pre>
  877. </div>
  878. <h5 class="parameters">Parameters</h5>
  879. <table class="table table-bordered table-striped table-condensed">
  880. <thead>
  881. <tr>
  882. <th>Type</th>
  883. <th>Name</th>
  884. <th>Description</th>
  885. </tr>
  886. </thead>
  887. <tbody>
  888. <tr>
  889. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  890. <td><span class="parametername">bounds</span></td>
  891. <td>The bounds (view-relative region) to redraw.</td>
  892. </tr>
  893. </tbody>
  894. </table>
  895. <h5 class="overrides">Overrides</h5>
  896. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">View.Redraw(Rect)</a></div>
  897. <h5 id="Terminal_Gui_Toplevel_Redraw_Terminal_Gui_Rect__remarks">Remarks</h5>
  898. <div class="markdown level1 remarks">
  899. <p>
  900. Always use <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">Bounds</a> (view-relative) when calling <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">Redraw(Rect)</a>, NOT <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">Frame</a> (superview-relative).
  901. </p>
  902. <p>
  903. Views should set the color that they want to use on entry, as otherwise this will inherit
  904. the last color that was set globally on the driver.
  905. </p>
  906. <p>
  907. Overrides of <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">Redraw(Rect)</a> must ensure they do not set <code>Driver.Clip</code> to a clip region
  908. larger than the <code>region</code> parameter.
  909. </p>
  910. </div>
  911. <a id="Terminal_Gui_Toplevel_Remove_" data-uid="Terminal.Gui.Toplevel.Remove*"></a>
  912. <h4 id="Terminal_Gui_Toplevel_Remove_Terminal_Gui_View_" data-uid="Terminal.Gui.Toplevel.Remove(Terminal.Gui.View)">Remove(View)</h4>
  913. <div class="markdown level1 summary">
  914. Removes a subview added via <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">Add(View)</a> or <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">Add(View[])</a> from this View.
  915. </div>
  916. <div class="markdown level1 conceptual"></div>
  917. <h5 class="decalaration">Declaration</h5>
  918. <div class="codewrapper">
  919. <pre><code class="lang-csharp hljs">public override void Remove(View view)</code></pre>
  920. </div>
  921. <h5 class="parameters">Parameters</h5>
  922. <table class="table table-bordered table-striped table-condensed">
  923. <thead>
  924. <tr>
  925. <th>Type</th>
  926. <th>Name</th>
  927. <th>Description</th>
  928. </tr>
  929. </thead>
  930. <tbody>
  931. <tr>
  932. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  933. <td><span class="parametername">view</span></td>
  934. <td></td>
  935. </tr>
  936. </tbody>
  937. </table>
  938. <h5 class="overrides">Overrides</h5>
  939. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Remove_Terminal_Gui_View_">View.Remove(View)</a></div>
  940. <h5 id="Terminal_Gui_Toplevel_Remove_Terminal_Gui_View__remarks">Remarks</h5>
  941. <div class="markdown level1 remarks">
  942. </div>
  943. <a id="Terminal_Gui_Toplevel_RemoveAll_" data-uid="Terminal.Gui.Toplevel.RemoveAll*"></a>
  944. <h4 id="Terminal_Gui_Toplevel_RemoveAll" data-uid="Terminal.Gui.Toplevel.RemoveAll">RemoveAll()</h4>
  945. <div class="markdown level1 summary">
  946. Removes all subviews (children) added via <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">Add(View)</a> or <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">Add(View[])</a> from this View.
  947. </div>
  948. <div class="markdown level1 conceptual"></div>
  949. <h5 class="decalaration">Declaration</h5>
  950. <div class="codewrapper">
  951. <pre><code class="lang-csharp hljs">public override void RemoveAll()</code></pre>
  952. </div>
  953. <h5 class="overrides">Overrides</h5>
  954. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_RemoveAll">View.RemoveAll()</a></div>
  955. <a id="Terminal_Gui_Toplevel_WillPresent_" data-uid="Terminal.Gui.Toplevel.WillPresent*"></a>
  956. <h4 id="Terminal_Gui_Toplevel_WillPresent" data-uid="Terminal.Gui.Toplevel.WillPresent">WillPresent()</h4>
  957. <div class="markdown level1 summary">
  958. Invoked by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> as part of the <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, Boolean&gt;)</a> after
  959. the views have been laid out, and before the views are drawn for the first time.
  960. </div>
  961. <div class="markdown level1 conceptual"></div>
  962. <h5 class="decalaration">Declaration</h5>
  963. <div class="codewrapper">
  964. <pre><code class="lang-csharp hljs">public virtual void WillPresent()</code></pre>
  965. </div>
  966. <h3 id="events">Events
  967. </h3>
  968. <h4 id="Terminal_Gui_Toplevel_Loaded" data-uid="Terminal.Gui.Toplevel.Loaded">Loaded</h4>
  969. <div class="markdown level1 summary">
  970. Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin loaded.
  971. A Loaded event handler is a good place to finalize initialization before calling `<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(Application.RunState, Boolean)</a>.
  972. </div>
  973. <div class="markdown level1 conceptual"></div>
  974. <h5 class="decalaration">Declaration</h5>
  975. <div class="codewrapper">
  976. <pre><code class="lang-csharp hljs">public event Action Loaded</code></pre>
  977. </div>
  978. <h5 class="eventType">Event Type</h5>
  979. <table class="table table-bordered table-striped table-condensed">
  980. <thead>
  981. <tr>
  982. <th>Type</th>
  983. <th>Description</th>
  984. </tr>
  985. </thead>
  986. <tbody>
  987. <tr>
  988. <td><span class="xref">System.Action</span></td>
  989. <td></td>
  990. </tr>
  991. </tbody>
  992. </table>
  993. <h4 id="Terminal_Gui_Toplevel_Ready" data-uid="Terminal.Gui.Toplevel.Ready">Ready</h4>
  994. <div class="markdown level1 summary">
  995. Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> has started it&apos;s first iteration.
  996. Subscribe to this event to perform tasks when the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> has been laid out and focus has been set.
  997. changes. A Ready event handler is a good place to finalize initialization after calling `<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func&lt;Exception, Boolean&gt;)</a>(topLevel)`.
  998. </div>
  999. <div class="markdown level1 conceptual"></div>
  1000. <h5 class="decalaration">Declaration</h5>
  1001. <div class="codewrapper">
  1002. <pre><code class="lang-csharp hljs">public event Action Ready</code></pre>
  1003. </div>
  1004. <h5 class="eventType">Event Type</h5>
  1005. <table class="table table-bordered table-striped table-condensed">
  1006. <thead>
  1007. <tr>
  1008. <th>Type</th>
  1009. <th>Description</th>
  1010. </tr>
  1011. </thead>
  1012. <tbody>
  1013. <tr>
  1014. <td><span class="xref">System.Action</span></td>
  1015. <td></td>
  1016. </tr>
  1017. </tbody>
  1018. </table>
  1019. <h4 id="Terminal_Gui_Toplevel_Unloaded" data-uid="Terminal.Gui.Toplevel.Unloaded">Unloaded</h4>
  1020. <div class="markdown level1 summary">
  1021. Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin unloaded.
  1022. A Unloaded event handler is a good place to disposing after calling `<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(Application.RunState)</a>.
  1023. </div>
  1024. <div class="markdown level1 conceptual"></div>
  1025. <h5 class="decalaration">Declaration</h5>
  1026. <div class="codewrapper">
  1027. <pre><code class="lang-csharp hljs">public event Action Unloaded</code></pre>
  1028. </div>
  1029. <h5 class="eventType">Event Type</h5>
  1030. <table class="table table-bordered table-striped table-condensed">
  1031. <thead>
  1032. <tr>
  1033. <th>Type</th>
  1034. <th>Description</th>
  1035. </tr>
  1036. </thead>
  1037. <tbody>
  1038. <tr>
  1039. <td><span class="xref">System.Action</span></td>
  1040. <td></td>
  1041. </tr>
  1042. </tbody>
  1043. </table>
  1044. <h3 id="implements">Implements</h3>
  1045. <div>
  1046. <span class="xref">System.IDisposable</span>
  1047. </div>
  1048. <div>
  1049. <span class="xref">System.ComponentModel.ISupportInitializeNotification</span>
  1050. </div>
  1051. <div>
  1052. <span class="xref">System.ComponentModel.ISupportInitialize</span>
  1053. </div>
  1054. </article>
  1055. </div>
  1056. <div class="hidden-sm col-md-2" role="complementary">
  1057. <div class="sideaffix">
  1058. <div class="contribution">
  1059. <ul class="nav">
  1060. </ul>
  1061. </div>
  1062. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  1063. <h5>In This Article</h5>
  1064. <div></div>
  1065. </nav>
  1066. </div>
  1067. </div>
  1068. </div>
  1069. </div>
  1070. <footer>
  1071. <div class="grad-bottom"></div>
  1072. <div class="footer">
  1073. <div class="container">
  1074. <span class="pull-right">
  1075. <a href="#top">Back to top</a>
  1076. </span>
  1077. <span>Generated by <strong>DocFX</strong></span>
  1078. </div>
  1079. </div>
  1080. </footer>
  1081. </div>
  1082. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  1083. <script type="text/javascript" src="../../styles/docfx.js"></script>
  1084. <script type="text/javascript" src="../../styles/main.js"></script>
  1085. </body>
  1086. </html>