Terminal.Gui.Responder.html 15 KB

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