[−][src]Struct imgui::ColorButton
Builder for a color button widget.
Examples
ColorButton::new(im_str!("color_button"), [1.0, 0.0, 0.0, 1.0]) .build(&ui);
Implementations
impl<'a> ColorButton<'a>
[src]
pub fn new(desc_id: &ImStr, color: [f32; 4]) -> ColorButton<'_>
[src]
Constructs a new color button builder.
pub fn flags(self, flags: ColorEditFlags) -> Self
[src]
Replaces all current settings with the given flags.
pub fn alpha(self, value: bool) -> Self
[src]
Enables/disables the use of the alpha component.
pub fn tooltip(self, value: bool) -> Self
[src]
Enables/disables the tooltip that appears when hovering the preview.
pub fn preview(self, preview: ColorPreview) -> Self
[src]
Sets the preview style.
pub fn input_mode(self, input_mode: ColorEditInputMode) -> Self
[src]
Sets the data format for input data.
pub fn drag_drop(self, value: bool) -> Self
[src]
Enables/disables using the button as drag&drop source.
pub fn size(self, size: [f32; 2]) -> Self
[src]
Sets the button size.
Use 0.0 for width and/or height to use the default size.
pub fn build(self, _: &Ui<'_>) -> bool
[src]
Builds the color button.
Returns true if this color button was clicked.
Trait Implementations
impl<'a> Clone for ColorButton<'a>
[src]
fn clone(&self) -> ColorButton<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for ColorButton<'a>
[src]
impl<'a> Debug for ColorButton<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ColorButton<'a>
impl<'a> Send for ColorButton<'a>
impl<'a> Sync for ColorButton<'a>
impl<'a> Unpin for ColorButton<'a>
impl<'a> UnwindSafe for ColorButton<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,