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 one or more command event properties.
- enable_
widget_ macros - Enable widget instantiation in crates that can’t depend on the
zngcrate. - event_
property - Declare one or more 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.- 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_
block PWidget interactions now blocked.- on_
blocked_ changed PWidget interactions where blocked or unblocked.- on_
collapse PWidget visibility changed to collapsed.- on_
deinit PWidget deinited.- on_
disable PWidget normal interactions now disabled.- on_
enable PWidget normal interactions now enabled.- on_
enabled_ changed PWidget was enabled or disabled.- on_hide
PWidget visibility changed to hidden.- on_
info_ init PWidget info is now available.- on_init
PWidget initialized.- on_
interactivity_ changed PWidget interactivity changed.- on_move
PWidget global position changed.- on_
node_ op POn any node operation.- on_
pre_ block PPreviewon_blockevent.- on_
pre_ blocked_ changed PPreviewon_blocked_changedevent.- on_
pre_ collapse PPreviewon_collapseevent.- on_
pre_ deinit PPreviewon_deinitevent.- on_
pre_ disable PPreviewon_disableevent.- on_
pre_ enable PPreviewon_enableevent.- on_
pre_ enabled_ changed PPreviewon_enabled_changedevent.- on_
pre_ hide PPreviewon_hideevent.- on_
pre_ init PPreviewon_initevent.- on_
pre_ interactivity_ changed PPreviewon_interactivity_changedevent.- on_
pre_ move PPreviewon_moveevent.- on_
pre_ node_ op PPreviewon_node_opevent.- on_
pre_ show PPreviewon_showevent.- on_
pre_ transform_ changed PPreviewon_transform_changedevent.- on_
pre_ unblock PPreviewon_unblockevent.- on_
pre_ update PPreviewon_updateevent.- on_
pre_ vis_ disable PPreviewon_vis_disableevent.- on_
pre_ vis_ enable PPreviewon_vis_enableevent.- on_
pre_ vis_ enabled_ changed PPreviewon_vis_enabled_changedevent.- on_
pre_ visibility_ changed PPreviewon_visibility_changedevent.- on_show
PWidget visibility changed to visible.- on_
transform_ changed PWidget global inner transform changed.- on_
unblock PWidget interactions now unblocked.- on_
update PWidgetupdateevent.- on_
vis_ disable PWidget now looks disabled.- on_
vis_ enable PWidget now looks enabled.- on_
vis_ enabled_ changed PWidget changed to enabled or disabled visuals.- on_
visibility_ changed PWidget visibility changed.- 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.