pub enum MainPanelMsg {
PointerEvent(PointerEvent),
StagedChanged,
LayoutUpdated,
TabSelected(String),
BeforeResize(Event),
ContextMenu(Option<String>, f64, f64),
CloseContextMenu,
Command(PanelCommand),
}Variants§
PointerEvent(PointerEvent)
StagedChanged
The Workspace staged-panel set changed (staged_changed PubSub —
see Workspace::stage_panel): re-render so cells/tabs/wrappers
reflect it and reconcile inserts a promoted panel. Subscribed on
MainPanel’s OWN scope — the root’s LayoutChanged delivery proved
unreliable from element-API task contexts (promoted panels stranded
in their hidden wrappers), while this component’s own messages
deliver in every observed context.
LayoutUpdated
The <regular-layout> tree changed (fired by its
regular-layout-update event). Used to detect panels removed from
the layout (e.g. a frame’s close button) so they can be disposed.
TabSelected(String)
A tab was selected (fired by regular-layout-select, detail.name);
the selected panel becomes the active panel. This is
regular-layout’s own selection signal, so it resolves the correct
panel within a stack.
BeforeResize(Event)
The layout is about to resize its cells (fired by the cancelable
regular-layout-before-resize). Carries the event so its
PresizeDetail can pre-size each panel’s plugin to its target box
before the layout commits — avoiding the post-commit resize
shear/clip. The handler (onbeforeresize closure) has already
preventDefault()-ed it.
ContextMenu(Option<String>, f64, f64)
A right-click opened the panel context menu (target panel id, client
x, y). Fired by the imperative contextmenu listener on the panel
container — see _contextmenu_listener — and by each PanelTab.
Some(id) activates that panel and opens its
PanelMenu at the
cursor; None is the EMPTY stage (zero panels) — a target-less menu
offering only “New”, whose items create the first panel.
CloseContextMenu
Dismiss the panel context menu (the menu session ended).
Command(PanelCommand)
The open context menu selected a command. Maximize/Restore act on the
layout here; the rest forward to on_panel_command.
Trait Implementations§
Auto Trait Implementations§
impl !Send for MainPanelMsg
impl !Sync for MainPanelMsg
impl Freeze for MainPanelMsg
impl RefUnwindSafe for MainPanelMsg
impl Unpin for MainPanelMsg
impl UnsafeUnpin for MainPanelMsg
impl UnwindSafe for MainPanelMsg
Blanket Implementations§
impl<Token, Builder, How> AllPropsFor<Builder, How> for Tokenwhere
Builder: Buildable<Token>,
<Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,
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
impl<T> HasAllProps<(), T> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.