[−][src]Struct azul_core::dom::NodeData
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]
&mut self,
callbacks: Vec<(EventFilter, (Callback, RefAny))>
)
pub fn set_dynamic_css_overrides(
&mut self,
dynamic_css_overrides: Vec<(DomString, CssProperty)>
)[src]
&mut self,
dynamic_css_overrides: Vec<(DomString, CssProperty)>
)
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]
self,
callbacks: Vec<(EventFilter, (Callback, RefAny))>
) -> Self
pub fn with_dynamic_css_overrides(
self,
dynamic_css_overrides: Vec<(DomString, CssProperty)>
) -> Self[src]
self,
dynamic_css_overrides: Vec<(DomString, CssProperty)>
) -> Self
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]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[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]
fn from_iter<I: IntoIterator<Item = NodeData>>(iter: I) -> Self[src]
impl Hash for NodeData[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,