Terminal.Gui.Button.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  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 Button
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Button
  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.Button">
  63. <h1 id="Terminal_Gui_Button" data-uid="Terminal.Gui.Button">Class Button
  64. </h1>
  65. <div class="markdown level0 summary"><p>Button is a view that provides an item that invokes a callback when activated.</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <div class="inheritance">
  69. <h5>Inheritance</h5>
  70. <div class="level0"><span class="xref">System.Object</span></div>
  71. <div class="level1"><a class="xref" href="Terminal.Gui.Responder.html">Responder</a></div>
  72. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  73. <div class="level3"><span class="xref">Button</span></div>
  74. </div>
  75. <div class="inheritedMembers">
  76. <h5>Inherited Members</h5>
  77. <div>
  78. <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_CanFocus">Responder.CanFocus</a>
  79. </div>
  80. <div>
  81. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">View.Add(View)</a>
  82. </div>
  83. <div>
  84. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">View.Add(View[])</a>
  85. </div>
  86. <div>
  87. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddCh_System_Int32_System_Int32_System_Int32_">View.AddCh(Int32, Int32, Int32)</a>
  88. </div>
  89. <div>
  90. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddRune_System_Int32_System_Int32_System_Rune_">View.AddRune(Int32, Int32, Rune)</a>
  91. </div>
  92. <div>
  93. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">View.Bounds</a>
  94. </div>
  95. <div>
  96. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ChildNeedsDisplay">View.ChildNeedsDisplay()</a>
  97. </div>
  98. <div>
  99. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear">View.Clear()</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear_Terminal_Gui_Rect_">View.Clear(Rect)</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  106. </div>
  107. <div>
  108. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClipToBounds">View.ClipToBounds()</a>
  109. </div>
  110. <div>
  111. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ColorScheme">View.ColorScheme</a>
  112. </div>
  113. <div>
  114. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawFrame_Terminal_Gui_Rect_System_Boolean_">View.DrawFrame(Rect, Boolean)</a>
  115. </div>
  116. <div>
  117. <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>
  118. </div>
  119. <div>
  120. <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>
  121. </div>
  122. <div>
  123. <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>
  124. </div>
  125. <div>
  126. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawHotString_System_String_System_Boolean_Terminal_Gui_ColorScheme_">View.DrawHotString(String, Boolean, ColorScheme)</a>
  127. </div>
  128. <div>
  129. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawHotString_System_String_Terminal_Gui_Attribute_Terminal_Gui_Attribute_">View.DrawHotString(String, Attribute, Attribute)</a>
  130. </div>
  131. <div>
  132. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Driver">View.Driver</a>
  133. </div>
  134. <div>
  135. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnsureFocus">View.EnsureFocus()</a>
  136. </div>
  137. <div>
  138. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Focused">View.Focused</a>
  139. </div>
  140. <div>
  141. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst">View.FocusFirst()</a>
  142. </div>
  143. <div>
  144. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusLast">View.FocusLast()</a>
  145. </div>
  146. <div>
  147. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusNext">View.FocusNext()</a>
  148. </div>
  149. <div>
  150. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusPrev">View.FocusPrev()</a>
  151. </div>
  152. <div>
  153. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">View.Frame</a>
  154. </div>
  155. <div>
  156. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetEnumerator">View.GetEnumerator()</a>
  157. </div>
  158. <div>
  159. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HasFocus">View.HasFocus</a>
  160. </div>
  161. <div>
  162. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Id">View.Id</a>
  163. </div>
  164. <div>
  165. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutSubviews">View.LayoutSubviews()</a>
  166. </div>
  167. <div>
  168. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MostFocused">View.MostFocused</a>
  169. </div>
  170. <div>
  171. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Move_System_Int32_System_Int32_">View.Move(Int32, Int32)</a>
  172. </div>
  173. <div>
  174. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Remove_Terminal_Gui_View_">View.Remove(View)</a>
  175. </div>
  176. <div>
  177. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_RemoveAll">View.RemoveAll()</a>
  178. </div>
  179. <div>
  180. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(Int32, Int32)</a>
  181. </div>
  182. <div>
  183. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetClip_Terminal_Gui_Rect_">View.SetClip(Rect)</a>
  184. </div>
  185. <div>
  186. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetFocus_Terminal_Gui_View_">View.SetFocus(View)</a>
  187. </div>
  188. <div>
  189. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay">View.SetNeedsDisplay()</a>
  190. </div>
  191. <div>
  192. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay_Terminal_Gui_Rect_">View.SetNeedsDisplay(Rect)</a>
  193. </div>
  194. <div>
  195. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Subviews">View.Subviews</a>
  196. </div>
  197. <div>
  198. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SuperView">View.SuperView</a>
  199. </div>
  200. <div>
  201. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ToString">View.ToString()</a>
  202. </div>
  203. <div>
  204. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantMousePositionReports">View.WantMousePositionReports</a>
  205. </div>
  206. </div>
  207. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  208. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  209. <h5 id="Terminal_Gui_Button_syntax">Syntax</h5>
  210. <div class="codewrapper">
  211. <pre><code class="lang-csharp hljs">public class Button : Terminal.Gui.View</code></pre>
  212. </div>
  213. <h5 id="Terminal_Gui_Button_remarks"><strong>Remarks</strong></h5>
  214. <div class="markdown level0 remarks"><p>
  215. Provides a button that can be clicked, or pressed with
  216. the enter key and processes hotkeys (the first uppercase
  217. letter in the button becomes the hotkey).
  218. </p>
  219. <p>
  220. If the button is configured as the default (IsDefault) the button
  221. will respond to the return key is no other view processes it, and
  222. turns this into a clicked event.
  223. </p></div>
  224. <h3 id="constructors">Constructors
  225. </h3>
  226. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  227. <h4 id="Terminal_Gui_Button__ctor_NStack_ustring_" data-uid="Terminal.Gui.Button.#ctor(NStack.ustring)">Button(ustring)</h4>
  228. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  229. the given text at position 0,0</p>
  230. </div>
  231. <div class="markdown level1 conceptual"></div>
  232. <h5 class="decalaration">Declaration</h5>
  233. <div class="codewrapper">
  234. <pre><code class="lang-csharp hljs">public Button (NStack.ustring text);</code></pre>
  235. </div>
  236. <h5 class="parameters">Parameters</h5>
  237. <table class="table table-bordered table-striped table-condensed">
  238. <thead>
  239. <tr>
  240. <th>Type</th>
  241. <th>Name</th>
  242. <th>Description</th>
  243. </tr>
  244. </thead>
  245. <tbody>
  246. <tr>
  247. <td><span class="xref">NStack.ustring</span></td>
  248. <td><span class="parametername">text</span></td>
  249. <td><p>The button&#39;s text</p>
  250. </td>
  251. </tr>
  252. </tbody>
  253. </table>
  254. <h5 id="Terminal_Gui_Button__ctor_NStack_ustring__remarks">Remarks</h5>
  255. <div class="markdown level1 remarks"><p>The size of the button is computed based on the
  256. text length. This button is not a default button.</p>
  257. </div>
  258. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  259. <h4 id="Terminal_Gui_Button__ctor_System_String_" data-uid="Terminal.Gui.Button.#ctor(System.String)">Button(String)</h4>
  260. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  261. the given text at position 0,0</p>
  262. </div>
  263. <div class="markdown level1 conceptual"></div>
  264. <h5 class="decalaration">Declaration</h5>
  265. <div class="codewrapper">
  266. <pre><code class="lang-csharp hljs">public Button (string text);</code></pre>
  267. </div>
  268. <h5 class="parameters">Parameters</h5>
  269. <table class="table table-bordered table-striped table-condensed">
  270. <thead>
  271. <tr>
  272. <th>Type</th>
  273. <th>Name</th>
  274. <th>Description</th>
  275. </tr>
  276. </thead>
  277. <tbody>
  278. <tr>
  279. <td><span class="xref">System.String</span></td>
  280. <td><span class="parametername">s</span></td>
  281. <td><p>To be added.</p>
  282. </td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. <h5 id="Terminal_Gui_Button__ctor_System_String__remarks">Remarks</h5>
  287. <div class="markdown level1 remarks"><p>The size of the button is computed based on the
  288. text length. This button is not a default button.</p>
  289. </div>
  290. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  291. <h4 id="Terminal_Gui_Button__ctor_NStack_ustring_System_Boolean_" data-uid="Terminal.Gui.Button.#ctor(NStack.ustring,System.Boolean)">Button(ustring, Boolean)</h4>
  292. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  293. the given text.</p>
  294. </div>
  295. <div class="markdown level1 conceptual"></div>
  296. <h5 class="decalaration">Declaration</h5>
  297. <div class="codewrapper">
  298. <pre><code class="lang-csharp hljs">public Button (NStack.ustring text, bool is_default);</code></pre>
  299. </div>
  300. <h5 class="parameters">Parameters</h5>
  301. <table class="table table-bordered table-striped table-condensed">
  302. <thead>
  303. <tr>
  304. <th>Type</th>
  305. <th>Name</th>
  306. <th>Description</th>
  307. </tr>
  308. </thead>
  309. <tbody>
  310. <tr>
  311. <td><span class="xref">NStack.ustring</span></td>
  312. <td><span class="parametername">text</span></td>
  313. <td><p>The button&#39;s text</p>
  314. </td>
  315. </tr>
  316. <tr>
  317. <td><span class="xref">System.Boolean</span></td>
  318. <td><span class="parametername">is_default</span></td>
  319. <td><p>If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button</p>
  320. </td>
  321. </tr>
  322. </tbody>
  323. </table>
  324. <h5 id="Terminal_Gui_Button__ctor_NStack_ustring_System_Boolean__remarks">Remarks</h5>
  325. <div class="markdown level1 remarks"><p>If the value for is_default is true, a special
  326. decoration is used, and the enter key on a
  327. dialog would implicitly activate this button.</p>
  328. </div>
  329. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  330. <h4 id="Terminal_Gui_Button__ctor_System_String_System_Boolean_" data-uid="Terminal.Gui.Button.#ctor(System.String,System.Boolean)">Button(String, Boolean)</h4>
  331. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  332. the given text.</p>
  333. </div>
  334. <div class="markdown level1 conceptual"></div>
  335. <h5 class="decalaration">Declaration</h5>
  336. <div class="codewrapper">
  337. <pre><code class="lang-csharp hljs">public Button (string text, bool is_default);</code></pre>
  338. </div>
  339. <h5 class="parameters">Parameters</h5>
  340. <table class="table table-bordered table-striped table-condensed">
  341. <thead>
  342. <tr>
  343. <th>Type</th>
  344. <th>Name</th>
  345. <th>Description</th>
  346. </tr>
  347. </thead>
  348. <tbody>
  349. <tr>
  350. <td><span class="xref">System.String</span></td>
  351. <td><span class="parametername">s</span></td>
  352. <td><p>To be added.</p>
  353. </td>
  354. </tr>
  355. <tr>
  356. <td><span class="xref">System.Boolean</span></td>
  357. <td><span class="parametername">is_default</span></td>
  358. <td><p>To be added.</p>
  359. </td>
  360. </tr>
  361. </tbody>
  362. </table>
  363. <h5 id="Terminal_Gui_Button__ctor_System_String_System_Boolean__remarks">Remarks</h5>
  364. <div class="markdown level1 remarks"><p>If the value for is_default is true, a special
  365. decoration is used, and the enter key on a
  366. dialog would implicitly activate this button.</p>
  367. </div>
  368. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  369. <h4 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_NStack_ustring_" data-uid="Terminal.Gui.Button.#ctor(System.Int32,System.Int32,NStack.ustring)">Button(Int32, Int32, ustring)</h4>
  370. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  371. the given text at the given position.</p>
  372. </div>
  373. <div class="markdown level1 conceptual"></div>
  374. <h5 class="decalaration">Declaration</h5>
  375. <div class="codewrapper">
  376. <pre><code class="lang-csharp hljs">public Button (int x, int y, NStack.ustring text);</code></pre>
  377. </div>
  378. <h5 class="parameters">Parameters</h5>
  379. <table class="table table-bordered table-striped table-condensed">
  380. <thead>
  381. <tr>
  382. <th>Type</th>
  383. <th>Name</th>
  384. <th>Description</th>
  385. </tr>
  386. </thead>
  387. <tbody>
  388. <tr>
  389. <td><span class="xref">System.Int32</span></td>
  390. <td><span class="parametername">x</span></td>
  391. <td><p>X position where the button will be shown.</p>
  392. </td>
  393. </tr>
  394. <tr>
  395. <td><span class="xref">System.Int32</span></td>
  396. <td><span class="parametername">y</span></td>
  397. <td><p>Y position where the button will be shown.</p>
  398. </td>
  399. </tr>
  400. <tr>
  401. <td><span class="xref">NStack.ustring</span></td>
  402. <td><span class="parametername">text</span></td>
  403. <td><p>The button&#39;s text</p>
  404. </td>
  405. </tr>
  406. </tbody>
  407. </table>
  408. <h5 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_NStack_ustring__remarks">Remarks</h5>
  409. <div class="markdown level1 remarks"><p>The size of the button is computed based on the
  410. text length. This button is not a default button.</p>
  411. </div>
  412. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  413. <h4 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_System_String_" data-uid="Terminal.Gui.Button.#ctor(System.Int32,System.Int32,System.String)">Button(Int32, Int32, String)</h4>
  414. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  415. the given text at the given position.</p>
  416. </div>
  417. <div class="markdown level1 conceptual"></div>
  418. <h5 class="decalaration">Declaration</h5>
  419. <div class="codewrapper">
  420. <pre><code class="lang-csharp hljs">public Button (int x, int y, string text);</code></pre>
  421. </div>
  422. <h5 class="parameters">Parameters</h5>
  423. <table class="table table-bordered table-striped table-condensed">
  424. <thead>
  425. <tr>
  426. <th>Type</th>
  427. <th>Name</th>
  428. <th>Description</th>
  429. </tr>
  430. </thead>
  431. <tbody>
  432. <tr>
  433. <td><span class="xref">System.Int32</span></td>
  434. <td><span class="parametername">x</span></td>
  435. <td><p>To be added.</p>
  436. </td>
  437. </tr>
  438. <tr>
  439. <td><span class="xref">System.Int32</span></td>
  440. <td><span class="parametername">y</span></td>
  441. <td><p>To be added.</p>
  442. </td>
  443. </tr>
  444. <tr>
  445. <td><span class="xref">System.String</span></td>
  446. <td><span class="parametername">s</span></td>
  447. <td><p>To be added.</p>
  448. </td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. <h5 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_System_String__remarks">Remarks</h5>
  453. <div class="markdown level1 remarks"><p>The size of the button is computed based on the
  454. text length. This button is not a default button.</p>
  455. </div>
  456. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  457. <h4 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_NStack_ustring_System_Boolean_" data-uid="Terminal.Gui.Button.#ctor(System.Int32,System.Int32,NStack.ustring,System.Boolean)">Button(Int32, Int32, ustring, Boolean)</h4>
  458. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  459. the given text at the given position.</p>
  460. </div>
  461. <div class="markdown level1 conceptual"></div>
  462. <h5 class="decalaration">Declaration</h5>
  463. <div class="codewrapper">
  464. <pre><code class="lang-csharp hljs">public Button (int x, int y, NStack.ustring text, bool is_default);</code></pre>
  465. </div>
  466. <h5 class="parameters">Parameters</h5>
  467. <table class="table table-bordered table-striped table-condensed">
  468. <thead>
  469. <tr>
  470. <th>Type</th>
  471. <th>Name</th>
  472. <th>Description</th>
  473. </tr>
  474. </thead>
  475. <tbody>
  476. <tr>
  477. <td><span class="xref">System.Int32</span></td>
  478. <td><span class="parametername">x</span></td>
  479. <td><p>X position where the button will be shown.</p>
  480. </td>
  481. </tr>
  482. <tr>
  483. <td><span class="xref">System.Int32</span></td>
  484. <td><span class="parametername">y</span></td>
  485. <td><p>Y position where the button will be shown.</p>
  486. </td>
  487. </tr>
  488. <tr>
  489. <td><span class="xref">NStack.ustring</span></td>
  490. <td><span class="parametername">text</span></td>
  491. <td><p>The button&#39;s text</p>
  492. </td>
  493. </tr>
  494. <tr>
  495. <td><span class="xref">System.Boolean</span></td>
  496. <td><span class="parametername">is_default</span></td>
  497. <td><p>If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button</p>
  498. </td>
  499. </tr>
  500. </tbody>
  501. </table>
  502. <h5 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_NStack_ustring_System_Boolean__remarks">Remarks</h5>
  503. <div class="markdown level1 remarks"><p>If the value for is_default is true, a special
  504. decoration is used, and the enter key on a
  505. dialog would implicitly activate this button.</p>
  506. </div>
  507. <a id="Terminal_Gui_Button__ctor_" data-uid="Terminal.Gui.Button.#ctor*"></a>
  508. <h4 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_System_String_System_Boolean_" data-uid="Terminal.Gui.Button.#ctor(System.Int32,System.Int32,System.String,System.Boolean)">Button(Int32, Int32, String, Boolean)</h4>
  509. <div class="markdown level1 summary"><p>Public constructor, creates a button based on
  510. the given text at the given position.</p>
  511. </div>
  512. <div class="markdown level1 conceptual"></div>
  513. <h5 class="decalaration">Declaration</h5>
  514. <div class="codewrapper">
  515. <pre><code class="lang-csharp hljs">public Button (int x, int y, string text, bool is_default);</code></pre>
  516. </div>
  517. <h5 class="parameters">Parameters</h5>
  518. <table class="table table-bordered table-striped table-condensed">
  519. <thead>
  520. <tr>
  521. <th>Type</th>
  522. <th>Name</th>
  523. <th>Description</th>
  524. </tr>
  525. </thead>
  526. <tbody>
  527. <tr>
  528. <td><span class="xref">System.Int32</span></td>
  529. <td><span class="parametername">x</span></td>
  530. <td><p>To be added.</p>
  531. </td>
  532. </tr>
  533. <tr>
  534. <td><span class="xref">System.Int32</span></td>
  535. <td><span class="parametername">y</span></td>
  536. <td><p>To be added.</p>
  537. </td>
  538. </tr>
  539. <tr>
  540. <td><span class="xref">System.String</span></td>
  541. <td><span class="parametername">s</span></td>
  542. <td><p>To be added.</p>
  543. </td>
  544. </tr>
  545. <tr>
  546. <td><span class="xref">System.Boolean</span></td>
  547. <td><span class="parametername">is_default</span></td>
  548. <td><p>To be added.</p>
  549. </td>
  550. </tr>
  551. </tbody>
  552. </table>
  553. <h5 id="Terminal_Gui_Button__ctor_System_Int32_System_Int32_System_String_System_Boolean__remarks">Remarks</h5>
  554. <div class="markdown level1 remarks"><p>If the value for is_default is true, a special
  555. decoration is used, and the enter key on a
  556. dialog would implicitly activate this button.</p>
  557. </div>
  558. <h3 id="fields">Fields
  559. </h3>
  560. <h4 id="Terminal_Gui_Button_Clicked" data-uid="Terminal.Gui.Button.Clicked">Clicked</h4>
  561. <div class="markdown level1 summary"><p>Clicked event, raised when the button is clicked.</p>
  562. </div>
  563. <div class="markdown level1 conceptual"></div>
  564. <h5 class="decalaration">Declaration</h5>
  565. <div class="codewrapper">
  566. <pre><code class="lang-csharp hljs">public Action Clicked;</code></pre>
  567. </div>
  568. <h5 class="fieldValue">Field Value</h5>
  569. <table class="table table-bordered table-striped table-condensed">
  570. <thead>
  571. <tr>
  572. <th>Type</th>
  573. <th>Description</th>
  574. </tr>
  575. </thead>
  576. <tbody>
  577. <tr>
  578. <td><span class="xref">System.Action</span></td>
  579. <td><p>To be added.</p>
  580. </td>
  581. </tr>
  582. </tbody>
  583. </table>
  584. <h5 id="Terminal_Gui_Button_Clicked_remarks">Remarks</h5>
  585. <div class="markdown level1 remarks"><p>Client code can hook up to this event, it is
  586. raised when the button is activated either with
  587. the mouse or the keyboard.</p>
  588. </div>
  589. <h3 id="properties">Properties
  590. </h3>
  591. <a id="Terminal_Gui_Button_IsDefault_" data-uid="Terminal.Gui.Button.IsDefault*"></a>
  592. <h4 id="Terminal_Gui_Button_IsDefault" data-uid="Terminal.Gui.Button.IsDefault">IsDefault</h4>
  593. <div class="markdown level1 summary"><p>Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Button.html">Button</a> is the default action to activate on return on a dialog.</p>
  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 bool IsDefault { get; set; }</code></pre>
  599. </div>
  600. <h5 class="propertyValue">Property Value</h5>
  601. <table class="table table-bordered table-striped table-condensed">
  602. <thead>
  603. <tr>
  604. <th>Type</th>
  605. <th>Description</th>
  606. </tr>
  607. </thead>
  608. <tbody>
  609. <tr>
  610. <td><span class="xref">System.Boolean</span></td>
  611. <td><p><code>true</code> if is default; otherwise, <code>false</code>.</p>
  612. </td>
  613. </tr>
  614. </tbody>
  615. </table>
  616. <a id="Terminal_Gui_Button_Text_" data-uid="Terminal.Gui.Button.Text*"></a>
  617. <h4 id="Terminal_Gui_Button_Text" data-uid="Terminal.Gui.Button.Text">Text</h4>
  618. <div class="markdown level1 summary"><p>The text displayed by this widget.</p>
  619. </div>
  620. <div class="markdown level1 conceptual"></div>
  621. <h5 class="decalaration">Declaration</h5>
  622. <div class="codewrapper">
  623. <pre><code class="lang-csharp hljs">public NStack.ustring Text { get; set; }</code></pre>
  624. </div>
  625. <h5 class="propertyValue">Property Value</h5>
  626. <table class="table table-bordered table-striped table-condensed">
  627. <thead>
  628. <tr>
  629. <th>Type</th>
  630. <th>Description</th>
  631. </tr>
  632. </thead>
  633. <tbody>
  634. <tr>
  635. <td><span class="xref">NStack.ustring</span></td>
  636. <td><p>To be added.</p>
  637. </td>
  638. </tr>
  639. </tbody>
  640. </table>
  641. <h3 id="methods">Methods
  642. </h3>
  643. <a id="Terminal_Gui_Button_MouseEvent_" data-uid="Terminal.Gui.Button.MouseEvent*"></a>
  644. <h4 id="Terminal_Gui_Button_MouseEvent_Terminal_Gui_MouseEvent_" data-uid="Terminal.Gui.Button.MouseEvent(Terminal.Gui.MouseEvent)">MouseEvent(MouseEvent)</h4>
  645. <div class="markdown level1 summary"></div>
  646. <div class="markdown level1 conceptual"></div>
  647. <h5 class="decalaration">Declaration</h5>
  648. <div class="codewrapper">
  649. <pre><code class="lang-csharp hljs">public override bool MouseEvent (Terminal.Gui.MouseEvent me);</code></pre>
  650. </div>
  651. <h5 class="parameters">Parameters</h5>
  652. <table class="table table-bordered table-striped table-condensed">
  653. <thead>
  654. <tr>
  655. <th>Type</th>
  656. <th>Name</th>
  657. <th>Description</th>
  658. </tr>
  659. </thead>
  660. <tbody>
  661. <tr>
  662. <td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
  663. <td><span class="parametername">me</span></td>
  664. <td><p>To be added.</p>
  665. </td>
  666. </tr>
  667. </tbody>
  668. </table>
  669. <h5 class="returns">Returns</h5>
  670. <table class="table table-bordered table-striped table-condensed">
  671. <thead>
  672. <tr>
  673. <th>Type</th>
  674. <th>Description</th>
  675. </tr>
  676. </thead>
  677. <tbody>
  678. <tr>
  679. <td><span class="xref">System.Boolean</span></td>
  680. <td><p>To be added.</p>
  681. </td>
  682. </tr>
  683. </tbody>
  684. </table>
  685. <a id="Terminal_Gui_Button_PositionCursor_" data-uid="Terminal.Gui.Button.PositionCursor*"></a>
  686. <h4 id="Terminal_Gui_Button_PositionCursor" data-uid="Terminal.Gui.Button.PositionCursor">PositionCursor()</h4>
  687. <div class="markdown level1 summary"></div>
  688. <div class="markdown level1 conceptual"></div>
  689. <h5 class="decalaration">Declaration</h5>
  690. <div class="codewrapper">
  691. <pre><code class="lang-csharp hljs">public override void PositionCursor ();</code></pre>
  692. </div>
  693. <a id="Terminal_Gui_Button_ProcessColdKey_" data-uid="Terminal.Gui.Button.ProcessColdKey*"></a>
  694. <h4 id="Terminal_Gui_Button_ProcessColdKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Button.ProcessColdKey(Terminal.Gui.KeyEvent)">ProcessColdKey(KeyEvent)</h4>
  695. <div class="markdown level1 summary"></div>
  696. <div class="markdown level1 conceptual"></div>
  697. <h5 class="decalaration">Declaration</h5>
  698. <div class="codewrapper">
  699. <pre><code class="lang-csharp hljs">public override bool ProcessColdKey (Terminal.Gui.KeyEvent kb);</code></pre>
  700. </div>
  701. <h5 class="parameters">Parameters</h5>
  702. <table class="table table-bordered table-striped table-condensed">
  703. <thead>
  704. <tr>
  705. <th>Type</th>
  706. <th>Name</th>
  707. <th>Description</th>
  708. </tr>
  709. </thead>
  710. <tbody>
  711. <tr>
  712. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  713. <td><span class="parametername">kb</span></td>
  714. <td><p>To be added.</p>
  715. </td>
  716. </tr>
  717. </tbody>
  718. </table>
  719. <h5 class="returns">Returns</h5>
  720. <table class="table table-bordered table-striped table-condensed">
  721. <thead>
  722. <tr>
  723. <th>Type</th>
  724. <th>Description</th>
  725. </tr>
  726. </thead>
  727. <tbody>
  728. <tr>
  729. <td><span class="xref">System.Boolean</span></td>
  730. <td><p>To be added.</p>
  731. </td>
  732. </tr>
  733. </tbody>
  734. </table>
  735. <a id="Terminal_Gui_Button_ProcessHotKey_" data-uid="Terminal.Gui.Button.ProcessHotKey*"></a>
  736. <h4 id="Terminal_Gui_Button_ProcessHotKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Button.ProcessHotKey(Terminal.Gui.KeyEvent)">ProcessHotKey(KeyEvent)</h4>
  737. <div class="markdown level1 summary"></div>
  738. <div class="markdown level1 conceptual"></div>
  739. <h5 class="decalaration">Declaration</h5>
  740. <div class="codewrapper">
  741. <pre><code class="lang-csharp hljs">public override bool ProcessHotKey (Terminal.Gui.KeyEvent kb);</code></pre>
  742. </div>
  743. <h5 class="parameters">Parameters</h5>
  744. <table class="table table-bordered table-striped table-condensed">
  745. <thead>
  746. <tr>
  747. <th>Type</th>
  748. <th>Name</th>
  749. <th>Description</th>
  750. </tr>
  751. </thead>
  752. <tbody>
  753. <tr>
  754. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  755. <td><span class="parametername">kb</span></td>
  756. <td><p>To be added.</p>
  757. </td>
  758. </tr>
  759. </tbody>
  760. </table>
  761. <h5 class="returns">Returns</h5>
  762. <table class="table table-bordered table-striped table-condensed">
  763. <thead>
  764. <tr>
  765. <th>Type</th>
  766. <th>Description</th>
  767. </tr>
  768. </thead>
  769. <tbody>
  770. <tr>
  771. <td><span class="xref">System.Boolean</span></td>
  772. <td><p>To be added.</p>
  773. </td>
  774. </tr>
  775. </tbody>
  776. </table>
  777. <a id="Terminal_Gui_Button_ProcessKey_" data-uid="Terminal.Gui.Button.ProcessKey*"></a>
  778. <h4 id="Terminal_Gui_Button_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Button.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  779. <div class="markdown level1 summary"></div>
  780. <div class="markdown level1 conceptual"></div>
  781. <h5 class="decalaration">Declaration</h5>
  782. <div class="codewrapper">
  783. <pre><code class="lang-csharp hljs">public override bool ProcessKey (Terminal.Gui.KeyEvent kb);</code></pre>
  784. </div>
  785. <h5 class="parameters">Parameters</h5>
  786. <table class="table table-bordered table-striped table-condensed">
  787. <thead>
  788. <tr>
  789. <th>Type</th>
  790. <th>Name</th>
  791. <th>Description</th>
  792. </tr>
  793. </thead>
  794. <tbody>
  795. <tr>
  796. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  797. <td><span class="parametername">kb</span></td>
  798. <td><p>To be added.</p>
  799. </td>
  800. </tr>
  801. </tbody>
  802. </table>
  803. <h5 class="returns">Returns</h5>
  804. <table class="table table-bordered table-striped table-condensed">
  805. <thead>
  806. <tr>
  807. <th>Type</th>
  808. <th>Description</th>
  809. </tr>
  810. </thead>
  811. <tbody>
  812. <tr>
  813. <td><span class="xref">System.Boolean</span></td>
  814. <td><p>To be added.</p>
  815. </td>
  816. </tr>
  817. </tbody>
  818. </table>
  819. <a id="Terminal_Gui_Button_Redraw_" data-uid="Terminal.Gui.Button.Redraw*"></a>
  820. <h4 id="Terminal_Gui_Button_Redraw_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Button.Redraw(Terminal.Gui.Rect)">Redraw(Rect)</h4>
  821. <div class="markdown level1 summary"></div>
  822. <div class="markdown level1 conceptual"></div>
  823. <h5 class="decalaration">Declaration</h5>
  824. <div class="codewrapper">
  825. <pre><code class="lang-csharp hljs">public override void Redraw (Terminal.Gui.Rect region);</code></pre>
  826. </div>
  827. <h5 class="parameters">Parameters</h5>
  828. <table class="table table-bordered table-striped table-condensed">
  829. <thead>
  830. <tr>
  831. <th>Type</th>
  832. <th>Name</th>
  833. <th>Description</th>
  834. </tr>
  835. </thead>
  836. <tbody>
  837. <tr>
  838. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  839. <td><span class="parametername">region</span></td>
  840. <td><p>To be added.</p>
  841. </td>
  842. </tr>
  843. </tbody>
  844. </table>
  845. </article>
  846. </div>
  847. <div class="hidden-sm col-md-2" role="complementary">
  848. <div class="sideaffix">
  849. <div class="contribution">
  850. <ul class="nav">
  851. </ul>
  852. </div>
  853. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  854. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  855. </nav>
  856. </div>
  857. </div>
  858. </div>
  859. </div>
  860. <footer>
  861. <div class="grad-bottom"></div>
  862. <div class="footer">
  863. <div class="container">
  864. <span class="pull-right">
  865. <a href="#top">Back to top</a>
  866. </span>
  867. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  868. </div>
  869. </div>
  870. </footer>
  871. </div>
  872. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  873. <script type="text/javascript" src="../../styles/docfx.js"></script>
  874. <script type="text/javascript" src="../../styles/main.js"></script>
  875. </body>
  876. </html>