Expand description
Agape is a cross-platform GUI library.
§Overview
At the core of agape is widgets, a Widget is anything that holds state and can be drawn
to the screen. To get started create an App with a root widget.
use agape::{App,widgets::*,Error};
fn main() -> Result<(),Error>{
App::new(Home())
.run()
}
fn Home() -> impl Widget{
Text::new("Hello!!")
.font_size(24)
}Re-exports§
pub use error::Error;pub use error::Result;pub use message::Message;pub use message::MessageQueue;pub use agape_layout as layout;pub use agape_renderer as renderer;
Modules§
- error
- message
- resources
- style
- widgets
- A
Widgetdescribe what you want to present onto the screen.agapetries to provide as manyWidget’s as possible for various uses such asText,Button,HStackandVStack, and so on. There are two ways of creating widgets.
Macros§
- hex
- A macro for creating compile time verified hex colors.
- hstack
- Creates an
HStack. - impl_
style - Implement common styling attributes
- vstack
- Creates a [
Vstack].
Structs§
- App
- An
Appis a single program. - Border
- Border style for [
View]s; - Bounds
- The bounds of any object that has a
SizeandPosition. - Color
- A color representation.
Coloris a generic wrapper around different color formats. - Global
Id - A global unique identifier
- Hex
- Container for hexadecimal colors
- Position
- The
xandyposition of any structure. - Rgba
- Container for rgba colors.
- Size
- Anything with a width and a height.
Enums§
Traits§
Functions§
- map
- Map value from one range to another. Any overflow or underflow is clipped to the min or max
Derive Macros§
- Widget
- A trait for implementing widgets.