Crate agape

Crate agape 

Source
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 Widget describe what you want to present onto the screen. agape tries to provide as many Widget’s as possible for various uses such as Text,Button, HStack and VStack, 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 App is a single program.
Border
Border style for [View]s;
Bounds
The bounds of any object that has a Size and Position.
Color
A color representation. Color is a generic wrapper around different color formats.
GlobalId
A global unique identifier
Hex
Container for hexadecimal colors
Position
The x and y position of any structure.
Rgba
Container for rgba colors.
Size
Anything with a width and a height.

Enums§

ColorError

Traits§

IntoColor
Trait for generating Color’s

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.