Terminal.Gui.TextFormatter.html 103 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175
  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 TextFormatter
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class TextFormatter
  11. ">
  12. <meta name="generator" content="docfx 2.59.4.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=Source Sans Pro" rel="stylesheet">
  18. <link href="https://fonts.googleapis.com/css?family=Source Code Pro" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../../">
  22. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  23. <div id="wrapper">
  24. <header>
  25. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="../../index.html">
  35. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  36. </a>
  37. </div>
  38. <div class="collapse navbar-collapse" id="navbar">
  39. <form class="navbar-form navbar-right" role="search" id="search">
  40. <div class="form-group">
  41. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </nav>
  47. <div class="subnav navbar navbar-default">
  48. <div class="container hide-when-search" id="breadcrumb">
  49. <ul class="breadcrumb">
  50. <li></li>
  51. </ul>
  52. </div>
  53. </div>
  54. </header>
  55. <div class="container body-content">
  56. <div id="search-results">
  57. <div class="search-list">Search Results for <span></span></div>
  58. <div class="sr-items">
  59. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  60. </div>
  61. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  62. </div>
  63. </div>
  64. <div role="main" class="container body-content hide-when-search">
  65. <div class="sidenav hide-when-search">
  66. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  67. <div class="sidetoggle collapse" id="sidetoggle">
  68. <div id="sidetoc"></div>
  69. </div>
  70. </div>
  71. <div class="article row grid-right">
  72. <div class="col-md-10">
  73. <article class="content wrap" id="_content" data-uid="Terminal.Gui.TextFormatter">
  74. <h1 id="Terminal_Gui_TextFormatter" data-uid="Terminal.Gui.TextFormatter" class="text-break">Class TextFormatter
  75. </h1>
  76. <div class="markdown level0 summary">
  77. Provides text formatting capabilities for console apps. Supports, hotkeys, horizontal alignment, multiple lines, and word-based line wrap.
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><span class="xref">System.Object</span></div>
  83. <div class="level1"><span class="xref">TextFormatter</span></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <span class="xref">System.Object.Equals(System.Object)</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.GetHashCode()</span>
  95. </div>
  96. <div>
  97. <span class="xref">System.Object.GetType()</span>
  98. </div>
  99. <div>
  100. <span class="xref">System.Object.MemberwiseClone()</span>
  101. </div>
  102. <div>
  103. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  104. </div>
  105. <div>
  106. <span class="xref">System.Object.ToString()</span>
  107. </div>
  108. </div>
  109. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  110. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  111. <h5 id="Terminal_Gui_TextFormatter_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public class TextFormatter</code></pre>
  114. </div>
  115. <h3 id="properties">Properties
  116. </h3>
  117. <span class="small pull-right mobile-hide">
  118. <span class="divider">|</span>
  119. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Alignment.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Alignment%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  120. </span>
  121. <span class="small pull-right mobile-hide">
  122. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L169">View Source</a>
  123. </span>
  124. <a id="Terminal_Gui_TextFormatter_Alignment_" data-uid="Terminal.Gui.TextFormatter.Alignment*"></a>
  125. <h4 id="Terminal_Gui_TextFormatter_Alignment" data-uid="Terminal.Gui.TextFormatter.Alignment">Alignment</h4>
  126. <div class="markdown level1 summary">
  127. Controls the horizontal text-alignment property.
  128. </div>
  129. <div class="markdown level1 conceptual"></div>
  130. <h5 class="decalaration">Declaration</h5>
  131. <div class="codewrapper">
  132. <pre><code class="lang-csharp hljs">public TextAlignment Alignment { get; set; }</code></pre>
  133. </div>
  134. <h5 class="propertyValue">Property Value</h5>
  135. <table class="table table-bordered table-striped table-condensed">
  136. <thead>
  137. <tr>
  138. <th>Type</th>
  139. <th>Description</th>
  140. </tr>
  141. </thead>
  142. <tbody>
  143. <tr>
  144. <td><a class="xref" href="Terminal.Gui.TextAlignment.html">TextAlignment</a></td>
  145. <td>The text alignment.</td>
  146. </tr>
  147. </tbody>
  148. </table>
  149. <span class="small pull-right mobile-hide">
  150. <span class="divider">|</span>
  151. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_AutoSize.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.AutoSize%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  152. </span>
  153. <span class="small pull-right mobile-hide">
  154. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L155">View Source</a>
  155. </span>
  156. <a id="Terminal_Gui_TextFormatter_AutoSize_" data-uid="Terminal.Gui.TextFormatter.AutoSize*"></a>
  157. <h4 id="Terminal_Gui_TextFormatter_AutoSize" data-uid="Terminal.Gui.TextFormatter.AutoSize">AutoSize</h4>
  158. <div class="markdown level1 summary">
  159. Used by <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_Text">Text</a> to resize the view&apos;s <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">Bounds</a> with the <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_Size">Size</a>.
  160. Setting <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_AutoSize">AutoSize</a> to true only work if the <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Width">Width</a> and <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Height">Height</a> are null or
  161. <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Absolute">Absolute</a> values and doesn&apos;t work with <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Computed">Computed</a> layout,
  162. to avoid breaking the <a class="xref" href="Terminal.Gui.Pos.html">Pos</a> and <a class="xref" href="Terminal.Gui.Dim.html">Dim</a> settings.
  163. </div>
  164. <div class="markdown level1 conceptual"></div>
  165. <h5 class="decalaration">Declaration</h5>
  166. <div class="codewrapper">
  167. <pre><code class="lang-csharp hljs">public bool AutoSize { get; set; }</code></pre>
  168. </div>
  169. <h5 class="propertyValue">Property Value</h5>
  170. <table class="table table-bordered table-striped table-condensed">
  171. <thead>
  172. <tr>
  173. <th>Type</th>
  174. <th>Description</th>
  175. </tr>
  176. </thead>
  177. <tbody>
  178. <tr>
  179. <td><span class="xref">System.Boolean</span></td>
  180. <td></td>
  181. </tr>
  182. </tbody>
  183. </table>
  184. <span class="small pull-right mobile-hide">
  185. <span class="divider">|</span>
  186. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_CursorPosition.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.CursorPosition%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  187. </span>
  188. <span class="small pull-right mobile-hide">
  189. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L305">View Source</a>
  190. </span>
  191. <a id="Terminal_Gui_TextFormatter_CursorPosition_" data-uid="Terminal.Gui.TextFormatter.CursorPosition*"></a>
  192. <h4 id="Terminal_Gui_TextFormatter_CursorPosition" data-uid="Terminal.Gui.TextFormatter.CursorPosition">CursorPosition</h4>
  193. <div class="markdown level1 summary">
  194. Gets the cursor position from <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_HotKey">HotKey</a>. If the <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_HotKey">HotKey</a> is defined, the cursor will be positioned over it.
  195. </div>
  196. <div class="markdown level1 conceptual"></div>
  197. <h5 class="decalaration">Declaration</h5>
  198. <div class="codewrapper">
  199. <pre><code class="lang-csharp hljs">public int CursorPosition { get; set; }</code></pre>
  200. </div>
  201. <h5 class="propertyValue">Property Value</h5>
  202. <table class="table table-bordered table-striped table-condensed">
  203. <thead>
  204. <tr>
  205. <th>Type</th>
  206. <th>Description</th>
  207. </tr>
  208. </thead>
  209. <tbody>
  210. <tr>
  211. <td><span class="xref">System.Int32</span></td>
  212. <td></td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <span class="small pull-right mobile-hide">
  217. <span class="divider">|</span>
  218. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Direction.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Direction%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  219. </span>
  220. <span class="small pull-right mobile-hide">
  221. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L193">View Source</a>
  222. </span>
  223. <a id="Terminal_Gui_TextFormatter_Direction_" data-uid="Terminal.Gui.TextFormatter.Direction*"></a>
  224. <h4 id="Terminal_Gui_TextFormatter_Direction" data-uid="Terminal.Gui.TextFormatter.Direction">Direction</h4>
  225. <div class="markdown level1 summary">
  226. Controls the text-direction property.
  227. </div>
  228. <div class="markdown level1 conceptual"></div>
  229. <h5 class="decalaration">Declaration</h5>
  230. <div class="codewrapper">
  231. <pre><code class="lang-csharp hljs">public TextDirection Direction { get; set; }</code></pre>
  232. </div>
  233. <h5 class="propertyValue">Property Value</h5>
  234. <table class="table table-bordered table-striped table-condensed">
  235. <thead>
  236. <tr>
  237. <th>Type</th>
  238. <th>Description</th>
  239. </tr>
  240. </thead>
  241. <tbody>
  242. <tr>
  243. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  244. <td>The text vertical alignment.</td>
  245. </tr>
  246. </tbody>
  247. </table>
  248. <span class="small pull-right mobile-hide">
  249. <span class="divider">|</span>
  250. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_HotKey.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.HotKey%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  251. </span>
  252. <span class="small pull-right mobile-hide">
  253. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L285">View Source</a>
  254. </span>
  255. <a id="Terminal_Gui_TextFormatter_HotKey_" data-uid="Terminal.Gui.TextFormatter.HotKey*"></a>
  256. <h4 id="Terminal_Gui_TextFormatter_HotKey" data-uid="Terminal.Gui.TextFormatter.HotKey">HotKey</h4>
  257. <div class="markdown level1 summary">
  258. Gets the hotkey. Will be an upper case letter or digit.
  259. </div>
  260. <div class="markdown level1 conceptual"></div>
  261. <h5 class="decalaration">Declaration</h5>
  262. <div class="codewrapper">
  263. <pre><code class="lang-csharp hljs">public Key HotKey { get; }</code></pre>
  264. </div>
  265. <h5 class="propertyValue">Property Value</h5>
  266. <table class="table table-bordered table-striped table-condensed">
  267. <thead>
  268. <tr>
  269. <th>Type</th>
  270. <th>Description</th>
  271. </tr>
  272. </thead>
  273. <tbody>
  274. <tr>
  275. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  276. <td></td>
  277. </tr>
  278. </tbody>
  279. </table>
  280. <span class="small pull-right mobile-hide">
  281. <span class="divider">|</span>
  282. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_HotKeyPos.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.HotKeyPos%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  283. </span>
  284. <span class="small pull-right mobile-hide">
  285. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L280">View Source</a>
  286. </span>
  287. <a id="Terminal_Gui_TextFormatter_HotKeyPos_" data-uid="Terminal.Gui.TextFormatter.HotKeyPos*"></a>
  288. <h4 id="Terminal_Gui_TextFormatter_HotKeyPos" data-uid="Terminal.Gui.TextFormatter.HotKeyPos">HotKeyPos</h4>
  289. <div class="markdown level1 summary">
  290. The position in the text of the hotkey. The hotkey will be rendered using the hot color.
  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 int HotKeyPos { 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.Int32</span></td>
  308. <td></td>
  309. </tr>
  310. </tbody>
  311. </table>
  312. <span class="small pull-right mobile-hide">
  313. <span class="divider">|</span>
  314. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_HotKeySpecifier.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.HotKeySpecifier%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  315. </span>
  316. <span class="small pull-right mobile-hide">
  317. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L275">View Source</a>
  318. </span>
  319. <a id="Terminal_Gui_TextFormatter_HotKeySpecifier_" data-uid="Terminal.Gui.TextFormatter.HotKeySpecifier*"></a>
  320. <h4 id="Terminal_Gui_TextFormatter_HotKeySpecifier" data-uid="Terminal.Gui.TextFormatter.HotKeySpecifier">HotKeySpecifier</h4>
  321. <div class="markdown level1 summary">
  322. The specifier character for the hotkey (e.g. &apos;_&apos;). Set to &apos;\xffff&apos; to disable hotkey support for this View instance. The default is &apos;\xffff&apos;.
  323. </div>
  324. <div class="markdown level1 conceptual"></div>
  325. <h5 class="decalaration">Declaration</h5>
  326. <div class="codewrapper">
  327. <pre><code class="lang-csharp hljs">public Rune HotKeySpecifier { get; set; }</code></pre>
  328. </div>
  329. <h5 class="propertyValue">Property Value</h5>
  330. <table class="table table-bordered table-striped table-condensed">
  331. <thead>
  332. <tr>
  333. <th>Type</th>
  334. <th>Description</th>
  335. </tr>
  336. </thead>
  337. <tbody>
  338. <tr>
  339. <td><span class="xref">System.Rune</span></td>
  340. <td></td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. <span class="small pull-right mobile-hide">
  345. <span class="divider">|</span>
  346. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_HotKeyTagMask.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.HotKeyTagMask%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  347. </span>
  348. <span class="small pull-right mobile-hide">
  349. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L300">View Source</a>
  350. </span>
  351. <a id="Terminal_Gui_TextFormatter_HotKeyTagMask_" data-uid="Terminal.Gui.TextFormatter.HotKeyTagMask*"></a>
  352. <h4 id="Terminal_Gui_TextFormatter_HotKeyTagMask" data-uid="Terminal.Gui.TextFormatter.HotKeyTagMask">HotKeyTagMask</h4>
  353. <div class="markdown level1 summary">
  354. Specifies the mask to apply to the hotkey to tag it as the hotkey. The default value of <code>0x100000</code> causes
  355. the underlying Rune to be identified as a &quot;private use&quot; Unicode character.
  356. </div>
  357. <div class="markdown level1 conceptual"></div>
  358. <h5 class="decalaration">Declaration</h5>
  359. <div class="codewrapper">
  360. <pre><code class="lang-csharp hljs">public uint HotKeyTagMask { get; set; }</code></pre>
  361. </div>
  362. <h5 class="propertyValue">Property Value</h5>
  363. <table class="table table-bordered table-striped table-condensed">
  364. <thead>
  365. <tr>
  366. <th>Type</th>
  367. <th>Description</th>
  368. </tr>
  369. </thead>
  370. <tbody>
  371. <tr>
  372. <td><span class="xref">System.UInt32</span></td>
  373. <td></td>
  374. </tr>
  375. </tbody>
  376. </table>
  377. <span class="small pull-right mobile-hide">
  378. <span class="divider">|</span>
  379. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Lines.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Lines%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  380. </span>
  381. <span class="small pull-right mobile-hide">
  382. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L316">View Source</a>
  383. </span>
  384. <a id="Terminal_Gui_TextFormatter_Lines_" data-uid="Terminal.Gui.TextFormatter.Lines*"></a>
  385. <h4 id="Terminal_Gui_TextFormatter_Lines" data-uid="Terminal.Gui.TextFormatter.Lines">Lines</h4>
  386. <div class="markdown level1 summary">
  387. Gets the formatted lines.
  388. </div>
  389. <div class="markdown level1 conceptual"></div>
  390. <h5 class="decalaration">Declaration</h5>
  391. <div class="codewrapper">
  392. <pre><code class="lang-csharp hljs">public List&lt;ustring&gt; Lines { get; }</code></pre>
  393. </div>
  394. <h5 class="propertyValue">Property Value</h5>
  395. <table class="table table-bordered table-striped table-condensed">
  396. <thead>
  397. <tr>
  398. <th>Type</th>
  399. <th>Description</th>
  400. </tr>
  401. </thead>
  402. <tbody>
  403. <tr>
  404. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  405. <td></td>
  406. </tr>
  407. </tbody>
  408. </table>
  409. <span class="small pull-right mobile-hide">
  410. <span class="divider">|</span>
  411. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_NeedsFormat.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.NeedsFormat%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  412. </span>
  413. <span class="small pull-right mobile-hide">
  414. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L367">View Source</a>
  415. </span>
  416. <a id="Terminal_Gui_TextFormatter_NeedsFormat_" data-uid="Terminal.Gui.TextFormatter.NeedsFormat*"></a>
  417. <h4 id="Terminal_Gui_TextFormatter_NeedsFormat" data-uid="Terminal.Gui.TextFormatter.NeedsFormat">NeedsFormat</h4>
  418. <div class="markdown level1 summary">
  419. Gets or sets whether the <a class="xref" href="Terminal.Gui.TextFormatter.html">TextFormatter</a> needs to format the text when <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_Draw_Terminal_Gui_Rect_Terminal_Gui_Attribute_Terminal_Gui_Attribute_Terminal_Gui_Rect_System_Boolean_">Draw(Rect, Attribute, Attribute, Rect, Boolean)</a> is called.
  420. If it is <code>false</code> when Draw is called, the Draw call will be faster.
  421. </div>
  422. <div class="markdown level1 conceptual"></div>
  423. <h5 class="decalaration">Declaration</h5>
  424. <div class="codewrapper">
  425. <pre><code class="lang-csharp hljs">public bool NeedsFormat { get; set; }</code></pre>
  426. </div>
  427. <h5 class="propertyValue">Property Value</h5>
  428. <table class="table table-bordered table-striped table-condensed">
  429. <thead>
  430. <tr>
  431. <th>Type</th>
  432. <th>Description</th>
  433. </tr>
  434. </thead>
  435. <tbody>
  436. <tr>
  437. <td><span class="xref">System.Boolean</span></td>
  438. <td></td>
  439. </tr>
  440. </tbody>
  441. </table>
  442. <span class="small pull-right mobile-hide">
  443. <span class="divider">|</span>
  444. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_PreserveTrailingSpaces.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.PreserveTrailingSpaces%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  445. </span>
  446. <span class="small pull-right mobile-hide">
  447. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L163">View Source</a>
  448. </span>
  449. <a id="Terminal_Gui_TextFormatter_PreserveTrailingSpaces_" data-uid="Terminal.Gui.TextFormatter.PreserveTrailingSpaces*"></a>
  450. <h4 id="Terminal_Gui_TextFormatter_PreserveTrailingSpaces" data-uid="Terminal.Gui.TextFormatter.PreserveTrailingSpaces">PreserveTrailingSpaces</h4>
  451. <div class="markdown level1 summary">
  452. Gets or sets a flag that determines whether <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_Text">Text</a> will have trailing spaces preserved
  453. or not when <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_WordWrap_NStack_ustring_System_Int32_System_Boolean_System_Int32_Terminal_Gui_TextDirection_">WordWrap(ustring, Int32, Boolean, Int32, TextDirection)</a> is enabled. If `true` any trailing spaces will be trimmed when
  454. either the <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_Text">Text</a> property is changed or when <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_WordWrap_NStack_ustring_System_Int32_System_Boolean_System_Int32_Terminal_Gui_TextDirection_">WordWrap(ustring, Int32, Boolean, Int32, TextDirection)</a> is set to `true`.
  455. The default is `false`.
  456. </div>
  457. <div class="markdown level1 conceptual"></div>
  458. <h5 class="decalaration">Declaration</h5>
  459. <div class="codewrapper">
  460. <pre><code class="lang-csharp hljs">public bool PreserveTrailingSpaces { get; set; }</code></pre>
  461. </div>
  462. <h5 class="propertyValue">Property Value</h5>
  463. <table class="table table-bordered table-striped table-condensed">
  464. <thead>
  465. <tr>
  466. <th>Type</th>
  467. <th>Description</th>
  468. </tr>
  469. </thead>
  470. <tbody>
  471. <tr>
  472. <td><span class="xref">System.Boolean</span></td>
  473. <td></td>
  474. </tr>
  475. </tbody>
  476. </table>
  477. <span class="small pull-right mobile-hide">
  478. <span class="divider">|</span>
  479. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Size.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Size%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  480. </span>
  481. <span class="small pull-right mobile-hide">
  482. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L264">View Source</a>
  483. </span>
  484. <a id="Terminal_Gui_TextFormatter_Size_" data-uid="Terminal.Gui.TextFormatter.Size*"></a>
  485. <h4 id="Terminal_Gui_TextFormatter_Size" data-uid="Terminal.Gui.TextFormatter.Size">Size</h4>
  486. <div class="markdown level1 summary">
  487. Gets or sets the size of the area the text will be constrained to when formatted.
  488. </div>
  489. <div class="markdown level1 conceptual"></div>
  490. <h5 class="decalaration">Declaration</h5>
  491. <div class="codewrapper">
  492. <pre><code class="lang-csharp hljs">public Size Size { get; set; }</code></pre>
  493. </div>
  494. <h5 class="propertyValue">Property Value</h5>
  495. <table class="table table-bordered table-striped table-condensed">
  496. <thead>
  497. <tr>
  498. <th>Type</th>
  499. <th>Description</th>
  500. </tr>
  501. </thead>
  502. <tbody>
  503. <tr>
  504. <td><a class="xref" href="Terminal.Gui.Size.html">Size</a></td>
  505. <td></td>
  506. </tr>
  507. </tbody>
  508. </table>
  509. <span class="small pull-right mobile-hide">
  510. <span class="divider">|</span>
  511. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Text.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Text%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  512. </span>
  513. <span class="small pull-right mobile-hide">
  514. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L134">View Source</a>
  515. </span>
  516. <a id="Terminal_Gui_TextFormatter_Text_" data-uid="Terminal.Gui.TextFormatter.Text*"></a>
  517. <h4 id="Terminal_Gui_TextFormatter_Text" data-uid="Terminal.Gui.TextFormatter.Text">Text</h4>
  518. <div class="markdown level1 summary">
  519. The text to be displayed. This text is never modified.
  520. </div>
  521. <div class="markdown level1 conceptual"></div>
  522. <h5 class="decalaration">Declaration</h5>
  523. <div class="codewrapper">
  524. <pre><code class="lang-csharp hljs">public virtual ustring Text { get; set; }</code></pre>
  525. </div>
  526. <h5 class="propertyValue">Property Value</h5>
  527. <table class="table table-bordered table-striped table-condensed">
  528. <thead>
  529. <tr>
  530. <th>Type</th>
  531. <th>Description</th>
  532. </tr>
  533. </thead>
  534. <tbody>
  535. <tr>
  536. <td><span class="xref">NStack.ustring</span></td>
  537. <td></td>
  538. </tr>
  539. </tbody>
  540. </table>
  541. <span class="small pull-right mobile-hide">
  542. <span class="divider">|</span>
  543. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_VerticalAlignment.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.VerticalAlignment%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  544. </span>
  545. <span class="small pull-right mobile-hide">
  546. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L181">View Source</a>
  547. </span>
  548. <a id="Terminal_Gui_TextFormatter_VerticalAlignment_" data-uid="Terminal.Gui.TextFormatter.VerticalAlignment*"></a>
  549. <h4 id="Terminal_Gui_TextFormatter_VerticalAlignment" data-uid="Terminal.Gui.TextFormatter.VerticalAlignment">VerticalAlignment</h4>
  550. <div class="markdown level1 summary">
  551. Controls the vertical text-alignment property.
  552. </div>
  553. <div class="markdown level1 conceptual"></div>
  554. <h5 class="decalaration">Declaration</h5>
  555. <div class="codewrapper">
  556. <pre><code class="lang-csharp hljs">public VerticalTextAlignment VerticalAlignment { get; set; }</code></pre>
  557. </div>
  558. <h5 class="propertyValue">Property Value</h5>
  559. <table class="table table-bordered table-striped table-condensed">
  560. <thead>
  561. <tr>
  562. <th>Type</th>
  563. <th>Description</th>
  564. </tr>
  565. </thead>
  566. <tbody>
  567. <tr>
  568. <td><a class="xref" href="Terminal.Gui.VerticalTextAlignment.html">VerticalTextAlignment</a></td>
  569. <td>The text vertical alignment.</td>
  570. </tr>
  571. </tbody>
  572. </table>
  573. <h3 id="methods">Methods
  574. </h3>
  575. <span class="small pull-right mobile-hide">
  576. <span class="divider">|</span>
  577. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_CalcRect_System_Int32_System_Int32_NStack_ustring_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.CalcRect(System.Int32%2CSystem.Int32%2CNStack.ustring%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  578. </span>
  579. <span class="small pull-right mobile-hide">
  580. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L974">View Source</a>
  581. </span>
  582. <a id="Terminal_Gui_TextFormatter_CalcRect_" data-uid="Terminal.Gui.TextFormatter.CalcRect*"></a>
  583. <h4 id="Terminal_Gui_TextFormatter_CalcRect_System_Int32_System_Int32_NStack_ustring_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.CalcRect(System.Int32,System.Int32,NStack.ustring,Terminal.Gui.TextDirection)">CalcRect(Int32, Int32, ustring, TextDirection)</h4>
  584. <div class="markdown level1 summary">
  585. Calculates the rectangle required to hold text, assuming no word wrapping.
  586. </div>
  587. <div class="markdown level1 conceptual"></div>
  588. <h5 class="decalaration">Declaration</h5>
  589. <div class="codewrapper">
  590. <pre><code class="lang-csharp hljs">public static Rect CalcRect(int x, int y, ustring text, TextDirection direction = TextDirection.LeftRight_TopBottom)</code></pre>
  591. </div>
  592. <h5 class="parameters">Parameters</h5>
  593. <table class="table table-bordered table-striped table-condensed">
  594. <thead>
  595. <tr>
  596. <th>Type</th>
  597. <th>Name</th>
  598. <th>Description</th>
  599. </tr>
  600. </thead>
  601. <tbody>
  602. <tr>
  603. <td><span class="xref">System.Int32</span></td>
  604. <td><span class="parametername">x</span></td>
  605. <td>The x location of the rectangle</td>
  606. </tr>
  607. <tr>
  608. <td><span class="xref">System.Int32</span></td>
  609. <td><span class="parametername">y</span></td>
  610. <td>The y location of the rectangle</td>
  611. </tr>
  612. <tr>
  613. <td><span class="xref">NStack.ustring</span></td>
  614. <td><span class="parametername">text</span></td>
  615. <td>The text to measure</td>
  616. </tr>
  617. <tr>
  618. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  619. <td><span class="parametername">direction</span></td>
  620. <td>The text direction.</td>
  621. </tr>
  622. </tbody>
  623. </table>
  624. <h5 class="returns">Returns</h5>
  625. <table class="table table-bordered table-striped table-condensed">
  626. <thead>
  627. <tr>
  628. <th>Type</th>
  629. <th>Description</th>
  630. </tr>
  631. </thead>
  632. <tbody>
  633. <tr>
  634. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  635. <td></td>
  636. </tr>
  637. </tbody>
  638. </table>
  639. <span class="small pull-right mobile-hide">
  640. <span class="divider">|</span>
  641. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_ClipAndJustify_NStack_ustring_System_Int32_System_Boolean_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.ClipAndJustify(NStack.ustring%2CSystem.Int32%2CSystem.Boolean%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  642. </span>
  643. <span class="small pull-right mobile-hide">
  644. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L643">View Source</a>
  645. </span>
  646. <a id="Terminal_Gui_TextFormatter_ClipAndJustify_" data-uid="Terminal.Gui.TextFormatter.ClipAndJustify*"></a>
  647. <h4 id="Terminal_Gui_TextFormatter_ClipAndJustify_NStack_ustring_System_Int32_System_Boolean_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.ClipAndJustify(NStack.ustring,System.Int32,System.Boolean,Terminal.Gui.TextDirection)">ClipAndJustify(ustring, Int32, Boolean, TextDirection)</h4>
  648. <div class="markdown level1 summary">
  649. Justifies text within a specified width.
  650. </div>
  651. <div class="markdown level1 conceptual"></div>
  652. <h5 class="decalaration">Declaration</h5>
  653. <div class="codewrapper">
  654. <pre><code class="lang-csharp hljs">public static ustring ClipAndJustify(ustring text, int width, bool justify, TextDirection textDirection = TextDirection.LeftRight_TopBottom)</code></pre>
  655. </div>
  656. <h5 class="parameters">Parameters</h5>
  657. <table class="table table-bordered table-striped table-condensed">
  658. <thead>
  659. <tr>
  660. <th>Type</th>
  661. <th>Name</th>
  662. <th>Description</th>
  663. </tr>
  664. </thead>
  665. <tbody>
  666. <tr>
  667. <td><span class="xref">NStack.ustring</span></td>
  668. <td><span class="parametername">text</span></td>
  669. <td>The text to justify.</td>
  670. </tr>
  671. <tr>
  672. <td><span class="xref">System.Int32</span></td>
  673. <td><span class="parametername">width</span></td>
  674. <td>If the text length is greater that <code>width</code> it will be clipped.</td>
  675. </tr>
  676. <tr>
  677. <td><span class="xref">System.Boolean</span></td>
  678. <td><span class="parametername">justify</span></td>
  679. <td>Justify.</td>
  680. </tr>
  681. <tr>
  682. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  683. <td><span class="parametername">textDirection</span></td>
  684. <td>The text direction.</td>
  685. </tr>
  686. </tbody>
  687. </table>
  688. <h5 class="returns">Returns</h5>
  689. <table class="table table-bordered table-striped table-condensed">
  690. <thead>
  691. <tr>
  692. <th>Type</th>
  693. <th>Description</th>
  694. </tr>
  695. </thead>
  696. <tbody>
  697. <tr>
  698. <td><span class="xref">NStack.ustring</span></td>
  699. <td>Justified and clipped text.</td>
  700. </tr>
  701. </tbody>
  702. </table>
  703. <span class="small pull-right mobile-hide">
  704. <span class="divider">|</span>
  705. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_ClipAndJustify_NStack_ustring_System_Int32_Terminal_Gui_TextAlignment_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.ClipAndJustify(NStack.ustring%2CSystem.Int32%2CTerminal.Gui.TextAlignment%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  706. </span>
  707. <span class="small pull-right mobile-hide">
  708. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L630">View Source</a>
  709. </span>
  710. <a id="Terminal_Gui_TextFormatter_ClipAndJustify_" data-uid="Terminal.Gui.TextFormatter.ClipAndJustify*"></a>
  711. <h4 id="Terminal_Gui_TextFormatter_ClipAndJustify_NStack_ustring_System_Int32_Terminal_Gui_TextAlignment_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.ClipAndJustify(NStack.ustring,System.Int32,Terminal.Gui.TextAlignment,Terminal.Gui.TextDirection)">ClipAndJustify(ustring, Int32, TextAlignment, TextDirection)</h4>
  712. <div class="markdown level1 summary">
  713. Justifies text within a specified width.
  714. </div>
  715. <div class="markdown level1 conceptual"></div>
  716. <h5 class="decalaration">Declaration</h5>
  717. <div class="codewrapper">
  718. <pre><code class="lang-csharp hljs">public static ustring ClipAndJustify(ustring text, int width, TextAlignment talign, TextDirection textDirection = TextDirection.LeftRight_TopBottom)</code></pre>
  719. </div>
  720. <h5 class="parameters">Parameters</h5>
  721. <table class="table table-bordered table-striped table-condensed">
  722. <thead>
  723. <tr>
  724. <th>Type</th>
  725. <th>Name</th>
  726. <th>Description</th>
  727. </tr>
  728. </thead>
  729. <tbody>
  730. <tr>
  731. <td><span class="xref">NStack.ustring</span></td>
  732. <td><span class="parametername">text</span></td>
  733. <td>The text to justify.</td>
  734. </tr>
  735. <tr>
  736. <td><span class="xref">System.Int32</span></td>
  737. <td><span class="parametername">width</span></td>
  738. <td>If the text length is greater that <code>width</code> it will be clipped.</td>
  739. </tr>
  740. <tr>
  741. <td><a class="xref" href="Terminal.Gui.TextAlignment.html">TextAlignment</a></td>
  742. <td><span class="parametername">talign</span></td>
  743. <td>Alignment.</td>
  744. </tr>
  745. <tr>
  746. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  747. <td><span class="parametername">textDirection</span></td>
  748. <td>The text direction.</td>
  749. </tr>
  750. </tbody>
  751. </table>
  752. <h5 class="returns">Returns</h5>
  753. <table class="table table-bordered table-striped table-condensed">
  754. <thead>
  755. <tr>
  756. <th>Type</th>
  757. <th>Description</th>
  758. </tr>
  759. </thead>
  760. <tbody>
  761. <tr>
  762. <td><span class="xref">NStack.ustring</span></td>
  763. <td>Justified and clipped text.</td>
  764. </tr>
  765. </tbody>
  766. </table>
  767. <span class="small pull-right mobile-hide">
  768. <span class="divider">|</span>
  769. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_ClipOrPad_System_String_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.ClipOrPad(System.String%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  770. </span>
  771. <span class="small pull-right mobile-hide">
  772. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L473">View Source</a>
  773. </span>
  774. <a id="Terminal_Gui_TextFormatter_ClipOrPad_" data-uid="Terminal.Gui.TextFormatter.ClipOrPad*"></a>
  775. <h4 id="Terminal_Gui_TextFormatter_ClipOrPad_System_String_System_Int32_" data-uid="Terminal.Gui.TextFormatter.ClipOrPad(System.String,System.Int32)">ClipOrPad(String, Int32)</h4>
  776. <div class="markdown level1 summary">
  777. Adds trailing whitespace or truncates <code data-dev-comment-type="paramref" class="paramref">text</code>
  778. so that it fits exactly <code data-dev-comment-type="paramref" class="paramref">width</code> console units.
  779. Note that some unicode characters take 2+ columns
  780. </div>
  781. <div class="markdown level1 conceptual"></div>
  782. <h5 class="decalaration">Declaration</h5>
  783. <div class="codewrapper">
  784. <pre><code class="lang-csharp hljs">public static string ClipOrPad(string text, int width)</code></pre>
  785. </div>
  786. <h5 class="parameters">Parameters</h5>
  787. <table class="table table-bordered table-striped table-condensed">
  788. <thead>
  789. <tr>
  790. <th>Type</th>
  791. <th>Name</th>
  792. <th>Description</th>
  793. </tr>
  794. </thead>
  795. <tbody>
  796. <tr>
  797. <td><span class="xref">System.String</span></td>
  798. <td><span class="parametername">text</span></td>
  799. <td></td>
  800. </tr>
  801. <tr>
  802. <td><span class="xref">System.Int32</span></td>
  803. <td><span class="parametername">width</span></td>
  804. <td></td>
  805. </tr>
  806. </tbody>
  807. </table>
  808. <h5 class="returns">Returns</h5>
  809. <table class="table table-bordered table-striped table-condensed">
  810. <thead>
  811. <tr>
  812. <th>Type</th>
  813. <th>Description</th>
  814. </tr>
  815. </thead>
  816. <tbody>
  817. <tr>
  818. <td><span class="xref">System.String</span></td>
  819. <td></td>
  820. </tr>
  821. </tbody>
  822. </table>
  823. <span class="small pull-right mobile-hide">
  824. <span class="divider">|</span>
  825. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Draw_Terminal_Gui_Rect_Terminal_Gui_Attribute_Terminal_Gui_Attribute_Terminal_Gui_Rect_System_Boolean_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Draw(Terminal.Gui.Rect%2CTerminal.Gui.Attribute%2CTerminal.Gui.Attribute%2CTerminal.Gui.Rect%2CSystem.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  826. </span>
  827. <span class="small pull-right mobile-hide">
  828. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L1163">View Source</a>
  829. </span>
  830. <a id="Terminal_Gui_TextFormatter_Draw_" data-uid="Terminal.Gui.TextFormatter.Draw*"></a>
  831. <h4 id="Terminal_Gui_TextFormatter_Draw_Terminal_Gui_Rect_Terminal_Gui_Attribute_Terminal_Gui_Attribute_Terminal_Gui_Rect_System_Boolean_" data-uid="Terminal.Gui.TextFormatter.Draw(Terminal.Gui.Rect,Terminal.Gui.Attribute,Terminal.Gui.Attribute,Terminal.Gui.Rect,System.Boolean)">Draw(Rect, Attribute, Attribute, Rect, Boolean)</h4>
  832. <div class="markdown level1 summary">
  833. Draws the text held by <a class="xref" href="Terminal.Gui.TextFormatter.html">TextFormatter</a> to <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Driver">Driver</a> using the colors specified.
  834. </div>
  835. <div class="markdown level1 conceptual"></div>
  836. <h5 class="decalaration">Declaration</h5>
  837. <div class="codewrapper">
  838. <pre><code class="lang-csharp hljs">public void Draw(Rect bounds, Attribute normalColor, Attribute hotColor, Rect containerBounds = default(Rect), bool fillRemaining = true)</code></pre>
  839. </div>
  840. <h5 class="parameters">Parameters</h5>
  841. <table class="table table-bordered table-striped table-condensed">
  842. <thead>
  843. <tr>
  844. <th>Type</th>
  845. <th>Name</th>
  846. <th>Description</th>
  847. </tr>
  848. </thead>
  849. <tbody>
  850. <tr>
  851. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  852. <td><span class="parametername">bounds</span></td>
  853. <td>Specifies the screen-relative location and maximum size for drawing the text.</td>
  854. </tr>
  855. <tr>
  856. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  857. <td><span class="parametername">normalColor</span></td>
  858. <td>The color to use for all text except the hotkey</td>
  859. </tr>
  860. <tr>
  861. <td><a class="xref" href="Terminal.Gui.Attribute.html">Attribute</a></td>
  862. <td><span class="parametername">hotColor</span></td>
  863. <td>The color to use to draw the hotkey</td>
  864. </tr>
  865. <tr>
  866. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  867. <td><span class="parametername">containerBounds</span></td>
  868. <td>Specifies the screen-relative location and maximum container size.</td>
  869. </tr>
  870. <tr>
  871. <td><span class="xref">System.Boolean</span></td>
  872. <td><span class="parametername">fillRemaining</span></td>
  873. <td>Determines if the bounds width will be used (default) or only the text width will be used.</td>
  874. </tr>
  875. </tbody>
  876. </table>
  877. <span class="small pull-right mobile-hide">
  878. <span class="divider">|</span>
  879. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_FindHotKey_NStack_ustring_System_Rune_System_Boolean_System_Int32__Terminal_Gui_Key__.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.FindHotKey(NStack.ustring%2CSystem.Rune%2CSystem.Boolean%2CSystem.Int32%40%2CTerminal.Gui.Key%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  880. </span>
  881. <span class="small pull-right mobile-hide">
  882. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L1050">View Source</a>
  883. </span>
  884. <a id="Terminal_Gui_TextFormatter_FindHotKey_" data-uid="Terminal.Gui.TextFormatter.FindHotKey*"></a>
  885. <h4 id="Terminal_Gui_TextFormatter_FindHotKey_NStack_ustring_System_Rune_System_Boolean_System_Int32__Terminal_Gui_Key__" data-uid="Terminal.Gui.TextFormatter.FindHotKey(NStack.ustring,System.Rune,System.Boolean,System.Int32@,Terminal.Gui.Key@)">FindHotKey(ustring, Rune, Boolean, out Int32, out Key)</h4>
  886. <div class="markdown level1 summary">
  887. Finds the hotkey and its location in text.
  888. </div>
  889. <div class="markdown level1 conceptual"></div>
  890. <h5 class="decalaration">Declaration</h5>
  891. <div class="codewrapper">
  892. <pre><code class="lang-csharp hljs">public static bool FindHotKey(ustring text, Rune hotKeySpecifier, bool firstUpperCase, out int hotPos, out Key hotKey)</code></pre>
  893. </div>
  894. <h5 class="parameters">Parameters</h5>
  895. <table class="table table-bordered table-striped table-condensed">
  896. <thead>
  897. <tr>
  898. <th>Type</th>
  899. <th>Name</th>
  900. <th>Description</th>
  901. </tr>
  902. </thead>
  903. <tbody>
  904. <tr>
  905. <td><span class="xref">NStack.ustring</span></td>
  906. <td><span class="parametername">text</span></td>
  907. <td>The text to look in.</td>
  908. </tr>
  909. <tr>
  910. <td><span class="xref">System.Rune</span></td>
  911. <td><span class="parametername">hotKeySpecifier</span></td>
  912. <td>The hotkey specifier (e.g. &apos;_&apos;) to look for.</td>
  913. </tr>
  914. <tr>
  915. <td><span class="xref">System.Boolean</span></td>
  916. <td><span class="parametername">firstUpperCase</span></td>
  917. <td>If <code>true</code> the legacy behavior of identifying the first upper case character as the hotkey will be enabled.
  918. Regardless of the value of this parameter, <code>hotKeySpecifier</code> takes precedence.</td>
  919. </tr>
  920. <tr>
  921. <td><span class="xref">System.Int32</span></td>
  922. <td><span class="parametername">hotPos</span></td>
  923. <td>Outputs the Rune index into <code>text</code>.</td>
  924. </tr>
  925. <tr>
  926. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  927. <td><span class="parametername">hotKey</span></td>
  928. <td>Outputs the hotKey.</td>
  929. </tr>
  930. </tbody>
  931. </table>
  932. <h5 class="returns">Returns</h5>
  933. <table class="table table-bordered table-striped table-condensed">
  934. <thead>
  935. <tr>
  936. <th>Type</th>
  937. <th>Description</th>
  938. </tr>
  939. </thead>
  940. <tbody>
  941. <tr>
  942. <td><span class="xref">System.Boolean</span></td>
  943. <td><code>true</code> if a hotkey was found; <code>false</code> otherwise.</td>
  944. </tr>
  945. </tbody>
  946. </table>
  947. <span class="small pull-right mobile-hide">
  948. <span class="divider">|</span>
  949. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Format_NStack_ustring_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Int32_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Format(NStack.ustring%2CSystem.Int32%2CSystem.Boolean%2CSystem.Boolean%2CSystem.Boolean%2CSystem.Int32%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  950. </span>
  951. <span class="small pull-right mobile-hide">
  952. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L770">View Source</a>
  953. </span>
  954. <a id="Terminal_Gui_TextFormatter_Format_" data-uid="Terminal.Gui.TextFormatter.Format*"></a>
  955. <h4 id="Terminal_Gui_TextFormatter_Format_NStack_ustring_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Int32_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.Format(NStack.ustring,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.Int32,Terminal.Gui.TextDirection)">Format(ustring, Int32, Boolean, Boolean, Boolean, Int32, TextDirection)</h4>
  956. <div class="markdown level1 summary">
  957. Reformats text into lines, applying text alignment and optionally wrapping text to new lines on word boundaries.
  958. </div>
  959. <div class="markdown level1 conceptual"></div>
  960. <h5 class="decalaration">Declaration</h5>
  961. <div class="codewrapper">
  962. <pre><code class="lang-csharp hljs">public static List&lt;ustring&gt; Format(ustring text, int width, bool justify, bool wordWrap, bool preserveTrailingSpaces = false, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom)</code></pre>
  963. </div>
  964. <h5 class="parameters">Parameters</h5>
  965. <table class="table table-bordered table-striped table-condensed">
  966. <thead>
  967. <tr>
  968. <th>Type</th>
  969. <th>Name</th>
  970. <th>Description</th>
  971. </tr>
  972. </thead>
  973. <tbody>
  974. <tr>
  975. <td><span class="xref">NStack.ustring</span></td>
  976. <td><span class="parametername">text</span></td>
  977. <td></td>
  978. </tr>
  979. <tr>
  980. <td><span class="xref">System.Int32</span></td>
  981. <td><span class="parametername">width</span></td>
  982. <td>The width to bound the text to for word wrapping and clipping.</td>
  983. </tr>
  984. <tr>
  985. <td><span class="xref">System.Boolean</span></td>
  986. <td><span class="parametername">justify</span></td>
  987. <td>Specifies whether the text should be justified.</td>
  988. </tr>
  989. <tr>
  990. <td><span class="xref">System.Boolean</span></td>
  991. <td><span class="parametername">wordWrap</span></td>
  992. <td>If <code>true</code>, the text will be wrapped to new lines as need. If <code>false</code>, forces text to fit a single line. Line breaks are converted to spaces. The text will be clipped to <code>width</code></td>
  993. </tr>
  994. <tr>
  995. <td><span class="xref">System.Boolean</span></td>
  996. <td><span class="parametername">preserveTrailingSpaces</span></td>
  997. <td>If <code>true</code> and &apos;wordWrap&apos; also true, the wrapped text will keep the trailing spaces. If <code>false</code>, the trailing spaces will be trimmed.</td>
  998. </tr>
  999. <tr>
  1000. <td><span class="xref">System.Int32</span></td>
  1001. <td><span class="parametername">tabWidth</span></td>
  1002. <td>The tab width.</td>
  1003. </tr>
  1004. <tr>
  1005. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1006. <td><span class="parametername">textDirection</span></td>
  1007. <td>The text direction.</td>
  1008. </tr>
  1009. </tbody>
  1010. </table>
  1011. <h5 class="returns">Returns</h5>
  1012. <table class="table table-bordered table-striped table-condensed">
  1013. <thead>
  1014. <tr>
  1015. <th>Type</th>
  1016. <th>Description</th>
  1017. </tr>
  1018. </thead>
  1019. <tbody>
  1020. <tr>
  1021. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  1022. <td>A list of word wrapped lines.</td>
  1023. </tr>
  1024. </tbody>
  1025. </table>
  1026. <span class="small pull-right mobile-hide">
  1027. <span class="divider">|</span>
  1028. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Format_NStack_ustring_System_Int32_Terminal_Gui_TextAlignment_System_Boolean_System_Boolean_System_Int32_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Format(NStack.ustring%2CSystem.Int32%2CTerminal.Gui.TextAlignment%2CSystem.Boolean%2CSystem.Boolean%2CSystem.Int32%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1029. </span>
  1030. <span class="small pull-right mobile-hide">
  1031. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L743">View Source</a>
  1032. </span>
  1033. <a id="Terminal_Gui_TextFormatter_Format_" data-uid="Terminal.Gui.TextFormatter.Format*"></a>
  1034. <h4 id="Terminal_Gui_TextFormatter_Format_NStack_ustring_System_Int32_Terminal_Gui_TextAlignment_System_Boolean_System_Boolean_System_Int32_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.Format(NStack.ustring,System.Int32,Terminal.Gui.TextAlignment,System.Boolean,System.Boolean,System.Int32,Terminal.Gui.TextDirection)">Format(ustring, Int32, TextAlignment, Boolean, Boolean, Int32, TextDirection)</h4>
  1035. <div class="markdown level1 summary">
  1036. Reformats text into lines, applying text alignment and optionally wrapping text to new lines on word boundaries.
  1037. </div>
  1038. <div class="markdown level1 conceptual"></div>
  1039. <h5 class="decalaration">Declaration</h5>
  1040. <div class="codewrapper">
  1041. <pre><code class="lang-csharp hljs">public static List&lt;ustring&gt; Format(ustring text, int width, TextAlignment talign, bool wordWrap, bool preserveTrailingSpaces = false, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom)</code></pre>
  1042. </div>
  1043. <h5 class="parameters">Parameters</h5>
  1044. <table class="table table-bordered table-striped table-condensed">
  1045. <thead>
  1046. <tr>
  1047. <th>Type</th>
  1048. <th>Name</th>
  1049. <th>Description</th>
  1050. </tr>
  1051. </thead>
  1052. <tbody>
  1053. <tr>
  1054. <td><span class="xref">NStack.ustring</span></td>
  1055. <td><span class="parametername">text</span></td>
  1056. <td></td>
  1057. </tr>
  1058. <tr>
  1059. <td><span class="xref">System.Int32</span></td>
  1060. <td><span class="parametername">width</span></td>
  1061. <td>The width to bound the text to for word wrapping and clipping.</td>
  1062. </tr>
  1063. <tr>
  1064. <td><a class="xref" href="Terminal.Gui.TextAlignment.html">TextAlignment</a></td>
  1065. <td><span class="parametername">talign</span></td>
  1066. <td>Specifies how the text will be aligned horizontally.</td>
  1067. </tr>
  1068. <tr>
  1069. <td><span class="xref">System.Boolean</span></td>
  1070. <td><span class="parametername">wordWrap</span></td>
  1071. <td>If <code>true</code>, the text will be wrapped to new lines as need. If <code>false</code>, forces text to fit a single line. Line breaks are converted to spaces. The text will be clipped to <code>width</code></td>
  1072. </tr>
  1073. <tr>
  1074. <td><span class="xref">System.Boolean</span></td>
  1075. <td><span class="parametername">preserveTrailingSpaces</span></td>
  1076. <td>If <code>true</code> and &apos;wordWrap&apos; also true, the wrapped text will keep the trailing spaces. If <code>false</code>, the trailing spaces will be trimmed.</td>
  1077. </tr>
  1078. <tr>
  1079. <td><span class="xref">System.Int32</span></td>
  1080. <td><span class="parametername">tabWidth</span></td>
  1081. <td>The tab width.</td>
  1082. </tr>
  1083. <tr>
  1084. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1085. <td><span class="parametername">textDirection</span></td>
  1086. <td>The text direction.</td>
  1087. </tr>
  1088. </tbody>
  1089. </table>
  1090. <h5 class="returns">Returns</h5>
  1091. <table class="table table-bordered table-striped table-condensed">
  1092. <thead>
  1093. <tr>
  1094. <th>Type</th>
  1095. <th>Description</th>
  1096. </tr>
  1097. </thead>
  1098. <tbody>
  1099. <tr>
  1100. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  1101. <td>A list of word wrapped lines.</td>
  1102. </tr>
  1103. </tbody>
  1104. </table>
  1105. <span class="small pull-right mobile-hide">
  1106. <span class="divider">|</span>
  1107. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_GetMaxColsForWidth_System_Collections_Generic_List_NStack_ustring__System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.GetMaxColsForWidth(System.Collections.Generic.List%7BNStack.ustring%7D%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1108. </span>
  1109. <span class="small pull-right mobile-hide">
  1110. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L950">View Source</a>
  1111. </span>
  1112. <a id="Terminal_Gui_TextFormatter_GetMaxColsForWidth_" data-uid="Terminal.Gui.TextFormatter.GetMaxColsForWidth*"></a>
  1113. <h4 id="Terminal_Gui_TextFormatter_GetMaxColsForWidth_System_Collections_Generic_List_NStack_ustring__System_Int32_" data-uid="Terminal.Gui.TextFormatter.GetMaxColsForWidth(System.Collections.Generic.List{NStack.ustring},System.Int32)">GetMaxColsForWidth(List&lt;ustring&gt;, Int32)</h4>
  1114. <div class="markdown level1 summary">
  1115. Gets the index position from the list based on the <code data-dev-comment-type="paramref" class="paramref">width</code>.
  1116. </div>
  1117. <div class="markdown level1 conceptual"></div>
  1118. <h5 class="decalaration">Declaration</h5>
  1119. <div class="codewrapper">
  1120. <pre><code class="lang-csharp hljs">public static int GetMaxColsForWidth(List&lt;ustring&gt; lines, int width)</code></pre>
  1121. </div>
  1122. <h5 class="parameters">Parameters</h5>
  1123. <table class="table table-bordered table-striped table-condensed">
  1124. <thead>
  1125. <tr>
  1126. <th>Type</th>
  1127. <th>Name</th>
  1128. <th>Description</th>
  1129. </tr>
  1130. </thead>
  1131. <tbody>
  1132. <tr>
  1133. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  1134. <td><span class="parametername">lines</span></td>
  1135. <td>The lines.</td>
  1136. </tr>
  1137. <tr>
  1138. <td><span class="xref">System.Int32</span></td>
  1139. <td><span class="parametername">width</span></td>
  1140. <td>The width.</td>
  1141. </tr>
  1142. </tbody>
  1143. </table>
  1144. <h5 class="returns">Returns</h5>
  1145. <table class="table table-bordered table-striped table-condensed">
  1146. <thead>
  1147. <tr>
  1148. <th>Type</th>
  1149. <th>Description</th>
  1150. </tr>
  1151. </thead>
  1152. <tbody>
  1153. <tr>
  1154. <td><span class="xref">System.Int32</span></td>
  1155. <td>The index of the list that fit the width.</td>
  1156. </tr>
  1157. </tbody>
  1158. </table>
  1159. <span class="small pull-right mobile-hide">
  1160. <span class="divider">|</span>
  1161. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_GetMaxLengthForWidth_NStack_ustring_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.GetMaxLengthForWidth(NStack.ustring%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1162. </span>
  1163. <span class="small pull-right mobile-hide">
  1164. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L909">View Source</a>
  1165. </span>
  1166. <a id="Terminal_Gui_TextFormatter_GetMaxLengthForWidth_" data-uid="Terminal.Gui.TextFormatter.GetMaxLengthForWidth*"></a>
  1167. <h4 id="Terminal_Gui_TextFormatter_GetMaxLengthForWidth_NStack_ustring_System_Int32_" data-uid="Terminal.Gui.TextFormatter.GetMaxLengthForWidth(NStack.ustring,System.Int32)">GetMaxLengthForWidth(ustring, Int32)</h4>
  1168. <div class="markdown level1 summary">
  1169. Gets the index position from the text based on the <code data-dev-comment-type="paramref" class="paramref">width</code>.
  1170. </div>
  1171. <div class="markdown level1 conceptual"></div>
  1172. <h5 class="decalaration">Declaration</h5>
  1173. <div class="codewrapper">
  1174. <pre><code class="lang-csharp hljs">public static int GetMaxLengthForWidth(ustring text, int width)</code></pre>
  1175. </div>
  1176. <h5 class="parameters">Parameters</h5>
  1177. <table class="table table-bordered table-striped table-condensed">
  1178. <thead>
  1179. <tr>
  1180. <th>Type</th>
  1181. <th>Name</th>
  1182. <th>Description</th>
  1183. </tr>
  1184. </thead>
  1185. <tbody>
  1186. <tr>
  1187. <td><span class="xref">NStack.ustring</span></td>
  1188. <td><span class="parametername">text</span></td>
  1189. <td>The text.</td>
  1190. </tr>
  1191. <tr>
  1192. <td><span class="xref">System.Int32</span></td>
  1193. <td><span class="parametername">width</span></td>
  1194. <td>The width.</td>
  1195. </tr>
  1196. </tbody>
  1197. </table>
  1198. <h5 class="returns">Returns</h5>
  1199. <table class="table table-bordered table-striped table-condensed">
  1200. <thead>
  1201. <tr>
  1202. <th>Type</th>
  1203. <th>Description</th>
  1204. </tr>
  1205. </thead>
  1206. <tbody>
  1207. <tr>
  1208. <td><span class="xref">System.Int32</span></td>
  1209. <td>The index of the text that fit the width.</td>
  1210. </tr>
  1211. </tbody>
  1212. </table>
  1213. <span class="small pull-right mobile-hide">
  1214. <span class="divider">|</span>
  1215. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_GetMaxLengthForWidth_System_Collections_Generic_List_System_Rune__System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.GetMaxLengthForWidth(System.Collections.Generic.List%7BSystem.Rune%7D%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1216. </span>
  1217. <span class="small pull-right mobile-hide">
  1218. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L930">View Source</a>
  1219. </span>
  1220. <a id="Terminal_Gui_TextFormatter_GetMaxLengthForWidth_" data-uid="Terminal.Gui.TextFormatter.GetMaxLengthForWidth*"></a>
  1221. <h4 id="Terminal_Gui_TextFormatter_GetMaxLengthForWidth_System_Collections_Generic_List_System_Rune__System_Int32_" data-uid="Terminal.Gui.TextFormatter.GetMaxLengthForWidth(System.Collections.Generic.List{System.Rune},System.Int32)">GetMaxLengthForWidth(List&lt;Rune&gt;, Int32)</h4>
  1222. <div class="markdown level1 summary">
  1223. Gets the index position from the list based on the <code data-dev-comment-type="paramref" class="paramref">width</code>.
  1224. </div>
  1225. <div class="markdown level1 conceptual"></div>
  1226. <h5 class="decalaration">Declaration</h5>
  1227. <div class="codewrapper">
  1228. <pre><code class="lang-csharp hljs">public static int GetMaxLengthForWidth(List&lt;Rune&gt; runes, int width)</code></pre>
  1229. </div>
  1230. <h5 class="parameters">Parameters</h5>
  1231. <table class="table table-bordered table-striped table-condensed">
  1232. <thead>
  1233. <tr>
  1234. <th>Type</th>
  1235. <th>Name</th>
  1236. <th>Description</th>
  1237. </tr>
  1238. </thead>
  1239. <tbody>
  1240. <tr>
  1241. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">System.Rune</span>&gt;</td>
  1242. <td><span class="parametername">runes</span></td>
  1243. <td>The runes.</td>
  1244. </tr>
  1245. <tr>
  1246. <td><span class="xref">System.Int32</span></td>
  1247. <td><span class="parametername">width</span></td>
  1248. <td>The width.</td>
  1249. </tr>
  1250. </tbody>
  1251. </table>
  1252. <h5 class="returns">Returns</h5>
  1253. <table class="table table-bordered table-striped table-condensed">
  1254. <thead>
  1255. <tr>
  1256. <th>Type</th>
  1257. <th>Description</th>
  1258. </tr>
  1259. </thead>
  1260. <tbody>
  1261. <tr>
  1262. <td><span class="xref">System.Int32</span></td>
  1263. <td>The index of the list that fit the width.</td>
  1264. </tr>
  1265. </tbody>
  1266. </table>
  1267. <span class="small pull-right mobile-hide">
  1268. <span class="divider">|</span>
  1269. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_GetSumMaxCharWidth_NStack_ustring_System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.GetSumMaxCharWidth(NStack.ustring%2CSystem.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1270. </span>
  1271. <span class="small pull-right mobile-hide">
  1272. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L893">View Source</a>
  1273. </span>
  1274. <a id="Terminal_Gui_TextFormatter_GetSumMaxCharWidth_" data-uid="Terminal.Gui.TextFormatter.GetSumMaxCharWidth*"></a>
  1275. <h4 id="Terminal_Gui_TextFormatter_GetSumMaxCharWidth_NStack_ustring_System_Int32_System_Int32_" data-uid="Terminal.Gui.TextFormatter.GetSumMaxCharWidth(NStack.ustring,System.Int32,System.Int32)">GetSumMaxCharWidth(ustring, Int32, Int32)</h4>
  1276. <div class="markdown level1 summary">
  1277. Gets the maximum characters width from the text based on the <code data-dev-comment-type="paramref" class="paramref">startIndex</code>
  1278. and the <code data-dev-comment-type="paramref" class="paramref">length</code>.
  1279. </div>
  1280. <div class="markdown level1 conceptual"></div>
  1281. <h5 class="decalaration">Declaration</h5>
  1282. <div class="codewrapper">
  1283. <pre><code class="lang-csharp hljs">public static int GetSumMaxCharWidth(ustring text, int startIndex = -1, int length = -1)</code></pre>
  1284. </div>
  1285. <h5 class="parameters">Parameters</h5>
  1286. <table class="table table-bordered table-striped table-condensed">
  1287. <thead>
  1288. <tr>
  1289. <th>Type</th>
  1290. <th>Name</th>
  1291. <th>Description</th>
  1292. </tr>
  1293. </thead>
  1294. <tbody>
  1295. <tr>
  1296. <td><span class="xref">NStack.ustring</span></td>
  1297. <td><span class="parametername">text</span></td>
  1298. <td>The text.</td>
  1299. </tr>
  1300. <tr>
  1301. <td><span class="xref">System.Int32</span></td>
  1302. <td><span class="parametername">startIndex</span></td>
  1303. <td>The start index.</td>
  1304. </tr>
  1305. <tr>
  1306. <td><span class="xref">System.Int32</span></td>
  1307. <td><span class="parametername">length</span></td>
  1308. <td>The length.</td>
  1309. </tr>
  1310. </tbody>
  1311. </table>
  1312. <h5 class="returns">Returns</h5>
  1313. <table class="table table-bordered table-striped table-condensed">
  1314. <thead>
  1315. <tr>
  1316. <th>Type</th>
  1317. <th>Description</th>
  1318. </tr>
  1319. </thead>
  1320. <tbody>
  1321. <tr>
  1322. <td><span class="xref">System.Int32</span></td>
  1323. <td>The maximum characters width.</td>
  1324. </tr>
  1325. </tbody>
  1326. </table>
  1327. <span class="small pull-right mobile-hide">
  1328. <span class="divider">|</span>
  1329. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_GetSumMaxCharWidth_System_Collections_Generic_List_NStack_ustring__System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.GetSumMaxCharWidth(System.Collections.Generic.List%7BNStack.ustring%7D%2CSystem.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1330. </span>
  1331. <span class="small pull-right mobile-hide">
  1332. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L874">View Source</a>
  1333. </span>
  1334. <a id="Terminal_Gui_TextFormatter_GetSumMaxCharWidth_" data-uid="Terminal.Gui.TextFormatter.GetSumMaxCharWidth*"></a>
  1335. <h4 id="Terminal_Gui_TextFormatter_GetSumMaxCharWidth_System_Collections_Generic_List_NStack_ustring__System_Int32_System_Int32_" data-uid="Terminal.Gui.TextFormatter.GetSumMaxCharWidth(System.Collections.Generic.List{NStack.ustring},System.Int32,System.Int32)">GetSumMaxCharWidth(List&lt;ustring&gt;, Int32, Int32)</h4>
  1336. <div class="markdown level1 summary">
  1337. Gets the maximum characters width from the list based on the <code data-dev-comment-type="paramref" class="paramref">startIndex</code>
  1338. and the <code data-dev-comment-type="paramref" class="paramref">length</code>.
  1339. </div>
  1340. <div class="markdown level1 conceptual"></div>
  1341. <h5 class="decalaration">Declaration</h5>
  1342. <div class="codewrapper">
  1343. <pre><code class="lang-csharp hljs">public static int GetSumMaxCharWidth(List&lt;ustring&gt; lines, int startIndex = -1, int length = -1)</code></pre>
  1344. </div>
  1345. <h5 class="parameters">Parameters</h5>
  1346. <table class="table table-bordered table-striped table-condensed">
  1347. <thead>
  1348. <tr>
  1349. <th>Type</th>
  1350. <th>Name</th>
  1351. <th>Description</th>
  1352. </tr>
  1353. </thead>
  1354. <tbody>
  1355. <tr>
  1356. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  1357. <td><span class="parametername">lines</span></td>
  1358. <td>The lines.</td>
  1359. </tr>
  1360. <tr>
  1361. <td><span class="xref">System.Int32</span></td>
  1362. <td><span class="parametername">startIndex</span></td>
  1363. <td>The start index.</td>
  1364. </tr>
  1365. <tr>
  1366. <td><span class="xref">System.Int32</span></td>
  1367. <td><span class="parametername">length</span></td>
  1368. <td>The length.</td>
  1369. </tr>
  1370. </tbody>
  1371. </table>
  1372. <h5 class="returns">Returns</h5>
  1373. <table class="table table-bordered table-striped table-condensed">
  1374. <thead>
  1375. <tr>
  1376. <th>Type</th>
  1377. <th>Description</th>
  1378. </tr>
  1379. </thead>
  1380. <tbody>
  1381. <tr>
  1382. <td><span class="xref">System.Int32</span></td>
  1383. <td>The maximum characters width.</td>
  1384. </tr>
  1385. </tbody>
  1386. </table>
  1387. <span class="small pull-right mobile-hide">
  1388. <span class="divider">|</span>
  1389. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_GetTextWidth_NStack_ustring_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.GetTextWidth(NStack.ustring)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1390. </span>
  1391. <span class="small pull-right mobile-hide">
  1392. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L861">View Source</a>
  1393. </span>
  1394. <a id="Terminal_Gui_TextFormatter_GetTextWidth_" data-uid="Terminal.Gui.TextFormatter.GetTextWidth*"></a>
  1395. <h4 id="Terminal_Gui_TextFormatter_GetTextWidth_NStack_ustring_" data-uid="Terminal.Gui.TextFormatter.GetTextWidth(NStack.ustring)">GetTextWidth(ustring)</h4>
  1396. <div class="markdown level1 summary">
  1397. Gets the total width of the passed text.
  1398. </div>
  1399. <div class="markdown level1 conceptual"></div>
  1400. <h5 class="decalaration">Declaration</h5>
  1401. <div class="codewrapper">
  1402. <pre><code class="lang-csharp hljs">public static int GetTextWidth(ustring text)</code></pre>
  1403. </div>
  1404. <h5 class="parameters">Parameters</h5>
  1405. <table class="table table-bordered table-striped table-condensed">
  1406. <thead>
  1407. <tr>
  1408. <th>Type</th>
  1409. <th>Name</th>
  1410. <th>Description</th>
  1411. </tr>
  1412. </thead>
  1413. <tbody>
  1414. <tr>
  1415. <td><span class="xref">NStack.ustring</span></td>
  1416. <td><span class="parametername">text</span></td>
  1417. <td></td>
  1418. </tr>
  1419. </tbody>
  1420. </table>
  1421. <h5 class="returns">Returns</h5>
  1422. <table class="table table-bordered table-striped table-condensed">
  1423. <thead>
  1424. <tr>
  1425. <th>Type</th>
  1426. <th>Description</th>
  1427. </tr>
  1428. </thead>
  1429. <tbody>
  1430. <tr>
  1431. <td><span class="xref">System.Int32</span></td>
  1432. <td>The text width.</td>
  1433. </tr>
  1434. </tbody>
  1435. </table>
  1436. <span class="small pull-right mobile-hide">
  1437. <span class="divider">|</span>
  1438. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_IsHorizontalDirection_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.IsHorizontalDirection(Terminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1439. </span>
  1440. <span class="small pull-right mobile-hide">
  1441. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L204">View Source</a>
  1442. </span>
  1443. <a id="Terminal_Gui_TextFormatter_IsHorizontalDirection_" data-uid="Terminal.Gui.TextFormatter.IsHorizontalDirection*"></a>
  1444. <h4 id="Terminal_Gui_TextFormatter_IsHorizontalDirection_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.IsHorizontalDirection(Terminal.Gui.TextDirection)">IsHorizontalDirection(TextDirection)</h4>
  1445. <div class="markdown level1 summary">
  1446. Check if it is a horizontal direction
  1447. </div>
  1448. <div class="markdown level1 conceptual"></div>
  1449. <h5 class="decalaration">Declaration</h5>
  1450. <div class="codewrapper">
  1451. <pre><code class="lang-csharp hljs">public static bool IsHorizontalDirection(TextDirection textDirection)</code></pre>
  1452. </div>
  1453. <h5 class="parameters">Parameters</h5>
  1454. <table class="table table-bordered table-striped table-condensed">
  1455. <thead>
  1456. <tr>
  1457. <th>Type</th>
  1458. <th>Name</th>
  1459. <th>Description</th>
  1460. </tr>
  1461. </thead>
  1462. <tbody>
  1463. <tr>
  1464. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1465. <td><span class="parametername">textDirection</span></td>
  1466. <td></td>
  1467. </tr>
  1468. </tbody>
  1469. </table>
  1470. <h5 class="returns">Returns</h5>
  1471. <table class="table table-bordered table-striped table-condensed">
  1472. <thead>
  1473. <tr>
  1474. <th>Type</th>
  1475. <th>Description</th>
  1476. </tr>
  1477. </thead>
  1478. <tbody>
  1479. <tr>
  1480. <td><span class="xref">System.Boolean</span></td>
  1481. <td></td>
  1482. </tr>
  1483. </tbody>
  1484. </table>
  1485. <span class="small pull-right mobile-hide">
  1486. <span class="divider">|</span>
  1487. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_IsLeftToRight_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.IsLeftToRight(Terminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1488. </span>
  1489. <span class="small pull-right mobile-hide">
  1490. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L236">View Source</a>
  1491. </span>
  1492. <a id="Terminal_Gui_TextFormatter_IsLeftToRight_" data-uid="Terminal.Gui.TextFormatter.IsLeftToRight*"></a>
  1493. <h4 id="Terminal_Gui_TextFormatter_IsLeftToRight_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.IsLeftToRight(Terminal.Gui.TextDirection)">IsLeftToRight(TextDirection)</h4>
  1494. <div class="markdown level1 summary">
  1495. Check if it is Left to Right direction
  1496. </div>
  1497. <div class="markdown level1 conceptual"></div>
  1498. <h5 class="decalaration">Declaration</h5>
  1499. <div class="codewrapper">
  1500. <pre><code class="lang-csharp hljs">public static bool IsLeftToRight(TextDirection textDirection)</code></pre>
  1501. </div>
  1502. <h5 class="parameters">Parameters</h5>
  1503. <table class="table table-bordered table-striped table-condensed">
  1504. <thead>
  1505. <tr>
  1506. <th>Type</th>
  1507. <th>Name</th>
  1508. <th>Description</th>
  1509. </tr>
  1510. </thead>
  1511. <tbody>
  1512. <tr>
  1513. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1514. <td><span class="parametername">textDirection</span></td>
  1515. <td></td>
  1516. </tr>
  1517. </tbody>
  1518. </table>
  1519. <h5 class="returns">Returns</h5>
  1520. <table class="table table-bordered table-striped table-condensed">
  1521. <thead>
  1522. <tr>
  1523. <th>Type</th>
  1524. <th>Description</th>
  1525. </tr>
  1526. </thead>
  1527. <tbody>
  1528. <tr>
  1529. <td><span class="xref">System.Boolean</span></td>
  1530. <td></td>
  1531. </tr>
  1532. </tbody>
  1533. </table>
  1534. <span class="small pull-right mobile-hide">
  1535. <span class="divider">|</span>
  1536. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_IsTopToBottom_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.IsTopToBottom(Terminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1537. </span>
  1538. <span class="small pull-right mobile-hide">
  1539. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L250">View Source</a>
  1540. </span>
  1541. <a id="Terminal_Gui_TextFormatter_IsTopToBottom_" data-uid="Terminal.Gui.TextFormatter.IsTopToBottom*"></a>
  1542. <h4 id="Terminal_Gui_TextFormatter_IsTopToBottom_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.IsTopToBottom(Terminal.Gui.TextDirection)">IsTopToBottom(TextDirection)</h4>
  1543. <div class="markdown level1 summary">
  1544. Check if it is Top to Bottom direction
  1545. </div>
  1546. <div class="markdown level1 conceptual"></div>
  1547. <h5 class="decalaration">Declaration</h5>
  1548. <div class="codewrapper">
  1549. <pre><code class="lang-csharp hljs">public static bool IsTopToBottom(TextDirection textDirection)</code></pre>
  1550. </div>
  1551. <h5 class="parameters">Parameters</h5>
  1552. <table class="table table-bordered table-striped table-condensed">
  1553. <thead>
  1554. <tr>
  1555. <th>Type</th>
  1556. <th>Name</th>
  1557. <th>Description</th>
  1558. </tr>
  1559. </thead>
  1560. <tbody>
  1561. <tr>
  1562. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1563. <td><span class="parametername">textDirection</span></td>
  1564. <td></td>
  1565. </tr>
  1566. </tbody>
  1567. </table>
  1568. <h5 class="returns">Returns</h5>
  1569. <table class="table table-bordered table-striped table-condensed">
  1570. <thead>
  1571. <tr>
  1572. <th>Type</th>
  1573. <th>Description</th>
  1574. </tr>
  1575. </thead>
  1576. <tbody>
  1577. <tr>
  1578. <td><span class="xref">System.Boolean</span></td>
  1579. <td></td>
  1580. </tr>
  1581. </tbody>
  1582. </table>
  1583. <span class="small pull-right mobile-hide">
  1584. <span class="divider">|</span>
  1585. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_IsVerticalDirection_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.IsVerticalDirection(Terminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1586. </span>
  1587. <span class="small pull-right mobile-hide">
  1588. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L220">View Source</a>
  1589. </span>
  1590. <a id="Terminal_Gui_TextFormatter_IsVerticalDirection_" data-uid="Terminal.Gui.TextFormatter.IsVerticalDirection*"></a>
  1591. <h4 id="Terminal_Gui_TextFormatter_IsVerticalDirection_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.IsVerticalDirection(Terminal.Gui.TextDirection)">IsVerticalDirection(TextDirection)</h4>
  1592. <div class="markdown level1 summary">
  1593. Check if it is a vertical direction
  1594. </div>
  1595. <div class="markdown level1 conceptual"></div>
  1596. <h5 class="decalaration">Declaration</h5>
  1597. <div class="codewrapper">
  1598. <pre><code class="lang-csharp hljs">public static bool IsVerticalDirection(TextDirection textDirection)</code></pre>
  1599. </div>
  1600. <h5 class="parameters">Parameters</h5>
  1601. <table class="table table-bordered table-striped table-condensed">
  1602. <thead>
  1603. <tr>
  1604. <th>Type</th>
  1605. <th>Name</th>
  1606. <th>Description</th>
  1607. </tr>
  1608. </thead>
  1609. <tbody>
  1610. <tr>
  1611. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1612. <td><span class="parametername">textDirection</span></td>
  1613. <td></td>
  1614. </tr>
  1615. </tbody>
  1616. </table>
  1617. <h5 class="returns">Returns</h5>
  1618. <table class="table table-bordered table-striped table-condensed">
  1619. <thead>
  1620. <tr>
  1621. <th>Type</th>
  1622. <th>Description</th>
  1623. </tr>
  1624. </thead>
  1625. <tbody>
  1626. <tr>
  1627. <td><span class="xref">System.Boolean</span></td>
  1628. <td></td>
  1629. </tr>
  1630. </tbody>
  1631. </table>
  1632. <span class="small pull-right mobile-hide">
  1633. <span class="divider">|</span>
  1634. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_Justify_NStack_ustring_System_Int32_System_Char_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.Justify(NStack.ustring%2CSystem.Int32%2CSystem.Char%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1635. </span>
  1636. <span class="small pull-right mobile-hide">
  1637. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L679">View Source</a>
  1638. </span>
  1639. <a id="Terminal_Gui_TextFormatter_Justify_" data-uid="Terminal.Gui.TextFormatter.Justify*"></a>
  1640. <h4 id="Terminal_Gui_TextFormatter_Justify_NStack_ustring_System_Int32_System_Char_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.Justify(NStack.ustring,System.Int32,System.Char,Terminal.Gui.TextDirection)">Justify(ustring, Int32, Char, TextDirection)</h4>
  1641. <div class="markdown level1 summary">
  1642. Justifies the text to fill the width provided. Space will be added between words (demarked by spaces and tabs) to
  1643. make the text just fit <code>width</code>. Spaces will not be added to the ends.
  1644. </div>
  1645. <div class="markdown level1 conceptual"></div>
  1646. <h5 class="decalaration">Declaration</h5>
  1647. <div class="codewrapper">
  1648. <pre><code class="lang-csharp hljs">public static ustring Justify(ustring text, int width, char spaceChar = ' ', TextDirection textDirection = TextDirection.LeftRight_TopBottom)</code></pre>
  1649. </div>
  1650. <h5 class="parameters">Parameters</h5>
  1651. <table class="table table-bordered table-striped table-condensed">
  1652. <thead>
  1653. <tr>
  1654. <th>Type</th>
  1655. <th>Name</th>
  1656. <th>Description</th>
  1657. </tr>
  1658. </thead>
  1659. <tbody>
  1660. <tr>
  1661. <td><span class="xref">NStack.ustring</span></td>
  1662. <td><span class="parametername">text</span></td>
  1663. <td></td>
  1664. </tr>
  1665. <tr>
  1666. <td><span class="xref">System.Int32</span></td>
  1667. <td><span class="parametername">width</span></td>
  1668. <td></td>
  1669. </tr>
  1670. <tr>
  1671. <td><span class="xref">System.Char</span></td>
  1672. <td><span class="parametername">spaceChar</span></td>
  1673. <td>Character to replace whitespace and pad with. For debugging purposes.</td>
  1674. </tr>
  1675. <tr>
  1676. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  1677. <td><span class="parametername">textDirection</span></td>
  1678. <td>The text direction.</td>
  1679. </tr>
  1680. </tbody>
  1681. </table>
  1682. <h5 class="returns">Returns</h5>
  1683. <table class="table table-bordered table-striped table-condensed">
  1684. <thead>
  1685. <tr>
  1686. <th>Type</th>
  1687. <th>Description</th>
  1688. </tr>
  1689. </thead>
  1690. <tbody>
  1691. <tr>
  1692. <td><span class="xref">NStack.ustring</span></td>
  1693. <td>The justified text.</td>
  1694. </tr>
  1695. </tbody>
  1696. </table>
  1697. <span class="small pull-right mobile-hide">
  1698. <span class="divider">|</span>
  1699. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_MaxLines_NStack_ustring_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.MaxLines(NStack.ustring%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1700. </span>
  1701. <span class="small pull-right mobile-hide">
  1702. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L818">View Source</a>
  1703. </span>
  1704. <a id="Terminal_Gui_TextFormatter_MaxLines_" data-uid="Terminal.Gui.TextFormatter.MaxLines*"></a>
  1705. <h4 id="Terminal_Gui_TextFormatter_MaxLines_NStack_ustring_System_Int32_" data-uid="Terminal.Gui.TextFormatter.MaxLines(NStack.ustring,System.Int32)">MaxLines(ustring, Int32)</h4>
  1706. <div class="markdown level1 summary">
  1707. Computes the number of lines needed to render the specified text given the width.
  1708. </div>
  1709. <div class="markdown level1 conceptual"></div>
  1710. <h5 class="decalaration">Declaration</h5>
  1711. <div class="codewrapper">
  1712. <pre><code class="lang-csharp hljs">public static int MaxLines(ustring text, int width)</code></pre>
  1713. </div>
  1714. <h5 class="parameters">Parameters</h5>
  1715. <table class="table table-bordered table-striped table-condensed">
  1716. <thead>
  1717. <tr>
  1718. <th>Type</th>
  1719. <th>Name</th>
  1720. <th>Description</th>
  1721. </tr>
  1722. </thead>
  1723. <tbody>
  1724. <tr>
  1725. <td><span class="xref">NStack.ustring</span></td>
  1726. <td><span class="parametername">text</span></td>
  1727. <td>Text, may contain newlines.</td>
  1728. </tr>
  1729. <tr>
  1730. <td><span class="xref">System.Int32</span></td>
  1731. <td><span class="parametername">width</span></td>
  1732. <td>The minimum width for the text.</td>
  1733. </tr>
  1734. </tbody>
  1735. </table>
  1736. <h5 class="returns">Returns</h5>
  1737. <table class="table table-bordered table-striped table-condensed">
  1738. <thead>
  1739. <tr>
  1740. <th>Type</th>
  1741. <th>Description</th>
  1742. </tr>
  1743. </thead>
  1744. <tbody>
  1745. <tr>
  1746. <td><span class="xref">System.Int32</span></td>
  1747. <td>Number of lines.</td>
  1748. </tr>
  1749. </tbody>
  1750. </table>
  1751. <span class="small pull-right mobile-hide">
  1752. <span class="divider">|</span>
  1753. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_MaxWidth_NStack_ustring_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.MaxWidth(NStack.ustring%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1754. </span>
  1755. <span class="small pull-right mobile-hide">
  1756. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L830">View Source</a>
  1757. </span>
  1758. <a id="Terminal_Gui_TextFormatter_MaxWidth_" data-uid="Terminal.Gui.TextFormatter.MaxWidth*"></a>
  1759. <h4 id="Terminal_Gui_TextFormatter_MaxWidth_NStack_ustring_System_Int32_" data-uid="Terminal.Gui.TextFormatter.MaxWidth(NStack.ustring,System.Int32)">MaxWidth(ustring, Int32)</h4>
  1760. <div class="markdown level1 summary">
  1761. Computes the maximum width needed to render the text (single line or multiple lines) given a minimum width.
  1762. </div>
  1763. <div class="markdown level1 conceptual"></div>
  1764. <h5 class="decalaration">Declaration</h5>
  1765. <div class="codewrapper">
  1766. <pre><code class="lang-csharp hljs">public static int MaxWidth(ustring text, int width)</code></pre>
  1767. </div>
  1768. <h5 class="parameters">Parameters</h5>
  1769. <table class="table table-bordered table-striped table-condensed">
  1770. <thead>
  1771. <tr>
  1772. <th>Type</th>
  1773. <th>Name</th>
  1774. <th>Description</th>
  1775. </tr>
  1776. </thead>
  1777. <tbody>
  1778. <tr>
  1779. <td><span class="xref">NStack.ustring</span></td>
  1780. <td><span class="parametername">text</span></td>
  1781. <td>Text, may contain newlines.</td>
  1782. </tr>
  1783. <tr>
  1784. <td><span class="xref">System.Int32</span></td>
  1785. <td><span class="parametername">width</span></td>
  1786. <td>The minimum width for the text.</td>
  1787. </tr>
  1788. </tbody>
  1789. </table>
  1790. <h5 class="returns">Returns</h5>
  1791. <table class="table table-bordered table-striped table-condensed">
  1792. <thead>
  1793. <tr>
  1794. <th>Type</th>
  1795. <th>Description</th>
  1796. </tr>
  1797. </thead>
  1798. <tbody>
  1799. <tr>
  1800. <td><span class="xref">System.Int32</span></td>
  1801. <td>Max width of lines.</td>
  1802. </tr>
  1803. </tbody>
  1804. </table>
  1805. <span class="small pull-right mobile-hide">
  1806. <span class="divider">|</span>
  1807. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_MaxWidthLine_NStack_ustring_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.MaxWidthLine(NStack.ustring)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1808. </span>
  1809. <span class="small pull-right mobile-hide">
  1810. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L850">View Source</a>
  1811. </span>
  1812. <a id="Terminal_Gui_TextFormatter_MaxWidthLine_" data-uid="Terminal.Gui.TextFormatter.MaxWidthLine*"></a>
  1813. <h4 id="Terminal_Gui_TextFormatter_MaxWidthLine_NStack_ustring_" data-uid="Terminal.Gui.TextFormatter.MaxWidthLine(NStack.ustring)">MaxWidthLine(ustring)</h4>
  1814. <div class="markdown level1 summary">
  1815. Determines the line with the highest width in the
  1816. <code data-dev-comment-type="paramref" class="paramref">text</code> if it contains newlines.
  1817. </div>
  1818. <div class="markdown level1 conceptual"></div>
  1819. <h5 class="decalaration">Declaration</h5>
  1820. <div class="codewrapper">
  1821. <pre><code class="lang-csharp hljs">public static int MaxWidthLine(ustring text)</code></pre>
  1822. </div>
  1823. <h5 class="parameters">Parameters</h5>
  1824. <table class="table table-bordered table-striped table-condensed">
  1825. <thead>
  1826. <tr>
  1827. <th>Type</th>
  1828. <th>Name</th>
  1829. <th>Description</th>
  1830. </tr>
  1831. </thead>
  1832. <tbody>
  1833. <tr>
  1834. <td><span class="xref">NStack.ustring</span></td>
  1835. <td><span class="parametername">text</span></td>
  1836. <td>Text, may contain newlines.</td>
  1837. </tr>
  1838. </tbody>
  1839. </table>
  1840. <h5 class="returns">Returns</h5>
  1841. <table class="table table-bordered table-striped table-condensed">
  1842. <thead>
  1843. <tr>
  1844. <th>Type</th>
  1845. <th>Description</th>
  1846. </tr>
  1847. </thead>
  1848. <tbody>
  1849. <tr>
  1850. <td><span class="xref">System.Int32</span></td>
  1851. <td>The highest line width.</td>
  1852. </tr>
  1853. </tbody>
  1854. </table>
  1855. <span class="small pull-right mobile-hide">
  1856. <span class="divider">|</span>
  1857. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_RemoveHotKeySpecifier_NStack_ustring_System_Int32_System_Rune_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.RemoveHotKeySpecifier(NStack.ustring%2CSystem.Int32%2CSystem.Rune)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1858. </span>
  1859. <span class="small pull-right mobile-hide">
  1860. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L1135">View Source</a>
  1861. </span>
  1862. <a id="Terminal_Gui_TextFormatter_RemoveHotKeySpecifier_" data-uid="Terminal.Gui.TextFormatter.RemoveHotKeySpecifier*"></a>
  1863. <h4 id="Terminal_Gui_TextFormatter_RemoveHotKeySpecifier_NStack_ustring_System_Int32_System_Rune_" data-uid="Terminal.Gui.TextFormatter.RemoveHotKeySpecifier(NStack.ustring,System.Int32,System.Rune)">RemoveHotKeySpecifier(ustring, Int32, Rune)</h4>
  1864. <div class="markdown level1 summary">
  1865. Removes the hotkey specifier from text.
  1866. </div>
  1867. <div class="markdown level1 conceptual"></div>
  1868. <h5 class="decalaration">Declaration</h5>
  1869. <div class="codewrapper">
  1870. <pre><code class="lang-csharp hljs">public static ustring RemoveHotKeySpecifier(ustring text, int hotPos, Rune hotKeySpecifier)</code></pre>
  1871. </div>
  1872. <h5 class="parameters">Parameters</h5>
  1873. <table class="table table-bordered table-striped table-condensed">
  1874. <thead>
  1875. <tr>
  1876. <th>Type</th>
  1877. <th>Name</th>
  1878. <th>Description</th>
  1879. </tr>
  1880. </thead>
  1881. <tbody>
  1882. <tr>
  1883. <td><span class="xref">NStack.ustring</span></td>
  1884. <td><span class="parametername">text</span></td>
  1885. <td>The text to manipulate.</td>
  1886. </tr>
  1887. <tr>
  1888. <td><span class="xref">System.Int32</span></td>
  1889. <td><span class="parametername">hotPos</span></td>
  1890. <td>Returns the position of the hot-key in the text. -1 if not found.</td>
  1891. </tr>
  1892. <tr>
  1893. <td><span class="xref">System.Rune</span></td>
  1894. <td><span class="parametername">hotKeySpecifier</span></td>
  1895. <td>The hot-key specifier (e.g. &apos;_&apos;) to look for.</td>
  1896. </tr>
  1897. </tbody>
  1898. </table>
  1899. <h5 class="returns">Returns</h5>
  1900. <table class="table table-bordered table-striped table-condensed">
  1901. <thead>
  1902. <tr>
  1903. <th>Type</th>
  1904. <th>Description</th>
  1905. </tr>
  1906. </thead>
  1907. <tbody>
  1908. <tr>
  1909. <td><span class="xref">NStack.ustring</span></td>
  1910. <td>The input text with the hotkey specifier (&apos;_&apos;) removed.</td>
  1911. </tr>
  1912. </tbody>
  1913. </table>
  1914. <span class="small pull-right mobile-hide">
  1915. <span class="divider">|</span>
  1916. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_ReplaceHotKeyWithTag_NStack_ustring_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.ReplaceHotKeyWithTag(NStack.ustring%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1917. </span>
  1918. <span class="small pull-right mobile-hide">
  1919. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L1118">View Source</a>
  1920. </span>
  1921. <a id="Terminal_Gui_TextFormatter_ReplaceHotKeyWithTag_" data-uid="Terminal.Gui.TextFormatter.ReplaceHotKeyWithTag*"></a>
  1922. <h4 id="Terminal_Gui_TextFormatter_ReplaceHotKeyWithTag_NStack_ustring_System_Int32_" data-uid="Terminal.Gui.TextFormatter.ReplaceHotKeyWithTag(NStack.ustring,System.Int32)">ReplaceHotKeyWithTag(ustring, Int32)</h4>
  1923. <div class="markdown level1 summary">
  1924. Replaces the Rune at the index specified by the <code>hotPos</code> parameter with a tag identifying
  1925. it as the hotkey.
  1926. </div>
  1927. <div class="markdown level1 conceptual"></div>
  1928. <h5 class="decalaration">Declaration</h5>
  1929. <div class="codewrapper">
  1930. <pre><code class="lang-csharp hljs">public ustring ReplaceHotKeyWithTag(ustring text, int hotPos)</code></pre>
  1931. </div>
  1932. <h5 class="parameters">Parameters</h5>
  1933. <table class="table table-bordered table-striped table-condensed">
  1934. <thead>
  1935. <tr>
  1936. <th>Type</th>
  1937. <th>Name</th>
  1938. <th>Description</th>
  1939. </tr>
  1940. </thead>
  1941. <tbody>
  1942. <tr>
  1943. <td><span class="xref">NStack.ustring</span></td>
  1944. <td><span class="parametername">text</span></td>
  1945. <td>The text to tag the hotkey in.</td>
  1946. </tr>
  1947. <tr>
  1948. <td><span class="xref">System.Int32</span></td>
  1949. <td><span class="parametername">hotPos</span></td>
  1950. <td>The Rune index of the hotkey in <code>text</code>.</td>
  1951. </tr>
  1952. </tbody>
  1953. </table>
  1954. <h5 class="returns">Returns</h5>
  1955. <table class="table table-bordered table-striped table-condensed">
  1956. <thead>
  1957. <tr>
  1958. <th>Type</th>
  1959. <th>Description</th>
  1960. </tr>
  1961. </thead>
  1962. <tbody>
  1963. <tr>
  1964. <td><span class="xref">NStack.ustring</span></td>
  1965. <td>The text with the hotkey tagged.</td>
  1966. </tr>
  1967. </tbody>
  1968. </table>
  1969. <span class="small pull-right mobile-hide">
  1970. <span class="divider">|</span>
  1971. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_SplitNewLine_NStack_ustring_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.SplitNewLine(NStack.ustring)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  1972. </span>
  1973. <span class="small pull-right mobile-hide">
  1974. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L426">View Source</a>
  1975. </span>
  1976. <a id="Terminal_Gui_TextFormatter_SplitNewLine_" data-uid="Terminal.Gui.TextFormatter.SplitNewLine*"></a>
  1977. <h4 id="Terminal_Gui_TextFormatter_SplitNewLine_NStack_ustring_" data-uid="Terminal.Gui.TextFormatter.SplitNewLine(NStack.ustring)">SplitNewLine(ustring)</h4>
  1978. <div class="markdown level1 summary">
  1979. Splits all newlines in the <code data-dev-comment-type="paramref" class="paramref">text</code> into a list
  1980. and supports both CRLF and LF, preserving the ending newline.
  1981. </div>
  1982. <div class="markdown level1 conceptual"></div>
  1983. <h5 class="decalaration">Declaration</h5>
  1984. <div class="codewrapper">
  1985. <pre><code class="lang-csharp hljs">public static List&lt;ustring&gt; SplitNewLine(ustring text)</code></pre>
  1986. </div>
  1987. <h5 class="parameters">Parameters</h5>
  1988. <table class="table table-bordered table-striped table-condensed">
  1989. <thead>
  1990. <tr>
  1991. <th>Type</th>
  1992. <th>Name</th>
  1993. <th>Description</th>
  1994. </tr>
  1995. </thead>
  1996. <tbody>
  1997. <tr>
  1998. <td><span class="xref">NStack.ustring</span></td>
  1999. <td><span class="parametername">text</span></td>
  2000. <td>The text.</td>
  2001. </tr>
  2002. </tbody>
  2003. </table>
  2004. <h5 class="returns">Returns</h5>
  2005. <table class="table table-bordered table-striped table-condensed">
  2006. <thead>
  2007. <tr>
  2008. <th>Type</th>
  2009. <th>Description</th>
  2010. </tr>
  2011. </thead>
  2012. <tbody>
  2013. <tr>
  2014. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  2015. <td>A list of text without the newline characters.</td>
  2016. </tr>
  2017. </tbody>
  2018. </table>
  2019. <span class="small pull-right mobile-hide">
  2020. <span class="divider">|</span>
  2021. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_WordWrap_NStack_ustring_System_Int32_System_Boolean_System_Int32_Terminal_Gui_TextDirection_.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.WordWrap(NStack.ustring%2CSystem.Int32%2CSystem.Boolean%2CSystem.Int32%2CTerminal.Gui.TextDirection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  2022. </span>
  2023. <span class="small pull-right mobile-hide">
  2024. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L509">View Source</a>
  2025. </span>
  2026. <a id="Terminal_Gui_TextFormatter_WordWrap_" data-uid="Terminal.Gui.TextFormatter.WordWrap*"></a>
  2027. <h4 id="Terminal_Gui_TextFormatter_WordWrap_NStack_ustring_System_Int32_System_Boolean_System_Int32_Terminal_Gui_TextDirection_" data-uid="Terminal.Gui.TextFormatter.WordWrap(NStack.ustring,System.Int32,System.Boolean,System.Int32,Terminal.Gui.TextDirection)">WordWrap(ustring, Int32, Boolean, Int32, TextDirection)</h4>
  2028. <div class="markdown level1 summary">
  2029. Formats the provided text to fit within the width provided using word wrapping.
  2030. </div>
  2031. <div class="markdown level1 conceptual"></div>
  2032. <h5 class="decalaration">Declaration</h5>
  2033. <div class="codewrapper">
  2034. <pre><code class="lang-csharp hljs">public static List&lt;ustring&gt; WordWrap(ustring text, int width, bool preserveTrailingSpaces = false, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom)</code></pre>
  2035. </div>
  2036. <h5 class="parameters">Parameters</h5>
  2037. <table class="table table-bordered table-striped table-condensed">
  2038. <thead>
  2039. <tr>
  2040. <th>Type</th>
  2041. <th>Name</th>
  2042. <th>Description</th>
  2043. </tr>
  2044. </thead>
  2045. <tbody>
  2046. <tr>
  2047. <td><span class="xref">NStack.ustring</span></td>
  2048. <td><span class="parametername">text</span></td>
  2049. <td>The text to word wrap</td>
  2050. </tr>
  2051. <tr>
  2052. <td><span class="xref">System.Int32</span></td>
  2053. <td><span class="parametername">width</span></td>
  2054. <td>The width to contain the text to</td>
  2055. </tr>
  2056. <tr>
  2057. <td><span class="xref">System.Boolean</span></td>
  2058. <td><span class="parametername">preserveTrailingSpaces</span></td>
  2059. <td>If <code>true</code>, the wrapped text will keep the trailing spaces.
  2060. If <code>false</code>, the trailing spaces will be trimmed.</td>
  2061. </tr>
  2062. <tr>
  2063. <td><span class="xref">System.Int32</span></td>
  2064. <td><span class="parametername">tabWidth</span></td>
  2065. <td>The tab width.</td>
  2066. </tr>
  2067. <tr>
  2068. <td><a class="xref" href="Terminal.Gui.TextDirection.html">TextDirection</a></td>
  2069. <td><span class="parametername">textDirection</span></td>
  2070. <td>The text direction.</td>
  2071. </tr>
  2072. </tbody>
  2073. </table>
  2074. <h5 class="returns">Returns</h5>
  2075. <table class="table table-bordered table-striped table-condensed">
  2076. <thead>
  2077. <tr>
  2078. <th>Type</th>
  2079. <th>Description</th>
  2080. </tr>
  2081. </thead>
  2082. <tbody>
  2083. <tr>
  2084. <td><span class="xref">System.Collections.Generic.List</span>&lt;<span class="xref">NStack.ustring</span>&gt;</td>
  2085. <td>Returns a list of word wrapped lines.</td>
  2086. </tr>
  2087. </tbody>
  2088. </table>
  2089. <h3 id="events">Events
  2090. </h3>
  2091. <span class="small pull-right mobile-hide">
  2092. <span class="divider">|</span>
  2093. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter_HotKeyChanged.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter.HotKeyChanged%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  2094. </span>
  2095. <span class="small pull-right mobile-hide">
  2096. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L129">View Source</a>
  2097. </span>
  2098. <h4 id="Terminal_Gui_TextFormatter_HotKeyChanged" data-uid="Terminal.Gui.TextFormatter.HotKeyChanged">HotKeyChanged</h4>
  2099. <div class="markdown level1 summary">
  2100. Event invoked when the <a class="xref" href="Terminal.Gui.TextFormatter.html#Terminal_Gui_TextFormatter_HotKey">HotKey</a> is changed.
  2101. </div>
  2102. <div class="markdown level1 conceptual"></div>
  2103. <h5 class="decalaration">Declaration</h5>
  2104. <div class="codewrapper">
  2105. <pre><code class="lang-csharp hljs">public event Action&lt;Key&gt; HotKeyChanged</code></pre>
  2106. </div>
  2107. <h5 class="eventType">Event Type</h5>
  2108. <table class="table table-bordered table-striped table-condensed">
  2109. <thead>
  2110. <tr>
  2111. <th>Type</th>
  2112. <th>Description</th>
  2113. </tr>
  2114. </thead>
  2115. <tbody>
  2116. <tr>
  2117. <td><span class="xref">System.Action</span>&lt;<a class="xref" href="Terminal.Gui.Key.html">Key</a>&gt;</td>
  2118. <td></td>
  2119. </tr>
  2120. </tbody>
  2121. </table>
  2122. </article>
  2123. </div>
  2124. <div class="hidden-sm col-md-2" role="complementary">
  2125. <div class="sideaffix">
  2126. <div class="contribution">
  2127. <ul class="nav">
  2128. <li>
  2129. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_TextFormatter.md&amp;value=---%0Auid%3A%20Terminal.Gui.TextFormatter%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  2130. </li>
  2131. <li>
  2132. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/TextFormatter.cs/#L115" class="contribution-link">View Source</a>
  2133. </li>
  2134. </ul>
  2135. </div>
  2136. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  2137. <h5>In This Article</h5>
  2138. <div></div>
  2139. </nav>
  2140. </div>
  2141. </div>
  2142. </div>
  2143. </div>
  2144. <footer>
  2145. <div class="grad-bottom"></div>
  2146. <div class="footer">
  2147. <div class="container">
  2148. <span class="pull-right">
  2149. <a href="#top">Back to top</a>
  2150. </span>
  2151. <span>Generated by <strong>DocFX</strong></span>
  2152. </div>
  2153. </div>
  2154. </footer>
  2155. </div>
  2156. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  2157. <script type="text/javascript" src="../../styles/docfx.js"></script>
  2158. <script type="text/javascript" src="../../styles/main.js"></script>
  2159. </body>
  2160. </html>