fix: remove useless code in IPBox IME.

This commit is contained in:
Dong Bin
2025-02-27 16:03:14 +08:00
parent bb6d457338
commit 68065b216e

View File

@@ -4,28 +4,21 @@ using Avalonia.Input.TextInput;
namespace Ursa.Controls;
public class IPv4BoxInputMethodClient:TextInputMethodClient
public class IPv4BoxInputMethodClient: TextInputMethodClient
{
private TextPresenter? _presenter;
public override Visual TextViewVisual => _presenter;
public override Visual TextViewVisual => _presenter!;
public override bool SupportsPreedit => false;
public override bool SupportsSurroundingText => true;
public override string SurroundingText
{
get;
}
public override Rect CursorRectangle { get; }
public override string SurroundingText { get; } = null!;
public override Rect CursorRectangle { get; } = new();
public override TextSelection Selection { get; set; }
private IPv4Box? _parent;
public void SetPresenter(TextPresenter? presenter)
{
_presenter = presenter;
this.RaiseTextViewVisualChanged();
this.RaiseCursorRectangleChanged();
}
private void OnParentPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
{
this.RaiseSelectionChanged();
}
}