pub struct ComputedStates {Show 25 fields
pub base: Rc<StyleRefinement>,
pub hover: Option<Rc<StyleRefinement>>,
pub active: Option<Rc<StyleRefinement>>,
pub focus: Option<Rc<StyleRefinement>>,
pub focus_visible: Option<Rc<StyleRefinement>>,
pub focus_within: Option<Rc<StyleRefinement>>,
pub group_hover: Option<(u64, Rc<StyleRefinement>)>,
pub group_active: Option<(u64, Rc<StyleRefinement>)>,
pub group_focus: Option<Rc<GroupFocus>>,
pub transitions: Rc<Vec<TransitionSpec>>,
pub animations: Rc<Vec<AnimationSpec>>,
pub extras: Extras,
pub before: Option<Rc<PseudoBox>>,
pub after: Option<Rc<PseudoBox>>,
pub placeholder: Option<Rc<StyleRefinement>>,
pub selection: Option<Rc<StyleRefinement>>,
pub file_selector_button: Option<Rc<StyleRefinement>>,
pub range_track: Option<Rc<ControlPseudo>>,
pub range_thumb: Option<Rc<ControlPseudo>>,
pub color_swatch: Option<Rc<ControlPseudo>>,
pub color_swatch_wrapper: Option<Rc<ControlPseudo>>,
pub vars: Rc<Vars>,
pub color: Option<Hsla>,
pub font_size: f32,
pub computed_font: Font,
/* private fields */
}Fields§
§base: Rc<StyleRefinement>§hover: Option<Rc<StyleRefinement>>§active: Option<Rc<StyleRefinement>>§focus: Option<Rc<StyleRefinement>>:focus — gpui’s .focus() rung. A node that has one MUST be given a tracked focus handle
by the renderer, or gpui has nothing to key it on.
focus_visible: Option<Rc<StyleRefinement>>§focus_within: Option<Rc<StyleRefinement>>§group_hover: Option<(u64, Rc<StyleRefinement>)>§group_active: Option<(u64, Rc<StyleRefinement>)>§group_focus: Option<Rc<GroupFocus>>:focus, :focus-visible and :focus-within on an ancestor compound, folded at render.
transitions: Rc<Vec<TransitionSpec>>§animations: Rc<Vec<AnimationSpec>>§extras: Extras§before: Option<Rc<PseudoBox>>§after: Option<Rc<PseudoBox>>§placeholder: Option<Rc<StyleRefinement>>§selection: Option<Rc<StyleRefinement>>Only background-color reaches the widget: gpui’s selection is a quad behind the glyphs.
range_track: Option<Rc<ControlPseudo>>§range_thumb: Option<Rc<ControlPseudo>>§color_swatch: Option<Rc<ControlPseudo>>§color_swatch_wrapper: Option<Rc<ControlPseudo>>§vars: Rc<Vars>Children read this one, so the restyle pass must walk in document order.
color: Option<Hsla>The effective color (own or threaded from the parent), kept only because currentColor is
a computed value that needs it; no other inherited text property is folded here.
font_size: f32§computed_font: FontImplementations§
Source§impl ComputedStates
impl ComputedStates
Sourcepub fn needs_focus_handle(&self) -> bool
pub fn needs_focus_handle(&self) -> bool
True when the renderer has to give this node a focus handle for gpui to have anything to hang the focus rungs on.
pub fn control_state(&self, rung: usize) -> bool
pub fn hover_transitions(&self) -> bool
Trait Implementations§
Source§impl Clone for ComputedStates
impl Clone for ComputedStates
Source§impl Debug for ComputedStates
impl Debug for ComputedStates
Source§impl Default for ComputedStates
impl Default for ComputedStates
Source§impl PartialEq for ComputedStates
impl PartialEq for ComputedStates
impl StructuralPartialEq for ComputedStates
Auto Trait Implementations§
impl !RefUnwindSafe for ComputedStates
impl !Send for ComputedStates
impl !Sync for ComputedStates
impl !UnwindSafe for ComputedStates
impl Forget for ComputedStates
impl Freeze for ComputedStates
impl Move for ComputedStates
impl Unpin for ComputedStates
impl UnsafeUnpin for ComputedStates
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more