pub struct SimplifiedLayoutManager { /* private fields */ }Expand description
Simplified layout manager that provides a clean, simple interface
This is the main public API for layout animations. It provides a clean, simple interface while hiding the complexity of the underlying layout tracking and animation systems.
Implementations§
Source§impl SimplifiedLayoutManager
impl SimplifiedLayoutManager
Sourcepub fn new() -> SimplifiedLayoutManager
pub fn new() -> SimplifiedLayoutManager
Create a new simplified layout manager with default configuration
Sourcepub fn with_config(config: SimplifiedLayoutConfig) -> SimplifiedLayoutManager
pub fn with_config(config: SimplifiedLayoutConfig) -> SimplifiedLayoutManager
Create a new simplified layout manager with custom configuration
Sourcepub fn start_tracking(
&mut self,
element_id: &str,
element: &Element,
) -> Result<(), String>
pub fn start_tracking( &mut self, element_id: &str, element: &Element, ) -> Result<(), String>
Start tracking an element for layout changes
Sourcepub fn stop_tracking(&mut self, element_id: &str) -> Result<(), String>
pub fn stop_tracking(&mut self, element_id: &str) -> Result<(), String>
Stop tracking an element
Sourcepub fn animate_layout_change(
&mut self,
element_id: &str,
from_layout: &LayoutInfo,
to_layout: &LayoutInfo,
) -> Result<(), String>
pub fn animate_layout_change( &mut self, element_id: &str, from_layout: &LayoutInfo, to_layout: &LayoutInfo, ) -> Result<(), String>
Animate layout change for an element
Sourcepub fn flip_animate(
&mut self,
element_id: &str,
from_layout: &LayoutInfo,
to_layout: &LayoutInfo,
) -> Result<(), String>
pub fn flip_animate( &mut self, element_id: &str, from_layout: &LayoutInfo, to_layout: &LayoutInfo, ) -> Result<(), String>
Perform FLIP animation
Perform shared element transition
Sourcepub fn batch_start_tracking(
&mut self,
elements: Vec<(&str, &Element)>,
) -> Result<(), String>
pub fn batch_start_tracking( &mut self, elements: Vec<(&str, &Element)>, ) -> Result<(), String>
Batch start tracking multiple elements
Sourcepub fn batch_animate(
&mut self,
animations: Vec<(&str, &LayoutInfo, &LayoutInfo)>,
) -> Result<(), String>
pub fn batch_animate( &mut self, animations: Vec<(&str, &LayoutInfo, &LayoutInfo)>, ) -> Result<(), String>
Batch animate multiple elements
Sourcepub fn get_layout_info(&self, element_id: &str) -> Option<LayoutInfo>
pub fn get_layout_info(&self, element_id: &str) -> Option<LayoutInfo>
Get layout information for an element
Sourcepub fn get_animation_status(
&self,
element_id: &str,
) -> Option<&SimplifiedAnimationStatus>
pub fn get_animation_status( &self, element_id: &str, ) -> Option<&SimplifiedAnimationStatus>
Get animation status for an element
Sourcepub fn pause_animation(&mut self, element_id: &str) -> Result<(), String>
pub fn pause_animation(&mut self, element_id: &str) -> Result<(), String>
Pause animation for an element
Sourcepub fn resume_animation(&mut self, element_id: &str) -> Result<(), String>
pub fn resume_animation(&mut self, element_id: &str) -> Result<(), String>
Resume animation for an element
Sourcepub fn cancel_animation(&mut self, element_id: &str) -> Result<(), String>
pub fn cancel_animation(&mut self, element_id: &str) -> Result<(), String>
Cancel animation for an element
Sourcepub fn get_performance_metrics(&self) -> Option<SimplifiedPerformanceMetrics>
pub fn get_performance_metrics(&self) -> Option<SimplifiedPerformanceMetrics>
Get performance metrics
Sourcepub fn update_config(&mut self, config: SimplifiedLayoutConfig)
pub fn update_config(&mut self, config: SimplifiedLayoutConfig)
Update configuration
Sourcepub fn get_config(&self) -> SimplifiedLayoutConfig
pub fn get_config(&self) -> SimplifiedLayoutConfig
Get current configuration
Sourcepub fn is_tracking(&self) -> bool
pub fn is_tracking(&self) -> bool
Check if any elements are being tracked
Sourcepub fn tracked_count(&self) -> usize
pub fn tracked_count(&self) -> usize
Get number of tracked elements
Sourcepub fn animation_count(&self) -> usize
pub fn animation_count(&self) -> usize
Get number of active animations
Trait Implementations§
Source§impl Clone for SimplifiedLayoutManager
impl Clone for SimplifiedLayoutManager
Source§fn clone(&self) -> SimplifiedLayoutManager
fn clone(&self) -> SimplifiedLayoutManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SimplifiedLayoutManager
impl Debug for SimplifiedLayoutManager
Source§impl Default for SimplifiedLayoutManager
impl Default for SimplifiedLayoutManager
Source§fn default() -> SimplifiedLayoutManager
fn default() -> SimplifiedLayoutManager
Auto Trait Implementations§
impl Freeze for SimplifiedLayoutManager
impl RefUnwindSafe for SimplifiedLayoutManager
impl !Send for SimplifiedLayoutManager
impl !Sync for SimplifiedLayoutManager
impl Unpin for SimplifiedLayoutManager
impl UnwindSafe for SimplifiedLayoutManager
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,
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> ⓘ
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> ⓘ
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