Terminal.Gui.TextValidateProviders.ITextValidateProvider.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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>Interface ITextValidateProvider
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Interface ITextValidateProvider
  11. ">
  12. <meta name="generator" content="docfx 2.59.3.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.TextValidateProviders.ITextValidateProvider">
  74. <h1 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider" class="text-break">Interface ITextValidateProvider
  75. </h1>
  76. <div class="markdown level0 summary">
  77. TextValidateField Providers Interface.
  78. All TextValidateField are created with a ITextValidateProvider.
  79. </div>
  80. <div class="markdown level0 conceptual"></div>
  81. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.TextValidateProviders.html">Terminal.Gui.TextValidateProviders</a></h6>
  82. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  83. <h5 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_syntax">Syntax</h5>
  84. <div class="codewrapper">
  85. <pre><code class="lang-csharp hljs">public interface ITextValidateProvider</code></pre>
  86. </div>
  87. <h3 id="properties">Properties
  88. </h3>
  89. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_DisplayText_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.DisplayText*"></a>
  90. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_DisplayText" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.DisplayText">DisplayText</h4>
  91. <div class="markdown level1 summary">
  92. Gets the formatted string for display.
  93. </div>
  94. <div class="markdown level1 conceptual"></div>
  95. <h5 class="decalaration">Declaration</h5>
  96. <div class="codewrapper">
  97. <pre><code class="lang-csharp hljs">ustring DisplayText { get; }</code></pre>
  98. </div>
  99. <h5 class="propertyValue">Property Value</h5>
  100. <table class="table table-bordered table-striped table-condensed">
  101. <thead>
  102. <tr>
  103. <th>Type</th>
  104. <th>Description</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <tr>
  109. <td><span class="xref">NStack.ustring</span></td>
  110. <td></td>
  111. </tr>
  112. </tbody>
  113. </table>
  114. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Fixed_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Fixed*"></a>
  115. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Fixed" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Fixed">Fixed</h4>
  116. <div class="markdown level1 summary">
  117. Set that this provider uses a fixed width.
  118. e.g. Masked ones are fixed.
  119. </div>
  120. <div class="markdown level1 conceptual"></div>
  121. <h5 class="decalaration">Declaration</h5>
  122. <div class="codewrapper">
  123. <pre><code class="lang-csharp hljs">bool Fixed { get; }</code></pre>
  124. </div>
  125. <h5 class="propertyValue">Property Value</h5>
  126. <table class="table table-bordered table-striped table-condensed">
  127. <thead>
  128. <tr>
  129. <th>Type</th>
  130. <th>Description</th>
  131. </tr>
  132. </thead>
  133. <tbody>
  134. <tr>
  135. <td><span class="xref">System.Boolean</span></td>
  136. <td></td>
  137. </tr>
  138. </tbody>
  139. </table>
  140. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_IsValid_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.IsValid*"></a>
  141. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_IsValid" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.IsValid">IsValid</h4>
  142. <div class="markdown level1 summary">
  143. True if the input is valid, otherwise false.
  144. </div>
  145. <div class="markdown level1 conceptual"></div>
  146. <h5 class="decalaration">Declaration</h5>
  147. <div class="codewrapper">
  148. <pre><code class="lang-csharp hljs">bool IsValid { get; }</code></pre>
  149. </div>
  150. <h5 class="propertyValue">Property Value</h5>
  151. <table class="table table-bordered table-striped table-condensed">
  152. <thead>
  153. <tr>
  154. <th>Type</th>
  155. <th>Description</th>
  156. </tr>
  157. </thead>
  158. <tbody>
  159. <tr>
  160. <td><span class="xref">System.Boolean</span></td>
  161. <td></td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Text_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Text*"></a>
  166. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Text" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Text">Text</h4>
  167. <div class="markdown level1 summary">
  168. Set the input text and get the current value.
  169. </div>
  170. <div class="markdown level1 conceptual"></div>
  171. <h5 class="decalaration">Declaration</h5>
  172. <div class="codewrapper">
  173. <pre><code class="lang-csharp hljs">ustring Text { get; set; }</code></pre>
  174. </div>
  175. <h5 class="propertyValue">Property Value</h5>
  176. <table class="table table-bordered table-striped table-condensed">
  177. <thead>
  178. <tr>
  179. <th>Type</th>
  180. <th>Description</th>
  181. </tr>
  182. </thead>
  183. <tbody>
  184. <tr>
  185. <td><span class="xref">NStack.ustring</span></td>
  186. <td></td>
  187. </tr>
  188. </tbody>
  189. </table>
  190. <h3 id="methods">Methods
  191. </h3>
  192. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Cursor_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Cursor*"></a>
  193. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Cursor_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Cursor(System.Int32)">Cursor(Int32)</h4>
  194. <div class="markdown level1 summary">
  195. Set Cursor position to <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  196. </div>
  197. <div class="markdown level1 conceptual"></div>
  198. <h5 class="decalaration">Declaration</h5>
  199. <div class="codewrapper">
  200. <pre><code class="lang-csharp hljs">int Cursor(int pos)</code></pre>
  201. </div>
  202. <h5 class="parameters">Parameters</h5>
  203. <table class="table table-bordered table-striped table-condensed">
  204. <thead>
  205. <tr>
  206. <th>Type</th>
  207. <th>Name</th>
  208. <th>Description</th>
  209. </tr>
  210. </thead>
  211. <tbody>
  212. <tr>
  213. <td><span class="xref">System.Int32</span></td>
  214. <td><span class="parametername">pos</span></td>
  215. <td></td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. <h5 class="returns">Returns</h5>
  220. <table class="table table-bordered table-striped table-condensed">
  221. <thead>
  222. <tr>
  223. <th>Type</th>
  224. <th>Description</th>
  225. </tr>
  226. </thead>
  227. <tbody>
  228. <tr>
  229. <td><span class="xref">System.Int32</span></td>
  230. <td>Return first valid position.</td>
  231. </tr>
  232. </tbody>
  233. </table>
  234. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorEnd_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorEnd*"></a>
  235. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorEnd" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorEnd">CursorEnd()</h4>
  236. <div class="markdown level1 summary">
  237. Find the last valid character position.
  238. </div>
  239. <div class="markdown level1 conceptual"></div>
  240. <h5 class="decalaration">Declaration</h5>
  241. <div class="codewrapper">
  242. <pre><code class="lang-csharp hljs">int CursorEnd()</code></pre>
  243. </div>
  244. <h5 class="returns">Returns</h5>
  245. <table class="table table-bordered table-striped table-condensed">
  246. <thead>
  247. <tr>
  248. <th>Type</th>
  249. <th>Description</th>
  250. </tr>
  251. </thead>
  252. <tbody>
  253. <tr>
  254. <td><span class="xref">System.Int32</span></td>
  255. <td>New cursor position.</td>
  256. </tr>
  257. </tbody>
  258. </table>
  259. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorLeft_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorLeft*"></a>
  260. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorLeft_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorLeft(System.Int32)">CursorLeft(Int32)</h4>
  261. <div class="markdown level1 summary">
  262. First valid position before <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  263. </div>
  264. <div class="markdown level1 conceptual"></div>
  265. <h5 class="decalaration">Declaration</h5>
  266. <div class="codewrapper">
  267. <pre><code class="lang-csharp hljs">int CursorLeft(int pos)</code></pre>
  268. </div>
  269. <h5 class="parameters">Parameters</h5>
  270. <table class="table table-bordered table-striped table-condensed">
  271. <thead>
  272. <tr>
  273. <th>Type</th>
  274. <th>Name</th>
  275. <th>Description</th>
  276. </tr>
  277. </thead>
  278. <tbody>
  279. <tr>
  280. <td><span class="xref">System.Int32</span></td>
  281. <td><span class="parametername">pos</span></td>
  282. <td></td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. <h5 class="returns">Returns</h5>
  287. <table class="table table-bordered table-striped table-condensed">
  288. <thead>
  289. <tr>
  290. <th>Type</th>
  291. <th>Description</th>
  292. </tr>
  293. </thead>
  294. <tbody>
  295. <tr>
  296. <td><span class="xref">System.Int32</span></td>
  297. <td>New cursor position if any, otherwise returns <code data-dev-comment-type="paramref" class="paramref">pos</code></td>
  298. </tr>
  299. </tbody>
  300. </table>
  301. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorRight_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorRight*"></a>
  302. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorRight_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorRight(System.Int32)">CursorRight(Int32)</h4>
  303. <div class="markdown level1 summary">
  304. First valid position after <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  305. </div>
  306. <div class="markdown level1 conceptual"></div>
  307. <h5 class="decalaration">Declaration</h5>
  308. <div class="codewrapper">
  309. <pre><code class="lang-csharp hljs">int CursorRight(int pos)</code></pre>
  310. </div>
  311. <h5 class="parameters">Parameters</h5>
  312. <table class="table table-bordered table-striped table-condensed">
  313. <thead>
  314. <tr>
  315. <th>Type</th>
  316. <th>Name</th>
  317. <th>Description</th>
  318. </tr>
  319. </thead>
  320. <tbody>
  321. <tr>
  322. <td><span class="xref">System.Int32</span></td>
  323. <td><span class="parametername">pos</span></td>
  324. <td>Current position.</td>
  325. </tr>
  326. </tbody>
  327. </table>
  328. <h5 class="returns">Returns</h5>
  329. <table class="table table-bordered table-striped table-condensed">
  330. <thead>
  331. <tr>
  332. <th>Type</th>
  333. <th>Description</th>
  334. </tr>
  335. </thead>
  336. <tbody>
  337. <tr>
  338. <td><span class="xref">System.Int32</span></td>
  339. <td>New cursor position if any, otherwise returns <code data-dev-comment-type="paramref" class="paramref">pos</code></td>
  340. </tr>
  341. </tbody>
  342. </table>
  343. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorStart_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorStart*"></a>
  344. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorStart" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorStart">CursorStart()</h4>
  345. <div class="markdown level1 summary">
  346. Find the first valid character position.
  347. </div>
  348. <div class="markdown level1 conceptual"></div>
  349. <h5 class="decalaration">Declaration</h5>
  350. <div class="codewrapper">
  351. <pre><code class="lang-csharp hljs">int CursorStart()</code></pre>
  352. </div>
  353. <h5 class="returns">Returns</h5>
  354. <table class="table table-bordered table-striped table-condensed">
  355. <thead>
  356. <tr>
  357. <th>Type</th>
  358. <th>Description</th>
  359. </tr>
  360. </thead>
  361. <tbody>
  362. <tr>
  363. <td><span class="xref">System.Int32</span></td>
  364. <td>New cursor position.</td>
  365. </tr>
  366. </tbody>
  367. </table>
  368. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Delete_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Delete*"></a>
  369. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Delete_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Delete(System.Int32)">Delete(Int32)</h4>
  370. <div class="markdown level1 summary">
  371. Deletes the current character in <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  372. </div>
  373. <div class="markdown level1 conceptual"></div>
  374. <h5 class="decalaration">Declaration</h5>
  375. <div class="codewrapper">
  376. <pre><code class="lang-csharp hljs">bool Delete(int pos)</code></pre>
  377. </div>
  378. <h5 class="parameters">Parameters</h5>
  379. <table class="table table-bordered table-striped table-condensed">
  380. <thead>
  381. <tr>
  382. <th>Type</th>
  383. <th>Name</th>
  384. <th>Description</th>
  385. </tr>
  386. </thead>
  387. <tbody>
  388. <tr>
  389. <td><span class="xref">System.Int32</span></td>
  390. <td><span class="parametername">pos</span></td>
  391. <td></td>
  392. </tr>
  393. </tbody>
  394. </table>
  395. <h5 class="returns">Returns</h5>
  396. <table class="table table-bordered table-striped table-condensed">
  397. <thead>
  398. <tr>
  399. <th>Type</th>
  400. <th>Description</th>
  401. </tr>
  402. </thead>
  403. <tbody>
  404. <tr>
  405. <td><span class="xref">System.Boolean</span></td>
  406. <td>true if the character was successfully removed, otherwise false.</td>
  407. </tr>
  408. </tbody>
  409. </table>
  410. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_InsertAt_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.InsertAt*"></a>
  411. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_InsertAt_System_Char_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.InsertAt(System.Char,System.Int32)">InsertAt(Char, Int32)</h4>
  412. <div class="markdown level1 summary">
  413. Insert character <code data-dev-comment-type="paramref" class="paramref">ch</code> in position <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  414. </div>
  415. <div class="markdown level1 conceptual"></div>
  416. <h5 class="decalaration">Declaration</h5>
  417. <div class="codewrapper">
  418. <pre><code class="lang-csharp hljs">bool InsertAt(char ch, int pos)</code></pre>
  419. </div>
  420. <h5 class="parameters">Parameters</h5>
  421. <table class="table table-bordered table-striped table-condensed">
  422. <thead>
  423. <tr>
  424. <th>Type</th>
  425. <th>Name</th>
  426. <th>Description</th>
  427. </tr>
  428. </thead>
  429. <tbody>
  430. <tr>
  431. <td><span class="xref">System.Char</span></td>
  432. <td><span class="parametername">ch</span></td>
  433. <td></td>
  434. </tr>
  435. <tr>
  436. <td><span class="xref">System.Int32</span></td>
  437. <td><span class="parametername">pos</span></td>
  438. <td></td>
  439. </tr>
  440. </tbody>
  441. </table>
  442. <h5 class="returns">Returns</h5>
  443. <table class="table table-bordered table-striped table-condensed">
  444. <thead>
  445. <tr>
  446. <th>Type</th>
  447. <th>Description</th>
  448. </tr>
  449. </thead>
  450. <tbody>
  451. <tr>
  452. <td><span class="xref">System.Boolean</span></td>
  453. <td>true if the character was successfully inserted, otherwise false.</td>
  454. </tr>
  455. </tbody>
  456. </table>
  457. </article>
  458. </div>
  459. <div class="hidden-sm col-md-2" role="complementary">
  460. <div class="sideaffix">
  461. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  462. <h5>In This Article</h5>
  463. <div></div>
  464. </nav>
  465. </div>
  466. </div>
  467. </div>
  468. </div>
  469. <footer>
  470. <div class="grad-bottom"></div>
  471. <div class="footer">
  472. <div class="container">
  473. <span class="pull-right">
  474. <a href="#top">Back to top</a>
  475. </span>
  476. <span>Generated by <strong>DocFX</strong></span>
  477. </div>
  478. </div>
  479. </footer>
  480. </div>
  481. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  482. <script type="text/javascript" src="../../styles/docfx.js"></script>
  483. <script type="text/javascript" src="../../styles/main.js"></script>
  484. </body>
  485. </html>