pub struct TerminalView { /* private fields */ }
Expand description

A terminal view, maintains the PTY’s file handles and communicates with the terminal

Implementations§

source§

impl TerminalView

source

pub fn deploy( workspace: &mut Workspace, _: &NewCenterTerminal, cx: &mut ViewContext<'_, Workspace> )

Create a new Terminal in the current working directory or the user’s home directory

source

pub fn new( terminal: Model<Terminal>, workspace: WeakView<Workspace>, workspace_id: WorkspaceId, cx: &mut ViewContext<'_, Self> ) -> Self

source

pub fn model(&self) -> &Model<Terminal>

source

pub fn has_new_content(&self) -> bool

source

pub fn has_bell(&self) -> bool

source

pub fn clear_bel(&mut self, cx: &mut ViewContext<'_, TerminalView>)

source

pub fn deploy_context_menu( &mut self, position: Point<Pixels>, cx: &mut ViewContext<'_, Self> )

source

pub fn should_show_cursor( &self, focused: bool, cx: &mut ViewContext<'_, Self> ) -> bool

source

pub fn pause_cursor_blinking(&mut self, cx: &mut ViewContext<'_, Self>)

source

pub fn find_matches( &mut self, query: Arc<SearchQuery>, cx: &mut ViewContext<'_, Self> ) -> Task<Vec<RangeInclusive<Point>>>

source

pub fn terminal(&self) -> &Model<Terminal>

Trait Implementations§

source§

impl FocusableView for TerminalView

source§

impl InputHandler for TerminalView

source§

fn text_for_range( &mut self, range: Range<usize>, cx: &mut ViewContext<'_, Self> ) -> Option<String>

source§

fn selected_text_range( &mut self, cx: &mut ViewContext<'_, Self> ) -> Option<Range<usize>>

source§

fn marked_text_range( &self, cx: &mut ViewContext<'_, Self> ) -> Option<Range<usize>>

source§

fn unmark_text(&mut self, cx: &mut ViewContext<'_, Self>)

source§

fn replace_text_in_range( &mut self, _: Option<Range<usize>>, text: &str, cx: &mut ViewContext<'_, Self> )

source§

fn replace_and_mark_text_in_range( &mut self, range: Option<Range<usize>>, new_text: &str, new_selected_range: Option<Range<usize>>, cx: &mut ViewContext<'_, Self> )

source§

fn bounds_for_range( &mut self, range_utf16: Range<usize>, element_bounds: Bounds<Pixels>, cx: &mut ViewContext<'_, Self> ) -> Option<Bounds<Pixels>>

source§

impl Item for TerminalView

source§

fn tab_tooltip_text(&self, cx: &AppContext) -> Option<SharedString>

source§

fn tab_content( &self, _detail: Option<usize>, cx: &WindowContext<'_> ) -> AnyElement

source§

fn clone_on_split( &self, _workspace_id: WorkspaceId, _cx: &mut ViewContext<'_, Self> ) -> Option<View<Self>>

source§

fn is_dirty(&self, _cx: &AppContext) -> bool

source§

fn has_conflict(&self, _cx: &AppContext) -> bool

source§

fn breadcrumb_location(&self) -> ToolbarItemLocation

source§

fn breadcrumbs(&self, _: &Theme, cx: &AppContext) -> Option<Vec<BreadcrumbText>>

source§

fn serialized_item_kind() -> Option<&'static str>

source§

fn deserialize( project: Model<Project>, workspace: WeakView<Workspace>, workspace_id: WorkspaceId, item_id: ItemId, cx: &mut ViewContext<'_, Pane> ) -> Task<Result<View<Self>>>

source§

fn added_to_workspace( &mut self, workspace: &mut Workspace, cx: &mut ViewContext<'_, Self> )

source§

fn deactivated(&mut self, _: &mut ViewContext<'_, Self>)

source§

fn workspace_deactivated(&mut self, _: &mut ViewContext<'_, Self>)

source§

fn navigate( &mut self, _: Box<dyn Any, Global>, _: &mut ViewContext<'_, Self> ) -> bool

source§

fn tab_description(&self, _: usize, _: &AppContext) -> Option<SharedString>

source§

fn for_each_project_item( &self, _: &AppContext, _: &mut dyn FnMut(EntityId, &dyn Item) )

(model id, Item)
source§

fn is_singleton(&self, _cx: &AppContext) -> bool

source§

fn set_nav_history(&mut self, _: ItemNavHistory, _: &mut ViewContext<'_, Self>)

source§

fn can_save(&self, _cx: &AppContext) -> bool

source§

fn save( &mut self, _project: Model<Project>, _cx: &mut ViewContext<'_, Self> ) -> Task<Result<(), Error>>

source§

fn save_as( &mut self, _project: Model<Project>, _abs_path: PathBuf, _cx: &mut ViewContext<'_, Self> ) -> Task<Result<(), Error>>

source§

fn reload( &mut self, _project: Model<Project>, _cx: &mut ViewContext<'_, Self> ) -> Task<Result<(), Error>>

source§

fn act_as_type<'a>( &'a self, type_id: TypeId, self_handle: &'a View<Self>, _: &'a AppContext ) -> Option<AnyView>

source§

fn as_searchable( &self, _: &View<Self> ) -> Option<Box<dyn SearchableItemHandle, Global>>

source§

fn show_toolbar(&self) -> bool

source§

fn pixel_position_of_cursor(&self, _: &AppContext) -> Option<Point<Pixels>>

source§

impl Render for TerminalView

§

type Element = Focusable<Div>

source§

fn render(&mut self, cx: &mut ViewContext<'_, Self>) -> Self::Element

source§

impl SearchableItem for TerminalView

source§

fn clear_matches(&mut self, cx: &mut ViewContext<'_, Self>)

Clear stored matches

source§

fn update_matches( &mut self, matches: Vec<Self::Match>, cx: &mut ViewContext<'_, Self> )

Store matches returned from find_matches somewhere for rendering

source§

fn query_suggestion(&mut self, cx: &mut ViewContext<'_, Self>) -> String

Return the selection content to pre-load into this search

source§

fn activate_match( &mut self, index: usize, _: Vec<Self::Match>, cx: &mut ViewContext<'_, Self> )

Focus match at given index into the Vec of matches

source§

fn select_matches( &mut self, matches: Vec<Self::Match>, cx: &mut ViewContext<'_, Self> )

Add selections for all matches given.

source§

fn find_matches( &mut self, query: Arc<SearchQuery>, cx: &mut ViewContext<'_, Self> ) -> Task<Vec<Self::Match>>

Get all of the matches for this query, should be done on the background

source§

fn active_match_index( &mut self, matches: Vec<Self::Match>, cx: &mut ViewContext<'_, Self> ) -> Option<usize>

Reports back to the search toolbar what the active match should be (the selection)

§

type Match = RangeInclusive<Point<Line, Column>>

source§

fn supported_options() -> SearchOptions

source§

fn replace( &mut self, _: &Self::Match, _: &SearchQuery, _: &mut ViewContext<'_, Self> )

source§

fn match_index_for_direction( &mut self, matches: &Vec<Self::Match, Global>, current_index: usize, direction: Direction, count: usize, _: &mut ViewContext<'_, Self> ) -> usize

source§

impl EventEmitter<Event> for TerminalView

source§

impl EventEmitter<ItemEvent> for TerminalView

source§

impl EventEmitter<SearchEvent> for TerminalView

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

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 Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.
§

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

§

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
§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,