Draw based widgets for Red
Go to file
hiiamboris 34b8993cbd TESTS: for #5433 2023-11-22 20:49:50 +03:00
design-cards FEAT: split host and screen paths 2023-04-25 20:56:07 +03:00
programs DOC: clarification on dialect types 2023-11-21 14:36:10 +03:00
samples FEAT: reshape redesign 2023-11-19 21:17:21 +03:00
stylesheets FIX: compatibility with point-enabled View 2023-08-07 16:09:32 +03:00
tests FIX: use dump-tree 2023-11-22 20:48:50 +03:00
widgets FEAT: reshape redesign 2023-11-19 21:17:21 +03:00
LICENSE DOC: update license 2023-03-20 21:27:02 +03:00
README.md DOC: moved gifs to a vpn-friendly location (40x faster) 2023-04-19 20:56:52 +03:00
actors.red FEAT: cross-platform event scheduler 2023-08-01 00:13:05 +03:00
auxi.red FEAT: 1D intersection 2023-11-04 20:55:52 +03:00
cache.red FEAT: de-optimized traversal 2023-11-22 20:00:57 +03:00
clipboard.red FEAT: expose clipboard 2023-03-29 20:04:28 +03:00
comments DOC: comments update 2023-08-13 19:06:21 +03:00
console.red FIX: kludges to work around #5377 2023-09-02 22:50:26 +03:00
creators.md DOC: removed support for block! /draw as it only complicates render pipeline 2023-06-09 18:35:24 +03:00
debug-helpers.red FIX: infinities are not convertible to pairs 2023-11-22 20:11:06 +03:00
edit-keys.red FEAT: cross-platform event scheduler 2023-08-01 00:13:05 +03:00
event-scheduler.red FEAT: tiny code refactor 2023-10-10 15:27:16 +03:00
events.red FEAT: reshape redesign 2023-11-19 21:17:21 +03:00
everything.red FEAT: de-optimized traversal 2023-11-22 20:00:57 +03:00
focus.red FEAT: based off extensible tabbing.red now 2023-11-21 19:56:08 +03:00
hittest.red FIX: compatibility with point-enabled View 2023-08-07 16:09:32 +03:00
hovering.red FIX: compatibility with latest event function registry 2023-09-28 21:47:29 +03:00
layouts.red FIX: length should have accepted floats 2023-11-22 20:15:33 +03:00
manual.md FEAT: renamed roll to slide as it conveys the meaning better 2023-07-09 16:21:39 +03:00
popups.red FEAT: reshape redesign 2023-11-19 21:17:21 +03:00
quickstart.md DOC: shallow clone commands 2023-04-19 21:28:19 +03:00
reference.md DOC: drop downs 2023-09-30 21:54:21 +03:00
rendering.red FEAT: de-optimized traversal 2023-11-22 20:00:57 +03:00
run.bat FIX: don't force CLI in run.bat 2022-05-20 13:20:23 +03:00
single-click.red FEAT: cross-platform event scheduler 2023-08-01 00:13:05 +03:00
source.red FIX: compatibility with point-enabled View 2023-08-07 16:09:32 +03:00
standard-handlers.red FIX: do not scroll on ctrl+wheel 2023-10-27 20:37:48 +03:00
styles.red FEAT: reshape redesign 2023-11-19 21:17:21 +03:00
tabbing.red FEAT: de-optimized traversal 2023-11-22 20:00:57 +03:00
templates.red TESTS: for #5433 2023-11-22 20:49:50 +03:00
timelines.red FEAT: support for filtering of last-event 2023-04-11 21:03:07 +03:00
timers.red FIX: compatibility with point-enabled View 2023-08-07 16:09:32 +03:00
traversal.red FEAT: de-optimized traversal 2023-11-22 20:00:57 +03:00
vid.red FEAT: an extra check 2023-11-22 17:24:18 +03:00
vids.md DOC: slider style mention 2023-09-30 19:18:37 +03:00

README.md

Table of Contents

RED SPACES - DRAW-BASED WIDGET LIBRARY FOR RED

Official URL of this project: https://codeberg.org/hiiamboris/red-spaces (you may be viewing an automatic mirror otherwise)

Examples (clickable)

Spiral editable field Grid-view Red Inspector tool (styled)
Infinite list of items of varying size Self-containing grid Document Editor sample

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.

Grid-view demo demonstrates how events are handled naturally even on a rotated and distorted layout.

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 ☻).

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.

Red Inspector is a handy tool to interrupt the program at any moment and inspect its state. GIF showcases it using the glossy stylesheet.

Document Editor is a scaffolding UI for any program that needs to embed a hypertext editor.

MORE DEMOS IN: TESTS PROGRAMS SAMPLES

Docs

Quickstart - installation and quick usage summary

VID/S manual - description of the layout dialect (must read after Quickstart)

Tinkerer's manual - for deeper understanding and how to alter things

Widget Reference - reference of all available space templates and their properties

Creators Guide - description of the architecture that will help you write your own spaces

Design cards - underlying designs and design decisions, for those who love asking deeper questions

Status

Alpha stage. Some design changes possible, risk of breaking changes.

Good enough to write basic apps with. Design enhancements proposals and feature requests are welcome =)

By component State
Widget architecture Stable
Events Stable
Timers Stable
Styling Stable
Focus model Stable
Tabbing Stable
Spatial navigation Not implemented
Resize model Stable
Layout Designed and documented, will be extended when required
Grid/Table Requires interactivity: columns dragging, sorting, filtering
Reactivity Waiting for PR #4529 (reactivity has to be scalable for Spaces scope). Temporary kludges are inserted by VID/S
Quickstart Written
User guide Written
Widget reference Written
Creator's guide Written
UI samples See samples
Alternate stylesheets Glossy

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 Matrix.
When you spot bugs or other issues you can report them also on Matrix or by creating an issue report or wish request. Improvement ideas are also welcome :)