#[repr(transparent)]pub struct NSWritingToolsCoordinatorTextAnimation(pub NSInteger);
NSWritingToolsCoordinator
only.Expand description
Use the NSWritingToolsCoordinator.TextAnimation
constants to determine
the type of animation that is occurring. During an interactive change to
your view, Writing Tools creates animations to provide feedback about what’s
happening. During the setup for each animation, Writing Tools reports the
type of animation to the coordinator’s delegate, so that you can perform
additional actions related to that animation. For example, during an insertion
animation, you might animate changes to other views in your interface.
See also Apple’s documentation
Tuple Fields§
§0: NSInteger
Implementations§
Source§impl NSWritingToolsCoordinatorTextAnimation
impl NSWritingToolsCoordinatorTextAnimation
Sourcepub const Anticipate: Self
pub const Anticipate: Self
The animation that Writing Tools performs when waiting to receive results from the large language model.
This type of animation applies a visual effect to the text that Writing Tools is evaluating. When preparing for this animation, hide the text that Writing Tools is about to evaluate. In the same space where that text appears, Writing Tools displays a preview image that you provide and animates changes to that image.
Sourcepub const Remove: Self
pub const Remove: Self
The animation that Writing Tools performs when removing text from your view.
This type of animation shows the removal of text from your view. When preparing for this animation, hide the text in the provided range if you haven’t already. If you support animating the reflow of your view’s text, you can also prepare any other animations you need. Writing Tools uses a preview object you provide to animate the removal of the text.
Sourcepub const Insert: Self
pub const Insert: Self
The animation that Writing Tools performs when inserting text into your view.
This type of animation shows the insertion of text to your view. When preparing for this animation, hide the text in the provided range if you haven’t already. If you support animating the reflow of your view’s text, you can also prepare any other animations you need. Writing Tools uses a preview object you provide to animate the insertion of the text.
Sourcepub const AnticipateInactive: Self
pub const AnticipateInactive: Self
The animation effect that Writing Tools performs when the view is waiting for results, but the system isn’t actively evaluating the text.
When Writing Tools isn’t actively evaluating your text, it creates this animation. When preparing for this animation, display the text in the specified range with a foreground color of 50% grey.
Sourcepub const Translate: Self
pub const Translate: Self
The animation effect that Writing Tools performs on text situated after the insertion point.
When Writing Tools inserts text at a given location, it creates an animation to make room for the new text. When preparing for this animation, hide the text between the insertion point and the end of your text storage. When finishing the animation, show the text again.
Trait Implementations§
Source§impl Clone for NSWritingToolsCoordinatorTextAnimation
impl Clone for NSWritingToolsCoordinatorTextAnimation
Source§fn clone(&self) -> NSWritingToolsCoordinatorTextAnimation
fn clone(&self) -> NSWritingToolsCoordinatorTextAnimation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Ord for NSWritingToolsCoordinatorTextAnimation
impl Ord for NSWritingToolsCoordinatorTextAnimation
Source§fn cmp(&self, other: &NSWritingToolsCoordinatorTextAnimation) -> Ordering
fn cmp(&self, other: &NSWritingToolsCoordinatorTextAnimation) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NSWritingToolsCoordinatorTextAnimation
impl PartialEq for NSWritingToolsCoordinatorTextAnimation
Source§fn eq(&self, other: &NSWritingToolsCoordinatorTextAnimation) -> bool
fn eq(&self, other: &NSWritingToolsCoordinatorTextAnimation) -> bool
self
and other
values to be equal, and is used by ==
.