Struct TextFieldLayout
#[non_exhaustive]pub struct TextFieldLayout {
pub scroll: usize,
pub edges: Vec<f32>,
}Expand description
What DrawContext::widget_text_field drew: the first character shown (after scrolling to
the cursor) and the GUI x of each shown character boundary, from the start of the shown
text to its end, so a press maps to the character it is on.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.scroll: usizeThe first character shown.
edges: Vec<f32>The x of each shown character boundary, left to right.
Implementations§
§impl TextFieldLayout
impl TextFieldLayout
pub fn new(scroll: usize, edges: Vec<f32>) -> TextFieldLayout
pub fn new(scroll: usize, edges: Vec<f32>) -> TextFieldLayout
The layout a draw answers.
Trait Implementations§
§impl Clone for TextFieldLayout
impl Clone for TextFieldLayout
§fn clone(&self) -> TextFieldLayout
fn clone(&self) -> TextFieldLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TextFieldLayout
impl Debug for TextFieldLayout
§impl Default for TextFieldLayout
impl Default for TextFieldLayout
§fn default() -> TextFieldLayout
fn default() -> TextFieldLayout
Returns the “default value” for a type. Read more
§impl PartialEq for TextFieldLayout
impl PartialEq for TextFieldLayout
impl StructuralPartialEq for TextFieldLayout
Auto Trait Implementations§
impl Freeze for TextFieldLayout
impl RefUnwindSafe for TextFieldLayout
impl Send for TextFieldLayout
impl Sync for TextFieldLayout
impl Unpin for TextFieldLayout
impl UnsafeUnpin for TextFieldLayout
impl UnwindSafe for TextFieldLayout
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