pub struct TerminalScreenBuffer {
pub content: Vec<Vec<TerminalCell>>,
pub scrollback: Vec<Vec<TerminalCell>>,
pub cursor: CursorState,
pub saved_cursor: Option<CursorState>,
pub scroll_position: usize,
pub max_scrollback: usize,
pub width: usize,
pub height: usize,
pub line_attributes: Vec<LineAttribute>,
pub scrollback_line_attributes: Vec<LineAttribute>,
}Fields§
§content: Vec<Vec<TerminalCell>>§scrollback: Vec<Vec<TerminalCell>>§cursor: CursorState§saved_cursor: Option<CursorState>§scroll_position: usize§max_scrollback: usize§width: usize§height: usize§line_attributes: Vec<LineAttribute>§scrollback_line_attributes: Vec<LineAttribute>Implementations§
Source§impl TerminalScreenBuffer
impl TerminalScreenBuffer
pub fn new(width: usize, height: usize, max_scrollback: usize) -> Self
pub fn scroll_up_one_line(&mut self)
pub fn scroll_down_one_line(&mut self)
pub fn get_visible_content(&self) -> &Vec<Vec<TerminalCell>>
pub fn get_line_mut(&mut self, y: usize) -> Option<&mut Vec<TerminalCell>>
pub fn clear_screen(&mut self)
pub fn clear_from_cursor_to_end(&mut self)
pub fn clear_from_beginning_to_cursor(&mut self)
pub fn insert_lines(&mut self, count: usize)
pub fn delete_lines(&mut self, count: usize)
pub fn resize(&mut self, new_width: usize, new_height: usize)
Sourcepub fn to_content_lines(&self, include_scrollback: bool) -> Vec<String>
pub fn to_content_lines(&self, include_scrollback: bool) -> Vec<String>
Convert TerminalScreenBuffer to content lines for stream integration This feeds PTY content into BoxMux’s main differential drawing system
Sourcepub fn get_content_for_stream(&self) -> String
pub fn get_content_for_stream(&self) -> String
Get content as string for stream updates - integrates with BoxMux stream system
Trait Implementations§
Source§impl Clone for TerminalScreenBuffer
impl Clone for TerminalScreenBuffer
Auto Trait Implementations§
impl Forget for TerminalScreenBuffer
impl Freeze for TerminalScreenBuffer
impl Move for TerminalScreenBuffer
impl RefUnwindSafe for TerminalScreenBuffer
impl Send for TerminalScreenBuffer
impl Sync for TerminalScreenBuffer
impl Unpin for TerminalScreenBuffer
impl UnsafeUnpin for TerminalScreenBuffer
impl UnwindSafe for TerminalScreenBuffer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.