Enum modalkit::actions::WindowAction
source · #[non_exhaustive]pub enum WindowAction<I: ApplicationInfo> {
Close(WindowTarget, CloseFlags),
Exchange(FocusChange),
Focus(FocusChange),
MoveSide(MoveDir2D),
Open(OpenTarget<I::WindowId>, Axis, MoveDir1D, Count),
Rotate(MoveDir1D),
Split(OpenTarget<I::WindowId>, Axis, MoveDir1D, Count),
Switch(OpenTarget<I::WindowId>),
ClearSizes,
Resize(FocusChange, Axis, SizeChange),
Write(WindowTarget, Option<String>, WriteFlags),
ZoomToggle,
}
Expand description
Window actions
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Close(WindowTarget, CloseFlags)
Close the WindowTarget windows with CloseFlags options.
Exchange(FocusChange)
Exchange the currently focused window with the window targeted by FocusChange.
Focus(FocusChange)
Change the current focus to the window targeted by FocusChange.
MoveSide(MoveDir2D)
Move the currently focused window to the MoveDir2D side of the screen.
Open(OpenTarget<I::WindowId>, Axis, MoveDir1D, Count)
Open a new window that is n columns along an axis, positioned relative to the current window as indicated by MoveDir1D.
Rotate(MoveDir1D)
Visually rotate the windows in MoveDir2D direction.
Split(OpenTarget<I::WindowId>, Axis, MoveDir1D, Count)
Split the currently focused window n times along an axis, moving the focus in MoveDir1D direction after performing the split.
Switch(OpenTarget<I::WindowId>)
Switch what content the window is currently showing.
If there are no currently open windows in the tab, then this behaves like WindowAction::Open.
ClearSizes
Clear all of the explicitly set window sizes, and instead try to equally distribute available rows and columns.
Resize(FocusChange, Axis, SizeChange)
Resize the window targeted by FocusChange according to SizeChange.
Write(WindowTarget, Option<String>, WriteFlags)
Write the contents of the windows targeted by WindowTarget.
ZoomToggle
Zoom in on the currently focused window so that it takes up the whole screen. If there is already a zoomed-in window, then return to showing all windows.
Trait Implementations§
source§impl<I: Clone + ApplicationInfo> Clone for WindowAction<I>
impl<I: Clone + ApplicationInfo> Clone for WindowAction<I>
source§fn clone(&self) -> WindowAction<I>
fn clone(&self) -> WindowAction<I>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<I: Debug + ApplicationInfo> Debug for WindowAction<I>
impl<I: Debug + ApplicationInfo> Debug for WindowAction<I>
source§impl<I: ApplicationInfo> From<WindowAction<I>> for Action<I>
impl<I: ApplicationInfo> From<WindowAction<I>> for Action<I>
source§fn from(act: WindowAction<I>) -> Self
fn from(act: WindowAction<I>) -> Self
source§impl<I: PartialEq + ApplicationInfo> PartialEq for WindowAction<I>
impl<I: PartialEq + ApplicationInfo> PartialEq for WindowAction<I>
source§fn eq(&self, other: &WindowAction<I>) -> bool
fn eq(&self, other: &WindowAction<I>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<I: Eq + ApplicationInfo> Eq for WindowAction<I>
impl<I: ApplicationInfo> StructuralPartialEq for WindowAction<I>
Auto Trait Implementations§
impl<I> Freeze for WindowAction<I>
impl<I> RefUnwindSafe for WindowAction<I>
impl<I> Send for WindowAction<I>
impl<I> Sync for WindowAction<I>
impl<I> Unpin for WindowAction<I>
impl<I> UnwindSafe for WindowAction<I>
Blanket Implementations§
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.