2
0

Terminal.Gui.IListDataSource.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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>Interface IListDataSource
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Interface IListDataSource
  11. ">
  12. <meta name="generator" content="docfx 2.54.0.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. <meta property="docfx:rel" content="../../">
  21. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.IListDataSource">
  73. <h1 id="Terminal_Gui_IListDataSource" data-uid="Terminal.Gui.IListDataSource" class="text-break">Interface IListDataSource
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Implement <a class="xref" href="Terminal.Gui.IListDataSource.html">IListDataSource</a> to provide custom rendering for a <a class="xref" href="Terminal.Gui.ListView.html">ListView</a>.
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  80. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  81. <h5 id="Terminal_Gui_IListDataSource_syntax">Syntax</h5>
  82. <div class="codewrapper">
  83. <pre><code class="lang-csharp hljs">public interface IListDataSource</code></pre>
  84. </div>
  85. <h3 id="properties">Properties
  86. </h3>
  87. <a id="Terminal_Gui_IListDataSource_Count_" data-uid="Terminal.Gui.IListDataSource.Count*"></a>
  88. <h4 id="Terminal_Gui_IListDataSource_Count" data-uid="Terminal.Gui.IListDataSource.Count">Count</h4>
  89. <div class="markdown level1 summary">
  90. Returns the number of elements to display
  91. </div>
  92. <div class="markdown level1 conceptual"></div>
  93. <h5 class="decalaration">Declaration</h5>
  94. <div class="codewrapper">
  95. <pre><code class="lang-csharp hljs">int Count { get; }</code></pre>
  96. </div>
  97. <h5 class="propertyValue">Property Value</h5>
  98. <table class="table table-bordered table-striped table-condensed">
  99. <thead>
  100. <tr>
  101. <th>Type</th>
  102. <th>Description</th>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. <tr>
  107. <td><span class="xref">System.Int32</span></td>
  108. <td></td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. <h3 id="methods">Methods
  113. </h3>
  114. <a id="Terminal_Gui_IListDataSource_IsMarked_" data-uid="Terminal.Gui.IListDataSource.IsMarked*"></a>
  115. <h4 id="Terminal_Gui_IListDataSource_IsMarked_System_Int32_" data-uid="Terminal.Gui.IListDataSource.IsMarked(System.Int32)">IsMarked(Int32)</h4>
  116. <div class="markdown level1 summary">
  117. Should return whether the specified item is currently marked.
  118. </div>
  119. <div class="markdown level1 conceptual"></div>
  120. <h5 class="decalaration">Declaration</h5>
  121. <div class="codewrapper">
  122. <pre><code class="lang-csharp hljs">bool IsMarked(int item)</code></pre>
  123. </div>
  124. <h5 class="parameters">Parameters</h5>
  125. <table class="table table-bordered table-striped table-condensed">
  126. <thead>
  127. <tr>
  128. <th>Type</th>
  129. <th>Name</th>
  130. <th>Description</th>
  131. </tr>
  132. </thead>
  133. <tbody>
  134. <tr>
  135. <td><span class="xref">System.Int32</span></td>
  136. <td><span class="parametername">item</span></td>
  137. <td>Item index.</td>
  138. </tr>
  139. </tbody>
  140. </table>
  141. <h5 class="returns">Returns</h5>
  142. <table class="table table-bordered table-striped table-condensed">
  143. <thead>
  144. <tr>
  145. <th>Type</th>
  146. <th>Description</th>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. <tr>
  151. <td><span class="xref">System.Boolean</span></td>
  152. <td><code>true</code>, if marked, <code>false</code> otherwise.</td>
  153. </tr>
  154. </tbody>
  155. </table>
  156. <a id="Terminal_Gui_IListDataSource_Render_" data-uid="Terminal.Gui.IListDataSource.Render*"></a>
  157. <h4 id="Terminal_Gui_IListDataSource_Render_Terminal_Gui_ListView_Terminal_Gui_ConsoleDriver_System_Boolean_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="Terminal.Gui.IListDataSource.Render(Terminal.Gui.ListView,Terminal.Gui.ConsoleDriver,System.Boolean,System.Int32,System.Int32,System.Int32,System.Int32)">Render(ListView, ConsoleDriver, Boolean, Int32, Int32, Int32, Int32)</h4>
  158. <div class="markdown level1 summary">
  159. This method is invoked to render a specified item, the method should cover the entire provided width.
  160. </div>
  161. <div class="markdown level1 conceptual"></div>
  162. <h5 class="decalaration">Declaration</h5>
  163. <div class="codewrapper">
  164. <pre><code class="lang-csharp hljs">void Render(ListView container, ConsoleDriver driver, bool selected, int item, int col, int line, int width)</code></pre>
  165. </div>
  166. <h5 class="parameters">Parameters</h5>
  167. <table class="table table-bordered table-striped table-condensed">
  168. <thead>
  169. <tr>
  170. <th>Type</th>
  171. <th>Name</th>
  172. <th>Description</th>
  173. </tr>
  174. </thead>
  175. <tbody>
  176. <tr>
  177. <td><a class="xref" href="Terminal.Gui.ListView.html">ListView</a></td>
  178. <td><span class="parametername">container</span></td>
  179. <td>The list view to render.</td>
  180. </tr>
  181. <tr>
  182. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  183. <td><span class="parametername">driver</span></td>
  184. <td>The console driver to render.</td>
  185. </tr>
  186. <tr>
  187. <td><span class="xref">System.Boolean</span></td>
  188. <td><span class="parametername">selected</span></td>
  189. <td>Describes whether the item being rendered is currently selected by the user.</td>
  190. </tr>
  191. <tr>
  192. <td><span class="xref">System.Int32</span></td>
  193. <td><span class="parametername">item</span></td>
  194. <td>The index of the item to render, zero for the first item and so on.</td>
  195. </tr>
  196. <tr>
  197. <td><span class="xref">System.Int32</span></td>
  198. <td><span class="parametername">col</span></td>
  199. <td>The column where the rendering will start</td>
  200. </tr>
  201. <tr>
  202. <td><span class="xref">System.Int32</span></td>
  203. <td><span class="parametername">line</span></td>
  204. <td>The line where the rendering will be done.</td>
  205. </tr>
  206. <tr>
  207. <td><span class="xref">System.Int32</span></td>
  208. <td><span class="parametername">width</span></td>
  209. <td>The width that must be filled out.</td>
  210. </tr>
  211. </tbody>
  212. </table>
  213. <h5 id="Terminal_Gui_IListDataSource_Render_Terminal_Gui_ListView_Terminal_Gui_ConsoleDriver_System_Boolean_System_Int32_System_Int32_System_Int32_System_Int32__remarks">Remarks</h5>
  214. <div class="markdown level1 remarks">
  215. The default color will be set before this method is invoked, and will be based on whether the item is selected or not.
  216. </div>
  217. <a id="Terminal_Gui_IListDataSource_SetMark_" data-uid="Terminal.Gui.IListDataSource.SetMark*"></a>
  218. <h4 id="Terminal_Gui_IListDataSource_SetMark_System_Int32_System_Boolean_" data-uid="Terminal.Gui.IListDataSource.SetMark(System.Int32,System.Boolean)">SetMark(Int32, Boolean)</h4>
  219. <div class="markdown level1 summary">
  220. Flags the item as marked.
  221. </div>
  222. <div class="markdown level1 conceptual"></div>
  223. <h5 class="decalaration">Declaration</h5>
  224. <div class="codewrapper">
  225. <pre><code class="lang-csharp hljs">void SetMark(int item, bool value)</code></pre>
  226. </div>
  227. <h5 class="parameters">Parameters</h5>
  228. <table class="table table-bordered table-striped table-condensed">
  229. <thead>
  230. <tr>
  231. <th>Type</th>
  232. <th>Name</th>
  233. <th>Description</th>
  234. </tr>
  235. </thead>
  236. <tbody>
  237. <tr>
  238. <td><span class="xref">System.Int32</span></td>
  239. <td><span class="parametername">item</span></td>
  240. <td>Item index.</td>
  241. </tr>
  242. <tr>
  243. <td><span class="xref">System.Boolean</span></td>
  244. <td><span class="parametername">value</span></td>
  245. <td>If set to <code>true</code> value.</td>
  246. </tr>
  247. </tbody>
  248. </table>
  249. <a id="Terminal_Gui_IListDataSource_ToList_" data-uid="Terminal.Gui.IListDataSource.ToList*"></a>
  250. <h4 id="Terminal_Gui_IListDataSource_ToList" data-uid="Terminal.Gui.IListDataSource.ToList">ToList()</h4>
  251. <div class="markdown level1 summary">
  252. Return the source as IList.
  253. </div>
  254. <div class="markdown level1 conceptual"></div>
  255. <h5 class="decalaration">Declaration</h5>
  256. <div class="codewrapper">
  257. <pre><code class="lang-csharp hljs">IList ToList()</code></pre>
  258. </div>
  259. <h5 class="returns">Returns</h5>
  260. <table class="table table-bordered table-striped table-condensed">
  261. <thead>
  262. <tr>
  263. <th>Type</th>
  264. <th>Description</th>
  265. </tr>
  266. </thead>
  267. <tbody>
  268. <tr>
  269. <td><span class="xref">System.Collections.IList</span></td>
  270. <td></td>
  271. </tr>
  272. </tbody>
  273. </table>
  274. </article>
  275. </div>
  276. <div class="hidden-sm col-md-2" role="complementary">
  277. <div class="sideaffix">
  278. <div class="contribution">
  279. <ul class="nav">
  280. </ul>
  281. </div>
  282. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  283. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  284. </nav>
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. <footer>
  290. <div class="grad-bottom"></div>
  291. <div class="footer">
  292. <div class="container">
  293. <span class="pull-right">
  294. <a href="#top">Back to top</a>
  295. </span>
  296. <span>Generated by <strong>DocFX</strong></span>
  297. </div>
  298. </div>
  299. </footer>
  300. </div>
  301. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  302. <script type="text/javascript" src="../../styles/docfx.js"></script>
  303. <script type="text/javascript" src="../../styles/main.js"></script>
  304. </body>
  305. </html>