[][src]Struct conrod_core::widget::text_box::TextBox

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

A widget for displaying and mutating a small, one-line field of text, given by the user in the form of a String.

It's reaction is triggered upon pressing of the Enter/Return key.

Implementations

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

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

Construct a TextBox widget.

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 font_id(self, font_id: Id) -> Self[src]

Specify the font used for displaying the text.

pub fn text_color(self, text_color: Color) -> Self[src]

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

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 pad_text(self, pad_text: Scalar) -> Self[src]

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

Trait Implementations

impl<'a> Borderable for TextBox<'a>[src]

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

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

fn border_color(self, border_color: Color) -> Self[src]

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

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

fn color(self, color: Color) -> Self[src]

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

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

impl<'a> Widget for TextBox<'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 = Vec<Event>

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 TextBox<'a>

impl<'a> Send for TextBox<'a>

impl<'a> Sync for TextBox<'a>

impl<'a> Unpin for TextBox<'a>

impl<'a> UnwindSafe for TextBox<'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.