pub struct ColorEditFlags(/* private fields */);Expand description
Dear ImGui (ImGuiColorEditFlags): Flags for ColorEdit4(), ColorPicker4() etc.
Implementations§
Source§impl ColorEditFlags
impl ColorEditFlags
Sourcepub const NoAlpha: Self
pub const NoAlpha: Self
Dear ImGui (ImGuiColorEditFlags_NoAlpha): ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).
Sourcepub const NoPicker: Self
pub const NoPicker: Self
Dear ImGui (ImGuiColorEditFlags_NoPicker): ColorEdit: disable picker when clicking on color square.
Sourcepub const NoOptions: Self
pub const NoOptions: Self
Dear ImGui (ImGuiColorEditFlags_NoOptions): ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.
Sourcepub const NoSmallPreview: Self
pub const NoSmallPreview: Self
Dear ImGui (ImGuiColorEditFlags_NoSmallPreview): ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the inputs)
Sourcepub const NoInputs: Self
pub const NoInputs: Self
Dear ImGui (ImGuiColorEditFlags_NoInputs): ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview color square).
Sourcepub const NoTooltip: Self
pub const NoTooltip: Self
Dear ImGui (ImGuiColorEditFlags_NoTooltip): ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.
Sourcepub const NoLabel: Self
pub const NoLabel: Self
Dear ImGui (ImGuiColorEditFlags_NoLabel): ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).
Sourcepub const NoSidePreview: Self
pub const NoSidePreview: Self
Dear ImGui (ImGuiColorEditFlags_NoSidePreview): ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead.
Sourcepub const NoDragDrop: Self
pub const NoDragDrop: Self
Dear ImGui (ImGuiColorEditFlags_NoDragDrop): ColorEdit: disable drag and drop target/source. ColorButton: disable drag and drop source.
Sourcepub const NoBorder: Self
pub const NoBorder: Self
Dear ImGui (ImGuiColorEditFlags_NoBorder): ColorButton: disable border (which is enforced by default)
Sourcepub const NoColorMarkers: Self
pub const NoColorMarkers: Self
Dear ImGui (ImGuiColorEditFlags_NoColorMarkers): ColorEdit: disable rendering R/G/B/A color marker.
Sourcepub const AlphaOpaque: Self
pub const AlphaOpaque: Self
Dear ImGui (ImGuiColorEditFlags_AlphaOpaque): ColorEdit, ColorPicker, ColorButton: disable alpha in the preview,. Contrary to _NoAlpha it may still be edited when calling ColorEdit4()/ColorPicker4().
Sourcepub const AlphaNoBg: Self
pub const AlphaNoBg: Self
Dear ImGui (ImGuiColorEditFlags_AlphaNoBg): ColorEdit, ColorPicker, ColorButton: disable rendering a checkerboard background behind transparent color.
Sourcepub const AlphaPreviewHalf: Self
pub const AlphaPreviewHalf: Self
Dear ImGui (ImGuiColorEditFlags_AlphaPreviewHalf): ColorEdit, ColorPicker, ColorButton: display half opaque / half transparent preview.
Sourcepub const AlphaBar: Self
pub const AlphaBar: Self
Dear ImGui (ImGuiColorEditFlags_AlphaBar): ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
Sourcepub const HDR: Self
pub const HDR: Self
Dear ImGui (ImGuiColorEditFlags_HDR): (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).
Sourcepub const DisplayRGB: Self
pub const DisplayRGB: Self
Dear ImGui (ImGuiColorEditFlags_DisplayRGB): ColorEdit: override display type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.
Sourcepub const DisplayHSV: Self
pub const DisplayHSV: Self
Dear ImGui (ImGuiColorEditFlags_DisplayHSV): [Display] // “
Sourcepub const DisplayHex: Self
pub const DisplayHex: Self
Dear ImGui (ImGuiColorEditFlags_DisplayHex): [Display] // “
Sourcepub const Uint8: Self
pub const Uint8: Self
Dear ImGui (ImGuiColorEditFlags_Uint8): ColorEdit, ColorPicker, ColorButton: display values formatted as 0..255.
Sourcepub const Float: Self
pub const Float: Self
Dear ImGui (ImGuiColorEditFlags_Float): ColorEdit, ColorPicker, ColorButton: display values formatted as 0.0f..1.0f floats instead of 0..255 integers.
Sourcepub const PickerHueBar: Self
pub const PickerHueBar: Self
Dear ImGui (ImGuiColorEditFlags_PickerHueBar): ColorPicker: bar for Hue, rectangle for Sat/Value.
Sourcepub const PickerHueWheel: Self
pub const PickerHueWheel: Self
Dear ImGui (ImGuiColorEditFlags_PickerHueWheel): ColorPicker: wheel for Hue, triangle for Sat/Value.
Sourcepub const PickerNoRotate: Self
pub const PickerNoRotate: Self
Dear ImGui (ImGuiColorEditFlags_PickerNoRotate): ColorPicker: disable rotating Sat/Value triangle
Sourcepub const InputRGB: Self
pub const InputRGB: Self
Dear ImGui (ImGuiColorEditFlags_InputRGB): ColorEdit, ColorPicker: input and output data in RGB format.
Sourcepub const InputHSV: Self
pub const InputHSV: Self
Dear ImGui (ImGuiColorEditFlags_InputHSV): ColorEdit, ColorPicker: input and output data in HSV format.
Sourcepub const DefaultOptions_: Self
pub const DefaultOptions_: Self
Dear ImGui (ImGuiColorEditFlags_DefaultOptions_): Default options
Source§impl ColorEditFlags
impl ColorEditFlags
Sourcepub const fn bits(&self) -> i32
pub const fn bits(&self) -> i32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: i32) -> Option<Self>
pub const fn from_bits(bits: i32) -> Option<Self>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: i32) -> Self
pub const fn from_bits_truncate(bits: i32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: i32) -> Self
pub const fn from_bits_retain(bits: i32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl ColorEditFlags
impl ColorEditFlags
Sourcepub const fn iter(&self) -> Iter<ColorEditFlags>
pub const fn iter(&self) -> Iter<ColorEditFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<ColorEditFlags>
pub const fn iter_names(&self) -> IterNames<ColorEditFlags>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for ColorEditFlags
impl Binary for ColorEditFlags
Source§impl BitAnd for ColorEditFlags
impl BitAnd for ColorEditFlags
Source§impl BitAndAssign for ColorEditFlags
impl BitAndAssign for ColorEditFlags
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for ColorEditFlags
impl BitOr for ColorEditFlags
Source§fn bitor(self, other: ColorEditFlags) -> Self
fn bitor(self, other: ColorEditFlags) -> Self
The bitwise or (|) of the bits in self and other.
Source§type Output = ColorEditFlags
type Output = ColorEditFlags
| operator.Source§impl BitOrAssign for ColorEditFlags
impl BitOrAssign for ColorEditFlags
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for ColorEditFlags
impl BitXor for ColorEditFlags
Source§impl BitXorAssign for ColorEditFlags
impl BitXorAssign for ColorEditFlags
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for ColorEditFlags
impl Clone for ColorEditFlags
Source§fn clone(&self) -> ColorEditFlags
fn clone(&self) -> ColorEditFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ColorEditFlags
Source§impl Debug for ColorEditFlags
impl Debug for ColorEditFlags
impl Eq for ColorEditFlags
Source§impl Extend<ColorEditFlags> for ColorEditFlags
impl Extend<ColorEditFlags> for ColorEditFlags
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|) of the bits in each flags value.
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 Flags for ColorEditFlags
impl Flags for ColorEditFlags
Source§const FLAGS: &'static [Flag<ColorEditFlags>]
const FLAGS: &'static [Flag<ColorEditFlags>]
Source§fn from_bits_retain(bits: i32) -> ColorEditFlags
fn from_bits_retain(bits: i32) -> ColorEditFlags
Source§fn all_named() -> ColorEditFlags
fn all_named() -> ColorEditFlags
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<ColorEditFlags> for ColorEditFlags
impl FromIterator<ColorEditFlags> for ColorEditFlags
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for ColorEditFlags
impl IntoIterator for ColorEditFlags
Source§impl LowerHex for ColorEditFlags
impl LowerHex for ColorEditFlags
Source§impl Not for ColorEditFlags
impl Not for ColorEditFlags
Source§impl Octal for ColorEditFlags
impl Octal for ColorEditFlags
Source§impl Ord for ColorEditFlags
impl Ord for ColorEditFlags
Source§fn cmp(&self, other: &ColorEditFlags) -> Ordering
fn cmp(&self, other: &ColorEditFlags) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ColorEditFlags
impl PartialEq for ColorEditFlags
Source§impl PartialOrd for ColorEditFlags
impl PartialOrd for ColorEditFlags
Source§impl PublicFlags for ColorEditFlags
impl PublicFlags for ColorEditFlags
impl StructuralPartialEq for ColorEditFlags
Source§impl Sub for ColorEditFlags
impl Sub for ColorEditFlags
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = ColorEditFlags
type Output = ColorEditFlags
- operator.Source§impl SubAssign for ColorEditFlags
impl SubAssign for ColorEditFlags
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Auto Trait Implementations§
impl Freeze for ColorEditFlags
impl RefUnwindSafe for ColorEditFlags
impl Send for ColorEditFlags
impl Sync for ColorEditFlags
impl Unpin for ColorEditFlags
impl UnsafeUnpin for ColorEditFlags
impl UnwindSafe for ColorEditFlags
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