Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch/Pen Support #1

Open
GetGet99 opened this issue Mar 19, 2023 · 1 comment
Open

Touch/Pen Support #1

GetGet99 opened this issue Mar 19, 2023 · 1 comment

Comments

@GetGet99
Copy link

Here are some features I wanted for touch/pen support, to maintain similar behavior with RichEditBox in WinUI.

  1. Touch/Pen dragging up and down should scroll instead of selecting text.
  2. Double Tapping should work with a slightly different position. In other words, it is hard for touch users to double tab in the exact same pixel.
  3. This one will be tricky and maybe low priority. For touch, double tab to select the text, and have these two circles that can be dragged around (Referencing the image). For pen, "right-click drag" to select the text, and also shows the two circles that can be dragged around too.
    Screenshot 2023-03-18 230809
@BreeceW
Copy link
Owner

BreeceW commented Mar 19, 2023

Drag to scroll for touch is something I plan on adding. I think the best way to do that would be with XAML manipulation events.

Scintilla already handles the scenario where double clicking isn’t at the exact same pixel, but WinUIEdit does seem like it isn’t responding as well to double click as the Scintilla reference editor on win32. It’s possible that Windows is doing some kind of emulation for intercepting touch double taps and converting them to exact double clicks, but that’s just a guess. We can probably just increase the double click distance threshold in ScintillaWinUI and be fine. doubleClickCloseThreshold

Drag handles would certainly be a larger undertaking and would might require forking Scintilla code. As a long-term goal, I do want full touch support. Update: WinUI draws text handles using a Canvas, two ellipses, and a rectangle. We can reference the code in dxaml\xcp\core\text\common\Gripper.cpp in WinUI 3 to make an exact replica.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants