Terminal.Gui.Dialog.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  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 Dialog
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Dialog
  11. ">
  12. <meta name="generator" content="docfx 2.54.0.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.Dialog">
  73. <h1 id="Terminal_Gui_Dialog" data-uid="Terminal.Gui.Dialog" class="text-break">Class Dialog
  74. </h1>
  75. <div class="markdown level0 summary">
  76. The <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> <a class="xref" href="Terminal.Gui.View.html">View</a> is a <a class="xref" href="Terminal.Gui.Window.html">Window</a> that by default is centered and contains one
  77. or more <a class="xref" href="Terminal.Gui.Button.html">Button</a>s. It defaults to the <a class="xref" href="Terminal.Gui.Colors.html#Terminal_Gui_Colors_Dialog">Dialog</a> color scheme and has a 1 cell padding around the edges.
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><span class="xref">System.Object</span></div>
  83. <div class="level1"><a class="xref" href="Terminal.Gui.Responder.html">Responder</a></div>
  84. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  85. <div class="level3"><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></div>
  86. <div class="level4"><a class="xref" href="Terminal.Gui.Window.html">Window</a></div>
  87. <div class="level5"><span class="xref">Dialog</span></div>
  88. <div class="level6"><a class="xref" href="Terminal.Gui.FileDialog.html">FileDialog</a></div>
  89. </div>
  90. <div classs="implements">
  91. <h5>Implements</h5>
  92. <div><span class="xref">System.Collections.IEnumerable</span></div>
  93. </div>
  94. <div class="inheritedMembers">
  95. <h5>Inherited Members</h5>
  96. <div>
  97. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Title">Window.Title</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_GetEnumerator">Window.GetEnumerator()</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Add_Terminal_Gui_View_">Window.Add(View)</a>
  104. </div>
  105. <div>
  106. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Remove_Terminal_Gui_View_">Window.Remove(View)</a>
  107. </div>
  108. <div>
  109. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_RemoveAll">Window.RemoveAll()</a>
  110. </div>
  111. <div>
  112. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Redraw_Terminal_Gui_Rect_">Window.Redraw(Rect)</a>
  113. </div>
  114. <div>
  115. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_MouseEvent_Terminal_Gui_MouseEvent_">Window.MouseEvent(MouseEvent)</a>
  116. </div>
  117. <div>
  118. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Toplevel.Running</a>
  119. </div>
  120. <div>
  121. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Ready">Toplevel.Ready</a>
  122. </div>
  123. <div>
  124. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Create">Toplevel.Create()</a>
  125. </div>
  126. <div>
  127. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_CanFocus">Toplevel.CanFocus</a>
  128. </div>
  129. <div>
  130. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Modal">Toplevel.Modal</a>
  131. </div>
  132. <div>
  133. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_MenuBar">Toplevel.MenuBar</a>
  134. </div>
  135. <div>
  136. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_StatusBar">Toplevel.StatusBar</a>
  137. </div>
  138. <div>
  139. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_WillPresent">Toplevel.WillPresent()</a>
  140. </div>
  141. <div>
  142. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Enter">View.Enter</a>
  143. </div>
  144. <div>
  145. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Leave">View.Leave</a>
  146. </div>
  147. <div>
  148. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseEnter">View.MouseEnter</a>
  149. </div>
  150. <div>
  151. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseLeave">View.MouseLeave</a>
  152. </div>
  153. <div>
  154. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseClick">View.MouseClick</a>
  155. </div>
  156. <div>
  157. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Driver">View.Driver</a>
  158. </div>
  159. <div>
  160. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Subviews">View.Subviews</a>
  161. </div>
  162. <div>
  163. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Id">View.Id</a>
  164. </div>
  165. <div>
  166. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsCurrentTop">View.IsCurrentTop</a>
  167. </div>
  168. <div>
  169. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantMousePositionReports">View.WantMousePositionReports</a>
  170. </div>
  171. <div>
  172. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantContinuousButtonPressed">View.WantContinuousButtonPressed</a>
  173. </div>
  174. <div>
  175. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">View.Frame</a>
  176. </div>
  177. <div>
  178. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStyle">View.LayoutStyle</a>
  179. </div>
  180. <div>
  181. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">View.Bounds</a>
  182. </div>
  183. <div>
  184. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_X">View.X</a>
  185. </div>
  186. <div>
  187. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Y">View.Y</a>
  188. </div>
  189. <div>
  190. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Width">View.Width</a>
  191. </div>
  192. <div>
  193. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Height">View.Height</a>
  194. </div>
  195. <div>
  196. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SuperView">View.SuperView</a>
  197. </div>
  198. <div>
  199. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay">View.SetNeedsDisplay()</a>
  200. </div>
  201. <div>
  202. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay_Terminal_Gui_Rect_">View.SetNeedsDisplay(Rect)</a>
  203. </div>
  204. <div>
  205. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ChildNeedsDisplay">View.ChildNeedsDisplay()</a>
  206. </div>
  207. <div>
  208. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">View.Add(View[])</a>
  209. </div>
  210. <div>
  211. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewToFront_Terminal_Gui_View_">View.BringSubviewToFront(View)</a>
  212. </div>
  213. <div>
  214. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewToBack_Terminal_Gui_View_">View.SendSubviewToBack(View)</a>
  215. </div>
  216. <div>
  217. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewBackwards_Terminal_Gui_View_">View.SendSubviewBackwards(View)</a>
  218. </div>
  219. <div>
  220. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewForward_Terminal_Gui_View_">View.BringSubviewForward(View)</a>
  221. </div>
  222. <div>
  223. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear">View.Clear()</a>
  224. </div>
  225. <div>
  226. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear_Terminal_Gui_Rect_">View.Clear(Rect)</a>
  227. </div>
  228. <div>
  229. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(Int32, Int32)</a>
  230. </div>
  231. <div>
  232. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClipToBounds">View.ClipToBounds()</a>
  233. </div>
  234. <div>
  235. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetClip_Terminal_Gui_Rect_">View.SetClip(Rect)</a>
  236. </div>
  237. <div>
  238. <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>
  239. </div>
  240. <div>
  241. <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>
  242. </div>
  243. <div>
  244. <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>
  245. </div>
  246. <div>
  247. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Move_System_Int32_System_Int32_">View.Move(Int32, Int32)</a>
  248. </div>
  249. <div>
  250. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_PositionCursor">View.PositionCursor()</a>
  251. </div>
  252. <div>
  253. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HasFocus">View.HasFocus</a>
  254. </div>
  255. <div>
  256. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnEnter">View.OnEnter()</a>
  257. </div>
  258. <div>
  259. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnLeave">View.OnLeave()</a>
  260. </div>
  261. <div>
  262. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Focused">View.Focused</a>
  263. </div>
  264. <div>
  265. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MostFocused">View.MostFocused</a>
  266. </div>
  267. <div>
  268. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ColorScheme">View.ColorScheme</a>
  269. </div>
  270. <div>
  271. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddRune_System_Int32_System_Int32_System_Rune_">View.AddRune(Int32, Int32, Rune)</a>
  272. </div>
  273. <div>
  274. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  275. </div>
  276. <div>
  277. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawContent">View.DrawContent</a>
  278. </div>
  279. <div>
  280. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContent_Terminal_Gui_Rect_">View.OnDrawContent(Rect)</a>
  281. </div>
  282. <div>
  283. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetFocus_Terminal_Gui_View_">View.SetFocus(View)</a>
  284. </div>
  285. <div>
  286. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyPress">View.KeyPress</a>
  287. </div>
  288. <div>
  289. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessHotKey_Terminal_Gui_KeyEvent_">View.ProcessHotKey(KeyEvent)</a>
  290. </div>
  291. <div>
  292. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessColdKey_Terminal_Gui_KeyEvent_">View.ProcessColdKey(KeyEvent)</a>
  293. </div>
  294. <div>
  295. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyDown">View.KeyDown</a>
  296. </div>
  297. <div>
  298. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyDown_Terminal_Gui_KeyEvent_">View.OnKeyDown(KeyEvent)</a>
  299. </div>
  300. <div>
  301. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyUp">View.KeyUp</a>
  302. </div>
  303. <div>
  304. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyUp_Terminal_Gui_KeyEvent_">View.OnKeyUp(KeyEvent)</a>
  305. </div>
  306. <div>
  307. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnsureFocus">View.EnsureFocus()</a>
  308. </div>
  309. <div>
  310. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst">View.FocusFirst()</a>
  311. </div>
  312. <div>
  313. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusLast">View.FocusLast()</a>
  314. </div>
  315. <div>
  316. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusPrev">View.FocusPrev()</a>
  317. </div>
  318. <div>
  319. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusNext">View.FocusNext()</a>
  320. </div>
  321. <div>
  322. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutComplete">View.LayoutComplete</a>
  323. </div>
  324. <div>
  325. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ToString">View.ToString()</a>
  326. </div>
  327. <div>
  328. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEnter_Terminal_Gui_MouseEvent_">View.OnMouseEnter(MouseEvent)</a>
  329. </div>
  330. <div>
  331. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseLeave_Terminal_Gui_MouseEvent_">View.OnMouseLeave(MouseEvent)</a>
  332. </div>
  333. <div>
  334. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEvent_Terminal_Gui_MouseEvent_">View.OnMouseEvent(MouseEvent)</a>
  335. </div>
  336. <div>
  337. <span class="xref">System.Object.Equals(System.Object)</span>
  338. </div>
  339. <div>
  340. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  341. </div>
  342. <div>
  343. <span class="xref">System.Object.GetHashCode()</span>
  344. </div>
  345. <div>
  346. <span class="xref">System.Object.GetType()</span>
  347. </div>
  348. <div>
  349. <span class="xref">System.Object.MemberwiseClone()</span>
  350. </div>
  351. <div>
  352. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  353. </div>
  354. </div>
  355. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  356. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  357. <h5 id="Terminal_Gui_Dialog_syntax">Syntax</h5>
  358. <div class="codewrapper">
  359. <pre><code class="lang-csharp hljs">public class Dialog : Window, IEnumerable</code></pre>
  360. </div>
  361. <h5 id="Terminal_Gui_Dialog_remarks"><strong>Remarks</strong></h5>
  362. <div class="markdown level0 remarks">
  363. To run the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> modally, create the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>, and pass it to <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run">Run()</a>.
  364. This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views
  365. or buttons added to the dialog calls <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop">RequestStop()</a>.
  366. </div>
  367. <h3 id="constructors">Constructors
  368. </h3>
  369. <a id="Terminal_Gui_Dialog__ctor_" data-uid="Terminal.Gui.Dialog.#ctor*"></a>
  370. <h4 id="Terminal_Gui_Dialog__ctor_NStack_ustring_System_Int32_System_Int32_Terminal_Gui_Button___" data-uid="Terminal.Gui.Dialog.#ctor(NStack.ustring,System.Int32,System.Int32,Terminal.Gui.Button[])">Dialog(ustring, Int32, Int32, Button[])</h4>
  371. <div class="markdown level1 summary">
  372. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> class using <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Absolute">Absolute</a> positioning
  373. and an optional set of <a class="xref" href="Terminal.Gui.Button.html">Button</a>s to display
  374. </div>
  375. <div class="markdown level1 conceptual"></div>
  376. <h5 class="decalaration">Declaration</h5>
  377. <div class="codewrapper">
  378. <pre><code class="lang-csharp hljs">public Dialog(ustring title, int width, int height, params Button[] buttons)</code></pre>
  379. </div>
  380. <h5 class="parameters">Parameters</h5>
  381. <table class="table table-bordered table-striped table-condensed">
  382. <thead>
  383. <tr>
  384. <th>Type</th>
  385. <th>Name</th>
  386. <th>Description</th>
  387. </tr>
  388. </thead>
  389. <tbody>
  390. <tr>
  391. <td><span class="xref">NStack.ustring</span></td>
  392. <td><span class="parametername">title</span></td>
  393. <td>Title for the dialog.</td>
  394. </tr>
  395. <tr>
  396. <td><span class="xref">System.Int32</span></td>
  397. <td><span class="parametername">width</span></td>
  398. <td>Width for the dialog.</td>
  399. </tr>
  400. <tr>
  401. <td><span class="xref">System.Int32</span></td>
  402. <td><span class="parametername">height</span></td>
  403. <td>Height for the dialog.</td>
  404. </tr>
  405. <tr>
  406. <td><a class="xref" href="Terminal.Gui.Button.html">Button</a>[]</td>
  407. <td><span class="parametername">buttons</span></td>
  408. <td>Optional buttons to lay out at the bottom of the dialog.</td>
  409. </tr>
  410. </tbody>
  411. </table>
  412. <h5 id="Terminal_Gui_Dialog__ctor_NStack_ustring_System_Int32_System_Int32_Terminal_Gui_Button____remarks">Remarks</h5>
  413. <div class="markdown level1 remarks">
  414. if <code>width</code> and <code>height</code> are both 0, the Dialog will be vertically and horizontally centered in the
  415. container and the size will be 85% of the container.
  416. After initialzation use <code>X</code>, <code>Y</code>, <code>Width</code>, and <code>Height</code> to override this with a location or size.
  417. </div>
  418. <a id="Terminal_Gui_Dialog__ctor_" data-uid="Terminal.Gui.Dialog.#ctor*"></a>
  419. <h4 id="Terminal_Gui_Dialog__ctor_NStack_ustring_Terminal_Gui_Button___" data-uid="Terminal.Gui.Dialog.#ctor(NStack.ustring,Terminal.Gui.Button[])">Dialog(ustring, Button[])</h4>
  420. <div class="markdown level1 summary">
  421. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> class using <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Computed">Computed</a> positioning
  422. and with an optional set of <a class="xref" href="Terminal.Gui.Button.html">Button</a>s to display
  423. </div>
  424. <div class="markdown level1 conceptual"></div>
  425. <h5 class="decalaration">Declaration</h5>
  426. <div class="codewrapper">
  427. <pre><code class="lang-csharp hljs">public Dialog(ustring title, params Button[] buttons)</code></pre>
  428. </div>
  429. <h5 class="parameters">Parameters</h5>
  430. <table class="table table-bordered table-striped table-condensed">
  431. <thead>
  432. <tr>
  433. <th>Type</th>
  434. <th>Name</th>
  435. <th>Description</th>
  436. </tr>
  437. </thead>
  438. <tbody>
  439. <tr>
  440. <td><span class="xref">NStack.ustring</span></td>
  441. <td><span class="parametername">title</span></td>
  442. <td>Title for the dialog.</td>
  443. </tr>
  444. <tr>
  445. <td><a class="xref" href="Terminal.Gui.Button.html">Button</a>[]</td>
  446. <td><span class="parametername">buttons</span></td>
  447. <td>Optional buttons to lay out at the bottom of the dialog.</td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. <h5 id="Terminal_Gui_Dialog__ctor_NStack_ustring_Terminal_Gui_Button____remarks">Remarks</h5>
  452. <div class="markdown level1 remarks">
  453. if <code>width</code> and <code>height</code> are both 0, the Dialog will be vertically and horizontally centered in the
  454. container and the size will be 85% of the container.
  455. After initialzation use <code>X</code>, <code>Y</code>, <code>Width</code>, and <code>Height</code> to override this with a location or size.
  456. </div>
  457. <h3 id="methods">Methods
  458. </h3>
  459. <a id="Terminal_Gui_Dialog_AddButton_" data-uid="Terminal.Gui.Dialog.AddButton*"></a>
  460. <h4 id="Terminal_Gui_Dialog_AddButton_Terminal_Gui_Button_" data-uid="Terminal.Gui.Dialog.AddButton(Terminal.Gui.Button)">AddButton(Button)</h4>
  461. <div class="markdown level1 summary">
  462. Adds a <a class="xref" href="Terminal.Gui.Button.html">Button</a> to the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>, its layout will be controled by the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>
  463. </div>
  464. <div class="markdown level1 conceptual"></div>
  465. <h5 class="decalaration">Declaration</h5>
  466. <div class="codewrapper">
  467. <pre><code class="lang-csharp hljs">public void AddButton(Button button)</code></pre>
  468. </div>
  469. <h5 class="parameters">Parameters</h5>
  470. <table class="table table-bordered table-striped table-condensed">
  471. <thead>
  472. <tr>
  473. <th>Type</th>
  474. <th>Name</th>
  475. <th>Description</th>
  476. </tr>
  477. </thead>
  478. <tbody>
  479. <tr>
  480. <td><a class="xref" href="Terminal.Gui.Button.html">Button</a></td>
  481. <td><span class="parametername">button</span></td>
  482. <td>Button to add.</td>
  483. </tr>
  484. </tbody>
  485. </table>
  486. <a id="Terminal_Gui_Dialog_LayoutSubviews_" data-uid="Terminal.Gui.Dialog.LayoutSubviews*"></a>
  487. <h4 id="Terminal_Gui_Dialog_LayoutSubviews" data-uid="Terminal.Gui.Dialog.LayoutSubviews">LayoutSubviews()</h4>
  488. <div class="markdown level1 summary">
  489. Invoked when a view starts executing or when the dimensions of the view have changed, for example in
  490. response to the container view or terminal resizing.
  491. </div>
  492. <div class="markdown level1 conceptual"></div>
  493. <h5 class="decalaration">Declaration</h5>
  494. <div class="codewrapper">
  495. <pre><code class="lang-csharp hljs">public override void LayoutSubviews()</code></pre>
  496. </div>
  497. <h5 class="overrides">Overrides</h5>
  498. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutSubviews">View.LayoutSubviews()</a></div>
  499. <h5 id="Terminal_Gui_Dialog_LayoutSubviews_remarks">Remarks</h5>
  500. <div class="markdown level1 remarks">
  501. Calls <span class="xref">Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs)</span> (which raises the <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutComplete">LayoutComplete</a> event) before it returns.
  502. </div>
  503. <a id="Terminal_Gui_Dialog_ProcessKey_" data-uid="Terminal.Gui.Dialog.ProcessKey*"></a>
  504. <h4 id="Terminal_Gui_Dialog_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Dialog.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  505. <div class="markdown level1 summary">
  506. If the view is focused, gives the view a
  507. chance to process the keystroke.
  508. </div>
  509. <div class="markdown level1 conceptual"></div>
  510. <h5 class="decalaration">Declaration</h5>
  511. <div class="codewrapper">
  512. <pre><code class="lang-csharp hljs">public override bool ProcessKey(KeyEvent kb)</code></pre>
  513. </div>
  514. <h5 class="parameters">Parameters</h5>
  515. <table class="table table-bordered table-striped table-condensed">
  516. <thead>
  517. <tr>
  518. <th>Type</th>
  519. <th>Name</th>
  520. <th>Description</th>
  521. </tr>
  522. </thead>
  523. <tbody>
  524. <tr>
  525. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  526. <td><span class="parametername">kb</span></td>
  527. <td></td>
  528. </tr>
  529. </tbody>
  530. </table>
  531. <h5 class="returns">Returns</h5>
  532. <table class="table table-bordered table-striped table-condensed">
  533. <thead>
  534. <tr>
  535. <th>Type</th>
  536. <th>Description</th>
  537. </tr>
  538. </thead>
  539. <tbody>
  540. <tr>
  541. <td><span class="xref">System.Boolean</span></td>
  542. <td></td>
  543. </tr>
  544. </tbody>
  545. </table>
  546. <h5 class="overrides">Overrides</h5>
  547. <div><a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_">Toplevel.ProcessKey(KeyEvent)</a></div>
  548. <h5 id="Terminal_Gui_Dialog_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  549. <div class="markdown level1 remarks">
  550. <p>
  551. Views can override this method if they are
  552. interested in processing the given keystroke.
  553. If they consume the keystroke, they must
  554. return true to stop the keystroke from being
  555. processed by other widgets or consumed by the
  556. widget engine. If they return false, the
  557. keystroke will be passed using the ProcessColdKey
  558. method to other views to process.
  559. </p>
  560. <p>
  561. The View implementation does nothing but return false,
  562. so it is not necessary to call base.ProcessKey if you
  563. derive directly from View, but you should if you derive
  564. other View subclasses.
  565. </p>
  566. </div>
  567. <h3 id="implements">Implements</h3>
  568. <div>
  569. <span class="xref">System.Collections.IEnumerable</span>
  570. </div>
  571. </article>
  572. </div>
  573. <div class="hidden-sm col-md-2" role="complementary">
  574. <div class="sideaffix">
  575. <div class="contribution">
  576. <ul class="nav">
  577. </ul>
  578. </div>
  579. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  580. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  581. </nav>
  582. </div>
  583. </div>
  584. </div>
  585. </div>
  586. <footer>
  587. <div class="grad-bottom"></div>
  588. <div class="footer">
  589. <div class="container">
  590. <span class="pull-right">
  591. <a href="#top">Back to top</a>
  592. </span>
  593. <span>Generated by <strong>DocFX</strong></span>
  594. </div>
  595. </div>
  596. </footer>
  597. </div>
  598. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  599. <script type="text/javascript" src="../../styles/docfx.js"></script>
  600. <script type="text/javascript" src="../../styles/main.js"></script>
  601. </body>
  602. </html>