Module prelude

Module prelude 

Source

Re-exports§

pub use crate::components::*;

Modules§

data
emittable
executor
measurer
name
platform

Structs§

AccessibilityData
AccessibilityId
The stable identity of a [Node], unique within the node’s tree.
AccessibilityState
AnimationClock
AppComponent
AppComponent is a wrapper for Components that returns true in equality checks.
Border
BorderWidth
Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
Callback
Clipboard
Access the clipboard.
Color
Represents one color. You may create Colors using
ConicGradient
CornerRadius
Cursor
CursorStyleData
Effect
EffectData
EffectState
Event
EventHandler
EventsCombos
FileEventData
Focus
FontWeight
FontWidth
FutureTask
Gaps
GradientStop
ImePreeditEventData
KeyboardEventData
Data of a Keyboard event.
Label
LaunchConfig
Launch configuration.
LayerState
LayoutData
LinearGradient
Memo
Modifiers
Pressed modifier keys.
MouseEventData
Paragraph
ParagraphHolder
Platform
RadialGradient
ReactiveContext
Rect
RenderContext
RendererContext
RenderingTicker
Scale
ScreenReader
Shadow
SizedEventData
Data of a Sized event.
Span
State
StyleState
Svg
Task
TaskHandle
TaskId
TaskWaker
TextShadow
TextStyleData
TextStyleState
TouchEventData
Data of a Touch event.
UseId
WheelEventData
Data of a Wheel event.
WindowConfig
Configuration for a Window.

Enums§

AccessibilityFocusMovement
Strategy focusing an Accessibility Node.
AccessibilityFocusStrategy
Strategy focusing an Accessibility Node.
AccessibilityRole
The type of an accessibility node.
Alignment
AspectRatio
BorderAlignment
BorderShape
ClipboardError
Code
Code is the physical position of a key.
Content
CursorIcon
Describes the appearance of the (usually mouse) cursor icon.
DiffKey
Direction
Element
EventType
Fill
FocusStatus
Focusable
FontSlant
Force
FutureState
ImageCover
Interactive
Key
The value received from the keypress.
Layer
MouseButton
NamedKey
Key represents the meaning of a keypress.
NavigationMode
Overflow
PointerEventData
Data of a pointer event.
Position
PreferredTheme
PressEventData
PressEventType
ReadState
Given a type T you may pass an owned value, a State<T> or a function returning a ReadRef<T>
ReadStateCow
SamplingMode
ShadowPosition
Size
TextAlign
TextHeightBehavior
TextOverflow
TextWidth
TouchPhase
UserEvent
WheelSource

Traits§

AccessibilityExt
AlignmentExt
ChildrenExt
Component
Encapsulate reusable pieces of UI by using the Component trait. Every Component creates a new layer of state in the app, meaning that implementors of Component can make use of hooks in their Component::render method.
ComponentKey
ComponentOwned
ContainerExt
ContainerSizeExt
ContainerWithContentExt
ContentExt
DebugExt
DirectionExt
EventHandlersExt
ImageExt
InteractiveExt
IntoElement
KeyExt
LayerExt
LayoutExt
ListExt
MaybeExt
MutView
ScrollableExt
SizeExt
StyleExt
TextStyleExt
VisibleSizeExt
WinitPlatformExt

Functions§

consume_context
consume_root_context
current_scope_id
label
Draw text with label(). Its a simplified version of crate::elements::paragraph.
launch
mark_scope_as_dirty
paragraph
paragraph() makes it possible to render rich text with different styles. Its a more customizable API than crate::elements::label.
provide_context
provide_context_for_scope_id
rect
rect() acts as a generic container to contain other elements inside, like a box.
spawn
spawn_forever
svg
Use svg() to render SVG in your app.
try_consume_context
try_consume_context_from_scope_id
try_consume_root_context
use_after_side_effect
use_consume
Get access to a value stored in this component instance or some ancestor.
use_drop
Run a callback for when the component gets dropped. Useful to clean resources.
use_focus
use_focus_status
use_future
Creata FutureTask with the given callback.
use_hook
This is the foundational hook used by all. It’s simple, it accepts an initialization callback whose return value will be stored in this component instance until its dropped. In subsequent renders the returned value of the function will be a Cloned value of what had been previously returned by the initialization callback.
use_id
Get a unique for a given generic type.
use_memo
Registers a callback that will run every time a State which was .read() inside, changes. It also returning a type that will get cached after the callback runs, thus allowing this to be used as a way to cache expensive values.
use_provide_context
Store the given value in this component instance. Any descendant component of this component calling use_consume or consume_context will have access to it.
use_reactive
Allows converting a &T into a State<T> so that we can pass this value around without cloning it multiple times.
use_side_effect
Registers a callback that will run every time a State which was .read() inside, changes.
use_side_effect_value
use_side_effect_with_deps
use_state
Creates a reactive value initialized with the returned value of the init callback that we pass to it. A State<T> is a combination of Rc<RefCell<T>> + Copy and reactive semantics. It allow us to store a value into a reactive pointer and share this to other components to let them read or even write to it.
use_try_consume
Try to get access to a value stored in this component instance or some ancestor.

Type Aliases§

Area
Area used by a Node, including its margins.
CursorPoint
ReadRef
Size2D
WriteRef