You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crystal-lang bindings for libui, a GUI library for Linux, OS X and Windows.
(well, forget about Windows for now, this is Crystal)
What's New
04/15/17
Sync'd to upstream #5fa7ba4
Updated for Crystal 0.21.1
08/13/16
Sync'd to upstream #6e45859
Control Gallery not updated, but yml examples were
Proper component stretching and margins
Waiting for tables definition to materialize
07/24/16
Now with YAML builder
06/19/16
Sync'd to upstream #9656a81
Control Gallery example not updated but library is.
Installation
Add these package to your dependencies in shard.yml:
dependencies:
libui:
github: fusion/libui.cr
Usage
Standard (C-like) usage
Have a look at examples/controlgallery, which is a direct port of a C example.
Crystal-only YAML builder
(see examples/crgallery)
This is a feature I am introducing in addition to the library bindings.
It allows devs to specify a UI without hard coding it and maintain it using
fragments described in simple .yml files.
Some advantages:
No need to recompile your code to test a UI change
Team collaboration now easier
Descriptive UI
Separation of concerns
Obvious drawback:
No compile-time checks
Note that inflating fragments and pure coding can be mixed.