pub struct UiNode {Show 45 fields
pub id: UiId,
pub component_owner: Option<ComponentId>,
pub parent: Option<UiId>,
pub kind: UiNodeKind,
pub layout_rect: UiRect,
pub hit_rect: UiRect,
pub paint_bounds: UiRect,
pub ime_cursor_rect: Option<UiRect>,
pub interaction: InteractionRole,
pub semantics: Option<Semantics>,
pub click_capture_handler: Option<UiEventHandler>,
pub click_handler: Option<UiEventHandler>,
pub input_event_handlers: Vec<UiInputEventBinding>,
pub click_action: Option<UiAction>,
pub wheel_action: Option<UiAction>,
pub action_target: Option<UiId>,
pub action_handlers: Vec<UiActionBinding>,
pub event_policy: EventPolicy,
pub auto_focus: bool,
pub focus_scope: bool,
pub animation_bindings: Vec<AnimationBinding>,
pub animation_targets: Vec<(AnimProperty, bool)>,
pub animation_outset: (f32, f32),
pub layout: LayoutSpec,
pub style: VisualStyle,
pub path: Option<UiPath>,
pub path_style: PathStyle,
pub image_request: Option<ImageRequest>,
pub image_fit: ImageFit,
pub icon_key: Option<&'static str>,
pub icon_style: IconStyle,
pub glow: Option<(Color, u8)>,
pub backdrop_blur_style: Option<BackdropBlurStyle>,
pub overlay_style: Option<OverlayStyle>,
pub custom_style: Option<CustomPaintStyle>,
pub compositing_layer: Option<CompositingLayerSpec>,
pub shadow: Option<ShadowStyle>,
pub static_layer: Option<StaticLayerSpec>,
pub scroll_raster: Option<ScrollRasterSpec>,
pub clip_rect: Option<UiRect>,
pub content_offset: (f32, f32),
pub text: Option<Cow<'static, str>>,
pub text_style: Option<TextStyle>,
pub render_phase: RenderPhase,
pub children: Vec<UiId>,
}Fields§
§id: UiId§component_owner: Option<ComponentId>§parent: Option<UiId>§kind: UiNodeKind§layout_rect: UiRect§hit_rect: UiRect§paint_bounds: UiRect§ime_cursor_rect: Option<UiRect>§interaction: InteractionRole§semantics: Option<Semantics>§click_capture_handler: Option<UiEventHandler>§click_handler: Option<UiEventHandler>§input_event_handlers: Vec<UiInputEventBinding>§click_action: Option<UiAction>§wheel_action: Option<UiAction>§action_target: Option<UiId>§action_handlers: Vec<UiActionBinding>§event_policy: EventPolicy§auto_focus: bool§focus_scope: bool§animation_bindings: Vec<AnimationBinding>§animation_targets: Vec<(AnimProperty, bool)>§animation_outset: (f32, f32)§layout: LayoutSpec§style: VisualStyle§path: Option<UiPath>§path_style: PathStyle§image_request: Option<ImageRequest>§image_fit: ImageFit§icon_key: Option<&'static str>§icon_style: IconStyle§glow: Option<(Color, u8)>§backdrop_blur_style: Option<BackdropBlurStyle>§overlay_style: Option<OverlayStyle>§custom_style: Option<CustomPaintStyle>§compositing_layer: Option<CompositingLayerSpec>§shadow: Option<ShadowStyle>§static_layer: Option<StaticLayerSpec>§scroll_raster: Option<ScrollRasterSpec>§clip_rect: Option<UiRect>§content_offset: (f32, f32)§text: Option<Cow<'static, str>>§text_style: Option<TextStyle>§render_phase: RenderPhase§children: Vec<UiId>Implementations§
Source§impl UiNode
impl UiNode
pub fn new(id: UiId, kind: UiNodeKind, layout_rect: UiRect) -> Self
pub fn parent(self, parent: UiId) -> Self
pub fn hit_rect(self, rect: UiRect) -> Self
pub fn paint_bounds(self, rect: UiRect) -> Self
pub fn ime_cursor_rect(self, rect: UiRect) -> Self
pub fn interaction(self, interaction: InteractionRole) -> Self
pub fn semantics(self, semantics: Semantics) -> Self
pub fn on_click<F>(self, handler: F) -> Self
pub fn on_click_handler(self, handler: UiEventHandler) -> Self
pub fn on_click_capture_handler(self, handler: UiEventHandler) -> Self
pub fn on_click_capture<F>(self, handler: F) -> Self
pub fn on_event_handler( self, kind: UiEventKind, capture: bool, handler: UiInputEventHandler, ) -> Self
pub fn on_event<F>(self, kind: UiEventKind, handler: F) -> Self
pub fn on_event_capture<F>(self, kind: UiEventKind, handler: F) -> Self
pub fn wheel_action(self, action: UiAction) -> Self
pub fn click_action(self, action: UiAction) -> Self
pub fn action_target(self, target: UiId) -> Self
pub fn on_action<F>(self, id: impl Into<ActionId>, handler: F) -> Self
pub fn on_action_handler( self, id: impl Into<ActionId>, handler: UiActionHandler, ) -> Self
pub fn event_policy(self, policy: EventPolicy) -> Self
pub fn auto_focus(self, enabled: bool) -> Self
pub fn focus_scope(self, enabled: bool) -> Self
pub fn animation(self, binding: AnimationBinding) -> Self
pub fn animation_target(self, property: AnimProperty, active: bool) -> Self
pub fn animation_outset(self, x: f32, y: f32) -> Self
pub fn layout(self, layout: LayoutSpec) -> Self
pub fn style(self, style: VisualStyle) -> Self
pub fn path(self, path: UiPath, style: PathStyle) -> Self
pub fn text(self, value: impl Into<Cow<'static, str>>, style: TextStyle) -> Self
pub fn image(self, source: impl Into<UiImageSource>, fit: ImageFit) -> Self
pub fn image_request( self, request: impl Into<ImageRequest>, fit: ImageFit, ) -> Self
pub fn icon(self, key: &'static str) -> Self
pub fn icon_style(self, style: IconStyle) -> Self
pub fn glow(self, color: Color, alpha: u8) -> Self
pub fn overlay(self, style: OverlayStyle) -> Self
pub fn backdrop_blur(self, style: BackdropBlurStyle) -> Self
pub fn custom_style(self, style: CustomPaintStyle) -> Self
pub fn static_layer(self, spec: StaticLayerSpec) -> Self
pub fn compositing_layer(self, spec: CompositingLayerSpec) -> Self
pub fn shadow(self, style: ShadowStyle) -> Self
pub fn scroll_raster(self, spec: ScrollRasterSpec) -> Self
pub fn clip(self, rect: UiRect, offset_x: f32, offset_y: f32) -> Self
pub fn render_phase(self, phase: RenderPhase) -> Self
pub fn translate(self, x: f32, y: f32) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for UiNode
impl !UnwindSafe for UiNode
impl Freeze for UiNode
impl Send for UiNode
impl Sync for UiNode
impl Unpin for UiNode
impl UnsafeUnpin for UiNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more