pub struct Layout {
pub statusline: bool,
pub tabbar: bool,
/* private fields */
}Fields§
§statusline: bool§tabbar: boolImplementations§
Source§impl Layout
impl Layout
pub fn single(window: Window) -> Self
pub const fn active(&self) -> WindowId
Sourcepub fn focus(&mut self, id: WindowId) -> bool
pub fn focus(&mut self, id: WindowId) -> bool
Focus id if it is in the tree. Returns whether it moved.
Sourcepub fn set_frame(&mut self, frame: Rect)
pub fn set_frame(&mut self, frame: Rect)
Tell the layout how big its frame is. A face calls this; nothing else stores a size.
pub const fn frame(&self) -> Rect
Sourcepub const fn tree(&self) -> &Shikiri
pub const fn tree(&self) -> &Shikiri
The container tree, for a face that wants to solve against its own area rather than the last reported frame.
Sourcepub fn windows_mut(&mut self) -> Vec<&mut Window>
pub fn windows_mut(&mut self) -> Vec<&mut Window>
Every window, mutably. Used to push per-pane viewport sizes down.
pub fn active_window(&self) -> Option<&Window>
pub fn active_window_mut(&mut self) -> Option<&mut Window>
pub fn count(&self) -> usize
Sourcepub fn split_active(&mut self, axis: Axis) -> WindowId
pub fn split_active(&mut self, axis: Axis) -> WindowId
Split the ACTIVE window along axis, showing the same buffer.
The new window is focused and returned. vim’s default is
splitbelow/splitright OFF, so the NEW window goes above (:sp) or
left (:vsp) — it becomes the FIRST child. Scroll position is copied,
so both panes start showing the same thing, which is what makes :sp
feel like “look at this file in two places” rather than a jump.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Layout
impl<'de> Deserialize<'de> for Layout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Layout
Source§impl JsonSchema for Layout
impl JsonSchema for Layout
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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