Options
Fields
- id_extra:?usize
Mixed into widget id. Use when @src() is not unique (like in a loop).
- tag:?[]const u8
String for programmatically interacting with widgets, like in tests.
- name:?[]const u8
Name for debugging, says what kind of widget ("Button" or "Text Entry").
- role:?dvui.AccessKit.Role
Accessibility role (.BUTTON or .TEXT_INPUT), says what kind of widget.
- label:?LabelOpts
Accessibility label, either another widget or text.
- data_out:?*dvui.WidgetData
Pass a pointer to get a copy of the widget's
datawhenregisterwas- rect:?Rect
Specific placement within parent. Null is normal, meaning parent picks a
- expand:?Expand
- ?Expand
- gravity_x:?f32
- ?f32
- gravity_y:?f32
- ?f32
- tab_index:?u16
Specify focus order within the current TabIndexGroup.
- color_fill:?Color
- ?Color
- color_fill_hover:?Color
- ?Color
- color_fill_press:?Color
- ?Color
- color_text:?Color
- ?Color
- color_text_hover:?Color
- ?Color
- color_text_press:?Color
- ?Color
- color_border:?Color
- ?Color
- ninepatch_fill:?*const Ninepatch
- ?*const Ninepatch
- ninepatch_hover:?*const Ninepatch
- ?*const Ninepatch
- ninepatch_press:?*const Ninepatch
- ?*const Ninepatch
- style:?Theme.Style.Name
- ?Theme.Style.Name
- theme:?*const Theme
- ?*const Theme
- font:?Font
- ?Font
- rotation:?f32
- ?f32
- margin:?Rect
- ?Rect
- border:?Rect
- ?Rect
- padding:?Rect
- ?Rect
- corners:?CornerRect
- ?CornerRect
- min_size_content:?Size
Widget min size will be at least this, unless max_size_content is smaller.
- max_size_content:?MaxSize
Widget min size can't exceed this, even if min_size_content is larger.
- background:?bool
- ?bool
- box_shadow:?BoxShadow
Render a box shadow in
WidgetData.borderAndBackground.