Crate rui

source · []

Macros

Structs

Struct for the background modifier.

Struct for canvas

Struct for circle.

Struct for cond

The Context stores all UI state. A user of the library shouldn’t have to interact with it directly.

Struct for the drag gesture.

Used internally for event processing.

Struct for the focus modifier.

Struct for the fullscreen modifier.

Struct for the geom modifier.

Struct for the key modifier.

Struct for the offset modifier.

Struct for the padding modifier.

Struct for rectangle.

Struct for the role modifier.

Struct for the size modifier.

Weak reference to app state.

Struct for the tap gesture.

Struct for text.

Struct for text_editor.

Struct for the window_title modifier.

ViewID is a unique identifier for a view. We’re using a u64 and hashing under the assumption there won’t be collsions. The underlying u64 is a function of the path down the view tree.

Enums

Constants

Traits

Reads or writes a value owned by a source-of-truth.

Trait for the unit of UI composition.

Allows rui to iterate over a tuple of Views.

Functions

Calls a function when the button is tapped.

Canvas for GPU drawing with VGER. See https://github.com/audulus/vger-rs.

Renders a circle which expands to fill available space.

Specifies a menu command.

Switches between views according to a boolean.

Calls calls a function with true if the view subtree returned by the function has the keyboard focus.

Horizontal slider built from other Views.

Horizontal stack of up to 8 Views in a tuple. Each item can be a different view type.

Knob for controlling a 0 to 1 floating point parameter.

Displays a list of items all of which are represented by the same View. See examples/list.rs.

Renders a rectangle which expands to fill available space.

Call this function to run your UI.

State allows you to associate some state with a view. This is what you’ll use for a data model, as well as per-view state. Your state should be efficiently clonable. Use Rc as necessary.

Shows a string as a label (not editable).

Toggle switch.

Horizontal slider built from other Views.

Vertical stack of up to 8 Views in a tuple. Each item can be a different view type.

Stack of up to 8 overlaid Views in a tuple. Each item can be a different view type.

Type Definitions