Browse Source

Adjust naming

pull/11848/head
Benedikt Stebner 3 years ago
parent
commit
a445f884f6
  1. 8
      src/Avalonia.Base/Input/TextInput/TextInputMethodClient.cs
  2. 14
      src/Avalonia.Controls/TextBoxTextInputMethodClient.cs

8
src/Avalonia.Base/Input/TextInput/TextInputMethodClient.cs

@ -59,22 +59,22 @@ namespace Avalonia.Input.TextInput
/// </summary>
public virtual void SetPreeditText(string? preeditText) { }
protected virtual void OnTextViewVisualChanged()
protected virtual void RaiseTextViewVisualChanged()
{
TextViewVisualChanged?.Invoke(this, EventArgs.Empty);
}
protected virtual void OnCursorRectangleChanged()
protected virtual void RaiseCursorRectangleChanged()
{
CursorRectangleChanged?.Invoke(this, EventArgs.Empty);
}
protected virtual void OnSurroundingTextChanged()
protected virtual void RaiseSurroundingTextChanged()
{
SurroundingTextChanged?.Invoke(this, EventArgs.Empty);
}
protected virtual void OnSelectionChanged()
protected virtual void RaiseSelectionChanged()
{
SelectionChanged?.Invoke(this, EventArgs.Empty);
}

14
src/Avalonia.Controls/TextBoxTextInputMethodClient.cs

@ -104,7 +104,7 @@ namespace Avalonia.Controls
_parent.SelectionStart = selectionStart;
_parent.SelectionEnd = selectionEnd;
OnSelectionChanged();
RaiseSelectionChanged();
}
}
@ -132,19 +132,19 @@ namespace Avalonia.Controls
{
oldPresenter.ClearValue(TextPresenter.PreeditTextProperty);
oldPresenter.CaretBoundsChanged -= (s,e) => OnCursorRectangleChanged();
oldPresenter.CaretBoundsChanged -= (s,e) => RaiseCursorRectangleChanged();
}
_presenter = presenter;
if (_presenter != null)
{
_presenter.CaretBoundsChanged += (s, e) => OnCursorRectangleChanged();
_presenter.CaretBoundsChanged += (s, e) => RaiseCursorRectangleChanged();
}
OnTextViewVisualChanged();
RaiseTextViewVisualChanged();
OnCursorRectangleChanged();
RaiseCursorRectangleChanged();
}
public override void SetPreeditText(string? preeditText)
@ -184,12 +184,12 @@ namespace Avalonia.Controls
{
if (e.Property == TextBox.TextProperty)
{
OnSurroundingTextChanged();
RaiseSurroundingTextChanged();
}
if (e.Property == TextBox.SelectionStartProperty || e.Property == TextBox.SelectionEndProperty)
{
OnSelectionChanged();
RaiseSelectionChanged();
}
}
}

Loading…
Cancel
Save