ConicGradient

Struct ConicGradient 

Source
pub struct ConicGradient { /* private fields */ }
Expand description

Conic gradient.

Can be used as a node that fills the available space with the gradient, or can continue building the conic or a tiled conic gradient.

Use gradient or conic_gradient to start building.

Implementations§

Source§

impl ConicGradient

Source

pub fn extend_mode(self, mode: impl IntoVar<ExtendMode>) -> ConicGradient

Sets the extend mode of the conic gradient.

By default is ExtendMode::Clamp.

Source

pub fn repeat(self) -> ConicGradient

Sets the extend mode to ExtendMode::Repeat.

Source

pub fn reflect(self) -> ConicGradient

Sets the extend mode to ExtendMode::Reflect.

Source

pub fn tile( self, tile_size: impl IntoVar<Size>, tile_spacing: impl IntoVar<Size>, ) -> TiledConicGradient

Continue building a tiled radial gradient.

Source

pub fn tile_size(self, size: impl IntoVar<Size>) -> TiledConicGradient

Continue building a tiled radial gradient.

Trait Implementations§

Source§

impl UiNodeImpl for ConicGradient

Source§

fn children_len(&self) -> usize

Gets the current count of children nodes.
Source§

fn with_child(&mut self, _: usize, _: &mut dyn FnMut(&mut UiNode))

Visit a child node by index. If the index is not valid visitor is not called. Read more
Source§

fn init(&mut self)

Initializes the node in a new UI context. Read more
Source§

fn update(&mut self, _: &WidgetUpdates)

Receives variable and other non-event updates. Read more
Source§

fn measure(&mut self, _: &mut WidgetMeasure) -> Size2D<Px, Px>

Computes the widget size given the contextual layout metrics without actually updating the widget layout. Read more
Source§

fn layout(&mut self, _: &mut WidgetLayout) -> Size2D<Px, Px>

Computes the widget layout given the contextual layout metrics. Read more
Source§

fn render(&mut self, frame: &mut FrameBuilder)

Generates render instructions and updates transforms and hit-test areas. Read more
Source§

fn is_list(&self) -> bool

Gets if the node represents a list of other nodes. Read more
Source§

fn for_each_child(&mut self, visitor: &mut dyn FnMut(usize, &mut UiNode))

Call visitor for each child node of self, one at a time. Read more
Source§

fn try_for_each_child( &mut self, visitor: &mut dyn FnMut(usize, &mut UiNode) -> ControlFlow<BoxAnyVarValue>, ) -> ControlFlow<BoxAnyVarValue>

Call visitor for each child node of self, one at a time, with control flow. Read more
Source§

fn par_each_child(&mut self, visitor: &(dyn Fn(usize, &mut UiNode) + Sync))

Calls visitor for each child node in parallel. Read more
Source§

fn par_fold_reduce( &mut self, identity: BoxAnyVarValue, fold: &(dyn Fn(BoxAnyVarValue, usize, &mut UiNode) -> BoxAnyVarValue + Sync), reduce: &(dyn Fn(BoxAnyVarValue, BoxAnyVarValue) -> BoxAnyVarValue + Sync), ) -> BoxAnyVarValue

Calls fold for each child node in parallel, with fold accumulators produced by cloning identity, then merges the folded results using reduce to produce the final value also in parallel. Read more
Source§

fn deinit(&mut self)

Deinitializes the node in the current UI context. Read more
Source§

fn info(&mut self, info: &mut WidgetInfoBuilder)

Builds widget info. Read more
Source§

fn event(&mut self, update: &EventUpdate)

Receives an event. Read more
Source§

fn update_list( &mut self, updates: &WidgetUpdates, observer: &mut dyn UiNodeListObserver, )

Does update and if the node is a list notifies list changes to the observer.
Source§

fn measure_list( &mut self, wm: &mut WidgetMeasure, measure: &(dyn Fn(usize, &mut UiNode, &mut WidgetMeasure) -> Size2D<Px, Px> + Sync), fold_size: &(dyn Fn(Size2D<Px, Px>, Size2D<Px, Px>) -> Size2D<Px, Px> + Sync), ) -> Size2D<Px, Px>

If the node is_list measure each child and combine the size using fold_size. Read more
Source§

fn layout_list( &mut self, wl: &mut WidgetLayout, layout: &(dyn Fn(usize, &mut UiNode, &mut WidgetLayout) -> Size2D<Px, Px> + Sync), fold_size: &(dyn Fn(Size2D<Px, Px>, Size2D<Px, Px>) -> Size2D<Px, Px> + Sync), ) -> Size2D<Px, Px>

If the node is_list layout each child and combine the size using fold_size. Read more
Source§

fn render_list( &mut self, frame: &mut FrameBuilder, render: &(dyn Fn(usize, &mut UiNode, &mut FrameBuilder) + Sync), )

If the node is_list render each child. Read more
Source§

fn render_update(&mut self, update: &mut FrameUpdate)

Updates values in the last generated frame. Read more
Source§

fn render_update_list( &mut self, update: &mut FrameUpdate, render_update: &(dyn Fn(usize, &mut UiNode, &mut FrameUpdate) + Sync), )

If the node is_list render_update each child. Read more
Source§

fn as_widget(&mut self) -> Option<&mut (dyn WidgetUiNodeImpl + 'static)>

Gets the node implementation as a WidgetUiNodeImpl, if the node defines a widget instance scope.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: 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.
§

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.
§

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.
§

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.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<U> IntoUiNode for U
where U: UiNodeImpl,

Source§

fn into_node(self) -> UiNode

Instantiate the UI node.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> StateValue for T
where T: Any + Send + Sync,