EControl Syntax Editor SDK
TSyntMemoStrings Class

Represents text storage class with direct access to the text.

TSyntMemoStrings = class(TecStrings);


TSyntMemoStrings stores text as a single null-terminated string in the field FText. You may directly access to this field. Direct access enables text analysis without creating a copy of the text, especially for large texts. 

TSyntMemoStrings implements the abstract properties and methods introduced by TStrings. TSyntMemoStrings support objects linked to the strings. But it's necessary to use SetObjectsStore method to create a container for these objects. You may also delete this container using SetObjectsStore

TSyntMemoStrings also stores undo records. All clients of the TSyntMemoStrings share single undo list.

Do not use FText to update text. Use it only for reading.

The methods of the TSyntMemoStrings class are listed here. 
The properties of the TSyntMemoStrings class are listed here. 
The events of the TSyntMemoStrings class are listed here. 
read only 
TSyntMemoStrings Events 
Occurs immediately after the text changes. 
Called when detecting text coding of the stream. 
Occurs when Modified property changes its value. 
TSyntMemoStrings Methods 
Adds a group of strings to the list. 
Adds undo record to buffer. For internal use only. 
Assigns TStrings. To prevent adding empty line last line break is deleted. 
Starts group of undo records. 
Converts the position of the caret in TPoint format to index of the character in text. 
Called after text has been changed. 
Returns representation of the use of a single byte in FText. 
Deletes all the strings from the list. 
Clears all undone changes in undo buffer so that no changes to the text can be redone. 
Clears the undo buffer so that no changes to the text can be backed out. 
Detects whether text contains unicode characters. 
Creates and initializes a TSyntMemoStrings instance. 
Removes the string specified by the Index parameter. 
Deletes portion of the text. 
Destroys an instance of TSyntMemoStrings. 
Finishes group of undo records. 
Finds a substring in the text. 
Returns a string given according to its index. 
Returns the number of strings in the list. 
Returns object associated with a string. 
Returns the value of the Text property. 
Introduces a method to insert a string at a specified position. 
Inserts string at the specified position. 
Returns True if line is empty or if it contains only space characters. 
Returns False if there is line break at the end of the text. 
Returns index of the first character of the specified line. 
Returns length of the specified line. 
Returns length of the specified line with line break. 
Loads text from a stream. 
Checks whether FindText string matches a substring in text starting with StrtPos. 
Called when modified status is changed
Changes the value of the string with a specified index. 
Changes the object associated with the string at a specified index. 
Returns number of lines excluding zero-space last line.

There are two possible cases:
1. Text is ended on line-break -> RealCount = Count-1.
2. Text is ended on any other character -> RealCount = Count. 
Resets states of all lines. 
Assignes states of all modified lines of the text ls Saved value. 
Writes the value of the FText field to a stream object. 
SaveUndoState assigns Modified flag to false and saves undo buffer. 
Destroys all objects associated with strings of the Strings property if Enable is false. Creates these objects otherwise. 
Sets the FText field. 
Converts index of the character in text to the position of the caret in TPoint format. 
Returns portion of text. 
Returns length of the FText string. 
TSyntMemoStrings Properties 
Provides indexed access to the characters of the text. 
Specifies the character set of the text. 
Specifies code page of the text.
Code page is used when loading and saving files, copy/paste text from clipboard, etc. 
Returns state of the line with number Line. 
Defines whether text is modified. 
Specifies number of undo records that have been undone. 
Defines whether signature is skipped while loading and saving streams. 
Enables objects storage. 
Specifies coding of the text. 
Specifies type of the line break. 
Specifies the number of keystrokes that can be undone. 
Contains undo records. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!