[][src]Struct nannou::ui::widget::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.

Methods

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

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

Construct a TextBox widget.

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

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

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

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

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

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

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

Specify the font used for displaying the text.

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

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

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

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

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

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

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

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

Trait Implementations

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

fn border(self, border: f64) -> TextBox<'a>[src]

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

fn border_color(self, border_color: Color) -> TextBox<'a>[src]

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

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

fn color(self, color: Color) -> TextBox<'a>[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<TextBox<'a>>) -> <TextBox<'a> as Widget>::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<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[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> 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<T> SetParameter for T

impl<T> SetParameter for T

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

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.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,