Skip to main content

MovesWindow

Trait MovesWindow 

Source
pub trait MovesWindow: Sized + Sealed {
    // Required method
    fn moves_window(self) -> Self;
}
Expand description

A part of a page that moves the window when the person drags it.

It is implemented for hypersig’s El alone.

Required Methods§

Source

fn moves_window(self) -> Self

Makes the person’s drag on this element move the window.

It is for a window of Frame::None, whose page draws its own title bar. A double click maximizes the window or restores it, as on the system’s title bar. A link, a button, a form control, or an element with tabindex inside the element keeps its clicks, so the bar can hold the window’s own buttons. In a browser, the attribute does nothing.

use hypersig::html::{div, span};
use hypersig_desktop::MovesWindow as _;

let bar = div::<()>().moves_window().child(span().text("Notes"));
assert!(bar.render().contains("data-hypersig-moves-window"));

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S> MovesWindow for El<S>

Source§

fn moves_window(self) -> Self

Implementors§