pub struct EuvSegmented { /* private fields */ }Expand description
Cross-platform segmented option selector.
Implementations§
Source§impl EuvSegmented
Theme-aware paint helpers for EuvSegmented.
impl EuvSegmented
Theme-aware paint helpers for EuvSegmented.
Sourcepub fn apply_segment_paint(
paint: &mut PaintStyle,
tokens: ThemeTokens,
active: bool,
hovered: bool,
)
pub fn apply_segment_paint( paint: &mut PaintStyle, tokens: ThemeTokens, active: bool, hovered: bool, )
Writes active / hovered / inactive segment fill, border, and elevation for tokens onto paint.
§Arguments
&mut PaintStyle- Segment paint to update.ThemeTokens- Live theme tokens.bool- Whether the segment is selected.bool- Whether the segment is hovered.
Sourcepub fn segment_hover_paint(
tokens: ThemeTokens,
active: bool,
) -> Option<PaintStyle>
pub fn segment_hover_paint( tokens: ThemeTokens, active: bool, ) -> Option<PaintStyle>
Returns the subtle hover paint applied to inactive segments (preserving the uniform CONTROL_INSET gap next to the active pill).
§Arguments
ThemeTokens- Live theme tokens.bool- Whether the segment is currently active.
§Returns
Option<PaintStyle>- Accent hover surface for inactive segments,Nonefor the active segment.
Source§impl EuvSegmented
impl EuvSegmented
pub fn get_options(&self) -> &Vec<String>
pub fn get_mut_options(&mut self) -> &mut Vec<String>
pub fn set_options(&mut self, val: Vec<String>) -> &mut Self
pub fn get_selected(&self) -> Signal<usize>
pub fn get_mut_selected(&mut self) -> &mut Signal<usize>
pub fn set_selected(&mut self, val: Signal<usize>) -> &mut Self
pub fn get_tokens(&self) -> ThemeTokens
pub fn get_mut_tokens(&mut self) -> &mut ThemeTokens
pub fn set_tokens(&mut self, val: ThemeTokens) -> &mut Self
Source§impl EuvSegmented
impl EuvSegmented
Trait Implementations§
Source§impl Clone for EuvSegmented
impl Clone for EuvSegmented
Source§impl Component for EuvSegmented
Implements impl #impl_generics ::euv::Component for #self_type #where_clause.
impl Component for EuvSegmented
Implements impl #impl_generics ::euv::Component for #self_type #where_clause.
Source§fn render(&self) -> NodeId
fn render(&self) -> NodeId
Renders EuvSegmented into the ambient framework-managed Context.
The track uses a uniform CONTROL_INSET on all four sides equal to the inter-segment gap, and segment pills
use the concentric radius radius_lg - CONTROL_INSET. Active segment paint is owned by a reactive Effect
tracking both the selection and the live ambient theme.
§Arguments
&Self- Component descriptor reference.
§Returns
NodeId- Mounted root scene node handle.
Source§const NEEDS_LIFECYCLE: bool = false
const NEEDS_LIFECYCLE: bool = false
Rc<Self> observer registration on mount.Source§impl ComponentProps for EuvSegmented
Implements impl #impl_generics ::euv::ComponentProps for #struct_ident #ty_generics #where_clause.
impl ComponentProps for EuvSegmented
Implements impl #impl_generics ::euv::ComponentProps for #struct_ident #ty_generics #where_clause.
Source§fn init_props() -> Self
fn init_props() -> Self
Implements the init_props operation on Self.
Source§impl Debug for EuvSegmented
impl Debug for EuvSegmented
Source§impl Lifecycle for EuvSegmented
Implements impl #impl_generics ::euv::Lifecycle for #self_type #where_clause.
impl Lifecycle for EuvSegmented
Implements impl #impl_generics ::euv::Lifecycle for #self_type #where_clause.
Source§fn retention_policy(&self) -> PageRetention
fn retention_policy(&self) -> PageRetention
Source§fn on_create(&self)
fn on_create(&self)
render pass executes. Read moreSource§fn on_update(&self, _node: NodeId)
fn on_update(&self, _node: NodeId)
Source§fn on_activate(&self, _node: NodeId)
fn on_activate(&self, _node: NodeId)
Source§fn on_freeze(&self, _node: NodeId)
fn on_freeze(&self, _node: NodeId)
PageRetention::Freeze. Read moreSource§fn on_resume(&self, _node: NodeId)
fn on_resume(&self, _node: NodeId)
Source§fn on_unmount(&self, _node: NodeId)
fn on_unmount(&self, _node: NodeId)
Source§fn on_destroy(&self)
fn on_destroy(&self)
Source§fn on_error(&self, _error: &str)
fn on_error(&self, _error: &str)
Source§fn on_appear(&self)
fn on_appear(&self)
Source§fn on_disappear(&self)
fn on_disappear(&self)
Source§fn on_foreground(&self)
fn on_foreground(&self)
Source§fn on_background(&self)
fn on_background(&self)
Source§fn on_inactive(&self)
fn on_inactive(&self)
Source§fn on_terminate(&self)
fn on_terminate(&self)
Source§fn on_system_event(&self, _event: &SystemEvent)
fn on_system_event(&self, _event: &SystemEvent)
SystemEvent delivered while this component is active. Read more