Class SearchContext
- Namespace
- GtkSource
- Assembly
- GtkSource-5.dll
public class SearchContext : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
SearchContext
- Implements
- Inherited Members
Constructors
SearchContext(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public SearchContext(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
SearchContext(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected SearchContext(CreationData data)
Parameters
dataCreationData
SearchContext(SearchContextHandle)
protected SearchContext(SearchContextHandle handle)
Parameters
handleSearchContextHandle
Fields
BufferPropertyDefinition
public static readonly Property<Buffer?, SearchContext> BufferPropertyDefinition
Field Value
HighlightPropertyDefinition
public static readonly Property<bool, SearchContext> HighlightPropertyDefinition
Field Value
MatchStylePropertyDefinition
public static readonly Property<Style?, SearchContext> MatchStylePropertyDefinition
Field Value
OccurrencesCountPropertyDefinition
public static readonly Property<int, SearchContext> OccurrencesCountPropertyDefinition
Field Value
RegexErrorPropertyDefinition
public static readonly Property<Error, SearchContext> RegexErrorPropertyDefinition
Field Value
SettingsPropertyDefinition
public static readonly Property<SearchSettings?, SearchContext> SettingsPropertyDefinition
Field Value
Properties
Buffer
public Buffer? Buffer { get; }
Property Value
Highlight
public bool Highlight { get; set; }
Property Value
MatchStyle
public Style? MatchStyle { get; set; }
Property Value
OccurrencesCount
public int OccurrencesCount { get; }
Property Value
RegexError
public Error RegexError { get; }
Property Value
Settings
public SearchSettings? Settings { get; }
Property Value
Methods
Backward(TextIter, out TextIter, out TextIter, out bool)
public bool Backward(TextIter iter, out TextIter matchStart, out TextIter matchEnd, out bool hasWrappedAround)
Parameters
Returns
BackwardFinish(AsyncResult, out TextIter, out TextIter, out bool)
public bool BackwardFinish(AsyncResult result, out TextIter matchStart, out TextIter matchEnd, out bool hasWrappedAround)
Parameters
resultAsyncResultmatchStartTextItermatchEndTextIterhasWrappedAroundbool
Returns
Forward(TextIter, out TextIter, out TextIter, out bool)
public bool Forward(TextIter iter, out TextIter matchStart, out TextIter matchEnd, out bool hasWrappedAround)
Parameters
Returns
ForwardFinish(AsyncResult, out TextIter, out TextIter, out bool)
public bool ForwardFinish(AsyncResult result, out TextIter matchStart, out TextIter matchEnd, out bool hasWrappedAround)
Parameters
resultAsyncResultmatchStartTextItermatchEndTextIterhasWrappedAroundbool
Returns
GetBuffer()
public Buffer GetBuffer()
Returns
GetGType()
public static Type GetGType()
Returns
GetHighlight()
public bool GetHighlight()
Returns
GetMatchStyle()
public Style GetMatchStyle()
Returns
GetOccurrencePosition(TextIter, TextIter)
public int GetOccurrencePosition(TextIter matchStart, TextIter matchEnd)
Parameters
Returns
GetOccurrencesCount()
public int GetOccurrencesCount()
Returns
GetRegexError()
public Error? GetRegexError()
Returns
GetSettings()
public SearchSettings GetSettings()
Returns
New(Buffer, SearchSettings?)
public static SearchContext New(Buffer buffer, SearchSettings? settings)
Parameters
bufferBuffersettingsSearchSettings
Returns
NewFromPointer(nint, bool)
Creates a new managed SearchContext instance for a given pointer.
public static SearchContext NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new SearchContext and sets the properties specified by the construct arguments.
public static SearchContext NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
Replace(TextIter, TextIter, string, int)
public bool Replace(TextIter matchStart, TextIter matchEnd, string replace, int replaceLength)
Parameters
Returns
ReplaceAll(string, int)
public uint ReplaceAll(string replace, int replaceLength)
Parameters
Returns
SetHighlight(bool)
public void SetHighlight(bool highlight)
Parameters
highlightbool
SetMatchStyle(Style?)
public void SetMatchStyle(Style? matchStyle)
Parameters
matchStyleStyle