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 1 feature flag, not enabled by default.
§"http"
Enable web tasks.
Modules§
Macros§
- command_
property - Declare command event properties.
- enable_
widget_ macros - Enable widget instantiation in crates that can’t depend on the
zngcrate. - event_
property - Declare event properties.
- wgt_fn
- Declares a widget function closure.
Structs§
- EDITORS
- Service that provides editor widgets for a given variable.
- Editor
Request Args - Arguments for
EDITORS.register. - ICONS
- Service that provides icon drawing widgets.
- Icon
Request Args - Arguments for
ICONS.register. - OnNode
OpArgs - Arguments for the node operation event properties.
- Weak
Widget Fn - Weak reference to a
WidgetFn<D>. - Wgt
WMinimal widget.- Widget
Fn - Boxed shared closure that generates a widget for a given data.
Enums§
- HitTest
Mode - Defines if and how a widget is hit-tested.
- Inline
Mode - Inline mode explicitly selected for a widget.
Statics§
- IS_
MOBILE_ VAR - Variable that indicates the context should use mobile UI themes.
Traits§
- Command
Icon Ext - Adds the
iconcommand metadata. - Icon
Names - Adapter for
ICONSqueries. - Widget
Info Builder Modal Ext - Widget info builder extensions for
modalcontrol.
Functions§
- accent_
color PDefines the preferred accent color in the widget and descendants.- align
PAligns the widget within the available space.- auto_
hide PDefines if the widget only renders if it’s bounds intersects with the viewport auto-hide rectangle.- base_
color PDefines the seed color used by widgets to derive background, non active border.- border
PBorder widths, color and style.- border_
align PPosition of a widget borders in relation to the widget fill.- border_
over PIf the border is rendered over the fill and child visuals.- clip_
to_ bounds PClips the widget child to the area of the widget when set totrue.- color_
scheme PDefines the preferred color scheme in the widget and descendants.- corner_
radius PCorner radius of widget and inner widgets.- corner_
radius_ fit PDefines how thecorner_radiusis computed for each usage.- enabled
PDefines if default interaction is allowed in the widget and its descendants.- force_
mobile PRequests mobile UI themes in desktop builds.- get_
interactivity PGet the widget interactivity value.- hit_
test_ mode PDefines if and how the widget is hit-tested.- inline
PEnforce an inline mode on the widget.- interactive
PDefines if any interaction is allowed in the widget and its descendants.- is_
collapsed PIf the widget isCollapsed.- is_
disabled PIf the widget is disabled for interaction.- is_
enabled PIf the widget is enabled for interaction.- is_
hidden PIf the widget isHidden.- is_
hit_ testable PIf the widget is visible for hit-tests.- is_
inited PIf the widget has been initialized.- is_ltr
PIf the layout direction is left-to-right.- is_
mobile PGets theIS_MOBILE_VARthat indicates the window or widget should use mobile UI themes.- is_rtl
PIf the layout direction is right-to-left.- is_
visible PIf the widget isVisible.- margin
PMargin space around the widget.- modal
POnly allow interaction inside the widget, descendants and ancestors.- modal_
included PInclude itself in the allow list of another widget that ismodalor descendant of modal.- modal_
includes PExtra widgets that are allowed interaction by this widget when it ismodal.- on_
blocked - Widget interactions now blocked.
- on_
blocked_ changed - Widget interactions where blocked or unblocked.
- on_
collapsed PWidget visibility changed to collapsed.- on_
deinit PWidget deinited.- on_
disabled - Widget normal interactions now disabled.
- on_
enabled - Widget normal interactions now enabled.
- on_
enabled_ changed - Widget was enabled or disabled.
- on_
hidden PWidget visibility changed to hidden.- on_
info_ init PWidget info is now available.- on_init
PWidget initialized.- on_
interactivity_ changed PWidget interactivity changed.- on_
node_ op POn any node operation.- on_
pre_ deinit PPreviewon_deinitevent.- on_
pre_ init PPreviewon_initevent.- on_
pre_ node_ op PPreviewon_node_opevent.- on_
pre_ update PPreviewon_updateevent.- on_
transform_ changed PWidget global inner transform changed.- on_
unblocked - Widget interactions now unblocked.
- on_
update PWidgetupdateevent.- on_
vis_ disabled - Widget now looks disabled.
- on_
vis_ enabled - Widget now looks enabled.
- on_
vis_ enabled_ changed - Widget changed to enabled or disabled visuals.
- on_
visibility_ changed PWidget visibility changed.- on_
visible PWidget visibility changed to visible.- parallel
PDefines what node list methods can run in parallel in the widget and descendants.- visibility
PSets the widget visibility.- z_index
PDefines the render order of a widget in a layout panel.