Crate carbide_core[][src]

carbide

An easy-to-use, immediate-mode, 2D GUI library featuring a range of useful widgets.

If you are new to carbide, we recommend checking out The Guide.

Re-exports

pub use crate::color::Color;
pub use crate::color::Colorable;
pub use crate::position::Point;
pub use crate::position::Range;
pub use crate::position::Rect;
pub use crate::position::Scalar;

Modules

color

A library providing simple Color and Gradient render along with useful transformations and presets.

cursor

Contains an extendable enum of supported mouse cursor render.

draw
event

Contains all render used to describe the input events that Widgets may handle.

event_handler
flags
guide

The carbide Guide

image_map

A type used to manage a user's image data and map them to Image widgets:

input

This module contains all the logic for handling input events and providing them to widgets.

layout
mesh
position

Items related to 2D positioning, used throughout carbide.

prelude
render
state
text

Text layout logic.

utils

Various utility functions used throughout carbide.

widget

Widgets are the core building blocks for every carbide user interface.

window

Structs

Ui

Ui is the most important type within carbide and is necessary for rendering and maintaining widget state.

UiBuilder

A constructor type for building a Ui instance with a set of optional parameters.

UiCell

A wrapper around the Ui that restricts the user from mutating the Ui in certain ways while in the scope of the Ui::set_widgets function and within Widgets' update methods. Using the UiCell, users may access the Ui immutably (via Deref) however they wish, however they may only mutate the Ui via the &mut self methods provided by the UiCell.

Traits

Labelable

Widgets that may display some label.

Functions

from_bin

Deserializes a slice of bytes into an instance of T using the default configuration.

from_ron

A convenience function for building a deserializer and deserializing a value of type T from a string.

to_bin

Serializes a serializable object into a Vec of bytes using the default configuration.

to_ron

Serializes value and returns it as string.

Type Definitions

FontSize

Font size used throughout carbide.

Derive Macros

Widget
WidgetCommon
WidgetCommon_
WidgetStyle
WidgetStyle_