pub struct ScrollBar {Show 18 fields
pub bg: Quad,
pub bar_size: f32,
pub min_handle_size: f32,
pub axis: Axis,
pub animator: Animator,
pub use_vertical_finger_scroll: bool,
pub _visible: bool,
pub smoothing: Option<f32>,
pub _bg_area: Area,
pub _bar_side_margin: f32,
pub _view_area: Area,
pub _view_total: f32,
pub _view_visible: f32,
pub _scroll_size: f32,
pub _scroll_pos: f32,
pub _scroll_target: f32,
pub _scroll_delta: f32,
pub _drag_point: Option<f32>,
}
Fields§
§bg: Quad
§bar_size: f32
§min_handle_size: f32
§axis: Axis
§animator: Animator
§use_vertical_finger_scroll: bool
§_visible: bool
§smoothing: Option<f32>
§_bg_area: Area
§_bar_side_margin: f32
§_view_area: Area
§_view_total: f32
§_view_visible: f32
§_scroll_size: f32
§_scroll_pos: f32
§_scroll_target: f32
§_scroll_delta: f32
§_drag_point: Option<f32>
Implementations§
Source§impl ScrollBar
impl ScrollBar
pub fn proto(cx: &mut Cx) -> Self
pub fn bar_size() -> FloatId
pub fn instance_is_vertical() -> InstanceFloat
pub fn instance_norm_handle() -> InstanceFloat
pub fn instance_norm_scroll() -> InstanceFloat
pub fn anim_default() -> AnimId
pub fn anim_over() -> AnimId
pub fn anim_down() -> AnimId
pub fn shader_bg() -> ShaderId
pub fn style(cx: &mut Cx, opt: &StyleOptions)
pub fn get_normalized_scroll_pos(&self) -> (f32, f32)
pub fn set_scroll_pos_from_finger( &mut self, cx: &mut Cx, finger: f32, ) -> ScrollBarEvent
pub fn update_shader_scroll_pos(&mut self, cx: &mut Cx)
pub fn make_scroll_event(&mut self) -> ScrollBarEvent
pub fn move_towards_scroll_target(&mut self, cx: &mut Cx) -> bool
pub fn get_scroll_pos(&self) -> f32
pub fn set_scroll_pos(&mut self, cx: &mut Cx, scroll_pos: f32) -> bool
pub fn get_scroll_target(&mut self) -> f32
pub fn set_scroll_view_total(&mut self, _cx: &mut Cx, view_total: f32)
pub fn get_scroll_view_total(&self) -> f32
pub fn set_scroll_target(&mut self, cx: &mut Cx, scroll_pos_target: f32) -> bool
pub fn scroll_into_view(&mut self, cx: &mut Cx, pos: f32, size: f32)
pub fn handle_scroll_bar( &mut self, cx: &mut Cx, event: &mut Event, ) -> ScrollBarEvent
pub fn draw_scroll_bar( &mut self, cx: &mut Cx, axis: Axis, view_area: Area, view_rect: Rect, view_total: Vec2, ) -> f32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScrollBar
impl RefUnwindSafe for ScrollBar
impl Send for ScrollBar
impl Sync for ScrollBar
impl Unpin for ScrollBar
impl UnwindSafe for ScrollBar
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