Skip to main content

Module prelude

Module prelude 

Source
Expand description

Prelude module for convenient imports in tests.

Re-exports§

pub use super::ClickTracker;
pub use super::PointerCaptureTracker;
pub use super::ScrollTracker;
pub use super::layer;
pub use super::layers;

Modules§

css
The CSS named colors.
dropdown
A view that allows the user to select an item from a list of items.
editor
el
localization
Localization privitives.
palette
Palettes with predefined colors.
resizable
scroll
Scroll View
slider
A toggle button widget. An example can be found in widget-gallery/button in the floem examples.
text_editor

Structs§

AutoNavigationKey
Marker type for navigation stacks that use the item itself as the key.
AutoNavigationView
Marker type for navigation stacks that use the item itself as the destination view.
Button
A simple Button view. See button.
ButtonClass
The style class that is applied to buttons.
Canvas
A Canvas view. See the docs for canvas().
Checkbox
A customizable checkbox view for boolean selection.
CheckboxClass
The style class that is applied to checkboxs.
Clip
A wrapper around a child View that clips painting so the child does not show outside of the viewport.
Container
A simple wrapper around another View.
CustomNavigationKey
Marker type for navigation stacks that use an explicit key function.
CustomNavigationView
Marker type for navigation stacks that use an explicit destination view function.
Delay
Diff
DiffOpAdd
DiffOpMove
DiffOpRemove
DragResizeWindowArea
A view that will resize the window when the mouse is dragged. See drag_resize_window_area.
DragWindowArea
A view that will move the window when the mouse is dragged. See drag_window_area.
DynStack
DynamicContainer
A container for a dynamically updating View. See dyn_container
DynamicView
A container for a dynamically updating View. See dyn_view
EditorCustomStyle
The custom style elements that are specific to an Editor.
Empty
An empty View.
Enumerate
EventResult
Result of an event dispatch operation.
HeadlessHarness
A headless harness for UI testing and benchmarking.
ImageLayoutData
Holds information about image dimensions for layout calculations.
Img
Holds the data needed for img view fn to display images.
KeyboardEvent
Keyboard events are issued for all pressed and released keys.
Label
A View that can display text from a String. See label, text, and static_label.
LabelClass
The style class that is applied to labels.
LabelCustomExprStyle
LabelCustomStyle
Represents a custom style for a Label.
LabeledCheckboxClass
The style class that is applied to all labeled checkbox stacks.
LabeledRadioButtonClass
List
A list of views that support the selection of items. See list.
ListAccept
Event fired when a list item is accepted (Enter key or Space)
ListAcceptListener
Listener for ListAccept events
ListClass
ListItemClass
ListSelectionChanged
Event fired when a list’s selection changes
ListSelectionChangedListener
Listener for ListSelectionChanged events
Modifiers
Pressed modifier keys.
NavigationStack
A navigation view that retains a stack of destination views for an explicit path.
NavigationStackBuilder
Builder for a NavigationStack.
Overlay
A declarative overlay that renders content above all other views.
PlaceholderTextClass
The style class that is applied to the placeholder TextInput text.
PointerButtonEvent
An event representing a [PointerButton] that was pressed or released.
PointerId
A unique identifier for the pointer.
Preedit
An IME preedit
RadioButton
The RadioButton struct provides various methods to create and manage radio buttons.
RadioButtonClass
RadioButtonDotClass
RadioButtonDotSelectedClass
RefreshNavigationStackPath
Message that can be sent to a NavigationStack ViewId to force the stack to re-read its current path source.
RichSpan
RichSpanOwned
RichText
RwSignal
A read write Signal which can act as both a Getter and a Setter
Scroll
A scroll view
Stack
A collection of static views. See stack and stack_from_iter.
Stem
A generic container view that can hold multiple children.
Svg
SvgClass
SvgColor
SvgStrFn
Tab
Tab widget.
TabSelectorClass
Set class to TabSelector.
TestRoot
A test root that owns a root ViewId and sets it as the current view.
TextEditor
A text editor view built on top of Editor. See text_editor.
TextInput
Text Input View.
TextInputClass
The style class that is applied to all TextInput views.
TextInputEnter
Add action that will run on Enter key press.
TextInputEnterListener
Listener for TextInputEnter events
ToggleButton
A toggle button.
ToggleButtonCircleRad
ToggleButtonClass
A class for styling ToggleButton view.
ToggleButtonCustomStyle
Represents a custom style for a ToggleButton.
ToggleButtonInset
ToggleChanged
Event fired when the toggle state changes
ToggleChangedListener
Listener for ToggleChanged events
Tooltip
A view that displays a tooltip for its child.
TooltipClass
A class for the tooltip views.
TooltipContainerClass
A class for the tooltip container view.
ValueContainer
A wrapper around another View that has value updates. See value_container
ViewId
A small unique identifier, and handle, for an instance of a View.
VirtualExtractor
VirtualList
VirtualStack
A virtual stack that is like a dyn_stack but also lazily loads items for performance. See virtual_stack.

Enums§

Code
Code is the physical position of a key.
Key
The value received from the keypress.
KeyState
Describes the state a key is in.
Movement
Type of cursor movement in navigation.
NamedKey
Key represents the meaning of a keypress.
PointerEvent
A standard PointerEvent.
SvgOrStyle
TextDirection
Type of text direction in the file.

Constants§

DEFAULT_CHECKBOX_SVG
The default checkbox SVG

Traits§

ButtonExt
A trait that adds a button method to any type that implements IntoView.
ClipExt
A trait that adds a clip method to any type that implements IntoView.
ContainerExt
A trait that adds a container method to any type that implements IntoView.
Decorators
A trait that extends the appearance and functionality of Views through styling and event handling.
DurationUnitExt
EventListenerTrait
HasViewId
A trait for types that have an associated ViewId.
IntoView
Converts a value into a View.
IntoViewIter
Trait for types that can be converted into an iterator of views.
ListExt
A trait that adds a list method to any generic type T that implements IntoIterator where T::Item implements IntoView.
NavigationPath
A path source that can produce the current navigation path on demand.
OverlayExt
A trait that adds an overlay method to any type that implements IntoView.
ParentView
A trait for views that can accept children.
Renderer
The core rendering trait that every Floem backend must implement.
RichTextExt
ScrollExt
A trait that adds a scroll method to any type that implements IntoView.
SignalGet
SignalTrack
SignalUpdate
SignalWith
StackExt
SvgCssPropExtractor
TooltipExt
Adds a tooltip function to a type that implements IntoView.
UnitExt
View
The View trait contains the methods for implementing updates, styling, layout, events, and painting.
ViewTuple
VirtualVector
A trait that can be implemented on a type so that the type can be used in a virtual_stack or virtual_list.

Functions§

brush_to_css_string
buttonDeprecated
Creates a new simple Button view with the default ButtonClass style.
canvas
Creates a new Canvas view that can be used for custom painting
checkbox
Renders a checkbox the provided checked signal. See also Checkbox::new and Checkbox::new_rw.
clipDeprecated
A clip is a wrapper around a child View that will clip the painting of the child so that it does not show outside of the viewport of the Clip.
containerDeprecated
A simple wrapper around another View
create_rw_signalDeprecated
Creates a new RwSignal which can act both as a setter and a getter.
create_signalDeprecated
Creates a new setter and getter Signal.
create_value_container_signals
A convenience function that creates two signals for use in a value_container
custom_checkbox
Renders a checkbox using a checked signal and custom SVG. See also Checkbox::new_rw and
custom_labeled_checkbox
Renders a checkbox using the a checked signal and a custom SVG. See also Checkbox::custom_labeled_rw
drag_resize_window_area
A view that will resize the window when the mouse is dragged.
drag_window_area
A view that will move the window when the mouse is dragged.
dyn_container
A container for a dynamically updating View
dyn_stack
A stack whose items can be reactively updated.
dyn_view
A container for a dynamically updating View
emptyDeprecated
An empty View. This view can still have a size, background, border radius, and outline.
h_stackDeprecated
A stack which defaults to FlexDirection::Row. See also v_stack.
h_stack_from_iterDeprecated
Creates a stack from an iterator of views. It defaults to FlexDirection::Row. See also v_stack_from_iter.
img
A view that can display an image and controls its position.
img_from_path
A view that can display an image and controls its position.
labelDeprecated
A view that can reactively display text from an item that implements Display. See also text for a non-reactive label.
labeled_checkbox
Renders a checkbox using the provided checked signal. See also Checkbox::labeled and Checkbox::labeled_rw.
labeled_radio_button
Renders a radio button that appears as selected if the signal equals the given enum value.
list
A list of views built from an iterator which remains static and always contains the same elements in the same order.
radio_button
Renders a radio button that appears as selected if the signal equals the given enum value. Can be combined with a label and a stack with a click event (as in examples/widget-gallery).
rich_text
stackDeprecated
A basic stack that is built from a tuple of views which remains static and always contains the same elements in the same order.
stack_from_iterDeprecated
Creates a stack from an iterator of views. See also v_stack_from_iter and h_stack_from_iter.
static_labelDeprecated
A non-reactive view that can display text from an item that can be turned into a String. See also label.
svg
tab
A tab widget. Create tabs from static or dynamic lists.
textDeprecated
A non-reactive view that can display text from an item that implements Display. See also label.
text_editor
A text editor view built on top of Editor. This is the main editor view used in the Lapce code editor. The default keymap includes the standard editing keys, for using your own keymap use text_editor_keys.
text_editor_keys
A text editor view built on top of Editor that allows providing your own keymap callback.
text_inputDeprecated
Creates a TextInput view. This can be used for basic text input.
toggle_buttonDeprecated
A reactive toggle button.
tooltip
A view that displays a tooltip for its child.
v_stackDeprecated
A stack which defaults to FlexDirection::Column. See also h_stack.
v_stack_from_iterDeprecated
Creates a stack from an iterator of views. It defaults to FlexDirection::Column. See also h_stack_from_iter.
value_container
A wrapper around another View that has value updates.
virtual_list
A view that supports virtual scrolling with item selection. Selection is done using arrow keys, home/end for top/bottom.
virtual_stack
A View that lazily loads items as they appear in a scroll view.

Type Aliases§

Color
A convenient alias for the color type used for [Brush].
VirtViewFn