Struct InputTextMultiline

Source
pub struct InputTextMultiline<'ui, 'p, L, T = PassthroughCallback> { /* private fields */ }

Implementations§

Source§

impl<'ui, 'p, L> InputTextMultiline<'ui, 'p, L>
where L: AsRef<str>,

Source

pub fn new( ui: &'ui Ui, label: L, buf: &'p mut String, size: impl Into<Vector2<f32>>, ) -> InputTextMultiline<'ui, 'p, L>

Creates a new input text widget to edit the given string.

§String Editing

Please note, ImGui requires this string to be null-terminated. We accomplish this by appending and then removing a null terminator (\0) from the String you pass in. This has several consequences:

  1. The string’s backing buffer may be resized and relocated even without edits as result of this pushed char.
  2. The string will appear truncated if the string contains \0 inside it. This will not cause memory unsafety, but it will limit your usage. If that’s the case, please pre-process your string.
  3. Truncations by ImGui appear to be done primarily by insertions of \0 to the truncation point. We will handle this for you and edit the string “properly” too, but this might show up in callbacks.
Source§

impl<'ui, 'p, T, L> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn flags(self, flags: InputTextFlags) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn chars_decimal(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn chars_hexadecimal(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn chars_uppercase(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn chars_noblank(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn auto_select_all(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn enter_returns_true( self, value: bool, ) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn allow_tab_input(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn no_horizontal_scroll( self, value: bool, ) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn always_insert_mode( self, value: bool, ) -> InputTextMultiline<'ui, 'p, L, T>

Note: this is equivalent to always_overwrite

Source

pub fn always_overwrite(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn read_only(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn password(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn no_undo_redo(self, value: bool) -> InputTextMultiline<'ui, 'p, L, T>

Source

pub fn callback<T2>( self, callbacks: InputTextMultilineCallback, callback_handler: T2, ) -> InputTextMultiline<'ui, 'p, L, T2>

Source

pub fn build(self) -> bool

Builds the string editor, performing string editing operations.

§String Editing

Please note, ImGui requires this string to be null-terminated. We accomplish this by appending and then removing a null terminator (\0) from the String you pass in. This has several consequences:

  1. The string’s backing buffer may be resized and relocated even without edits as result of this pushed char.
  2. The string will appear truncated if the string contains \0 inside it. This will not cause memory unsafety, but it will limit your usage. If that’s the case, please pre-process your string.
  3. Truncations by ImGui appear to be done primarily by insertions of \0 to the truncation point. We will handle this for you and edit the string “properly” too, but this might show up in callbacks.

Auto Trait Implementations§

§

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

§

impl<'ui, 'p, L, T = PassthroughCallback> !RefUnwindSafe for InputTextMultiline<'ui, 'p, L, T>

§

impl<'ui, 'p, L, T = PassthroughCallback> !Send for InputTextMultiline<'ui, 'p, L, T>

§

impl<'ui, 'p, L, T = PassthroughCallback> !Sync for InputTextMultiline<'ui, 'p, L, T>

§

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

§

impl<'ui, 'p, L, T = PassthroughCallback> !UnwindSafe for InputTextMultiline<'ui, 'p, L, T>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

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

Source§

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V