#[repr(C)]pub struct InputTextFlags { /* private fields */ }
Expand description
Flags for text inputs
Implementations§
Source§impl InputTextFlags
impl InputTextFlags
Sourcepub const CHARS_DECIMAL: InputTextFlags
pub const CHARS_DECIMAL: InputTextFlags
Allow 0123456789.+-*/
Sourcepub const CHARS_HEXADECIMAL: InputTextFlags
pub const CHARS_HEXADECIMAL: InputTextFlags
Allow 0123456789ABCDEFabcdef
Sourcepub const CHARS_UPPERCASE: InputTextFlags
pub const CHARS_UPPERCASE: InputTextFlags
Turn a..z into A..Z
Sourcepub const CHARS_NO_BLANK: InputTextFlags
pub const CHARS_NO_BLANK: InputTextFlags
Filter out spaces, tabs
Sourcepub const AUTO_SELECT_ALL: InputTextFlags
pub const AUTO_SELECT_ALL: InputTextFlags
Select entire text when first taking mouse focus
Sourcepub const ENTER_RETURNS_TRUE: InputTextFlags
pub const ENTER_RETURNS_TRUE: InputTextFlags
Return ‘true’ when Enter is pressed (as opposed to when the value was modified)
Sourcepub const CALLBACK_COMPLETION: InputTextFlags
pub const CALLBACK_COMPLETION: InputTextFlags
Call user function on pressing TAB (for completion handling)
Sourcepub const CALLBACK_HISTORY: InputTextFlags
pub const CALLBACK_HISTORY: InputTextFlags
Call user function on pressing Up/Down arrows (for history handling)
Sourcepub const CALLBACK_EDIT: InputTextFlags
pub const CALLBACK_EDIT: InputTextFlags
Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
Sourcepub const CALLBACK_ALWAYS: InputTextFlags
pub const CALLBACK_ALWAYS: InputTextFlags
Call user function every time. User code may query cursor position, modify text buffer.
Sourcepub const CALLBACK_CHAR_FILTER: InputTextFlags
pub const CALLBACK_CHAR_FILTER: InputTextFlags
Call user function to filter character.
Sourcepub const ALLOW_TAB_INPUT: InputTextFlags
pub const ALLOW_TAB_INPUT: InputTextFlags
Pressing TAB input a ‘\t’ character into the text field
Sourcepub const CTRL_ENTER_FOR_NEW_LINE: InputTextFlags
pub const CTRL_ENTER_FOR_NEW_LINE: InputTextFlags
In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).
Sourcepub const NO_HORIZONTAL_SCROLL: InputTextFlags
pub const NO_HORIZONTAL_SCROLL: InputTextFlags
Disable following the cursor horizontally
Sourcepub const ALWAYS_OVERWRITE: InputTextFlags
pub const ALWAYS_OVERWRITE: InputTextFlags
Always overwrite (aka “insert mode”).
Sourcepub const READ_ONLY: InputTextFlags
pub const READ_ONLY: InputTextFlags
Read-only mode
Sourcepub const PASSWORD: InputTextFlags
pub const PASSWORD: InputTextFlags
Password mode, display all characters as ‘*’
Sourcepub const NO_UNDO_REDO: InputTextFlags
pub const NO_UNDO_REDO: InputTextFlags
Disable undo/redo.
Sourcepub const CHARS_SCIENTIFIC: InputTextFlags
pub const CHARS_SCIENTIFIC: InputTextFlags
Allow 0123456789.+-*/eE (Scientific notation input)
Sourcepub const CALLBACK_RESIZE: InputTextFlags
pub const CALLBACK_RESIZE: InputTextFlags
Allow buffer capacity resize + notify when the string wants to be resized
Sourcepub const fn empty() -> InputTextFlags
pub const fn empty() -> InputTextFlags
Returns an empty set of flags.
Sourcepub const fn all() -> InputTextFlags
pub const fn all() -> InputTextFlags
Returns the set containing all flags.
Sourcepub const fn from_bits(bits: u32) -> Option<InputTextFlags>
pub const fn from_bits(bits: u32) -> Option<InputTextFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> InputTextFlags
pub const fn from_bits_truncate(bits: u32) -> InputTextFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> InputTextFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> InputTextFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
§Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
Sourcepub const fn intersects(&self, other: InputTextFlags) -> bool
pub const fn intersects(&self, other: InputTextFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: InputTextFlags) -> bool
pub const fn contains(&self, other: InputTextFlags) -> bool
Returns true
if all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: InputTextFlags)
pub fn insert(&mut self, other: InputTextFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: InputTextFlags)
pub fn remove(&mut self, other: InputTextFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: InputTextFlags)
pub fn toggle(&mut self, other: InputTextFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: InputTextFlags, value: bool)
pub fn set(&mut self, other: InputTextFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Sourcepub const fn intersection(self, other: InputTextFlags) -> InputTextFlags
pub const fn intersection(self, other: InputTextFlags) -> InputTextFlags
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
Sourcepub const fn union(self, other: InputTextFlags) -> InputTextFlags
pub const fn union(self, other: InputTextFlags) -> InputTextFlags
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
Sourcepub const fn difference(self, other: InputTextFlags) -> InputTextFlags
pub const fn difference(self, other: InputTextFlags) -> InputTextFlags
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
Sourcepub const fn symmetric_difference(self, other: InputTextFlags) -> InputTextFlags
pub const fn symmetric_difference(self, other: InputTextFlags) -> InputTextFlags
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
Sourcepub const fn complement(self) -> InputTextFlags
pub const fn complement(self) -> InputTextFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
Source§impl Binary for InputTextFlags
impl Binary for InputTextFlags
Source§impl BitAnd for InputTextFlags
impl BitAnd for InputTextFlags
Source§fn bitand(self, other: InputTextFlags) -> InputTextFlags
fn bitand(self, other: InputTextFlags) -> InputTextFlags
Returns the intersection between the two sets of flags.
Source§type Output = InputTextFlags
type Output = InputTextFlags
&
operator.Source§impl BitAndAssign for InputTextFlags
impl BitAndAssign for InputTextFlags
Source§fn bitand_assign(&mut self, other: InputTextFlags)
fn bitand_assign(&mut self, other: InputTextFlags)
Disables all flags disabled in the set.
Source§impl BitOr for InputTextFlags
impl BitOr for InputTextFlags
Source§fn bitor(self, other: InputTextFlags) -> InputTextFlags
fn bitor(self, other: InputTextFlags) -> InputTextFlags
Returns the union of the two sets of flags.
Source§type Output = InputTextFlags
type Output = InputTextFlags
|
operator.Source§impl BitOrAssign for InputTextFlags
impl BitOrAssign for InputTextFlags
Source§fn bitor_assign(&mut self, other: InputTextFlags)
fn bitor_assign(&mut self, other: InputTextFlags)
Adds the set of flags.
Source§impl BitXor for InputTextFlags
impl BitXor for InputTextFlags
Source§fn bitxor(self, other: InputTextFlags) -> InputTextFlags
fn bitxor(self, other: InputTextFlags) -> InputTextFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = InputTextFlags
type Output = InputTextFlags
^
operator.Source§impl BitXorAssign for InputTextFlags
impl BitXorAssign for InputTextFlags
Source§fn bitxor_assign(&mut self, other: InputTextFlags)
fn bitxor_assign(&mut self, other: InputTextFlags)
Toggles the set of flags.
Source§impl Clone for InputTextFlags
impl Clone for InputTextFlags
Source§fn clone(&self) -> InputTextFlags
fn clone(&self) -> InputTextFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InputTextFlags
impl Debug for InputTextFlags
Source§impl Extend<InputTextFlags> for InputTextFlags
impl Extend<InputTextFlags> for InputTextFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = InputTextFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = InputTextFlags>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<InputTextFlags> for InputTextFlags
impl FromIterator<InputTextFlags> for InputTextFlags
Source§fn from_iter<T>(iterator: T) -> InputTextFlagswhere
T: IntoIterator<Item = InputTextFlags>,
fn from_iter<T>(iterator: T) -> InputTextFlagswhere
T: IntoIterator<Item = InputTextFlags>,
Source§impl Hash for InputTextFlags
impl Hash for InputTextFlags
Source§impl LowerHex for InputTextFlags
impl LowerHex for InputTextFlags
Source§impl Not for InputTextFlags
impl Not for InputTextFlags
Source§fn not(self) -> InputTextFlags
fn not(self) -> InputTextFlags
Returns the complement of this set of flags.
Source§type Output = InputTextFlags
type Output = InputTextFlags
!
operator.Source§impl Octal for InputTextFlags
impl Octal for InputTextFlags
Source§impl Ord for InputTextFlags
impl Ord for InputTextFlags
Source§fn cmp(&self, other: &InputTextFlags) -> Ordering
fn cmp(&self, other: &InputTextFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for InputTextFlags
impl PartialEq for InputTextFlags
Source§impl PartialOrd for InputTextFlags
impl PartialOrd for InputTextFlags
Source§impl Sub for InputTextFlags
impl Sub for InputTextFlags
Source§fn sub(self, other: InputTextFlags) -> InputTextFlags
fn sub(self, other: InputTextFlags) -> InputTextFlags
Returns the set difference of the two sets of flags.
Source§type Output = InputTextFlags
type Output = InputTextFlags
-
operator.Source§impl SubAssign for InputTextFlags
impl SubAssign for InputTextFlags
Source§fn sub_assign(&mut self, other: InputTextFlags)
fn sub_assign(&mut self, other: InputTextFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for InputTextFlags
impl UpperHex for InputTextFlags
impl Copy for InputTextFlags
impl Eq for InputTextFlags
impl StructuralPartialEq for InputTextFlags
Auto Trait Implementations§
impl Freeze for InputTextFlags
impl RefUnwindSafe for InputTextFlags
impl Send for InputTextFlags
impl Sync for InputTextFlags
impl Unpin for InputTextFlags
impl UnwindSafe for InputTextFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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