Skip to main content

Crate kova_native_widgets

Crate kova_native_widgets 

Source
Expand description

The element layer of Kova Native: elements, styling, reactive bindings, the retained element tree and its frame pipeline, event dispatch, focus and the built-in widgets.

Re-exports§

pub use responsive::Breakpoint;
pub use responsive::breakpoint;
pub use responsive::responsive;
pub use responsive::viewport_size;

Modules§

elements
Built-in elements.
headless
Driving an element tree without a window: tests, scripted demos and offscreen captures.
icons
A small built-in icon set.
prelude
Common element-building vocabulary of this crate (the kova-native facade’s prelude re-exports it together with core types).
responsive
Responsive layout: the window size as reactive state, and breakpoints.
widgets
Ready-made widgets built from the primitive elements.

Macros§

impl_element_builder
Implements Interactive and IntoElement for an element type whose Element::base_mut is available.

Structs§

AnyElement
A type-erased element.
BoxShadow
A CSS-like box shadow.
DispatchContext
Resources for dispatching an input event.
DispatchResult
Result of dispatching an input event.
DragEvent
Pointer drag information.
ElementBase
State and configuration common to every element.
ElementTree
The retained UI of one window.
EventCx
Context for event handlers.
FrameContext
Resources needed to produce a frame.
FrameOutput
What the window must do after a frame.
FrameStats
Per frame counters, useful to verify incremental behavior.
MeasureCx
Context for measuring leaf content.
MemoryClipboard
An in-memory clipboard (tests, headless use).
NodeId
Identifies a node in an ElementTree.
PaintCx
Context for painting. All public methods take logical coordinates in window space; conversion to device pixels, pixel snapping, transforms, clipping and group opacity are applied automatically.
Style
The complete style of an element.
TextEditor
Text with a caret, selection and undo/redo. Single-line by default; TextEditor::set_multiline keeps line breaks and tabs.
TextRefinement
Text properties that cascade to descendants. None = inherit.
Theme
Colors, radii and type scale used by the built-in widgets.

Enums§

Mask
Masks an element and its descendants (like CSS mask). The element is rendered offscreen and composited through the mask, which is stretched over its border box; anything outside the border box is cut off.
WindowCommand
Requests from UI code to the window / application.

Traits§

Clipboard
Access to the system clipboard from event handlers.
Element
A node in the element tree.
Interactive
Builder methods for identity, state styles, reactivity and event handlers.
IntoElement
Conversion into an element. Implemented for all elements, strings (become text), Options and AnyElement.
Styled
Builder methods shared by every element and by Style itself (so state closures like .hover(|s| s.bg(..)) use the same vocabulary).

Functions§

set_theme
Replaces the current theme; dependent UI updates automatically.
theme
The current theme. Reading it inside a reactive scope (a region, a bind closure, the window builder) subscribes to theme changes.