Terminal.Label.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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 Label
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Label
  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.Label">
  63. <h1 id="Terminal_Label" data-uid="Terminal.Label">Class Label
  64. </h1>
  65. <div class="markdown level0 summary"><p>Label widget, displays a string at a given position, can include multiple lines.</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <div class="inheritance">
  69. <h5>Inheritance</h5>
  70. <div class="level0"><span class="xref">System.Object</span></div>
  71. <div class="level1"><a class="xref" href="Terminal.Responder.html">Responder</a></div>
  72. <div class="level2"><a class="xref" href="Terminal.View.html">View</a></div>
  73. <div class="level3"><span class="xref">Label</span></div>
  74. </div>
  75. <div class="inheritedMembers">
  76. <h5>Inherited Members</h5>
  77. <div>
  78. <a class="xref" href="Terminal.Responder.html#Terminal_Responder_CanFocus">Responder.CanFocus</a>
  79. </div>
  80. <div>
  81. <a class="xref" href="Terminal.Responder.html#Terminal_Responder_MouseEvent_Terminal_MouseEvent_">Responder.MouseEvent(MouseEvent)</a>
  82. </div>
  83. <div>
  84. <a class="xref" href="Terminal.View.html#Terminal_View_Add_Terminal_View_">View.Add(View)</a>
  85. </div>
  86. <div>
  87. <a class="xref" href="Terminal.View.html#Terminal_View_Add_Terminal_View___">View.Add(View[])</a>
  88. </div>
  89. <div>
  90. <a class="xref" href="Terminal.View.html#Terminal_View_AddCh_System_Int32_System_Int32_System_Int32_">View.AddCh(Int32, Int32, Int32)</a>
  91. </div>
  92. <div>
  93. <a class="xref" href="Terminal.View.html#Terminal_View_Bounds">View.Bounds</a>
  94. </div>
  95. <div>
  96. <a class="xref" href="Terminal.View.html#Terminal_View_ChildNeedsDisplay">View.ChildNeedsDisplay()</a>
  97. </div>
  98. <div>
  99. <a class="xref" href="Terminal.View.html#Terminal_View_Clear">View.Clear()</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="Terminal.View.html#Terminal_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="Terminal.View.html#Terminal_View_ColorScheme">View.ColorScheme</a>
  106. </div>
  107. <div>
  108. <a class="xref" href="Terminal.View.html#Terminal_View_DrawFrame_Terminal_Rect_System_Boolean_">View.DrawFrame(Rect, Boolean)</a>
  109. </div>
  110. <div>
  111. <a class="xref" href="Terminal.View.html#Terminal_View_DrawHotString_System_String_System_Boolean_Terminal_ColorScheme_">View.DrawHotString(String, Boolean, ColorScheme)</a>
  112. </div>
  113. <div>
  114. <a class="xref" href="Terminal.View.html#Terminal_View_DrawHotString_System_String_Terminal_Attribute_Terminal_Attribute_">View.DrawHotString(String, Attribute, Attribute)</a>
  115. </div>
  116. <div>
  117. <a class="xref" href="Terminal.View.html#Terminal_View_Driver">View.Driver</a>
  118. </div>
  119. <div>
  120. <a class="xref" href="Terminal.View.html#Terminal_View_EnsureFocus">View.EnsureFocus()</a>
  121. </div>
  122. <div>
  123. <a class="xref" href="Terminal.View.html#Terminal_View_Focused">View.Focused</a>
  124. </div>
  125. <div>
  126. <a class="xref" href="Terminal.View.html#Terminal_View_FocusFirst">View.FocusFirst()</a>
  127. </div>
  128. <div>
  129. <a class="xref" href="Terminal.View.html#Terminal_View_FocusLast">View.FocusLast()</a>
  130. </div>
  131. <div>
  132. <a class="xref" href="Terminal.View.html#Terminal_View_FocusNext">View.FocusNext()</a>
  133. </div>
  134. <div>
  135. <a class="xref" href="Terminal.View.html#Terminal_View_FocusPrev">View.FocusPrev()</a>
  136. </div>
  137. <div>
  138. <a class="xref" href="Terminal.View.html#Terminal_View_Frame">View.Frame</a>
  139. </div>
  140. <div>
  141. <a class="xref" href="Terminal.View.html#Terminal_View_GetEnumerator">View.GetEnumerator()</a>
  142. </div>
  143. <div>
  144. <a class="xref" href="Terminal.View.html#Terminal_View_HasFocus">View.HasFocus</a>
  145. </div>
  146. <div>
  147. <a class="xref" href="Terminal.View.html#Terminal_View_Id">View.Id</a>
  148. </div>
  149. <div>
  150. <a class="xref" href="Terminal.View.html#Terminal_View_LayoutSubviews">View.LayoutSubviews()</a>
  151. </div>
  152. <div>
  153. <a class="xref" href="Terminal.View.html#Terminal_View_MostFocused">View.MostFocused</a>
  154. </div>
  155. <div>
  156. <a class="xref" href="Terminal.View.html#Terminal_View_Move_System_Int32_System_Int32_">View.Move(Int32, Int32)</a>
  157. </div>
  158. <div>
  159. <a class="xref" href="Terminal.View.html#Terminal_View_PositionCursor">View.PositionCursor()</a>
  160. </div>
  161. <div>
  162. <a class="xref" href="Terminal.View.html#Terminal_View_ProcessColdKey_Terminal_KeyEvent_">View.ProcessColdKey(KeyEvent)</a>
  163. </div>
  164. <div>
  165. <a class="xref" href="Terminal.View.html#Terminal_View_ProcessHotKey_Terminal_KeyEvent_">View.ProcessHotKey(KeyEvent)</a>
  166. </div>
  167. <div>
  168. <a class="xref" href="Terminal.View.html#Terminal_View_ProcessKey_Terminal_KeyEvent_">View.ProcessKey(KeyEvent)</a>
  169. </div>
  170. <div>
  171. <a class="xref" href="Terminal.View.html#Terminal_View_Remove_Terminal_View_">View.Remove(View)</a>
  172. </div>
  173. <div>
  174. <a class="xref" href="Terminal.View.html#Terminal_View_RemoveAll">View.RemoveAll()</a>
  175. </div>
  176. <div>
  177. <a class="xref" href="Terminal.View.html#Terminal_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(Int32, Int32)</a>
  178. </div>
  179. <div>
  180. <a class="xref" href="Terminal.View.html#Terminal_View_SetFocus_Terminal_View_">View.SetFocus(View)</a>
  181. </div>
  182. <div>
  183. <a class="xref" href="Terminal.View.html#Terminal_View_SetNeedsDisplay">View.SetNeedsDisplay()</a>
  184. </div>
  185. <div>
  186. <a class="xref" href="Terminal.View.html#Terminal_View_SetNeedsDisplay_Terminal_Rect_">View.SetNeedsDisplay(Rect)</a>
  187. </div>
  188. <div>
  189. <a class="xref" href="Terminal.View.html#Terminal_View_Subviews">View.Subviews</a>
  190. </div>
  191. <div>
  192. <a class="xref" href="Terminal.View.html#Terminal_View_SuperView">View.SuperView</a>
  193. </div>
  194. <div>
  195. <a class="xref" href="Terminal.View.html#Terminal_View_ToString">View.ToString()</a>
  196. </div>
  197. <div>
  198. <a class="xref" href="Terminal.View.html#Terminal_View_WantMousePositionReports">View.WantMousePositionReports</a>
  199. </div>
  200. </div>
  201. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.html">Terminal</a></h6>
  202. <h6><strong>Assembly</strong>: Terminal.dll</h6>
  203. <h5 id="Terminal_Label_syntax">Syntax</h5>
  204. <div class="codewrapper">
  205. <pre><code class="lang-csharp hljs">public class Label : Terminal.View</code></pre>
  206. </div>
  207. <h3 id="constructors">Constructors
  208. </h3>
  209. <a id="Terminal_Label__ctor_" data-uid="Terminal.Label.#ctor*"></a>
  210. <h4 id="Terminal_Label__ctor_Terminal_Rect_System_String_" data-uid="Terminal.Label.#ctor(Terminal.Rect,System.String)">Label(Rect, String)</h4>
  211. <div class="markdown level1 summary"><p>Public constructor: creates a label at the given
  212. coordinate with the given string and uses the specified
  213. frame for the string.</p>
  214. </div>
  215. <div class="markdown level1 conceptual"></div>
  216. <h5 class="decalaration">Declaration</h5>
  217. <div class="codewrapper">
  218. <pre><code class="lang-csharp hljs">public Label (Terminal.Rect rect, string text);</code></pre>
  219. </div>
  220. <h5 class="parameters">Parameters</h5>
  221. <table class="table table-bordered table-striped table-condensed">
  222. <thead>
  223. <tr>
  224. <th>Type</th>
  225. <th>Name</th>
  226. <th>Description</th>
  227. </tr>
  228. </thead>
  229. <tbody>
  230. <tr>
  231. <td><a class="xref" href="Terminal.Rect.html">Rect</a></td>
  232. <td><span class="parametername">rect</span></td>
  233. <td><p>To be added.</p>
  234. </td>
  235. </tr>
  236. <tr>
  237. <td><span class="xref">System.String</span></td>
  238. <td><span class="parametername">text</span></td>
  239. <td><p>To be added.</p>
  240. </td>
  241. </tr>
  242. </tbody>
  243. </table>
  244. <a id="Terminal_Label__ctor_" data-uid="Terminal.Label.#ctor*"></a>
  245. <h4 id="Terminal_Label__ctor_System_Int32_System_Int32_System_String_" data-uid="Terminal.Label.#ctor(System.Int32,System.Int32,System.String)">Label(Int32, Int32, String)</h4>
  246. <div class="markdown level1 summary"><p>Public constructor: creates a label at the given
  247. coordinate with the given string, computes the bounding box
  248. based on the size of the string, assumes that the string contains
  249. newlines for multiple lines, no special breaking rules are used.</p>
  250. </div>
  251. <div class="markdown level1 conceptual"></div>
  252. <h5 class="decalaration">Declaration</h5>
  253. <div class="codewrapper">
  254. <pre><code class="lang-csharp hljs">public Label (int x, int y, string text);</code></pre>
  255. </div>
  256. <h5 class="parameters">Parameters</h5>
  257. <table class="table table-bordered table-striped table-condensed">
  258. <thead>
  259. <tr>
  260. <th>Type</th>
  261. <th>Name</th>
  262. <th>Description</th>
  263. </tr>
  264. </thead>
  265. <tbody>
  266. <tr>
  267. <td><span class="xref">System.Int32</span></td>
  268. <td><span class="parametername">x</span></td>
  269. <td><p>To be added.</p>
  270. </td>
  271. </tr>
  272. <tr>
  273. <td><span class="xref">System.Int32</span></td>
  274. <td><span class="parametername">y</span></td>
  275. <td><p>To be added.</p>
  276. </td>
  277. </tr>
  278. <tr>
  279. <td><span class="xref">System.String</span></td>
  280. <td><span class="parametername">text</span></td>
  281. <td><p>To be added.</p>
  282. </td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. <h3 id="properties">Properties
  287. </h3>
  288. <a id="Terminal_Label_Text_" data-uid="Terminal.Label.Text*"></a>
  289. <h4 id="Terminal_Label_Text" data-uid="Terminal.Label.Text">Text</h4>
  290. <div class="markdown level1 summary"><p>The text displayed by this widget.</p>
  291. </div>
  292. <div class="markdown level1 conceptual"></div>
  293. <h5 class="decalaration">Declaration</h5>
  294. <div class="codewrapper">
  295. <pre><code class="lang-csharp hljs">public virtual string Text { get; set; }</code></pre>
  296. </div>
  297. <h5 class="propertyValue">Property Value</h5>
  298. <table class="table table-bordered table-striped table-condensed">
  299. <thead>
  300. <tr>
  301. <th>Type</th>
  302. <th>Description</th>
  303. </tr>
  304. </thead>
  305. <tbody>
  306. <tr>
  307. <td><span class="xref">System.String</span></td>
  308. <td><p>To be added.</p>
  309. </td>
  310. </tr>
  311. </tbody>
  312. </table>
  313. <a id="Terminal_Label_TextAlignment_" data-uid="Terminal.Label.TextAlignment*"></a>
  314. <h4 id="Terminal_Label_TextAlignment" data-uid="Terminal.Label.TextAlignment">TextAlignment</h4>
  315. <div class="markdown level1 summary"><p>Controls the text-alignemtn property of the label, changing it will redisplay the label.</p>
  316. </div>
  317. <div class="markdown level1 conceptual"></div>
  318. <h5 class="decalaration">Declaration</h5>
  319. <div class="codewrapper">
  320. <pre><code class="lang-csharp hljs">public Terminal.TextAlignment TextAlignment { get; set; }</code></pre>
  321. </div>
  322. <h5 class="propertyValue">Property Value</h5>
  323. <table class="table table-bordered table-striped table-condensed">
  324. <thead>
  325. <tr>
  326. <th>Type</th>
  327. <th>Description</th>
  328. </tr>
  329. </thead>
  330. <tbody>
  331. <tr>
  332. <td><a class="xref" href="Terminal.TextAlignment.html">TextAlignment</a></td>
  333. <td><p>The text alignment.</p>
  334. </td>
  335. </tr>
  336. </tbody>
  337. </table>
  338. <a id="Terminal_Label_TextColor_" data-uid="Terminal.Label.TextColor*"></a>
  339. <h4 id="Terminal_Label_TextColor" data-uid="Terminal.Label.TextColor">TextColor</h4>
  340. <div class="markdown level1 summary"><p>The color used for the label</p>
  341. </div>
  342. <div class="markdown level1 conceptual"></div>
  343. <h5 class="decalaration">Declaration</h5>
  344. <div class="codewrapper">
  345. <pre><code class="lang-csharp hljs">public Terminal.Attribute TextColor { get; set; }</code></pre>
  346. </div>
  347. <h5 class="propertyValue">Property Value</h5>
  348. <table class="table table-bordered table-striped table-condensed">
  349. <thead>
  350. <tr>
  351. <th>Type</th>
  352. <th>Description</th>
  353. </tr>
  354. </thead>
  355. <tbody>
  356. <tr>
  357. <td><a class="xref" href="Terminal.Attribute.html">Attribute</a></td>
  358. <td><p>To be added.</p>
  359. </td>
  360. </tr>
  361. </tbody>
  362. </table>
  363. <h3 id="methods">Methods
  364. </h3>
  365. <a id="Terminal_Label_MeasureLines_" data-uid="Terminal.Label.MeasureLines*"></a>
  366. <h4 id="Terminal_Label_MeasureLines_System_String_System_Int32_" data-uid="Terminal.Label.MeasureLines(System.String,System.Int32)">MeasureLines(String, Int32)</h4>
  367. <div class="markdown level1 summary"><p>Computes the number of lines needed to render the specified text by the Label control</p>
  368. </div>
  369. <div class="markdown level1 conceptual"></div>
  370. <h5 class="decalaration">Declaration</h5>
  371. <div class="codewrapper">
  372. <pre><code class="lang-csharp hljs">public static int MeasureLines (string text, int width);</code></pre>
  373. </div>
  374. <h5 class="parameters">Parameters</h5>
  375. <table class="table table-bordered table-striped table-condensed">
  376. <thead>
  377. <tr>
  378. <th>Type</th>
  379. <th>Name</th>
  380. <th>Description</th>
  381. </tr>
  382. </thead>
  383. <tbody>
  384. <tr>
  385. <td><span class="xref">System.String</span></td>
  386. <td><span class="parametername">text</span></td>
  387. <td><p>Text, may contain newlines.</p>
  388. </td>
  389. </tr>
  390. <tr>
  391. <td><span class="xref">System.Int32</span></td>
  392. <td><span class="parametername">width</span></td>
  393. <td><p>The width for the text.</p>
  394. </td>
  395. </tr>
  396. </tbody>
  397. </table>
  398. <h5 class="returns">Returns</h5>
  399. <table class="table table-bordered table-striped table-condensed">
  400. <thead>
  401. <tr>
  402. <th>Type</th>
  403. <th>Description</th>
  404. </tr>
  405. </thead>
  406. <tbody>
  407. <tr>
  408. <td><span class="xref">System.Int32</span></td>
  409. <td><p>Number of lines.</p>
  410. </td>
  411. </tr>
  412. </tbody>
  413. </table>
  414. <a id="Terminal_Label_Redraw_" data-uid="Terminal.Label.Redraw*"></a>
  415. <h4 id="Terminal_Label_Redraw_Terminal_Rect_" data-uid="Terminal.Label.Redraw(Terminal.Rect)">Redraw(Rect)</h4>
  416. <div class="markdown level1 summary"></div>
  417. <div class="markdown level1 conceptual"></div>
  418. <h5 class="decalaration">Declaration</h5>
  419. <div class="codewrapper">
  420. <pre><code class="lang-csharp hljs">public override void Redraw (Terminal.Rect region);</code></pre>
  421. </div>
  422. <h5 class="parameters">Parameters</h5>
  423. <table class="table table-bordered table-striped table-condensed">
  424. <thead>
  425. <tr>
  426. <th>Type</th>
  427. <th>Name</th>
  428. <th>Description</th>
  429. </tr>
  430. </thead>
  431. <tbody>
  432. <tr>
  433. <td><a class="xref" href="Terminal.Rect.html">Rect</a></td>
  434. <td><span class="parametername">region</span></td>
  435. <td><p>To be added.</p>
  436. </td>
  437. </tr>
  438. </tbody>
  439. </table>
  440. </article>
  441. </div>
  442. <div class="hidden-sm col-md-2" role="complementary">
  443. <div class="sideaffix">
  444. <div class="contribution">
  445. <ul class="nav">
  446. </ul>
  447. </div>
  448. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  449. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  450. </nav>
  451. </div>
  452. </div>
  453. </div>
  454. </div>
  455. <footer>
  456. <div class="grad-bottom"></div>
  457. <div class="footer">
  458. <div class="container">
  459. <span class="pull-right">
  460. <a href="#top">Back to top</a>
  461. </span>
  462. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  463. </div>
  464. </div>
  465. </footer>
  466. </div>
  467. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  468. <script type="text/javascript" src="../../styles/docfx.js"></script>
  469. <script type="text/javascript" src="../../styles/main.js"></script>
  470. </body>
  471. </html>