Skip to main content

SemanticsAnnotationsMixin

Trait SemanticsAnnotationsMixin 

Source
pub trait SemanticsAnnotationsMixin: RenderObject {
Show 23 methods // Required methods fn semantics_annotations_data( self: RenderHandle<Self>, app: &App, ) -> &SemanticsAnnotationsData; fn semantics_annotations_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut SemanticsAnnotationsData; // Provided methods fn init_semantics_annotations( self: RenderHandle<Self>, app: &mut App, properties: Rc<SemanticsProperties>, container: bool, explicit_child_nodes: bool, exclude_semantics: bool, block_user_actions: bool, locale_for_subtree: Option<Locale>, text_direction: Option<TextDirection>, ) { ... } fn properties( self: RenderHandle<Self>, app: &App, ) -> Rc<SemanticsProperties> { ... } fn set_properties( self: RenderHandle<Self>, app: &mut App, value: Rc<SemanticsProperties>, ) { ... } fn container(self: RenderHandle<Self>, app: &App) -> bool { ... } fn set_container(self: RenderHandle<Self>, app: &mut App, value: bool) { ... } fn explicit_child_nodes(self: RenderHandle<Self>, app: &App) -> bool { ... } fn set_explicit_child_nodes( self: RenderHandle<Self>, app: &mut App, value: bool, ) { ... } fn exclude_semantics(self: RenderHandle<Self>, app: &App) -> bool { ... } fn set_exclude_semantics( self: RenderHandle<Self>, app: &mut App, value: bool, ) { ... } fn block_user_actions(self: RenderHandle<Self>, app: &App) -> bool { ... } fn set_block_user_actions( self: RenderHandle<Self>, app: &mut App, value: bool, ) { ... } fn locale_for_subtree(self: RenderHandle<Self>, app: &App) -> Option<Locale> { ... } fn set_locale_for_subtree( self: RenderHandle<Self>, app: &mut App, value: Option<Locale>, ) { ... } fn update_attributed_fields( self: RenderHandle<Self>, app: &mut App, value: &SemanticsProperties, ) { ... } fn attributed_label( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString> { ... } fn attributed_value( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString> { ... } fn attributed_increased_value( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString> { ... } fn attributed_decreased_value( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString> { ... } fn attributed_hint( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString> { ... } fn text_direction( self: RenderHandle<Self>, app: &App, ) -> Option<TextDirection> { ... } fn set_text_direction( self: RenderHandle<Self>, app: &mut App, value: Option<TextDirection>, ) { ... }
}
Expand description

A mixin for RenderObjects that want to annotate the SemanticsNode for their subtree.

Required Methods§

Provided Methods§

Source

fn init_semantics_annotations( self: RenderHandle<Self>, app: &mut App, properties: Rc<SemanticsProperties>, container: bool, explicit_child_nodes: bool, exclude_semantics: bool, block_user_actions: bool, locale_for_subtree: Option<Locale>, text_direction: Option<TextDirection>, )

Initializes the semantics annotations for this mixin.

Source

fn properties(self: RenderHandle<Self>, app: &App) -> Rc<SemanticsProperties>

Source

fn set_properties( self: RenderHandle<Self>, app: &mut App, value: Rc<SemanticsProperties>, )

Sets properties.

Source

fn container(self: RenderHandle<Self>, app: &App) -> bool

If ‘container’ is true, this RenderObject will introduce a new node in the semantics tree. Otherwise, the semantics will be merged with the semantics of any ancestors.

Whether descendants of this RenderObject can add their semantic information to the SemanticsNode introduced by this configuration is controlled by explicit_child_nodes.

Source

fn set_container(self: RenderHandle<Self>, app: &mut App, value: bool)

Sets container.

Source

fn explicit_child_nodes(self: RenderHandle<Self>, app: &App) -> bool

Whether descendants of this RenderObject are allowed to add semantic information to the SemanticsNode annotated by this widget.

When set to false descendants are allowed to annotate SemanticsNodes of their parent with the semantic information they want to contribute to the semantic tree. When set to true the only way for descendants to contribute semantic information to the semantic tree is to introduce new explicit SemanticsNodes to the tree.

This setting is often used in combination with SemanticsConfiguration.isSemanticBoundary to create semantic boundaries that are either writable or not for children.

Source

fn set_explicit_child_nodes( self: RenderHandle<Self>, app: &mut App, value: bool, )

Source

fn exclude_semantics(self: RenderHandle<Self>, app: &App) -> bool

Whether descendants of this RenderObject should have their semantic information ignored.

When this flag is set to true, all child semantics nodes are ignored. This can be used as a convenience for cases where a child is wrapped in an ExcludeSemantics widget and then another Semantics widget.

Source

fn set_exclude_semantics(self: RenderHandle<Self>, app: &mut App, value: bool)

Source

fn block_user_actions(self: RenderHandle<Self>, app: &App) -> bool

Whether to block user interactions for the semantics subtree.

Setting this true prevents user from activating pointer related SemanticsActions, such as SemanticsAction::TAP or SemanticsAction::LONG_PRESS.

Source

fn set_block_user_actions(self: RenderHandle<Self>, app: &mut App, value: bool)

Source

fn locale_for_subtree(self: RenderHandle<Self>, app: &App) -> Option<Locale>

The Locale for the semantics subtree.

Setting this to null will inherit locale from ancestor semantics node.

Source

fn set_locale_for_subtree( self: RenderHandle<Self>, app: &mut App, value: Option<Locale>, )

Source

fn update_attributed_fields( self: RenderHandle<Self>, app: &mut App, value: &SemanticsProperties, )

Flutter’s _updateAttributedFields.

Source

fn attributed_label( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString>

Dart’s _attributedLabel: the label describeSemanticsConfiguration will report.

Source

fn attributed_value( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString>

Dart’s _attributedValue.

Source

fn attributed_increased_value( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString>

Dart’s _attributedIncreasedValue.

Source

fn attributed_decreased_value( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString>

Dart’s _attributedDecreasedValue.

Source

fn attributed_hint( self: RenderHandle<Self>, app: &App, ) -> Option<AttributedString>

Dart’s _attributedHint.

Source

fn text_direction(self: RenderHandle<Self>, app: &App) -> Option<TextDirection>

Source

fn set_text_direction( self: RenderHandle<Self>, app: &mut App, value: Option<TextDirection>, )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§