Struct pax_runtime::properties::RuntimeContext
source · pub struct RuntimeContext { /* private fields */ }Expand description
Shared context for properties pass recursion
Implementations§
source§impl RuntimeContext
impl RuntimeContext
pub fn new(globals: Globals) -> Self
pub fn register_root_expanded_node(&self, root: &Rc<ExpandedNode>)
pub fn add_to_cache(&self, node: &Rc<ExpandedNode>)
pub fn remove_from_cache(&self, node: &Rc<ExpandedNode>)
pub fn get_expanded_node_by_eid( &self, id: ExpandedNodeIdentifier, ) -> Option<Rc<ExpandedNode>>
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
sourcepub fn get_expanded_nodes_by_global_ids(
&self,
uni: &UniqueTemplateNodeIdentifier,
) -> Vec<Rc<ExpandedNode>>
pub fn get_expanded_nodes_by_global_ids( &self, uni: &UniqueTemplateNodeIdentifier, ) -> Vec<Rc<ExpandedNode>>
Finds all ExpandedNodes with corresponding UniqueTemplateNodeIdentifier
sourcepub fn get_elements_beneath_ray(
&self,
ray: Point2<Window>,
limit_one: bool,
accum: Vec<Rc<ExpandedNode>>,
hit_invisible: bool,
) -> Vec<Rc<ExpandedNode>>
pub fn get_elements_beneath_ray( &self, ray: Point2<Window>, limit_one: bool, accum: Vec<Rc<ExpandedNode>>, hit_invisible: bool, ) -> 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(&self) -> ExpandedNodeIdentifier
pub fn enqueue_native_message(&self, message: NativeMessage)
pub fn take_native_messages(&self) -> Vec<NativeMessage>
pub fn globals(&self) -> Globals
pub fn edit_globals(&self, f: impl Fn(&mut Globals))
pub fn queue_custom_event( &self, source_expanded_node: Rc<ExpandedNode>, name: &'static str, )
pub fn flush_custom_events(self: &Rc<Self>) -> Result<(), String>
pub fn get_root_expanded_node(&self) -> Option<Rc<ExpandedNode>>
pub fn queue_render(&self, expanded_node: Rc<ExpandedNode>)
pub fn recurse_flush_queued_renders( self: &Rc<RuntimeContext>, rcs: &mut dyn RenderContext, )
Auto Trait Implementations§
impl !Freeze for RuntimeContext
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.