2
0

Terminal.Gui.Toplevel.html 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  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.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="../../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"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></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_SetNeedsDisplay_Terminal_Gui_Rect_">View.SetNeedsDisplay(Rect)</a>
  190. </div>
  191. <div>
  192. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ChildNeedsDisplay">View.ChildNeedsDisplay()</a>
  193. </div>
  194. <div>
  195. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">View.Add(View[])</a>
  196. </div>
  197. <div>
  198. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewToFront_Terminal_Gui_View_">View.BringSubviewToFront(View)</a>
  199. </div>
  200. <div>
  201. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewToBack_Terminal_Gui_View_">View.SendSubviewToBack(View)</a>
  202. </div>
  203. <div>
  204. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewBackwards_Terminal_Gui_View_">View.SendSubviewBackwards(View)</a>
  205. </div>
  206. <div>
  207. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewForward_Terminal_Gui_View_">View.BringSubviewForward(View)</a>
  208. </div>
  209. <div>
  210. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear">View.Clear()</a>
  211. </div>
  212. <div>
  213. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear_Terminal_Gui_Rect_">View.Clear(Rect)</a>
  214. </div>
  215. <div>
  216. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(Int32, Int32)</a>
  217. </div>
  218. <div>
  219. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClipToBounds">View.ClipToBounds()</a>
  220. </div>
  221. <div>
  222. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetClip_Terminal_Gui_Rect_">View.SetClip(Rect)</a>
  223. </div>
  224. <div>
  225. <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>
  226. </div>
  227. <div>
  228. <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>
  229. </div>
  230. <div>
  231. <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>
  232. </div>
  233. <div>
  234. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Move_System_Int32_System_Int32_">View.Move(Int32, Int32)</a>
  235. </div>
  236. <div>
  237. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_PositionCursor">View.PositionCursor()</a>
  238. </div>
  239. <div>
  240. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HasFocus">View.HasFocus</a>
  241. </div>
  242. <div>
  243. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnAdded_Terminal_Gui_View_">View.OnAdded(View)</a>
  244. </div>
  245. <div>
  246. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnRemoved_Terminal_Gui_View_">View.OnRemoved(View)</a>
  247. </div>
  248. <div>
  249. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnEnter_Terminal_Gui_View_">View.OnEnter(View)</a>
  250. </div>
  251. <div>
  252. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnLeave_Terminal_Gui_View_">View.OnLeave(View)</a>
  253. </div>
  254. <div>
  255. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Focused">View.Focused</a>
  256. </div>
  257. <div>
  258. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MostFocused">View.MostFocused</a>
  259. </div>
  260. <div>
  261. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ColorScheme">View.ColorScheme</a>
  262. </div>
  263. <div>
  264. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddRune_System_Int32_System_Int32_System_Rune_">View.AddRune(Int32, Int32, Rune)</a>
  265. </div>
  266. <div>
  267. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  268. </div>
  269. <div>
  270. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawContent">View.DrawContent</a>
  271. </div>
  272. <div>
  273. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContent_Terminal_Gui_Rect_">View.OnDrawContent(Rect)</a>
  274. </div>
  275. <div>
  276. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetFocus">View.SetFocus()</a>
  277. </div>
  278. <div>
  279. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyPress">View.KeyPress</a>
  280. </div>
  281. <div>
  282. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessHotKey_Terminal_Gui_KeyEvent_">View.ProcessHotKey(KeyEvent)</a>
  283. </div>
  284. <div>
  285. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyDown">View.KeyDown</a>
  286. </div>
  287. <div>
  288. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyUp">View.KeyUp</a>
  289. </div>
  290. <div>
  291. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnsureFocus">View.EnsureFocus()</a>
  292. </div>
  293. <div>
  294. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst">View.FocusFirst()</a>
  295. </div>
  296. <div>
  297. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusLast">View.FocusLast()</a>
  298. </div>
  299. <div>
  300. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusPrev">View.FocusPrev()</a>
  301. </div>
  302. <div>
  303. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusNext">View.FocusNext()</a>
  304. </div>
  305. <div>
  306. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStarted">View.LayoutStarted</a>
  307. </div>
  308. <div>
  309. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutComplete">View.LayoutComplete</a>
  310. </div>
  311. <div>
  312. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Initialized">View.Initialized</a>
  313. </div>
  314. <div>
  315. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutSubviews">View.LayoutSubviews()</a>
  316. </div>
  317. <div>
  318. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Text">View.Text</a>
  319. </div>
  320. <div>
  321. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AutoSize">View.AutoSize</a>
  322. </div>
  323. <div>
  324. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TextAlignment">View.TextAlignment</a>
  325. </div>
  326. <div>
  327. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsInitialized">View.IsInitialized</a>
  328. </div>
  329. <div>
  330. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ToString">View.ToString()</a>
  331. </div>
  332. <div>
  333. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEnter_Terminal_Gui_MouseEvent_">View.OnMouseEnter(MouseEvent)</a>
  334. </div>
  335. <div>
  336. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseLeave_Terminal_Gui_MouseEvent_">View.OnMouseLeave(MouseEvent)</a>
  337. </div>
  338. <div>
  339. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEvent_Terminal_Gui_MouseEvent_">View.OnMouseEvent(MouseEvent)</a>
  340. </div>
  341. <div>
  342. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseClick_Terminal_Gui_View_MouseEventArgs_">View.OnMouseClick(View.MouseEventArgs)</a>
  343. </div>
  344. <div>
  345. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Dispose_System_Boolean_">View.Dispose(Boolean)</a>
  346. </div>
  347. <div>
  348. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BeginInit">View.BeginInit()</a>
  349. </div>
  350. <div>
  351. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EndInit">View.EndInit()</a>
  352. </div>
  353. <div>
  354. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Visible">View.Visible</a>
  355. </div>
  356. <div>
  357. <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_MouseEvent_Terminal_Gui_MouseEvent_">Responder.MouseEvent(MouseEvent)</a>
  358. </div>
  359. <div>
  360. <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_Dispose">Responder.Dispose()</a>
  361. </div>
  362. <div>
  363. <span class="xref">System.Object.Equals(System.Object)</span>
  364. </div>
  365. <div>
  366. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  367. </div>
  368. <div>
  369. <span class="xref">System.Object.GetHashCode()</span>
  370. </div>
  371. <div>
  372. <span class="xref">System.Object.GetType()</span>
  373. </div>
  374. <div>
  375. <span class="xref">System.Object.MemberwiseClone()</span>
  376. </div>
  377. <div>
  378. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  379. </div>
  380. </div>
  381. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  382. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  383. <h5 id="Terminal_Gui_Toplevel_syntax">Syntax</h5>
  384. <div class="codewrapper">
  385. <pre><code class="lang-csharp hljs">public class Toplevel : View, IDisposable, ISupportInitializeNotification, ISupportInitialize</code></pre>
  386. </div>
  387. <h5 id="Terminal_Gui_Toplevel_remarks"><strong>Remarks</strong></h5>
  388. <div class="markdown level0 remarks">
  389. <p>
  390. Toplevels can be modally executing views, started by calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_">Run(Toplevel)</a>.
  391. They return control to the caller when <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop">RequestStop()</a> has
  392. been called (which sets the <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Running</a> property to false).
  393. </p>
  394. <p>
  395. 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>.
  396. 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
  397. 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
  398. call <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_">Run(Toplevel)</a>.
  399. </p>
  400. <p>
  401. Toplevels can also opt-in to more sophisticated initialization
  402. by implementing <span class="xref">System.ComponentModel.ISupportInitialize</span>. When they do
  403. so, the <span class="xref">System.ComponentModel.ISupportInitialize.BeginInit()</span> and
  404. <span class="xref">System.ComponentModel.ISupportInitialize.EndInit()</span> methods will be called
  405. before running the view.
  406. If first-run-only initialization is preferred, the <span class="xref">System.ComponentModel.ISupportInitializeNotification</span>
  407. can be implemented too, in which case the <span class="xref">System.ComponentModel.ISupportInitialize</span>
  408. methods will only be called if <span class="xref">System.ComponentModel.ISupportInitializeNotification.IsInitialized</span>
  409. is <span class="xref">false</span>. This allows proper <a class="xref" href="Terminal.Gui.View.html">View</a> inheritance hierarchies
  410. to override base class layout code optimally by doing so only on first run,
  411. instead of on every run.
  412. </p>
  413. </div>
  414. <h3 id="constructors">Constructors
  415. </h3>
  416. <a id="Terminal_Gui_Toplevel__ctor_" data-uid="Terminal.Gui.Toplevel.#ctor*"></a>
  417. <h4 id="Terminal_Gui_Toplevel__ctor" data-uid="Terminal.Gui.Toplevel.#ctor">Toplevel()</h4>
  418. <div class="markdown level1 summary">
  419. 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.
  420. </div>
  421. <div class="markdown level1 conceptual"></div>
  422. <h5 class="decalaration">Declaration</h5>
  423. <div class="codewrapper">
  424. <pre><code class="lang-csharp hljs">public Toplevel()</code></pre>
  425. </div>
  426. <a id="Terminal_Gui_Toplevel__ctor_" data-uid="Terminal.Gui.Toplevel.#ctor*"></a>
  427. <h4 id="Terminal_Gui_Toplevel__ctor_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Toplevel.#ctor(Terminal.Gui.Rect)">Toplevel(Rect)</h4>
  428. <div class="markdown level1 summary">
  429. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with the specified absolute layout.
  430. </div>
  431. <div class="markdown level1 conceptual"></div>
  432. <h5 class="decalaration">Declaration</h5>
  433. <div class="codewrapper">
  434. <pre><code class="lang-csharp hljs">public Toplevel(Rect frame)</code></pre>
  435. </div>
  436. <h5 class="parameters">Parameters</h5>
  437. <table class="table table-bordered table-striped table-condensed">
  438. <thead>
  439. <tr>
  440. <th>Type</th>
  441. <th>Name</th>
  442. <th>Description</th>
  443. </tr>
  444. </thead>
  445. <tbody>
  446. <tr>
  447. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  448. <td><span class="parametername">frame</span></td>
  449. <td>A superview-relative rectangle specifying the location and size for the new Toplevel</td>
  450. </tr>
  451. </tbody>
  452. </table>
  453. <h3 id="properties">Properties
  454. </h3>
  455. <a id="Terminal_Gui_Toplevel_CanFocus_" data-uid="Terminal.Gui.Toplevel.CanFocus*"></a>
  456. <h4 id="Terminal_Gui_Toplevel_CanFocus" data-uid="Terminal.Gui.Toplevel.CanFocus">CanFocus</h4>
  457. <div class="markdown level1 summary">
  458. Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> can focus.
  459. </div>
  460. <div class="markdown level1 conceptual"></div>
  461. <h5 class="decalaration">Declaration</h5>
  462. <div class="codewrapper">
  463. <pre><code class="lang-csharp hljs">public override bool CanFocus { get; }</code></pre>
  464. </div>
  465. <h5 class="propertyValue">Property Value</h5>
  466. <table class="table table-bordered table-striped table-condensed">
  467. <thead>
  468. <tr>
  469. <th>Type</th>
  470. <th>Description</th>
  471. </tr>
  472. </thead>
  473. <tbody>
  474. <tr>
  475. <td><span class="xref">System.Boolean</span></td>
  476. <td><code>true</code> if can focus; otherwise, <code>false</code>.</td>
  477. </tr>
  478. </tbody>
  479. </table>
  480. <h5 class="overrides">Overrides</h5>
  481. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_CanFocus">View.CanFocus</a></div>
  482. <a id="Terminal_Gui_Toplevel_MenuBar_" data-uid="Terminal.Gui.Toplevel.MenuBar*"></a>
  483. <h4 id="Terminal_Gui_Toplevel_MenuBar" data-uid="Terminal.Gui.Toplevel.MenuBar">MenuBar</h4>
  484. <div class="markdown level1 summary">
  485. Gets or sets the menu for this Toplevel
  486. </div>
  487. <div class="markdown level1 conceptual"></div>
  488. <h5 class="decalaration">Declaration</h5>
  489. <div class="codewrapper">
  490. <pre><code class="lang-csharp hljs">public MenuBar MenuBar { get; set; }</code></pre>
  491. </div>
  492. <h5 class="propertyValue">Property Value</h5>
  493. <table class="table table-bordered table-striped table-condensed">
  494. <thead>
  495. <tr>
  496. <th>Type</th>
  497. <th>Description</th>
  498. </tr>
  499. </thead>
  500. <tbody>
  501. <tr>
  502. <td><a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a></td>
  503. <td></td>
  504. </tr>
  505. </tbody>
  506. </table>
  507. <a id="Terminal_Gui_Toplevel_Modal_" data-uid="Terminal.Gui.Toplevel.Modal*"></a>
  508. <h4 id="Terminal_Gui_Toplevel_Modal" data-uid="Terminal.Gui.Toplevel.Modal">Modal</h4>
  509. <div class="markdown level1 summary">
  510. Determines whether the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> is modal or not.
  511. Causes <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a> to propagate keys upwards
  512. by default unless set to <span class="xref">true</span>.
  513. </div>
  514. <div class="markdown level1 conceptual"></div>
  515. <h5 class="decalaration">Declaration</h5>
  516. <div class="codewrapper">
  517. <pre><code class="lang-csharp hljs">public bool Modal { get; set; }</code></pre>
  518. </div>
  519. <h5 class="propertyValue">Property Value</h5>
  520. <table class="table table-bordered table-striped table-condensed">
  521. <thead>
  522. <tr>
  523. <th>Type</th>
  524. <th>Description</th>
  525. </tr>
  526. </thead>
  527. <tbody>
  528. <tr>
  529. <td><span class="xref">System.Boolean</span></td>
  530. <td></td>
  531. </tr>
  532. </tbody>
  533. </table>
  534. <a id="Terminal_Gui_Toplevel_Running_" data-uid="Terminal.Gui.Toplevel.Running*"></a>
  535. <h4 id="Terminal_Gui_Toplevel_Running" data-uid="Terminal.Gui.Toplevel.Running">Running</h4>
  536. <div class="markdown level1 summary">
  537. 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.
  538. </div>
  539. <div class="markdown level1 conceptual"></div>
  540. <h5 class="decalaration">Declaration</h5>
  541. <div class="codewrapper">
  542. <pre><code class="lang-csharp hljs">public bool Running { get; set; }</code></pre>
  543. </div>
  544. <h5 class="propertyValue">Property Value</h5>
  545. <table class="table table-bordered table-striped table-condensed">
  546. <thead>
  547. <tr>
  548. <th>Type</th>
  549. <th>Description</th>
  550. </tr>
  551. </thead>
  552. <tbody>
  553. <tr>
  554. <td><span class="xref">System.Boolean</span></td>
  555. <td></td>
  556. </tr>
  557. </tbody>
  558. </table>
  559. <h5 id="Terminal_Gui_Toplevel_Running_remarks">Remarks</h5>
  560. <div class="markdown level1 remarks">
  561. Setting this property directly is discouraged. Use <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop">RequestStop()</a> instead.
  562. </div>
  563. <a id="Terminal_Gui_Toplevel_StatusBar_" data-uid="Terminal.Gui.Toplevel.StatusBar*"></a>
  564. <h4 id="Terminal_Gui_Toplevel_StatusBar" data-uid="Terminal.Gui.Toplevel.StatusBar">StatusBar</h4>
  565. <div class="markdown level1 summary">
  566. Gets or sets the status bar for this Toplevel
  567. </div>
  568. <div class="markdown level1 conceptual"></div>
  569. <h5 class="decalaration">Declaration</h5>
  570. <div class="codewrapper">
  571. <pre><code class="lang-csharp hljs">public StatusBar StatusBar { get; set; }</code></pre>
  572. </div>
  573. <h5 class="propertyValue">Property Value</h5>
  574. <table class="table table-bordered table-striped table-condensed">
  575. <thead>
  576. <tr>
  577. <th>Type</th>
  578. <th>Description</th>
  579. </tr>
  580. </thead>
  581. <tbody>
  582. <tr>
  583. <td><a class="xref" href="Terminal.Gui.StatusBar.html">StatusBar</a></td>
  584. <td></td>
  585. </tr>
  586. </tbody>
  587. </table>
  588. <h3 id="methods">Methods
  589. </h3>
  590. <a id="Terminal_Gui_Toplevel_Add_" data-uid="Terminal.Gui.Toplevel.Add*"></a>
  591. <h4 id="Terminal_Gui_Toplevel_Add_Terminal_Gui_View_" data-uid="Terminal.Gui.Toplevel.Add(Terminal.Gui.View)">Add(View)</h4>
  592. <div class="markdown level1 summary">
  593. Adds a subview (child) to this view.
  594. </div>
  595. <div class="markdown level1 conceptual"></div>
  596. <h5 class="decalaration">Declaration</h5>
  597. <div class="codewrapper">
  598. <pre><code class="lang-csharp hljs">public override void Add(View view)</code></pre>
  599. </div>
  600. <h5 class="parameters">Parameters</h5>
  601. <table class="table table-bordered table-striped table-condensed">
  602. <thead>
  603. <tr>
  604. <th>Type</th>
  605. <th>Name</th>
  606. <th>Description</th>
  607. </tr>
  608. </thead>
  609. <tbody>
  610. <tr>
  611. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  612. <td><span class="parametername">view</span></td>
  613. <td></td>
  614. </tr>
  615. </tbody>
  616. </table>
  617. <h5 class="overrides">Overrides</h5>
  618. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">View.Add(View)</a></div>
  619. <h5 id="Terminal_Gui_Toplevel_Add_Terminal_Gui_View__remarks">Remarks</h5>
  620. <div class="markdown level1 remarks">
  621. 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>
  622. </div>
  623. <a id="Terminal_Gui_Toplevel_Create_" data-uid="Terminal.Gui.Toplevel.Create*"></a>
  624. <h4 id="Terminal_Gui_Toplevel_Create" data-uid="Terminal.Gui.Toplevel.Create">Create()</h4>
  625. <div class="markdown level1 summary">
  626. Convenience factory method that creates a new Toplevel with the current terminal dimensions.
  627. </div>
  628. <div class="markdown level1 conceptual"></div>
  629. <h5 class="decalaration">Declaration</h5>
  630. <div class="codewrapper">
  631. <pre><code class="lang-csharp hljs">public static Toplevel Create()</code></pre>
  632. </div>
  633. <h5 class="returns">Returns</h5>
  634. <table class="table table-bordered table-striped table-condensed">
  635. <thead>
  636. <tr>
  637. <th>Type</th>
  638. <th>Description</th>
  639. </tr>
  640. </thead>
  641. <tbody>
  642. <tr>
  643. <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
  644. <td>The create.</td>
  645. </tr>
  646. </tbody>
  647. </table>
  648. <a id="Terminal_Gui_Toplevel_OnKeyDown_" data-uid="Terminal.Gui.Toplevel.OnKeyDown*"></a>
  649. <h4 id="Terminal_Gui_Toplevel_OnKeyDown_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.OnKeyDown(Terminal.Gui.KeyEvent)">OnKeyDown(KeyEvent)</h4>
  650. <div class="markdown level1 summary"></div>
  651. <div class="markdown level1 conceptual"></div>
  652. <h5 class="decalaration">Declaration</h5>
  653. <div class="codewrapper">
  654. <pre><code class="lang-csharp hljs">public override bool OnKeyDown(KeyEvent keyEvent)</code></pre>
  655. </div>
  656. <h5 class="parameters">Parameters</h5>
  657. <table class="table table-bordered table-striped table-condensed">
  658. <thead>
  659. <tr>
  660. <th>Type</th>
  661. <th>Name</th>
  662. <th>Description</th>
  663. </tr>
  664. </thead>
  665. <tbody>
  666. <tr>
  667. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  668. <td><span class="parametername">keyEvent</span></td>
  669. <td>Contains the details about the key that produced the event.</td>
  670. </tr>
  671. </tbody>
  672. </table>
  673. <h5 class="returns">Returns</h5>
  674. <table class="table table-bordered table-striped table-condensed">
  675. <thead>
  676. <tr>
  677. <th>Type</th>
  678. <th>Description</th>
  679. </tr>
  680. </thead>
  681. <tbody>
  682. <tr>
  683. <td><span class="xref">System.Boolean</span></td>
  684. <td></td>
  685. </tr>
  686. </tbody>
  687. </table>
  688. <h5 class="overrides">Overrides</h5>
  689. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyDown_Terminal_Gui_KeyEvent_">View.OnKeyDown(KeyEvent)</a></div>
  690. <a id="Terminal_Gui_Toplevel_OnKeyUp_" data-uid="Terminal.Gui.Toplevel.OnKeyUp*"></a>
  691. <h4 id="Terminal_Gui_Toplevel_OnKeyUp_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.OnKeyUp(Terminal.Gui.KeyEvent)">OnKeyUp(KeyEvent)</h4>
  692. <div class="markdown level1 summary"></div>
  693. <div class="markdown level1 conceptual"></div>
  694. <h5 class="decalaration">Declaration</h5>
  695. <div class="codewrapper">
  696. <pre><code class="lang-csharp hljs">public override bool OnKeyUp(KeyEvent keyEvent)</code></pre>
  697. </div>
  698. <h5 class="parameters">Parameters</h5>
  699. <table class="table table-bordered table-striped table-condensed">
  700. <thead>
  701. <tr>
  702. <th>Type</th>
  703. <th>Name</th>
  704. <th>Description</th>
  705. </tr>
  706. </thead>
  707. <tbody>
  708. <tr>
  709. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  710. <td><span class="parametername">keyEvent</span></td>
  711. <td>Contains the details about the key that produced the event.</td>
  712. </tr>
  713. </tbody>
  714. </table>
  715. <h5 class="returns">Returns</h5>
  716. <table class="table table-bordered table-striped table-condensed">
  717. <thead>
  718. <tr>
  719. <th>Type</th>
  720. <th>Description</th>
  721. </tr>
  722. </thead>
  723. <tbody>
  724. <tr>
  725. <td><span class="xref">System.Boolean</span></td>
  726. <td></td>
  727. </tr>
  728. </tbody>
  729. </table>
  730. <h5 class="overrides">Overrides</h5>
  731. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyUp_Terminal_Gui_KeyEvent_">View.OnKeyUp(KeyEvent)</a></div>
  732. <a id="Terminal_Gui_Toplevel_ProcessColdKey_" data-uid="Terminal.Gui.Toplevel.ProcessColdKey*"></a>
  733. <h4 id="Terminal_Gui_Toplevel_ProcessColdKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.ProcessColdKey(Terminal.Gui.KeyEvent)">ProcessColdKey(KeyEvent)</h4>
  734. <div class="markdown level1 summary">
  735. This method can be overwritten by views that
  736. want to provide accelerator functionality
  737. (Alt-key for example), but without
  738. interefering with normal ProcessKey behavior.
  739. </div>
  740. <div class="markdown level1 conceptual"></div>
  741. <h5 class="decalaration">Declaration</h5>
  742. <div class="codewrapper">
  743. <pre><code class="lang-csharp hljs">public override bool ProcessColdKey(KeyEvent keyEvent)</code></pre>
  744. </div>
  745. <h5 class="parameters">Parameters</h5>
  746. <table class="table table-bordered table-striped table-condensed">
  747. <thead>
  748. <tr>
  749. <th>Type</th>
  750. <th>Name</th>
  751. <th>Description</th>
  752. </tr>
  753. </thead>
  754. <tbody>
  755. <tr>
  756. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  757. <td><span class="parametername">keyEvent</span></td>
  758. <td>Contains the details about the key that produced the event.</td>
  759. </tr>
  760. </tbody>
  761. </table>
  762. <h5 class="returns">Returns</h5>
  763. <table class="table table-bordered table-striped table-condensed">
  764. <thead>
  765. <tr>
  766. <th>Type</th>
  767. <th>Description</th>
  768. </tr>
  769. </thead>
  770. <tbody>
  771. <tr>
  772. <td><span class="xref">System.Boolean</span></td>
  773. <td></td>
  774. </tr>
  775. </tbody>
  776. </table>
  777. <h5 class="overrides">Overrides</h5>
  778. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessColdKey_Terminal_Gui_KeyEvent_">View.ProcessColdKey(KeyEvent)</a></div>
  779. <h5 id="Terminal_Gui_Toplevel_ProcessColdKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  780. <div class="markdown level1 remarks">
  781. <p>
  782. After keys are sent to the subviews on the
  783. current view, all the view are
  784. processed and the key is passed to the views
  785. to allow some of them to process the keystroke
  786. as a cold-key. </p>
  787. <p>
  788. This functionality is used, for example, by
  789. default buttons to act on the enter key.
  790. Processing this as a hot-key would prevent
  791. non-default buttons from consuming the enter
  792. keypress when they have the focus.
  793. </p>
  794. </div>
  795. <a id="Terminal_Gui_Toplevel_ProcessKey_" data-uid="Terminal.Gui.Toplevel.ProcessKey*"></a>
  796. <h4 id="Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Toplevel.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  797. <div class="markdown level1 summary">
  798. If the view is focused, gives the view a
  799. chance to process the keystroke.
  800. </div>
  801. <div class="markdown level1 conceptual"></div>
  802. <h5 class="decalaration">Declaration</h5>
  803. <div class="codewrapper">
  804. <pre><code class="lang-csharp hljs">public override bool ProcessKey(KeyEvent keyEvent)</code></pre>
  805. </div>
  806. <h5 class="parameters">Parameters</h5>
  807. <table class="table table-bordered table-striped 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.KeyEvent.html">KeyEvent</a></td>
  818. <td><span class="parametername">keyEvent</span></td>
  819. <td>Contains the details about the key that produced the event.</td>
  820. </tr>
  821. </tbody>
  822. </table>
  823. <h5 class="returns">Returns</h5>
  824. <table class="table table-bordered table-striped table-condensed">
  825. <thead>
  826. <tr>
  827. <th>Type</th>
  828. <th>Description</th>
  829. </tr>
  830. </thead>
  831. <tbody>
  832. <tr>
  833. <td><span class="xref">System.Boolean</span></td>
  834. <td></td>
  835. </tr>
  836. </tbody>
  837. </table>
  838. <h5 class="overrides">Overrides</h5>
  839. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessKey_Terminal_Gui_KeyEvent_">View.ProcessKey(KeyEvent)</a></div>
  840. <h5 id="Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  841. <div class="markdown level1 remarks">
  842. <p>
  843. Views can override this method if they are
  844. interested in processing the given keystroke.
  845. If they consume the keystroke, they must
  846. return true to stop the keystroke from being
  847. processed by other widgets or consumed by the
  848. widget engine. If they return false, the
  849. keystroke will be passed using the ProcessColdKey
  850. method to other views to process.
  851. </p>
  852. <p>
  853. The View implementation does nothing but return false,
  854. so it is not necessary to call base.ProcessKey if you
  855. derive directly from View, but you should if you derive
  856. other View subclasses.
  857. </p>
  858. </div>
  859. <a id="Terminal_Gui_Toplevel_Redraw_" data-uid="Terminal.Gui.Toplevel.Redraw*"></a>
  860. <h4 id="Terminal_Gui_Toplevel_Redraw_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Toplevel.Redraw(Terminal.Gui.Rect)">Redraw(Rect)</h4>
  861. <div class="markdown level1 summary">
  862. Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
  863. </div>
  864. <div class="markdown level1 conceptual"></div>
  865. <h5 class="decalaration">Declaration</h5>
  866. <div class="codewrapper">
  867. <pre><code class="lang-csharp hljs">public override void Redraw(Rect bounds)</code></pre>
  868. </div>
  869. <h5 class="parameters">Parameters</h5>
  870. <table class="table table-bordered table-striped table-condensed">
  871. <thead>
  872. <tr>
  873. <th>Type</th>
  874. <th>Name</th>
  875. <th>Description</th>
  876. </tr>
  877. </thead>
  878. <tbody>
  879. <tr>
  880. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  881. <td><span class="parametername">bounds</span></td>
  882. <td>The bounds (view-relative region) to redraw.</td>
  883. </tr>
  884. </tbody>
  885. </table>
  886. <h5 class="overrides">Overrides</h5>
  887. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">View.Redraw(Rect)</a></div>
  888. <h5 id="Terminal_Gui_Toplevel_Redraw_Terminal_Gui_Rect__remarks">Remarks</h5>
  889. <div class="markdown level1 remarks">
  890. <p>
  891. 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).
  892. </p>
  893. <p>
  894. Views should set the color that they want to use on entry, as otherwise this will inherit
  895. the last color that was set globally on the driver.
  896. </p>
  897. <p>
  898. 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
  899. larger than the <code>region</code> parameter.
  900. </p>
  901. </div>
  902. <a id="Terminal_Gui_Toplevel_Remove_" data-uid="Terminal.Gui.Toplevel.Remove*"></a>
  903. <h4 id="Terminal_Gui_Toplevel_Remove_Terminal_Gui_View_" data-uid="Terminal.Gui.Toplevel.Remove(Terminal.Gui.View)">Remove(View)</h4>
  904. <div class="markdown level1 summary">
  905. 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.
  906. </div>
  907. <div class="markdown level1 conceptual"></div>
  908. <h5 class="decalaration">Declaration</h5>
  909. <div class="codewrapper">
  910. <pre><code class="lang-csharp hljs">public override void Remove(View view)</code></pre>
  911. </div>
  912. <h5 class="parameters">Parameters</h5>
  913. <table class="table table-bordered table-striped table-condensed">
  914. <thead>
  915. <tr>
  916. <th>Type</th>
  917. <th>Name</th>
  918. <th>Description</th>
  919. </tr>
  920. </thead>
  921. <tbody>
  922. <tr>
  923. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  924. <td><span class="parametername">view</span></td>
  925. <td></td>
  926. </tr>
  927. </tbody>
  928. </table>
  929. <h5 class="overrides">Overrides</h5>
  930. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Remove_Terminal_Gui_View_">View.Remove(View)</a></div>
  931. <h5 id="Terminal_Gui_Toplevel_Remove_Terminal_Gui_View__remarks">Remarks</h5>
  932. <div class="markdown level1 remarks">
  933. </div>
  934. <a id="Terminal_Gui_Toplevel_RemoveAll_" data-uid="Terminal.Gui.Toplevel.RemoveAll*"></a>
  935. <h4 id="Terminal_Gui_Toplevel_RemoveAll" data-uid="Terminal.Gui.Toplevel.RemoveAll">RemoveAll()</h4>
  936. <div class="markdown level1 summary">
  937. 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.
  938. </div>
  939. <div class="markdown level1 conceptual"></div>
  940. <h5 class="decalaration">Declaration</h5>
  941. <div class="codewrapper">
  942. <pre><code class="lang-csharp hljs">public override void RemoveAll()</code></pre>
  943. </div>
  944. <h5 class="overrides">Overrides</h5>
  945. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_RemoveAll">View.RemoveAll()</a></div>
  946. <a id="Terminal_Gui_Toplevel_WillPresent_" data-uid="Terminal.Gui.Toplevel.WillPresent*"></a>
  947. <h4 id="Terminal_Gui_Toplevel_WillPresent" data-uid="Terminal.Gui.Toplevel.WillPresent">WillPresent()</h4>
  948. <div class="markdown level1 summary">
  949. 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_">Run(Toplevel)</a> after
  950. the views have been laid out, and before the views are drawn for the first time.
  951. </div>
  952. <div class="markdown level1 conceptual"></div>
  953. <h5 class="decalaration">Declaration</h5>
  954. <div class="codewrapper">
  955. <pre><code class="lang-csharp hljs">public virtual void WillPresent()</code></pre>
  956. </div>
  957. <h3 id="events">Events
  958. </h3>
  959. <h4 id="Terminal_Gui_Toplevel_Loaded" data-uid="Terminal.Gui.Toplevel.Loaded">Loaded</h4>
  960. <div class="markdown level1 summary">
  961. Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin loaded.
  962. 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>.
  963. </div>
  964. <div class="markdown level1 conceptual"></div>
  965. <h5 class="decalaration">Declaration</h5>
  966. <div class="codewrapper">
  967. <pre><code class="lang-csharp hljs">public event Action Loaded</code></pre>
  968. </div>
  969. <h5 class="eventType">Event Type</h5>
  970. <table class="table table-bordered table-striped table-condensed">
  971. <thead>
  972. <tr>
  973. <th>Type</th>
  974. <th>Description</th>
  975. </tr>
  976. </thead>
  977. <tbody>
  978. <tr>
  979. <td><span class="xref">System.Action</span></td>
  980. <td></td>
  981. </tr>
  982. </tbody>
  983. </table>
  984. <h4 id="Terminal_Gui_Toplevel_Ready" data-uid="Terminal.Gui.Toplevel.Ready">Ready</h4>
  985. <div class="markdown level1 summary">
  986. Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> has started it&apos;s first iteration.
  987. 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.
  988. 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">Run()</a>(topLevel)`.
  989. </div>
  990. <div class="markdown level1 conceptual"></div>
  991. <h5 class="decalaration">Declaration</h5>
  992. <div class="codewrapper">
  993. <pre><code class="lang-csharp hljs">public event Action Ready</code></pre>
  994. </div>
  995. <h5 class="eventType">Event Type</h5>
  996. <table class="table table-bordered table-striped table-condensed">
  997. <thead>
  998. <tr>
  999. <th>Type</th>
  1000. <th>Description</th>
  1001. </tr>
  1002. </thead>
  1003. <tbody>
  1004. <tr>
  1005. <td><span class="xref">System.Action</span></td>
  1006. <td></td>
  1007. </tr>
  1008. </tbody>
  1009. </table>
  1010. <h4 id="Terminal_Gui_Toplevel_Unloaded" data-uid="Terminal.Gui.Toplevel.Unloaded">Unloaded</h4>
  1011. <div class="markdown level1 summary">
  1012. Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin unloaded.
  1013. 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>.
  1014. </div>
  1015. <div class="markdown level1 conceptual"></div>
  1016. <h5 class="decalaration">Declaration</h5>
  1017. <div class="codewrapper">
  1018. <pre><code class="lang-csharp hljs">public event Action Unloaded</code></pre>
  1019. </div>
  1020. <h5 class="eventType">Event Type</h5>
  1021. <table class="table table-bordered table-striped table-condensed">
  1022. <thead>
  1023. <tr>
  1024. <th>Type</th>
  1025. <th>Description</th>
  1026. </tr>
  1027. </thead>
  1028. <tbody>
  1029. <tr>
  1030. <td><span class="xref">System.Action</span></td>
  1031. <td></td>
  1032. </tr>
  1033. </tbody>
  1034. </table>
  1035. <h3 id="implements">Implements</h3>
  1036. <div>
  1037. <span class="xref">System.IDisposable</span>
  1038. </div>
  1039. <div>
  1040. <span class="xref">System.ComponentModel.ISupportInitializeNotification</span>
  1041. </div>
  1042. <div>
  1043. <span class="xref">System.ComponentModel.ISupportInitialize</span>
  1044. </div>
  1045. </article>
  1046. </div>
  1047. <div class="hidden-sm col-md-2" role="complementary">
  1048. <div class="sideaffix">
  1049. <div class="contribution">
  1050. <ul class="nav">
  1051. </ul>
  1052. </div>
  1053. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  1054. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  1055. </nav>
  1056. </div>
  1057. </div>
  1058. </div>
  1059. </div>
  1060. <footer>
  1061. <div class="grad-bottom"></div>
  1062. <div class="footer">
  1063. <div class="container">
  1064. <span class="pull-right">
  1065. <a href="#top">Back to top</a>
  1066. </span>
  1067. <span>Generated by <strong>DocFX</strong></span>
  1068. </div>
  1069. </div>
  1070. </footer>
  1071. </div>
  1072. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  1073. <script type="text/javascript" src="../../styles/docfx.js"></script>
  1074. <script type="text/javascript" src="../../styles/main.js"></script>
  1075. </body>
  1076. </html>