Crate rui

Source

Macros§

make_lens

Structs§

AnimView
AnyView
Struct for any_view
Auto
Background
Struct for the background modifier.
Canvas
Struct for canvas
Circle
Struct for circle.
Clip
Command
Command2
CommandGroup
CommandInfo
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.
DrawArgs
EmptyView
Flex
Struct for the flex modifier.
Focus
Struct for the focus modifier.
FullscreenView
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.
KeyboardModifiers
LayoutArgs
List
Map
MapView
ModView
NullCommand
Offset
Struct for the offset modifier.
Padding
Struct for the padding modifier.
Rectangle
Struct for rectangle.
Region
Region type cribbed from Druid.
RenderInfo
RoleView
Struct for the role modifier.
SetenvView
Struct for the env modifier.
Size
Struct for the size modifier.
SliderOptions
Spacer
StateHandle
Weak reference to app state.
Tap
Struct for the tap gesture.
TapA
Struct for the tap_a gesture.
Text
Struct for text.
TitleView
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.
GestureState
HAlignment
HotKey
Key
ListOrientation
MouseButton
PaddingParam
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.
CommandBase
CommandTuple
Lens
Modifiers
Modifiers common to all views.
SliderMods
TextModifiers
View
Trait for the unit of UI composition.
ViewTuple
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.

Type Aliases§

LocalOffset
LocalPoint
LocalRect
LocalSize
LocalSpace
LocalToWorld
WorldPoint
WorldRect
WorldSpace
WorldToLocal