Struct imgui::ColorPicker[][src]

pub struct ColorPicker<'a, T: AsRef<str> + 'a> { /* fields omitted */ }
Expand description

Builder for a color picker widget.

Examples

let cp = ColorPicker::new(im_str!("color_picker"), &mut color);
if cp.build(&ui) {
  println!("A color was picked");
}

Implementations

Constructs a new color picker builder.

Replaces all current settings with the given flags.

Enables/disables the use of the alpha component.

Enables/disables toggling of the options menu when right-clicking on inputs or the small preview.

Enables/disables the colored square preview next to the inputs.

Enables/disables the input sliders/text widgets.

Enables/disables the tooltip that appears when hovering the preview.

Enables/disables display of the inline text label (the label is in any case forwarded to the tooltip and picker).

Enables/disables the bigger color preview on the right side of the picker.

Enables/disables the vertical alpha bar/gradient in the color picker.

Sets the preview style.

Sets the data format for input and output data.

Enables/disables displaying the value as RGB.

Enables/disables displaying the value as HSV.

Enables/disables displaying the value as hex.

Sets the hue/saturation/value editor mode.

Sets the formatting style of color components.

Sets the shown reference color.

Builds the color picker.

Returns true if the color value was changed.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.