Terminal.Gui.IListDataSource.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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.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="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <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">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></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. <a id="Terminal_Gui_IListDataSource_Length_" data-uid="Terminal.Gui.IListDataSource.Length*"></a>
  113. <h4 id="Terminal_Gui_IListDataSource_Length" data-uid="Terminal.Gui.IListDataSource.Length">Length</h4>
  114. <div class="markdown level1 summary">
  115. Returns the maximum length of elements to display
  116. </div>
  117. <div class="markdown level1 conceptual"></div>
  118. <h5 class="decalaration">Declaration</h5>
  119. <div class="codewrapper">
  120. <pre><code class="lang-csharp hljs">int Length { get; }</code></pre>
  121. </div>
  122. <h5 class="propertyValue">Property Value</h5>
  123. <table class="table table-bordered table-striped table-condensed">
  124. <thead>
  125. <tr>
  126. <th>Type</th>
  127. <th>Description</th>
  128. </tr>
  129. </thead>
  130. <tbody>
  131. <tr>
  132. <td><span class="xref">System.Int32</span></td>
  133. <td></td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. <h3 id="methods">Methods
  138. </h3>
  139. <a id="Terminal_Gui_IListDataSource_IsMarked_" data-uid="Terminal.Gui.IListDataSource.IsMarked*"></a>
  140. <h4 id="Terminal_Gui_IListDataSource_IsMarked_System_Int32_" data-uid="Terminal.Gui.IListDataSource.IsMarked(System.Int32)">IsMarked(Int32)</h4>
  141. <div class="markdown level1 summary">
  142. Should return whether the specified item is currently marked.
  143. </div>
  144. <div class="markdown level1 conceptual"></div>
  145. <h5 class="decalaration">Declaration</h5>
  146. <div class="codewrapper">
  147. <pre><code class="lang-csharp hljs">bool IsMarked(int item)</code></pre>
  148. </div>
  149. <h5 class="parameters">Parameters</h5>
  150. <table class="table table-bordered table-striped table-condensed">
  151. <thead>
  152. <tr>
  153. <th>Type</th>
  154. <th>Name</th>
  155. <th>Description</th>
  156. </tr>
  157. </thead>
  158. <tbody>
  159. <tr>
  160. <td><span class="xref">System.Int32</span></td>
  161. <td><span class="parametername">item</span></td>
  162. <td>Item index.</td>
  163. </tr>
  164. </tbody>
  165. </table>
  166. <h5 class="returns">Returns</h5>
  167. <table class="table table-bordered table-striped table-condensed">
  168. <thead>
  169. <tr>
  170. <th>Type</th>
  171. <th>Description</th>
  172. </tr>
  173. </thead>
  174. <tbody>
  175. <tr>
  176. <td><span class="xref">System.Boolean</span></td>
  177. <td><code>true</code>, if marked, <code>false</code> otherwise.</td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. <a id="Terminal_Gui_IListDataSource_Render_" data-uid="Terminal.Gui.IListDataSource.Render*"></a>
  182. <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>
  183. <div class="markdown level1 summary">
  184. This method is invoked to render a specified item, the method should cover the entire provided width.
  185. </div>
  186. <div class="markdown level1 conceptual"></div>
  187. <h5 class="decalaration">Declaration</h5>
  188. <div class="codewrapper">
  189. <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>
  190. </div>
  191. <h5 class="parameters">Parameters</h5>
  192. <table class="table table-bordered table-striped table-condensed">
  193. <thead>
  194. <tr>
  195. <th>Type</th>
  196. <th>Name</th>
  197. <th>Description</th>
  198. </tr>
  199. </thead>
  200. <tbody>
  201. <tr>
  202. <td><a class="xref" href="Terminal.Gui.ListView.html">ListView</a></td>
  203. <td><span class="parametername">container</span></td>
  204. <td>The list view to render.</td>
  205. </tr>
  206. <tr>
  207. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  208. <td><span class="parametername">driver</span></td>
  209. <td>The console driver to render.</td>
  210. </tr>
  211. <tr>
  212. <td><span class="xref">System.Boolean</span></td>
  213. <td><span class="parametername">selected</span></td>
  214. <td>Describes whether the item being rendered is currently selected by the user.</td>
  215. </tr>
  216. <tr>
  217. <td><span class="xref">System.Int32</span></td>
  218. <td><span class="parametername">item</span></td>
  219. <td>The index of the item to render, zero for the first item and so on.</td>
  220. </tr>
  221. <tr>
  222. <td><span class="xref">System.Int32</span></td>
  223. <td><span class="parametername">col</span></td>
  224. <td>The column where the rendering will start</td>
  225. </tr>
  226. <tr>
  227. <td><span class="xref">System.Int32</span></td>
  228. <td><span class="parametername">line</span></td>
  229. <td>The line where the rendering will be done.</td>
  230. </tr>
  231. <tr>
  232. <td><span class="xref">System.Int32</span></td>
  233. <td><span class="parametername">width</span></td>
  234. <td>The width that must be filled out.</td>
  235. </tr>
  236. <tr>
  237. <td><span class="xref">System.Int32</span></td>
  238. <td><span class="parametername">start</span></td>
  239. <td>The index of the string to be displayed.</td>
  240. </tr>
  241. </tbody>
  242. </table>
  243. <h5 id="Terminal_Gui_IListDataSource_Render_Terminal_Gui_ListView_Terminal_Gui_ConsoleDriver_System_Boolean_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32__remarks">Remarks</h5>
  244. <div class="markdown level1 remarks">
  245. The default color will be set before this method is invoked, and will be based on whether the item is selected or not.
  246. </div>
  247. <a id="Terminal_Gui_IListDataSource_SetMark_" data-uid="Terminal.Gui.IListDataSource.SetMark*"></a>
  248. <h4 id="Terminal_Gui_IListDataSource_SetMark_System_Int32_System_Boolean_" data-uid="Terminal.Gui.IListDataSource.SetMark(System.Int32,System.Boolean)">SetMark(Int32, Boolean)</h4>
  249. <div class="markdown level1 summary">
  250. Flags the item as marked.
  251. </div>
  252. <div class="markdown level1 conceptual"></div>
  253. <h5 class="decalaration">Declaration</h5>
  254. <div class="codewrapper">
  255. <pre><code class="lang-csharp hljs">void SetMark(int item, bool value)</code></pre>
  256. </div>
  257. <h5 class="parameters">Parameters</h5>
  258. <table class="table table-bordered table-striped table-condensed">
  259. <thead>
  260. <tr>
  261. <th>Type</th>
  262. <th>Name</th>
  263. <th>Description</th>
  264. </tr>
  265. </thead>
  266. <tbody>
  267. <tr>
  268. <td><span class="xref">System.Int32</span></td>
  269. <td><span class="parametername">item</span></td>
  270. <td>Item index.</td>
  271. </tr>
  272. <tr>
  273. <td><span class="xref">System.Boolean</span></td>
  274. <td><span class="parametername">value</span></td>
  275. <td>If set to <code>true</code> value.</td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. <a id="Terminal_Gui_IListDataSource_ToList_" data-uid="Terminal.Gui.IListDataSource.ToList*"></a>
  280. <h4 id="Terminal_Gui_IListDataSource_ToList" data-uid="Terminal.Gui.IListDataSource.ToList">ToList()</h4>
  281. <div class="markdown level1 summary">
  282. Return the source as IList.
  283. </div>
  284. <div class="markdown level1 conceptual"></div>
  285. <h5 class="decalaration">Declaration</h5>
  286. <div class="codewrapper">
  287. <pre><code class="lang-csharp hljs">IList ToList()</code></pre>
  288. </div>
  289. <h5 class="returns">Returns</h5>
  290. <table class="table table-bordered table-striped table-condensed">
  291. <thead>
  292. <tr>
  293. <th>Type</th>
  294. <th>Description</th>
  295. </tr>
  296. </thead>
  297. <tbody>
  298. <tr>
  299. <td><span class="xref">System.Collections.IList</span></td>
  300. <td></td>
  301. </tr>
  302. </tbody>
  303. </table>
  304. </article>
  305. </div>
  306. <div class="hidden-sm col-md-2" role="complementary">
  307. <div class="sideaffix">
  308. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  309. <h5>In This Article</h5>
  310. <div></div>
  311. </nav>
  312. </div>
  313. </div>
  314. </div>
  315. </div>
  316. <footer>
  317. <div class="grad-bottom"></div>
  318. <div class="footer">
  319. <div class="container">
  320. <span class="pull-right">
  321. <a href="#top">Back to top</a>
  322. </span>
  323. <span>Generated by <strong>DocFX</strong></span>
  324. </div>
  325. </div>
  326. </footer>
  327. </div>
  328. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  329. <script type="text/javascript" src="../../styles/docfx.js"></script>
  330. <script type="text/javascript" src="../../styles/main.js"></script>
  331. </body>
  332. </html>