Class DisplayStrings
Represents a collection of visible strings in the text Edit control.
public class DisplayStrings : IDisplayStrings, IStringList, IList<string>, ICollection<string>, IEnumerable<string>, IEnumerable, ITabulation, IWordWrap, ITextSearch, IUpdate, IWordBreak, ICollapsable, ITextExport, IExport, ITextImport, IImport
- Inheritance
-
DisplayStrings
- Implements
- Extension Methods
Remarks
Use SyntaxStrings to access "real" lines stored in the TextSource. DisplayStrings provides an access to lines as they are displayed in the Edit control, assuming tabulation, wordwrap and outlining.
Constructors
- DisplayStrings(ISyntaxEdit, ITextStrings)
Initializes a new instance of the
DisplayStringsclass with specified parameters.
Properties
- AllowHiddenLines
Gets or sets a value indicating whether hidden lines are enabled.
- AllowOutlining
Gets or sets a value indicating whether outlining is enabled.
- CollapsedCount
Returns number of collapsed sections.
- Count
Returns number of visible lines.
- DelimiterString
Gets or sets
Delimitersas a single string.
- Delimiters
Gets or sets an array of chars used to separate words in a text.
- DisplayCount
Returns number of visible lines.
- IgnoreWhiteSpace
Gets or sets boolean value indicating if white space styles are suppressed.
- IsReadOnly
Gets a value indicating whether the collection is read-only.
- this[int]
Provides an indexed access to individual string stored in the collection.
- LineEnd
When implemented by a class, gets or sets boolean value indicating if the text position can be set to the end of the wrapped line.
- LineTerminator
Gets or sets a string value that terminates line.
- Lines
Gets or sets the collection of underlying "real" collection of text lines.
- Loaded
Gets or sets boolean value indicating if the display strings was fully formatted.
- MaxLineWidth
Gets width of the largest line in the
DisplayStringobject.
- OutlineOptions
Gets or sets options representing outlining appearance and behaviour. OutlineOptions
- SuppressTabs
Gets or sets boolean value indicating if conversion from tabs to spaces is suppressed.
- 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
IDisplayStringsas a single string with the individual strings delimited by carriage returns.
- UpdateCount
Keeps track of calls to
BeginUndoUpdateandEndUndoUpdateso that they can be nested.
- UseSpaces
Gets or sets a value indicating whether indent operations insert space characters rather than TAB characters.
- WordWrap
Gets or sets a value indicating whether a
DisplayStringsobject automatically wraps words to the beginning of the next line when necessary.
- WrapAtMargin
Gets or sets a value indicating whether a
DisplayStringsobject automatically wraps words at margin position.
- WrapMargin
Gets position of the wrap margin.
Methods
- Add(string)
Adds a new item to the end of string collection.
- BeginUpdate()
Prevents outline list updating until calling
ICollapsable.EndUpdatemethod.
- BlockDeleting(Rectangle)
Responds on deleting some block of lines within the editor control.
- CanCollapse(int)
Returns boolean value indicating that outline section at given line can be collapsed.
- CanExpand(IOutlineRange)
Returns boolean value indicating that given outline section can be expanded.
- CanExpand(int)
Returns boolean value indicating that outline section at given line can be expanded.
- Clear()
Removes all items from string collection.
- Collapse(int)
Collapses the specified line.
- CollapseToDefinitions()
Collapses and expands some outline section to get a quick overall view of the content.
- 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.
- DisableUpdate()
Prevents object state updating until calling
EnableUpdatemethod.
- DisplayPointToPoint(Point)
Converts the specified display coordinates to text coordinates.
- DisplayPointToPoint(int, int)
Converts the specified display coordinates to text coordinates.
- DisplayPointToPoint(int, int, bool, bool, bool)
Converts the specified display coordinates to the text coordinates.
- DisplayPointToPoint(int, int, ref bool)
Converts the specified display coordinates to the text coordinates.
- EnableUpdate()
Re-enables object state updating, that was turn of by calling
DisableUpdatemethod. Using DisableUpdate/EnableUpdate to prevent notifying about updating the object state.
- EndUpdate()
Re-enables outline list updating, that was turn of by calling
ICollapsable.BeginUpdatemethod.
- EnsureExpanded(Point)
Makes all outline sections containing specified position expanded.
- EnsureExpanded(int)
Makes all outline sections containing specified line expanded.
- Expand(int)
Expands outline section at the given line.
- Find(string, SearchOptions, Regex, ref Point, out int, out Match, bool)
Searches for given text within the
DisplayStringscontents.
- FullCollapse()
Collapses all outline sections objects within
DisplayStrings.
- FullCollapse(IList<IRange>)
Collapses all sections objects specified by Ranges parameter.
- FullExpand()
Expands all outline sections objects within
DisplayStrings.
- FullExpand(IList<IRange>)
Expands all outline sections specified by Ranges parameter.
- GetColorData(int)
Returns color information related to the specified line.
- 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.
- GetLexStyle(Point)
Returns lexical style related to the specified position.
- GetOutlineHint(IOutlineRange)
Returns the string that appears in the hint window when mouse pointer over the outline button.
- GetOutlineRange(Point)
Returns outline section representing text substituting outline section and level of outline nesting at the specific position. IOutlineRange
- GetOutlineRange(int)
Returns outline section, which represents text substring outline section and level of outline nesting at the specific line. IOutlineRange
- GetOutlineRanges(IList<IRange>)
Fills list specified by Ranges parameter with all existing outline sections.
- GetOutlineRanges(IList<IRange>, Point)
Fills list specified by Ranges parameter with all outline sections containing specific position.
- GetOutlineRanges(IList<IRange>, Point, Point)
Fills list specified by Ranges parameter with all outline sections containing specific range.
- GetOutlineRanges(IList<IRange>, int)
Fills list specified by Ranges parameter with all outline sections containing specific line.
- GetPrevTabStop(int)
Returns number of spaces to the previous TabStop.
- GetStringAndColorData(int, ref string, ref StringItemInfo[])
Returns text and color information related to the specified line.
- GetTabStop(int)
Returns number of spaces to the next TabStop at the specified position.
- GetTabString(string)
Converts all tab character to spaces depending on
ITabulation.TabStopsproperty.
- GetTabString(string, ITextUndoList)
Converts all tab character to spaces depending on
ITabulation.TabStopsproperty.
- GetTextAt(Point)
Returns word at the specific text position.
- GetTextAt(int, int)
Returns word at the specific text position.
- GetVisibleLines(out int, out int)
Gets max range containing visible lines
- 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, HashSet<char>)
Returns word start and end, if there is word at the specified position.
- GetWrapMargin()
Returns position of the wrap margin.
- 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.
- IsCollapsed(int)
Indicates whether the outline section at the specified line is collapsed. IsExpanded(int)
- IsDelimiter(char)
Indicates whether the specified character is delimiter character.
- IsDelimiter(int, int)
Indicates whether the character at the specific position of the string collection is word delimiter character.
- IsDelimiter(string, int)
Indicates whether the character at the specific position of string is word delimiter character.
- IsExpanded(int)
Indicates whether the outlined section at the specified line is expanded. IsCollapsed(int)
- IsPointCollapsed(Point, out IRange)
Indicates whether given position is in visible area of the editor control.
- IsPointVisible(Point)
Indicates whether given position is in visible area of the editor control.
- IsVisible(Point)
Indicates whether the text at the specified position is visible, that is there is no collapsed outline section containing given position.
- IsVisible(int)
Indicates whether the text at the specified line is visible, that is there is no collapsed outline section containing given line.
- IsWhitespace(string, int)
Indicates whether the character at the specific position of the string collection is a whitespace character.
- LoadFile(string)
Loads the contents of a text file into string collection.
- LoadFile(string, IStringImport)
Loads content from the given file with specified importer.
- LoadFile(string, IStringImport, Encoding)
Loads content from the given file with specified importer and specific encoding.
- LoadFile(string, Encoding)
Loads the contents of a file into string collection.
- LoadStream(Stream)
Loads the contents of a stream into string collection.
- 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 a stream into string collection.
- LoadStream(TextReader, IStringImport)
Loads the contents of the specified stream.
- Notify(NotifyState, int, int)
Notifies editor about updating
IDisplayStringsstate.
- Outline(Point, Point)
This method creates an outlining section based on specific scope.
- Outline(Point, Point, int)
This method creates an outlining section based on specific scope with the specific level of outline nesting.
- Outline(Point, Point, int, string)
This method creates an outlining section based on specific scope with specific level of outline nesting and specific text substituting collapsed section.
- Outline(Point, Point, string)
This method creates an outlining section based on specific scope within current outlined section and with specific text substituting collapsed section.
- Outline(int, int)
This method creates an outlining section based on specific scope.
- Outline(int, int, int)
This method creates an outlining section based on specific scope at the specific level of outline nesting.
- Outline(int, int, int, string)
This method creates an outlining section based on specific scope at specific level of outline nesting and with specific text substituting collapsed section.
- Outline(int, int, string)
This method creates an outlining section based on specific scope within current outlined section and with specific text substituting collapsed section.
- PointToDisplayPoint(Point)
Converts the specified text coordinates into display coordinates.
- PointToDisplayPoint(int, int)
Converts the specified text coordinates into display coordinates.
- PointToDisplayPoint(int, int, bool)
Converts the specified text coordinates to display coordinates.
- 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.
- PositionChanged(UpdateReason, int, int, int, int)
Responds on changing position in the editor.
- Remove(string)
Removes the first occurrence of given string from the string collection.
- RemoveAt(int)
Removes string item at specified position.
- ResetAllowOutlining()
Resets the
AllowOutliningto its default value.
- ResetDelimiters()
Resets the
Delimitersto the default value.
- ResetOutlineOptions()
Resets the
OutlineOptionsto its default value.
- ResetTabStops()
Resets the
TabStopsto the default value.
- ResetUseSpaces()
Resets the
UseSpacesto the default value.
- ResetWordWrap()
Resets the
WordWrapto its default value.
- ResetWrapAtMargin()
Resets the
WrapAtMarginto its default value.
- SaveFile(string)
Saves content to the specific file in the text format.
- SaveFile(string, IStringExport)
Saves content to the specific file in the specific format.
- SaveFile(string, IStringExport, Encoding)
Saves content to the specific file in the specific format with specific encoding.
- SaveFile(string, Encoding)
Saves content to the specific file with specific encoding.
- SaveStream(Stream)
Saves content to the specific stream in the text format.
- SaveStream(Stream, IStringExport)
Saves content to the specific stream in the specific format.
- SaveStream(Stream, IStringExport, Encoding)
Saves content to the specific stream in the specific format and specific encoding.
- SaveStream(Stream, Encoding)
Saves the text content to the specified stream.
- SaveStream(TextWriter)
Saves content to the specific stream in the text format.
- SaveStream(TextWriter, IStringExport)
Saves the text content to the specified stream.
- SetOutlineRanges(IList<IRange>)
Updates
IOutlineRangecollection from given list of ranges.
- SetOutlineRanges(IList<IRange>, bool)
Updates
IOutlineRangecollection from given list of ranges.
- TabPosToPos(string, int)
Returns specified position within given string as untabbed position.
- ToggleOutlining()
Toggles expanded state for current outline sections.
- ToggleOutlining(IList<IRange>, IOutlineRange)
Toggles expanded state for given
IOutlineRangecollection.
- UnOutline()
This method removes all outlined section within the
DisplayStringscollection.
- UnOutline(Point)
This method removes outlined section at the specific position.
- UnOutline(int)
This method removes all outlined section containing the given line.
- Update()
When implemented by a class, updates an object state.
- UpdateHiddenLines()
Updates outline ranges for the hidden lines
- UpdateNeeded()
Forces
IDisplayStringsto recalculate its content.
- UpdateWordWrap()
Re-wraps all lines in
DisplayStringscollection.
- UpdateWordWrap(int, int)
Updates wrapped lines within specific scope in
DisplayStringsobject.
Events
- Collapsing
Occurs when user attempts expand outline section.
- Expanding
Occurs when user attempts expand outline section.