azul_core

Module dom

Source
Expand description

Dom construction, NodeData and NodeType management functions

Re-exports§

Structs§

  • Same as Dom, but arena-based for more efficient memory layout
  • The document model, similar to HTML. This is a create-only structure, you don’t actually read anything back
  • Calculated hash of a DOM node, used for querying attributes of the DOM node
  • DomID - used for identifying different DOMs (for example IFrameCallbacks) have a different DomId than the root DOM
  • Pointer to rust-allocated Box<Dom<*mut c_void>> struct
  • Represents one single DOM node (node type, classes, ids and callbacks are stored here)
  • Same as the TagId, but only for scrollable nodes
  • Unique Ttag“ that is used to annotate which rectangles are relevant for hit-testing

Enums§

  • Most strings are known at compile time, spares a bit of heap allocations - for &'static str, simply stores the pointer, instead of converting it into a String. This is good for class names or IDs, whose content rarely changes.
  • Sets the target for what events can reach the callbacks specifically.
  • Event filter similar to HoverEventFilter that only fires when the element is focused
  • Event filter that only fires when an element is hovered over
  • List of core DOM node types built-into by azul.
  • The inverse of an onclick event filter, fires when an item is not hovered / focused. This is useful for cleanly implementing things like popover dialogs or dropdown boxes that want to close when the user clicks any where but the item itself.
  • When to call a callback action - On::MouseOver, On::MouseOut, etc.
  • Event filter that fires when any action fires on the entire window (regardless of whether any element is hovered or focused over).