Struct lay_rs::prelude::Layer

source ·
#[repr(C)]
pub struct Layer { pub engine: Arc<Engine>, /* private fields */ }

Fields§

§engine: Arc<Engine>

Implementations§

source§

impl Layer

source

pub fn set_id(&self, id: NodeRef)

source

pub fn id(&self) -> Option<NodeRef>

source

pub fn set_key(&self, key: impl Into<String>)

source

pub fn key(&self) -> String

source

pub fn set_hidden(&self, hidden: bool)

source

pub fn hidden(&self) -> bool

source

pub fn set_pointer_events(&self, pointer_events: bool)

source

pub fn pointer_events(&self) -> bool

source

pub fn set_position( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn position(&self) -> Point

source

pub fn position_value_id(&self) -> usize

source

pub fn change_position(&self, value: impl Into<Point>) -> AnimatedNodeChange

source

pub fn set_scale( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn scale(&self) -> Point

source

pub fn scale_value_id(&self) -> usize

source

pub fn change_scale(&self, value: impl Into<Point>) -> AnimatedNodeChange

source

pub fn set_rotation( &self, value: impl Into<Point3d>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn rotation(&self) -> Point3d

source

pub fn rotation_value_id(&self) -> usize

source

pub fn change_rotation(&self, value: impl Into<Point3d>) -> AnimatedNodeChange

source

pub fn set_anchor_point( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn anchor_point(&self) -> Point

source

pub fn anchor_point_value_id(&self) -> usize

source

pub fn change_anchor_point(&self, value: impl Into<Point>) -> AnimatedNodeChange

source

pub fn set_opacity( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn opacity(&self) -> f32

source

pub fn opacity_value_id(&self) -> usize

source

pub fn change_opacity(&self, value: impl Into<f32>) -> AnimatedNodeChange

source

pub fn set_background_color( &self, value: impl Into<PaintColor>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn background_color(&self) -> PaintColor

source

pub fn background_color_value_id(&self) -> usize

source

pub fn change_background_color( &self, value: impl Into<PaintColor>, ) -> AnimatedNodeChange

source

pub fn set_border_corner_radius( &self, value: impl Into<BorderRadius>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn border_corner_radius(&self) -> BorderRadius

source

pub fn border_corner_radius_value_id(&self) -> usize

source

pub fn change_border_corner_radius( &self, value: impl Into<BorderRadius>, ) -> AnimatedNodeChange

source

pub fn set_border_color( &self, value: impl Into<PaintColor>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn border_color(&self) -> PaintColor

source

pub fn border_color_value_id(&self) -> usize

source

pub fn change_border_color( &self, value: impl Into<PaintColor>, ) -> AnimatedNodeChange

source

pub fn set_border_width( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn border_width(&self) -> f32

source

pub fn border_width_value_id(&self) -> usize

source

pub fn change_border_width(&self, value: impl Into<f32>) -> AnimatedNodeChange

source

pub fn set_shadow_offset( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn shadow_offset(&self) -> Point

source

pub fn shadow_offset_value_id(&self) -> usize

source

pub fn change_shadow_offset( &self, value: impl Into<Point>, ) -> AnimatedNodeChange

source

pub fn set_shadow_radius( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn shadow_radius(&self) -> f32

source

pub fn shadow_radius_value_id(&self) -> usize

source

pub fn change_shadow_radius(&self, value: impl Into<f32>) -> AnimatedNodeChange

source

pub fn set_shadow_spread( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn shadow_spread(&self) -> f32

source

pub fn shadow_spread_value_id(&self) -> usize

source

pub fn change_shadow_spread(&self, value: impl Into<f32>) -> AnimatedNodeChange

source

pub fn set_shadow_color( &self, value: impl Into<Color>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn shadow_color(&self) -> Color

source

pub fn shadow_color_value_id(&self) -> usize

source

pub fn change_shadow_color(&self, value: impl Into<Color>) -> AnimatedNodeChange

source

pub fn set_image_filter_progress( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn image_filter_progress(&self) -> f32

source

pub fn image_filter_progress_value_id(&self) -> usize

source

pub fn change_image_filter_progress( &self, value: impl Into<f32>, ) -> AnimatedNodeChange

source

pub fn set_clip_content( &self, value: impl Into<bool>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn clip_content(&self) -> bool

source

pub fn clip_content_value_id(&self) -> usize

source

pub fn change_clip_content(&self, value: impl Into<bool>) -> AnimatedNodeChange

source

pub fn change_size(&self, value: Size) -> AnimatedNodeChange

source

pub fn set_size( &self, value: impl Into<Size>, transition: impl Into<Option<Transition>>, ) -> TransactionRef

source

pub fn size(&self) -> Size

source

pub fn set_layout_style(&self, style: Style)

source

pub fn set_node_layout_size(&self, size: Size)

source

pub fn node_layout_style(&self) -> Style

source

pub fn set_draw_content<F: Into<ContentDrawFunction>>(&self, content_handler: F)

source

pub fn remove_draw_content(&self)

source

pub fn set_image_cache(&self, value: bool)

source

pub fn set_content_cache(&self, value: bool)

source

pub fn is_picture_cache(&self) -> bool

source

pub fn add_sublayer(&self, layer: Layer) -> NodeRef

source

pub fn set_blend_mode(&self, blend_mode: BlendMode)

source

pub fn set_display(&self, display: Display)

source

pub fn add_on_pointer_move<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>

source

pub fn remove_on_pointer_move(&self, handler_id: Option<usize>)

source

pub fn add_on_pointer_in<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>

source

pub fn remove_on_pointer_in(&self, handler_id: Option<usize>)

source

pub fn add_on_pointer_out<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>

source

pub fn remove_on_pointer_out(&self, handler_id: Option<usize>)

source

pub fn add_on_pointer_press<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>

source

pub fn remove_on_pointer_press(&self, handler_id: Option<usize>)

source

pub fn add_on_pointer_release<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>

source

pub fn remove_on_pointer_release(&self, handler_id: Option<usize>)

source

pub fn remove_all_pointer_handlers(&self)

source

pub fn render_position(&self) -> Point

source

pub fn render_size(&self) -> Point

source

pub fn render_bounds_transformed(&self) -> Rect

source

pub fn render_bounds_with_children_transformed(&self) -> Rect

source

pub fn render_bounds_with_children(&self) -> Rect

source

pub fn cointains_point(&self, point: impl Into<Point>) -> bool

source

pub fn children_nodes(&self) -> Vec<NodeRef>

source

pub fn children(&self) -> Vec<Layer>

source

pub fn with_state<F, T>(&self, f: F) -> T
where F: FnOnce(&LayerDataProps) -> T,

source

pub fn with_mut_state<F, T>(&self, f: F) -> T
where F: FnOnce(&mut LayerDataProps) -> T,

source

pub fn set_image_filter(&self, filter: impl Into<Option<ImageFilter>>)

source

pub fn set_color_filter(&self, filter: impl Into<Option<ColorFilter>>)

source

pub fn set_filter_bounds(&self, bounds: impl Into<Option<Rect>>)

source

pub fn remove(&self)

source

pub fn set_effect(&self, effect: impl Effect + 'static)

source

pub fn remove_effect(&self)

source

pub fn on_change_size<F: Into<TransactionCallback>>(&self, f: F, once: bool)

Trait Implementations§

source§

impl BuildLayerTree for Layer

source§

fn build_layer_tree_internal( &self, viewlayer_tree: &LayerTree, cache_viewlayer: &mut HashMap<String, VecDeque<NodeRef>>, )

source§

fn build_layer_tree(&self, viewlayer_tree: impl AsRef<LayerTree>)

source§

impl Clone for Layer

source§

fn clone(&self) -> Layer

Returns a copy 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 Debug for Layer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Layer> for Option<NodeRef>

source§

fn from(val: Layer) -> Self

Converts to this type from the input type.
source§

impl Hash for Layer

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Layer

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Layer

Auto Trait Implementations§

§

impl Freeze for Layer

§

impl !RefUnwindSafe for Layer

§

impl Send for Layer

§

impl Sync for Layer

§

impl Unpin for Layer

§

impl !UnwindSafe for Layer

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, dst: *mut T)

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

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

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.