Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is still largely incomplete, inefficient, will break when used with certain configurable event transformers and has bugs with line_infos.
Still, it runs! The code demonstrates at least part of the design, and does compile.
Progress so far: I have added TextEvent, changed TextEdit to give Vec, and modified things enough to compile.
Things left to do:
event_transform
can turn any event into any other event, so this will be necessaryBesides pure programming, there are a few things I'm not sure what to decide on:
decide on whether to use
smallstring::SmallString
,String
, orchar
for events. We're usually just typing one character at a time, but we might type more. I choseSmallString
initially as a compromise, but we might want to do something different.decide on if support for "passing through opaque "data" events" from event transformers is a good idea
decide on if event transformers themselves are a reasonable idea.
I chose to add them because I wanted to uphold "multiple keypress/typing/clicking events should function the same whether they're in the same conrod 'frame' or not". If a TextEdit wrapper was choosing to disallow numbers, the "event transform" allows TextEdit to know the wrapper has done this when it's processing the next bit of input.
Replaces #964.