Struct components::foundation::properties::TextEditProperties
source · [−]pub struct TextEditProperties {Show 23 fields
pub text: String,
pub align: TextAlign,
pub align_vertical: TextAlign,
pub bounds_wrap: bool,
pub text_size: f32,
pub display_char: Option<char>,
pub filter: Option<Box<dyn Fn(String, String, String) -> bool>>,
pub key: Key,
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
pub w_min: f32,
pub h_min: f32,
pub w_max: f32,
pub h_max: f32,
pub parent: Option<Id>,
pub depth: f32,
pub visible: bool,
pub mouse_input: bool,
pub key_input: bool,
pub renderable: bool,
pub internal_visible: bool,
}
Expand description
Options for constructing a TextEdit
Fields
text: String
The default text value
align: TextAlign
The text alignment on the horizontal axis, relative to the bounds
align_vertical: TextAlign
The text alignment on the vertical axis, relative to the bounds
bounds_wrap: bool
Whether or not to wrap the text by the bounds for the rendering to apply
text_size: f32
The text size of the text for the rendering to use
display_char: Option<char>
An override display character (like * for a password entry)
filter: Option<Box<dyn Fn(String, String, String) -> bool>>
A filter fn to call when text is entered.
It is: filter(new_character, new_text, old_text) -> bool
.
Returning false will reject the character.
key: Key
The key to identify widget
x: f32
The control x position, relative to its container
y: f32
The control y position, relative to its container
w: f32
The control width
h: f32
The control height
w_min: f32
The control minimum width
h_min: f32
The control minimum height
w_max: f32
The control maximum width
h_max: f32
The control maximum height
parent: Option<Id>
The control parent, if any
depth: f32
The control depth. Usually set internally
visible: bool
Whether or not the control is visible at creation
mouse_input: bool
Whether or not the control responds to mouse input
key_input: bool
Whether or not the control responds to key input
renderable: bool
Whether or not the control emits render signals from the canvas render call
internal_visible: bool
Internal. Internal parent visibility for creating sub controls.
Trait Implementations
sourceimpl Default for TextEditProperties
impl Default for TextEditProperties
sourceimpl WidgetProperties for TextEditProperties
impl WidgetProperties for TextEditProperties
sourcefn mouse_input(&self) -> bool
fn mouse_input(&self) -> bool
Whether or not the control responds to mouse input
sourcefn renderable(&self) -> bool
fn renderable(&self) -> bool
Whether or not the control emits render signals from the canvas render call
sourcefn internal_visible(&self) -> bool
fn internal_visible(&self) -> bool
Internal. Internal parent visibility for creating sub controls.
Auto Trait Implementations
impl !RefUnwindSafe for TextEditProperties
impl !Send for TextEditProperties
impl !Sync for TextEditProperties
impl Unpin for TextEditProperties
impl !UnwindSafe for TextEditProperties
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.