Terminal.Gui.Dim.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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 Dim
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Dim
  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.Dim">
  63. <h1 id="Terminal_Gui_Dim" data-uid="Terminal.Gui.Dim">Class Dim
  64. </h1>
  65. <div class="markdown level0 summary"></div>
  66. <div class="markdown level0 conceptual"></div>
  67. <div class="inheritance">
  68. <h5>Inheritance</h5>
  69. <div class="level0"><span class="xref">System.Object</span></div>
  70. <div class="level1"><span class="xref">Dim</span></div>
  71. </div>
  72. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  73. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  74. <h5 id="Terminal_Gui_Dim_syntax">Syntax</h5>
  75. <div class="codewrapper">
  76. <pre><code class="lang-csharp hljs">public class Dim</code></pre>
  77. </div>
  78. <h5 id="Terminal_Gui_Dim_remarks"><strong>Remarks</strong></h5>
  79. <div class="markdown level0 remarks"><p>
  80. Use the Dim objects on the Width or Height properties of a view to control the position.
  81. </p>
  82. <p>
  83. These can be used to set the absolute position, when merely assigning an
  84. integer value (via the implicit integer to Pos conversion), and they can be combined
  85. to produce more useful layouts, like: Pos.Center - 3, which would shift the postion
  86. of the view 3 characters to the left after centering for example.
  87. </p></div>
  88. <h3 id="constructors">Constructors
  89. </h3>
  90. <a id="Terminal_Gui_Dim__ctor_" data-uid="Terminal.Gui.Dim.#ctor*"></a>
  91. <h4 id="Terminal_Gui_Dim__ctor" data-uid="Terminal.Gui.Dim.#ctor">Dim()</h4>
  92. <div class="markdown level1 summary"></div>
  93. <div class="markdown level1 conceptual"></div>
  94. <h5 class="decalaration">Declaration</h5>
  95. <div class="codewrapper">
  96. <pre><code class="lang-csharp hljs">public Dim ();</code></pre>
  97. </div>
  98. <h3 id="methods">Methods
  99. </h3>
  100. <a id="Terminal_Gui_Dim_Fill_" data-uid="Terminal.Gui.Dim.Fill*"></a>
  101. <h4 id="Terminal_Gui_Dim_Fill_System_Int32_" data-uid="Terminal.Gui.Dim.Fill(System.Int32)">Fill(Int32)</h4>
  102. <div class="markdown level1 summary"><p>Creates a Dim object that fills the dimension, but leaves the specified number of colums for a margin.</p>
  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 static Terminal.Gui.Dim Fill (int margin = 0);</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.Int32</span></td>
  121. <td><span class="parametername">margin</span></td>
  122. <td><p>Margin to use.</p>
  123. </td>
  124. </tr>
  125. </tbody>
  126. </table>
  127. <h5 class="returns">Returns</h5>
  128. <table class="table table-bordered table-striped table-condensed">
  129. <thead>
  130. <tr>
  131. <th>Type</th>
  132. <th>Description</th>
  133. </tr>
  134. </thead>
  135. <tbody>
  136. <tr>
  137. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  138. <td><p>The Fill dimension.</p>
  139. </td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. <a id="Terminal_Gui_Dim_Height_" data-uid="Terminal.Gui.Dim.Height*"></a>
  144. <h4 id="Terminal_Gui_Dim_Height_Terminal_Gui_View_" data-uid="Terminal.Gui.Dim.Height(Terminal.Gui.View)">Height(View)</h4>
  145. <div class="markdown level1 summary"><p>Returns a Dim object tracks the Height of the specified view.</p>
  146. </div>
  147. <div class="markdown level1 conceptual"></div>
  148. <h5 class="decalaration">Declaration</h5>
  149. <div class="codewrapper">
  150. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Dim Height (Terminal.Gui.View view);</code></pre>
  151. </div>
  152. <h5 class="parameters">Parameters</h5>
  153. <table class="table table-bordered table-striped table-condensed">
  154. <thead>
  155. <tr>
  156. <th>Type</th>
  157. <th>Name</th>
  158. <th>Description</th>
  159. </tr>
  160. </thead>
  161. <tbody>
  162. <tr>
  163. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  164. <td><span class="parametername">view</span></td>
  165. <td><p>The view that will be tracked.</p>
  166. </td>
  167. </tr>
  168. </tbody>
  169. </table>
  170. <h5 class="returns">Returns</h5>
  171. <table class="table table-bordered table-striped table-condensed">
  172. <thead>
  173. <tr>
  174. <th>Type</th>
  175. <th>Description</th>
  176. </tr>
  177. </thead>
  178. <tbody>
  179. <tr>
  180. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  181. <td><p>The dimension of the other view.</p>
  182. </td>
  183. </tr>
  184. </tbody>
  185. </table>
  186. <a id="Terminal_Gui_Dim_Percent_" data-uid="Terminal.Gui.Dim.Percent*"></a>
  187. <h4 id="Terminal_Gui_Dim_Percent_System_Single_" data-uid="Terminal.Gui.Dim.Percent(System.Single)">Percent(Single)</h4>
  188. <div class="markdown level1 summary"><p>Creates a percentage Dim object</p>
  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 Terminal.Gui.Dim Percent (float n);</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><span class="xref">System.Single</span></td>
  207. <td><span class="parametername">n</span></td>
  208. <td><p>A value between 0 and 100 representing the percentage.</p>
  209. </td>
  210. </tr>
  211. </tbody>
  212. </table>
  213. <h5 class="returns">Returns</h5>
  214. <table class="table table-bordered table-striped table-condensed">
  215. <thead>
  216. <tr>
  217. <th>Type</th>
  218. <th>Description</th>
  219. </tr>
  220. </thead>
  221. <tbody>
  222. <tr>
  223. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  224. <td><p>The percent Dim object.</p>
  225. </td>
  226. </tr>
  227. </tbody>
  228. </table>
  229. <a id="Terminal_Gui_Dim_Sized_" data-uid="Terminal.Gui.Dim.Sized*"></a>
  230. <h4 id="Terminal_Gui_Dim_Sized_System_Int32_" data-uid="Terminal.Gui.Dim.Sized(System.Int32)">Sized(Int32)</h4>
  231. <div class="markdown level1 summary"><p>Creates an Absolute Pos from the specified integer value.</p>
  232. </div>
  233. <div class="markdown level1 conceptual"></div>
  234. <h5 class="decalaration">Declaration</h5>
  235. <div class="codewrapper">
  236. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Dim Sized (int n);</code></pre>
  237. </div>
  238. <h5 class="parameters">Parameters</h5>
  239. <table class="table table-bordered table-striped table-condensed">
  240. <thead>
  241. <tr>
  242. <th>Type</th>
  243. <th>Name</th>
  244. <th>Description</th>
  245. </tr>
  246. </thead>
  247. <tbody>
  248. <tr>
  249. <td><span class="xref">System.Int32</span></td>
  250. <td><span class="parametername">n</span></td>
  251. <td><p>The value to convert to the pos.</p>
  252. </td>
  253. </tr>
  254. </tbody>
  255. </table>
  256. <h5 class="returns">Returns</h5>
  257. <table class="table table-bordered table-striped table-condensed">
  258. <thead>
  259. <tr>
  260. <th>Type</th>
  261. <th>Description</th>
  262. </tr>
  263. </thead>
  264. <tbody>
  265. <tr>
  266. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  267. <td><p>The Absolute Pos.</p>
  268. </td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. <a id="Terminal_Gui_Dim_Width_" data-uid="Terminal.Gui.Dim.Width*"></a>
  273. <h4 id="Terminal_Gui_Dim_Width_Terminal_Gui_View_" data-uid="Terminal.Gui.Dim.Width(Terminal.Gui.View)">Width(View)</h4>
  274. <div class="markdown level1 summary"><p>Returns a Dim object tracks the Width of the specified view.</p>
  275. </div>
  276. <div class="markdown level1 conceptual"></div>
  277. <h5 class="decalaration">Declaration</h5>
  278. <div class="codewrapper">
  279. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Dim Width (Terminal.Gui.View view);</code></pre>
  280. </div>
  281. <h5 class="parameters">Parameters</h5>
  282. <table class="table table-bordered table-striped table-condensed">
  283. <thead>
  284. <tr>
  285. <th>Type</th>
  286. <th>Name</th>
  287. <th>Description</th>
  288. </tr>
  289. </thead>
  290. <tbody>
  291. <tr>
  292. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  293. <td><span class="parametername">view</span></td>
  294. <td><p>The view that will be tracked.</p>
  295. </td>
  296. </tr>
  297. </tbody>
  298. </table>
  299. <h5 class="returns">Returns</h5>
  300. <table class="table table-bordered table-striped table-condensed">
  301. <thead>
  302. <tr>
  303. <th>Type</th>
  304. <th>Description</th>
  305. </tr>
  306. </thead>
  307. <tbody>
  308. <tr>
  309. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  310. <td><p>The dimension of the other view.</p>
  311. </td>
  312. </tr>
  313. </tbody>
  314. </table>
  315. <h3 id="operators">Operators
  316. </h3>
  317. <a id="Terminal_Gui_Dim_op_Addition_" data-uid="Terminal.Gui.Dim.op_Addition*"></a>
  318. <h4 id="Terminal_Gui_Dim_op_Addition_Terminal_Gui_Dim_Terminal_Gui_Dim_" data-uid="Terminal.Gui.Dim.op_Addition(Terminal.Gui.Dim,Terminal.Gui.Dim)">op_Addition(Dim, Dim)</h4>
  319. <div class="markdown level1 summary"><p>Adds a <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> to a <a class="xref" href="Terminal.Gui.Pos.html">Pos</a>, yielding a new <a class="xref" href="Terminal.Gui.Pos.html">Pos</a>.</p>
  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 static Terminal.Gui.Dim op_Addition (Terminal.Gui.Dim left, Terminal.Gui.Dim right);</code></pre>
  325. </div>
  326. <h5 class="parameters">Parameters</h5>
  327. <table class="table table-bordered table-striped table-condensed">
  328. <thead>
  329. <tr>
  330. <th>Type</th>
  331. <th>Name</th>
  332. <th>Description</th>
  333. </tr>
  334. </thead>
  335. <tbody>
  336. <tr>
  337. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  338. <td><span class="parametername">left</span></td>
  339. <td><p>The first <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> to add.</p>
  340. </td>
  341. </tr>
  342. <tr>
  343. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  344. <td><span class="parametername">right</span></td>
  345. <td><p>The second <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> to add.</p>
  346. </td>
  347. </tr>
  348. </tbody>
  349. </table>
  350. <h5 class="returns">Returns</h5>
  351. <table class="table table-bordered table-striped table-condensed">
  352. <thead>
  353. <tr>
  354. <th>Type</th>
  355. <th>Description</th>
  356. </tr>
  357. </thead>
  358. <tbody>
  359. <tr>
  360. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  361. <td><p>The <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> that is the sum of the values of <code>left</code> and <code>right</code>.</p>
  362. </td>
  363. </tr>
  364. </tbody>
  365. </table>
  366. <a id="Terminal_Gui_Dim_op_Implicit_" data-uid="Terminal.Gui.Dim.op_Implicit*"></a>
  367. <h4 id="Terminal_Gui_Dim_op_Implicit_System_Int32_to_Terminal_Gui_Dim_" data-uid="Terminal.Gui.Dim.op_Implicit(System.Int32 to Terminal.Gui.Dim)">op_Implicit(Int32 to Dim)</h4>
  368. <div class="markdown level1 summary"><p>Creates an Absolute Pos from the specified integer value.</p>
  369. </div>
  370. <div class="markdown level1 conceptual"></div>
  371. <h5 class="decalaration">Declaration</h5>
  372. <div class="codewrapper">
  373. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Dim op_Implicit (int n);</code></pre>
  374. </div>
  375. <h5 class="parameters">Parameters</h5>
  376. <table class="table table-bordered table-striped table-condensed">
  377. <thead>
  378. <tr>
  379. <th>Type</th>
  380. <th>Name</th>
  381. <th>Description</th>
  382. </tr>
  383. </thead>
  384. <tbody>
  385. <tr>
  386. <td><span class="xref">System.Int32</span></td>
  387. <td><span class="parametername">n</span></td>
  388. <td><p>The value to convert to the pos.</p>
  389. </td>
  390. </tr>
  391. </tbody>
  392. </table>
  393. <h5 class="returns">Returns</h5>
  394. <table class="table table-bordered table-striped table-condensed">
  395. <thead>
  396. <tr>
  397. <th>Type</th>
  398. <th>Description</th>
  399. </tr>
  400. </thead>
  401. <tbody>
  402. <tr>
  403. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  404. <td><p>The Absolute Pos.</p>
  405. </td>
  406. </tr>
  407. </tbody>
  408. </table>
  409. <a id="Terminal_Gui_Dim_op_Subtraction_" data-uid="Terminal.Gui.Dim.op_Subtraction*"></a>
  410. <h4 id="Terminal_Gui_Dim_op_Subtraction_Terminal_Gui_Dim_Terminal_Gui_Dim_" data-uid="Terminal.Gui.Dim.op_Subtraction(Terminal.Gui.Dim,Terminal.Gui.Dim)">op_Subtraction(Dim, Dim)</h4>
  411. <div class="markdown level1 summary"><p>Subtracts a <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> from a <a class="xref" href="Terminal.Gui.Pos.html">Pos</a>, yielding a new <a class="xref" href="Terminal.Gui.Pos.html">Pos</a>.</p>
  412. </div>
  413. <div class="markdown level1 conceptual"></div>
  414. <h5 class="decalaration">Declaration</h5>
  415. <div class="codewrapper">
  416. <pre><code class="lang-csharp hljs">public static Terminal.Gui.Dim op_Subtraction (Terminal.Gui.Dim left, Terminal.Gui.Dim right);</code></pre>
  417. </div>
  418. <h5 class="parameters">Parameters</h5>
  419. <table class="table table-bordered table-striped table-condensed">
  420. <thead>
  421. <tr>
  422. <th>Type</th>
  423. <th>Name</th>
  424. <th>Description</th>
  425. </tr>
  426. </thead>
  427. <tbody>
  428. <tr>
  429. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  430. <td><span class="parametername">left</span></td>
  431. <td><p>The <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> to subtract from (the minuend).</p>
  432. </td>
  433. </tr>
  434. <tr>
  435. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  436. <td><span class="parametername">right</span></td>
  437. <td><p>The <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> to subtract (the subtrahend).</p>
  438. </td>
  439. </tr>
  440. </tbody>
  441. </table>
  442. <h5 class="returns">Returns</h5>
  443. <table class="table table-bordered table-striped table-condensed">
  444. <thead>
  445. <tr>
  446. <th>Type</th>
  447. <th>Description</th>
  448. </tr>
  449. </thead>
  450. <tbody>
  451. <tr>
  452. <td><a class="xref" href="Terminal.Gui.Dim.html">Dim</a></td>
  453. <td><p>The <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> that is the <code>left</code> minus <code>right</code>.</p>
  454. </td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. </article>
  459. </div>
  460. <div class="hidden-sm col-md-2" role="complementary">
  461. <div class="sideaffix">
  462. <div class="contribution">
  463. <ul class="nav">
  464. </ul>
  465. </div>
  466. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  467. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  468. </nav>
  469. </div>
  470. </div>
  471. </div>
  472. </div>
  473. <footer>
  474. <div class="grad-bottom"></div>
  475. <div class="footer">
  476. <div class="container">
  477. <span class="pull-right">
  478. <a href="#top">Back to top</a>
  479. </span>
  480. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  481. </div>
  482. </div>
  483. </footer>
  484. </div>
  485. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  486. <script type="text/javascript" src="../../styles/docfx.js"></script>
  487. <script type="text/javascript" src="../../styles/main.js"></script>
  488. </body>
  489. </html>