Skip to main content

Grid

Struct Grid 

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

Handle to a Grid node in the scene: cheap to copy, its methods return the node’s properties as Signals. Derefs to Node.

Implementations§

Source§

impl Grid

Source

pub fn new() -> GridBuilder

Starts a builder; add it with Node::add (e.g. view.add(..)).

Source

pub fn node(self) -> Node

The untyped node handle (same as *self).

Source§

impl Grid

Source

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

The width property as an animatable signal.

Source

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

The height property as an animatable signal.

Source

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

The spacing property as an animatable signal.

Methods from Deref<Target = 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: NodeBuilder>(self, child: B) -> B::Handle

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 Grid

Source§

fn clone(&self) -> Self

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 Grid

Source§

impl Debug for Grid

Source§

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

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

impl Deref for Grid

Source§

type Target = Node

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Node

Dereferences the value.
Source§

impl Eq for Grid

Source§

impl From<Grid> for Node

Source§

fn from(h: Grid) -> Node

Converts to this type from the input type.
Source§

impl Hash for Grid

Source§

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

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 Grid

Source§

fn eq(&self, other: &Self) -> 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 Grid

Auto Trait Implementations§

§

impl Freeze for Grid

§

impl RefUnwindSafe for Grid

§

impl Send for Grid

§

impl Sync for Grid

§

impl Unpin for Grid

§

impl UnsafeUnpin for Grid

§

impl UnwindSafe for Grid

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<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<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, 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V