Macros
Structs
Struct for
any_view
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.Struct for the
drag
gesture.Struct for the
flex
modifier.Struct for the
focus
modifier.Struct for the
fullscreen
modifier.Struct for the
geom
modifier.Struct for an action handler.
Struct for the
key
modifier.Struct for the
offset
modifier.Struct for the
padding
modifier.Struct for
rectangle
.Region type cribbed from Druid.
Struct for the
role
modifier.Struct for the
env
modifier.Struct for the
size
modifier.Weak reference to app state.
Struct for the
tap
gesture.Struct for
text
.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 collisions. The underlying u64 is a function
of the path down the view tree.Enums
User interface event.
Specifies how a region should be filled.
Constants
Traits
Reads or writes a value owned by a source-of-truth.
Modifiers common to all views.
Trait for the unit of UI composition.
Allows rui to iterate over a tuple of
Views
.Functions
Switches between views according to a boolean.
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.
Reads from the environment.
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 128 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
.Maps state into local state.
Passes a value to a function. Value can be updated by modifiers.
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.
Vertical slider built from other Views.
Vertical stack of up to 128 Views in a tuple. Each item can be a different view type.
Convenience to get the context.
Convenience to retreive a reference to a value in the context.
Stack of up to 128 overlaid Views in a tuple. Each item can be a different view type.