pub enum RenderRootSignal {
Show 21 variants
Action(ErasedAction, WidgetId),
StartIme,
EndIme,
ImeMoved(LogicalPosition<f64>, LogicalSize<f64>),
ClipboardStore(String),
RequestRedraw,
RequestAnimFrame,
TakeFocus,
SetCursor(CursorIcon),
SetSize(PhysicalSize<u32>),
SetTitle(String),
DragWindow,
DragResizeWindow(ResizeDirection),
ToggleMaximized,
Minimize,
Exit,
ShowWindowMenu(LogicalPosition<f64>),
WidgetSelectedInInspector(WidgetId),
NewLayer(NewWidget<dyn Widget>, Point),
RemoveLayer(WidgetId),
RepositionLayer(WidgetId, Point),
}Expand description
Objects emitted by the RenderRoot to signal that something has changed or require external actions.
Variants§
Action(ErasedAction, WidgetId)
A widget has emitted an action.
StartIme
An IME session has been started.
EndIme
The IME session has ended.
ImeMoved(LogicalPosition<f64>, LogicalSize<f64>)
The IME area has been moved.
ClipboardStore(String)
A user interaction has sent something to the clipboard.
RequestRedraw
The window needs to be redrawn.
RequestAnimFrame
The window should be redrawn for an animation frame. Currently this isn’t really different from RequestRedraw.
TakeFocus
The window should take focus.
SetCursor(CursorIcon)
The mouse icon should change.
SetSize(PhysicalSize<u32>)
The window should be resized.
SetTitle(String)
The window title has changed.
DragWindow
The user has started dragging the window.
Masonry should send this event when the user presses the left mouse button while hovering a client-side decoration representing the window title bar or similar. The platform that receives this event should start moving the window around until the mouse button is released.
DragResizeWindow(ResizeDirection)
The user has started drag-resizing the window.
Masonry should send this event when the user presses the left mouse button while hovering a client-side decoration representing a window resize handle. The platform that receives this event should start resizing the window until the mouse button is released.
ToggleMaximized
The window should be maximized.
Minimize
The window should be minimized.
Exit
The app should terminate.
ShowWindowMenu(LogicalPosition<f64>)
The [window system menu] should be shown.
There are no guarantees as to what the shown menu will contain, or even if a window menu will be drawn at all. In general, the menu may contain options to maximize, minimize or move the window.
Some platforms may ignore this.
See also the Wayland doc for xdg_toplevel::show_window_menu.
WidgetSelectedInInspector(WidgetId)
The widget picker has selected this widget.
NewLayer(NewWidget<dyn Widget>, Point)
A new layer should be created with the widget as root.
RemoveLayer(WidgetId)
The layer with the given widget as root should be removed.
RepositionLayer(WidgetId, Point)
The layer with the given widget as root should be repositioned to the specified point.