Struct pax_runtime::properties::RuntimeContext
source · pub struct RuntimeContext {
pub z_index_node_cache: Vec<Rc<ExpandedNode>>,
pub node_cache: HashMap<u32, Rc<ExpandedNode>>,
/* private fields */
}Expand description
Shared context for properties pass recursion
Fields§
§z_index_node_cache: Vec<Rc<ExpandedNode>>§node_cache: HashMap<u32, Rc<ExpandedNode>>Implementations§
source§impl RuntimeContext
impl RuntimeContext
pub fn new(expression_table: ExpressionTable, globals: Globals) -> Self
sourcepub fn get_expanded_nodes_by_id(&self, id: &str) -> Vec<Rc<ExpandedNode>>
pub fn get_expanded_nodes_by_id(&self, id: &str) -> Vec<Rc<ExpandedNode>>
Finds all ExpandedNodes with the CommonProperty#id matching the provided string
pub fn get_expanded_nodes_by_global_ids( &self, template_node_identifier: UniqueTemplateNodeIdentifier ) -> Vec<Rc<ExpandedNode>>
sourcepub fn get_elements_beneath_ray(
&self,
ray: Point2<Window>,
limit_one: bool,
accum: Vec<Rc<ExpandedNode>>
) -> Vec<Rc<ExpandedNode>>
pub fn get_elements_beneath_ray( &self, ray: Point2<Window>, limit_one: bool, accum: Vec<Rc<ExpandedNode>> ) -> Vec<Rc<ExpandedNode>>
Simple 2D raycasting: the coordinates of the ray represent a
ray running orthogonally to the view plane, intersecting at
the specified point ray. Areas outside of clipping bounds will
not register a hit, nor will elements that suppress input events.
sourcepub fn get_topmost_element_beneath_ray(
&self,
ray: Point2<Window>
) -> Option<Rc<ExpandedNode>>
pub fn get_topmost_element_beneath_ray( &self, ray: Point2<Window> ) -> Option<Rc<ExpandedNode>>
Alias for get_elements_beneath_ray with limit_one = true
pub fn gen_uid(&mut self) -> Uid
pub fn enqueue_native_message(&mut self, message: NativeMessage)
pub fn take_native_messages(&mut self) -> Vec<NativeMessage>
pub fn globals(&self) -> &Globals
pub fn globals_mut(&mut self) -> &mut Globals
pub fn expression_table(&self) -> &ExpressionTable
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeContext
impl !Send for RuntimeContext
impl !Sync for RuntimeContext
impl Unpin for RuntimeContext
impl !UnwindSafe for RuntimeContext
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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.