Skip to main content

ContextMenuFactory

Type Alias ContextMenuFactory 

Source
pub type ContextMenuFactory = Rc<dyn Fn(Point, &mut EventContext<'_>) -> Option<Box<dyn Widget>>>;
Expand description

A reusable widget factory the framework calls every time a context menu opens. Returns a fresh widget instance each call (the framework can’t reuse a single widget across multiple openings).

Same shape as the framework’s [teksilo_core::widget_builder::ContextMenuFactory] — receives the click position (in tab-local coords) and a full [EventContext], and returns Some(menu) to mount or None to decline. The Rc wrapping is a tab-widget convenience: the delegate clones the factory per-tab without reallocating.

Aliased Type§

pub struct ContextMenuFactory { /* private fields */ }