[][src]Struct azul_core::dom::NodeData

pub struct NodeData { /* fields omitted */ }

Represents one single DOM node (node type, classes, ids and callbacks are stored here)

Implementations

impl NodeData[src]

pub fn debug_print_start(&self, close_self: bool) -> String[src]

pub fn debug_print_end(&self) -> String[src]

impl NodeData[src]

pub const fn new(node_type: NodeType) -> Self[src]

Creates a new NodeData instance from a given NodeType

pub fn is_node_type(&self, searched_type: NodeType) -> bool[src]

Checks whether this node is of the given node type (div, image, text)

pub fn has_id(&self, id: &str) -> bool[src]

Checks whether this node has the searched ID attached

pub fn has_class(&self, class: &str) -> bool[src]

Checks whether this node has the searched class attached

pub fn calculate_node_data_hash(&self) -> DomHash[src]

pub const fn body() -> Self[src]

Shorthand for NodeData::new(NodeType::Body).

pub const fn div() -> Self[src]

Shorthand for NodeData::new(NodeType::Div).

pub fn label<S: Into<DomString>>(value: S) -> Self[src]

Shorthand for NodeData::new(NodeType::Label(value.into()))

pub const fn text_id(text_id: TextId) -> Self[src]

Shorthand for NodeData::new(NodeType::Text(text_id))

pub const fn image(image: ImageId) -> Self[src]

Shorthand for NodeData::new(NodeType::Image(image_id))

pub fn gl_texture(callback: GlCallbackType, ptr: RefAny) -> Self[src]

Shorthand for NodeData::new(NodeType::GlTexture((callback, ptr)))

pub fn iframe(callback: IFrameCallbackType, ptr: RefAny) -> Self[src]

Shorthand for NodeData::new(NodeType::IFrame((callback, ptr)))

pub const fn get_node_type(&self) -> &NodeType[src]

pub const fn get_ids(&self) -> &Vec<DomString>[src]

pub const fn get_classes(&self) -> &Vec<DomString>[src]

pub const fn get_callbacks(&self) -> &Vec<(EventFilter, (Callback, RefAny))>[src]

pub const fn get_dynamic_css_overrides(&self) -> &Vec<(DomString, CssProperty)>[src]

pub const fn get_is_draggable(&self) -> bool[src]

pub const fn get_tab_index(&self) -> Option<TabIndex>[src]

pub fn set_node_type(&mut self, node_type: NodeType)[src]

pub fn set_ids(&mut self, ids: Vec<DomString>)[src]

pub fn set_classes(&mut self, classes: Vec<DomString>)[src]

pub fn set_callbacks(
    &mut self,
    callbacks: Vec<(EventFilter, (Callback, RefAny))>
)
[src]

pub fn set_dynamic_css_overrides(
    &mut self,
    dynamic_css_overrides: Vec<(DomString, CssProperty)>
)
[src]

pub fn set_is_draggable(&mut self, is_draggable: bool)[src]

pub fn set_tab_index(&mut self, tab_index: Option<TabIndex>)[src]

pub fn with_node_type(self, node_type: NodeType) -> Self[src]

pub fn with_ids(self, ids: Vec<DomString>) -> Self[src]

pub fn with_classes(self, classes: Vec<DomString>) -> Self[src]

pub fn with_callbacks(
    self,
    callbacks: Vec<(EventFilter, (Callback, RefAny))>
) -> Self
[src]

pub fn with_dynamic_css_overrides(
    self,
    dynamic_css_overrides: Vec<(DomString, CssProperty)>
) -> Self
[src]

pub fn is_draggable(self, is_draggable: bool) -> Self[src]

pub fn with_tab_index(self, tab_index: Option<TabIndex>) -> Self[src]

Trait Implementations

impl Clone for NodeData[src]

impl Debug for NodeData[src]

impl Default for NodeData[src]

impl Display for NodeData[src]

impl Eq for NodeData[src]

impl FromIterator<NodeData> for Dom[src]

impl Hash for NodeData[src]

impl PartialEq<NodeData> for NodeData[src]

Auto Trait Implementations

impl !RefUnwindSafe for NodeData

impl !Send for NodeData

impl !Sync for NodeData

impl Unpin for NodeData

impl !UnwindSafe for NodeData

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.