Terminal.Gui.Dialog.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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.18.2.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="">
  18. <meta property="docfx:tocrel" content="../toc.html">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../logo.svg" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div role="main" class="container body-content hide-when-search">
  54. <div class="sidenav hide-when-search">
  55. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  56. <div class="sidetoggle collapse" id="sidetoggle">
  57. <div id="sidetoc"></div>
  58. </div>
  59. </div>
  60. <div class="article row grid-right">
  61. <div class="col-md-10">
  62. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Dialog">
  63. <h1 id="Terminal_Gui_Dialog" data-uid="Terminal.Gui.Dialog">Class Dialog
  64. </h1>
  65. <div class="markdown level0 summary"><p>The dialog box is a window that by default is centered and contains one
  66. or more buttons. It defaults to the Colors.Dialog color scheme and has a
  67. 1 cell padding around the edges.</p>
  68. </div>
  69. <div class="markdown level0 conceptual"></div>
  70. <div class="inheritance">
  71. <h5>Inheritance</h5>
  72. <div class="level0"><span class="xref">System.Object</span></div>
  73. <div class="level1"><a class="xref" href="Terminal.Gui.Responder.html">Responder</a></div>
  74. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  75. <div class="level3"><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></div>
  76. <div class="level4"><a class="xref" href="Terminal.Gui.Window.html">Window</a></div>
  77. <div class="level5"><span class="xref">Dialog</span></div>
  78. </div>
  79. <div class="level6"><a class="xref" href="Terminal.Gui.FileDialog.html">FileDialog</a></div>
  80. <div class="inheritedMembers">
  81. <h5>Inherited Members</h5>
  82. <div>
  83. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_CanFocus">Toplevel.CanFocus</a>
  84. </div>
  85. <div>
  86. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Create">Toplevel.Create()</a>
  87. </div>
  88. <div>
  89. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Toplevel.Running</a>
  90. </div>
  91. <div>
  92. <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_WillPresent">Toplevel.WillPresent()</a>
  93. </div>
  94. <div>
  95. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">View.Add(View[])</a>
  96. </div>
  97. <div>
  98. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddRune_System_Int32_System_Int32_System_Rune_">View.AddRune(Int32, Int32, Rune)</a>
  99. </div>
  100. <div>
  101. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">View.Bounds</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ChildNeedsDisplay">View.ChildNeedsDisplay()</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear">View.Clear()</a>
  108. </div>
  109. <div>
  110. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear_Terminal_Gui_Rect_">View.Clear(Rect)</a>
  111. </div>
  112. <div>
  113. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  114. </div>
  115. <div>
  116. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClipToBounds">View.ClipToBounds()</a>
  117. </div>
  118. <div>
  119. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ColorScheme">View.ColorScheme</a>
  120. </div>
  121. <div>
  122. <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>
  123. </div>
  124. <div>
  125. <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>
  126. </div>
  127. <div>
  128. <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>
  129. </div>
  130. <div>
  131. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Driver">View.Driver</a>
  132. </div>
  133. <div>
  134. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnsureFocus">View.EnsureFocus()</a>
  135. </div>
  136. <div>
  137. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Focused">View.Focused</a>
  138. </div>
  139. <div>
  140. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst">View.FocusFirst()</a>
  141. </div>
  142. <div>
  143. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusLast">View.FocusLast()</a>
  144. </div>
  145. <div>
  146. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusNext">View.FocusNext()</a>
  147. </div>
  148. <div>
  149. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusPrev">View.FocusPrev()</a>
  150. </div>
  151. <div>
  152. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">View.Frame</a>
  153. </div>
  154. <div>
  155. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HasFocus">View.HasFocus</a>
  156. </div>
  157. <div>
  158. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Height">View.Height</a>
  159. </div>
  160. <div>
  161. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Id">View.Id</a>
  162. </div>
  163. <div>
  164. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStyle">View.LayoutStyle</a>
  165. </div>
  166. <div>
  167. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MostFocused">View.MostFocused</a>
  168. </div>
  169. <div>
  170. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Move_System_Int32_System_Int32_">View.Move(Int32, Int32)</a>
  171. </div>
  172. <div>
  173. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_PositionCursor">View.PositionCursor()</a>
  174. </div>
  175. <div>
  176. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessColdKey_Terminal_Gui_KeyEvent_">View.ProcessColdKey(KeyEvent)</a>
  177. </div>
  178. <div>
  179. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessHotKey_Terminal_Gui_KeyEvent_">View.ProcessHotKey(KeyEvent)</a>
  180. </div>
  181. <div>
  182. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(Int32, Int32)</a>
  183. </div>
  184. <div>
  185. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetClip_Terminal_Gui_Rect_">View.SetClip(Rect)</a>
  186. </div>
  187. <div>
  188. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetFocus_Terminal_Gui_View_">View.SetFocus(View)</a>
  189. </div>
  190. <div>
  191. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay">View.SetNeedsDisplay()</a>
  192. </div>
  193. <div>
  194. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay_Terminal_Gui_Rect_">View.SetNeedsDisplay(Rect)</a>
  195. </div>
  196. <div>
  197. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Subviews">View.Subviews</a>
  198. </div>
  199. <div>
  200. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SuperView">View.SuperView</a>
  201. </div>
  202. <div>
  203. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ToString">View.ToString()</a>
  204. </div>
  205. <div>
  206. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantMousePositionReports">View.WantMousePositionReports</a>
  207. </div>
  208. <div>
  209. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Width">View.Width</a>
  210. </div>
  211. <div>
  212. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_X">View.X</a>
  213. </div>
  214. <div>
  215. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Y">View.Y</a>
  216. </div>
  217. <div>
  218. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Add_Terminal_Gui_View_">Window.Add(View)</a>
  219. </div>
  220. <div>
  221. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_GetEnumerator">Window.GetEnumerator()</a>
  222. </div>
  223. <div>
  224. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_MouseEvent_Terminal_Gui_MouseEvent_">Window.MouseEvent(MouseEvent)</a>
  225. </div>
  226. <div>
  227. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Redraw_Terminal_Gui_Rect_">Window.Redraw(Rect)</a>
  228. </div>
  229. <div>
  230. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Remove_Terminal_Gui_View_">Window.Remove(View)</a>
  231. </div>
  232. <div>
  233. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_RemoveAll">Window.RemoveAll()</a>
  234. </div>
  235. <div>
  236. <a class="xref" href="Terminal.Gui.Window.html#Terminal_Gui_Window_Title">Window.Title</a>
  237. </div>
  238. </div>
  239. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  240. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  241. <h5 id="Terminal_Gui_Dialog_syntax">Syntax</h5>
  242. <div class="codewrapper">
  243. <pre><code class="lang-csharp hljs">public class Dialog : Terminal.Gui.Window</code></pre>
  244. </div>
  245. <h5 id="Terminal_Gui_Dialog_remarks"><strong>Remarks</strong></h5>
  246. <div class="markdown level0 remarks"><p>To run the dialog modally, create the Dialog, and pass this to Application.Run which
  247. will execute the dialog until it terminates via the [ESC] key, or when one of the views
  248. or buttons added to the dialog set the Running property on the Dialog to false.</p>
  249. </div>
  250. <h3 id="constructors">Constructors
  251. </h3>
  252. <a id="Terminal_Gui_Dialog__ctor_" data-uid="Terminal.Gui.Dialog.#ctor*"></a>
  253. <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>
  254. <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> class with an optional set of buttons to display</p>
  255. </div>
  256. <div class="markdown level1 conceptual"></div>
  257. <h5 class="decalaration">Declaration</h5>
  258. <div class="codewrapper">
  259. <pre><code class="lang-csharp hljs">public Dialog (NStack.ustring title, int width, int height, Terminal.Gui.Button[] buttons);</code></pre>
  260. </div>
  261. <h5 class="parameters">Parameters</h5>
  262. <table class="table table-bordered table-striped table-condensed">
  263. <thead>
  264. <tr>
  265. <th>Type</th>
  266. <th>Name</th>
  267. <th>Description</th>
  268. </tr>
  269. </thead>
  270. <tbody>
  271. <tr>
  272. <td><span class="xref">NStack.ustring</span></td>
  273. <td><span class="parametername">title</span></td>
  274. <td><p>Title for the dialog.</p>
  275. </td>
  276. </tr>
  277. <tr>
  278. <td><span class="xref">System.Int32</span></td>
  279. <td><span class="parametername">width</span></td>
  280. <td><p>Width for the dialog.</p>
  281. </td>
  282. </tr>
  283. <tr>
  284. <td><span class="xref">System.Int32</span></td>
  285. <td><span class="parametername">height</span></td>
  286. <td><p>Height for the dialog.</p>
  287. </td>
  288. </tr>
  289. <tr>
  290. <td><a class="xref" href="Terminal.Gui.Button.html">Button</a>[]</td>
  291. <td><span class="parametername">buttons</span></td>
  292. <td><p>Optional buttons to lay out at the bottom of the dialog.</p>
  293. </td>
  294. </tr>
  295. </tbody>
  296. </table>
  297. <h3 id="methods">Methods
  298. </h3>
  299. <a id="Terminal_Gui_Dialog_AddButton_" data-uid="Terminal.Gui.Dialog.AddButton*"></a>
  300. <h4 id="Terminal_Gui_Dialog_AddButton_Terminal_Gui_Button_" data-uid="Terminal.Gui.Dialog.AddButton(Terminal.Gui.Button)">AddButton(Button)</h4>
  301. <div class="markdown level1 summary"><p>Adds a button to the dialog, its layout will be controled by the dialog</p>
  302. </div>
  303. <div class="markdown level1 conceptual"></div>
  304. <h5 class="decalaration">Declaration</h5>
  305. <div class="codewrapper">
  306. <pre><code class="lang-csharp hljs">public void AddButton (Terminal.Gui.Button button);</code></pre>
  307. </div>
  308. <h5 class="parameters">Parameters</h5>
  309. <table class="table table-bordered table-striped table-condensed">
  310. <thead>
  311. <tr>
  312. <th>Type</th>
  313. <th>Name</th>
  314. <th>Description</th>
  315. </tr>
  316. </thead>
  317. <tbody>
  318. <tr>
  319. <td><a class="xref" href="Terminal.Gui.Button.html">Button</a></td>
  320. <td><span class="parametername">button</span></td>
  321. <td><p>Button to add.</p>
  322. </td>
  323. </tr>
  324. </tbody>
  325. </table>
  326. <a id="Terminal_Gui_Dialog_LayoutSubviews_" data-uid="Terminal.Gui.Dialog.LayoutSubviews*"></a>
  327. <h4 id="Terminal_Gui_Dialog_LayoutSubviews" data-uid="Terminal.Gui.Dialog.LayoutSubviews">LayoutSubviews()</h4>
  328. <div class="markdown level1 summary"></div>
  329. <div class="markdown level1 conceptual"></div>
  330. <h5 class="decalaration">Declaration</h5>
  331. <div class="codewrapper">
  332. <pre><code class="lang-csharp hljs">public override void LayoutSubviews ();</code></pre>
  333. </div>
  334. <a id="Terminal_Gui_Dialog_ProcessKey_" data-uid="Terminal.Gui.Dialog.ProcessKey*"></a>
  335. <h4 id="Terminal_Gui_Dialog_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Dialog.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  336. <div class="markdown level1 summary"></div>
  337. <div class="markdown level1 conceptual"></div>
  338. <h5 class="decalaration">Declaration</h5>
  339. <div class="codewrapper">
  340. <pre><code class="lang-csharp hljs">public override bool ProcessKey (Terminal.Gui.KeyEvent kb);</code></pre>
  341. </div>
  342. <h5 class="parameters">Parameters</h5>
  343. <table class="table table-bordered table-striped table-condensed">
  344. <thead>
  345. <tr>
  346. <th>Type</th>
  347. <th>Name</th>
  348. <th>Description</th>
  349. </tr>
  350. </thead>
  351. <tbody>
  352. <tr>
  353. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  354. <td><span class="parametername">kb</span></td>
  355. <td><p>To be added.</p>
  356. </td>
  357. </tr>
  358. </tbody>
  359. </table>
  360. <h5 class="returns">Returns</h5>
  361. <table class="table table-bordered table-striped table-condensed">
  362. <thead>
  363. <tr>
  364. <th>Type</th>
  365. <th>Description</th>
  366. </tr>
  367. </thead>
  368. <tbody>
  369. <tr>
  370. <td><span class="xref">System.Boolean</span></td>
  371. <td><p>To be added.</p>
  372. </td>
  373. </tr>
  374. </tbody>
  375. </table>
  376. </article>
  377. </div>
  378. <div class="hidden-sm col-md-2" role="complementary">
  379. <div class="sideaffix">
  380. <div class="contribution">
  381. <ul class="nav">
  382. </ul>
  383. </div>
  384. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  385. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  386. </nav>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. <footer>
  392. <div class="grad-bottom"></div>
  393. <div class="footer">
  394. <div class="container">
  395. <span class="pull-right">
  396. <a href="#top">Back to top</a>
  397. </span>
  398. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  399. </div>
  400. </div>
  401. </footer>
  402. </div>
  403. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  404. <script type="text/javascript" src="../../styles/docfx.js"></script>
  405. <script type="text/javascript" src="../../styles/main.js"></script>
  406. </body>
  407. </html>