Add uiScrollView GTK implementation #534
Open
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 adds a
uiScrollView
control which implements a scrolling container for a single child control. I have implemented this for the GTK backend.I don't use windows or OS X so I have not implemented this for those platforms, but looking into it it seems like this will be trivial to do on OS X and not too difficult on windows.
I have tried to keep the interface that
uiScrollView
exposes consistent with the rest of libui, but let me know if there are any changes that need to be made, I may implement this for the win32 backend if I have time.One thing I was not sure about are the signatures in controlsigs.h, I just put the md5 sum of "uiScrollView" as its signature since I could not find any documentation as to what this value should be.
I've also added a small example program that just shows a bunch of buttons in a scrollable window. Note that the scroll bar is not visible in the screenshot but it's there and works as expected.