Add focusable view and restore workspace deserialization. Partially restore split and tab functions
This commit is contained in:
parent
e905ababcd
commit
78cea69172
14 changed files with 173 additions and 110 deletions
|
@ -1,7 +1,7 @@
|
|||
use crate::{
|
||||
private::Sealed, AnyBox, AnyElement, AnyModel, AnyWeakModel, AppContext, AvailableSpace,
|
||||
Bounds, Component, Element, ElementId, Entity, EntityId, Flatten, LayoutId, Model, Pixels,
|
||||
Size, ViewContext, VisualContext, WeakModel, WindowContext,
|
||||
Bounds, Component, Element, ElementId, Entity, EntityId, Flatten, FocusHandle, FocusableView,
|
||||
LayoutId, Model, Pixels, Size, ViewContext, VisualContext, WeakModel, WindowContext,
|
||||
};
|
||||
use anyhow::{Context, Result};
|
||||
use std::{
|
||||
|
@ -73,6 +73,13 @@ impl<V: 'static> View<V> {
|
|||
component: Some(component),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn focus_handle(&self, cx: &AppContext) -> FocusHandle
|
||||
where
|
||||
V: FocusableView,
|
||||
{
|
||||
self.read(cx).focus_handle(cx)
|
||||
}
|
||||
}
|
||||
|
||||
impl<V> Clone for View<V> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue