Skip to main content

RenderRootSignal

Enum RenderRootSignal 

Source
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.

Trait Implementations§

Source§

impl Debug for RenderRootSignal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyDebug for T
where T: Any + Debug,

Source§

fn type_name(&self) -> &'static str

Available on crate feature type_name only.
Returns the type_name of this value’s concrete type. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more