|
13 hours ago | |
---|---|---|
tests | 13 hours ago | |
LICENSE | 1 year ago | |
README.md | 2 months ago | |
actors.red | 2 days ago | |
auxi.red | 4 days ago | |
comments | 15 hours ago | |
console.red | 2 months ago | |
creators.md | 2 months ago | |
debug-helpers.red | 1 week ago | |
events.red | 20 hours ago | |
everything.red | 20 hours ago | |
focus.red | 20 hours ago | |
hittest.red | 12 months ago | |
hovering.red | 20 hours ago | |
layouts.red | 2 weeks ago | |
popups.red | 18 hours ago | |
quickstart.md | 2 months ago | |
reference.md | 2 months ago | |
rendering.red | 13 hours ago | |
run.bat | 2 months ago | |
single-click.red | 20 hours ago | |
standard-handlers.red | 3 days ago | |
styles.red | 6 days ago | |
tabbing.red | 3 days ago | |
templates.red | 13 hours ago | |
timers.red | 20 hours ago | |
traversal.red | 12 months ago | |
vid.red | 15 hours ago |
README.md
Table of Contents
RED SPACES - DRAW-BASED WIDGET LIBRARY FOR RED
Official URL of this project: https://codeberg.org/hiiamboris/red-spaces
Examples (clickable)
Spiral editable field | Table |
---|---|
![]() |
![]() |
Infinite list of items of varying size | Self-containing grid |
![]() |
![]() |
>> MORE DEMOS IN /TESTS <<
Spiral Field demo reuses the normal rectangular field
space (that contains all the keyboard logic and everything) by transforming hittest coordinates in a spiral way. Rendering logic of course had to be rewritten because such complex transformations are far beyond Draw capabilities. That's why it's a bit laggy: it renders each character individually.
Table demo demonstrates how events are handled naturally even on a rotated layout.
Infinite List's trick is that when items vary in height, it's hard to provide uniform scrolling (naive desings would scroll at item granularity) and at the same time make it respond in real time to user actions.
Self-containing grid shows that there are no limitations: every space can contain any other space, or even itself (but then one has to manually limit the rendering depth or stack will overflow ☻).
Docs
- Quickstart - if you just wanna use one in your program
- Widget Reference - if you're interested in what Spaces are available and how they work
- Creators Guide - will describe the architecture and help you write your own Spaces
Status
Alpha stage. Some design changes possible, risk of breaking changes. Not very high-level yet.
Good enough to experiment with, and to propose design enhancements and feature requests.
By component | State |
---|---|
Widget architecture | Mostly stable |
Events | Mostly stable |
Timers | Stable |
Styling | Mostly stable |
Focus model | Mostly stable |
Tabbing | Mostly stable |
Spatial navigation | Not implemented |
Resize model | Need a powerful simple design idea, ideally that would apply to faces too |
Layout | Embedded into View layout seamlessly, but very basic: only accepts space names and with |
Grid/Table | Requires interactivity: columns dragging, sorting, filtering |
Reactivity | Waiting for PR #4529 (reactivity has to be scalable for Spaces scope) |
User's guide | Written |
Widget reference | Written |
Creator's guide | Written |
Templates | None made so far |
Goals
- make complex widgets portable and accessible
- make it possible to create custom widgets easily
- implement a set of complex widgets in their basic form, to serve as templates
- test various UI framework ideas, see how they work and if they could improve View
- make styling of UI an easy and fun undertaking
- provide a basis for dynamic animated UIs (animation dialects and 2D game engines may be based upon this project)
Help & feedback
If you find it too complex to achieve some task, you can ask my advice on Gittard.
When you spot bugs or other issues you can report them also on Gittard or by creating an issue report or wish request in this repository. Improvement ideas are also welcome :)