pub struct StyleContext<'a> {
pub tag: &'a str,
pub static_disabled: bool,
pub bind_disabled: bool,
pub part: Option<WidgetPart>,
pub tab_strip: bool,
pub dropdown_button: bool,
pub radio: bool,
pub page_gate: bool,
pub virtualized_for: bool,
pub in_scroll: bool,
pub layout_boundary: bool,
}Expand description
What an element is, beyond its styles, that decides how its styles become components. Spawning reads it off the element’s attributes; a restyle reads it off the components spawning attached.
Fields§
§tag: &'a strThe element’s tag.
static_disabled: boolDisabled with no bind-disabled to change it: the :disabled
styles apply as the element’s own.
bind_disabled: boolCarries bind-disabled: the :disabled styles become a state
patch that comes and goes with the marker.
part: Option<WidgetPart>The widget part the parser synthesized it as, if any.
tab_strip: boolA <tabs> strip button.
A <dropdown>’s header button.
radio: boolA <radio> that names its group and value.
page_gate: boolThe gate a page of a multi-page app mounts inside.
virtualized_for: boolA virtualized <for> block.
in_scroll: boolThe element’s parent is a scroll container.
layout_boundary: boolAsked for a relayout boundary in markup (layout-boundary).
Implementations§
Source§impl<'a> StyleContext<'a>
impl<'a> StyleContext<'a>
Sourcepub fn of_attrs(tag: &'a str, attrs: &Attributes, in_scroll: bool) -> Self
pub fn of_attrs(tag: &'a str, attrs: &Attributes, in_scroll: bool) -> Self
The context spawning reads off an element’s attributes.
Trait Implementations§
Source§impl<'a> Clone for StyleContext<'a>
impl<'a> Clone for StyleContext<'a>
Source§fn clone(&self) -> StyleContext<'a>
fn clone(&self) -> StyleContext<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for StyleContext<'a>
impl<'a> Debug for StyleContext<'a>
Source§impl<'a> Default for StyleContext<'a>
impl<'a> Default for StyleContext<'a>
Source§fn default() -> StyleContext<'a>
fn default() -> StyleContext<'a>
impl<'a> Copy for StyleContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for StyleContext<'a>
impl<'a> RefUnwindSafe for StyleContext<'a>
impl<'a> Send for StyleContext<'a>
impl<'a> Sync for StyleContext<'a>
impl<'a> Unpin for StyleContext<'a>
impl<'a> UnsafeUnpin for StyleContext<'a>
impl<'a> UnwindSafe for StyleContext<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.