/// <summary> /// Pastes the contents of the clipboard at the current caret position. /// </summary> public void Paste() { if (PART_Editor != null) { PART_Editor.Paste(); } }
/// <summary> /// Sets the password which has been entered into the password box. /// </summary> /// <param name="value">A <see cref="StringSegment"/> containing password to set.</param> public void SetPassword(StringSegment value) { if (PART_Editor != null) { PART_Editor.SetPassword(value); } }
/// <summary> /// Selects the specified range of text. /// </summary> /// <param name="start">The index of the first character to select.</param> /// <param name="length">The number of characters to select.</param> public void Select(Int32 start, Int32 length) { if (PART_Editor != null) { PART_Editor.Select(start, length); } }
/// <summary> /// Selects the entirety of the editor's text. /// </summary> public void SelectAll() { if (PART_Editor != null) { PART_Editor.SelectAll(); } }
/// <summary> /// Clears the password box's content. /// </summary> public void Clear() { if (PART_Editor != null) { PART_Editor.Clear(); } }
/// <summary> /// Sets the password which has been entered into the password box. /// </summary> /// <param name="value">A <see cref="StringBuilder"/> containing password to set.</param> public void SetPassword(StringBuilder value) { if (PART_Editor != null) { PART_Editor.SetPassword(value); } }
/// <summary> /// Gets the password which has been entered into the password box. /// </summary> /// <param name="stringBuilder">A <see cref="StringBuilder"/> to populate with the password which has been entered into the password box.</param> public void GetPassword(StringBuilder stringBuilder) { Contract.Require(stringBuilder, nameof(stringBuilder)); if (PART_Editor != null) { PART_Editor.GetPassword(stringBuilder); } }
/// <inheritdoc/> protected override void OnMouseDoubleClick(MouseDevice device, MouseButton button, ref RoutedEventData data) { if (PART_Editor != null && IsMouseWithinEditor()) { PART_Editor.HandleMouseDoubleClick(device, button, ref data); } base.OnMouseDoubleClick(device, button, ref data); }
/// <summary> /// Gets the password which has been entered into the password box. /// </summary> /// <returns>A string containing the password which has been entered into the password box.</returns> public String GetPassword() { if (PART_Editor != null) { return(PART_Editor.GetPassword()); } return(String.Empty); }
/// <inheritdoc/> protected override void OnTextEditing(KeyboardDevice device, RoutedEventData data) { if (PART_Editor != null) { PART_Editor.HandleTextEditing(device, data); } base.OnTextEditing(device, data); }
/// <inheritdoc/> protected override void OnTextInput(KeyboardDevice device, ref RoutedEventData data) { if (PART_Editor != null) { PART_Editor.HandleTextInput(device, ref data); } base.OnTextInput(device, ref data); }
/// <inheritdoc/> protected override void OnKeyDown(KeyboardDevice device, Key key, ModifierKeys modifiers, ref RoutedEventData data) { if (PART_Editor != null) { PART_Editor.HandleKeyDown(device, key, modifiers, ref data); } base.OnKeyDown(device, key, modifiers, ref data); }
/// <inheritdoc/> protected override void OnPreviewTouchUp(TouchDevice device, Int64 id, RoutedEventData data) { if (PART_Editor != null && IsTouchWithinEditor(id)) { PART_Editor.HandleTouchUp(device, id, data); data.Handled = true; } base.OnPreviewTouchUp(device, id, data); }
/// <inheritdoc/> protected override void OnMouseMove(MouseDevice device, Double x, Double y, Double dx, Double dy, ref RoutedEventData data) { if (PART_Editor != null) { PART_Editor.HandleMouseMove(device, ref data); } data.Handled = true; base.OnMouseMove(device, x, y, dx, dy, ref data); }
/// <inheritdoc/> protected override void OnLostMouseCapture(RoutedEventData data) { if (PART_Editor != null) { PART_Editor.HandleLostMouseCapture(); } data.Handled = true; base.OnLostMouseCapture(data); }
/// <inheritdoc/> protected override void OnPreviewTouchLongPress(TouchDevice device, Int64 id, Double x, Double y, Single pressure, RoutedEventData data) { if (PART_Editor != null && IsTouchWithinEditor(id)) { PART_Editor.HandleTouchLongPress(device, id, x, y, pressure, data); data.Handled = true; } base.OnPreviewTouchLongPress(device, id, x, y, pressure, data); }
/// <inheritdoc/> protected override void OnLostKeyboardFocus(KeyboardDevice device, IInputElement oldFocus, IInputElement newFocus, RoutedEventData data) { Ultraviolet.GetInput().HideSoftwareKeyboard(); if (PART_Editor != null) { PART_Editor.HandleLostKeyboardFocus(); } UpdateIsSelectionActive(); base.OnLostKeyboardFocus(device, oldFocus, newFocus, data); }
/// <inheritdoc/> protected override void OnGotKeyboardFocus(KeyboardDevice device, IInputElement oldFocus, IInputElement newFocus, ref RoutedEventData data) { Ultraviolet.GetInput().ShowSoftwareKeyboard(KeyboardMode.Text); if (PART_Editor != null) { PART_Editor.HandleGotKeyboardFocus(); } UpdateIsSelectionActive(); base.OnGotKeyboardFocus(device, oldFocus, newFocus, ref data); }
/// <inheritdoc/> protected override void OnPreviewTouchMove(TouchDevice device, Int64 id, Double x, Double y, Double dx, Double dy, Single pressure, RoutedEventData data) { if (PART_Editor != null) { var capture = Touch.GetCaptured(View, id); if (capture == this || capture == null) { PART_Editor.HandleTouchMove(device, id, x, y, dx, dy, pressure, data); data.Handled = true; } } base.OnPreviewTouchMove(device, id, x, y, dx, dy, pressure, data); }
/// <inheritdoc/> protected override void OnPreviewMouseMove(MouseDevice device, Double x, Double y, Double dx, Double dy, RoutedEventData data) { if (PART_Editor != null) { var capture = Mouse.GetCaptured(View); if (capture == null || capture == this) { PART_Editor.HandleMouseMove(device, data); data.Handled = true; } } base.OnPreviewMouseMove(device, x, y, dx, dy, data); }
/// <inheritdoc/> protected override void OnPreviewMouseUp(MouseDevice device, MouseButton button, RoutedEventData data) { if (button == MouseButton.Left) { ReleaseMouseCapture(); } if (PART_Editor != null && IsMouseWithinEditor()) { PART_Editor.HandleMouseUp(device, button, data); data.Handled = true; } base.OnPreviewMouseUp(device, button, data); }
/// <inheritdoc/> protected override void OnMouseDown(MouseDevice device, MouseButton button, ref RoutedEventData data) { if (button == MouseButton.Left) { Focus(); CaptureMouse(); } if (PART_Editor != null && IsMouseWithinEditor()) { PART_Editor.HandleMouseDown(device, button, ref data); } data.Handled = true; base.OnMouseDown(device, button, ref data); }
/// <inheritdoc/> protected override void OnPreviewTouchDown(TouchDevice device, Int64 id, Double x, Double y, Single pressure, RoutedEventData data) { if (!Ultraviolet.GetInput().IsMouseCursorAvailable&& device.IsFirstTouchInGesture(id)) { Focus(); } if (PART_Editor != null && IsTouchWithinEditor(id)) { CaptureTouch(id); PART_Editor.HandleTouchDown(device, id, x, y, pressure, data); data.Handled = true; } UpdateTextInputRegion(); Ultraviolet.GetInput().ShowSoftwareKeyboard(); base.OnPreviewTouchDown(device, id, x, y, pressure, data); }