pub struct TextDecorationCollection(/* private fields */);Expand description
A collection that holds TextDecoration objects.
A shared handle to an observable list; equality is reference equality.
Implementations§
Source§impl TextDecorationCollection
impl TextDecorationCollection
Sourcepub fn from_items(
text_decorations: impl IntoIterator<Item = Ref<TextDecoration>>,
) -> Self
pub fn from_items( text_decorations: impl IntoIterator<Item = Ref<TextDecoration>>, ) -> Self
Creates a collection from text decorations.
Sourcepub fn parse(s: &str) -> Result<TextDecorationCollection, FormatError>
pub fn parse(s: &str) -> Result<TextDecorationCollection, FormatError>
Parses a TextDecorationCollection string: a comma separated list of
decoration locations (Underline, Overline, Strikethrough, Baseline).
Methods from Deref<Target = MediaCollection<Ref<TextDecoration>>>§
Sourcepub fn reset_behavior(&self) -> ResetBehavior
pub fn reset_behavior(&self) -> ResetBehavior
The action notified when the list is cleared.
Sourcepub fn set_reset_behavior(&self, value: ResetBehavior)
pub fn set_reset_behavior(&self, value: ResetBehavior)
Sets the action notified when the list is cleared.
pub fn is_empty(&self) -> bool
Sourcepub fn add_range(&self, items: impl IntoIterator<Item = T>)
pub fn add_range(&self, items: impl IntoIterator<Item = T>)
Appends several items with a single notification.
Sourcepub fn collection_changed(
&self,
handler: impl for<'a, 'b> Fn(&'a NotifyCollectionChangedEventArgs<'b, T>) + 'static,
) -> Rc<dyn IDisposable>
pub fn collection_changed( &self, handler: impl for<'a, 'b> Fn(&'a NotifyCollectionChangedEventArgs<'b, T>) + 'static, ) -> Rc<dyn IDisposable>
Subscribes to changes of the list. Disposing the returned handle unsubscribes.
Sourcepub fn for_each_item(
&self,
added: impl Fn(usize, &T) + 'static,
removed: impl Fn(usize, &T) + 'static,
reset: impl Fn() + 'static,
) -> Rc<dyn IDisposable>
pub fn for_each_item( &self, added: impl Fn(usize, &T) + 'static, removed: impl Fn(usize, &T) + 'static, reset: impl Fn() + 'static, ) -> Rc<dyn IDisposable>
Invokes added for every item currently in the list and for every item
added later, removed for every item removed and reset when the list
is reset.
Trait Implementations§
Source§impl Clone for TextDecorationCollection
impl Clone for TextDecorationCollection
Source§impl Default for TextDecorationCollection
impl Default for TextDecorationCollection
Source§impl Deref for TextDecorationCollection
impl Deref for TextDecorationCollection
Source§type Target = MediaCollection<Ref<TextDecoration>>
type Target = MediaCollection<Ref<TextDecoration>>
The resulting type after dereferencing.
Source§impl FromIterator<Ref<TextDecoration>> for TextDecorationCollection
impl FromIterator<Ref<TextDecoration>> for TextDecorationCollection
Source§fn from_iter<I: IntoIterator<Item = Ref<TextDecoration>>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Ref<TextDecoration>>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl MarkupTyped for TextDecorationCollection
impl MarkupTyped for TextDecorationCollection
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Source§impl PartialEq for TextDecorationCollection
impl PartialEq for TextDecorationCollection
impl StructuralPartialEq for TextDecorationCollection
Auto Trait Implementations§
impl !RefUnwindSafe for TextDecorationCollection
impl !Send for TextDecorationCollection
impl !Sync for TextDecorationCollection
impl !UnwindSafe for TextDecorationCollection
impl Freeze for TextDecorationCollection
impl Unpin for TextDecorationCollection
impl UnsafeUnpin for TextDecorationCollection
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more