pub struct ChartWidget<'a, Message, Renderer, C>where
    C: Chart<Message>,{ /* private fields */ }
Expand description

Chart container, turns Charts to [iced_native::Widget]s Chart container, turns Charts to [Widget]s

Implementations§

source§

impl<'a, Message, Renderer, C> ChartWidget<'a, Message, Renderer, C>where C: Chart<Message> + 'a,

source

pub fn new(chart: C) -> Self

create a new ChartWidget

source

pub fn width(self, width: Length) -> Self

set width

source

pub fn height(self, height: Length) -> Self

set height

Trait Implementations§

source§

impl<'a, Message, Renderer, C> From<ChartWidget<'a, Message, Renderer, C>> for Element<'a, Message, Renderer>where Message: 'a, C: Chart<Message> + 'a, Renderer: Renderer,

source§

fn from(widget: ChartWidget<'a, Message, Renderer, C>) -> Self

Converts to this type from the input type.
source§

impl<'a, Message, Renderer, C> Widget<Message, Renderer> for ChartWidget<'a, Message, Renderer, C>where C: Chart<Message>, Renderer: Renderer,

source§

fn width(&self) -> Length

Returns the width of the [Widget].
source§

fn height(&self) -> Length

Returns the height of the [Widget].
source§

fn tag(&self) -> Tag

Returns the Tag of the [Widget].
source§

fn state(&self) -> State

Returns the State of the [Widget].
source§

fn layout(&self, _renderer: &Renderer, limits: &Limits) -> Node

Returns the [layout::Node] of the [Widget]. Read more
source§

fn draw( &self, tree: &Tree, renderer: &mut Renderer, _theme: &<Renderer as Renderer>::Theme, _style: &Style, layout: Layout<'_>, _cursor_position: Cursor, _viewport: &Rectangle )

Draws the [Widget] using the associated Renderer.
source§

fn on_event( &mut self, tree: &mut Tree, event: Event, layout: Layout<'_>, cursor: Cursor, _renderer: &Renderer, _clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, _rectangle: &Rectangle ) -> Status

Processes a runtime [Event]. Read more
source§

fn mouse_interaction( &self, tree: &Tree, layout: Layout<'_>, cursor: Cursor, _viewport: &Rectangle, _renderer: &Renderer ) -> Interaction

Returns the current [mouse::Interaction] of the [Widget]. Read more
§

fn children(&self) -> Vec<Tree, Global>

Returns the state [Tree] of the children of the [Widget].
§

fn diff(&self, _tree: &mut Tree)

Reconciliates the [Widget] with the provided [Tree].
§

fn operate( &self, _state: &mut Tree, _layout: Layout<'_>, _renderer: &Renderer, _operation: &mut dyn Operation<Message> )

Applies an [Operation] to the [Widget].
§

fn overlay<'a>( &'a mut self, _state: &'a mut Tree, _layout: Layout<'_>, _renderer: &Renderer ) -> Option<Element<'a, Message, Renderer>>

Returns the overlay of the [Widget], if there is any.

Auto Trait Implementations§

§

impl<'a, Message, Renderer, C> RefUnwindSafe for ChartWidget<'a, Message, Renderer, C>where C: RefUnwindSafe, Message: RefUnwindSafe, Renderer: RefUnwindSafe,

§

impl<'a, Message, Renderer, C> Send for ChartWidget<'a, Message, Renderer, C>where C: Send, Message: Sync, Renderer: Sync,

§

impl<'a, Message, Renderer, C> Sync for ChartWidget<'a, Message, Renderer, C>where C: Sync, Message: Sync, Renderer: Sync,

§

impl<'a, Message, Renderer, C> Unpin for ChartWidget<'a, Message, Renderer, C>where C: Unpin,

§

impl<'a, Message, Renderer, C> UnwindSafe for ChartWidget<'a, Message, Renderer, C>where C: UnwindSafe, Message: RefUnwindSafe, Renderer: RefUnwindSafe,

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> IntoAngle<U> for Twhere U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U> TryIntoColor<U> for Twhere U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> MaybeSend for Twhere T: Send,