[][src]Struct conrod_core::widget::text_edit::TextEdit

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) -> Self[src]

Construct a TextEdit widget.

pub fn wrap_by_whitespace(self) -> Self[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) -> Self[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) -> Self[src]

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

pub fn center_justify(self) -> Self[src]

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

pub fn right_justify(self) -> Self[src]

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

pub fn align_text_bottom(self) -> Self[src]

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

pub fn align_text_y_middle(self) -> Self[src]

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

pub fn align_text_top(self) -> Self[src]

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

pub fn align_text_middle(self) -> Self[src]

Align the text to the middle of its bounding Rect.

pub fn font_id(self, font_id: Id) -> Self[src]

Specify the font used for displaying the text.

pub fn font_size(self, font_size: FontSize) -> Self[src]

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

pub fn justify(self, justify: Justify) -> Self[src]

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

pub fn y_align_text(self, y_align_text: Align) -> Self[src]

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

pub fn line_wrap(self, line_wrap: Wrap) -> Self[src]

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

pub fn line_spacing(self, line_spacing: Scalar) -> Self[src]

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

pub fn restrict_to_height(self, restrict_to_height: bool) -> Self[src]

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

Trait Implementations

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

fn color(self, color: Color) -> Self[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

fn update(self, args: UpdateArgs<'_, '_, '_, '_, Self>) -> Self::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<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> From<T> for T[src]

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

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

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

fn get_x_dimension(&Self, &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.

fn get_y_dimension(&Self, &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.