Struct zellij_server::panes::TerminalPane

source ·
pub struct TerminalPane {
    pub grid: Grid,
    pub pid: u32,
    pub selectable: bool,
    pub geom: PaneGeom,
    pub geom_override: Option<PaneGeom>,
    pub active_at: Instant,
    pub style: Style,
    /* private fields */
}

Fields§

§grid: Grid§pid: u32§selectable: bool§geom: PaneGeom§geom_override: Option<PaneGeom>§active_at: Instant§style: Style

Implementations§

source§

impl TerminalPane

source

pub fn new( pid: u32, position_and_size: PaneGeom, style: Style, pane_index: usize, pane_name: String, link_handler: Rc<RefCell<LinkHandler>>, character_cell_size: Rc<RefCell<Option<SizeInPixels>>>, sixel_image_store: Rc<RefCell<SixelImageStore>>, terminal_emulator_colors: Rc<RefCell<Palette>>, terminal_emulator_color_codes: Rc<RefCell<HashMap<usize, String>>>, initial_pane_title: Option<String>, invoked_with: Option<Run>, debug: bool, arrow_fonts: bool, styled_underlines: bool ) -> TerminalPane

source

pub fn get_x(&self) -> usize

source

pub fn get_y(&self) -> usize

source

pub fn get_columns(&self) -> usize

source

pub fn get_rows(&self) -> usize

source

pub fn read_buffer_as_lines(&self) -> Vec<Vec<TerminalCharacter>>

source

pub fn cursor_coordinates(&self) -> Option<(usize, usize)>

Trait Implementations§

source§

impl Pane for TerminalPane

source§

fn x(&self) -> usize

source§

fn y(&self) -> usize

source§

fn rows(&self) -> usize

source§

fn cols(&self) -> usize

source§

fn get_content_x(&self) -> usize

source§

fn get_content_y(&self) -> usize

source§

fn get_content_columns(&self) -> usize

source§

fn get_content_rows(&self) -> usize

source§

fn reset_size_and_position_override(&mut self)

source§

fn set_geom(&mut self, position_and_size: PaneGeom)

source§

fn set_geom_override(&mut self, pane_geom: PaneGeom)

source§

fn handle_pty_bytes(&mut self, bytes: Vec<u8>)

source§

fn cursor_coordinates(&self) -> Option<(usize, usize)>

source§

fn adjust_input_to_terminal( &mut self, input_bytes: Vec<u8> ) -> Option<AdjustedInput>

source§

fn position_and_size(&self) -> PaneGeom

source§

fn current_geom(&self) -> PaneGeom

source§

fn geom_override(&self) -> Option<PaneGeom>

source§

fn should_render(&self) -> bool

source§

fn set_should_render(&mut self, should_render: bool)

source§

fn render_full_viewport(&mut self)

source§

fn selectable(&self) -> bool

source§

fn set_selectable(&mut self, selectable: bool)

source§

fn render( &mut self, _client_id: Option<ClientId> ) -> Result<Option<(Vec<CharacterChunk>, Option<String>, Vec<SixelImageChunk>)>>

source§

fn render_frame( &mut self, client_id: ClientId, frame_params: FrameParams, input_mode: InputMode ) -> Result<Option<(Vec<CharacterChunk>, Option<String>)>>

source§

fn render_fake_cursor( &mut self, cursor_color: PaletteColor, text_color: PaletteColor ) -> Option<String>

source§

fn render_terminal_title(&mut self, input_mode: InputMode) -> String

source§

fn update_name(&mut self, name: &str)

source§

fn pid(&self) -> PaneId

source§

fn reduce_height(&mut self, percent: f64)

source§

fn increase_height(&mut self, percent: f64)

source§

fn reduce_width(&mut self, percent: f64)

source§

fn increase_width(&mut self, percent: f64)

source§

fn push_down(&mut self, count: usize)

source§

fn push_right(&mut self, count: usize)

source§

fn pull_left(&mut self, count: usize)

source§

fn pull_up(&mut self, count: usize)

source§

fn dump_screen(&mut self, _client_id: ClientId, full: bool) -> String

source§

fn clear_screen(&mut self)

source§

fn scroll_up(&mut self, count: usize, _client_id: ClientId)

source§

fn scroll_down(&mut self, count: usize, _client_id: ClientId)

source§

fn clear_scroll(&mut self)

source§

fn is_scrolled(&self) -> bool

source§

fn active_at(&self) -> Instant

source§

fn set_active_at(&mut self, time: Instant)

source§

fn cursor_shape_csi(&self) -> String

source§

fn drain_messages_to_pty(&mut self) -> Vec<Vec<u8>>

source§

fn drain_clipboard_update(&mut self) -> Option<String>

source§

fn start_selection(&mut self, start: &Position, _client_id: ClientId)

source§

fn update_selection(&mut self, to: &Position, _client_id: ClientId)

source§

fn end_selection(&mut self, end: &Position, _client_id: ClientId)

source§

fn reset_selection(&mut self)

source§

fn get_selected_text(&self) -> Option<String>

source§

fn set_frame(&mut self, _frame: bool)

source§

fn set_content_offset(&mut self, offset: Offset)

source§

fn store_pane_name(&mut self)

source§

fn load_pane_name(&mut self)

source§

fn set_borderless(&mut self, borderless: bool)

source§

fn borderless(&self) -> bool

source§

fn set_exclude_from_sync(&mut self, exclude_from_sync: bool)

source§

fn exclude_from_sync(&self) -> bool

source§

fn mouse_left_click(&self, position: &Position, is_held: bool) -> Option<String>

source§

fn mouse_left_click_release(&self, position: &Position) -> Option<String>

source§

fn mouse_right_click( &self, position: &Position, is_held: bool ) -> Option<String>

source§

fn mouse_right_click_release(&self, position: &Position) -> Option<String>

source§

fn mouse_middle_click( &self, position: &Position, is_held: bool ) -> Option<String>

source§

fn mouse_middle_click_release(&self, position: &Position) -> Option<String>

source§

fn mouse_scroll_up(&self, position: &Position) -> Option<String>

source§

fn mouse_scroll_down(&self, position: &Position) -> Option<String>

source§

fn focus_event(&self) -> Option<String>

source§

fn unfocus_event(&self) -> Option<String>

source§

fn get_line_number(&self) -> Option<usize>

source§

fn update_search_term(&mut self, needle: &str)

source§

fn search_down(&mut self)

source§

fn search_up(&mut self)

source§

fn toggle_search_case_sensitivity(&mut self)

source§

fn toggle_search_whole_words(&mut self)

source§

fn toggle_search_wrap(&mut self)

source§

fn is_alternate_mode_active(&self) -> bool

source§

fn hold( &mut self, exit_status: Option<i32>, is_first_run: bool, run_command: RunCommand )

source§

fn add_red_pane_frame_color_override(&mut self, error_text: Option<String>)

source§

fn clear_pane_frame_color_override(&mut self)

source§

fn frame_color_override(&self) -> Option<PaletteColor>

source§

fn invoked_with(&self) -> &Option<Run>

source§

fn set_title(&mut self, title: String)

source§

fn current_title(&self) -> String

source§

fn custom_title(&self) -> Option<String>

source§

fn exit_status(&self) -> Option<i32>

source§

fn is_held(&self) -> bool

source§

fn exited(&self) -> bool

source§

fn rename(&mut self, buf: Vec<u8>)

source§

fn serialize( &self, scrollback_lines_to_serialize: Option<usize> ) -> Option<String>

source§

fn handle_plugin_bytes(&mut self, _client_id: ClientId, _bytes: Vec<u8>)

source§

fn set_should_render_boundaries(&mut self, _should_render: bool)

source§

fn request_permissions_from_user( &mut self, _permissions: Option<PluginPermission> )

source§

fn contains(&self, position: &Position) -> bool

source§

fn right_boundary_x_coords(&self) -> usize

source§

fn bottom_boundary_y_coords(&self) -> usize

source§

fn is_right_of(&self, other: &dyn Pane) -> bool

source§

fn is_directly_right_of(&self, other: &dyn Pane) -> bool

source§

fn is_left_of(&self, other: &dyn Pane) -> bool

source§

fn is_directly_left_of(&self, other: &dyn Pane) -> bool

source§

fn is_below(&self, other: &dyn Pane) -> bool

source§

fn is_directly_below(&self, other: &dyn Pane) -> bool

source§

fn is_above(&self, other: &dyn Pane) -> bool

source§

fn is_directly_above(&self, other: &dyn Pane) -> bool

source§

fn horizontally_overlaps_with(&self, other: &dyn Pane) -> bool

source§

fn get_horizontal_overlap_with(&self, other: &dyn Pane) -> usize

source§

fn vertically_overlaps_with(&self, other: &dyn Pane) -> bool

source§

fn get_vertical_overlap_with(&self, other: &dyn Pane) -> usize

source§

fn can_reduce_height_by(&self, reduce_by: usize) -> bool

source§

fn can_reduce_width_by(&self, reduce_by: usize) -> bool

source§

fn min_width(&self) -> usize

source§

fn min_height(&self) -> usize

source§

fn relative_position(&self, position_on_screen: &Position) -> Position

source§

fn position_is_on_frame(&self, position: &Position) -> bool

source§

fn handle_right_click(&mut self, _to: &Position, _client_id: ClientId)

source§

fn update_loading_indication(&mut self, _loading_indication: LoadingIndication)

source§

fn start_loading_indication(&mut self, _loading_indication: LoadingIndication)

source§

fn progress_animation_offset(&mut self)

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> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<D> OwoColorize for D

source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
source§

fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>

Change the foreground color to black
source§

fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>

Change the background color to black
source§

fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>

Change the foreground color to red
source§

fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>

Change the background color to red
source§

fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>

Change the foreground color to green
source§

fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>

Change the background color to green
source§

fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>

Change the foreground color to yellow
source§

fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>

Change the background color to yellow
source§

fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>

Change the foreground color to blue
source§

fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>

Change the background color to blue
source§

fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to magenta
source§

fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to magenta
source§

fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to purple
source§

fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to purple
source§

fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>

Change the foreground color to cyan
source§

fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>

Change the background color to cyan
source§

fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>

Change the foreground color to white
source§

fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>

Change the background color to white
source§

fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>

Change the foreground color to the terminal default
source§

fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>

Change the background color to the terminal default
source§

fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>

Change the foreground color to bright black
source§

fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>

Change the background color to bright black
source§

fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>

Change the foreground color to bright red
source§

fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>

Change the background color to bright red
source§

fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>

Change the foreground color to bright green
source§

fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>

Change the background color to bright green
source§

fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>

Change the foreground color to bright yellow
source§

fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>

Change the background color to bright yellow
source§

fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>

Change the foreground color to bright blue
source§

fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>

Change the background color to bright blue
source§

fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright magenta
source§

fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright magenta
source§

fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright purple
source§

fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright purple
source§

fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>

Change the foreground color to bright cyan
source§

fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>

Change the background color to bright cyan
source§

fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>

Change the foreground color to bright white
source§

fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>

Change the background color to bright white
source§

fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>

Make the text bold
source§

fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>

Make the text dim
source§

fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>

Make the text italicized
source§

fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>

Make the text italicized
Make the text blink
Make the text blink (but fast!)
source§

fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>

Swap the foreground and background colors
source§

fn hidden<'a>(&'a self) -> HiddenDisplay<'a, Self>

Hide the text
source§

fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>

Cross out the text
source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

source§

fn to<T>(self) -> T
where Self: Into<T>,

Converts to T by calling Into<T>::into.
source§

fn try_to<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

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

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> UnsafeAny for T
where T: Any,