Terminal.Gui.TextValidateProviders.ITextValidateProvider.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  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.56.7.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider">
  73. <h1 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider" class="text-break">Interface ITextValidateProvider
  74. </h1>
  75. <div class="markdown level0 summary">
  76. TextValidateField Providers Interface.
  77. All TextValidateField are created with a ITextValidateProvider.
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.TextValidateProviders.html">Terminal.Gui.TextValidateProviders</a></h6>
  81. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  82. <h5 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_syntax">Syntax</h5>
  83. <div class="codewrapper">
  84. <pre><code class="lang-csharp hljs">public interface ITextValidateProvider</code></pre>
  85. </div>
  86. <h3 id="properties">Properties
  87. </h3>
  88. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Fixed_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Fixed*"></a>
  89. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Fixed" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Fixed">Fixed</h4>
  90. <div class="markdown level1 summary">
  91. Set that this provider uses a fixed width.
  92. e.g. Masked ones are fixed.
  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">bool Fixed { 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">System.Boolean</span></td>
  110. <td></td>
  111. </tr>
  112. </tbody>
  113. </table>
  114. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_IsValid_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.IsValid*"></a>
  115. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_IsValid" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.IsValid">IsValid</h4>
  116. <div class="markdown level1 summary">
  117. True if the input is valid, otherwise false.
  118. </div>
  119. <div class="markdown level1 conceptual"></div>
  120. <h5 class="decalaration">Declaration</h5>
  121. <div class="codewrapper">
  122. <pre><code class="lang-csharp hljs">bool IsValid { get; }</code></pre>
  123. </div>
  124. <h5 class="propertyValue">Property Value</h5>
  125. <table class="table table-bordered table-striped table-condensed">
  126. <thead>
  127. <tr>
  128. <th>Type</th>
  129. <th>Description</th>
  130. </tr>
  131. </thead>
  132. <tbody>
  133. <tr>
  134. <td><span class="xref">System.Boolean</span></td>
  135. <td></td>
  136. </tr>
  137. </tbody>
  138. </table>
  139. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Mask_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Mask*"></a>
  140. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Mask" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Mask">Mask</h4>
  141. <div class="markdown level1 summary">
  142. Mask used for validation.
  143. Not always a mask, can by a regex expression.
  144. TODO: Maybe we can change the name.
  145. </div>
  146. <div class="markdown level1 conceptual"></div>
  147. <h5 class="decalaration">Declaration</h5>
  148. <div class="codewrapper">
  149. <pre><code class="lang-csharp hljs">ustring Mask { get; set; }</code></pre>
  150. </div>
  151. <h5 class="propertyValue">Property Value</h5>
  152. <table class="table table-bordered table-striped table-condensed">
  153. <thead>
  154. <tr>
  155. <th>Type</th>
  156. <th>Description</th>
  157. </tr>
  158. </thead>
  159. <tbody>
  160. <tr>
  161. <td><span class="xref">NStack.ustring</span></td>
  162. <td></td>
  163. </tr>
  164. </tbody>
  165. </table>
  166. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Text_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Text*"></a>
  167. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Text" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Text">Text</h4>
  168. <div class="markdown level1 summary">
  169. Set the input text, and get the formatted string for display.
  170. </div>
  171. <div class="markdown level1 conceptual"></div>
  172. <h5 class="decalaration">Declaration</h5>
  173. <div class="codewrapper">
  174. <pre><code class="lang-csharp hljs">ustring Text { get; set; }</code></pre>
  175. </div>
  176. <h5 class="propertyValue">Property Value</h5>
  177. <table class="table table-bordered table-striped table-condensed">
  178. <thead>
  179. <tr>
  180. <th>Type</th>
  181. <th>Description</th>
  182. </tr>
  183. </thead>
  184. <tbody>
  185. <tr>
  186. <td><span class="xref">NStack.ustring</span></td>
  187. <td></td>
  188. </tr>
  189. </tbody>
  190. </table>
  191. <h3 id="methods">Methods
  192. </h3>
  193. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Cursor_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Cursor*"></a>
  194. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Cursor_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Cursor(System.Int32)">Cursor(Int32)</h4>
  195. <div class="markdown level1 summary">
  196. Set Cursor position to <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  197. </div>
  198. <div class="markdown level1 conceptual"></div>
  199. <h5 class="decalaration">Declaration</h5>
  200. <div class="codewrapper">
  201. <pre><code class="lang-csharp hljs">int Cursor(int pos)</code></pre>
  202. </div>
  203. <h5 class="parameters">Parameters</h5>
  204. <table class="table table-bordered table-striped table-condensed">
  205. <thead>
  206. <tr>
  207. <th>Type</th>
  208. <th>Name</th>
  209. <th>Description</th>
  210. </tr>
  211. </thead>
  212. <tbody>
  213. <tr>
  214. <td><span class="xref">System.Int32</span></td>
  215. <td><span class="parametername">pos</span></td>
  216. <td></td>
  217. </tr>
  218. </tbody>
  219. </table>
  220. <h5 class="returns">Returns</h5>
  221. <table class="table table-bordered table-striped table-condensed">
  222. <thead>
  223. <tr>
  224. <th>Type</th>
  225. <th>Description</th>
  226. </tr>
  227. </thead>
  228. <tbody>
  229. <tr>
  230. <td><span class="xref">System.Int32</span></td>
  231. <td>Return first valid position.</td>
  232. </tr>
  233. </tbody>
  234. </table>
  235. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorEnd_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorEnd*"></a>
  236. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorEnd" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorEnd">CursorEnd()</h4>
  237. <div class="markdown level1 summary">
  238. Find the last valid character position.
  239. </div>
  240. <div class="markdown level1 conceptual"></div>
  241. <h5 class="decalaration">Declaration</h5>
  242. <div class="codewrapper">
  243. <pre><code class="lang-csharp hljs">int CursorEnd()</code></pre>
  244. </div>
  245. <h5 class="returns">Returns</h5>
  246. <table class="table table-bordered table-striped table-condensed">
  247. <thead>
  248. <tr>
  249. <th>Type</th>
  250. <th>Description</th>
  251. </tr>
  252. </thead>
  253. <tbody>
  254. <tr>
  255. <td><span class="xref">System.Int32</span></td>
  256. <td>New cursor position.</td>
  257. </tr>
  258. </tbody>
  259. </table>
  260. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorLeft_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorLeft*"></a>
  261. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorLeft_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorLeft(System.Int32)">CursorLeft(Int32)</h4>
  262. <div class="markdown level1 summary">
  263. First valid position before <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  264. </div>
  265. <div class="markdown level1 conceptual"></div>
  266. <h5 class="decalaration">Declaration</h5>
  267. <div class="codewrapper">
  268. <pre><code class="lang-csharp hljs">int CursorLeft(int pos)</code></pre>
  269. </div>
  270. <h5 class="parameters">Parameters</h5>
  271. <table class="table table-bordered table-striped table-condensed">
  272. <thead>
  273. <tr>
  274. <th>Type</th>
  275. <th>Name</th>
  276. <th>Description</th>
  277. </tr>
  278. </thead>
  279. <tbody>
  280. <tr>
  281. <td><span class="xref">System.Int32</span></td>
  282. <td><span class="parametername">pos</span></td>
  283. <td></td>
  284. </tr>
  285. </tbody>
  286. </table>
  287. <h5 class="returns">Returns</h5>
  288. <table class="table table-bordered table-striped table-condensed">
  289. <thead>
  290. <tr>
  291. <th>Type</th>
  292. <th>Description</th>
  293. </tr>
  294. </thead>
  295. <tbody>
  296. <tr>
  297. <td><span class="xref">System.Int32</span></td>
  298. <td>New cursor position if any, otherwise returns <code data-dev-comment-type="paramref" class="paramref">pos</code></td>
  299. </tr>
  300. </tbody>
  301. </table>
  302. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorRight_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorRight*"></a>
  303. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorRight_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorRight(System.Int32)">CursorRight(Int32)</h4>
  304. <div class="markdown level1 summary">
  305. First valid position after <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  306. </div>
  307. <div class="markdown level1 conceptual"></div>
  308. <h5 class="decalaration">Declaration</h5>
  309. <div class="codewrapper">
  310. <pre><code class="lang-csharp hljs">int CursorRight(int pos)</code></pre>
  311. </div>
  312. <h5 class="parameters">Parameters</h5>
  313. <table class="table table-bordered table-striped table-condensed">
  314. <thead>
  315. <tr>
  316. <th>Type</th>
  317. <th>Name</th>
  318. <th>Description</th>
  319. </tr>
  320. </thead>
  321. <tbody>
  322. <tr>
  323. <td><span class="xref">System.Int32</span></td>
  324. <td><span class="parametername">pos</span></td>
  325. <td>Current position.</td>
  326. </tr>
  327. </tbody>
  328. </table>
  329. <h5 class="returns">Returns</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.Int32</span></td>
  340. <td>New cursor position if any, otherwise returns <code data-dev-comment-type="paramref" class="paramref">pos</code></td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorStart_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorStart*"></a>
  345. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_CursorStart" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.CursorStart">CursorStart()</h4>
  346. <div class="markdown level1 summary">
  347. Find the first valid character position.
  348. </div>
  349. <div class="markdown level1 conceptual"></div>
  350. <h5 class="decalaration">Declaration</h5>
  351. <div class="codewrapper">
  352. <pre><code class="lang-csharp hljs">int CursorStart()</code></pre>
  353. </div>
  354. <h5 class="returns">Returns</h5>
  355. <table class="table table-bordered table-striped table-condensed">
  356. <thead>
  357. <tr>
  358. <th>Type</th>
  359. <th>Description</th>
  360. </tr>
  361. </thead>
  362. <tbody>
  363. <tr>
  364. <td><span class="xref">System.Int32</span></td>
  365. <td>New cursor position.</td>
  366. </tr>
  367. </tbody>
  368. </table>
  369. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Delete_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Delete*"></a>
  370. <h4 id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_Delete_System_Int32_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.Delete(System.Int32)">Delete(Int32)</h4>
  371. <div class="markdown level1 summary">
  372. Deletes the current character in <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  373. </div>
  374. <div class="markdown level1 conceptual"></div>
  375. <h5 class="decalaration">Declaration</h5>
  376. <div class="codewrapper">
  377. <pre><code class="lang-csharp hljs">bool Delete(int pos)</code></pre>
  378. </div>
  379. <h5 class="parameters">Parameters</h5>
  380. <table class="table table-bordered table-striped table-condensed">
  381. <thead>
  382. <tr>
  383. <th>Type</th>
  384. <th>Name</th>
  385. <th>Description</th>
  386. </tr>
  387. </thead>
  388. <tbody>
  389. <tr>
  390. <td><span class="xref">System.Int32</span></td>
  391. <td><span class="parametername">pos</span></td>
  392. <td></td>
  393. </tr>
  394. </tbody>
  395. </table>
  396. <h5 class="returns">Returns</h5>
  397. <table class="table table-bordered table-striped table-condensed">
  398. <thead>
  399. <tr>
  400. <th>Type</th>
  401. <th>Description</th>
  402. </tr>
  403. </thead>
  404. <tbody>
  405. <tr>
  406. <td><span class="xref">System.Boolean</span></td>
  407. <td>true if the character was successfully removed, otherwise false.</td>
  408. </tr>
  409. </tbody>
  410. </table>
  411. <a id="Terminal_Gui_TextValidateProviders_ITextValidateProvider_InsertAt_" data-uid="Terminal.Gui.TextValidateProviders.ITextValidateProvider.InsertAt*"></a>
  412. <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>
  413. <div class="markdown level1 summary">
  414. Insert character <code data-dev-comment-type="paramref" class="paramref">ch</code> in position <code data-dev-comment-type="paramref" class="paramref">pos</code>.
  415. </div>
  416. <div class="markdown level1 conceptual"></div>
  417. <h5 class="decalaration">Declaration</h5>
  418. <div class="codewrapper">
  419. <pre><code class="lang-csharp hljs">bool InsertAt(char ch, int pos)</code></pre>
  420. </div>
  421. <h5 class="parameters">Parameters</h5>
  422. <table class="table table-bordered table-striped table-condensed">
  423. <thead>
  424. <tr>
  425. <th>Type</th>
  426. <th>Name</th>
  427. <th>Description</th>
  428. </tr>
  429. </thead>
  430. <tbody>
  431. <tr>
  432. <td><span class="xref">System.Char</span></td>
  433. <td><span class="parametername">ch</span></td>
  434. <td></td>
  435. </tr>
  436. <tr>
  437. <td><span class="xref">System.Int32</span></td>
  438. <td><span class="parametername">pos</span></td>
  439. <td></td>
  440. </tr>
  441. </tbody>
  442. </table>
  443. <h5 class="returns">Returns</h5>
  444. <table class="table table-bordered table-striped table-condensed">
  445. <thead>
  446. <tr>
  447. <th>Type</th>
  448. <th>Description</th>
  449. </tr>
  450. </thead>
  451. <tbody>
  452. <tr>
  453. <td><span class="xref">System.Boolean</span></td>
  454. <td>true if the character was successfully inserted, otherwise false.</td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. </article>
  459. </div>
  460. <div class="hidden-sm col-md-2" role="complementary">
  461. <div class="sideaffix">
  462. <div class="contribution">
  463. <ul class="nav">
  464. </ul>
  465. </div>
  466. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  467. <h5>In This Article</h5>
  468. <div></div>
  469. </nav>
  470. </div>
  471. </div>
  472. </div>
  473. </div>
  474. <footer>
  475. <div class="grad-bottom"></div>
  476. <div class="footer">
  477. <div class="container">
  478. <span class="pull-right">
  479. <a href="#top">Back to top</a>
  480. </span>
  481. <span>Generated by <strong>DocFX</strong></span>
  482. </div>
  483. </div>
  484. </footer>
  485. </div>
  486. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  487. <script type="text/javascript" src="../../styles/docfx.js"></script>
  488. <script type="text/javascript" src="../../styles/main.js"></script>
  489. </body>
  490. </html>