Terminal.Gui.ListWrapper.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  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 ListWrapper
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ListWrapper
  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.ListWrapper">
  74. <h1 id="Terminal_Gui_ListWrapper" data-uid="Terminal.Gui.ListWrapper" class="text-break">Class ListWrapper
  75. </h1>
  76. <div class="markdown level0 summary">
  77. Implements an <a class="xref" href="Terminal.Gui.IListDataSource.html">IListDataSource</a> that renders arbitrary <span class="xref">System.Collections.IList</span> instances for <a class="xref" href="Terminal.Gui.ListView.html">ListView</a>.
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><span class="xref">System.Object</span></div>
  83. <div class="level1"><span class="xref">ListWrapper</span></div>
  84. </div>
  85. <div class="implements">
  86. <h5>Implements</h5>
  87. <div><a class="xref" href="Terminal.Gui.IListDataSource.html">IListDataSource</a></div>
  88. </div>
  89. <h5 id="Terminal_Gui_ListWrapper_remarks"><strong>Remarks</strong></h5>
  90. <div class="markdown level0 remarks">Implements support for rendering marked items.</div>
  91. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  92. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  93. <h5 id="Terminal_Gui_ListWrapper_syntax">Syntax</h5>
  94. <div class="codewrapper">
  95. <pre><code class="lang-csharp hljs">public class ListWrapper : Object, IListDataSource</code></pre>
  96. </div>
  97. <h3 id="constructors">Constructors
  98. </h3>
  99. <a id="Terminal_Gui_ListWrapper__ctor_" data-uid="Terminal.Gui.ListWrapper.#ctor*"></a>
  100. <h4 id="Terminal_Gui_ListWrapper__ctor_System_Collections_IList_" data-uid="Terminal.Gui.ListWrapper.#ctor(System.Collections.IList)">ListWrapper(IList)</h4>
  101. <div class="markdown level1 summary">
  102. Initializes a new instance of <a class="xref" href="Terminal.Gui.ListWrapper.html">ListWrapper</a> given an <span class="xref">System.Collections.IList</span>
  103. </div>
  104. <div class="markdown level1 conceptual"></div>
  105. <h5 class="decalaration">Declaration</h5>
  106. <div class="codewrapper">
  107. <pre><code class="lang-csharp hljs">public ListWrapper(IList source)</code></pre>
  108. </div>
  109. <h5 class="parameters">Parameters</h5>
  110. <table class="table table-bordered table-striped table-condensed">
  111. <thead>
  112. <tr>
  113. <th>Type</th>
  114. <th>Name</th>
  115. <th>Description</th>
  116. </tr>
  117. </thead>
  118. <tbody>
  119. <tr>
  120. <td><span class="xref">System.Collections.IList</span></td>
  121. <td><span class="parametername">source</span></td>
  122. <td></td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. <h3 id="properties">Properties
  127. </h3>
  128. <a id="Terminal_Gui_ListWrapper_Count_" data-uid="Terminal.Gui.ListWrapper.Count*"></a>
  129. <h4 id="Terminal_Gui_ListWrapper_Count" data-uid="Terminal.Gui.ListWrapper.Count">Count</h4>
  130. <div class="markdown level1 summary">
  131. Gets the number of items in the <span class="xref">System.Collections.IList</span>.
  132. </div>
  133. <div class="markdown level1 conceptual"></div>
  134. <h5 class="decalaration">Declaration</h5>
  135. <div class="codewrapper">
  136. <pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
  137. </div>
  138. <h5 class="propertyValue">Property Value</h5>
  139. <table class="table table-bordered table-striped table-condensed">
  140. <thead>
  141. <tr>
  142. <th>Type</th>
  143. <th>Description</th>
  144. </tr>
  145. </thead>
  146. <tbody>
  147. <tr>
  148. <td><span class="xref">System.Int32</span></td>
  149. <td></td>
  150. </tr>
  151. </tbody>
  152. </table>
  153. <a id="Terminal_Gui_ListWrapper_Length_" data-uid="Terminal.Gui.ListWrapper.Length*"></a>
  154. <h4 id="Terminal_Gui_ListWrapper_Length" data-uid="Terminal.Gui.ListWrapper.Length">Length</h4>
  155. <div class="markdown level1 summary">
  156. Gets the maximum item length in the <span class="xref">System.Collections.IList</span>.
  157. </div>
  158. <div class="markdown level1 conceptual"></div>
  159. <h5 class="decalaration">Declaration</h5>
  160. <div class="codewrapper">
  161. <pre><code class="lang-csharp hljs">public int Length { get; }</code></pre>
  162. </div>
  163. <h5 class="propertyValue">Property Value</h5>
  164. <table class="table table-bordered table-striped table-condensed">
  165. <thead>
  166. <tr>
  167. <th>Type</th>
  168. <th>Description</th>
  169. </tr>
  170. </thead>
  171. <tbody>
  172. <tr>
  173. <td><span class="xref">System.Int32</span></td>
  174. <td></td>
  175. </tr>
  176. </tbody>
  177. </table>
  178. <h3 id="methods">Methods
  179. </h3>
  180. <a id="Terminal_Gui_ListWrapper_IsMarked_" data-uid="Terminal.Gui.ListWrapper.IsMarked*"></a>
  181. <h4 id="Terminal_Gui_ListWrapper_IsMarked_System_Int32_" data-uid="Terminal.Gui.ListWrapper.IsMarked(System.Int32)">IsMarked(Int32)</h4>
  182. <div class="markdown level1 summary">
  183. Returns true if the item is marked, false otherwise.
  184. </div>
  185. <div class="markdown level1 conceptual"></div>
  186. <h5 class="decalaration">Declaration</h5>
  187. <div class="codewrapper">
  188. <pre><code class="lang-csharp hljs">public bool IsMarked(int item)</code></pre>
  189. </div>
  190. <h5 class="parameters">Parameters</h5>
  191. <table class="table table-bordered table-striped table-condensed">
  192. <thead>
  193. <tr>
  194. <th>Type</th>
  195. <th>Name</th>
  196. <th>Description</th>
  197. </tr>
  198. </thead>
  199. <tbody>
  200. <tr>
  201. <td><span class="xref">System.Int32</span></td>
  202. <td><span class="parametername">item</span></td>
  203. <td>The item.</td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <h5 class="returns">Returns</h5>
  208. <table class="table table-bordered table-striped table-condensed">
  209. <thead>
  210. <tr>
  211. <th>Type</th>
  212. <th>Description</th>
  213. </tr>
  214. </thead>
  215. <tbody>
  216. <tr>
  217. <td><span class="xref">System.Boolean</span></td>
  218. <td><code>true</code>If is marked.<code>false</code>otherwise.</td>
  219. </tr>
  220. </tbody>
  221. </table>
  222. <a id="Terminal_Gui_ListWrapper_Render_" data-uid="Terminal.Gui.ListWrapper.Render*"></a>
  223. <h4 id="Terminal_Gui_ListWrapper_Render_Terminal_Gui_ListView_Terminal_Gui_ConsoleDriver_System_Boolean_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="Terminal.Gui.ListWrapper.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>
  224. <div class="markdown level1 summary">
  225. Renders a <a class="xref" href="Terminal.Gui.ListView.html">ListView</a> item to the appropriate type.
  226. </div>
  227. <div class="markdown level1 conceptual"></div>
  228. <h5 class="decalaration">Declaration</h5>
  229. <div class="codewrapper">
  230. <pre><code class="lang-csharp hljs">public void Render(ListView container, ConsoleDriver driver, bool marked, int item, int col, int line, int width, int start = 0)</code></pre>
  231. </div>
  232. <h5 class="parameters">Parameters</h5>
  233. <table class="table table-bordered table-striped table-condensed">
  234. <thead>
  235. <tr>
  236. <th>Type</th>
  237. <th>Name</th>
  238. <th>Description</th>
  239. </tr>
  240. </thead>
  241. <tbody>
  242. <tr>
  243. <td><a class="xref" href="Terminal.Gui.ListView.html">ListView</a></td>
  244. <td><span class="parametername">container</span></td>
  245. <td>The ListView.</td>
  246. </tr>
  247. <tr>
  248. <td><a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a></td>
  249. <td><span class="parametername">driver</span></td>
  250. <td>The driver used by the caller.</td>
  251. </tr>
  252. <tr>
  253. <td><span class="xref">System.Boolean</span></td>
  254. <td><span class="parametername">marked</span></td>
  255. <td>Informs if it&apos;s marked or not.</td>
  256. </tr>
  257. <tr>
  258. <td><span class="xref">System.Int32</span></td>
  259. <td><span class="parametername">item</span></td>
  260. <td>The item.</td>
  261. </tr>
  262. <tr>
  263. <td><span class="xref">System.Int32</span></td>
  264. <td><span class="parametername">col</span></td>
  265. <td>The col where to move.</td>
  266. </tr>
  267. <tr>
  268. <td><span class="xref">System.Int32</span></td>
  269. <td><span class="parametername">line</span></td>
  270. <td>The line where to move.</td>
  271. </tr>
  272. <tr>
  273. <td><span class="xref">System.Int32</span></td>
  274. <td><span class="parametername">width</span></td>
  275. <td>The item width.</td>
  276. </tr>
  277. <tr>
  278. <td><span class="xref">System.Int32</span></td>
  279. <td><span class="parametername">start</span></td>
  280. <td>The index of the string to be displayed.</td>
  281. </tr>
  282. </tbody>
  283. </table>
  284. <a id="Terminal_Gui_ListWrapper_SetMark_" data-uid="Terminal.Gui.ListWrapper.SetMark*"></a>
  285. <h4 id="Terminal_Gui_ListWrapper_SetMark_System_Int32_System_Boolean_" data-uid="Terminal.Gui.ListWrapper.SetMark(System.Int32,System.Boolean)">SetMark(Int32, Boolean)</h4>
  286. <div class="markdown level1 summary">
  287. Sets the item as marked or unmarked based on the value is true or false, respectively.
  288. </div>
  289. <div class="markdown level1 conceptual"></div>
  290. <h5 class="decalaration">Declaration</h5>
  291. <div class="codewrapper">
  292. <pre><code class="lang-csharp hljs">public void SetMark(int item, bool value)</code></pre>
  293. </div>
  294. <h5 class="parameters">Parameters</h5>
  295. <table class="table table-bordered table-striped table-condensed">
  296. <thead>
  297. <tr>
  298. <th>Type</th>
  299. <th>Name</th>
  300. <th>Description</th>
  301. </tr>
  302. </thead>
  303. <tbody>
  304. <tr>
  305. <td><span class="xref">System.Int32</span></td>
  306. <td><span class="parametername">item</span></td>
  307. <td>The item</td>
  308. </tr>
  309. <tr>
  310. <td><span class="xref">System.Boolean</span></td>
  311. <td><span class="parametername">value</span></td>
  312. <td><true>Marks the item.</true><false>Unmarked the item.</false>The value.</td>
  313. </tr>
  314. </tbody>
  315. </table>
  316. <a id="Terminal_Gui_ListWrapper_ToList_" data-uid="Terminal.Gui.ListWrapper.ToList*"></a>
  317. <h4 id="Terminal_Gui_ListWrapper_ToList" data-uid="Terminal.Gui.ListWrapper.ToList">ToList()</h4>
  318. <div class="markdown level1 summary">
  319. Returns the source as IList.
  320. </div>
  321. <div class="markdown level1 conceptual"></div>
  322. <h5 class="decalaration">Declaration</h5>
  323. <div class="codewrapper">
  324. <pre><code class="lang-csharp hljs">public IList ToList()</code></pre>
  325. </div>
  326. <h5 class="returns">Returns</h5>
  327. <table class="table table-bordered table-striped table-condensed">
  328. <thead>
  329. <tr>
  330. <th>Type</th>
  331. <th>Description</th>
  332. </tr>
  333. </thead>
  334. <tbody>
  335. <tr>
  336. <td><span class="xref">System.Collections.IList</span></td>
  337. <td></td>
  338. </tr>
  339. </tbody>
  340. </table>
  341. <h3 id="implements">Implements</h3>
  342. <div>
  343. <a class="xref" href="Terminal.Gui.IListDataSource.html">IListDataSource</a>
  344. </div>
  345. </article>
  346. </div>
  347. <div class="hidden-sm col-md-2" role="complementary">
  348. <div class="sideaffix">
  349. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  350. <h5>In This Article</h5>
  351. <div></div>
  352. </nav>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. <footer>
  358. <div class="grad-bottom"></div>
  359. <div class="footer">
  360. <div class="container">
  361. <span class="pull-right">
  362. <a href="#top">Back to top</a>
  363. </span>
  364. <span>Generated by <strong>DocFX</strong></span>
  365. </div>
  366. </div>
  367. </footer>
  368. </div>
  369. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  370. <script type="text/javascript" src="../../styles/docfx.js"></script>
  371. <script type="text/javascript" src="../../styles/main.js"></script>
  372. </body>
  373. </html>