Terminal.Gui.IListDataSource.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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.4.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. <span class="small pull-right mobile-hide">
  89. <span class="divider">|</span>
  90. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource_Count.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource.Count%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  91. </span>
  92. <span class="small pull-right mobile-hide">
  93. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L35">View Source</a>
  94. </span>
  95. <a id="Terminal_Gui_IListDataSource_Count_" data-uid="Terminal.Gui.IListDataSource.Count*"></a>
  96. <h4 id="Terminal_Gui_IListDataSource_Count" data-uid="Terminal.Gui.IListDataSource.Count">Count</h4>
  97. <div class="markdown level1 summary">
  98. Returns the number of elements to display
  99. </div>
  100. <div class="markdown level1 conceptual"></div>
  101. <h5 class="decalaration">Declaration</h5>
  102. <div class="codewrapper">
  103. <pre><code class="lang-csharp hljs">int Count { get; }</code></pre>
  104. </div>
  105. <h5 class="propertyValue">Property Value</h5>
  106. <table class="table table-bordered table-striped table-condensed">
  107. <thead>
  108. <tr>
  109. <th>Type</th>
  110. <th>Description</th>
  111. </tr>
  112. </thead>
  113. <tbody>
  114. <tr>
  115. <td><span class="xref">System.Int32</span></td>
  116. <td></td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. <span class="small pull-right mobile-hide">
  121. <span class="divider">|</span>
  122. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource_Length.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource.Length%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  123. </span>
  124. <span class="small pull-right mobile-hide">
  125. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L40">View Source</a>
  126. </span>
  127. <a id="Terminal_Gui_IListDataSource_Length_" data-uid="Terminal.Gui.IListDataSource.Length*"></a>
  128. <h4 id="Terminal_Gui_IListDataSource_Length" data-uid="Terminal.Gui.IListDataSource.Length">Length</h4>
  129. <div class="markdown level1 summary">
  130. Returns the maximum length of elements to display
  131. </div>
  132. <div class="markdown level1 conceptual"></div>
  133. <h5 class="decalaration">Declaration</h5>
  134. <div class="codewrapper">
  135. <pre><code class="lang-csharp hljs">int Length { get; }</code></pre>
  136. </div>
  137. <h5 class="propertyValue">Property Value</h5>
  138. <table class="table table-bordered table-striped table-condensed">
  139. <thead>
  140. <tr>
  141. <th>Type</th>
  142. <th>Description</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td><span class="xref">System.Int32</span></td>
  148. <td></td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <h3 id="methods">Methods
  153. </h3>
  154. <span class="small pull-right mobile-hide">
  155. <span class="divider">|</span>
  156. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource_IsMarked_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource.IsMarked(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  157. </span>
  158. <span class="small pull-right mobile-hide">
  159. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L64">View Source</a>
  160. </span>
  161. <a id="Terminal_Gui_IListDataSource_IsMarked_" data-uid="Terminal.Gui.IListDataSource.IsMarked*"></a>
  162. <h4 id="Terminal_Gui_IListDataSource_IsMarked_System_Int32_" data-uid="Terminal.Gui.IListDataSource.IsMarked(System.Int32)">IsMarked(Int32)</h4>
  163. <div class="markdown level1 summary">
  164. Should return whether the specified item is currently marked.
  165. </div>
  166. <div class="markdown level1 conceptual"></div>
  167. <h5 class="decalaration">Declaration</h5>
  168. <div class="codewrapper">
  169. <pre><code class="lang-csharp hljs">bool IsMarked(int item)</code></pre>
  170. </div>
  171. <h5 class="parameters">Parameters</h5>
  172. <table class="table table-bordered table-striped table-condensed">
  173. <thead>
  174. <tr>
  175. <th>Type</th>
  176. <th>Name</th>
  177. <th>Description</th>
  178. </tr>
  179. </thead>
  180. <tbody>
  181. <tr>
  182. <td><span class="xref">System.Int32</span></td>
  183. <td><span class="parametername">item</span></td>
  184. <td>Item index.</td>
  185. </tr>
  186. </tbody>
  187. </table>
  188. <h5 class="returns">Returns</h5>
  189. <table class="table table-bordered table-striped table-condensed">
  190. <thead>
  191. <tr>
  192. <th>Type</th>
  193. <th>Description</th>
  194. </tr>
  195. </thead>
  196. <tbody>
  197. <tr>
  198. <td><span class="xref">System.Boolean</span></td>
  199. <td><code>true</code>, if marked, <code>false</code> otherwise.</td>
  200. </tr>
  201. </tbody>
  202. </table>
  203. <span class="small pull-right mobile-hide">
  204. <span class="divider">|</span>
  205. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource_Render_Terminal_Gui_ListView_Terminal_Gui_ConsoleDriver_System_Boolean_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource.Render(Terminal.Gui.ListView%2CTerminal.Gui.ConsoleDriver%2CSystem.Boolean%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  206. </span>
  207. <span class="small pull-right mobile-hide">
  208. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L57">View Source</a>
  209. </span>
  210. <a id="Terminal_Gui_IListDataSource_Render_" data-uid="Terminal.Gui.IListDataSource.Render*"></a>
  211. <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>
  212. <div class="markdown level1 summary">
  213. This method is invoked to render a specified item, the method should cover the entire provided width.
  214. </div>
  215. <div class="markdown level1 conceptual"></div>
  216. <h5 class="decalaration">Declaration</h5>
  217. <div class="codewrapper">
  218. <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>
  219. </div>
  220. <h5 class="parameters">Parameters</h5>
  221. <table class="table table-bordered table-striped table-condensed">
  222. <thead>
  223. <tr>
  224. <th>Type</th>
  225. <th>Name</th>
  226. <th>Description</th>
  227. </tr>
  228. </thead>
  229. <tbody>
  230. <tr>
  231. <td><a class="xref" href="Terminal.Gui.ListView.html">ListView</a></td>
  232. <td><span class="parametername">container</span></td>
  233. <td>The list view to render.</td>
  234. </tr>
  235. <tr>
  236. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  237. <td><span class="parametername">driver</span></td>
  238. <td>The console driver to render.</td>
  239. </tr>
  240. <tr>
  241. <td><span class="xref">System.Boolean</span></td>
  242. <td><span class="parametername">selected</span></td>
  243. <td>Describes whether the item being rendered is currently selected by the user.</td>
  244. </tr>
  245. <tr>
  246. <td><span class="xref">System.Int32</span></td>
  247. <td><span class="parametername">item</span></td>
  248. <td>The index of the item to render, zero for the first item and so on.</td>
  249. </tr>
  250. <tr>
  251. <td><span class="xref">System.Int32</span></td>
  252. <td><span class="parametername">col</span></td>
  253. <td>The column where the rendering will start</td>
  254. </tr>
  255. <tr>
  256. <td><span class="xref">System.Int32</span></td>
  257. <td><span class="parametername">line</span></td>
  258. <td>The line where the rendering will be done.</td>
  259. </tr>
  260. <tr>
  261. <td><span class="xref">System.Int32</span></td>
  262. <td><span class="parametername">width</span></td>
  263. <td>The width that must be filled out.</td>
  264. </tr>
  265. <tr>
  266. <td><span class="xref">System.Int32</span></td>
  267. <td><span class="parametername">start</span></td>
  268. <td>The index of the string to be displayed.</td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. <span class="small pull-right mobile-hide">
  273. <span class="divider">|</span>
  274. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource_SetMark_System_Int32_System_Boolean_.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource.SetMark(System.Int32%2CSystem.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  275. </span>
  276. <span class="small pull-right mobile-hide">
  277. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L71">View Source</a>
  278. </span>
  279. <a id="Terminal_Gui_IListDataSource_SetMark_" data-uid="Terminal.Gui.IListDataSource.SetMark*"></a>
  280. <h4 id="Terminal_Gui_IListDataSource_SetMark_System_Int32_System_Boolean_" data-uid="Terminal.Gui.IListDataSource.SetMark(System.Int32,System.Boolean)">SetMark(Int32, Boolean)</h4>
  281. <div class="markdown level1 summary">
  282. Flags the item as marked.
  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">void SetMark(int item, bool value)</code></pre>
  288. </div>
  289. <h5 class="parameters">Parameters</h5>
  290. <table class="table table-bordered table-striped table-condensed">
  291. <thead>
  292. <tr>
  293. <th>Type</th>
  294. <th>Name</th>
  295. <th>Description</th>
  296. </tr>
  297. </thead>
  298. <tbody>
  299. <tr>
  300. <td><span class="xref">System.Int32</span></td>
  301. <td><span class="parametername">item</span></td>
  302. <td>Item index.</td>
  303. </tr>
  304. <tr>
  305. <td><span class="xref">System.Boolean</span></td>
  306. <td><span class="parametername">value</span></td>
  307. <td>If set to <code>true</code> value.</td>
  308. </tr>
  309. </tbody>
  310. </table>
  311. <span class="small pull-right mobile-hide">
  312. <span class="divider">|</span>
  313. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource_ToList.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource.ToList%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  314. </span>
  315. <span class="small pull-right mobile-hide">
  316. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L77">View Source</a>
  317. </span>
  318. <a id="Terminal_Gui_IListDataSource_ToList_" data-uid="Terminal.Gui.IListDataSource.ToList*"></a>
  319. <h4 id="Terminal_Gui_IListDataSource_ToList" data-uid="Terminal.Gui.IListDataSource.ToList">ToList()</h4>
  320. <div class="markdown level1 summary">
  321. Return the source as IList.
  322. </div>
  323. <div class="markdown level1 conceptual"></div>
  324. <h5 class="decalaration">Declaration</h5>
  325. <div class="codewrapper">
  326. <pre><code class="lang-csharp hljs">IList ToList()</code></pre>
  327. </div>
  328. <h5 class="returns">Returns</h5>
  329. <table class="table table-bordered table-striped table-condensed">
  330. <thead>
  331. <tr>
  332. <th>Type</th>
  333. <th>Description</th>
  334. </tr>
  335. </thead>
  336. <tbody>
  337. <tr>
  338. <td><span class="xref">System.Collections.IList</span></td>
  339. <td></td>
  340. </tr>
  341. </tbody>
  342. </table>
  343. </article>
  344. </div>
  345. <div class="hidden-sm col-md-2" role="complementary">
  346. <div class="sideaffix">
  347. <div class="contribution">
  348. <ul class="nav">
  349. <li>
  350. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_IListDataSource.md&amp;value=---%0Auid%3A%20Terminal.Gui.IListDataSource%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  351. </li>
  352. <li>
  353. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Views/ListView.cs/#L31" class="contribution-link">View Source</a>
  354. </li>
  355. </ul>
  356. </div>
  357. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  358. <h5>In This Article</h5>
  359. <div></div>
  360. </nav>
  361. </div>
  362. </div>
  363. </div>
  364. </div>
  365. <footer>
  366. <div class="grad-bottom"></div>
  367. <div class="footer">
  368. <div class="container">
  369. <span class="pull-right">
  370. <a href="#top">Back to top</a>
  371. </span>
  372. <span>Generated by <strong>DocFX</strong></span>
  373. </div>
  374. </div>
  375. </footer>
  376. </div>
  377. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  378. <script type="text/javascript" src="../../styles/docfx.js"></script>
  379. <script type="text/javascript" src="../../styles/main.js"></script>
  380. </body>
  381. </html>