Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table widget support #159

Open
dockimbel opened this issue Feb 17, 2024 · 0 comments
Open

Table widget support #159

dockimbel opened this issue Feb 17, 2024 · 0 comments

Comments

@dockimbel
Copy link
Member

dockimbel commented Feb 17, 2024

Backends capabilities

Feature Win32 GTK3 macOS
Unlimited rows ✔️ ? ?
Unlimited columns ? ? ?
Settable column size ✔️ ✔️ ?
User-resizable columns ✔️ ✔️ ?
Fixed column size ✔️ ✔️ ?
Auto-sizeable column to minimum/optimum width ✔️ ✔️ ?
Column overflow selection button ✔️ ? ?
Column content left/center/right alignment ✔️ ✔️ ?
Clickable column headers ✔️ ✔️ ?
Columns optional drag-and-drop reordering ✔️ ✔️ ?
Settable column header background color ❌² ✔️ ?
Settable column header text color ❌² ✔️ ?
Settable global background color ✔️ ✔️ ?
Settable global text color ✔️ ✔️ ?
Settable global font ✔️ ✔️ ?
Settable item's background color ❌ ¹ ✔️ ?
Settable item's text color ❌ ¹ ✔️ ?
Settable item's font ❌ ¹ ✔️ ?
Settable item's text alignment ❌ ¹ ✔️ ?
Setting an image as an item ✔️ ✔️ ?
Setting an image + text as an item ✔️ ❌ ¹ ?
Setting a checkbox as first item in a row ✔️ ✔️ ?
Setting a progress bar as item ❌ ¹ ✔️ ?
Even/odd row coloring ❌ ¹ ✔️ ?
Transparent table background ✔️ ?
Optional grid lines displaying ✔️ ✔️ ?
Keyboard spatial navigation (up/down/selection) ✔️ ? ?
Selectable row ✔️ ✔️ ?
Multiple rows selection ✔️ ✔️ ?
Disable row selection ❌ ¹ ✔️ ?
Change color of row selection ❌ ² ❌ ¹ ?
Click event on individual item ✔️ ✔️ ?
Double-Click event on individual item ✔️ ✔️ ?
Automatic scrollbars ✔️ ❌ ¹ ?
Scrollbars disabling ✔️ ✔️ ?
Per-item infotip ✔️ ✔️ ?
Run-time row insertion/deletion ✔️ ✔️ ?
Run-time column insertion/deletion ✔️ ✔️ ?

¹ Not available by default, but can be implemented with moderate effort.
² Not available by default, and not sure if that can be implemented reliably with moderate effort.

View interfacing

Currently in the prototype implementation in table-view branch, all the header and content items are stored in a 2D block in /data facet:

view make face! [
    type: 'window
    offset: 400x200
    size: 600x600
    pane: reduce [
	make face! [
	    type: 'table
	    offset: 10x10
	    size: 300x300
	    data: [
	        ["Col1" "Col2"  "Col3"]
	        ["A"    "9"	"8"]
	        ["B"    "789"	"6"]
	        ["C"    "0"	"-5"]
	        ["D"    "1234"	"4"]
	        ["E"    "3"	"0"]
	    ]
        ]
    ]
]

That facet is meant to be reactive, so that any change there would be immediately reflected in the displayed table (not implemented yet).

Though, columns options need a place where to specify their properties. Also, if we want to support per-cell visual properties, we need a simple/efficient way to specify it.

Here is a simple test example on Windows 11 (23H4):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant