pub trait ItemHandle: 'static + Debug {
Show 34 methods // Required methods fn subscribe_to_item_events( &self, cx: &mut WindowContext<'_>, handler: Box<dyn Fn(ItemEvent, &mut WindowContext<'_>)> ) -> Subscription; fn tab_tooltip_text<'a>(&self, cx: &'a AppContext) -> Option<Cow<'a, str>>; fn tab_description<'a>( &'a self, detail: usize, cx: &'a AppContext ) -> Option<Cow<'a, str>>; fn tab_content( &self, detail: Option<usize>, style: &Tab, cx: &AppContext ) -> AnyElement<Pane>; fn dragged_tab_content( &self, detail: Option<usize>, style: &Tab, cx: &AppContext ) -> AnyElement<Workspace>; 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<[usize; 3]>; fn for_each_project_item( &self, _: &AppContext, _: &mut dyn FnMut(usize, &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: ViewHandle<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 id(&self) -> usize; fn window(&self) -> AnyWindowHandle; fn as_any(&self) -> &AnyViewHandle; 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: ModelHandle<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>; fn save_as( &self, project: ModelHandle<Project>, abs_path: PathBuf, cx: &mut WindowContext<'_> ) -> Task<Result<()>>; fn reload( &self, project: ModelHandle<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>; fn act_as_type<'a>( &'a self, type_id: TypeId, cx: &'a AppContext ) -> Option<&'a AnyViewHandle>; 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)> ) -> 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<Vector2F>;
}

Required Methods§

source

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

source

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

source

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

source

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

source

fn dragged_tab_content( &self, detail: Option<usize>, style: &Tab, cx: &AppContext ) -> AnyElement<Workspace>

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<[usize; 3]>

source

fn for_each_project_item( &self, _: &AppContext, _: &mut dyn FnMut(usize, &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: ViewHandle<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 id(&self) -> usize

source

fn window(&self) -> AnyWindowHandle

source

fn as_any(&self) -> &AnyViewHandle

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: ModelHandle<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source

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

source

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

source

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

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)> ) -> 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<Vector2F>

Implementations§

source§

impl dyn ItemHandle

source

pub fn downcast<T: View>(&self) -> Option<ViewHandle<T>>

source

pub fn act_as<T: View>(&self, cx: &AppContext) -> Option<ViewHandle<T>>

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 ViewHandle<T>

source§

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

source§

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

source§

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

source§

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

source§

fn dragged_tab_content( &self, detail: Option<usize>, style: &Tab, cx: &AppContext ) -> AnyElement<Workspace>

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<[usize; 3]>

source§

fn for_each_project_item( &self, cx: &AppContext, f: &mut dyn FnMut(usize, &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: ViewHandle<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 id(&self) -> usize

source§

fn window(&self) -> AnyWindowHandle

source§

fn as_any(&self) -> &AnyViewHandle

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: ModelHandle<Project>, cx: &mut WindowContext<'_> ) -> Task<Result<()>>

source§

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

source§

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

source§

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

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)> ) -> 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<Vector2F>

Implementors§