Macros§
Structs§
- Anim
View - AnyView
- Struct for
any_view
- Auto
- Background
- Struct for the
background
modifier. - Canvas
- Struct for
canvas
- Circle
- Struct for
circle
. - Clip
- Command
- Command2
- Command
Group - Command
Info - Cond
- Struct for
cond
- Context
- The Context stores all UI state. A user of the library shouldn’t have to interact with it directly.
- Drag
- Struct for the
drag
gesture. - DragS
- Struct for the
drag
gesture. - Draw
Args - Empty
View - Flex
- Struct for the
flex
modifier. - Focus
- Struct for the
focus
modifier. - Fullscreen
View - Struct for the
fullscreen
modifier. - Geom
- Struct for the
geom
modifier. - Handle
- Struct for an action handler.
- Hover
- Struct for the
Hover
gesture. - KeyView
- Struct for the
key
modifier. - Keyboard
Modifiers - Layout
Args - List
- Map
- MapView
- ModView
- Null
Command - Offset
- Struct for the
offset
modifier. - Padding
- Struct for the
padding
modifier. - Rectangle
- Struct for
rectangle
. - Region
- Region type cribbed from Druid.
- Render
Info - Role
View - Struct for the
role
modifier. - Setenv
View - Struct for the
env
modifier. - Size
- Struct for the
size
modifier. - Slider
Options - Spacer
- State
Handle - Weak reference to app state.
- Tap
- Struct for the
tap
gesture. - TapA
- Struct for the
tap_a
gesture. - Text
- Struct for
text
. - Title
View - Struct for the
window_title
modifier. - ViewId
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§
- Event
- User interface event.
- Gesture
State - HAlignment
- HotKey
- Key
- List
Orientation - Mouse
Button - Padding
Param - Paint
- Specifies how a region should be filled.
- VAlignment
Constants§
- AZURE_
HIGHLIGHT - AZURE_
HIGHLIGHT_ BACKGROUND - AZURE_
HIGHLIGHT_ DARK - BLACK
- BUTTON_
BACKGROUND_ COLOR - BUTTON_
CORNER_ RADIUS - BUTTON_
HOVER_ COLOR - CLEAR_
COLOR - CONTROL_
BACKGROUND - DEBUG_
LAYOUT - GREEN_
HIGHLIGHT - GROOVES
- GROOVES_
DARK - MEDIUM_
GRAY - RED_
HIGHLIGHT - RED_
HIGHLIGHT_ BACKGROUND - RED_
HIGHLIGHT_ DARK - TEXT_
COLOR - VIEW_
TUPLE_ MAX_ ELEMENTS
Traits§
- Binding
- Reads or writes a value owned by a source-of-truth.
- Command
Base - Command
Tuple - Lens
- Modifiers
- Modifiers common to all views.
- Slider
Mods - Text
Modifiers - View
- Trait for the unit of UI composition.
- View
Tuple - Allows rui to iterate over a tuple of
Views
.
Functions§
- align
- align_h
- align_v
- any_
view - Switches between views according to a boolean.
- bind
- button
- Calls a function when the button is tapped.
- button_
a - Version of button which emits an action directly instead of taking a callback.
- canvas
- Canvas for GPU drawing with Vger. See https://github.com/audulus/vger-rs.
- circle
- Renders a circle which expands to fill available space.
- command
- Specifies a menu command.
- cond
- Switches between views according to a boolean.
- env
- Reads from the environment.
- focus
- Calls calls a function with true if the view subtree returned by the function has the keyboard focus.
- hlist
- hslider
- Horizontal slider built from other Views.
- hstack
- Horizontal stack of up to 128 Views in a tuple. Each item can be a different view type.
- knob
- Knob for controlling a 0 to 1 floating point parameter.
- list
- Displays a list of items all of which are represented by the same View. See
examples/list.rs
. - map
- Maps state into local state.
- modview
- Passes a value to a function. Value can be updated by modifiers.
- on_main
- rectangle
- Renders a rectangle which expands to fill available space.
- redux
- rui
- Call this function to run your UI.
- setter
- spacer
- Inserts a flexible space in a stack.
- state
- 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.
- text
- Shows a string as a label (not editable).
- text_
editor - A multi-line text editor.
- toggle
- Toggle switch.
- vslider
- Vertical slider built from other Views.
- vstack
- Vertical stack of up to 128 Views in a tuple. Each item can be a different view type.
- with_cx
- Convenience to get the context.
- with_
ref - Convenience to retreive a reference to a value in the context.
- zlist
- zstack
- Stack of up to 128 overlaid Views in a tuple. Each item can be a different view type.