pub struct TextSelectionHandleRecipe {
pub diameter: f32,
pub hit_size: f32,
pub stem_width: f32,
pub fill: RecipeColor,
pub outline: RecipeColor,
pub outline_width: f32,
}Expand description
Painted geometry and colours of one selection handle.
hit_size is the extent of the handle’s own node — a square centred on the
anchor point — and diameter is the disc drawn inside it. The disc is
always centred in the hit square, so a caller that changes one without the
other still gets a centred handle.
Fields§
§diameter: f32Diameter of the painted disc, in dp.
hit_size: f32Extent of the square hit rectangle, in dp. Never below
InputTokens::min_target_conformance.
stem_width: f32Width of the stem drawn from the disc to the caret it marks, in dp. Zero draws no stem.
fill: RecipeColorFill of the disc and the stem.
outline: RecipeColorRing drawn around the disc so it stays visible over text of its own
colour. Zero outline_width draws none.
outline_width: f32Width of that ring, in dp.
Trait Implementations§
Source§impl Clone for TextSelectionHandleRecipe
impl Clone for TextSelectionHandleRecipe
impl Copy for TextSelectionHandleRecipe
Source§impl Debug for TextSelectionHandleRecipe
impl Debug for TextSelectionHandleRecipe
Source§impl From<&TextSelectionHandleRecipe> for HandleMetrics
impl From<&TextSelectionHandleRecipe> for HandleMetrics
Source§fn from(recipe: &TextSelectionHandleRecipe) -> Self
fn from(recipe: &TextSelectionHandleRecipe) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for TextSelectionHandleRecipe
Auto Trait Implementations§
impl Freeze for TextSelectionHandleRecipe
impl RefUnwindSafe for TextSelectionHandleRecipe
impl Send for TextSelectionHandleRecipe
impl Sync for TextSelectionHandleRecipe
impl Unpin for TextSelectionHandleRecipe
impl UnsafeUnpin for TextSelectionHandleRecipe
impl UnwindSafe for TextSelectionHandleRecipe
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