Add scrollbox
lukesutton opened this issue · comments
Luke Matthew Sutton commented
Container sizing options. Border options. Displays a scroll bar, which displays an offset based on the width/height of its content. Can only be in horizontal or vertical layout, not both.
Implementation:
- Its contents are an Auto layout, to which views are added.
- This layout has it's width or height — depending on orientation — set to Hug
- The resulting dimension is stored by scroll box
- It respects the sizing specified by the user, but in order to calculate the offset of it's views, uses that cached dimension.
Supporting the above will likely require a new feature for rendering a view, then extracting a buffer which covers a sub-section of it. This could be a general feature added to the View trait, Layouts, or kept private to the scroll box view.