#[repr(C)]pub struct Layer {
pub engine: Arc<Engine>,
/* private fields */
}
Fields§
§engine: Arc<Engine>
Implementations§
source§impl Layer
impl Layer
pub fn set_id(&self, id: NodeRef)
pub fn id(&self) -> Option<NodeRef>
pub fn set_key(&self, key: impl Into<String>)
pub fn key(&self) -> String
pub fn set_pointer_events(&self, pointer_events: bool)
pub fn pointer_events(&self) -> bool
pub fn set_position( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn position(&self) -> Point
pub fn position_value_id(&self) -> usize
pub fn change_position(&self, value: impl Into<Point>) -> AnimatedNodeChange
pub fn set_scale( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn scale(&self) -> Point
pub fn scale_value_id(&self) -> usize
pub fn change_scale(&self, value: impl Into<Point>) -> AnimatedNodeChange
pub fn set_rotation( &self, value: impl Into<Point3d>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn rotation(&self) -> Point3d
pub fn rotation_value_id(&self) -> usize
pub fn change_rotation(&self, value: impl Into<Point3d>) -> AnimatedNodeChange
pub fn set_anchor_point( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn anchor_point(&self) -> Point
pub fn anchor_point_value_id(&self) -> usize
pub fn change_anchor_point(&self, value: impl Into<Point>) -> AnimatedNodeChange
pub fn set_opacity( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn opacity(&self) -> f32
pub fn opacity_value_id(&self) -> usize
pub fn change_opacity(&self, value: impl Into<f32>) -> AnimatedNodeChange
pub fn set_background_color( &self, value: impl Into<PaintColor>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn background_color(&self) -> PaintColor
pub fn background_color_value_id(&self) -> usize
pub fn change_background_color( &self, value: impl Into<PaintColor>, ) -> AnimatedNodeChange
pub fn set_border_corner_radius( &self, value: impl Into<BorderRadius>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn border_corner_radius(&self) -> BorderRadius
pub fn border_corner_radius_value_id(&self) -> usize
pub fn change_border_corner_radius( &self, value: impl Into<BorderRadius>, ) -> AnimatedNodeChange
pub fn set_border_color( &self, value: impl Into<PaintColor>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn border_color(&self) -> PaintColor
pub fn border_color_value_id(&self) -> usize
pub fn change_border_color( &self, value: impl Into<PaintColor>, ) -> AnimatedNodeChange
pub fn set_border_width( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn border_width(&self) -> f32
pub fn border_width_value_id(&self) -> usize
pub fn change_border_width(&self, value: impl Into<f32>) -> AnimatedNodeChange
pub fn set_shadow_offset( &self, value: impl Into<Point>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn shadow_offset(&self) -> Point
pub fn shadow_offset_value_id(&self) -> usize
pub fn change_shadow_offset( &self, value: impl Into<Point>, ) -> AnimatedNodeChange
pub fn set_shadow_radius( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn shadow_radius(&self) -> f32
pub fn shadow_radius_value_id(&self) -> usize
pub fn change_shadow_radius(&self, value: impl Into<f32>) -> AnimatedNodeChange
pub fn set_shadow_spread( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn shadow_spread(&self) -> f32
pub fn shadow_spread_value_id(&self) -> usize
pub fn change_shadow_spread(&self, value: impl Into<f32>) -> AnimatedNodeChange
pub fn set_shadow_color( &self, value: impl Into<Color>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn shadow_color(&self) -> Color
pub fn shadow_color_value_id(&self) -> usize
pub fn change_shadow_color(&self, value: impl Into<Color>) -> AnimatedNodeChange
pub fn set_image_filter_progress( &self, value: impl Into<f32>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn image_filter_progress(&self) -> f32
pub fn image_filter_progress_value_id(&self) -> usize
pub fn change_image_filter_progress( &self, value: impl Into<f32>, ) -> AnimatedNodeChange
pub fn set_clip_content( &self, value: impl Into<bool>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn clip_content(&self) -> bool
pub fn clip_content_value_id(&self) -> usize
pub fn change_clip_content(&self, value: impl Into<bool>) -> AnimatedNodeChange
pub fn change_size(&self, value: Size) -> AnimatedNodeChange
pub fn set_size( &self, value: impl Into<Size>, transition: impl Into<Option<Transition>>, ) -> TransactionRef
pub fn size(&self) -> Size
pub fn set_layout_style(&self, style: Style)
pub fn set_node_layout_size(&self, size: Size)
pub fn node_layout_style(&self) -> Style
pub fn set_draw_content<F: Into<ContentDrawFunction>>(&self, content_handler: F)
pub fn remove_draw_content(&self)
pub fn set_image_cache(&self, value: bool)
pub fn set_content_cache(&self, value: bool)
pub fn is_picture_cache(&self) -> bool
pub fn add_sublayer(&self, layer: Layer) -> NodeRef
pub fn set_blend_mode(&self, blend_mode: BlendMode)
pub fn set_display(&self, display: Display)
pub fn add_on_pointer_move<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>
pub fn remove_on_pointer_move(&self, handler_id: Option<usize>)
pub fn add_on_pointer_in<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>
pub fn remove_on_pointer_in(&self, handler_id: Option<usize>)
pub fn add_on_pointer_out<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>
pub fn remove_on_pointer_out(&self, handler_id: Option<usize>)
pub fn add_on_pointer_press<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>
pub fn remove_on_pointer_press(&self, handler_id: Option<usize>)
pub fn add_on_pointer_release<F: Into<PointerHandlerFunction>>( &self, handler: F, ) -> Option<usize>
pub fn remove_on_pointer_release(&self, handler_id: Option<usize>)
pub fn remove_all_pointer_handlers(&self)
pub fn render_position(&self) -> Point
pub fn render_size(&self) -> Point
pub fn render_bounds_transformed(&self) -> Rect
pub fn render_bounds_with_children_transformed(&self) -> Rect
pub fn render_bounds_with_children(&self) -> Rect
pub fn cointains_point(&self, point: impl Into<Point>) -> bool
pub fn children_nodes(&self) -> Vec<NodeRef>
pub fn children(&self) -> Vec<Layer>
pub fn with_state<F, T>(&self, f: F) -> Twhere
F: FnOnce(&LayerDataProps) -> T,
pub fn with_mut_state<F, T>(&self, f: F) -> Twhere
F: FnOnce(&mut LayerDataProps) -> T,
pub fn set_image_filter(&self, filter: impl Into<Option<ImageFilter>>)
pub fn set_color_filter(&self, filter: impl Into<Option<ColorFilter>>)
pub fn set_filter_bounds(&self, bounds: impl Into<Option<Rect>>)
pub fn remove(&self)
pub fn set_effect(&self, effect: impl Effect + 'static)
pub fn remove_effect(&self)
pub fn on_change_size<F: Into<TransactionCallback>>(&self, f: F, once: bool)
Trait Implementations§
source§impl BuildLayerTree for Layer
impl BuildLayerTree for Layer
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> 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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