pub trait ItemHandle: 'static + Send {
Show 34 methods // Required methods fn focus_handle(&self, cx: &WindowContext<'_>) -> FocusHandle; fn subscribe_to_item_events( &self, cx: &mut WindowContext<'_>, handler: Box<dyn Fn(&ItemEvent, &mut WindowContext<'_>) + Send> ) -> Subscription; fn tab_tooltip_text(&self, cx: &AppContext) -> Option<SharedString>; fn tab_description( &self, detail: usize, cx: &AppContext ) -> Option<SharedString>; fn tab_content( &self, detail: Option<usize>, cx: &WindowContext<'_> ) -> AnyElement; fn dragged_tab_content( &self, detail: Option<usize>, cx: &WindowContext<'_> ) -> AnyElement; fn project_path(&self, cx: &AppContext) -> Option<ProjectPath>; fn project_entry_ids( &self, cx: &AppContext ) -> SmallVec<[ProjectEntryId; 3]>; fn project_item_model_ids(&self, cx: &AppContext) -> SmallVec<[EntityId; 3]>; fn for_each_project_item( &self, _: &AppContext, _: &mut dyn FnMut(EntityId, &dyn Item) ); fn is_singleton(&self, cx: &AppContext) -> bool; fn boxed_clone(&self) -> Box<dyn ItemHandle>; fn clone_on_split( &self, workspace_id: WorkspaceId, cx: &mut WindowContext<'_> ) -> Option<Box<dyn ItemHandle>>; fn added_to_pane( &self, workspace: &mut Workspace, pane: View<Pane>, cx: &mut ViewContext<'_, Workspace> ); fn deactivated(&self, cx: &mut WindowContext<'_>); fn workspace_deactivated(&self, cx: &mut WindowContext<'_>); fn navigate(&self, data: Box<dyn Any>, cx: &mut WindowContext<'_>) -> bool; fn item_id(&self) -> EntityId; fn to_any(&self) -> AnyView; fn is_dirty(&self, cx: &AppContext) -> bool; fn has_conflict(&self, cx: &AppContext) -> bool; fn can_save(&self, cx: &AppContext) -> bool; fn save( &self, project: Model<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>; fn save_as( &self, project: Model<Project>, abs_path: PathBuf, cx: &mut WindowContext<'_> ) -> Task<Result<()>>; fn reload( &self, project: Model<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>; fn act_as_type(&self, type_id: TypeId, cx: &AppContext) -> Option<AnyView>; fn to_followable_item_handle( &self, cx: &AppContext ) -> Option<Box<dyn FollowableItemHandle>>; fn on_release( &self, cx: &mut AppContext, callback: Box<dyn FnOnce(&mut AppContext) + Send> ) -> Subscription; fn to_searchable_item_handle( &self, cx: &AppContext ) -> Option<Box<dyn SearchableItemHandle>>; fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation; fn breadcrumbs( &self, theme: &Theme, cx: &AppContext ) -> Option<Vec<BreadcrumbText>>; fn serialized_item_kind(&self) -> Option<&'static str>; fn show_toolbar(&self, cx: &AppContext) -> bool; fn pixel_position_of_cursor(&self, cx: &AppContext) -> Option<Point<Pixels>>;
}

Required Methods§

source

fn focus_handle(&self, cx: &WindowContext<'_>) -> FocusHandle

source

fn subscribe_to_item_events( &self, cx: &mut WindowContext<'_>, handler: Box<dyn Fn(&ItemEvent, &mut WindowContext<'_>) + Send> ) -> Subscription

source

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

source

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

source

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

source

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

source

fn project_path(&self, cx: &AppContext) -> Option<ProjectPath>

source

fn project_entry_ids(&self, cx: &AppContext) -> SmallVec<[ProjectEntryId; 3]>

source

fn project_item_model_ids(&self, cx: &AppContext) -> SmallVec<[EntityId; 3]>

source

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

source

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

source

fn boxed_clone(&self) -> Box<dyn ItemHandle>

source

fn clone_on_split( &self, workspace_id: WorkspaceId, cx: &mut WindowContext<'_> ) -> Option<Box<dyn ItemHandle>>

source

fn added_to_pane( &self, workspace: &mut Workspace, pane: View<Pane>, cx: &mut ViewContext<'_, Workspace> )

source

fn deactivated(&self, cx: &mut WindowContext<'_>)

source

fn workspace_deactivated(&self, cx: &mut WindowContext<'_>)

source

fn navigate(&self, data: Box<dyn Any>, cx: &mut WindowContext<'_>) -> bool

source

fn item_id(&self) -> EntityId

source

fn to_any(&self) -> AnyView

source

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

source

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

source

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

source

fn save( &self, project: Model<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source

fn save_as( &self, project: Model<Project>, abs_path: PathBuf, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source

fn reload( &self, project: Model<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source

fn act_as_type(&self, type_id: TypeId, cx: &AppContext) -> Option<AnyView>

source

fn to_followable_item_handle( &self, cx: &AppContext ) -> Option<Box<dyn FollowableItemHandle>>

source

fn on_release( &self, cx: &mut AppContext, callback: Box<dyn FnOnce(&mut AppContext) + Send> ) -> Subscription

source

fn to_searchable_item_handle( &self, cx: &AppContext ) -> Option<Box<dyn SearchableItemHandle>>

source

fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation

source

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

source

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

source

fn show_toolbar(&self, cx: &AppContext) -> bool

source

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

Implementations§

source§

impl dyn ItemHandle

source

pub fn downcast<V: 'static>(&self) -> Option<View<V>>

source

pub fn act_as<V: 'static>(&self, cx: &AppContext) -> Option<View<V>>

Trait Implementations§

source§

impl Clone for Box<dyn ItemHandle>

source§

fn clone(&self) -> Box<dyn ItemHandle>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more

Implementations on Foreign Types§

source§

impl<T: Item> ItemHandle for View<T>

source§

fn focus_handle(&self, cx: &WindowContext<'_>) -> FocusHandle

source§

fn subscribe_to_item_events( &self, cx: &mut WindowContext<'_>, handler: Box<dyn Fn(&ItemEvent, &mut WindowContext<'_>) + Send> ) -> Subscription

source§

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

source§

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

source§

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

source§

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

source§

fn project_path(&self, cx: &AppContext) -> Option<ProjectPath>

source§

fn project_entry_ids(&self, cx: &AppContext) -> SmallVec<[ProjectEntryId; 3]>

source§

fn project_item_model_ids(&self, cx: &AppContext) -> SmallVec<[EntityId; 3]>

source§

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

source§

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

source§

fn boxed_clone(&self) -> Box<dyn ItemHandle>

source§

fn clone_on_split( &self, workspace_id: WorkspaceId, cx: &mut WindowContext<'_> ) -> Option<Box<dyn ItemHandle>>

source§

fn added_to_pane( &self, workspace: &mut Workspace, pane: View<Pane>, cx: &mut ViewContext<'_, Workspace> )

source§

fn deactivated(&self, cx: &mut WindowContext<'_>)

source§

fn workspace_deactivated(&self, cx: &mut WindowContext<'_>)

source§

fn navigate(&self, data: Box<dyn Any>, cx: &mut WindowContext<'_>) -> bool

source§

fn item_id(&self) -> EntityId

source§

fn to_any(&self) -> AnyView

source§

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

source§

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

source§

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

source§

fn save( &self, project: Model<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source§

fn save_as( &self, project: Model<Project>, abs_path: PathBuf, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source§

fn reload( &self, project: Model<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source§

fn act_as_type<'a>( &'a self, type_id: TypeId, cx: &'a AppContext ) -> Option<AnyView>

source§

fn to_followable_item_handle( &self, cx: &AppContext ) -> Option<Box<dyn FollowableItemHandle>>

source§

fn on_release( &self, cx: &mut AppContext, callback: Box<dyn FnOnce(&mut AppContext) + Send> ) -> Subscription

source§

fn to_searchable_item_handle( &self, cx: &AppContext ) -> Option<Box<dyn SearchableItemHandle>>

source§

fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation

source§

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

source§

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

source§

fn show_toolbar(&self, cx: &AppContext) -> bool

source§

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

Implementors§