Struct imgui::ColorEdit3
source · pub struct ColorEdit3<'ui, 'a, Label, C> { /* private fields */ }
Expand description
Builder for a color editor widget.
§Examples
if ui.color_edit4("color_edit", &mut color) {
println!("The color was changed");
}
Implementations§
source§impl<'ui, 'a, Label, C> ColorEdit3<'ui, 'a, Label, C>
impl<'ui, 'a, Label, C> ColorEdit3<'ui, 'a, Label, C>
sourcepub fn new(ui: &'ui Ui, label: Label, value: &'a mut C) -> Self
👎Deprecated since 0.9.0: Use ui.color_edit3(...)
instead
pub fn new(ui: &'ui Ui, label: Label, value: &'a mut C) -> Self
ui.color_edit3(...)
insteadConstructs a new color editor builder.
sourcepub fn flags(self, flags: ColorEditFlags) -> Self
pub fn flags(self, flags: ColorEditFlags) -> Self
Replaces all current settings with the given flags.
sourcepub fn picker(self, value: bool) -> Self
pub fn picker(self, value: bool) -> Self
Enables/disables the picker that appears when clicking on colored square.
sourcepub fn options(self, value: bool) -> Self
pub fn options(self, value: bool) -> Self
Enables/disables toggling of the options menu when right-clicking on inputs or the small preview.
sourcepub fn small_preview(self, value: bool) -> Self
pub fn small_preview(self, value: bool) -> Self
Enables/disables the colored square preview next to the inputs.
sourcepub fn tooltip(self, value: bool) -> Self
pub fn tooltip(self, value: bool) -> Self
Enables/disables the tooltip that appears when hovering the preview.
sourcepub fn label(self, value: bool) -> Self
pub fn label(self, value: bool) -> Self
Enables/disables display of the inline text label (the label is in any case forwarded to the tooltip and picker).
sourcepub fn alpha_bar(self, value: bool) -> Self
pub fn alpha_bar(self, value: bool) -> Self
Enables/disables the vertical alpha bar/gradient in the color picker.
sourcepub fn preview(self, preview: ColorPreview) -> Self
pub fn preview(self, preview: ColorPreview) -> Self
Sets the preview style.
sourcepub fn hdr(self, value: bool) -> Self
pub fn hdr(self, value: bool) -> Self
(WIP) Currently only disables 0.0..1.0 limits in RGBA edition.
Note: you probably want to use ColorFormat::Float as well.
sourcepub fn input_mode(self, input_mode: ColorEditInputMode) -> Self
pub fn input_mode(self, input_mode: ColorEditInputMode) -> Self
Sets the data format for input and output data.
sourcepub fn display_mode(self, mode: ColorEditDisplayMode) -> Self
pub fn display_mode(self, mode: ColorEditDisplayMode) -> Self
Sets the color editor display mode.
sourcepub fn format(self, format: ColorFormat) -> Self
pub fn format(self, format: ColorFormat) -> Self
Sets the formatting style of color components.