Terminal.Gui.Attribute.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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>Struct Attribute
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Struct Attribute
  11. ">
  12. <meta name="generator" content="docfx 2.54.0.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=Roboto" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. <meta property="docfx:rel" content="../../">
  21. </head> <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"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></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.Attribute">
  73. <h1 id="Terminal_Gui_Attribute" data-uid="Terminal.Gui.Attribute" class="text-break">Struct Attribute
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Attributes are used as elements that contain both a foreground and a background or platform specific features
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritedMembers">
  80. <h5>Inherited Members</h5>
  81. <div>
  82. <span class="xref">System.ValueType.Equals(System.Object)</span>
  83. </div>
  84. <div>
  85. <span class="xref">System.ValueType.GetHashCode()</span>
  86. </div>
  87. <div>
  88. <span class="xref">System.ValueType.ToString()</span>
  89. </div>
  90. <div>
  91. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  92. </div>
  93. <div>
  94. <span class="xref">System.Object.GetType()</span>
  95. </div>
  96. <div>
  97. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  98. </div>
  99. </div>
  100. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  101. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  102. <h5 id="Terminal_Gui_Attribute_syntax">Syntax</h5>
  103. <div class="codewrapper">
  104. <pre><code class="lang-csharp hljs">public struct Attribute</code></pre>
  105. </div>
  106. <h5 id="Terminal_Gui_Attribute_remarks"><strong>Remarks</strong></h5>
  107. <div class="markdown level0 remarks">
  108. <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a>s are needed to map colors to terminal capabilities that might lack colors, on color
  109. scenarios, they encode both the foreground and the background color and are used in the <a class="xref" href="Terminal.Gui.ColorScheme.html">ColorScheme</a>
  110. class to define color schemes that can be used in your application.
  111. </div>
  112. <h3 id="constructors">Constructors
  113. </h3>
  114. <a id="Terminal_Gui_Attribute__ctor_" data-uid="Terminal.Gui.Attribute.#ctor*"></a>
  115. <h4 id="Terminal_Gui_Attribute__ctor_System_Int32_Terminal_Gui_Color_Terminal_Gui_Color_" data-uid="Terminal.Gui.Attribute.#ctor(System.Int32,Terminal.Gui.Color,Terminal.Gui.Color)">Attribute(Int32, Color, Color)</h4>
  116. <div class="markdown level1 summary">
  117. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a> struct.
  118. </div>
  119. <div class="markdown level1 conceptual"></div>
  120. <h5 class="decalaration">Declaration</h5>
  121. <div class="codewrapper">
  122. <pre><code class="lang-csharp hljs">public Attribute(int value, Color foreground = Color.Black, Color background = Color.Black)</code></pre>
  123. </div>
  124. <h5 class="parameters">Parameters</h5>
  125. <table class="table table-bordered table-striped table-condensed">
  126. <thead>
  127. <tr>
  128. <th>Type</th>
  129. <th>Name</th>
  130. <th>Description</th>
  131. </tr>
  132. </thead>
  133. <tbody>
  134. <tr>
  135. <td><span class="xref">System.Int32</span></td>
  136. <td><span class="parametername">value</span></td>
  137. <td>Value.</td>
  138. </tr>
  139. <tr>
  140. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  141. <td><span class="parametername">foreground</span></td>
  142. <td>Foreground</td>
  143. </tr>
  144. <tr>
  145. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  146. <td><span class="parametername">background</span></td>
  147. <td>Background</td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <a id="Terminal_Gui_Attribute__ctor_" data-uid="Terminal.Gui.Attribute.#ctor*"></a>
  152. <h4 id="Terminal_Gui_Attribute__ctor_Terminal_Gui_Color_Terminal_Gui_Color_" data-uid="Terminal.Gui.Attribute.#ctor(Terminal.Gui.Color,Terminal.Gui.Color)">Attribute(Color, Color)</h4>
  153. <div class="markdown level1 summary">
  154. Initializes a new instance of the <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a> struct.
  155. </div>
  156. <div class="markdown level1 conceptual"></div>
  157. <h5 class="decalaration">Declaration</h5>
  158. <div class="codewrapper">
  159. <pre><code class="lang-csharp hljs">public Attribute(Color foreground = Color.Black, Color background = Color.Black)</code></pre>
  160. </div>
  161. <h5 class="parameters">Parameters</h5>
  162. <table class="table table-bordered table-striped table-condensed">
  163. <thead>
  164. <tr>
  165. <th>Type</th>
  166. <th>Name</th>
  167. <th>Description</th>
  168. </tr>
  169. </thead>
  170. <tbody>
  171. <tr>
  172. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  173. <td><span class="parametername">foreground</span></td>
  174. <td>Foreground</td>
  175. </tr>
  176. <tr>
  177. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  178. <td><span class="parametername">background</span></td>
  179. <td>Background</td>
  180. </tr>
  181. </tbody>
  182. </table>
  183. <h3 id="methods">Methods
  184. </h3>
  185. <a id="Terminal_Gui_Attribute_Make_" data-uid="Terminal.Gui.Attribute.Make*"></a>
  186. <h4 id="Terminal_Gui_Attribute_Make_Terminal_Gui_Color_Terminal_Gui_Color_" data-uid="Terminal.Gui.Attribute.Make(Terminal.Gui.Color,Terminal.Gui.Color)">Make(Color, Color)</h4>
  187. <div class="markdown level1 summary">
  188. Creates an <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a> from the specified foreground and background.
  189. </div>
  190. <div class="markdown level1 conceptual"></div>
  191. <h5 class="decalaration">Declaration</h5>
  192. <div class="codewrapper">
  193. <pre><code class="lang-csharp hljs">public static Attribute Make(Color foreground, Color background)</code></pre>
  194. </div>
  195. <h5 class="parameters">Parameters</h5>
  196. <table class="table table-bordered table-striped table-condensed">
  197. <thead>
  198. <tr>
  199. <th>Type</th>
  200. <th>Name</th>
  201. <th>Description</th>
  202. </tr>
  203. </thead>
  204. <tbody>
  205. <tr>
  206. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  207. <td><span class="parametername">foreground</span></td>
  208. <td>Foreground color to use.</td>
  209. </tr>
  210. <tr>
  211. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  212. <td><span class="parametername">background</span></td>
  213. <td>Background color to use.</td>
  214. </tr>
  215. </tbody>
  216. </table>
  217. <h5 class="returns">Returns</h5>
  218. <table class="table table-bordered table-striped table-condensed">
  219. <thead>
  220. <tr>
  221. <th>Type</th>
  222. <th>Description</th>
  223. </tr>
  224. </thead>
  225. <tbody>
  226. <tr>
  227. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  228. <td>The make.</td>
  229. </tr>
  230. </tbody>
  231. </table>
  232. <h3 id="operators">Operators
  233. </h3>
  234. <a id="Terminal_Gui_Attribute_op_Implicit_" data-uid="Terminal.Gui.Attribute.op_Implicit*"></a>
  235. <h4 id="Terminal_Gui_Attribute_op_Implicit_System_Int32__Terminal_Gui_Attribute" data-uid="Terminal.Gui.Attribute.op_Implicit(System.Int32)~Terminal.Gui.Attribute">Implicit(Int32 to Attribute)</h4>
  236. <div class="markdown level1 summary">
  237. Implicitly convert an integer value into an <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a>
  238. </div>
  239. <div class="markdown level1 conceptual"></div>
  240. <h5 class="decalaration">Declaration</h5>
  241. <div class="codewrapper">
  242. <pre><code class="lang-csharp hljs">public static implicit operator Attribute(int v)</code></pre>
  243. </div>
  244. <h5 class="parameters">Parameters</h5>
  245. <table class="table table-bordered table-striped table-condensed">
  246. <thead>
  247. <tr>
  248. <th>Type</th>
  249. <th>Name</th>
  250. <th>Description</th>
  251. </tr>
  252. </thead>
  253. <tbody>
  254. <tr>
  255. <td><span class="xref">System.Int32</span></td>
  256. <td><span class="parametername">v</span></td>
  257. <td>value</td>
  258. </tr>
  259. </tbody>
  260. </table>
  261. <h5 class="returns">Returns</h5>
  262. <table class="table table-bordered table-striped table-condensed">
  263. <thead>
  264. <tr>
  265. <th>Type</th>
  266. <th>Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  272. <td>An attribute with the specified integer value.</td>
  273. </tr>
  274. </tbody>
  275. </table>
  276. <a id="Terminal_Gui_Attribute_op_Implicit_" data-uid="Terminal.Gui.Attribute.op_Implicit*"></a>
  277. <h4 id="Terminal_Gui_Attribute_op_Implicit_Terminal_Gui_Attribute__System_Int32" data-uid="Terminal.Gui.Attribute.op_Implicit(Terminal.Gui.Attribute)~System.Int32">Implicit(Attribute to Int32)</h4>
  278. <div class="markdown level1 summary">
  279. Implicit conversion from an <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a> to the underlying Int32 representation
  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">public static implicit operator int (Attribute c)</code></pre>
  285. </div>
  286. <h5 class="parameters">Parameters</h5>
  287. <table class="table table-bordered table-striped table-condensed">
  288. <thead>
  289. <tr>
  290. <th>Type</th>
  291. <th>Name</th>
  292. <th>Description</th>
  293. </tr>
  294. </thead>
  295. <tbody>
  296. <tr>
  297. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  298. <td><span class="parametername">c</span></td>
  299. <td>The attribute to convert</td>
  300. </tr>
  301. </tbody>
  302. </table>
  303. <h5 class="returns">Returns</h5>
  304. <table class="table table-bordered table-striped table-condensed">
  305. <thead>
  306. <tr>
  307. <th>Type</th>
  308. <th>Description</th>
  309. </tr>
  310. </thead>
  311. <tbody>
  312. <tr>
  313. <td><span class="xref">System.Int32</span></td>
  314. <td>The integer value stored in the attribute.</td>
  315. </tr>
  316. </tbody>
  317. </table>
  318. </article>
  319. </div>
  320. <div class="hidden-sm col-md-2" role="complementary">
  321. <div class="sideaffix">
  322. <div class="contribution">
  323. <ul class="nav">
  324. </ul>
  325. </div>
  326. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  327. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  328. </nav>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. <footer>
  334. <div class="grad-bottom"></div>
  335. <div class="footer">
  336. <div class="container">
  337. <span class="pull-right">
  338. <a href="#top">Back to top</a>
  339. </span>
  340. <span>Generated by <strong>DocFX</strong></span>
  341. </div>
  342. </div>
  343. </footer>
  344. </div>
  345. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  346. <script type="text/javascript" src="../../styles/docfx.js"></script>
  347. <script type="text/javascript" src="../../styles/main.js"></script>
  348. </body>
  349. </html>