|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.gestures; |
|
|
|
using Unity.UIWidgets.painting; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public TextSelection selection { |
|
|
|
get { |
|
|
|
return this._selection; |
|
|
|
} |
|
|
|
get { return this._selection; } |
|
|
|
if (this._selection == value) { |
|
|
|
return; |
|
|
|
if (this._selection == value) { |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
this._selection = value; |
|
|
|
this._selectionRects = null; |
|
|
|
this.markNeedsPaint(); |
|
|
|
|
|
|
|
|
|
|
public TextPosition getParagraphBackward(TextPosition position, TextAffinity? affinity = null) { |
|
|
|
var lineCount = this._textPainter.getLineCount(); |
|
|
|
|
|
|
|
|
|
|
|
Paragraph.LineRange line = null; |
|
|
|
for (int i = lineCount - 1; i >= 0; --i) { |
|
|
|
line = this._textPainter.getLineRange(i); |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void setFloatingCursor(FloatingCursorDragState? state, Offset boundedOffset, TextPosition lastTextPosition, |
|
|
|
public void setFloatingCursor(FloatingCursorDragState? state, Offset boundedOffset, |
|
|
|
TextPosition lastTextPosition, |
|
|
|
float? resetLerpValue = null) { |
|
|
|
D.assert(boundedOffset != null); |
|
|
|
D.assert(lastTextPosition != null); |
|
|
|