Terminal.Gui.Responder.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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 Responder
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Responder
  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.Responder">
  63. <h1 id="Terminal_Gui_Responder" data-uid="Terminal.Gui.Responder">Class Responder
  64. </h1>
  65. <div class="markdown level0 summary"><p>Responder base class implemented by objects that want to participate on keyboard and mouse input.</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"><span class="xref">Responder</span></div>
  72. </div>
  73. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  74. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  75. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  76. <h5 id="Terminal_Gui_Responder_syntax">Syntax</h5>
  77. <div class="codewrapper">
  78. <pre><code class="lang-csharp hljs">public class Responder</code></pre>
  79. </div>
  80. <h3 id="constructors">Constructors
  81. </h3>
  82. <a id="Terminal_Gui_Responder__ctor_" data-uid="Terminal.Gui.Responder.#ctor*"></a>
  83. <h4 id="Terminal_Gui_Responder__ctor" data-uid="Terminal.Gui.Responder.#ctor">Responder()</h4>
  84. <div class="markdown level1 summary"></div>
  85. <div class="markdown level1 conceptual"></div>
  86. <h5 class="decalaration">Declaration</h5>
  87. <div class="codewrapper">
  88. <pre><code class="lang-csharp hljs">public Responder ();</code></pre>
  89. </div>
  90. <h3 id="properties">Properties
  91. </h3>
  92. <a id="Terminal_Gui_Responder_CanFocus_" data-uid="Terminal.Gui.Responder.CanFocus*"></a>
  93. <h4 id="Terminal_Gui_Responder_CanFocus" data-uid="Terminal.Gui.Responder.CanFocus">CanFocus</h4>
  94. <div class="markdown level1 summary"><p>Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Responder.html">Responder</a> can focus.</p>
  95. </div>
  96. <div class="markdown level1 conceptual"></div>
  97. <h5 class="decalaration">Declaration</h5>
  98. <div class="codewrapper">
  99. <pre><code class="lang-csharp hljs">public virtual bool CanFocus { get; set; }</code></pre>
  100. </div>
  101. <h5 class="propertyValue">Property Value</h5>
  102. <table class="table table-bordered table-striped table-condensed">
  103. <thead>
  104. <tr>
  105. <th>Type</th>
  106. <th>Description</th>
  107. </tr>
  108. </thead>
  109. <tbody>
  110. <tr>
  111. <td><span class="xref">System.Boolean</span></td>
  112. <td><p><code>true</code> if can focus; otherwise, <code>false</code>.</p>
  113. </td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. <a id="Terminal_Gui_Responder_HasFocus_" data-uid="Terminal.Gui.Responder.HasFocus*"></a>
  118. <h4 id="Terminal_Gui_Responder_HasFocus" data-uid="Terminal.Gui.Responder.HasFocus">HasFocus</h4>
  119. <div class="markdown level1 summary"><p>Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Responder.html">Responder</a> has focus.</p>
  120. </div>
  121. <div class="markdown level1 conceptual"></div>
  122. <h5 class="decalaration">Declaration</h5>
  123. <div class="codewrapper">
  124. <pre><code class="lang-csharp hljs">public virtual bool HasFocus { get; }</code></pre>
  125. </div>
  126. <h5 class="propertyValue">Property Value</h5>
  127. <table class="table table-bordered table-striped table-condensed">
  128. <thead>
  129. <tr>
  130. <th>Type</th>
  131. <th>Description</th>
  132. </tr>
  133. </thead>
  134. <tbody>
  135. <tr>
  136. <td><span class="xref">System.Boolean</span></td>
  137. <td><p><code>true</code> if has focus; otherwise, <code>false</code>.</p>
  138. </td>
  139. </tr>
  140. </tbody>
  141. </table>
  142. <h3 id="methods">Methods
  143. </h3>
  144. <a id="Terminal_Gui_Responder_MouseEvent_" data-uid="Terminal.Gui.Responder.MouseEvent*"></a>
  145. <h4 id="Terminal_Gui_Responder_MouseEvent_Terminal_Gui_MouseEvent_" data-uid="Terminal.Gui.Responder.MouseEvent(Terminal.Gui.MouseEvent)">MouseEvent(MouseEvent)</h4>
  146. <div class="markdown level1 summary"><p>Method invoked when a mouse event is generated</p>
  147. </div>
  148. <div class="markdown level1 conceptual"></div>
  149. <h5 class="decalaration">Declaration</h5>
  150. <div class="codewrapper">
  151. <pre><code class="lang-csharp hljs">public virtual bool MouseEvent (Terminal.Gui.MouseEvent mouseEvent);</code></pre>
  152. </div>
  153. <h5 class="parameters">Parameters</h5>
  154. <table class="table table-bordered table-striped table-condensed">
  155. <thead>
  156. <tr>
  157. <th>Type</th>
  158. <th>Name</th>
  159. <th>Description</th>
  160. </tr>
  161. </thead>
  162. <tbody>
  163. <tr>
  164. <td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
  165. <td><span class="parametername">mouseEvent</span></td>
  166. <td><p>Contains the details about the mouse event.</p>
  167. </td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. <h5 class="returns">Returns</h5>
  172. <table class="table table-bordered table-striped table-condensed">
  173. <thead>
  174. <tr>
  175. <th>Type</th>
  176. <th>Description</th>
  177. </tr>
  178. </thead>
  179. <tbody>
  180. <tr>
  181. <td><span class="xref">System.Boolean</span></td>
  182. <td><p><code>true</code>, if the event was handled, <code>false</code> otherwise.</p>
  183. </td>
  184. </tr>
  185. </tbody>
  186. </table>
  187. <a id="Terminal_Gui_Responder_ProcessColdKey_" data-uid="Terminal.Gui.Responder.ProcessColdKey*"></a>
  188. <h4 id="Terminal_Gui_Responder_ProcessColdKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.ProcessColdKey(Terminal.Gui.KeyEvent)">ProcessColdKey(KeyEvent)</h4>
  189. <div class="markdown level1 summary"><p>This method can be overwritten by views that
  190. want to provide accelerator functionality
  191. (Alt-key for example), but without
  192. interefering with normal ProcessKey behavior.</p>
  193. </div>
  194. <div class="markdown level1 conceptual"></div>
  195. <h5 class="decalaration">Declaration</h5>
  196. <div class="codewrapper">
  197. <pre><code class="lang-csharp hljs">public virtual bool ProcessColdKey (Terminal.Gui.KeyEvent keyEvent);</code></pre>
  198. </div>
  199. <h5 class="parameters">Parameters</h5>
  200. <table class="table table-bordered table-striped table-condensed">
  201. <thead>
  202. <tr>
  203. <th>Type</th>
  204. <th>Name</th>
  205. <th>Description</th>
  206. </tr>
  207. </thead>
  208. <tbody>
  209. <tr>
  210. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  211. <td><span class="parametername">keyEvent</span></td>
  212. <td><p>Contains the details about the key that produced the event.</p>
  213. </td>
  214. </tr>
  215. </tbody>
  216. </table>
  217. <h5 class="returns">Returns</h5>
  218. <table class="table table-bordered table-striped table-condensed">
  219. <thead>
  220. <tr>
  221. <th>Type</th>
  222. <th>Description</th>
  223. </tr>
  224. </thead>
  225. <tbody>
  226. <tr>
  227. <td><span class="xref">System.Boolean</span></td>
  228. <td><p>To be added.</p>
  229. </td>
  230. </tr>
  231. </tbody>
  232. </table>
  233. <h5 id="Terminal_Gui_Responder_ProcessColdKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  234. <div class="markdown level1 remarks"><p>
  235. After keys are sent to the subviews on the
  236. current view, all the view are
  237. processed and the key is passed to the views
  238. to allow some of them to process the keystroke
  239. as a cold-key. </p>
  240. <p>
  241. This functionality is used, for example, by
  242. default buttons to act on the enter key.
  243. Processing this as a hot-key would prevent
  244. non-default buttons from consuming the enter
  245. keypress when they have the focus.
  246. </p></div>
  247. <a id="Terminal_Gui_Responder_ProcessHotKey_" data-uid="Terminal.Gui.Responder.ProcessHotKey*"></a>
  248. <h4 id="Terminal_Gui_Responder_ProcessHotKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.ProcessHotKey(Terminal.Gui.KeyEvent)">ProcessHotKey(KeyEvent)</h4>
  249. <div class="markdown level1 summary"><p>This method can be overwritten by view that
  250. want to provide accelerator functionality
  251. (Alt-key for example).</p>
  252. </div>
  253. <div class="markdown level1 conceptual"></div>
  254. <h5 class="decalaration">Declaration</h5>
  255. <div class="codewrapper">
  256. <pre><code class="lang-csharp hljs">public virtual bool ProcessHotKey (Terminal.Gui.KeyEvent kb);</code></pre>
  257. </div>
  258. <h5 class="parameters">Parameters</h5>
  259. <table class="table table-bordered table-striped table-condensed">
  260. <thead>
  261. <tr>
  262. <th>Type</th>
  263. <th>Name</th>
  264. <th>Description</th>
  265. </tr>
  266. </thead>
  267. <tbody>
  268. <tr>
  269. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  270. <td><span class="parametername">kb</span></td>
  271. <td><p>To be added.</p>
  272. </td>
  273. </tr>
  274. </tbody>
  275. </table>
  276. <h5 class="returns">Returns</h5>
  277. <table class="table table-bordered table-striped table-condensed">
  278. <thead>
  279. <tr>
  280. <th>Type</th>
  281. <th>Description</th>
  282. </tr>
  283. </thead>
  284. <tbody>
  285. <tr>
  286. <td><span class="xref">System.Boolean</span></td>
  287. <td><p>To be added.</p>
  288. </td>
  289. </tr>
  290. </tbody>
  291. </table>
  292. <h5 id="Terminal_Gui_Responder_ProcessHotKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  293. <div class="markdown level1 remarks"><p>
  294. Before keys are sent to the subview on the
  295. current view, all the views are
  296. processed and the key is passed to the widgets
  297. to allow some of them to process the keystroke
  298. as a hot-key. </p>
  299. <p>
  300. For example, if you implement a button that
  301. has a hotkey ok &quot;o&quot;, you would catch the
  302. combination Alt-o here. If the event is
  303. caught, you must return true to stop the
  304. keystroke from being dispatched to other
  305. views.
  306. </p></div>
  307. <a id="Terminal_Gui_Responder_ProcessKey_" data-uid="Terminal.Gui.Responder.ProcessKey*"></a>
  308. <h4 id="Terminal_Gui_Responder_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  309. <div class="markdown level1 summary"><p>If the view is focused, gives the view a
  310. chance to process the keystroke.</p>
  311. </div>
  312. <div class="markdown level1 conceptual"></div>
  313. <h5 class="decalaration">Declaration</h5>
  314. <div class="codewrapper">
  315. <pre><code class="lang-csharp hljs">public virtual bool ProcessKey (Terminal.Gui.KeyEvent keyEvent);</code></pre>
  316. </div>
  317. <h5 class="parameters">Parameters</h5>
  318. <table class="table table-bordered table-striped table-condensed">
  319. <thead>
  320. <tr>
  321. <th>Type</th>
  322. <th>Name</th>
  323. <th>Description</th>
  324. </tr>
  325. </thead>
  326. <tbody>
  327. <tr>
  328. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  329. <td><span class="parametername">keyEvent</span></td>
  330. <td><p>Contains the details about the key that produced the event.</p>
  331. </td>
  332. </tr>
  333. </tbody>
  334. </table>
  335. <h5 class="returns">Returns</h5>
  336. <table class="table table-bordered table-striped table-condensed">
  337. <thead>
  338. <tr>
  339. <th>Type</th>
  340. <th>Description</th>
  341. </tr>
  342. </thead>
  343. <tbody>
  344. <tr>
  345. <td><span class="xref">System.Boolean</span></td>
  346. <td><p>To be added.</p>
  347. </td>
  348. </tr>
  349. </tbody>
  350. </table>
  351. <h5 id="Terminal_Gui_Responder_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  352. <div class="markdown level1 remarks"><p>
  353. Views can override this method if they are
  354. interested in processing the given keystroke.
  355. If they consume the keystroke, they must
  356. return true to stop the keystroke from being
  357. processed by other widgets or consumed by the
  358. widget engine. If they return false, the
  359. keystroke will be passed using the ProcessColdKey
  360. method to other views to process.
  361. </p>
  362. <p>
  363. The View implementation does nothing but return false,
  364. so it is not necessary to call base.ProcessKey if you
  365. derive directly from View, but you should if you derive
  366. other View subclasses.
  367. </p></div>
  368. </article>
  369. </div>
  370. <div class="hidden-sm col-md-2" role="complementary">
  371. <div class="sideaffix">
  372. <div class="contribution">
  373. <ul class="nav">
  374. </ul>
  375. </div>
  376. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  377. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  378. </nav>
  379. </div>
  380. </div>
  381. </div>
  382. </div>
  383. <footer>
  384. <div class="grad-bottom"></div>
  385. <div class="footer">
  386. <div class="container">
  387. <span class="pull-right">
  388. <a href="#top">Back to top</a>
  389. </span>
  390. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  391. </div>
  392. </div>
  393. </footer>
  394. </div>
  395. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  396. <script type="text/javascript" src="../../styles/docfx.js"></script>
  397. <script type="text/javascript" src="../../styles/main.js"></script>
  398. </body>
  399. </html>