pub struct NodeBase { /* private fields */ }Implementations§
source§impl NodeBase
impl NodeBase
pub fn node_type(&self) -> &'static str
pub fn pend_update(&mut self)
sourcepub fn pop_update_vertices(&mut self) -> bool
pub fn pop_update_vertices(&mut self) -> bool
pop vertices update flag, returns the current flag value, and set it to false
pub fn id(&self) -> &u32
pub fn label(&self) -> &String
pub fn anchor(&self) -> &Point
pub fn pivot(&self) -> &Point
pub fn translate(&self) -> &Point
pub fn scale(&self) -> &Point
pub fn rotation(&self) -> &f32
pub fn skew(&self) -> &Point
pub fn visible(&self) -> bool
pub fn tint(&self) -> &Color
pub fn opacity(&self) -> &f32
pub fn global_opacity(&self) -> &f32
pub fn interactive(&self) -> bool
pub fn cursor(&self) -> &HaiCursor
pub fn set_anchor(&mut self, x: f32, y: f32)
pub fn set_pivot(&mut self, x: f32, y: f32)
pub fn set_translate(&mut self, x: f32, y: f32)
pub fn set_x(&mut self, x: f32)
pub fn set_y(&mut self, y: f32)
pub fn set_scale(&mut self, x: f32, y: f32)
pub fn set_scale_x(&mut self, x: f32)
pub fn set_scale_y(&mut self, y: f32)
pub fn set_rotation(&mut self, radian: f32)
pub fn set_skew(&mut self, x: f32, y: f32)
pub fn set_skew_x(&mut self, x: f32)
pub fn set_skew_y(&mut self, y: f32)
pub fn set_visible(&mut self, visible: bool)
pub fn set_tint(&mut self, color: Color)
pub fn set_opacity(&mut self, opacity: f32)
pub fn set_interactive(&mut self, interactive: bool)
pub fn set_cursor(&mut self, cursor: HaiCursor)
pub fn transform(&self) -> &Transform
pub fn global_transform(&self) -> &Transform
pub fn children(&self) -> &Vec<Arc<RwLock<dyn Node>>>
pub fn update_properties(&mut self, props: &mut JSValue)
pub fn get_child(&self, index: usize) -> Option<Arc<RwLock<dyn Node>>>
pub fn add_child(&mut self, child: Arc<RwLock<dyn Node>>)
pub fn insert_child(&mut self, index: usize, child: Arc<RwLock<dyn Node>>)
pub fn insert_child_before( &mut self, before_child: Arc<RwLock<dyn Node>>, child: Arc<RwLock<dyn Node>>, )
pub fn remove_child( &mut self, child: Arc<RwLock<dyn Node>>, ) -> Option<Arc<RwLock<dyn Node>>>
pub fn remove_child_at(&mut self, index: usize) -> Option<Arc<RwLock<dyn Node>>>
pub fn move_to(&mut self, x: f32, y: f32)
pub fn update(&mut self, parent: &Self, _: &SurfaceSize, force: bool)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeBase
impl !RefUnwindSafe for NodeBase
impl Send for NodeBase
impl Sync for NodeBase
impl Unpin for NodeBase
impl !UnwindSafe for NodeBase
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> DowncastSync for T
impl<T> DowncastSync for T
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<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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