pub struct WheelProgram<Message> {
pub hue: f32,
pub saturation: f32,
pub value: f32,
/* private fields */
}Expand description
A circular HSV color wheel canvas program for Iced.
Generic over any message type. Provide a callback that maps (hue, saturation)
to your app’s message type.
hue: 0-360 degreessaturation: 0.0-1.0value: 0.0-1.0 (brightness, controls wheel appearance)
Fields§
§hue: f32§saturation: f32§value: f32Implementations§
Trait Implementations§
Source§impl<Message: Clone> Program<Message> for WheelProgram<Message>
impl<Message: Clone> Program<Message> for WheelProgram<Message>
Source§type State = WheelState
type State = WheelState
The internal state mutated by the
Program.Source§fn update(
&self,
state: &mut WheelState,
event: &Event,
bounds: Rectangle,
cursor: Cursor,
) -> Option<Action<Message>>
fn update( &self, state: &mut WheelState, event: &Event, bounds: Rectangle, cursor: Cursor, ) -> Option<Action<Message>>
Source§fn draw(
&self,
state: &WheelState,
renderer: &Renderer,
_theme: &Theme,
bounds: Rectangle,
_cursor: Cursor,
) -> Vec<Geometry> ⓘ
fn draw( &self, state: &WheelState, renderer: &Renderer, _theme: &Theme, bounds: Rectangle, _cursor: Cursor, ) -> Vec<Geometry> ⓘ
Source§fn mouse_interaction(
&self,
state: &WheelState,
bounds: Rectangle,
cursor: Cursor,
) -> Interaction
fn mouse_interaction( &self, state: &WheelState, bounds: Rectangle, cursor: Cursor, ) -> Interaction
Auto Trait Implementations§
impl<Message> Freeze for WheelProgram<Message>
impl<Message> !RefUnwindSafe for WheelProgram<Message>
impl<Message> !Send for WheelProgram<Message>
impl<Message> !Sync for WheelProgram<Message>
impl<Message> Unpin for WheelProgram<Message>
impl<Message> UnsafeUnpin for WheelProgram<Message>
impl<Message> !UnwindSafe for WheelProgram<Message>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Turns some type into the initial state of some
Application.