Expand description
Basic widget properties and helpers for declaring widgets and properties.
§Widget Instantiation
See enable_widget_macros! if you want to instantiate widgets without depending on the zng crate.
§Crate
This crate is part of the zng project.
§Cargo Features
This crate provides 3 feature flags, 1 enabled by default.
§"debug_default"
Signal the build script to enable the "dyn_*", "inspector" and "trace_widget" features in debug builds.
Enabled by default.
§"dyn_closure"
Box closures at opportune places, such as Var::map, reducing the number of monomorphised types.
This speeds-up compilation time at the cost of runtime.
§"http"
Enable web tasks.
Modules§
- Helper nodes.
- Prelude for declaring properties and widgets.
Macros§
- Declare one or more command event properties.
- Enable widget instantiation in crates that can’t depend on the
zngcrate. - Declare one or more event properties.
- Declares a widget function closure.
Structs§
- Arguments for the node operation event properties.
WMinimal widget.- Boxed shared closure that generates a widget for a given data.
Enums§
- Defines if and how a widget is hit-tested.
- Inline mode explicitly selected for a widget.
Traits§
- Widget info builder extensions for
modalcontrol.
Functions§
PAligns the widget within the available space.PDefines if the widget only renders if it’s bounds intersects with the viewport auto-hide rectangle.PBorder widths, color and style.PPosition of a widget borders in relation to the widget fill.PIf the border is rendered over the fill and child visuals.PClips the widget child to the area of the widget when set totrue.PDefines the preferred color scheme in the widget and descendants.PCorner radius of widget and inner widgets.PDefines how thecorner_radiusis computed for each usage.PDefines if default interaction is allowed in the widget and its descendants.PDefines if and how the widget is hit-tested.PEnforce an inline mode on the widget.PDefines if any interaction is allowed in the widget and its descendants.PIf the widget isCollapsed.PIf the widget is disabled for interaction.PIf the widget is enabled for interaction.PIf the widget isHidden.PIf the widget is visible for hit-tests.PIf the widget has been initialized.PIf the layout direction is left-to-right.PIf the layout direction is right-to-left.PIf the widget isVisible.PMargin space around the widget.POnly allow interaction inside the widget, descendants and ancestors.PInclude itself in the allow list of another widget that ismodalor descendant of modal.PExtra widgets that are allowed interaction by this widget when it ismodal.PWidget interactions now blocked.PWidget interactions where blocked or unblocked.PWidget deinited.PWidget normal interactions now disabled.PWidget normal interactions now enabled.PWidget was enabled or disabled.PWidget info is now available.PWidget initialized.PWidget interactivity changed.PWidget global position changed.POn any node operation.PPreviewon_blockevent.PPreviewon_blocked_changedevent.PPreviewon_deinitevent.PPreviewon_disableevent.PPreviewon_enableevent.PPreviewon_enabled_changedevent.PPreviewon_initevent.PPreviewon_interactivity_changedevent.PPreviewon_moveevent.PPreviewon_node_opevent.PPreviewon_transform_changedevent.PPreviewon_unblockevent.PPreviewon_updateevent.PPreviewon_vis_disableevent.PPreviewon_vis_enableevent.PPreviewon_vis_enabled_changedevent.PWidget global inner transform changed.PWidget interactions now unblocked.PWidgetupdateevent.PWidget now looks disabled.PWidget now looks enabled.PWidget changed to enabled or disabled visuals.PDefines what node list methods can run in parallel in the widget and descendants.PSets the widget visibility.PDefines the render order of a widget in a layout panel.