|
|
|
|
|
|
DragStartBehavior dragStartBehavior = DragStartBehavior.down, |
|
|
|
bool? enableInteractiveSelection = null, |
|
|
|
ScrollPhysics scrollPhysics = null, |
|
|
|
Func<RawKeyEvent, bool> globalCtrlKeyEventHandler = null |
|
|
|
GlobalKeyEventHandlerDelegate globalCtrlKeyEventHandler = null |
|
|
|
) : base(key) { |
|
|
|
D.assert(controller != null); |
|
|
|
D.assert(focusNode != null); |
|
|
|
|
|
|
public readonly DragStartBehavior dragStartBehavior; |
|
|
|
public readonly bool? enableInteractiveSelection; |
|
|
|
public readonly ScrollPhysics scrollPhysics; |
|
|
|
public readonly Func<RawKeyEvent, bool> globalKeyEventHandler; |
|
|
|
public readonly GlobalKeyEventHandlerDelegate globalKeyEventHandler; |
|
|
|
|
|
|
|
public bool selectionEnabled { |
|
|
|
get { return this.enableInteractiveSelection ?? !this.obscureText; } |
|
|
|
|
|
|
curve: Curves.decelerate); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public RawInputKeyResponse globalInputKeyHandler(RawKeyEvent evt) { |
|
|
|
return this.widget.globalKeyEventHandler?.Invoke(evt, true) ?? RawInputKeyResponse.convert(evt); |
|
|
|
} |
|
|
|
|
|
|
|
void _onFloatingCursorResetTick() { |
|
|
|
|
|
|
enableInteractiveSelection: this.widget.enableInteractiveSelection == true, |
|
|
|
textSelectionDelegate: this, |
|
|
|
devicePixelRatio: this._devicePixelRatio, |
|
|
|
globalKeyEventHandler: this.widget.globalKeyEventHandler |
|
|
|
globalKeyEventHandler : this.widget.globalKeyEventHandler |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
|
|
|
public readonly TextSelectionDelegate textSelectionDelegate; |
|
|
|
public readonly bool? paintCursorAboveText; |
|
|
|
public readonly float? devicePixelRatio; |
|
|
|
public readonly Func<RawKeyEvent, bool> globalKeyEventHandler; |
|
|
|
|
|
|
|
public readonly GlobalKeyEventHandlerDelegate globalKeyEventHandler; |
|
|
|
|
|
|
|
public _Editable(TextSpan textSpan = null, |
|
|
|
TextEditingValue value = null, |
|
|
|
|
|
|
bool enableInteractiveSelection = true, |
|
|
|
bool? paintCursorAboveText = null, |
|
|
|
float? devicePixelRatio = null, |
|
|
|
Func<RawKeyEvent, bool> globalKeyEventHandler = null) : base(key) { |
|
|
|
GlobalKeyEventHandlerDelegate globalKeyEventHandler = null) : base(key) { |
|
|
|
this.textSpan = textSpan; |
|
|
|
this.value = value; |
|
|
|
this.cursorColor = cursorColor; |
|
|
|
|
|
|
textSelectionDelegate: this.textSelectionDelegate, |
|
|
|
paintCursorAboveText: this.paintCursorAboveText == true, |
|
|
|
devicePixelRatio: this.devicePixelRatio ?? 1.0f, |
|
|
|
globalKeyEventHandler: this.globalKeyEventHandler |
|
|
|
globalKeyEventHandler : this.globalKeyEventHandler |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|