pub struct SubtitleView {
pub key: Option<KeyRef>,
pub cues: Vec<Cue>,
pub bottom_padding_fraction: f32,
}Expand description
A view for displaying subtitle cues, laid out as large as it is let be.
Fields§
§key: Option<KeyRef>§cues: Vec<Cue>The cues to display.
bottom_padding_fraction: f32The bottom padding to apply when a cue has no line, as a fraction of the view’s height.
Implementations§
Source§impl SubtitleView
impl SubtitleView
Sourcepub const DEFAULT_BOTTOM_PADDING_FRACTION: f32 = 0.08
pub const DEFAULT_BOTTOM_PADDING_FRACTION: f32 = 0.08
The default bottom padding to apply when a cue has no line, as a fraction of the
viewport height.
Sourcepub fn new(cues: Vec<Cue>) -> SubtitleView
pub fn new(cues: Vec<Cue>) -> SubtitleView
A view displaying cues: Media3’s setCues.
pub fn key(self, key: KeyRef) -> SubtitleView
Sourcepub fn bottom_padding_fraction(
self,
bottom_padding_fraction: f32,
) -> SubtitleView
pub fn bottom_padding_fraction( self, bottom_padding_fraction: f32, ) -> SubtitleView
Media3’s setBottomPaddingFraction.
Trait Implementations§
Source§impl Clone for SubtitleView
impl Clone for SubtitleView
Source§impl Debug for SubtitleView
impl Debug for SubtitleView
Source§impl StatelessWidget for SubtitleView
impl StatelessWidget for SubtitleView
Source§fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
Describes the part of the user interface represented by this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Dart’s constructor asserts that relate two or more arguments. Read more
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
Dart’s
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for SubtitleView
impl !Send for SubtitleView
impl !Sync for SubtitleView
impl !UnwindSafe for SubtitleView
impl Forget for SubtitleView
impl Freeze for SubtitleView
impl Move for SubtitleView
impl Unpin for SubtitleView
impl UnsafeUnpin for SubtitleViewwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Cue>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.