Skip to main content

Node

Struct Node 

Source
pub struct Node(/* private fields */);
Expand description

Untyped node handle with the properties every node has.

Implementations§

Source§

impl Node

Source

pub fn id(self) -> NodeId

Index of the node in the scene graph.

Source

pub fn x(self) -> Signal<f64>

The x property as an animatable signal.

Source

pub fn y(self) -> Signal<f64>

The y property as an animatable signal.

Source

pub fn rotation(self) -> Signal<f64>

Degrees, clockwise.

The rotation property as an animatable signal.

Source

pub fn scale(self) -> Signal<Vec2>

The scale property as an animatable signal.

Source

pub fn opacity(self) -> Signal<f64>

The opacity property as an animatable signal.

Source

pub fn fill(self) -> Signal<Color>

The fill property as an animatable signal.

Source

pub fn stroke(self) -> Signal<Color>

The stroke property as an animatable signal.

Source

pub fn line_width(self) -> Signal<f64>

The line_width property as an animatable signal.

Source

pub fn start(self) -> Signal<f64>

Start of the drawn part of the outline (fraction of its length).

The start property as an animatable signal.

Source

pub fn end(self) -> Signal<f64>

End of the drawn part of the outline.

The end property as an animatable signal.

Source

pub fn fill_gradient(self) -> Signal<Option<Gradient>>

The fill_gradient property as an animatable signal.

Source

pub fn stroke_gradient(self) -> Signal<Option<Gradient>>

The stroke_gradient property as an animatable signal.

Source

pub fn dash(self) -> Signal<Vec<f64>>

The dash property as an animatable signal.

Source

pub fn dash_offset(self) -> Signal<f64>

The dash_offset property as an animatable signal.

Source

pub fn line_cap(self) -> Signal<LineCap>

The line_cap property as an animatable signal.

Source

pub fn line_join(self) -> Signal<LineJoin>

The line_join property as an animatable signal.

Source

pub fn blur(self) -> Signal<f64>

The blur property as an animatable signal.

Source

pub fn shadow_color(self) -> Signal<Color>

The shadow_color property as an animatable signal.

Source

pub fn shadow_blur(self) -> Signal<f64>

The shadow_blur property as an animatable signal.

Source

pub fn shadow_offset(self) -> Signal<Vec2>

The shadow_offset property as an animatable signal.

Source

pub fn clip(self) -> Signal<bool>

The clip property as an animatable signal.

Source

pub fn blend(self) -> Signal<BlendMode>

The blend property as an animatable signal.

Source

pub fn z_index(self) -> Signal<f64>

The z_index property as an animatable signal.

Source

pub fn anchor(self) -> Signal<Vec2>

The anchor property as an animatable signal.

Source

pub fn grow(self) -> Signal<f64>

The grow property as an animatable signal.

Source

pub fn shrink(self) -> Signal<f64>

The shrink property as an animatable signal.

Source

pub fn basis(self) -> Signal<Option<f64>>

The basis property as an animatable signal.

Source

pub fn margin(self) -> Signal<f64>

The margin property as an animatable signal.

Source

pub fn align_self(self) -> Signal<Option<LayoutAlign>>

The align_self property as an animatable signal.

Source

pub fn add<B>(self, child: B) -> <B as NodeBuilder>::Handle
where B: NodeBuilder,

Adds a child node; children are positioned relative to the parent.

Source

pub fn remove(self)

Detaches the node from its parent; it stops being drawn.

Source

pub fn reparent(self, parent: impl Into<Node>)

Moves the node under another parent.

Source

pub fn children(self) -> Vec<Node>

Direct children, in creation order.

Source

pub fn size(self) -> (f64, f64)

Size of the node’s box in its own coordinates.

Source

pub fn absolute_position(self) -> Vec2

Position of the node’s origin in scene coordinates.

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Node

Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for Node

Source§

impl From<Circle> for Node

Source§

fn from(h: Circle) -> Node

Converts to this type from the input type.
Source§

impl From<Code> for Node

Source§

fn from(h: Code) -> Node

Converts to this type from the input type.
Source§

impl From<Grid> for Node

Source§

fn from(h: Grid) -> Node

Converts to this type from the input type.
Source§

impl From<Group> for Node

Source§

fn from(h: Group) -> Node

Converts to this type from the input type.
Source§

impl From<Img> for Node

Source§

fn from(h: Img) -> Node

Converts to this type from the input type.
Source§

impl From<Layout> for Node

Source§

fn from(h: Layout) -> Node

Converts to this type from the input type.
Source§

impl From<Line> for Node

Source§

fn from(h: Line) -> Node

Converts to this type from the input type.
Source§

impl From<Path> for Node

Source§

fn from(h: Path) -> Node

Converts to this type from the input type.
Source§

impl From<Polygon> for Node

Source§

fn from(h: Polygon) -> Node

Converts to this type from the input type.
Source§

impl From<Rect> for Node

Source§

fn from(h: Rect) -> Node

Converts to this type from the input type.
Source§

impl From<Star> for Node

Source§

fn from(h: Star) -> Node

Converts to this type from the input type.
Source§

impl From<Txt> for Node

Source§

fn from(h: Txt) -> Node

Converts to this type from the input type.
Source§

impl From<View> for Node

Source§

fn from(v: View) -> Node

Converts to this type from the input type.
Source§

impl Hash for Node

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Node

Source§

fn eq(&self, other: &Node) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Node

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnsafeUnpin for Node

§

impl UnwindSafe for Node

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

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,