pub struct Tiles { /* private fields */ }
Expand description
Tiles is a canvas that can contain multiple panels, each of which can be dragged and resized.
Implementations§
Source§impl Tiles
impl Tiles
pub fn new(_: &mut Window, cx: &mut Context<'_, Self>) -> Self
pub fn panels(&self) -> &[TileItem]
Sourcepub fn remove(
&mut self,
panel: Arc<dyn PanelView>,
_: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn remove( &mut self, panel: Arc<dyn PanelView>, _: &mut Window, cx: &mut Context<'_, Self>, )
Remove panel from the children.
pub fn add_item( &mut self, item: TileItem, dock_area: &WeakEntity<DockArea>, window: &mut Window, cx: &mut Context<'_, Self>, )
Trait Implementations§
Source§impl Focusable for Tiles
impl Focusable for Tiles
Source§fn focus_handle(&self, _cx: &App) -> FocusHandle
fn focus_handle(&self, _cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Panel for Tiles
impl Panel for Tiles
Source§fn panel_name(&self) -> &'static str
fn panel_name(&self) -> &'static str
The name of the panel used to serialize, deserialize and identify the panel. Read more
Source§fn dump(&self, cx: &App) -> PanelState
fn dump(&self, cx: &App) -> PanelState
Dump the panel, used to serialize the panel.
Source§fn tab_name(&self, cx: &App) -> Option<SharedString>
fn tab_name(&self, cx: &App) -> Option<SharedString>
The name of the tab of the panel, default is
None
. Read moreSource§fn title_style(&self, cx: &App) -> Option<TitleStyle>
fn title_style(&self, cx: &App) -> Option<TitleStyle>
The theme of the panel title, default is
None
.Source§fn title_suffix(&self, window: &mut Window, cx: &mut App) -> Option<AnyElement>
fn title_suffix(&self, window: &mut Window, cx: &mut App) -> Option<AnyElement>
The suffix of the panel title, default is
None
. Read moreSource§fn closable(&self, cx: &App) -> bool
fn closable(&self, cx: &App) -> bool
Whether the panel can be closed, default is
true
. Read moreSource§fn visible(&self, cx: &App) -> bool
fn visible(&self, cx: &App) -> bool
Return false to hide panel, true to show panel, default is
true
. Read moreSource§fn set_active(&mut self, active: bool, window: &mut Window, cx: &mut App)
fn set_active(&mut self, active: bool, window: &mut Window, cx: &mut App)
Set active state of the panel. Read more
Source§fn set_zoomed(&mut self, zoomed: bool, window: &mut Window, cx: &mut App)
fn set_zoomed(&mut self, zoomed: bool, window: &mut Window, cx: &mut App)
Set zoomed state of the panel. Read more
The addition popup menu of the panel, default is
None
.The addition toolbar buttons of the panel used to show in the right of the title bar, default is
None
.Source§fn inner_padding(&self, cx: &App) -> bool
fn inner_padding(&self, cx: &App) -> bool
Whether the panel has inner padding when the panel is in the tabs layout, default is
true
.impl EventEmitter<DismissEvent> for Tiles
impl EventEmitter<DragDrop> for Tiles
impl EventEmitter<PanelEvent> for Tiles
Auto Trait Implementations§
impl Freeze for Tiles
impl !RefUnwindSafe for Tiles
impl !Send for Tiles
impl !Sync for Tiles
impl Unpin for Tiles
impl !UnwindSafe for Tiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more