JetBrains.Platform.dotCover.TextControl
TODO: review, try to make a common model of VS typing handling and text control impl actions.
After positioning the caret in the document, scrolls the text control to reveal the caret position.
This affects the visual location of the caret after scrolling.
Does not do any scrolling if the new caret position is already visible.
If the caret gets too close to the edge, would scroll it away. This mode avoids the effect.
When moving within the active text control, ensures the caret is not too close to the edge with minimal amount of scrolling.
When jumping to another text control, places the caret at the predefined position.
When moving within the active text control, works almost as , but avoids scrolling the caret away from a too-near edge if this means scrolling against the caret movement direction.
When jumping to another text control, places the caret at the predefined position consistent with generic scrolling in the given direction within the same text control.
When moving within the active text control, works almost as , but avoids scrolling the caret away from a too-near edge if this means scrolling against the caret movement direction.
When jumping to another text control, places the caret at the predefined position consistent with generic scrolling in the given direction within the same text control.
An entry point to the text control coordinate conversions.
Represents an abstracted point on the text control that can be converted to any more or less equivalent representation.
Converts the position to canvas coordinates, which are pixel coordinates relative to the (0,0) character in the text view.
Canvas coordinates of a specific text control character do not change when scrolling.
Converts the position to document line-column coordinates.
Converts the position to an offset from the beginning of the document text.
Converts the position to an offset from the beginning of the document text, plus, if the position represented a point in the editor virtual space, the number of virtual spaces from the last real document character to the addressed position.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Converts the position to screen pixel coordinates.
Converts the position to text control line-column coordinates.
Gets the text control that will be translating the position to various coordinate systems.
Coordinate conversion from canvas pixel coordinates.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Gets the text control that will be translating the position to various coordinate systems.
Coordinate conversion from document line/column coordinates.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Gets the text control that will be translating the position to various coordinate systems.
Coordinate conversion from document offset with virtual space.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Gets the text control that will be translating the position to various coordinate systems.
Stores a retained coordinate snapshot.
Allows to exclude and pixel coordinates from precalculation.
-type properties won't be reliable on change regarding these, but each calculation won't be so slow.
The position from which this retained position has been created by pre-calculating all of the transformations.
Creates a snapshot of all the aspects.
Only for .
Creates an all-Null position. Text control must be specified in any case.
Creates a snapshot of all the aspects.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Converts the position to canvas coordinates, which are pixel coordinates relative to the (0,0) character in the text view.
Canvas coordinates of a specific text control character do not change when scrolling.
Converts the position to document line-column coordinates.
Converts the position to an offset from the beginning of the document text.
Converts the position to an offset from the beginning of the document text, plus, if the position represented a point in the editor virtual space, the number of virtual spaces from the last real document character to the addressed position.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Converts the position to screen pixel coordinates.
Converts the position to text control line-column coordinates.
Gets the text control that will be translating the position to various coordinate systems.
Coordinate conversion from screen pixel coordinates.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Gets the text control that will be translating the position to various coordinate systems.
Coordinate conversion from text control line/column coordinates.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Gets the text control that will be translating the position to various coordinate systems.
Implements the few methods that make it possible to implement the multitude of conversions supported by -.
Initializes a new instance of the class.
Conversion method.
Standard implementation that uses platform doc line index.
May be out of sync with VS model at times.
Conversion method.
Standard implementation that uses platform doc line index.
May be out of sync with VS model at times.
Conversion method.
Conversion method.
Conversion method.
Conversion method.
Conversion method.
Conversion method.
Location of the viewport within the canvas coord space. Ie scrolling position.
For transitions between canvas and viewport coords.
Helper conversion for deriving screen conversions from canvas ones.
Helper conversion for deriving screen conversions from canvas ones.
Implements the creation of from various sources.
Supply with the conversion core.
Defines a range between two .
Range end. This position belongs to .
Note that it's not guaranteed that goes before .
Range start. This position belongs to .
Note that it's not guaranteed that goes before .
Both and belong to this text control.
Creates a text control range in universal positions based on the document range.
The text control that will be used for translating the range into the text control coordinate space.
The range, in document coordinates.
Text control range in universal coordinates.
Creates a text control range in universal positions based on the document range. See also the overload that supports unnormalized ranges.
The text control that will be used for translating the range into the text control coordinate space.
The range, in document coordinates.
Text control range in universal coordinates.
Creates a text control range in universal positions based on the document range. Unlike the overload, accepts unnormalized ranges.
The text control that will be used for translating the range into the text control coordinate space.
The range start, in document coordinates.
The range end, in document coordinates.
Text control range in universal coordinates.
Creates a text control range in universal positions based on the text control line-col coordinates.
The text control that will be used for translating the range into the text control coordinate space.
The range, in text control line-col coordinates.
Text control range in universal coordinates.
Converts both ends to the document range.
Normalizes the range, so that the start goes before the end.
Converts both ends to the document range.
Does not normalize the range, the start might go after the end.
Converts both ends to the document range.
Makes sure the range is properly normalized, ie the start goes before the end. Raw ranges of the document selection, for instance, might be inverted if user selects with shift+left.
Normally, an starts as a position of a specific kind and calculates the conversions as needed.
The method allows to precalculate all of the positions for the given moment in time, which provides for retaining the values in the guarded context even after the unmanaged text control gets destroyed.
Converts both ends to the text control line-column range.
Normalizes the range, so that the start goes before the end.
Converts both ends to the text control line-column range.
Does not normalize the range, the start might go after the end.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current . The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Returns a that represents the current .
A that represents the current .
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Params for . See concrete inheritors for available text control types.
Type of the text control.
Makes params.
The document for which the text control should be created.
The frame that hosts the text control.
The document for the new text control.
The frame hosting the new text control.
Type of the text control to create.
Creates a homebrew WinForms text control of type .
Makes params.
The document for which the text control should be created.
Scheme. Use DefaultTextControlSchemeManager.Instance.GetScheme() as the default.
Highlighting. Use Null as the default.
Frame hosting the text control.
Makes params.
The document for which the text control should be created.
Frame hosting the text control.
Creates the text control for the document, using the default scheme and highlighting.
Make the container updated for the recent document change, and return if the futher container modification should be reflected in
Represents the () in a text document, which is basically a document offset.
However, this position is often derived from a , which is in the text control Line-Column coordinate system, and not all column indices map into document offsets. If the column index is beyond the EOL of that line, then it's said to be in the Virtual Space. is the offset into the Virtual Space from the nearest valid document .
Number of virtual columns past the last real document position.
Neutral means that it is equally presented in document and text control columns (, ).
Creates an offset that represents some point within the text control's virtual space.
Creates an offset that represents some point within the text control's virtual space.
Creates an offset that corresponds to a real document offset, without any shift to the virtual space.
Indicates whether this instance and a specified object are equal.
true if and this instance are the same type and represent the same value; otherwise, false.
Another object to compare to. 2
Returns the hash code for this instance.
A 32-bit signed integer that is the hash code for this instance.
2
For logical positions over actual document characters this is zero. For logical positions over the Virtual Space (column indices beyond the end of line), the number of virtual space characters from the EOL.
Gets whether the point isn't over document chars, but somewhere in the virtual space of the text control.
This means that and are both above zero.
For logical positions over actual document characters, the document offset. For logical positions over the Virtual Space (column indices beyond the end of line), the EOL offset.
For logical positions over actual document characters this is zero. For logical positions over the Virtual Space (column indices beyond the end of line), the number of virtual space characters from the EOL.
Creates an editbox-based text control of type .
Makes params.
The document for which the text control should be created.
A lightweight text control based on a Windows Edit Box for use in dialogs.
Represents the text control, which is a view for editing an .
Most calls that modify the text control state must be made from the UI thread.
Emulates pressing the Enter key in text control. Will cause our and host handlers to be executed. The handler will be executed in a reentrancy-safe context.
Emulates typing in text control. Will cause our and host handlers to be executed. The handler will be executed in a reentrancy-safe context.
The character to amulate typing of.
Gets whether the given document position is present in the text view of the text control.
The document position in the unified position format (. or .).
Even though every position could be converted to a text view (and usually a reasonable value will be returned), sometimes that would be only an approximate position (that would not roundtrip). For example, a document position could be hidden from the text view by a collapsed region.
Caret access.
Provides access to the text control coordinate conversion, which makes it possible to represent a point on the text control or in the document in a unified way.
The rendered text gets from the document, however, it might be transformed or filtered (eg projections and collapsed regions).
That's why document line-column positions () do not always agree to the text control line-column positions (). Currently, these coordinates have different CLR types and are not so easily mixed together.
Gets the Disposables collection that controls the text control lifetime.
Gets the document that supplies this text control with content.
The rendered text gets from the document, however, it might be transformed or filtered (eg projections and collapsed regions).
That's why document line-column positions () do not always agree to the text control line-column positions (). Currently, these coordinates have different CLR types and are not so easily mixed together.
Use to convert between various text control coordinates.
Gets the scrolling parameters of the text control, both for quering and manipulating.
Selection access.
Provides various UI framework-related information about the text control.
Fires when the text control is being disposed of.
As the text control lifetime is deterministic, you might want to attach to such a point.
Syncs all the models to the view.
Switches to guarded context, calls .
Binds text in the text box to the document text, bidirectionally.
Behavior on dispose.
Gets whether the given document position is present in the text view of the text control.
The document position in the unified position format (. or .).
Even though every position could be converted to a text view (and usually a reasonable value will be returned), sometimes that would be only an approximate position (that would not roundtrip). For example, a document position could be hidden from the text view by a collapsed region.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
Emulates pressing the Enter key in text control. Will cause our and host handlers to be executed. The handler will be executed in a reentrancy-safe context.
Emulates typing in text control. Will cause our and host handlers to be executed. The handler will be executed in a reentrancy-safe context.
The character to amulate typing of.
Retrieves value associated with given key.
Returns null when no value is associated.
Stores given value by specified key.
Use PutData(key, null) to remove the association.
Gets the edit box that is the text control.
Gets the document that supplies this text control with content.
The rendered text gets from the document, however, it might be transformed or filtered (eg projections and collapsed regions).
That's why document line-column positions () do not always agree to the text control line-column positions (). Currently, these coordinates have different CLR types and are not so easily mixed together.
Use to convert between various text control coordinates.
Caret access.
Provides access to the text control coordinate conversion, which makes it possible to represent a point on the text control or in the document in a unified way.
The rendered text gets from the document, however, it might be transformed or filtered (eg projections and collapsed regions).
That's why document line-column positions () do not always agree to the text control line-column positions (). Currently, these coordinates have different CLR types and are not so easily mixed together.
Gets the Disposables collection that controls the text control lifetime.
Gets the scrolling parameters of the text control, both for quering and manipulating.
Selection access.
Provides various UI framework-related information about the text control.
Text control caret access.
Attempts to move the caret to the requested position.
Gets the caret position in all of the possible text control position representation.
Gets the value.
Gets the owning text control.
change event. Use directly whenever possible.
Implements moving the caret. Should not affect scrolling. method default implementation calls this method for the caret positioning part, then applies the scrolling as needed.
The new caret position. Not prevalidated.
Whether the call has anything but specified as the visual placement parameter. A False value means the “least intrusive” scenario, which could apply to caret placement too.
Initializes a new instance of the class.
Standard impl based on the .
Standard impl based on the .
Helper conversion for deriving screen conversions from canvas ones.
Helper conversion for deriving screen conversions from canvas ones.
The scrolling parameters of the text control, both for quering and manipulating.
Explicitly sets the viewport position in the canvas (extent) coordinates.
Even though you can pass pixel coodinates to as well, the difference is that this method does not attempt to adjust the scrolling position for the best visibility of the desired point. The viewport left-top corner is positioned as closely to as possible.
Scrolls the view to make the visible in the viewport, placing it based on the .
Gets the owning text control.
Gets the area that the viewport covers over the extent (the whole imaginary field of the scrollable content whose part is visible in the viewport), in the form of a document or text control range.
Note that the column number or virtual spaces delta is not applicable to this range because the visible columns set varies with lines. Only lines are taken into account.
Gets the area that the viewport covers over the extent (the whole imaginary field of the scrollable content whose part is visible in the viewport), in canvas pixel coordinates.
Gets the owning text control.
Gets the area that the viewport covers over the extent, in visual coordinates (lines and columns).
Gets the area that the viewport covers over the extent, in canvas coordinates (screen pixels).
Explicitly sets the viewport position in the canvas (extent) coordinates.
Even though you can pass pixel coodinates to as well, the difference is that this method does not attempt to adjust the scrolling position for the best visibility of the desired point. The viewport left-top corner is positioned as closely to as possible.
Base common impl.
Clears the selection, making the selection range empty and located at the caret location.
If True, collapses to selection anchor (.).
If False, collapses to selection end (.).
Attempts to set the text control selection to the given range.
The denotes the anchor end of the selection (the fixed point of shit+arrowkeys selection).
The is the active end of the selection, ie the caret location.
Gets the converted into document coordinates. This range is normalized.
This range loses the virtual space information. If such is required, you should take the ends and use their appropriate presentations.
Gets the selection range.
The denotes the anchor end of the selection (the fixed point of shit+arrowkeys selection).
The is the active end of the selection, ie the caret location.
Note that the and are not guaranteed to be ordered, ie the end offset might go before the start offset (eg if we're shift+arrow selecting right-to-left); in this case you might use and similar methods to normalize the range.
Gets the owning text control.
Fires when changes. Using directly is preferrable.
The sender of this event is the .
Gets the selection range.
The is the anchor end of the selection (ie the end with the caret position).
Note that the and are not guaranteed to be aligned, ie the end offset might go before the start offset.
Gets the owning text control.
Gets the converted into document coordinates. This range is normalized.
This range loses the virtual space information, for which you should use other conversions of the .
Base impl for text control windows.
Provides various UI framework-related information about the text control.
Creates an anchoring rectangle for the viewport of the text control.
You must dispose of the value after use.
Supposedly, creating a new anchor is cheap after you ask it for the first time on this text control. Calling this function for learning the viewport screen coordinates is OK.
Tries to make True. Even if successful, might not apply immediately, as the changes to the occur in the reentrancy-guarded context only.
Tries to make True. Even if successful, might not apply immediately, as the changes to the occur in the reentrancy-guarded context only.
Gets the class that represent the frame that sites the text control. This frame knows whether it's visible on screen, and sometimes it can cause the environment to switch so that the frame became visible.
In Visual Studio, an example of such frames is an editor tab or a tool window, in which case this implementation is based on the VS Window Frame interface.
Gets whether the window is currently focused.
This property is guarded, which means that all of the property changes will only occur in the guarded context.
Gets whether the window is currently visible onscreen, which tries to take into account not only the visibility flag of the text control window, but also whether the window layout allows the text control contents to be visible onscreen.
This property is guarded, which means that all of the property changes will only occur in the guarded context.
Even though is also available thru the , its value is not synchronized with . This particular property is guaranteed to be high when the text control has keyboard focus, while the frame only reflects what it knows about the environment. Sometimes they do not agree, because not all of the Visual Studio implementation is accurate in details.
Fires when any key (including non-character modifier keys, like Ctrl and Shift) is pressed or released in the text control.
Fires when a mouse button is pressed in this text control.
You can cancel event processing by default text control mouse handlers by raising .
Fires when a mouse cursor is moved over text control (or outside, if mouse is captured).
You can cancel event processing by default text control mouse handlers by raising .
Fires when a mouse button is released in this text control.
You can cancel event processing by default text control mouse handlers by raising .
Gets the owning text control.
Put focus changes in here.
Anchor for the whole viewport.
Lazy-created, then kept until dispose.
Owning frame (VS frame when in VS).
Can be changed under a guard only. Flows from .
Put visibility changes in here.
Initializes a new instance of the class.
Gets whether the user is likely to know the visual layout of this text control.
This means that scrollings and caret movements should better be relative to the current position rather than absolute.
Formally, it's a bool state that raises some time after the control gets visible, and keeps for some small time after it gets hidden. These delays guarantee that (1) short switches back and forth when eg creating from usage in another text control do not affect the picture and (2) after the fresh new text control is opened for the first time the first positioning is done with layout “unknown”.
Should create the anchoring rect core object. Do not use caching, the impl already does it instead of calling the method directly.
Should cause the text control to achieve keyboard focus.
Registers on the window frame.
Returns a that represents the current .
A that represents the current .
2
Creates an anchoring rectangle for the viewport of the text control.
You must dispose of the value after use.
Supposedly, creating a new anchor is cheap after you ask it for the first time on this text control. Calling this function for learning the viewport screen coordinates is OK.
Tries to make True. Even if successful, might not apply immediately, as the changes to the occur in the reentrancy-guarded context only.
Tries to make True. Even if successful, might not apply immediately, as the changes to the occur in the reentrancy-guarded context only.
Gets the class that represent the frame that sites the text control. This frame knows whether it's visible on screen, and sometimes it can cause the environment to switch so that the frame became visible.
In Visual Studio, an example of such frames is an editor tab or a tool window, in which case this implementation is based on the VS Window Frame interface.
Gets whether the window is currently focused.
This property is guarded, which means that all of the property changes will only occur in the guarded context.
Gets whether the window is currently visible onscreen, which tries to take into account not only the visibility flag of the text control window, but also whether the window layout allows the text control contents to be visible onscreen.
This property is guarded, which means that all of the property changes will only occur in the guarded context.
Even though is also available thru the , its value is not synchronized with . This particular property is guaranteed to be high when the text control has keyboard focus, while the frame only reflects what it knows about the environment. Sometimes they do not agree, because not all of the Visual Studio implementation is accurate in details.
Gets the owning text control.
Should create the anchoring rect core object. Do not use caching, the impl already does it instead of calling the method directly.
Should cause the text control to achieve keyboard focus.
Gets the handle to the window represented by the implementer.
A handle to the window represented by the implementer.
1
true if b is between a and c
returns index of bucket where key is found or zero if not found
HashTableParams class describes default behaviour of hash tables
Repaint error stripe no more often than this period.
List of IHighlighters. Sorted in ascending order on both Ys and startoffset.
Initiates the repaint of this error stripe. Must be sinked by the woner and redirected to the shared text view wrapper.
To calculate the y-coordinates, the view size must be known.
Allows to override the HighlighterPositionCache.
Gets the rectangle for the markers, this does not include the error stripe indicator space.
Does the rendering of the error stripe. Guarded.
After , we can calculate new line ratios no more; build a list of valid lines for binarysearching here, and do linear approximation.
Prohibits calculating any new cache entries.
The cache is filled during the render, then frozen and used for tooltips, clicks, etc (because the cache data might be a bit dated, and will collide with new calculations).
Converts the document line number into a scrollbar position ratio [0..1], for displaying a highlighter on the error stripe.
The values are cached.
The mapping is nonlinear because of collapsed regions, word wrapping, and so on.
Called by in case of a cache miss.
Should be doing the calculation itself.
Caches all of the info involved in the retained-state render, to be updated in the whole.
Knows how to dispose of the current value.
We cannot do rendering in because it requires a read lock.
Instead, we render into the back buffer in and just blit it on .
The back buffer is stored here in the native HBITMAP format.
We MUST use native bitmaps at some point to avoid the Error Stripe Disease. In this aspect there is no use of storing the managed Bitmap because we'll have to turn it into an unmanaged on each render, which is more expensive.
Size of the back buffer at , invalid when Null.
Caches the area into which the markers are rendered.
Paints the cached rendered data onscreen. The sizes might differ because of being out-of-date, use the for scaling.
Returns whether the size is still valid; if False, needs a new render.
After the error stripe control is resized and before a new cached render is produced, the difference in sizes is mitigated by scaling. Adjusts the actual y-coordinate of the error stripe control to the coordinates that used to be when the render were generated, to make it valid for the .
Y-coordinate in actual view coordinates.
The actual size of the view.
Y-coordinate in render-cached coordinates.
The render instance is reused if the bitmap dimensions are the same, so that not to recreate the bitmap.
But the must be refreshed. This is not the property setter to accentuate that this is a service method.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
Gets or sets the cache that maps doc-offsets to error stripe y-positions.
Standard impl based on the .
Standard impl based on the .
Helper conversion for deriving screen conversions from canvas ones.
Helper conversion for deriving screen conversions from canvas ones.
Logs activity for -handled things.
Focused text control has changed.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
Derivatives from the info that the has.
They're kept out of the parent object for brevity, and they're kept in one instance because some of them need helper collections to go.
As the text control focus events are delayed for guarding, it may so happen that at some moment more than one text control reports having focus. Keep track of all the textcontrols claiming to have focus.
Note: List not Hash because sometimes VS fails to fire an event (or we to catch it) and we erronousely consider some text control to still have focus. In this case we'd take the most-recently-focused text control from the list.
Gets the text control that most recently had the keyboard focus, unless that text control has been destroyed or we have left the window frame that holds the text control. May be Null. Changes are guarded.
Note that, unlike , this property resets to Null when the focus wanders off to some tool window or another frame of such a kind.
Gets the text control that currently has the keyboard focus. May be Null. Changes are guarded.
Gets the text control that most recently had the keyboard focus, unless that text control has been destroyed. May be Null. Changes are guarded.
Note that this property does not lose its value if focus wanders off to some tool window or another frame of such a kind.
Gets the list of all the text controls that currently exist.
Could be modified on the primary thread in the guarded context only.
(Just like .)
Tracks the list of text controls currently visible on screen.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
Like , but hosts legacy stuff like plain event and property wrappers for the retained-state data points.
Gets the text control that currently has the keyboard focus. May be Null. Changes are guarded.
Fires when the caret moves in the focused text control.
Note: there're no caret move arguments because the event is also fired when the active text control changes.
Does creation and maintenance on behalf of the .
Gets the list of all the text controls that currently exist.
Could be modified on the primary thread in the guarded context only.
Creates the text control of the default kind in the current application environment, and attaches it to the given document (there might be multiple text controls for the same document).
You're responsible for disposing of the returned text control when needed no more.
The document for the text control.
The logical owner of the text control in the UI hierarchy.
The new text control.
Note that Visual Studio Integration uses other methods for attaching to existing Visual Studio text controls.
Creates a new text control for some document (there might be multiple text controls for the same document).
The document and the type of the text control created are determined by the , for which any inheritor could be used.
Type of the text control to create.Text control context and parameters.
The new text control.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
Manages typing handlers for the .
Handles typing in a text control.
If you'd like to receive notifications when user types, see and its method.
Your implementation is called when the user types a character in the text control.
Context information for an .
Allows other handlers to operate.
Typing handlers operate in a chain. You might do your handling before remaining typing handlers, after them, or instead of them, based on whether and when you .
Requests write access for the document of the .
Gets the character that were typed.
Gets the text control we're typing in.
Represents a row of an editor
The extended version of the text control interface.
Historically, these members were present in the original interface. However, they're only used by the implementation (mostly that of the standalone text control), and are optional for the VS-based text controls, especially DevTen.
Maps text control entities to the pixel coordinate system.
Gets the pixel coordinate of the character left point. The column is row-dependent because the in a non-fixed-width font there's no such thing as a row-independent column.
Gets the text extent height, ie the total height of the scrollable text. If the viewport is this large, there is no scrolling.
Gets the text extent width, ie the total width of the scrollable text. If the viewport is this large, there is no scrolling.
Gets the height of the given row.
// TODO: what about wordwrapping?
Gets the width of the given row.
// TODO: what about wordwrapping?
Gets the pixel coordinate of the row top.
Manages the text controls throughout the application.
Creates the text control of the default kind in the current application environment, and attaches it to the given document (there might be multiple text controls for the same document).
You're responsible for disposing of the returned text control when needed no more.
Note that the shell text control might have limitations on which kinds of documents could be used with it.
The document for the text control.
The logical owner of the text control in the UI hierarchy.
The new text control.
Note that Visual Studio Integration uses other methods for attaching to existing Visual Studio text controls.
Creates the simplest text control for the given document (there might be multiple text controls for the same document).
The simplest and most lightweight implementation is used. Use specific with the factory method if you care for the text control type.
You're responsible for disposing of the returned text control when needed no more.
The document for the text control.
The logical owner of the text control in the UI hierarchy.
The new text control.
Creates a new text control for the document (there might be multiple text controls for the same document).
The document and the type of the text control created are determined by the , for which any inheritor could be used.
Type of the text control to create.
Text control context and parameters.
The new text control.
Gets the text control that most recently had the keyboard focus, unless that text control has been destroyed or we have left the window frame that holds the text control. May be Null. Changes are guarded.
Note that, unlike , this property resets to Null when the focus wanders off to some tool window or another frame of such a kind.
Gets the text control that currently has the keyboard focus. May be Null. Changes are guarded.
Gets the text control that most recently had the keyboard focus, unless that text control has been destroyed. May be Null. Changes are guarded.
Note that this property does not lose its value if focus wanders off to some tool window or another frame of such a kind.
Legacy wrappers to expose the collections and property changes as raw CLR events.
Gets the list of all the text controls that currently exist.
Could be modified on the primary thread in the guarded context only.
Tracks the list of text controls currently visible on screen. There is no specific order on the text visible controls. This collection is live.
Gets the document text for the selected range.
Tells whether the selection is non-empty.
Otherwise, the selection range will be placed at the position.
Sets selection to a range given in the document coordinates.
Switches between and with a boolean param.
Gets the document highlighters.
in this assembly.
Type disambig for .
Represents zero-based column indices in the text control view.
This does not correspond directly to the document lines and columns because of the collapsed regions and other view transformations.
Type disambig for .
Represents zero-based line indices in the text control view.
This does not correspond directly to the document lines and columns because of the collapsed regions and other view transformations.
Represents the document position in terms of Line and Column indices.
Note that this has nothing to do with screen pixels, for which there's the Canvas Rectangle and the class.
Gets a new visual position located at the same row as the original one, but in the first column.
Returns a new position with the same row and an offset column.
Does not change the current object.
A range between two s.
Normalizes the range so that its start position went before the end position.
Indicates whether this instance and a specified object are equal.
true if and this instance are the same type and represent the same value; otherwise, false.
Another object to compare to. 2
Returns the hash code for this instance.
A 32-bit signed integer that is the hash code for this instance.
2
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Arguments for text control events.
Create. Point is known, keys/button states are queried from system.
Create.
Set to True if you'd like to prevent default handlers from processing the message.
Which keyboard modifier keys and mouse buttons were pressed when the event was fired.
Mouse cursor position, in screen coordinates. Might be outside text control if the event is keyboard-induced.
The originating text control.
Gets the arguments corresponding to the current mouse position onscreen and keyboard state.
Might be outside the text control.
Whether the error stripe should be shown in the Text Control.
The error stripe marks are added thru the document markers API, and the error stripe indicator state is specified right in the text control, with its .
Applies when the text control is scrolled to reveal a certain position.
Defines how the desired position will be accomodared inside the viewport area.
Scrolls so that the position is visible anywhere in the viewport.
There're no other guarantees or heuristics applied.
Scrolls so that the position were at about the center of the viewport.
The view is scrolled even if the position is already visible.
Scrolls so that the position were at about the top of the viewport.
The view is scrolled even if the position is already visible.
Scrolls so that the position were in the upper half of the viewport.
The view is scrolled even if the position is already visible.
Scrolls so that the position were in the lower half of the viewport.
The view is scrolled even if the position is already visible.
Smart scrolling mode. Should be used in most cases.
Does minimal scrolling (or none at all) required to place the position into the viewport not too close to its edges.
If the position is already visible in the view and is not too close to the edges, no scrolling is performed. This fits for navigating adjacent occurences without the view jumping.
Otherwise, places the position above the viewport center if it were above the viewport, and vice versa.
A flavor of for special cases. Relaxes the “not too close to the edge” constraint: would not scroll against the direction if the target is at least visible.
A flavor of for special cases. Relaxes the “not too close to the edge” constraint: would not scroll against the direction if the target is at least visible.
Base implementation for .
Aggregate. Manages adding/removing typing handlers and executing typing on them.
An aggregate for the data derived from other aspects of the text control manager.
Aggregates creation and maintenance.
Initializes a new instance of the class.
In the window frame bag, identifies the text control attached to the window frame.
Guarded set/clear.
Chooses the type for the begind.
Creates the text control of the default kind in the current application environment, and attaches it to the given document (there might be multiple text controls for the same document).
You're responsible for disposing of the returned text control when needed no more.
The document for the text control.
The new text control.
Note that Visual Studio Integration uses other methods for attaching to existing Visual Studio text controls.
Creates the simplest text control for the given document (there might be multiple text controls for the same document).
The simplest and most lightweight implementation is used. Use specific with the factory method if you care for the text control type.
You're responsible for disposing of the returned text control when needed no more.
The document for the text control.
The new text control.
Creates a new text control for some document (there might be multiple text control for the same document).
The document and the type of the text control created are determined by the , for which any inheritor could be used.
Type of the text control to create.
Text control context and parameters.
The new text control.
Gets the text control that most recently had the keyboard focus, unless that text control has been destroyed or we have left the window frame that holds the text control. May be Null. Changes are guarded.
Note that, unlike , this property resets to Null when the focus wanders off to some tool window or another frame of such a kind.
Gets the text control that currently has the keyboard focus. May be Null. Changes are guarded.
Gets the text control that most recently had the keyboard focus, unless that text control has been destroyed. May be Null. Changes are guarded.
Note that this property does not lose its value if focus wanders off to some tool window or another frame of such a kind.
Legacy wrappers to expose the collections and property changes as raw CLR events.
Gets the list of all the text controls that currently exist.
Could be modified on the primary thread in the guarded context only.
Tracks the list of text controls currently visible on screen. There is no specific order on the text visible controls. This collection is live.
dsl
Indicates whether the current object is equal to another object of the same type.
true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Indicates whether this instance and a specified object are equal.
true if and this instance are the same type and represent the same value; otherwise, false.
Another object to compare to. 2
Returns the hash code for this instance.
A 32-bit signed integer that is the hash code for this instance.
2
Compares columns for search
Document (model + some of the controller) for the standalone text control version.
Gets whether the given document position is present in the text view of the text control.
The document position in the unified position format (. or .).
Even though every position could be converted to a text view (and usually a reasonable value will be returned), sometimes that would be only an approximate position (that would not roundtrip). For example, a document position could be hidden from the text view by a collapsed region.
Note(H): once this used to be an member, but as it has no xmldoc, no usages, and no VS implementation, I've pushed it out to standalone impl only.
Returns a that represents the current .
A that represents the current .
2
Provides access to the text control coordinate conversion, which makes it possible to represent a point on the text control or in the document in a unified way.
Gets the Disposables collection that controls the text control lifetime.
Emulats text control focus in tests.
Should create the anchoring rect core object. Do not use caching, the impl already does it instead of calling the method directly.
Document markup factory.
Adds highlighter with attributes from HighlighterAttributeRegistry
Gets the document highlighted by this markup.
Fired when highlighter is added.
Fired when highlighter's user data is modified.
Fired when highlighter is explicitly removed.
Gets the document highlighted by this markup.
List of colors, delimited by ':'
In case of VS2003 first COLORINDEX color will be used
List of colors, delimited by ':'
In case of VS2003 first COLORINDEX color will be used
List of colors, delimited by ':'
In case of VS2003 first COLORINDEX color will be used
Initializes a new instance of the class.