Skip to content
New issue

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

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

Already on GitHub? # to your account

Scrollables / Clippables #24

Closed
hecrj opened this issue Oct 23, 2019 · 0 comments · Fixed by #35
Closed

Scrollables / Clippables #24

hecrj opened this issue Oct 23, 2019 · 0 comments · Fixed by #35
Assignees
Labels
feature New feature or request
Milestone

Comments

@hecrj
Copy link
Member

hecrj commented Oct 23, 2019

Content that can take a (practically) infinite amount of space and can be viewed using a scrollbar. This is a very basic feature.

The end-user API could look like this:

Column::new()
    .push(content)
    .scroll(&mut self.scroll_state);

The challenge here is composability. Nested scrollables should work as expected.

When it comes to iced_native, we may need to add the concept of event propagation, so mouse wheel events can be captured by the inner-most scrollable and stop propagation.

When it comes to iced_wgpu, we should be able to use scissoring and transformations. wgpu has a RenderPass::set_scissor_rect that should work nicely.

The main issue here will be wgpu_glyph, which is used currently to render text primitives. wgpu_glyph is powered by glyph-brush, which caches glyphs to render text very fast. However, the current cache model does not seem to be composable (i.e. once you issue a draw call the cache is purged). We will need to change it (and potentially contribute) to accommodate for this use case.

@hecrj hecrj added the feature New feature or request label Oct 23, 2019
@hecrj hecrj added this to the 0.1.0 milestone Oct 23, 2019
This was referenced Oct 23, 2019
@hecrj hecrj added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Oct 23, 2019
@hecrj hecrj self-assigned this Oct 25, 2019
@hecrj hecrj mentioned this issue Oct 29, 2019
4 tasks
@hecrj hecrj closed this as completed in #35 Nov 3, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant