Struct imgui::InputScalar

source ·
pub struct InputScalar<'ui, 'p, T, L, F = &'static str> { /* private fields */ }
Expand description

Builder for an input scalar widget.

Implementations§

source§

impl<'ui, 'p, L: AsRef<str>, T: DataTypeKind> InputScalar<'ui, 'p, T, L>

source

pub fn new(ui: &'ui Ui, label: L, value: &'p mut T) -> Self

Constructs a new input scalar builder.

source§

impl<'ui, 'p, L: AsRef<str>, T: DataTypeKind, F: AsRef<str>> InputScalar<'ui, 'p, T, L, F>

source

pub fn display_format<F2: AsRef<str>>( self, display_format: F2 ) -> InputScalar<'ui, 'p, T, L, F2>

Sets the display format using a C-style printf string

source

pub fn build(self) -> bool

Builds an input scalar that is bound to the given value.

Returns true if the value was changed.

source

pub fn step(self, value: T) -> Self

source

pub fn step_fast(self, value: T) -> Self

source

pub fn flags(self, flags: InputTextFlags) -> Self

source

pub fn chars_decimal(self, value: bool) -> Self

source

pub fn chars_hexadecimal(self, value: bool) -> Self

source

pub fn chars_uppercase(self, value: bool) -> Self

source

pub fn chars_noblank(self, value: bool) -> Self

source

pub fn auto_select_all(self, value: bool) -> Self

source

pub fn enter_returns_true(self, value: bool) -> Self

source

pub fn allow_tab_input(self, value: bool) -> Self

source

pub fn no_horizontal_scroll(self, value: bool) -> Self

source

pub fn always_insert_mode(self, value: bool) -> Self

Note: this is equivalent to always_overwrite

source

pub fn always_overwrite(self, value: bool) -> Self

source

pub fn read_only(self, value: bool) -> Self

source

pub fn password(self, value: bool) -> Self

source

pub fn no_undo_redo(self, value: bool) -> Self

Auto Trait Implementations§

§

impl<'ui, 'p, T, L, F> Freeze for InputScalar<'ui, 'p, T, L, F>
where L: Freeze, T: Freeze, F: Freeze,

§

impl<'ui, 'p, T, L, F = &'static str> !RefUnwindSafe for InputScalar<'ui, 'p, T, L, F>

§

impl<'ui, 'p, T, L, F = &'static str> !Send for InputScalar<'ui, 'p, T, L, F>

§

impl<'ui, 'p, T, L, F = &'static str> !Sync for InputScalar<'ui, 'p, T, L, F>

§

impl<'ui, 'p, T, L, F> Unpin for InputScalar<'ui, 'p, T, L, F>
where L: Unpin, T: Unpin, F: Unpin,

§

impl<'ui, 'p, T, L, F = &'static str> !UnwindSafe for InputScalar<'ui, 'p, T, L, F>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.