Terminal.Gui.ClipboardBase.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  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 ClipboardBase
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class ClipboardBase
  11. ">
  12. <link rel="shortcut icon" href="../../favicon.ico">
  13. <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
  14. <link rel="stylesheet" href="../../styles/docfx.css">
  15. <link rel="stylesheet" href="../../styles/main.css">
  16. <meta property="docfx:navrel" content="../../toc.html">
  17. <meta property="docfx:tocrel" content="toc.html">
  18. <meta property="docfx:rel" content="../../">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div class="container body-content">
  54. <div id="search-results">
  55. <div class="search-list">Search Results for <span></span></div>
  56. <div class="sr-items">
  57. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  58. </div>
  59. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  60. </div>
  61. </div>
  62. <div role="main" class="container body-content hide-when-search">
  63. <div class="sidenav hide-when-search">
  64. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  65. <div class="sidetoggle collapse" id="sidetoggle">
  66. <div id="sidetoc"></div>
  67. </div>
  68. </div>
  69. <div class="article row grid-right">
  70. <div class="col-md-10">
  71. <article class="content wrap" id="_content" data-uid="Terminal.Gui.ClipboardBase">
  72. <h1 id="Terminal_Gui_ClipboardBase" data-uid="Terminal.Gui.ClipboardBase" class="text-break">Class ClipboardBase
  73. </h1>
  74. <div class="markdown level0 summary">Shared abstract class to enforce rules from the implementation of the <a class="xref" href="Terminal.Gui.IClipboard.html">IClipboard</a> interface.</div>
  75. <div class="markdown level0 conceptual"></div>
  76. <div class="inheritance">
  77. <h5>Inheritance</h5>
  78. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  79. <div class="level1"><span class="xref">ClipboardBase</span></div>
  80. <div class="level2"><a class="xref" href="Terminal.Gui.FakeDriver.FakeClipboard.html">FakeDriver.FakeClipboard</a></div>
  81. </div>
  82. <div class="implements">
  83. <h5>Implements</h5>
  84. <div><a class="xref" href="Terminal.Gui.IClipboard.html">IClipboard</a></div>
  85. </div>
  86. <div class="inheritedMembers">
  87. <h5>Inherited Members</h5>
  88. <div>
  89. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  90. </div>
  91. <div>
  92. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
  93. </div>
  94. <div>
  95. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  96. </div>
  97. <div>
  98. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  99. </div>
  100. <div>
  101. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
  108. </div>
  109. </div>
  110. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a></h6>
  111. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  112. <h5 id="Terminal_Gui_ClipboardBase_syntax">Syntax</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">public abstract class ClipboardBase : IClipboard</code></pre>
  115. </div>
  116. <h3 id="properties">Properties
  117. </h3>
  118. <span class="small pull-right mobile-hide">
  119. <span class="divider">|</span>
  120. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_IsSupported.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.IsSupported%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  121. </span>
  122. <span class="small pull-right mobile-hide">
  123. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L15">View Source</a>
  124. </span>
  125. <a id="Terminal_Gui_ClipboardBase_IsSupported_" data-uid="Terminal.Gui.ClipboardBase.IsSupported*"></a>
  126. <h4 id="Terminal_Gui_ClipboardBase_IsSupported" data-uid="Terminal.Gui.ClipboardBase.IsSupported">IsSupported</h4>
  127. <div class="markdown level1 summary">Returns true if the environmental dependencies are in place to interact with the OS clipboard</div>
  128. <div class="markdown level1 conceptual"></div>
  129. <h5 class="declaration">Declaration</h5>
  130. <div class="codewrapper">
  131. <pre><code class="lang-csharp hljs">public abstract bool IsSupported { get; }</code></pre>
  132. </div>
  133. <h5 class="propertyValue">Property Value</h5>
  134. <table class="table table-bordered table-condensed">
  135. <thead>
  136. <tr>
  137. <th>Type</th>
  138. <th>Description</th>
  139. </tr>
  140. </thead>
  141. <tbody>
  142. <tr>
  143. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  144. <td></td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <h3 id="methods">Methods
  149. </h3>
  150. <span class="small pull-right mobile-hide">
  151. <span class="divider">|</span>
  152. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_GetClipboardData.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.GetClipboardData%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  153. </span>
  154. <span class="small pull-right mobile-hide">
  155. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L22">View Source</a>
  156. </span>
  157. <a id="Terminal_Gui_ClipboardBase_GetClipboardData_" data-uid="Terminal.Gui.ClipboardBase.GetClipboardData*"></a>
  158. <h4 id="Terminal_Gui_ClipboardBase_GetClipboardData" data-uid="Terminal.Gui.ClipboardBase.GetClipboardData">GetClipboardData()</h4>
  159. <div class="markdown level1 summary">Returns the contents of the OS clipboard if possible.</div>
  160. <div class="markdown level1 conceptual"></div>
  161. <h5 class="declaration">Declaration</h5>
  162. <div class="codewrapper">
  163. <pre><code class="lang-csharp hljs">public string GetClipboardData()</code></pre>
  164. </div>
  165. <h5 class="returns">Returns</h5>
  166. <table class="table table-bordered table-condensed">
  167. <thead>
  168. <tr>
  169. <th>Type</th>
  170. <th>Description</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. <tr>
  175. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  176. <td>The contents of the OS clipboard if successful.</td>
  177. </tr>
  178. </tbody>
  179. </table>
  180. <h5 class="exceptions">Exceptions</h5>
  181. <table class="table table-bordered table-condensed">
  182. <thead>
  183. <tr>
  184. <th>Type</th>
  185. <th>Condition</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. <tr>
  190. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
  191. <td>Thrown if it was not possible to copy from the OS clipboard.</td>
  192. </tr>
  193. </tbody>
  194. </table>
  195. <span class="small pull-right mobile-hide">
  196. <span class="divider">|</span>
  197. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_GetClipboardDataImpl.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.GetClipboardDataImpl%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  198. </span>
  199. <span class="small pull-right mobile-hide">
  200. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L36">View Source</a>
  201. </span>
  202. <a id="Terminal_Gui_ClipboardBase_GetClipboardDataImpl_" data-uid="Terminal.Gui.ClipboardBase.GetClipboardDataImpl*"></a>
  203. <h4 id="Terminal_Gui_ClipboardBase_GetClipboardDataImpl" data-uid="Terminal.Gui.ClipboardBase.GetClipboardDataImpl">GetClipboardDataImpl()</h4>
  204. <div class="markdown level1 summary">Returns the contents of the OS clipboard if possible. Implemented by <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a>-specific subclasses.</div>
  205. <div class="markdown level1 conceptual"></div>
  206. <h5 class="declaration">Declaration</h5>
  207. <div class="codewrapper">
  208. <pre><code class="lang-csharp hljs">protected abstract string GetClipboardDataImpl()</code></pre>
  209. </div>
  210. <h5 class="returns">Returns</h5>
  211. <table class="table table-bordered table-condensed">
  212. <thead>
  213. <tr>
  214. <th>Type</th>
  215. <th>Description</th>
  216. </tr>
  217. </thead>
  218. <tbody>
  219. <tr>
  220. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  221. <td>The contents of the OS clipboard if successful.</td>
  222. </tr>
  223. </tbody>
  224. </table>
  225. <h5 class="exceptions">Exceptions</h5>
  226. <table class="table table-bordered table-condensed">
  227. <thead>
  228. <tr>
  229. <th>Type</th>
  230. <th>Condition</th>
  231. </tr>
  232. </thead>
  233. <tbody>
  234. <tr>
  235. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
  236. <td>Thrown if it was not possible to copy from the OS clipboard.</td>
  237. </tr>
  238. </tbody>
  239. </table>
  240. <span class="small pull-right mobile-hide">
  241. <span class="divider">|</span>
  242. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_SetClipboardData_System_String_.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.SetClipboardData(System.String)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  243. </span>
  244. <span class="small pull-right mobile-hide">
  245. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L43">View Source</a>
  246. </span>
  247. <a id="Terminal_Gui_ClipboardBase_SetClipboardData_" data-uid="Terminal.Gui.ClipboardBase.SetClipboardData*"></a>
  248. <h4 id="Terminal_Gui_ClipboardBase_SetClipboardData_System_String_" data-uid="Terminal.Gui.ClipboardBase.SetClipboardData(System.String)">SetClipboardData(string)</h4>
  249. <div class="markdown level1 summary">Pastes the <code class="paramref">text</code> to the OS clipboard if possible.</div>
  250. <div class="markdown level1 conceptual"></div>
  251. <h5 class="declaration">Declaration</h5>
  252. <div class="codewrapper">
  253. <pre><code class="lang-csharp hljs">public void SetClipboardData(string text)</code></pre>
  254. </div>
  255. <h5 class="parameters">Parameters</h5>
  256. <table class="table table-bordered table-condensed">
  257. <thead>
  258. <tr>
  259. <th>Type</th>
  260. <th>Name</th>
  261. <th>Description</th>
  262. </tr>
  263. </thead>
  264. <tbody>
  265. <tr>
  266. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  267. <td><span class="parametername">text</span></td>
  268. <td>The text to paste to the OS clipboard.</td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. <h5 class="exceptions">Exceptions</h5>
  273. <table class="table table-bordered table-condensed">
  274. <thead>
  275. <tr>
  276. <th>Type</th>
  277. <th>Condition</th>
  278. </tr>
  279. </thead>
  280. <tbody>
  281. <tr>
  282. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
  283. <td>Thrown if it was not possible to paste to the OS clipboard.</td>
  284. </tr>
  285. </tbody>
  286. </table>
  287. <span class="small pull-right mobile-hide">
  288. <span class="divider">|</span>
  289. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_SetClipboardDataImpl_System_String_.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.SetClipboardDataImpl(System.String)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  290. </span>
  291. <span class="small pull-right mobile-hide">
  292. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L57">View Source</a>
  293. </span>
  294. <a id="Terminal_Gui_ClipboardBase_SetClipboardDataImpl_" data-uid="Terminal.Gui.ClipboardBase.SetClipboardDataImpl*"></a>
  295. <h4 id="Terminal_Gui_ClipboardBase_SetClipboardDataImpl_System_String_" data-uid="Terminal.Gui.ClipboardBase.SetClipboardDataImpl(System.String)">SetClipboardDataImpl(string)</h4>
  296. <div class="markdown level1 summary">Pastes the <code class="paramref">text</code> to the OS clipboard if possible. Implemented by <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a>-specific subclasses.</div>
  297. <div class="markdown level1 conceptual"></div>
  298. <h5 class="declaration">Declaration</h5>
  299. <div class="codewrapper">
  300. <pre><code class="lang-csharp hljs">protected abstract void SetClipboardDataImpl(string text)</code></pre>
  301. </div>
  302. <h5 class="parameters">Parameters</h5>
  303. <table class="table table-bordered table-condensed">
  304. <thead>
  305. <tr>
  306. <th>Type</th>
  307. <th>Name</th>
  308. <th>Description</th>
  309. </tr>
  310. </thead>
  311. <tbody>
  312. <tr>
  313. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  314. <td><span class="parametername">text</span></td>
  315. <td>The text to paste to the OS clipboard.</td>
  316. </tr>
  317. </tbody>
  318. </table>
  319. <h5 class="exceptions">Exceptions</h5>
  320. <table class="table table-bordered table-condensed">
  321. <thead>
  322. <tr>
  323. <th>Type</th>
  324. <th>Condition</th>
  325. </tr>
  326. </thead>
  327. <tbody>
  328. <tr>
  329. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
  330. <td>Thrown if it was not possible to paste to the OS clipboard.</td>
  331. </tr>
  332. </tbody>
  333. </table>
  334. <span class="small pull-right mobile-hide">
  335. <span class="divider">|</span>
  336. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_TryGetClipboardData_System_String__.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.TryGetClipboardData(System.String%40)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  337. </span>
  338. <span class="small pull-right mobile-hide">
  339. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L64">View Source</a>
  340. </span>
  341. <a id="Terminal_Gui_ClipboardBase_TryGetClipboardData_" data-uid="Terminal.Gui.ClipboardBase.TryGetClipboardData*"></a>
  342. <h4 id="Terminal_Gui_ClipboardBase_TryGetClipboardData_System_String__" data-uid="Terminal.Gui.ClipboardBase.TryGetClipboardData(System.String@)">TryGetClipboardData(out string)</h4>
  343. <div class="markdown level1 summary">Copies the contents of the OS clipboard to <code class="paramref">result</code> if possible.</div>
  344. <div class="markdown level1 conceptual"></div>
  345. <h5 class="declaration">Declaration</h5>
  346. <div class="codewrapper">
  347. <pre><code class="lang-csharp hljs">public bool TryGetClipboardData(out string result)</code></pre>
  348. </div>
  349. <h5 class="parameters">Parameters</h5>
  350. <table class="table table-bordered table-condensed">
  351. <thead>
  352. <tr>
  353. <th>Type</th>
  354. <th>Name</th>
  355. <th>Description</th>
  356. </tr>
  357. </thead>
  358. <tbody>
  359. <tr>
  360. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  361. <td><span class="parametername">result</span></td>
  362. <td>The contents of the OS clipboard if successful, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string.empty">Empty</a> if not.</td>
  363. </tr>
  364. </tbody>
  365. </table>
  366. <h5 class="returns">Returns</h5>
  367. <table class="table table-bordered table-condensed">
  368. <thead>
  369. <tr>
  370. <th>Type</th>
  371. <th>Description</th>
  372. </tr>
  373. </thead>
  374. <tbody>
  375. <tr>
  376. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  377. <td><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> the OS clipboard was retrieved, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> otherwise.</td>
  378. </tr>
  379. </tbody>
  380. </table>
  381. <span class="small pull-right mobile-hide">
  382. <span class="divider">|</span>
  383. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase_TrySetClipboardData_System_String_.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase.TrySetClipboardData(System.String)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  384. </span>
  385. <span class="small pull-right mobile-hide">
  386. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L90">View Source</a>
  387. </span>
  388. <a id="Terminal_Gui_ClipboardBase_TrySetClipboardData_" data-uid="Terminal.Gui.ClipboardBase.TrySetClipboardData*"></a>
  389. <h4 id="Terminal_Gui_ClipboardBase_TrySetClipboardData_System_String_" data-uid="Terminal.Gui.ClipboardBase.TrySetClipboardData(System.String)">TrySetClipboardData(string)</h4>
  390. <div class="markdown level1 summary">Pastes the <code class="paramref">text</code> to the OS clipboard if possible.</div>
  391. <div class="markdown level1 conceptual"></div>
  392. <h5 class="declaration">Declaration</h5>
  393. <div class="codewrapper">
  394. <pre><code class="lang-csharp hljs">public bool TrySetClipboardData(string text)</code></pre>
  395. </div>
  396. <h5 class="parameters">Parameters</h5>
  397. <table class="table table-bordered table-condensed">
  398. <thead>
  399. <tr>
  400. <th>Type</th>
  401. <th>Name</th>
  402. <th>Description</th>
  403. </tr>
  404. </thead>
  405. <tbody>
  406. <tr>
  407. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  408. <td><span class="parametername">text</span></td>
  409. <td>The text to paste to the OS clipboard.</td>
  410. </tr>
  411. </tbody>
  412. </table>
  413. <h5 class="returns">Returns</h5>
  414. <table class="table table-bordered table-condensed">
  415. <thead>
  416. <tr>
  417. <th>Type</th>
  418. <th>Description</th>
  419. </tr>
  420. </thead>
  421. <tbody>
  422. <tr>
  423. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  424. <td><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> the OS clipboard was set, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> otherwise.</td>
  425. </tr>
  426. </tbody>
  427. </table>
  428. <h3 id="implements">Implements</h3>
  429. <div>
  430. <a class="xref" href="Terminal.Gui.IClipboard.html">IClipboard</a>
  431. </div>
  432. </article>
  433. </div>
  434. <div class="hidden-sm col-md-2" role="complementary">
  435. <div class="sideaffix">
  436. <div class="contribution">
  437. <ul class="nav">
  438. <li>
  439. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_ClipboardBase.md&amp;value=---%0Auid%3A%20Terminal.Gui.ClipboardBase%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
  440. </li>
  441. <li>
  442. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Clipboard/ClipboardBase.cs/#L11" class="contribution-link">View Source</a>
  443. </li>
  444. </ul>
  445. </div>
  446. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  447. <h5>In this article</h5>
  448. <div></div>
  449. </nav>
  450. </div>
  451. </div>
  452. </div>
  453. </div>
  454. <footer>
  455. <div class="grad-bottom"></div>
  456. <div class="footer">
  457. <div class="container">
  458. <span class="pull-right">
  459. <a href="#top">Back to top</a>
  460. </span>
  461. <span>Generated by <strong>DocFX</strong></span>
  462. </div>
  463. </div>
  464. </footer>
  465. </div>
  466. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  467. <script type="text/javascript" src="../../styles/docfx.js"></script>
  468. <script type="text/javascript" src="../../styles/main.js"></script>
  469. </body>
  470. </html>