ICSharpCode.TextEditor Describes the caret marker No line viewer will be displayed The row in which the caret is will be marked Describes the indent style No indentation occurs The indentation from the line above will be taken to indent the curent line Inteligent, context sensitive indentation will occur Describes the bracket highlighting style Brackets won't be highlighted Brackets will be highlighted if the caret is on the bracket Brackets will be highlighted if the caret is after the bracket Describes the selection mode of the text area The 'normal' selection mode. Selections will be added to the current selection or new ones will be created (multi-select mode) The default implementation. This interface represents a container which holds a text sequence and all necessary information about it. It is used as the base for a text editor. Returns a valid line number for the given offset. A offset which points to a character in the line which line number is returned. An int which value is the line number. If offset points not to a valid position Returns a for the given offset. A offset which points to a character in the line which is returned. A object. If offset points not to a valid position Returns a for the given line number. This function should be used to get a line instead of getting the line using the . The line number which is requested. A object. If offset points not to a valid position Get the first logical line for a given visible line. example : lineNumber == 100 foldings are in the linetracker between 0..1 (2 folded, invisible lines) this method returns 102 the 'logical' line number Get the last logical line for a given visible line. example : lineNumber == 100 foldings are in the linetracker between 0..1 (2 folded, invisible lines) this method returns 102 the 'logical' line number Get the visible line for a given logical line. example : lineNumber == 100 foldings are in the linetracker between 0..1 (2 folded, invisible lines) this method returns 98 the 'visible' line number Get the next visible line after lineNumber Get the next visible line below lineNumber Inserts a string of characters into the sequence. offset where to insert the string. text to be inserted. Removes some portion of the sequence. offset of the remove. number of characters to remove. Replace some portion of the sequence. offset. number of characters to replace. text to be replaced with. Returns a specific char of the sequence. Offset of the char to get. Fetches a string of characters contained in the sequence. Offset into the sequence to fetch number of characters to copy. returns the logical line/column position from an offset returns the offset from a logical line/column position Requests an update of the textarea Commits all updates in the queue to the textarea (the textarea will be painted) Moves, Resizes, Removes a list of segments on insert/remove/replace events. If true the document can't be altered The attached to the instance The attached to the instance The attached to the instance The attached to the instance The attached to the instance A collection of all line segments The collection should only be used if you're aware of the 'last line ends with a delimiter problem'. Otherwise the method should be used. The total number of lines in the document. Get the whole text as string. When setting the text using the TextContent property, the undo stack is cleared. Set TextContent only for actions such as loading a file; if you want to change the current document use the Replace method instead. The current length of the sequence of characters that can be edited. A container where all TextAreaUpdate objects get stored Is fired when CommitUpdate is called This delegate is used for document events. This class contains more information on a document event Creates a new instance off Creates a new instance off Creates a new instance off Creates a new instance off always a valid Document which is related to the Event. -1 if no offset was specified for this event null if no text was specified for this event -1 if no length was specified for this event This interface represents a container which holds a text sequence and all necessary information about it. It is used as the base for a text editor. Creates a new object. Only create with this method. Creates a new document and loads the given file Creates a new document and loads the given file Indicates that the highlighting definition that was tried to load was invalid. You get this exception only once per highlighting definition, after that the definition is replaced with the default highlighter. This interface is used to describe a span inside a text sequence The offset where the span begins The length of the span A list of events that are fired after the line manager has finished working. Data structure for efficient management of the line segments (most operations are O(lg n)). This implements an augmented red-black tree where each node has fields for the number of nodes in its subtree (like an order statistics tree) for access by index(=line number). Additionally, each node knows the total length of all segments in its subtree. This means we can find nodes by offset in O(lg n) time. Since the offset itself is not stored in the line segment but computed from the lengths stored in the tree, we adjusting the offsets when text is inserted in one line means we just have to increment the totalLength of the affected line and its parent nodes - an O(lg n) operation. However this means getting the line number or offset from a LineSegment is not a constant time operation, but takes O(lg n). NOTE: The tree is never empty, Clear() causes it to contain an empty segment. Updates the length of a line segment. Runs in O(lg n). Gets the index of an item. Runs in O(lg n). Clears the list. Runs in O(1). Tests whether an item is in the list. Runs in O(n). Copies all elements from the list to the array. Gets the total length of all line segments. Runs in O(1). Gets the number of items in the collections. Runs in O(1). Gets or sets an item by index. Runs in O(lg n). An invalid enumerator value. Calling MoveNext on the invalid enumerator will always return false, accessing Current will throw an exception. Moves to the next index. Runs in O(lg n), but for k calls, the combined time is only O(k+lg n). Moves to the previous index. Runs in O(lg n), but for k calls, the combined time is only O(k+lg n). Gets the current value. Runs in O(1). Gets the index of the current value. Runs in O(lg n). Gets the offset of the current value. Runs in O(lg n). Behaves like a start marker - when text is inserted at the anchor position, the anchor will stay before the inserted text. Behave like an end marker - when text is insered at the anchor position, the anchor will move after the inserted text. An anchor that can be put into a document and moves around when the document is changed. Controls how the anchor moves. A line/column position. Text editor lines/columns are counting from zero. Represents no text location (-1, -1). This function takes a string and converts the whitespace in front of it to tabs. If the length of the whitespace at the start of the string was not a whole number of tabs then there will still be some spaces just before the text starts. the output string will be of the form: 1. zero or more tabs 2. zero or more spaces (less than tabIndent) 3. the rest of the line This method returns the expression before a specified offset. That method is used in code completion to determine the expression given to the parser for type resolve. Returns true, if the line lineNumber is empty or filled with whitespaces. Returns true, if the line lineNumber is empty or filled with whitespaces. This class handles the bookmarks for a buffer Creates a new instance of Sets the mark at the line location.Line if it is not set, if the line is already marked the mark is cleared. true, if a mark at mark exists, otherwise false Clears all bookmark The lowest mark, if no marks exists it returns -1 The highest mark, if no marks exists it returns -1 returns first mark higher than lineNr returns the next mark > cur, if it not exists it returns FirstMark() returns first mark lower than lineNr returns the next mark lower than cur, if it not exists it returns LastMark() Contains all bookmarks Gets/Sets the bookmark factory used to create bookmarks for "ToggleMarkAt". This class is used for storing the state of a bookmark manager Validates all bookmarks if they're in range of the document. (removing all bookmarks < 0 and bookmarks > max. line number Creates a new instance of Creates a new instance of Creates a new instance of Converts a xml element to a object Converts this to a xml element Contains all bookmarks as int values This class handles the auto and smart indenting in the textbuffer while you type. This interface handles the auto and smart indenting and formating in the document while you type. Language bindings could overwrite this interface and define their own indentation/formating. This function formats a specific line after ch is pressed. This function sets the indentation level in a specific line The target caret position (length of new indentation). This function sets the indentlevel in a range of lines. Finds the offset of the opening bracket in the block defined by offset skipping brackets in strings and comments. The document to search in. The offset of an position in the block or the offset of the closing bracket. The character for the opening bracket. The character for the closing bracket. Returns the offset of the opening bracket or -1 if no matching bracket was found. Finds the offset of the closing bracket in the block defined by offset skipping brackets in strings and comments. The document to search in. The offset of an position in the block or the offset of the opening bracket. The character for the opening bracket. The character for the closing bracket. Returns the offset of the closing bracket or -1 if no matching bracket was found. Creates a new instance off returns the whitespaces which are before a non white space character in the line line as a string. Could be overwritten to define more complex indenting. Replaces the text in a line. If only whitespace at the beginning and end of the line was changed, this method only adjusts the whitespace and doesn't replace the other text. Could be overwritten to define more complex indenting. This function formats a specific line after ch is pressed. the caret delta position the caret will be moved this number of bytes (e.g. the number of bytes inserted before the caret, or removed, if this number is negative) This function sets the indentation level in a specific line the number of inserted characters. This function sets the indentlevel in a range of lines. A highlighting strategy for a buffer. Gets the color of an Environment element. Used internally, do not call Used internally, do not call The name of the highlighting strategy, must be unique The file extenstions on which this highlighting strategy gets used Used internally, do not call Used internally, do not call pushes the curWord string on the word list, with the correct color. get the string, which matches the regular expression expr, in string s2 at index returns true, if the get the string s2 at index matches the expression expr This class is used to generate bold, italic and bold/italic fonts out of a base font. The scaled, regular version of the base font The scaled, bold version of the base font The scaled, italic version of the base font The scaled, bold/italic version of the base font The base font Extens the highlighting color with a background image. A color used for highlighting The font used Creates a new instance of Creates a new instance of Creates a new instance of Creates a new instance of Creates a new instance of Creates a new instance of Converts a instance to string (for debug purposes) If true the font will be displayed bold style If true the font will be displayed italic style The background color used The foreground color used Creates a new instance of Creates a new instance of The image used as background Merges spans etc. from the other rule set into this rule set. Used for mark next token Creates a new instance of String value to indicate to mark next token Color for marking next token If true the indication text will be marked with the same color too Used for mark previous token Creates a new instance of String value to indicate to mark previous token Color for marking previous token If true the indication text will be marked with the same color too Gets the escape character of the span. The escape character is a character that can be used in front of the span end to make it not end the span. The escape character followed by another escape character means the escape character was escaped like in @"a "" b" literals in C#. The default value '\0' means no escape character is allowed. This class represents single words with color information, two special versions of a word are spaces and tabs. Splits the into two parts: the part before is assigned to the reference parameter , the part after is returned. Converts a instance to string (for debug purposes) Converts a instance to string (for debug purposes) Is called when the LineSegment is deleted. Is called when a part of the line is removed. Is called when a part of the line is inserted. Is called after another line's content is appended to this line because the newline in between was deleted. The DefaultLineManager will call Deleted() on the deletedLine after the MergedWith call. firstLineLength: the length of the line before the merge. Is called after a newline was inserted into this line, splitting it into this and followingLine. always a valid Document which is related to the Event. -1 if no offset was specified for this event -1 if no length was specified for this event Interface to describe a sequence of characters that can be edited. Inserts a string of characters into the sequence. offset where to insert the string. text to be inserted. Removes some portion of the sequence. offset of the remove. number of characters to remove. Replace some portion of the sequence. offset. number of characters to replace. text to be replaced with. Fetches a string of characters contained in the sequence. Offset into the sequence to fetch number of characters to copy. Returns a specific char of the sequence. Offset of the char to get. This method sets the stored content. The string that represents the character sequence. The current length of the sequence of characters that can be edited. Simple implementation of the ITextBuffer interface implemented using a string. Only for fall-back purposes. Description of RedBlackTree. Returns the iterator pointing to the specified item, or an iterator in End state if the item is not found. Returns the iterator pointing to the first item greater or equal to . Returns the iterator pointing to the first item greater than . Gets a tree iterator that starts on the first node. Gets a tree iterator that starts one node before the first node. A IList{T} that checks that it is only accessed on the thread that created it, and that it is not modified while an enumerator is running. Central location for logging calls in the text editor. This class implements a keyword map. It implements a digital search trees (tries) to find a word. Creates a new instance of The number of elements in the table Get the object, which was inserted under the keyword (line, at offset, with length length), returns null, if no such keyword was inserted. Inserts an object in the tree, under keyword Accumulates mouse wheel deltas and reports the actual number of lines to scroll. This class is for the undo of Document insert operations This Interface describes a the basic Undo/Redo operation all Undo Operations must implement this interface. Undo the last operation Redo the last operation Creates a new instance of Undo last operation Redo last undone operation This class is for the undo of Document insert operations Creates a new instance of Undo last operation Redo last undone operation This class is for the undo of Document insert operations Creates a new instance of Undo last operation Redo last undone operation To define a new key for the textarea, you must write a class which implements this interface. To define a new key for the textarea, you must write a class which implements this interface. When the key which is defined per XML is pressed, this method will be launched. An array of keys on which this edit action occurs. When the key which is defined per XML is pressed, this method will be launched. An array of keys on which this edit action occurs. Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes The end offset is the offset where the comment end string starts from. Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes Executes this edit action The which is used for callback purposes handles the ctrl-backspace key functionality attempts to roughly mimic MS Developer studio I will implement this as deleting back to the point that ctrl-leftarrow would take you to Executes this edit action The which is used for callback purposes handles the ctrl-delete key functionality attempts to mimic MS Developer studio I will implement this as deleting forwardto the point that ctrl-leftarrow would take you to Executes this edit action The which is used for callback purposes An interface representing a portion of the current selection. Returns true, if the selection is rectangular Returns true, if the selection is empty The text which is selected by this selection. Default implementation of the interface. Creates a new instance of Converts a instance to string (for debug purposes) Returns true, if the selection is empty Returns true, if the selection is rectangular The text which is selected by this selection. This interface is used for the folding capabilities of the textarea. Calculates the fold level of a specific line. A simple folding strategy which calculates the folding level using the indent level of the line. Used internally, not for own use. This enum describes all implemented request types This class is used to request an update of the textarea Creates a new instance of Creates a new instance of Creates a new instance of Creates a new instance of This class manages the selections in a document. Creates a new instance of Creates a new instance of Clears the selection and sets a new selection using the given object. Clears the selection. Removes the selected text from the buffer and clears the selection. Returns true if the given offset points to a section which is selected. Returns a object giving the selection in which the offset points to. null if the offset doesn't point to a selection Used internally, do not call. Used internally, do not call. Used internally, do not call. A collection containing all selections. true if the is not empty, false otherwise. The text that is currently selected. Insert the element represented by the completion data into the text editor. TextArea to insert the completion data in. Character that should be inserted after the completion data. \0 when no character should be inserted. Returns true when the insert action has processed the character ; false when the character was not processed. Gets a priority value for the completion data item. When selecting items by their start characters, the item with the highest priority is selected first. Processes a keypress. Returns the action to be run with the key. Executes the insertion. The provider should set the caret position and then call data.InsertAction. Generates the completion data. This method is called by the text editor control. Gets the index of the element in the list that is chosen by default. Normal key, used to choose an entry from the completion list This key triggers insertion of the completed expression Increment both start and end offset of completion region when inserting this key. Can be used to insert whitespace (or other characters) in front of the expression while the completion window is open. Description of AbstractCompletionWindow. Adds a shadow to the create params if it is supported by the operating system. Invoked when the mouse moves over this form or any child control. Shows the mouse cursor on the text area if it has been hidden. Derived classes should attach this handler to the MouseMove event of all created controls which are not added to the Controls collection. Gets the list view width large enough to handle the longest completion data text string. The default width of the list view. The height of the list view. This is used to determine if the scrollbar is visible. The list view width to accommodate the longest completion data text string; otherwise the default width. When this flag is set, code completion closes if the caret moves to the beginning of the allowed range. This is useful in Ctrl+Space and "complete when typing", but not in dot-completion. Tells the insight provider to prepare its data. The name of the edited file The text area in which the file is being edited Notifies the insight provider that the caret offset has changed. Return true to close the insight window (e.g. when the caret was moved outside the region where insight is displayed for). Return false to keep the window open. Gets the text to display in the insight window. The number of the active insight entry. Multiple insight entries might be multiple overloads of the same method. The text to display, e.g. a multi-line string where the first line is the method definition, followed by a description. Gets the number of available insight entries, e.g. the number of available overloads to call. Gets the index of the entry to initially select. This interface is used to describe a span inside a text sequence The width of a tab. The amount of spaces a tab is converted to if ConvertTabsToSpaces is true. In this enumeration are all caret modes listed. If the caret is in insert mode typed characters will be inserted at the caret position If the caret is in overwirte mode typed characters will overwrite the character at the caret position If the caret position is outside the document text bounds it is set to the correct position by calling ValidateCaretPos. The 'prefered' xPos in which the caret moves, when it is moved up/down. Measured in pixels, not in characters! The current caret mode. Is called each time the caret is moved. Is called each time the CaretMode has changed. This class paints the textarea. The position where the mouse cursor was when it was hidden. Sometimes the text editor gets MouseMove events when typing text even if the mouse is not moved. Shows the mouse cursor if it has been hidden. true to always show the cursor or false to show it only if it has been moved since it was hidden. Rectangle in text area that caused the current tool tip. Prevents tooltip from re-showing when it was closed because of a click or keyboard input and the mouse was not used. This method is called on each Keypress True, if the key is handled by this method and should NOT be inserted in the textarea. This method executes a dialog key Inserts a single character at the caret position Inserts a whole string at the caret position Replaces a char at the caret position This class is used for a basic text area control This class is used for a basic text area control This hashtable contains all editor keys, where the key is the key combination and the value the action. Call this method before a long update operation this 'locks' the text area so that no screen update occurs. Call this method to 'unlock' the text area. After this call screen update can occur. But no automatical refresh occurs you have to commit the updates in the queue. Loads a file given by fileName The name of the file to open Automatically load the highlighting for the file Automatically detect file encoding and set Encoding property to the detected encoding. Loads a file from the specified stream. The name of the file to open. Used to find the correct highlighting strategy if autoLoadHighlighting is active, and sets the filename property to this value. The stream to actually load the file content from. Automatically load the highlighting for the file Automatically detect file encoding and set Encoding property to the detected encoding. Gets if the document can be saved with the current encoding without losing data. Saves the text editor content into the file. Saves the text editor content into the specified stream. Does not close the stream. Overwritten refresh method that does nothing if the control is in an update cycle. Current file's character encoding The current file name The current document If set to true the contents can't be altered. true, if the textarea is updating it's status, while it updates it status no redraw operation occurs. supposedly this is the way to do it according to .NET docs, as opposed to setting the size in the constructor If true spaces are shown in the textarea Specifies the quality of text rendering (whether to use hinting and/or anti-aliasing). If true tabs are shown in the textarea If true EOL markers are shown in the textarea If true the horizontal ruler is shown in the textarea If true the vertical ruler is shown in the textarea The row in which the vertical ruler is displayed If true line numbers are shown in the textarea If true invalid lines are marked in the textarea If true folding is enabled in the textarea The width in spaces of a tab character The line viewer style The indent style if true spaces are converted to tabs if true spaces are converted to tabs if true spaces are converted to tabs if true spaces are converted to tabs The base font of the text area. No bold or italic fonts can be used because bold/italic is reserved for highlighting purposes. Is called when CachedClipboardContainsText should be updated. If this property is null (the default value), the text editor uses System.Windows.Forms.Clipboard.ContainsText. This property is useful if you want to prevent the default Clipboard.ContainsText behaviour that waits for the clipboard to be available - the clipboard might never become available if it is owned by a process that is paused by the debugger. This class paints the textarea. This class views the line numbers and folding markers. Get the marker brush (for solid block markers) at a given position. The offset. The length. All markers that have been found. The Brush or null when no marker was found. returns line/column for a visual point position returns line/column for a visual point position returns line/column for a visual point position returns logical line number for a visual point Gets the first visible logical line. Gets the width of a space character. This value can be quite small in some fonts - consider using WideSpaceWidth instead. Gets the width of a 'wide space' (=one quarter of a tab, if tab is set to 4 spaces). On monospaced fonts, this is the same value as spaceWidth. This class views the line numbers and folding markers. This class stacks the last x operations from the undostack and makes one undo/redo operation from it. This class implements an undo stack Gets/Sets if changes to the document are protocolled by the undo stack. Used internally to disable the undo stack temporarily while undoing an action. Call this method to undo the last operation on the stack Call this method to redo the last undone operation Call this method to push an UndoableOperation on the undostack, the redostack will be cleared, if you use this method. Call this method, if you want to clear the redo stack Clears both the undo and redo stack. Gets if there are actions on the undo stack. Gets if there are actions on the redo stack. Gets the number of actions on the undo stack. Gets the number of actions on the redo stack. This class paints the textarea. Ensure that is visible. Scroll so that the specified line is centered. Line to center view on If this action would cause scrolling by less than or equal to lines in any direction, don't scroll. Use -1 to always center the view. This class handles all mouse stuff for a textArea. This class views the line numbers and folding markers. This class views the line numbers and folding markers. Create a drag'n'drop event handler. Windows Forms swallows unhandled exceptions during drag'n'drop, so we report them here. This is a sample editaction plugin, it indents the selected area. Manages the list of markers and provides ways to retrieve markers for specific positions. Marks a part of a document. Marks the text segment as read-only. Gets the last offset that is inside the marker region. Description of CodeCompletionListView. Contains brushes/pens for the text editor to speed up drawing. Re-Creation of brushes and pens seems too costly. Horizontal ruler - text column measuring ruler at the top of the text area. Description of Bookmark. Gets the TextAnchor used for this bookmark. Is null if the bookmark is not connected to a document. Gets if the bookmark can be toggled off using the 'set/unset bookmark' command. Description of BookmarkEventHandler. Class that can open text files with auto-detection of the encoding. A class that is able to draw a line on any control (outside the text editor) Gets if some client handling the event has already shown a tool tip. A stack of Span instances. Works like Stack<Span>, but can be cloned quickly because it is implemented as linked list. A collection that does not allows its elements to be garbage-collected (unless there are other references to the elements). Elements will disappear from the collection when they are garbage-collected. The WeakCollection is not thread-safe, not even for read-only access! No methods may be called on the WeakCollection while it is enumerated, not even a Contains or creating a second enumerator. The WeakCollection does not preserve any order among its contents; the ordering may be different each time the collection is enumerated. Since items may disappear at any time when they are garbage collected, this class cannot provide a useful implementation for Count and thus cannot implement the ICollection interface. Adds an element to the collection. Runtime: O(n). Removes all elements from the collection. Runtime: O(n). Checks if the collection contains an item. Runtime: O(n). Removes an element from the collection. Returns true if the item is found and removed, false when the item is not found. Runtime: O(n). Enumerates the collection. Each MoveNext() call on the enumerator is O(1), thus the enumeration is O(n).