Table of Contents

Class TextStrings

Namespace
Alternet.Editor.TextSource
Assembly
Alternet.Editor.v9.dll

Specifies collection of lines with extended possibilities.

public class TextStrings : ITextStrings, IStringListWithItem, IStringList, IList<string>, ICollection<string>, IEnumerable<string>, IEnumerable, ITextExport, IExport, ITextImport, IImport, ITextSearch, ITabulation, IWordBreak, INotify, IUpdate
Inheritance
TextStrings
Implements
Extension Methods

Constructors

TextStrings()

Initializes a new instance of the TextStrings class with default settings.

TextStrings(ITextSource)

Initializes a new instance of the TextStrings class with specified parameters.

Properties

Count

Represents number of strings in the collection.

DelimTable

Represents delimiters as a key-and-value pairs collection where each key is a single delimiter character.

DelimiterString

Gets or sets Delimiters as a single string.

Delimiters

Gets or sets an array of characters used as delimiters between words in the text.

FirstChanged

Represents number of the first changed line.

IsReadOnly

Gets a value indicating whether the collection is read-only.

this[int]

Provides an indexed access to individual string stored in the collection.

LastChanged

Represents number of the last changed line.

LineTerminator

Gets or sets a string value that terminates line.

Owner

Gets or set the ISyntaxEdit control that owns this collection.

RemoveTrailingSpaces

Gets or set a boolean value that indicates whether TextStrings should remove trailing spaces from the end of each its strings.

Source

Gets the text source owning the TextStrings.

TabStops

Gets or sets the character columns that the cursor will move to each time you press Tab.

Text

Gets or sets the strings in the ITextStrings as a single string with the individual strings delimited by carriage returns.

UpdateCount

Keeps track of calls to BeginUpdate and EndUpdate so that they can be nested.

UseSpaces

Gets or sets a value indicating whether indent or TAB operations insert space characters rather than TAB characters.

Methods

AbsolutePositionToTextPoint(IList<string>, int, string)

Converts given absolute position to position as Point value.

AbsolutePositionToTextPoint(int)

Converts given absolute position to position as Point value.

Add(string)

Adds a new item to the end of string collection.

AddData(string, StringItemInfo[])
AddNotifier(INotifier)

Adds new handler to respond for notification.

AfterSave()

Performs additional actions after TextStrings saves its content to the file.

Assign(ITextStrings)

Copies the contents from another ITextStrings object.

BeginUpdate()

Prevents object state updating until calling EndUpdate method.

Changed(int)

Notifies about string state changing.

Changed(int, int)

Notifies about string state changing.

Clear()

Removes all items from string collection.

Contains(string)

Indicates whether string collection contains specified string.

CopyTo(string[], int)

Copies the entire string collection to a another array, starting at the specified index of the target array.

CreateStringItem(string)

Creates a new IStringItem object containing specified text.

DisableUpdate()

Prevents object state updating until calling EnableUpdate method.

EnableUpdate()

Re-enables object state updating, that was turn of by calling DisableUpdate method. Using DisableUpdate/EnableUpdate to prevent notifying about updating the object state.

EndUpdate()

Re-enables object state updating, that was turn of by calling BeginUpdate method.

~TextStrings()

Destroys the instance of the TextStrings class.

Find(IStringList, Hashtable, string, SearchOptions, Regex, ref Point, out int, out Match, string, bool)

Searches for given text.

Find(string, SearchOptions, Regex, ref Point, out int, out Match, bool)

Searches for given text.

GetCharAt(Point)

Returns character from specified position.

GetCharAt(int, int)

Returns character from specified position.

GetEnumerator()

Returns an enumerator that iterates through a collection.

GetIndentString(int, int)

Returns indentation string which consist of tabs and spaces.

GetIndentString(int, int, bool)

Returns indentation string which consist of tabs and spaces.

GetItem(int)

Returns the IStringItem object at the given position of the collection.

GetLength(int)

Returns length of the string that corresponds to specified item in the collection.

GetLexStyle(Point)

Returns lexical style at specified position.

GetPrevTabStop(int)

Returns number of spaces to the previous TabStop.

GetTabStop(int)

Returns number of spaces to the next TabStop at the specified position.

GetTabString(string)

Converts all tab character to spaces depending on TabStops property.

GetTabString(string, ITextUndoList)

Converts all tab character to spaces depending on ITabulation.TabStops property.

GetTabString(ref string, ref StringItemInfo[], bool, ITextUndoList)

When implemented by a class, converts all tab character to spaces depending on TabStops property.

GetTextAt(Point)

Returns word at the specific text position.

GetTextAt(int, int)

Returns word at the specific text position.

GetWord(int, int, out int, out int)

Returns word start and end, if there is word at the specified position.

GetWord(string, int, out int, out int)

Returns word start and end, if there is word at the specified position.

GetWord(string, int, out int, out int, char[])

Returns word start and end, if there is word at the specified position.

GetWord(string, int, out int, out int, Hashtable)

Returns word start and end, if there is word at the specified position.

IndexOf(string)

Returns the index of the first occurrence of given string in the string collection.

Insert(int, string)

Inserts value at the specified position.

IsDelimiter(char)

Indicates whether the specified character is delimiter character.

IsDelimiter(Hashtable, string, int)
IsDelimiter(int, int)

Indicates whether the character at the specific position of the string collection is delimiter character.

IsDelimiter(string, int)

Indicates whether the character at the specific position of given string is a delimiter character.

IsDelimiter(string, int, Hashtable)
IsLineHidden(IStringList, int)
IsWhitespace(char)

Indicates whether the character at the specific position of the string collection is a whitespace character.

IsWhitespace(string, int)

Indicates whether the character at the specific position of the string collection is a whitespace character.

IsWholeWord(Hashtable, string, int, int, ref int, ref int)
LoadFile(string)

Loads the contents of the specified file.

LoadFile(string, IStringImport)

Loads content from the given file with specified exporter.

LoadFile(string, IStringImport, Encoding)

Loads content from the given file with specified importer and specific encoding.

LoadFile(string, Encoding)

Loads content from the given file with specific encoding.

LoadStream(Stream)

Loads the contents of the specified stream.

LoadStream(Stream, IStringImport)

Loads the text content from the given stream with specified importer.

LoadStream(Stream, IStringImport, Encoding)

Loads the text content from the given stream with specified importer.

LoadStream(Stream, Encoding)

Loads the contents of the specified stream.

LoadStream(TextReader)

Loads the contents of the specified stream.

LoadStream(TextReader, IStringImport)

Loads the contents of the specified stream.

Notify(EventArgs)

Notifies all notifiers about updating object state.

OnDelimitersChanged()
OnLineTerminatorChanged()
OnOwnerChanged()
OnRemoveTrailingSpacesChanged()
OnUseSpacesChanged()
PosToTabPos(string, int)

Returns specified position within given string as tabbed position.

PosToTabPos(string, int, bool)

Returns specified position within given string as tabbed position.

PosToTabPosOriginal(string, int, bool)
Remove(string)

Removes the first occurrence of given string from the string collection.

RemoveAt(int)

Removes string item at specified position.

RemoveNotifier(INotifier)

Exclude specified handler from notification handlers list.

RemoveSpaces(string)
ResetDelimiters()

Resets the Delimiters to the default value.

ResetTabStops()

Resets the TabStops to the default value.

ResetUseSpaces()

Resets the UseSpaces to the default value.

SaveFile(string)

Saves text content to the specific file.

SaveFile(string, IStringExport)

Saves text content to the specific file with specified exporter.

SaveFile(string, IStringExport, Encoding)

Saves content to the given file with specified exported and specific encoding.

SaveFile(string, Encoding)

Saves text content to the specific file with specific encoding.

SaveStream(Stream)

Saves the text content to the specified stream.

SaveStream(Stream, IStringExport)

Saves the text content to the given stream with specified exporter.

SaveStream(Stream, IStringExport, Encoding)

Saves the text content to the given stream with specified exporter.

SaveStream(Stream, Encoding)

Saves the text content to the specified stream.

SaveStream(TextWriter)

Saves the text content to the specified stream.

SaveStream(TextWriter, IStringExport)

Saves the text content to the specified stream.

SetTextAndData(string, string)

Sets the text and color data at the same time.

StringItemToString(IStringItem)
TabPosToPos(string, int)

Returns specified position within given string as untabbed position.

TextPointToAbsolutePosition(IList<string>, Point, string)

Converts given Point value to the absolute position.

TextPointToAbsolutePosition(Point)

Converts given Point value to the absolute position.

Update()

Updates an object state.