pub trait WindowModifierExt: Sized {
// Required methods
fn window_focus_region(
self,
host: &WindowHostHandle,
window_id: u64,
) -> Modifier;
fn window_drag_region(
self,
host: &WindowHostHandle,
window_id: u64,
) -> Modifier;
fn window_resize_handle(
self,
host: &WindowHostHandle,
window_id: u64,
handle: ResizeHandle,
) -> Modifier;
fn window_drag_continuation(
self,
host: &WindowHostHandle,
window_id: u64,
) -> Modifier;
}Expand description
Modular window behavior modifiers. Lets custom chrome reuse window behavior:
ⓘ
use repose_ui::windowing::{WindowModifierExt, WindowHostHandle};
Row(Modifier::new().window_drag_region(&host, window_id)).child(...)Required Methods§
Sourcefn window_focus_region(
self,
host: &WindowHostHandle,
window_id: u64,
) -> Modifier
fn window_focus_region( self, host: &WindowHostHandle, window_id: u64, ) -> Modifier
Bring this window to the front when the region is pressed.
Sourcefn window_drag_region(self, host: &WindowHostHandle, window_id: u64) -> Modifier
fn window_drag_region(self, host: &WindowHostHandle, window_id: u64) -> Modifier
Make this node a drag region that moves the window.
Sourcefn window_resize_handle(
self,
host: &WindowHostHandle,
window_id: u64,
handle: ResizeHandle,
) -> Modifier
fn window_resize_handle( self, host: &WindowHostHandle, window_id: u64, handle: ResizeHandle, ) -> Modifier
Make this node a resize handle for the given edge/corner.
Sourcefn window_drag_continuation(
self,
host: &WindowHostHandle,
window_id: u64,
) -> Modifier
fn window_drag_continuation( self, host: &WindowHostHandle, window_id: u64, ) -> Modifier
Shared “while dragging” continuation: move + end. Used by both the drag region and resize handles.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".