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

O(log n) find, DrawHandle::text_effects, tab entry #133

Merged
merged 9 commits into from
Oct 31, 2020
Merged

O(log n) find, DrawHandle::text_effects, tab entry #133

merged 9 commits into from
Oct 31, 2020

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Oct 31, 2020

The WidgetChildren::find and find_mut methods now use binary search to achieve O(log n) performance over large numbers of children. This is only really relevant on large lists of children and still probably not the most significant cost, but is another step towards #91.

Other changes depend on these changes: kas-gui/kas-text#34

EditBox now enters \t on the Tab key to allow testing the new tab support. (Should be configurable later, or depend on the use case?)

Added DrawHandle::text_effects and revised DrawText methods. We can now forward effects like strikethrough from parsed text. We keep DrawHandle::text_accel (since behaviour depends on an extra state parameter), but move the effect-list creation up to AccelString.

@dhardy dhardy merged commit 6dff4dd into master Oct 31, 2020
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

Successfully merging this pull request may close these issues.

1 participant