Terminal.Gui.IListDataSource.html 13 KB

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