#[repr(C)]pub struct ColorInput {
pub color_input_state: ColorInputStateWrapper,
pub style: CssPropertyWithConditionsVec,
}Expand description
Rectangular input that displays a color and triggers a callback when clicked.
Fields§
§color_input_state: ColorInputStateWrapper§style: CssPropertyWithConditionsVecImplementations§
Source§impl ColorInput
impl ColorInput
Sourcepub fn set_on_value_change<I: Into<ColorInputOnValueChangeCallback>>(
&mut self,
data: RefAny,
callback: I,
)
pub fn set_on_value_change<I: Into<ColorInputOnValueChangeCallback>>( &mut self, data: RefAny, callback: I, )
Sets the callback invoked when the color value changes.
Sourcepub fn with_on_value_change<C: Into<ColorInputOnValueChangeCallback>>(
self,
data: RefAny,
callback: C,
) -> Self
pub fn with_on_value_change<C: Into<ColorInputOnValueChangeCallback>>( self, data: RefAny, callback: C, ) -> Self
Builder-style method to set the value-change callback.
Sourcepub fn swap_with_default(&mut self) -> Self
pub fn swap_with_default(&mut self) -> Self
Replaces self with a default ColorInput and returns the previous value.
Trait Implementations§
Source§impl Clone for ColorInput
impl Clone for ColorInput
Source§fn clone(&self) -> ColorInput
fn clone(&self) -> ColorInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorInput
impl Debug for ColorInput
Source§impl Default for ColorInput
impl Default for ColorInput
Source§fn default() -> ColorInput
fn default() -> ColorInput
Returns the “default value” for a type. Read more
Source§impl PartialEq for ColorInput
impl PartialEq for ColorInput
Source§fn eq(&self, other: &ColorInput) -> bool
fn eq(&self, other: &ColorInput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ColorInput
Auto Trait Implementations§
impl Freeze for ColorInput
impl RefUnwindSafe for ColorInput
impl Send for ColorInput
impl Sync for ColorInput
impl Unpin for ColorInput
impl UnsafeUnpin for ColorInput
impl UnwindSafe for ColorInput
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more