2 releases
0.0.3 | Feb 25, 2023 |
---|---|
0.0.2 | Feb 18, 2023 |
0.0.1 |
|
#2 in #ux
56KB
1K
SLoC
haussmann
Integrate highly customizable widgets and themes for any Rust application or GUI library
Purpose
This project is not a GUI library itself, but it gives highly customizable
widgets and themes to be integrated in a GUI library or directly in an
application using a system API
(windows-rs,
x11rb, …). Furthermore, the crate contains
tools to transform widgets into shapes and to place and align widgets on a
drawable surface. The Drawer
trait can be implemented on a drawable surface to
easily draw widgets on it
Usage
This project is under development and does not have any usage instructions at the moment.
lib.rs
:
Integrate highly customizable widgets and themes for any Rust application or GUI library.
Introduction
More than explaining how to use this crate, this documentation want to help understand how the project is organized, and how the functions actually work. Tutorials, examples and more can be found on the repository (GitHub).
However, some examples can be found in this documentation when they are useful to understand how the item works. Sometimes, a good example is better than lines of documentation.
This documentation is for people who want to contribute to the project but also for people who just want to understand some concepts.
Purpose
This project is not a GUI library itself, but it gives highly customizable
widgets and themes to be integrated in a GUI library or directly in an
application using a system API
(windows-rs,
x11rb, ...). Furthermore, the crate
contains tools to transform widgets into shapes and to place and align
widgets on a drawable surface. The Drawer
trait can be
implemented on a drawable surface to easily draw widgets on it.
Organization
The crate is organized in different parts:
- Widgets (located in [
mod@widgets
]) - Controllers (located in
controllers
), they are also widgets but not designed to be drawn but to wrap a widget and control stuff like events on it. - Utilities: simple structures, parameters for widgets... (located in
crate
) - Graphics: drawer, aligner, shapes... (located in
graphics
)
Note
This project want to have the simplest usage possible. Indeed, imports are
simplified the most possible (well, it does not mean all elements can be
imported from the crate, but repetition is avoided and imports like
crate::widgets::Widget
are replaced by crate::Widget
for example) and
widgets have different constructors to avoid filling all the fields when
they are not all defined (check the widgets documentation).