Trait workspace::item::Item

source ·
pub trait Item: View {
Show 28 methods // Required method fn tab_content<V: 'static>( &self, detail: Option<usize>, style: &Tab, cx: &AppContext ) -> AnyElement<V>; // Provided methods fn deactivated(&mut self, _: &mut ViewContext<'_, '_, Self>) { ... } fn workspace_deactivated(&mut self, _: &mut ViewContext<'_, '_, Self>) { ... } fn navigate( &mut self, _: Box<dyn Any>, _: &mut ViewContext<'_, '_, Self> ) -> bool { ... } fn tab_tooltip_text(&self, _: &AppContext) -> Option<Cow<'_, str>> { ... } fn tab_description<'a>( &'a self, _: usize, _: &'a AppContext ) -> Option<Cow<'_, str>> { ... } fn for_each_project_item( &self, _: &AppContext, _: &mut dyn FnMut(usize, &dyn Item) ) { ... } fn is_singleton(&self, _cx: &AppContext) -> bool { ... } fn set_nav_history( &mut self, _: ItemNavHistory, _: &mut ViewContext<'_, '_, Self> ) { ... } fn clone_on_split( &self, _workspace_id: WorkspaceId, _: &mut ViewContext<'_, '_, Self> ) -> Option<Self> where Self: Sized { ... } fn is_dirty(&self, _: &AppContext) -> bool { ... } fn has_conflict(&self, _: &AppContext) -> bool { ... } fn can_save(&self, _cx: &AppContext) -> bool { ... } fn save( &mut self, _project: ModelHandle<Project>, _cx: &mut ViewContext<'_, '_, Self> ) -> Task<Result<()>> { ... } fn save_as( &mut self, _project: ModelHandle<Project>, _abs_path: PathBuf, _cx: &mut ViewContext<'_, '_, Self> ) -> Task<Result<()>> { ... } fn reload( &mut self, _project: ModelHandle<Project>, _cx: &mut ViewContext<'_, '_, Self> ) -> Task<Result<()>> { ... } fn to_item_events(_event: &Self::Event) -> SmallVec<[ItemEvent; 2]> { ... } fn should_close_item_on_event(_: &Self::Event) -> bool { ... } fn should_update_tab_on_event(_: &Self::Event) -> bool { ... } fn act_as_type<'a>( &'a self, type_id: TypeId, self_handle: &'a ViewHandle<Self>, _: &'a AppContext ) -> Option<&AnyViewHandle> { ... } fn as_searchable( &self, _: &ViewHandle<Self> ) -> Option<Box<dyn SearchableItemHandle>> { ... } fn breadcrumb_location(&self) -> ToolbarItemLocation { ... } fn breadcrumbs( &self, _theme: &Theme, _cx: &AppContext ) -> Option<Vec<BreadcrumbText>> { ... } fn added_to_workspace( &mut self, _workspace: &mut Workspace, _cx: &mut ViewContext<'_, '_, Self> ) { ... } fn serialized_item_kind() -> Option<&'static str> { ... } fn deserialize( _project: ModelHandle<Project>, _workspace: WeakViewHandle<Workspace>, _workspace_id: WorkspaceId, _item_id: ItemId, _cx: &mut ViewContext<'_, '_, Pane> ) -> Task<Result<ViewHandle<Self>>> { ... } fn show_toolbar(&self) -> bool { ... } fn pixel_position_of_cursor(&self, _: &AppContext) -> Option<Vector2F> { ... }
}

Required Methods§

source

fn tab_content<V: 'static>( &self, detail: Option<usize>, style: &Tab, cx: &AppContext ) -> AnyElement<V>

Provided Methods§

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>, _: &mut ViewContext<'_, '_, Self> ) -> bool

source

fn tab_tooltip_text(&self, _: &AppContext) -> Option<Cow<'_, str>>

source

fn tab_description<'a>( &'a self, _: usize, _: &'a AppContext ) -> Option<Cow<'_, str>>

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

fn to_item_events(_event: &Self::Event) -> SmallVec<[ItemEvent; 2]>

source

fn should_close_item_on_event(_: &Self::Event) -> bool

source

fn should_update_tab_on_event(_: &Self::Event) -> bool

source

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

source

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

source

fn breadcrumb_location(&self) -> ToolbarItemLocation

source

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

source

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

source

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

source

fn deserialize( _project: ModelHandle<Project>, _workspace: WeakViewHandle<Workspace>, _workspace_id: WorkspaceId, _item_id: ItemId, _cx: &mut ViewContext<'_, '_, Pane> ) -> Task<Result<ViewHandle<Self>>>

source

fn show_toolbar(&self) -> bool

source

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

Implementors§