Struct nannou::ui::widget::TextEdit[][src]

pub struct TextEdit<'a> { /* fields omitted */ }

A widget for displaying and mutating multi-line text, given as a String.

By default the text is wrapped via the first whitespace before the line exceeds the TextEdit’s width, however a user may change this using the .wrap_by_character method.

Implementations

impl<'a> TextEdit<'a>[src]

pub fn new(text: &'a str) -> TextEdit<'a>[src]

Construct a TextEdit widget.

pub fn wrap_by_whitespace(self) -> TextEdit<'a>[src]

The TextEdit will wrap text via the whitespace that precedes the first width-exceeding character.

This is the default setting.

pub fn wrap_by_character(self) -> TextEdit<'a>[src]

By default, the TextEdit will wrap text via the whitespace that precedes the first width-exceeding character.

Calling this method causes the TextEdit to wrap text at the first exceeding character.

pub fn left_justify(self) -> TextEdit<'a>[src]

Align the text to the left of its bounding Rect’s x axis range.

pub fn center_justify(self) -> TextEdit<'a>[src]

Align the text to the middle of its bounding Rect’s x axis range.

pub fn right_justify(self) -> TextEdit<'a>[src]

Align the text to the right of its bounding Rect’s x axis range.

pub fn align_text_bottom(self) -> TextEdit<'a>[src]

Align the text to the left of its bounding Rect’s y axis range.

pub fn align_text_y_middle(self) -> TextEdit<'a>[src]

Align the text to the middle of its bounding Rect’s y axis range.

pub fn align_text_top(self) -> TextEdit<'a>[src]

Align the text to the right of its bounding Rect’s y axis range.

pub fn align_text_middle(self) -> TextEdit<'a>[src]

Align the text to the middle of its bounding Rect.

pub fn font_id(self, font_id: Id) -> TextEdit<'a>[src]

Specify the font used for displaying the text.

pub fn font_size(self, font_size: u32) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn justify(self, justify: Justify) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn y_align_text(self, y_align_text: Align) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn line_wrap(self, line_wrap: Wrap) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn line_spacing(self, line_spacing: f64) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn restrict_to_height(self, restrict_to_height: bool) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

Trait Implementations

impl<'a> Colorable for TextEdit<'a>[src]

pub fn color(self, color: Color) -> TextEdit<'a>[src]

Build the type’s self.$($assignee).+ with the given $Type.

impl<'a> Common for TextEdit<'a>[src]

impl<'a> Widget for TextEdit<'a>[src]

type State = State

State to be stored within the Uis widget cache. Read more

type Style = Style

Every widget is required to have its own associated Style type. This type is intended to contain high-level styling information for the widget that can be optionally specified by a user of the widget. Read more

type Event = Option<String>

The type of event yielded by the widget, returned via the Widget::set function. Read more

pub fn update(
    self,
    args: UpdateArgs<'_, '_, '_, '_, TextEdit<'a>>
) -> <TextEdit<'a> as Widget>::Event
[src]

Update the state of the TextEdit.

Auto Trait Implementations

impl<'a> RefUnwindSafe for TextEdit<'a>

impl<'a> Send for TextEdit<'a>

impl<'a> Sync for TextEdit<'a>

impl<'a> Unpin for TextEdit<'a>

impl<'a> UnwindSafe for TextEdit<'a>

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<W> Positionable for W where
    W: Widget
[src]

impl<T> SetParameter for T

impl<W> Sizeable for W where
    W: Widget
[src]

pub fn get_x_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the x Dimension for the widget via the following:

  • Check for specified value at maybe_x_dimension
  • Otherwise, use the default returned by Widget::default_x_dimension.

pub fn get_y_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the y Dimension for the widget via the following:

  • Check for specified value at maybe_y_dimension
  • Otherwise, use the default returned by Widget::default_y_dimension.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,