Terminal.Gui.Attribute.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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.18.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="">
  18. <meta property="docfx:tocrel" content="../toc.html">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix">
  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="../../logo.svg" 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 role="main" class="container body-content hide-when-search">
  54. <div class="sidenav hide-when-search">
  55. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  56. <div class="sidetoggle collapse" id="sidetoggle">
  57. <div id="sidetoc"></div>
  58. </div>
  59. </div>
  60. <div class="article row grid-right">
  61. <div class="col-md-10">
  62. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Attribute">
  63. <h1 id="Terminal_Gui_Attribute" data-uid="Terminal.Gui.Attribute">Struct Attribute
  64. </h1>
  65. <div class="markdown level0 summary"><p>Attributes are used as elements that contain both a foreground and a background or platform specific features</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  69. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  70. <h5 id="Terminal_Gui_Attribute_syntax">Syntax</h5>
  71. <div class="codewrapper">
  72. <pre><code class="lang-csharp hljs">public struct Attribute</code></pre>
  73. </div>
  74. <h5 id="Terminal_Gui_Attribute_remarks"><strong>Remarks</strong></h5>
  75. <div class="markdown level0 remarks"><p>Attributes are needed to map colors to terminal capabilities that might lack colors, on color
  76. scenarios, they encode both the foreground and the background color and are used in the ColorScheme
  77. class to define color schemes that can be used in your application.</p>
  78. </div>
  79. <h3 id="constructors">Constructors
  80. </h3>
  81. <a id="Terminal_Gui_Attribute__ctor_" data-uid="Terminal.Gui.Attribute.#ctor*"></a>
  82. <h4 id="Terminal_Gui_Attribute__ctor_System_Int32_" data-uid="Terminal.Gui.Attribute.#ctor(System.Int32)">Attribute(Int32)</h4>
  83. <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a> struct.</p>
  84. </div>
  85. <div class="markdown level1 conceptual"></div>
  86. <h5 class="decalaration">Declaration</h5>
  87. <div class="codewrapper">
  88. <pre><code class="lang-csharp hljs">public Attribute (int value);</code></pre>
  89. </div>
  90. <h5 class="parameters">Parameters</h5>
  91. <table class="table table-bordered table-striped table-condensed">
  92. <thead>
  93. <tr>
  94. <th>Type</th>
  95. <th>Name</th>
  96. <th>Description</th>
  97. </tr>
  98. </thead>
  99. <tbody>
  100. <tr>
  101. <td><span class="xref">System.Int32</span></td>
  102. <td><span class="parametername">value</span></td>
  103. <td><p>Value.</p>
  104. </td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. <h3 id="methods">Methods
  109. </h3>
  110. <a id="Terminal_Gui_Attribute_Make_" data-uid="Terminal.Gui.Attribute.Make*"></a>
  111. <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>
  112. <div class="markdown level1 summary"><p>Creates an attribute from the specified foreground and background.</p>
  113. </div>
  114. <div class="markdown level1 conceptual"></div>
  115. <h5 class="decalaration">Declaration</h5>
  116. <div class="codewrapper">
  117. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Attribute Make (Terminal.Gui.Color foreground, Terminal.Gui.Color background);</code></pre>
  118. </div>
  119. <h5 class="parameters">Parameters</h5>
  120. <table class="table table-bordered table-striped table-condensed">
  121. <thead>
  122. <tr>
  123. <th>Type</th>
  124. <th>Name</th>
  125. <th>Description</th>
  126. </tr>
  127. </thead>
  128. <tbody>
  129. <tr>
  130. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  131. <td><span class="parametername">foreground</span></td>
  132. <td><p>Foreground color to use.</p>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td><a class="xref" href="Terminal.Gui.Color.html">Color</a></td>
  137. <td><span class="parametername">background</span></td>
  138. <td><p>Background color to use.</p>
  139. </td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. <h5 class="returns">Returns</h5>
  144. <table class="table table-bordered table-striped table-condensed">
  145. <thead>
  146. <tr>
  147. <th>Type</th>
  148. <th>Description</th>
  149. </tr>
  150. </thead>
  151. <tbody>
  152. <tr>
  153. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  154. <td><p>The make.</p>
  155. </td>
  156. </tr>
  157. </tbody>
  158. </table>
  159. <h3 id="operators">Operators
  160. </h3>
  161. <a id="Terminal_Gui_Attribute_op_Implicit_" data-uid="Terminal.Gui.Attribute.op_Implicit*"></a>
  162. <h4 id="Terminal_Gui_Attribute_op_Implicit_System_Int32_to_Terminal_Gui_Attribute_" data-uid="Terminal.Gui.Attribute.op_Implicit(System.Int32 to Terminal.Gui.Attribute)">op_Implicit(Int32 to Attribute)</h4>
  163. <div class="markdown level1 summary"><p>Implicitly convert an integer value into an attribute</p>
  164. </div>
  165. <div class="markdown level1 conceptual"></div>
  166. <h5 class="decalaration">Declaration</h5>
  167. <div class="codewrapper">
  168. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Attribute op_Implicit (int v);</code></pre>
  169. </div>
  170. <h5 class="parameters">Parameters</h5>
  171. <table class="table table-bordered table-striped table-condensed">
  172. <thead>
  173. <tr>
  174. <th>Type</th>
  175. <th>Name</th>
  176. <th>Description</th>
  177. </tr>
  178. </thead>
  179. <tbody>
  180. <tr>
  181. <td><span class="xref">System.Int32</span></td>
  182. <td><span class="parametername">v</span></td>
  183. <td><p>value</p>
  184. </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><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  199. <td><p>An attribute with the specified integer value.</p>
  200. </td>
  201. </tr>
  202. </tbody>
  203. </table>
  204. <a id="Terminal_Gui_Attribute_op_Implicit_" data-uid="Terminal.Gui.Attribute.op_Implicit*"></a>
  205. <h4 id="Terminal_Gui_Attribute_op_Implicit_Terminal_Gui_Attribute_to_System_Int32_" data-uid="Terminal.Gui.Attribute.op_Implicit(Terminal.Gui.Attribute to System.Int32)">op_Implicit(Attribute to Int32)</h4>
  206. <div class="markdown level1 summary"><p>Implicit conversion from an attribute to the underlying Int32 representation</p>
  207. </div>
  208. <div class="markdown level1 conceptual"></div>
  209. <h5 class="decalaration">Declaration</h5>
  210. <div class="codewrapper">
  211. <pre><code class="lang-csharp hljs">public static int op_Implicit (Terminal.Gui.Attribute c);</code></pre>
  212. </div>
  213. <h5 class="parameters">Parameters</h5>
  214. <table class="table table-bordered table-striped table-condensed">
  215. <thead>
  216. <tr>
  217. <th>Type</th>
  218. <th>Name</th>
  219. <th>Description</th>
  220. </tr>
  221. </thead>
  222. <tbody>
  223. <tr>
  224. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  225. <td><span class="parametername">c</span></td>
  226. <td><p>The attribute to convert</p>
  227. </td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <h5 class="returns">Returns</h5>
  232. <table class="table table-bordered table-striped table-condensed">
  233. <thead>
  234. <tr>
  235. <th>Type</th>
  236. <th>Description</th>
  237. </tr>
  238. </thead>
  239. <tbody>
  240. <tr>
  241. <td><span class="xref">System.Int32</span></td>
  242. <td><p>The integer value stored in the attribute.</p>
  243. </td>
  244. </tr>
  245. </tbody>
  246. </table>
  247. </article>
  248. </div>
  249. <div class="hidden-sm col-md-2" role="complementary">
  250. <div class="sideaffix">
  251. <div class="contribution">
  252. <ul class="nav">
  253. </ul>
  254. </div>
  255. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  256. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  257. </nav>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <footer>
  263. <div class="grad-bottom"></div>
  264. <div class="footer">
  265. <div class="container">
  266. <span class="pull-right">
  267. <a href="#top">Back to top</a>
  268. </span>
  269. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  270. </div>
  271. </div>
  272. </footer>
  273. </div>
  274. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  275. <script type="text/javascript" src="../../styles/docfx.js"></script>
  276. <script type="text/javascript" src="../../styles/main.js"></script>
  277. </body>
  278. </html>