pub struct ScrollViewProps {Show 15 fields
pub width: String,
pub height: String,
pub min_width: Option<f32>,
pub min_height: Option<f32>,
pub max_width: Option<f32>,
pub max_height: Option<f32>,
pub padding: String,
pub spacing: String,
pub scrollbar_theme: Option<ScrollBarThemeWith>,
pub children: Element,
pub direction: String,
pub show_scrollbar: bool,
pub scroll_with_arrows: bool,
pub scroll_controller: Option<ScrollController>,
pub invert_scroll_wheel: bool,
}Expand description
Properties for the ScrollView component.
Fields§
§width: StringWidth of the ScrollView container. Default to fill.
height: StringHeight of the ScrollView container. Default to fill.
min_width: Option<f32>Minimum width of the ScrollView container.
min_height: Option<f32>Minimum height of the ScrollView container.
max_width: Option<f32>Maximum width of the ScrollView container.
max_height: Option<f32>Maximum height of the ScrollView container.
padding: StringPadding of the ScrollView container.
spacing: StringSpacing for the ScrollView container.
scrollbar_theme: Option<ScrollBarThemeWith>Theme override for the scrollbars.
children: ElementInner children for the ScrollView.
direction: StringDirection of the ScrollView, vertical or horizontal.
show_scrollbar: boolShow the scrollbar, visible by default.
scroll_with_arrows: boolEnable scrolling with arrow keys.
scroll_controller: Option<ScrollController>Custom Scroll Controller for the ScrollView.
invert_scroll_wheel: boolIf false (default), wheel scroll with no shift will scroll vertically no matter the direction.
If true, wheel scroll with no shift will scroll horizontally.
Implementations§
Source§impl ScrollViewProps
impl ScrollViewProps
Sourcepub fn builder() -> ScrollViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ScrollViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ScrollViewProps.
On the builder, call .width(...)(optional), .height(...)(optional), .min_width(...)(optional), .min_height(...)(optional), .max_width(...)(optional), .max_height(...)(optional), .padding(...)(optional), .spacing(...)(optional), .scrollbar_theme(...)(optional), .children(...)(optional), .direction(...)(optional), .show_scrollbar(...)(optional), .scroll_with_arrows(...)(optional), .scroll_controller(...)(optional), .invert_scroll_wheel(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ScrollViewProps.
Trait Implementations§
Source§impl Clone for ScrollViewProps
impl Clone for ScrollViewProps
Source§fn clone(&self) -> ScrollViewProps
fn clone(&self) -> ScrollViewProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for ScrollViewProps
impl PartialEq for ScrollViewProps
Source§impl Properties for ScrollViewPropswhere
Self: Clone,
impl Properties for ScrollViewPropswhere
Self: Clone,
Source§type Builder = ScrollViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = ScrollViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for ScrollViewProps
Auto Trait Implementations§
impl !Freeze for ScrollViewProps
impl !RefUnwindSafe for ScrollViewProps
impl !Send for ScrollViewProps
impl !Sync for ScrollViewProps
impl Unpin for ScrollViewProps
impl !UnwindSafe for ScrollViewProps
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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