Draw based widgets for Red
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hiiamboris 094b3e8089 FIX: list other text facets in on-change 13 hours ago
tests FIX: workaround for shared rich text object 13 hours ago
LICENSE Add LICENSE 1 year ago
README.md DOC: added url for mirror visitors 2 months ago
actors.red FEAT: on-time actor support 2 days ago
auxi.red FEAT: changed cache structure to flat/growing 4 days ago
comments FEAT: grid support in VID/S 15 hours ago
console.red FEAT: (broken) global render caching, removing 90% of load 2 months ago
creators.md FEAT: (broken) first work on sizing 2 months ago
debug-helpers.red FEAT: debug window now does not overlap with the main window 1 week ago
events.red FEAT: new timer architecture that doesn't eat 100% CPU 20 hours ago
everything.red FEAT: new timer architecture that doesn't eat 100% CPU 20 hours ago
focus.red FEAT: new timer architecture that doesn't eat 100% CPU 20 hours ago
hittest.red FEAT: umbrella context for spaces 12 months ago
hovering.red FEAT: new timer architecture that doesn't eat 100% CPU 20 hours ago
layouts.red FEAT: cleanup of ring layout code 2 weeks ago
popups.red FEAT: /forget option to clean up the cache 18 hours ago
quickstart.md FIX: TOC for gitea 2 months ago
reference.md DOC: formatting fix 2 months ago
rendering.red FIX: stack overflow in cyclic grids 13 hours ago
run.bat FEAT: (broken) first work on sizing 2 months ago
single-click.red FEAT: new timer architecture that doesn't eat 100% CPU 20 hours ago
standard-handlers.red FIX: tabbing was broken 3 days ago
styles.red FEAT: renamed url to link 6 days ago
tabbing.red FIX: tabbing was broken 3 days ago
templates.red FIX: list other text facets in on-change 13 hours ago
timers.red FEAT: new timer architecture that doesn't eat 100% CPU 20 hours ago
traversal.red FEAT: umbrella context for spaces 12 months ago
vid.red FEAT: grid support in VID/S 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 :)