pub struct ScrollView { /* private fields */ }Implementations§
Source§impl ScrollView
impl ScrollView
pub fn new(child: impl View + 'static) -> Self
pub fn with_child(&self, child: impl View + 'static) -> Self
pub fn axis(self, axis: ScrollAxis) -> Self
pub fn vertical(self) -> Self
pub fn horizontal(self) -> Self
pub fn both(self) -> Self
pub fn scrollbar_visibility(self, visibility: ScrollbarVisibility) -> Self
pub fn show_scrollbar(self, show: bool) -> Self
pub fn scrollbar_width(self, width: f32) -> Self
pub fn scrollbar_track(self, color: Color) -> Self
pub fn scrollbar_thumb(self, color: Color) -> Self
pub fn scroll_step(self, step: f32) -> Self
pub fn on_scroll(self, handler: impl Fn(Vec2) + 'static) -> Self
pub fn scroll_axis(&self) -> ScrollAxis
pub fn offset(&self, rt: &Runtime, el: ElementId) -> f32
pub fn offset_x(&self, rt: &Runtime, el: ElementId) -> f32
pub fn offset_y(&self, rt: &Runtime, el: ElementId) -> f32
pub fn offset_vec(&self, rt: &Runtime, el: ElementId) -> Vec2
pub fn content_height(&self, rt: &Runtime, el: ElementId) -> f32
pub fn content_width(&self, rt: &Runtime, el: ElementId) -> f32
pub fn content_size(&self, rt: &Runtime, el: ElementId) -> Size
pub fn viewport_size(&self, rt: &Runtime, el: ElementId) -> Size
pub fn viewport_width(&self, rt: &Runtime, el: ElementId) -> f32
pub fn viewport_height(&self, rt: &Runtime, el: ElementId) -> f32
pub fn max_offset(&self, rt: &Runtime, el: ElementId) -> f32
pub fn max_offset_x(&self, rt: &Runtime, el: ElementId) -> f32
pub fn max_offset_y(&self, rt: &Runtime, el: ElementId) -> f32
pub fn max_offset_vec(&self, rt: &Runtime, el: ElementId) -> Vec2
pub fn can_scroll_x(&self, rt: &Runtime, el: ElementId) -> bool
pub fn can_scroll_y(&self, rt: &Runtime, el: ElementId) -> bool
pub fn scroll_fraction(&self, rt: &Runtime, el: ElementId) -> Vec2
pub fn scroll_fraction_x(&self, rt: &Runtime, el: ElementId) -> f32
pub fn scroll_fraction_y(&self, rt: &Runtime, el: ElementId) -> f32
pub fn scroll_to(&self, rt: &Runtime, el: ElementId, offset: Vec2)
pub fn scroll_to_xy(&self, rt: &Runtime, el: ElementId, x: f32, y: f32)
pub fn scroll_to_x(&self, rt: &Runtime, el: ElementId, x: f32)
pub fn scroll_to_y(&self, rt: &Runtime, el: ElementId, y: f32)
pub fn scroll_by(&self, rt: &Runtime, el: ElementId, delta: Vec2)
pub fn scroll_to_top(&self, rt: &Runtime, el: ElementId)
pub fn scroll_to_bottom(&self, rt: &Runtime, el: ElementId)
pub fn scroll_into_view(&self, rt: &Runtime, el: ElementId, rect: Rect)
pub fn scroll_element_into_view( &self, rt: &Runtime, el: ElementId, child: ElementId, )
pub fn scroll_to_left(&self, rt: &Runtime, el: ElementId)
pub fn scroll_to_right(&self, rt: &Runtime, el: ElementId)
pub fn page_up(&self, rt: &Runtime, el: ElementId)
pub fn page_down(&self, rt: &Runtime, el: ElementId)
pub fn page_left(&self, rt: &Runtime, el: ElementId)
pub fn page_right(&self, rt: &Runtime, el: ElementId)
pub fn ensure_visible(&self, rt: &Runtime, el: ElementId, rect: Rect) -> bool
Trait Implementations§
Source§impl Clone for ScrollView
impl Clone for ScrollView
Source§impl View for ScrollView
impl View for ScrollView
fn body(&self) -> impl View + 'static
fn arrange_override( &self, rt: &Runtime, el: ElementId, rect: Rect, ctx: &mut LayoutCtx<'_>, ) -> bool
fn clip_self(&self) -> bool
fn captures_pointer_ctx(&self, rt: &Runtime, el: ElementId) -> bool
fn paint_foreground(&self, ctx: &mut PaintCtx<'_>)
fn layout_style_ctx(&self, _rt: &Runtime, _el: ElementId) -> LayoutStyle
fn accessibility(&self) -> Option<Accessible>
fn clip_radius(&self) -> f32
fn paint_opacity(&self) -> Option<f32>
fn paint_opacity_ctx(&self, _rt: &Runtime, _el: ElementId) -> Option<f32>
fn paint_offset(&self) -> Vec2
fn paint_offset_ctx(&self, _rt: &Runtime, _el: ElementId) -> Vec2
fn paint_scale(&self) -> f32
fn paint_scale_ctx(&self, _rt: &Runtime, _el: ElementId) -> f32
fn paint_rotation(&self) -> f32
fn paint_rotation_ctx(&self, _rt: &Runtime, _el: ElementId) -> f32
fn foreground_filter(&self) -> Option<Filter>
fn reuse_state(&self, _old: &Self)
fn hit_testable(&self) -> bool
fn test_id(&self) -> Option<String>
fn focus_trap(&self) -> bool
fn accepts_tab(&self) -> bool
fn accepts_drop(&self, _payload: &DragPayload) -> bool
fn on_drag_over(&self, _pos: DropPosition, _ctx: &mut EventCtx<'_>)
fn on_drop(&self, _pos: DropPosition, _ctx: &mut EventCtx<'_>)
fn on_drag_start(&self, _ctx: &mut EventCtx<'_>)
fn on_drag_end(&self, _end: DragEnd, _ctx: &mut EventCtx<'_>)
Auto Trait Implementations§
impl !RefUnwindSafe for ScrollView
impl !Send for ScrollView
impl !Sync for ScrollView
impl !UnwindSafe for ScrollView
impl Freeze for ScrollView
impl Unpin for ScrollView
impl UnsafeUnpin for ScrollView
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