Style

Struct Style 

Source
pub struct Style {
Show 73 fields pub rules: Vec<StyleRule>, pub elements: DenseStorage<String>, pub classes: DenseStorage<HashSet<String>>, pub pseudo_classes: DenseStorage<PseudoClasses>, pub z_order: StyleStorage<i32>, pub rotate: AnimatableStorage<f32>, pub translate: StyleStorage<(f32, f32)>, pub scale: StyleStorage<f32>, pub display: StyleStorage<Display>, pub visibility: StyleStorage<Visibility>, pub opacity: AnimatableStorage<Opacity>, pub overflow: StyleStorage<Overflow>, pub left: AnimatableStorage<Units>, pub right: AnimatableStorage<Units>, pub top: AnimatableStorage<Units>, pub bottom: AnimatableStorage<Units>, pub width: AnimatableStorage<Units>, pub height: AnimatableStorage<Units>, pub max_width: AnimatableStorage<Units>, pub max_height: AnimatableStorage<Units>, pub min_width: AnimatableStorage<Units>, pub min_height: AnimatableStorage<Units>, pub min_left: AnimatableStorage<Units>, pub max_left: AnimatableStorage<Units>, pub min_right: AnimatableStorage<Units>, pub max_right: AnimatableStorage<Units>, pub min_top: AnimatableStorage<Units>, pub max_top: AnimatableStorage<Units>, pub min_bottom: AnimatableStorage<Units>, pub max_bottom: AnimatableStorage<Units>, pub border_width: AnimatableStorage<Units>, pub border_color: AnimatableStorage<Color>, pub border_shape_top_left: StyleStorage<BorderCornerShape>, pub border_shape_top_right: StyleStorage<BorderCornerShape>, pub border_shape_bottom_left: StyleStorage<BorderCornerShape>, pub border_shape_bottom_right: StyleStorage<BorderCornerShape>, pub border_radius_top_left: AnimatableStorage<Units>, pub border_radius_top_right: AnimatableStorage<Units>, pub border_radius_bottom_left: AnimatableStorage<Units>, pub border_radius_bottom_right: AnimatableStorage<Units>, pub clip_widget: DenseStorage<Entity>, pub focus_order: DenseStorage<FocusOrder>, pub background_color: AnimatableStorage<Color>, pub background_image: StyleStorage<Rc<()>>, pub background_gradient: StyleStorage<LinearGradient>, pub outer_shadow_h_offset: AnimatableStorage<Units>, pub outer_shadow_v_offset: AnimatableStorage<Units>, pub outer_shadow_blur: AnimatableStorage<Units>, pub outer_shadow_color: AnimatableStorage<Color>, pub inner_shadow_h_offset: AnimatableStorage<Units>, pub inner_shadow_v_offset: AnimatableStorage<Units>, pub inner_shadow_blur: AnimatableStorage<Units>, pub inner_shadow_color: AnimatableStorage<Color>, pub text: DenseStorage<String>, pub font: DenseStorage<String>, pub font_color: AnimatableStorage<Color>, pub font_size: AnimatableStorage<f32>, pub tooltip: DenseStorage<String>, pub layout_type: StyleStorage<LayoutType>, pub positioning_type: StyleStorage<PositionType>, pub grid_rows: StyleStorage<Vec<Units>>, pub row_between: AnimatableStorage<Units>, pub grid_cols: StyleStorage<Vec<Units>>, pub col_between: AnimatableStorage<Units>, pub row_index: StyleStorage<usize>, pub col_index: StyleStorage<usize>, pub row_span: StyleStorage<usize>, pub col_span: StyleStorage<usize>, pub child_left: AnimatableStorage<Units>, pub child_right: AnimatableStorage<Units>, pub child_top: AnimatableStorage<Units>, pub child_bottom: AnimatableStorage<Units>, pub name: StyleStorage<String>,
}

Fields§

§rules: Vec<StyleRule>§elements: DenseStorage<String>§classes: DenseStorage<HashSet<String>>§pseudo_classes: DenseStorage<PseudoClasses>§z_order: StyleStorage<i32>§rotate: AnimatableStorage<f32>§translate: StyleStorage<(f32, f32)>§scale: StyleStorage<f32>§display: StyleStorage<Display>§visibility: StyleStorage<Visibility>§opacity: AnimatableStorage<Opacity>§overflow: StyleStorage<Overflow>§left: AnimatableStorage<Units>§right: AnimatableStorage<Units>§top: AnimatableStorage<Units>§bottom: AnimatableStorage<Units>§width: AnimatableStorage<Units>§height: AnimatableStorage<Units>§max_width: AnimatableStorage<Units>§max_height: AnimatableStorage<Units>§min_width: AnimatableStorage<Units>§min_height: AnimatableStorage<Units>§min_left: AnimatableStorage<Units>§max_left: AnimatableStorage<Units>§min_right: AnimatableStorage<Units>§max_right: AnimatableStorage<Units>§min_top: AnimatableStorage<Units>§max_top: AnimatableStorage<Units>§min_bottom: AnimatableStorage<Units>§max_bottom: AnimatableStorage<Units>§border_width: AnimatableStorage<Units>§border_color: AnimatableStorage<Color>§border_shape_top_left: StyleStorage<BorderCornerShape>§border_shape_top_right: StyleStorage<BorderCornerShape>§border_shape_bottom_left: StyleStorage<BorderCornerShape>§border_shape_bottom_right: StyleStorage<BorderCornerShape>§border_radius_top_left: AnimatableStorage<Units>§border_radius_top_right: AnimatableStorage<Units>§border_radius_bottom_left: AnimatableStorage<Units>§border_radius_bottom_right: AnimatableStorage<Units>§clip_widget: DenseStorage<Entity>§focus_order: DenseStorage<FocusOrder>§background_color: AnimatableStorage<Color>§background_image: StyleStorage<Rc<()>>§background_gradient: StyleStorage<LinearGradient>§outer_shadow_h_offset: AnimatableStorage<Units>§outer_shadow_v_offset: AnimatableStorage<Units>§outer_shadow_blur: AnimatableStorage<Units>§outer_shadow_color: AnimatableStorage<Color>§inner_shadow_h_offset: AnimatableStorage<Units>§inner_shadow_v_offset: AnimatableStorage<Units>§inner_shadow_blur: AnimatableStorage<Units>§inner_shadow_color: AnimatableStorage<Color>§text: DenseStorage<String>§font: DenseStorage<String>§font_color: AnimatableStorage<Color>§font_size: AnimatableStorage<f32>§tooltip: DenseStorage<String>§layout_type: StyleStorage<LayoutType>§positioning_type: StyleStorage<PositionType>§grid_rows: StyleStorage<Vec<Units>>§row_between: AnimatableStorage<Units>§grid_cols: StyleStorage<Vec<Units>>§col_between: AnimatableStorage<Units>§row_index: StyleStorage<usize>§col_index: StyleStorage<usize>§row_span: StyleStorage<usize>§col_span: StyleStorage<usize>§child_left: AnimatableStorage<Units>§child_right: AnimatableStorage<Units>§child_top: AnimatableStorage<Units>§child_bottom: AnimatableStorage<Units>§name: StyleStorage<String>

Implementations§

Source§

impl Style

Source

pub fn add_rule(&mut self, style_rule: StyleRule)

Source

pub fn parse_theme(&mut self, stylesheet: &str)

Source

pub fn set_property(&mut self, entity: Entity, propert: Property)

Source

pub fn remove(&mut self, entity: Entity)

Source

pub fn remove_all(&mut self)

Trait Implementations§

Source§

impl Clone for Style

Source§

fn clone(&self) -> Style

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Style

Source§

fn default() -> Style

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Style

§

impl RefUnwindSafe for Style

§

impl !Send for Style

§

impl !Sync for Style

§

impl Unpin for Style

§

impl UnwindSafe for Style

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Node for T
where T: 'static,