pub struct EditorProps {
pub doc: StyledText,
pub base: Font,
pub editable: bool,
pub placeholder: String,
pub min_lines: u32,
pub max_lines: u32,
pub spellcheck: bool,
pub single_line: bool,
pub code: bool,
}Expand description
Full props (realize). Only doc, selection and editable change after build.
Fields§
§doc: StyledText§base: FontThe style unstyled text is drawn in, and the size relative runs scale against.
editable: bool§placeholder: String§min_lines: u32§max_lines: u32§spellcheck: boolShow the platform’s spell-check squiggles. Prose wants them; a code editor does not.
single_line: boolOne line that scrolls sideways instead of wrapping: Enter reports Event::Key "Enter"
(the piece turns it into a submit) and inserts nothing, and a pasted newline is flattened
by the piece. min_lines/max_lines are both 1.
code: boolCode editing: Tab reports Event::Key "Tab" instead of moving focus (the piece
inserts the indentation through EditorPatch::Insert), and an arm whose view
auto-substitutes (smart quotes, capitalization) turns that off.
Trait Implementations§
Source§impl Clone for EditorProps
impl Clone for EditorProps
Source§fn clone(&self) -> EditorProps
fn clone(&self) -> EditorProps
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 moreSource§impl Debug for EditorProps
impl Debug for EditorProps
Source§impl Default for EditorProps
impl Default for EditorProps
Source§impl PartialEq for EditorProps
impl PartialEq for EditorProps
impl StructuralPartialEq for EditorProps
Auto Trait Implementations§
impl Freeze for EditorProps
impl RefUnwindSafe for EditorProps
impl Send for EditorProps
impl Sync for EditorProps
impl Unpin for EditorProps
impl UnsafeUnpin for EditorProps
impl UnwindSafe for EditorProps
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more