pub fn point_hits_horizontal_bar(&self, port: &Viewport, pos: Point, env: &Env) -> bool {
        if !self.enabled.is_enabled(Axis::Horizontal) {
            return false;
        }
        let viewport_size = port.view_size;
        let scroll_offset = port.view_origin.to_vec2();

        if let Some(mut bounds) = self.calc_horizontal_bar_bounds(port, env) {
            // Stretch hitbox to edge of widget
            bounds.y1 = scroll_offset.y + viewport_size.height;
            bounds.contains(pos)
        } else {
            false
        }
    }
/// Tests if the specified point overlaps the horizontal scrollbar
///
/// Returns false if the horizontal scrollbar is not visible
Tests if the specified point overlaps the horizontal scrollbar
Returns false if the horizontal scrollbar is not visible
Tests if the specified point overlaps the horizontal scrollbar Returns false if the horizontal scrollbar is not visible
pub fn point_hits_horizontal_bar(&self, port: &Viewport, pos: Point, env: &Env) -> bool {
        if !self.enabled.is_enabled(Axis::Horizontal) {
            return false;
        }
        let viewport_size = port.view_size;
        let scroll_offset = port.view_origin.to_vec2();
        if let Some(mut bounds) = self.calc_horizontal_bar_bounds(port, env) {
            // Stretch hitbox to edge of widget
            bounds.y1 = scroll_offset.y + viewport_size.height;
            bounds.contains(pos)
        } else {
            false
        }
    }
pub fn point_hits_horizontal_bar ( & self , port : & Viewport , pos : Point , env : & Env ) -> bool { if ! self . enabled . is_enabled ( Axis :: Horizontal ) { return false ; } let viewport_size = port . view_size ; let scroll_offset = port . view_origin . to_vec2 ( ) ; if let Some ( mut bounds ) = self . calc_horizontal_bar_bounds ( port , env ) { // Stretch hitbox to edge of widget bounds . y1 = scroll_offset . y + viewport_size . height ; bounds . contains ( pos ) } else { false } }
Tests if the specified point overlaps the horizontal scrollbar
Returns false if the horizontal scrollbar is not visible
Tests if the specified point overlaps the horizontal scrollbar Returns false if the horizontal scrollbar is not visible
&self
port
&Viewport
pos
Point
env
&Env
&self
port
&Viewport
pos
Point
env
&Env