Enum gazpatcho::config::Widget[][src]

pub enum Widget {
    MultilineInput {
        key: String,
        capacity: usize,
        size: [f32; 2],
    },
    TextBox {
        key: String,
        capacity: usize,
        size: [f32; 2],
        read_only: bool,
    },
    Slider {
        key: String,
        min: f32,
        max: f32,
        default: f32,
        format: String,
        width: f32,
    },
    Trigger {
        key: String,
        label: String,
    },
    Switch {
        key: String,
        label: String,
    },
    DropDown {
        key: String,
        items: Vec<DropDownItem>,
    },
    Canvas {
        key: String,
        size: [f32; 2],
    },
}

Widgets are input dialogs shown on a node.

Each widget must have a unique key within the node it’s registered to. This key is then used to read values recorded by the user.

Variants

MultilineInput
👎 Deprecated since 1.2.0:

Please use TextBox instead

Multiline input provides text box for the user to type into and record a String.

Fields of MultilineInput

key: String
👎 Deprecated since 1.2.0:

Please use TextBox instead

capacity: usize
👎 Deprecated since 1.2.0:

Please use TextBox instead

Maximum capacity that the widget will allow.

size: [f32; 2]
👎 Deprecated since 1.2.0:

Please use TextBox instead

Width and height of the widget shown in a node. The width will be treated as a minimal weight that may be increased in case there is another widget that is wider.

TextBox

TextBox provides text input for the user to type into and record a String.

Fields of TextBox

key: Stringcapacity: usize

Maximum capacity that the widget will allow.

size: [f32; 2]

Width and height of the widget shown in a node. The width will be treated as a minimal weight that may be increased in case there is another widget that is wider.

read_only: bool

Select whether the content of the textbox can be edited through the UI.

Slider

Slider is a drag and drop dialog allowing users to dial-in a f32 value within given borders.

Fields of Slider

key: Stringmin: f32

Minimum allowed value.

max: f32

Maximum allowed value.

default: f32

Initially set value.

format: String

Format of the shown value as C-format string. e.g. %.3f.

width: f32

Minimal width of the widget. The width may be increased in case the node contains another widget that is wider.

Trigger

Trigger is nothing but a simple button. When clicked, it sets value of given key to true. When released, it turns back to false.

Fields of Trigger

key: Stringlabel: String

Label shown on the button.

Switch

Switch is nothing but a simple button. When clicked, it sets value of given key to true. When clicked again, it turns back to false.

Fields of Switch

key: Stringlabel: String

Label shown on the button.

DropDown

Drop down menu allows user to select one of the available values.

Fields of DropDown

key: Stringitems: Vec<DropDownItem>

List of values to choose from.

Canvas

Canvas is a visualization widget that can be fed with coordinates of to-be-enabled pixels.

Fields of Canvas

key: Stringsize: [f32; 2]

Width and height of the widget shown in a node. The width will be treated as a minimal weight that may be increased in case there is another widget that is wider.

Auto Trait Implementations

impl RefUnwindSafe for Widget

impl Send for Widget

impl Sync for Widget

impl Unpin for Widget

impl UnwindSafe for Widget

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<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.