pub enum InteractionMode {
Layout {
selected_pane: Option<PaneId>,
},
Focus {
focused_pane: PaneId,
},
}Available on crate feature
master-layout only.Expand description
Interaction mode - either Layout (navigation) or Focus (interaction)
Variants§
Layout
Layout Mode (Command Mode)
- Navigate panes with hjkl
- Select pane (visual highlight only)
- Press Enter to focus selected pane
Focus
Focus Mode (Insert Mode)
- All input goes to focused pane
- Press Ctrl-A to exit to Layout Mode
Implementations§
Source§impl InteractionMode
impl InteractionMode
Sourcepub fn layout_with_selection(pane: PaneId) -> Self
pub fn layout_with_selection(pane: PaneId) -> Self
Create new Layout Mode with pane selected
Sourcepub fn selected_pane(&self) -> Option<PaneId>
pub fn selected_pane(&self) -> Option<PaneId>
Get selected pane if in Layout Mode
Sourcepub fn focused_pane(&self) -> Option<PaneId>
pub fn focused_pane(&self) -> Option<PaneId>
Get focused pane if in Focus Mode
Sourcepub fn enter_focus(&mut self, pane: PaneId)
pub fn enter_focus(&mut self, pane: PaneId)
Transition from Layout to Focus mode
Sourcepub fn exit_focus(&mut self)
pub fn exit_focus(&mut self)
Transition from Focus to Layout mode, selecting the previously focused pane
Sourcepub fn select_pane(&mut self, pane: PaneId)
pub fn select_pane(&mut self, pane: PaneId)
Update selected pane in Layout Mode
Trait Implementations§
Source§impl Clone for InteractionMode
impl Clone for InteractionMode
Source§fn clone(&self) -> InteractionMode
fn clone(&self) -> InteractionMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractionMode
impl Debug for InteractionMode
Source§impl Default for InteractionMode
impl Default for InteractionMode
Source§impl PartialEq for InteractionMode
impl PartialEq for InteractionMode
impl Eq for InteractionMode
impl StructuralPartialEq for InteractionMode
Auto Trait Implementations§
impl Freeze for InteractionMode
impl RefUnwindSafe for InteractionMode
impl Send for InteractionMode
impl Sync for InteractionMode
impl Unpin for InteractionMode
impl UnwindSafe for InteractionMode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more