ColorEditFlags

Struct ColorEditFlags 

Source
pub struct ColorEditFlags(/* private fields */);
Expand description

Flags for color edit widgets

Implementations§

Source§

impl ColorEditFlags

Source

pub const NONE: Self

No flags

Source

pub const NO_ALPHA: Self

ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).

Source

pub const NO_PICKER: Self

ColorEdit: disable picker when clicking on color square.

Source

pub const NO_OPTIONS: Self

ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.

Source

pub const NO_SMALL_PREVIEW: Self

ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the inputs)

Source

pub const NO_INPUTS: Self

ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview color square).

Source

pub const NO_TOOLTIP: Self

ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.

Source

pub const NO_LABEL: Self

ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).

Source

pub const NO_SIDE_PREVIEW: Self

ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead.

Source

pub const NO_DRAG_DROP: Self

ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.

Source

pub const NO_BORDER: Self

ColorButton: disable border (which is enforced by default)

Source

pub const ALPHA_BAR: Self

ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.

Source

pub const ALPHA_PREVIEW: Self

ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque.

Source

pub const ALPHA_PREVIEW_HALF: Self

ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque.

Source

pub const HDR: Self

(WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).

Source

pub const DISPLAY_RGB: Self

ColorEdit: override display type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.

Source

pub const DISPLAY_HSV: Self

ColorEdit: override display type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.

Source

pub const DISPLAY_HEX: Self

ColorEdit: override display type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.

Source

pub const UINT8: Self

ColorEdit, ColorPicker, ColorButton: display values formatted as 0..255.

Source

pub const FLOAT: Self

ColorEdit, ColorPicker, ColorButton: display values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers.

Source

pub const PICKER_HUE_BAR: Self

ColorPicker: bar for Hue, rectangle for Sat/Value.

Source

pub const PICKER_HUE_WHEEL: Self

ColorPicker: wheel for Hue, triangle for Sat/Value.

Source

pub const INPUT_RGB: Self

ColorEdit, ColorPicker: input and output data in RGB format.

Source

pub const INPUT_HSV: Self

ColorEdit, ColorPicker: input and output data in HSV format.

Source

pub const fn bits(self) -> u32

Returns the underlying bits

Source

pub const fn contains(self, other: Self) -> bool

Returns true if all flags are set

Trait Implementations§

Source§

impl BitAnd for ColorEditFlags

Source§

type Output = ColorEditFlags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for ColorEditFlags

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr for ColorEditFlags

Source§

type Output = ColorEditFlags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for ColorEditFlags

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor for ColorEditFlags

Source§

type Output = ColorEditFlags

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for ColorEditFlags

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for ColorEditFlags

Source§

fn clone(&self) -> ColorEditFlags

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColorEditFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ColorEditFlags

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Not for ColorEditFlags

Source§

type Output = ColorEditFlags

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl PartialEq for ColorEditFlags

Source§

fn eq(&self, other: &ColorEditFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ColorEditFlags

Source§

impl Eq for ColorEditFlags

Source§

impl StructuralPartialEq for ColorEditFlags

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more