Rename HitTestResult to Hit
... and also move it to a new `text` module in `iced_core`
This commit is contained in:
parent
aa63841e2c
commit
7614127d36
14 changed files with 48 additions and 48 deletions
|
|
@ -1,9 +1,11 @@
|
|||
//! Write some text for your users to read.
|
||||
use crate::{
|
||||
layout, Color, Element, Hasher, HitTestResult, HorizontalAlignment, Layout,
|
||||
Length, Point, Rectangle, Size, VerticalAlignment, Widget,
|
||||
layout, Color, Element, Hasher, HorizontalAlignment, Layout, Length, Point,
|
||||
Rectangle, Size, VerticalAlignment, Widget,
|
||||
};
|
||||
|
||||
pub use iced_core::text::Hit;
|
||||
|
||||
use std::hash::Hash;
|
||||
|
||||
/// A paragraph of text.
|
||||
|
|
@ -183,7 +185,7 @@ pub trait Renderer: crate::Renderer {
|
|||
/// laid out with the given parameters, returning information about
|
||||
/// the nearest character.
|
||||
///
|
||||
/// If nearest_only is true, the hit test does not consider whether the
|
||||
/// If `nearest_only` is true, the hit test does not consider whether the
|
||||
/// the point is interior to any glyph bounds, returning only the character
|
||||
/// with the nearest centeroid.
|
||||
fn hit_test(
|
||||
|
|
@ -194,7 +196,7 @@ pub trait Renderer: crate::Renderer {
|
|||
bounds: Size,
|
||||
point: Point,
|
||||
nearest_only: bool,
|
||||
) -> HitTestResult;
|
||||
) -> Hit;
|
||||
|
||||
/// Draws a [`Text`] fragment.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue