Expand description
Feather-Tui is a simple terminal UI library designed to provide building blocks for text-based user interfaces. It started life as a small C library in my school management system project, aiming to offer an easy-to-use UI framework for terminal applications. Now, I’m rewriting it in Rust to learn the language and (hopefully) improve both performance and maintainability.
Re-exports§
pub use components as cpn;pub use callback as cbk;pub use trigger as trg;pub use selector as slc;pub use container as con;pub use renderer as ren;pub use input as inp;
Modules§
- callback
- A generic callback handler for executing functions with stored arguments.
- components
- Core building blocks for constructing user interfaces.
- container
- Acts as a layout manager for the UI elements.
- input
- Handles user input, non-blocking key events, and key code conversions with crossterm.
- renderer
- Responsible for rendering the UI to the terminal.
- selector
- Used within a
Containerto navigate and selectOption. - trigger
- A generic trigger handler for evaluating conditions based on stored arguments.
Macros§
- cbk_
new_ callback_ func - This macro generates a function that take a reference to a
Box<dyn Any>as an argument and return nothing. The function body ($body) is the code that will be execute when the callback is trigger. - trg_
new_ trigger_ func - This macro generates a function that takes a reference to a
Box<dyn Any>as an argument and returns abool. The function body ($body) determines whether the condition is met.