Struct WindowConfigBuilder

Source
pub struct WindowConfigBuilder { /* private fields */ }
Expand description

Builder for WindowConfig.

Implementations§

Source§

impl WindowConfigBuilder

Source

pub fn anchor(&mut self, value: WindowAnchor) -> &mut Self

Decides which corner of the window to place at (row, col).

Source

pub fn border(&mut self, value: WindowBorder) -> &mut Self

Style of the optional window border.

Source

pub fn col<VALUE: Into<Float>>(&mut self, value: VALUE) -> &mut Self

Column position in units of screen cell width. May be fractional

Source

pub fn external(&mut self, value: bool) -> &mut Self

Whether an attached GUI should display the window as an external top-level window.

Source

pub fn focusable(&mut self, value: bool) -> &mut Self

Enable focus by user actions like mouse events. Non-focusable windows can be entered by set_current_win.

Source

pub fn height(&mut self, value: u32) -> &mut Self

Window height in character cells. Minimum of 1.

Source

pub fn noautocmd(&mut self, value: bool) -> &mut Self

If true then no buffer-related autocommand events such as BufEnter or BufLeave are fired when calling open_win.

Source

pub fn relative(&mut self, value: WindowRelativeTo) -> &mut Self

What the window is positioned relative to.

Source

pub fn row<VALUE: Into<Float>>(&mut self, value: VALUE) -> &mut Self

Row position in units of screen cell height. May be fractional.

Source

pub fn style(&mut self, value: WindowStyle) -> &mut Self

Configures the appearance of the window.

Source

pub fn width(&mut self, value: u32) -> &mut Self

Window width in character cells. Minimum of 1.

Source

pub fn zindex(&mut self, value: u32) -> &mut Self

Stacking order. Windows with higher zindex go in front of windows with lower indices.

Source§

impl WindowConfigBuilder

Source

pub fn bufpos(&mut self, line: usize, column: usize) -> &mut Self

Places window relative to buffer text (only when relative is set to WindowRelativeTo::Window(win)). Takes a zero indexed (line, column) tuple, with row and col being placed relative to this position if specified.

Source

pub fn build(&mut self) -> WindowConfig

Trait Implementations§

Source§

impl Clone for WindowConfigBuilder

Source§

fn clone(&self) -> WindowConfigBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for WindowConfigBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.