Struct arcdps_imgui::ColorButton
source · pub struct ColorButton<T> { /* private fields */ }
Expand description
Builder for a color button widget.
§Examples
ColorButton::new(im_str!("color_button"), [1.0, 0.0, 0.0, 1.0])
.build(&ui);
Implementations§
source§impl<T: AsRef<str>> ColorButton<T>
impl<T: AsRef<str>> ColorButton<T>
sourcepub fn flags(self, flags: ColorEditFlags) -> Self
pub fn flags(self, flags: ColorEditFlags) -> Self
Replaces all current settings with the given flags.
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 preview(self, preview: ColorPreview) -> Self
pub fn preview(self, preview: ColorPreview) -> Self
Sets the preview style.
sourcepub fn input_mode(self, input_mode: ColorEditInputMode) -> Self
pub fn input_mode(self, input_mode: ColorEditInputMode) -> Self
Sets the data format for input data.
sourcepub fn drag_drop(self, value: bool) -> Self
pub fn drag_drop(self, value: bool) -> Self
Enables/disables using the button as drag&drop source.
Enabled by default.
sourcepub fn border(self, value: bool) -> Self
pub fn border(self, value: bool) -> Self
Enables/disables the button border.
Enabled by default.
Trait Implementations§
source§impl<T: Clone> Clone for ColorButton<T>
impl<T: Clone> Clone for ColorButton<T>
source§fn clone(&self) -> ColorButton<T>
fn clone(&self) -> ColorButton<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for ColorButton<T>
impl<T: Debug> Debug for ColorButton<T>
impl<T: Copy> Copy for ColorButton<T>
Auto Trait Implementations§
impl<T> Freeze for ColorButton<T>where
T: Freeze,
impl<T> RefUnwindSafe for ColorButton<T>where
T: RefUnwindSafe,
impl<T> Send for ColorButton<T>where
T: Send,
impl<T> Sync for ColorButton<T>where
T: Sync,
impl<T> Unpin for ColorButton<T>where
T: Unpin,
impl<T> UnwindSafe for ColorButton<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)