pub struct StyleCx<'a> {
pub window_state: &'a mut WindowState,
/* private fields */
}Fields§
§window_state: &'a mut WindowStateImplementations§
Source§impl<'a> StyleCx<'a>
impl<'a> StyleCx<'a>
Sourcepub fn style_view_with_change(
&mut self,
view_id: ViewId,
change: StyleRecalcChange,
)
pub fn style_view_with_change( &mut self, view_id: ViewId, change: StyleRecalcChange, )
Compute styles for a view with graduated change propagation.
The change parameter describes what kind of recalculation is needed,
enabling optimizations like:
- Skipping views that don’t need recalc
- Using the inherited-only fast path when only inherited props changed
- Limiting recalc to immediate children vs entire subtrees
See StyleRecalcChange for details on the propagation model.
pub fn resolve_nested_maps( &self, style: Style, classes: &[StyleClassRef], is_focused: bool, is_clicking: bool, is_file_hover: bool, ) -> Style
Sourcepub fn get_child_change(&self, view_id: ViewId) -> StyleRecalcChange
pub fn get_child_change(&self, view_id: ViewId) -> StyleRecalcChange
Get the pending child change for a view.
This is used by views that manually process their children in style_pass
to get the appropriate change propagation level.
pub fn now(&self) -> Instant
pub fn get_prop<P: StyleProp>(&self, _prop: P) -> Option<P::Type>
pub fn style(&self) -> Style
pub fn direct_style(&self) -> &Style
pub fn indirect_style(&self) -> &Style
pub fn request_transition(&mut self)
Auto Trait Implementations§
impl<'a> Freeze for StyleCx<'a>
impl<'a> !RefUnwindSafe for StyleCx<'a>
impl<'a> !Send for StyleCx<'a>
impl<'a> !Sync for StyleCx<'a>
impl<'a> Unpin for StyleCx<'a>
impl<'a> !UnwindSafe for StyleCx<'a>
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
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