File: textstrings.xml

package info (click to toggle)
lazarus 4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 275,760 kB
  • sloc: pascal: 2,341,904; xml: 509,420; makefile: 348,726; cpp: 93,608; sh: 3,387; java: 609; perl: 297; sql: 222; ansic: 137
file content (1013 lines) | stat: -rw-r--r-- 32,904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
<?xml version="1.0" encoding="UTF-8"?>
<!--

Documentation for LCL (Lazarus Component Library) and LazUtils (Lazarus 
Utilities) are published under the Creative Commons Attribution-ShareAlike 4.0 
International public license.

https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt
https://gitlab.com/freepascal.org/lazarus/lazarus/-/blob/main/docs/cc-by-sa-4-0.txt

Copyright (c) 1997-2025, by the Lazarus Development Team.

-->
<fpdoc-descriptions>
<package name="lazutils">
<!--
====================================================================
TextStrings
====================================================================
-->
<module name="TextStrings">
<short>
<var>TTextStrings</var> describes TStrings descendants optimized for handling 
their complete text as a whole (instead of line by line).
</short>
<descr>
<p>
<file>textstrings.pas</file> contains <var>TStrings</var> descendants 
optimized for handling their complete text as a whole (instead of line by 
line).
</p>
<p>
<file>textstrings.pas</file> is part of the <file>lazutils</file> package.
</p>
</descr>

<!-- unresolved type references -->
<element name="Classes"/>
<element name="SysUtils"/>
<element name="LazUtilsStrConsts"/>

<element name="TTextLineRange">
<short>
<var>TTextLineRange</var> - record structure showing start and end of line in 
text, the line as a string, and any user data.
</short>
<descr>
<var>TTextLineRange</var> is a record type with information about lines of 
text in the TTextStrings component.
</descr>
<seealso>
<link id="TTextStrings"/>
<link id="#rtl.classes.TStrings.Strings">TStrings.Strings</link>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
</seealso>
</element>
<element name="TTextLineRange.StartPos">
<short>Offset to the start of the line in Text.</short>
</element>
<element name="TTextLineRange.EndPos">
<short>End of the line in Text (the end-of-line sequence).</short>
</element>
<element name="TTextLineRange.Line">
<short>Cached line as a String type.</short>
</element>
<element name="TTextLineRange.TheObject">
<short>User object.</short>
</element>

<element name="PTextLineRange">
<short>Pointer to a TTextLineRange type.</short>
</element>

<element name="TCustomMemoStrings">
<short>Implements a string list used in Memo controls.</short>
<descr>
<p>
<var>TCustomMemoStrings</var> is a <var>TStrings</var> descendant which works 
around the behavior of <var>TMemo.Lines</var>. In TMemo, Lines contains the 
text with wordwrap line endings. TCustomMemoStrings stores the text in an LFM 
without those wordwrap line endings.
</p>
</descr>
<seealso>
<link id="TTextStrings"/>
<link id="#rtl.classes.TStrings">TStrings</link>
<link id="#lcl.stdctrls.TCustomMemo">TCustomMemo</link>
<link id="#lcl.stdctrls.TMemo">TMemo</link>
</seealso>
</element>

<element name="TCustomMemoStrings.DoReadData">
<short>Reads and stores the values used in the Strings property.</short>
<descr>
Used to read values for the component during LCL component streaming.
</descr>
<seealso/>
</element>
<element name="TCustomMemoStrings.DoReadData.Reader">
<short>TReader instance used to load the values for the component.</short>
</element>

<element name="TCustomMemoStrings.DoWriteData">
<short>Writes the values in the Strings property.</short>
<descr>
Used to write values for the component during LCL component streaming.
</descr>
<seealso/>
</element>
<element name="TCustomMemoStrings.DoWriteData.Writer">
<short>TWriter instance used to write the values in the component.</short>
</element>

<element name="TCustomMemoStrings.DefineProperties">
<short>
Defines the Strings property and the read and write procedures for its data.
</short>
<descr/>
<seealso/>
</element>
<element name="TCustomMemoStrings.DefineProperties.Filer">
<short>TFiler instance used to read or write values for the component.</short>
</element>

<element name="TTextStrings">
<short>
Implements a string list optimized to handle the complete text as a whole 
(instead of line by line as in <var>TStringList</var>).
</short>
<descr>
<p>
TTextStrings is a <var>TCustomMemoStrings</var> descendant which implements a 
string list optimized for handling the complete text in the list (rather than 
on a line by line basis).
</p>
<p>
The ancestor class ensures that lines of text with wordwrap line endings are 
handled in the component. TTextString uses an internal array of 
<var>TTextLineRange</var> instances to represent the lines of text. 
Overridden methods are provided to ensure that the internal line ranges are 
used to implement property values.
</p>
<p>
TTextStrings is the type instantiated for use in the <var>Lines</var> 
property in <var>TCustomMemo</var>.
</p>
</descr>
<seealso>
<link id="TCustomMemoStrings"/>
<link id="#lcl.stdctrls.TCustomMemo.Create">TCustomMemo.Create</link>
<link id="#lcl.stdctrls.TMemo">TMemo</link>
</seealso>
</element>

<element name="TTextStrings.FOnChange"/>
<element name="TTextStrings.FOnChanging"/>

<element name="TTextStrings.FArraysValid">
<short>
Boolean flag which indicates whether the array of line ranges is valid.
</short>
</element>

<element name="TTextStrings.FLineCount">
<short>Number of lines in the array of line ranges.</short>
</element>

<element name="TTextStrings.FLineCapacity">
<short>Number of line ranges allocated for the component.</short>
</element>

<element name="TTextStrings.FLineRanges">
<short>
Pointer to an array of <var>TTextLineRange</var> instances used for the 
Strings in the component.
</short>
</element>

<element name="TTextStrings.FText">
<short>Member variable used to store the Text in the component.</short>
</element>

<element name="TTextStrings.FUpdateCount">
<short>
Number of times BeginUpdate has been called without a corresponding EndUpdate.
</short>
</element>

<element name="TTextStrings.FChangedWhileUpdate">
<short>Indicates if Changed was called after calling BeginUpdate.</short>
</element>

<element name="TTextStrings.GetTextStr">
<short>Gets the value for the Text property.</short>
<descr>
<p>
Overridden to re-implement the method from the ancestor class.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.Text">TStrings.Text</link>
</seealso>
</element>
<element name="TTextStrings.GetTextStr.Result">
<short>Value for the Text property.</short>
</element>

<element name="TTextStrings.SetTextStr">
<short>Sets the value for the Text property.</short>
<descr>
<p>
Overridden to re-implement the method from the ancestor class.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.Text">TStrings.Text</link>
</seealso>
</element>
<element name="TTextStrings.SetTextStr.AValue">
<short>New value for the Text property.</short>
</element>

<element name="TTextStrings.BuildArrays">
<short>
Clears and builds the array with the line ranges for the values in Text.
</short>
<descr>
<p>
<var>BuildArrays</var> is a method used to clear and build the internal array 
with the line ranges for the values in <var>Text</var>. BuildArrays detects 
the number of end-of-line sequences in Text, allocates memory for the dynamic 
array, and fills the <var>TTextLineRange</var> instances with their values.
</p>
<p>
BuildArrays is called from methods used to read or write values in the 
<var>Strings</var>, <var>Objects</var>, or <var>Count</var> properties. It is 
called when the internal flag that indicates the array is valid has not been 
set.
</p>
</descr>
<seealso>
<link id="TTextStrings.ClearArrays"/>
<link id="TTextStrings.Text"/>
<link id="TTextStrings.GetCount"/>
<link id="TTextStrings.GetLineEnd"/>
<link id="TTextStrings.Insert"/>
<link id="TTextStrings.Delete"/>
<link id="TTextStrings.Exchange"/>
<link id="TTextStrings.Move"/>
<link id="TTextStrings.AddObject"/>
<link id="TTextStrings.AddStrings"/>
<link id="TTextLineRange"/>
<link id="#rtl.classes.TStrings.Strings">TStrings.Strings</link>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
<link id="#rtl.classes.TStrings.Count">TStrings.Count</link>
</seealso>
</element>

<element name="TTextStrings.GetCount">
<short>Gets the value for the Count property.</short>
<descr>
<p>
<var>GetCount</var> is overridden in <var>TTextStrings</var> to re-implement 
the method. It ensures that the internal array of line ranges is valid, and 
calls <var>BuildArrays</var> when the validity flag has not been set.
</p>
<p>
The property value is set to the member value used to store the line count.
</p>
<p>
GetCount does not call the inherited method.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.Count">TStrings.Count</link>
</seealso>
</element>
<element name="TTextStrings.GetCount.Result">
<short>Value for the property.</short>
</element>

<element name="TTextStrings.Changed">
<short>Performs actions needed after the value in Text is changed.</short>
<descr>
<p>
<var>Changed</var> is a method used to perform actions needed <b>after</b> 
the value in the <var>Text</var> property has been changed. If 
<var>BeginUpdate</var> has been called without a corresponding 
<var>EndUpdate</var> call, no actions are performed in the method. Otherwise, 
the <var>OnChange</var> event handler is signalled (when assigned).
</p>
<p>
Changed is called from the EndUpdate method when Text was modified following 
assignments to property values.
</p>
</descr>
<seealso/>
</element>

<element name="TTextStrings.Changing">
<short>
Performs action needed when properties in the component are being updated.
</short>
<descr>
<p>
<var>Changing</var> is a method used to perform actions needed when property 
values in the component are being updated. It mimics the Changing behavior 
implemented in <var>TStringList</var>, where methods call Changing prior to 
updates to the <var>Strings</var> or <var>Objects</var> properties.
</p>
<p>
In <var>TTextStrings</var>, the method signals the <var>OnChanging</var> 
event handler (when assigned) if there are no updates already in progress.
</p>
<p>
See <var>Changed</var> for the actions performed after property values have 
been updated.
</p>
</descr>
<seealso>
<link id="TTextStrings.OnChanging"/>
<link id="TTextStrings.Changed"/>
<link id="TTextStrings.Clear"/>
<link id="#rtl.classes.TStrings.Strings">TStrings.Strings</link>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
</seealso>
</element>

<element name="TTextStrings.Get">
<short>Gets the value for the indexed Strings property.</short>
<descr/>
<seealso>
<link id="#rtl.classes.TStrings.Strings">TStrings.Strings</link>
</seealso>
</element>
<element name="TTextStrings.Get.Result">
<short>Value for the indexed property.</short>
</element>
<element name="TTextStrings.Get.Index">
<short>Ordinal position for the property value.</short>
</element>

<element name="TTextStrings.ClearArrays">
<short>Clears the internal array of line ranges used in the component.</short>
<descr>
<p>
<var>ClearArrays</var> is a method used to free resources allocated to the 
internal array with the line ranges for the component. ClearArrays frees 
memory allocated for the <var>TTextLineRange</var> instances in the array, 
and sets the references to <b>Nil</b>.
</p>
<p>
The internal validity flag and the line counter are both reset to indicate 
that the array has not not been allocated.
</p>
<p>
ClearArrays is called from the <var>BuildArrays</var>, <var>Clear</var>, and 
<var>AddStrings</var> methods.
</p>
</descr>
<seealso>
<link id="TTextStrings.BuildArrays"/>
<link id="TTextStrings.Clear"/>
<link id="TTextStrings.AddStrings"/>
<link id="TTextLineRange"/>
</seealso>
</element>

<element name="TTextStrings.GetObject">
<short>Gets the value for the indexed Objects property.</short>
<descr/>
<seealso>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
</seealso>
</element>
<element name="TTextStrings.GetObject.Result">
<short>Value for the indexed property.</short>
</element>
<element name="TTextStrings.GetObject.Index">
<short>Ordinal position in Objects with the property value.</short>
</element>

<element name="TTextStrings.Put">
<short>Sets the value for the indexed Strings property.</short>
<descr/>
<seealso>
<link id="#rtl.classes.TStrings.Strings">TStrings.Strings</link>
</seealso>
</element>
<element name="TTextStrings.Put.Index">
<short>Ordinal position for the new property value.</short>
</element>
<element name="TTextStrings.Put.S">
<short>New value in the indexed property.</short>
</element>

<element name="TTextStrings.PutObject">
<short>Sets a value in the indexed Objects property.</short>
<descr/>
<seealso/>
</element>
<element name="TTextStrings.PutObject.Index">
<short>Ordinal position for the indexed property value.</short>
</element>
<element name="TTextStrings.PutObject.AnObject">
<short>TObject instance stored in the indexed property.</short>
</element>

<element name="TTextStrings.GetLineLen">
<short>
Gets the length of a line (including optional end-of-line characters) at the 
specified position.
</short>
<descr/>
<seealso/>
</element>
<element name="TTextStrings.GetLineLen.Result">
<short>Length of the specified line.</short>
</element>
<element name="TTextStrings.GetLineLen.Index">
<short>Ordinal position for the line examined in the method.</short>
</element>
<element name="TTextStrings.GetLineLen.IncludeNewLineChars">
<short>
<b>True</b> to include end-of-line characters in the line length.
</short>
</element>

<element name="TTextStrings.GetLineEnd">
<short>
Gets the ordinal position where the specified line ends in the Text property.
</short>
<descr>
Calls BuildArrays if the internal validity flag is not set.
</descr>
<seealso/>
</element>
<element name="TTextStrings.GetLineEnd.Result">
<short>Offset in Text where the end of the specified line is located.</short>
</element>
<element name="TTextStrings.GetLineEnd.Index">
<short>Ordinal position for the line examined in the method.</short>
</element>
<element name="TTextStrings.GetLineEnd.IncludeNewLineChars">
<short>
<b>True</b> to include end-of-line character(s) in the return value.
</short>
</element>

<element name="TTextStrings.CountLineEndings">
<short>
Gets the number of end-of-line sequences found in the specified string.
</short>
<descr/>
<seealso/>
</element>
<element name="TTextStrings.CountLineEndings.Result">
<short>Number of end-of-line sequences found in s.</short>
</element>
<element name="TTextStrings.CountLineEndings.s">
<short>String with the values examined in the method.</short>
</element>

<element name="TTextStrings.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the overridden constructor for the class instance, and 
calls the inherited method on entry. Create calls the 
<var>CheckSpecialChars</var> method (in the ancestor) to ensure that default 
values have assigned for the following properties:
</p>
<ul>
<li>QuoteChar (")</li>
<li>Delimiter (,)</li>
<li>NameValueSeparator (=)</li>
<li>TextLineBreakStyle (platform specific)</li>
</ul>
</descr>
<seealso/>
</element>

<element name="TTextStrings.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the overridden destructor for the class instance. It 
calls the <var>Clear</var> method to remove the values in the component, and 
free the resources allocated to the internal array of line ranges.
</p>
<p>
Destroy calls the inherited destructor prior to exiting from the method.
</p>
</descr>
<seealso>
<link id="TTextStrings.Clear"/>
<link id="#rtl.classes.TStrings.Destroy">TStrings.Destroy</link>
</seealso>
</element>

<element name="TTextStrings.Clear">
<short>Clears the text and internal line ranges for the component.</short>
<descr>
<p>
<var>Clear</var> is an overridden method which implements the abstract 
virtual method declared in the ancestor. It is used to remove the 
<var>Text</var> and line range information used in the component.
</p>
<p>
Clear calls the <var>ClearArrays</var> method to free 
<var>TTextLineRange</var> resources allocated to the internal dynamic array. 
The internal line counter is reset to <b>0</b> (<b>zero</b>), and the Text 
property is set to an empty string (<b>''</b>).
</p>
<p>
Clear is called when the component is freed, and before reading string values 
in the LCL component streaming mechanism.
</p>
</descr>
<seealso>
<link id="TTextStrings.Text"/>
<link id="TTextStrings.ClearArrays"/>
<link id="TTextStrings.Destroy"/>
<link id="TTextLineRange"/>
<link id="TCustomMemoStrings"/>
<link id="#rtl.classes.TStrings.Clear">TStrings.Clear</link>
</seealso>
</element>

<element name="TTextStrings.SetText">
<short>Sets the value for the Text property from a PChar type.</short>
<descr>
<p>
<var>SetText</var> is an overridden method used to set the value for the 
<var>Text</var> property using the specified <var>PChar</var> value.
</p>
<p>
SetText stores the value in <var>TheText</var> to the member used for the 
Text property. It also resets the internal validity flag for the array of of 
line ranges. This forces the <var>TTextLineRange</var> instances to be 
re-populated during the next read access to <var>Strings</var> or 
<var>Objects</var>.
</p>
<p>
SetText re-implements the method from the ancestor, and does <b>not</b> call 
the inherited method.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.SetText">TStrings.SetText</link>
</seealso>
</element>
<element name="TTextStrings.SetText.TheText">
<short>New value for the property.</short>
</element>

<element name="TTextStrings.Insert">
<short>Inserts the line of text in S at the specified position.</short>
<descr>
<p>
<var>Insert</var> is an overridden method used to insert the line of text in 
S at the position specified in Index.
</p>
<p>
<var>Index</var> contains the ordinal position in Strings where the line of 
text is inserted. Index must be in the range <b>0..<var>Count</var>-1</b> or 
an <var>EListError</var> exception is raised.
</p>
<p>
<var>S</var> contains the line of text inserted in the method. S can contain 
an end-of-line sequence, but it is not required. The <var>LineEnding</var> 
for the platform is appended to the value in S if it is not already present.
</p>
<p>
Insert calls <var>BuildArrays</var> to populate the array of TTextLineRange 
instances when the internal validity flag is not set. It also ensures that 
the internal array is re-allocated when the number of lines reaches the line 
capacity. Line capacity starts at eight (<b>8</b>), and doubles each time the 
capacity is filled.
</p>
<p>
Memory allocated for the TTextLineRange instances is shifted when Index is 
not the last line of text in the component. The text in S, and the start and 
end positions in Text are stored in the line range information. The range 
information for lines after Index is adjusted to reflect the length of the 
inserted text.
</p>
<p>
Insert re-implements the method defined in the ancestor, and does <b>not</b> 
call the inherited method.
</p>
<p>
Use <var>Add</var> or <var>AddStrings</var> to append one or more lines of 
text to the values in Strings.
</p>
</descr>
<errors>
Raises an EListError exception if Index contains an invalild position in the 
list of string values.
</errors>
<seealso>
<link id="#rtl.classes.TStrings.Insert">TStrings.Insert</link>
</seealso>
</element>
<element name="TTextStrings.Insert.Index">
<short>Ordinal position where the line of text is inserted.</short>
</element>
<element name="TTextStrings.Insert.S">
<short>Value for the line of text inserted in the method.</short>
</element>

<element name="TTextStrings.Delete">
<short>Deletes the line of text at the specified position.</short>
<descr>
<p>
<var>Delete</var> is an overridden method used to delete the line of text at 
the specified position. <var>BuildArrays</var> is called to populate the 
internal array of <var>TTextLineRange</var> instances when the internal 
validity flag is not set.
</p>
<p>
<var>Index</var> contains the ordinal position in <var>Strings</var> for the 
line of text removed in the method. Index must be in the range 
<b>0..<var>Count</var>-1</b> or an <var>EStringListError</var> exception is 
raised.
</p>
<p>
Line range information is used to adjust both <var>Text</var> and the 
internal array of TTextLineRange instance. The line, including end-of-line 
characters, is removed from Text. The line counter is decremented, and the 
array of line ranges is updated. Line ranges after Index are updated to move 
their start and end positions downward by the length of the removed line. The 
memory at the end of the line ranges is zero-filled to prevent corruption.
</p>
</descr>
<errors>
Raises an EStringListError exception when Index is not a valid position in 
the list of string values.
</errors>
<seealso>
<link id="TTextStrings.BuildArrays"/>
<link id="TTextStrings.Text"/>
<link id="TTextLineRange"/>
<link id="EStringListError"/>
<link id="#rtl.classes.TStrings.Count">TStrings.Count</link>
<link id="#rtl.classes.TStrings.Delete">TStrings.Delete</link>
<link id="#rtl.classes.TStrings.Strings">TStrings.Strings</link>
</seealso>
</element>
<element name="TTextStrings.Delete.Index">
<short>
Ordinal position for the value removed from the Strings property.
</short>
</element>

<element name="TTextStrings.Exchange">
<short>Swaps the line values at the specified positions.</short>
<descr>
<p>
<var>Exchange</var> is an overridden method used to swap the line values at 
the positions specified in Index1 and Index2. No actions are performed in the 
method when Index1 and Index2 contain the same value.
</p>
<p>
Values in Index1 and Index2 must be in the range 0..Count-1 or an 
EStringListError exception is raised.
</p>
<p>
<var>BuildArrays</var> is called to populate the internal array of 
<var>TTextLineRange</var> instances when the internal validity flag is not 
set. <var>MakeTextBufferUnique</var> is called to ensure that the reference 
count for the <var>Text</var> member is <b>1</b>.
</p>
<p>
When <var>Index2</var> is the last line of text, a LineEnding sequence is 
added to Text when not already present.
</p>
<p>
GetLineLen is called to get the length for both lines including end-of-line 
characters. Temporary buffers are allocated for both TTextLineRange 
instances, and a memory buffer is allocated using the size for the larger of 
the two lines. The largest line is saved to the memory buffer, and used to 
shift the values in Text as needed. Range information for lines between 
Index1 and Index2 are adjusted to reflect their new start and end positions.
</p>
<p>
Exchange also swaps the values in the Objects property at the specified index 
positions.
</p>
<p>
Exchange re-implements the method defined in the ancestor, and does 
<b>not</b> call the inherited method.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.Exchange">TStrings.Exchange</link>
</seealso>
</element>
<element name="TTextStrings.Exchange.Index1">
<short>First position for the value exchange.</short>
</element>
<element name="TTextStrings.Exchange.Index2">
<short>Second position for the value exchange.</short>
</element>

<element name="TTextStrings.Move">
<short>
Moves a String value from the current position to the new position.
</short>
<descr/>
<seealso>
<link id="#rtl.classes.TStrings.Move">TStrings.Move</link>
</seealso>
</element>
<element name="TTextStrings.Move.CurIndex">
<short>Current ordinal position for the string.</short>
</element>
<element name="TTextStrings.Move.NewIndex">
<short>New ordinal position for the string.</short>
</element>

<element name="TTextStrings.MakeTextBufferUnique">
<short>Ensures that the reference count for the Text member is 1.</short>
<descr>
<p>
Calls the UniqueString routine from the RTL <file>system</file> unit.
</p>
</descr>
<seealso>
<link id="#rtl.system.UniqueString">UniqueString</link>
</seealso>
</element>

<element name="TTextStrings.BeginUpdate">
<short>Starts an update process for the component.</short>
<descr>
<p>
<var>BeginUpdate</var> is a method used to start an update process for the 
component. It increments an internal update counter used to consolidate 
<var>OnChanging</var> and <var>OnChange</var> event notifications. The 
counter value is used in the <var>Changing</var> and <var>Changed</var> 
methods, and controls when the event notifications are enabled and performed.
</p>
<p>
Use EndUpdate to decrement the internal update counter.
</p>
</descr>
<seealso>
<link id="TTextStrings.OnChanging"/>
<link id="TTextStrings.OnChange"/>
<link id="TTextStrings.Changing"/>
<link id="TTextStrings.Changed"/>
<link id="TTextStrings.EndUpdate"/>
<link id="#rtl.classes.TStrings.BeginUpdate">TStrings.BeginUpdate</link>
</seealso>
</element>

<element name="TTextStrings.EndUpdate">
<short>Finishes an update process for the component.</short>
<descr>
<p>
<var>EndUpdate</var> is a method used to finish an active update process for 
the component.
</p>
<p>
For each call to <var>BeginUpdate</var>, there needs to be a corresponding 
call to EndUpdate. The methods are used as a pair to consolidate 
<var>OnChanging</var> and <var>OnChange</var> event notifications.
</p>
<p>
EndUpdate decrements the internal update counter incremented by calling 
BeginUpdate. When the update counter is a positive non-zero value, the 
<var>Changed</var> method is not called and the <var>OnChange</var> event 
handler is not signalled.
</p>
<p>
An <var>Exception</var> is raised if the internal update counter is &lt;= 0 
when the method is called. When the counter value reaches 0, the Changed 
method is called to signal the OnChange event handler (when assigned).
</p>
<p>
Use BeginUpdate to start an update process by incrementing the value for the 
internal counter.
</p>
</descr>
<errors>
Raises an Exception if the internal update counter is &lt;;= 0 when the 
method is called.
</errors>
<seealso>
<link id="TTextStrings.BeginUpdate"/>
<link id="#rtl.classes.TStrings.EndUpdate">TStrings.EndUpdate</link>
</seealso>
</element>

<element name="TTextStrings.GetText">
<short>Gets the value for the Text property as a PChar type.</short>
<descr/>
<seealso>
<link id="TTextStrings.Text"/>
<link id="#rtl.classes.TStrings.GetText">TStrings.GetText</link>
</seealso>
</element>
<element name="TTextStrings.GetText.Result">
<short>Value for the property as a PChar type.</short>
</element>

<element name="TTextStrings.IndexOf">
<short>Gets the ordinal position for the specified String value.</short>
<descr/>
<seealso>
<link id="#rtl.classes.TStrings.IndexOf">TStrings.IndexOf</link>
</seealso>
</element>
<element name="TTextStrings.IndexOf.Result">
<short>Ordinal position for the requested value.</short>
</element>
<element name="TTextStrings.IndexOf.S">
<short>Value to locate in the method.</short>
</element>

<element name="TTextStrings.Add">
<short>Appends the specified text to the values in Strings.</short>
<descr>
<p>
Calls <var>AddObject</var> to append the value in <var>S</var>. <b>Nil</b> is 
used as the value for the object parameter.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.Add">TStrings.Add</link>
</seealso>
</element>
<element name="TTextStrings.Add.Result">
<short>Ordinal position in Strings where the value was stored.</short>
</element>
<element name="TTextStrings.Add.S">
<short>String appended to the Strings property.</short>
</element>

<element name="TTextStrings.AddObject">
<short>Adds a String and Object pair to the string list.</short>
<descr>
<p>
Adds a <var>LineEnding</var> if the value in <var>Text</var> does not already 
end with one of the end-of-line characters.
</p>
<p>
Calls <var>BuildArrays</var> when an object instance has been assigned to 
<var>AObject</var>.
</p>
<p>
Recalculates the number of lines in the internal line ranges array. If the 
number of lines is larger than the current capacity for the array, the 
capacity is doubled. The memory for the line range array is re-allocated to 
the new capacity, and the unused portion is zero-filled.
</p>
<p>
The value in AObject is stored in the <var>TTextLineRange</var> instance for 
the new line. The start and end positions, and the text are stored in the 
line range information.
</p>
<p>
The internal line count is incremented prior to exiting from the method.
</p>
</descr>
<seealso/>
</element>
<element name="TTextStrings.AddObject.Result">
<short>Ordinal position where the string and object were stored.</short>
</element>
<element name="TTextStrings.AddObject.S">
<short>String value added to component.</short>
</element>
<element name="TTextStrings.AddObject.AObject">
<short>TObject instance (or Nil) added to the component.</short>
</element>

<element name="TTextStrings.AddStrings">
<short>
Adds the lines of text in TheStrings to the current class instance.
</short>
<descr>
<p>
<var>AddStrings</var> is an overridden method in <var>TTextStrings</var> used 
to add the lines of text in <var>TheStrings</var> to the current class 
instance. No actions are performed in the method when <var>TheStrings</var> 
does not contain any lines of text.
</p>
<p>
Builds (or re-builds) the internal array of line ranges for the class 
instance. Values from the Objects property in TheStrings are also copied in 
the method.
</p>
</descr>
<seealso>
<link id="TTextStrings.AddObject"/>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
<link id="#rtl.classes.TStrings.AddStrings">TStrings.AddStrings</link>
</seealso>
</element>
<element name="TTextStrings.AddStrings.TheStrings">
<short>String list with the values added in the method.</short>
</element>

<element name="TTextStrings.LoadFromFile">
<short>
Loads the content in the string list from the specified file name.
</short>
<descr>
<p>
Creates a temporary <var>TFileStream</var> instance for the 
<var>FileName</var> argument. The file handle is opened for reading, and 
shared write access is denied. The inherited <var>LoadFromStream</var> method 
is called to load the values in the string list from the file stream.
</p>
</descr>
<seealso>
<link id="TTextStrings.SaveToFile"/>
<link id="#rtl.classes.TStrings.LoadFromFile">TStrings.LoadFromFile</link>
</seealso>
</element>
<element name="TTextStrings.LoadFromFile.FileName">
<short>File name with the values loaded in the method.</short>
</element>

<element name="TTextStrings.SaveToFile">
<short>
Saves the content in the string list to the specified file name.
</short>
<descr>
<p>
Creates a temporary <var>TFileStream</var> instance for the 
<var>FileName</var> argument. The file is created if it does not already 
exist. The inherited <var>SaveToStream</var> method is called to store 
content in the string list to the file stream.
</p>
</descr>
<seealso>
<link id="TTextStrings.LoadFromFile"/>
<link id="#rtl.classes.TStrings.SaveToFile">TStrings.SaveToFile</link>
</seealso>
</element>
<element name="TTextStrings.SaveToFile.FileName">
<short>File name where the content is stored.</short>
</element>

<element name="TTextStrings.Text">
<short>Contains the textual representation for the values in Strings.</short>
<descr>
<p>
<var>Text</var> is a <var>String</var> property which contains the textual 
representation for the values in the <var>Strings</var> property. 
<var>TTextStrings</var> re-implements the Text property as defined in 
<var>TStrings</var>. The write specifier (<var>SetTextStr</var>) is 
overridden, and forces the internal array of line ranges to be rebuilt during 
the next read access.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TStrings.Text">TStrings.Text</link>
</seealso>
</element>

<element name="TTextStrings.OnChange">
<short>
Event handler signalled when values in Strings or Objects have been changed.
</short>
<descr>
<p>
<var>OnChange</var> is a <var>TNotifyEvent</var> property with the event 
handler signalled when values in the <var>Strings</var> and/or 
<var>Objects</var> properties have been changed.
</p>
<p>
OnChange is signalled from the <var>Changed</var> method, and occurs after 
the property value(s) are stored in the component.
</p>
</descr>
<seealso>
<link id="TTextStrings.Changed"/>
<link id="#rtl.classes.TStrings.Strings">TString.Strings</link>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
</seealso>
</element>

<element name="TTextStrings.OnChanging">
<short>
Event handler signalled before properties are updated in the component.
</short>
<descr>
<p>
<var>OnChanging</var> is a <var>TNotifyEvent</var> property with the event 
handler signalled before the <var>Strings</var> or <var>Objects</var> 
properties are updated in the component.
</p>
<p>
OnChanging is signalled from the <var>Changing</var> method when an update 
process in not already active.
</p>
</descr>
<seealso>
<link id="TTextStrings.Changing"/>
<link id="#rtl.classes.TStrings.Strings">TString.Strings</link>
<link id="#rtl.classes.TStrings.Objects">TStrings.Objects</link>
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
</seealso>
</element>
</module>
<!-- TextStrings -->
</package>
</fpdoc-descriptions>