Struct TabStripProps
pub struct TabStripProps {
pub key: String,
pub tabs: Vec<TabItemProps>,
pub active: Option<ResourceId>,
pub focused: bool,
pub activate: Event,
pub close: Event,
pub reorder: Event,
pub detach: Event,
}Expand description
A frame’s tabs, in one row above its content: the shell’s tab strip.
The chosen tab stands lifted off the strip’s ground, and every pill says who is at its resource now. Choosing a pill activates that tab; a pill’s close chip closes it; dragging one within the strip reorders it, and letting one go outside the strip hands it to the frame under the pointer.
Fields§
§key: StringIts stable key.
tabs: Vec<TabItemProps>The tabs, in order.
active: Option<ResourceId>The resource whose tab shows: the tab in front.
focused: boolWhether this frame has the keyboard: its tab strip says so.
activate: EventTold a tab was chosen: carries the resource of the pill chosen.
close: EventTold a tab’s close chip was pressed: carries that tab’s resource.
reorder: EventTold a pill was dropped at a new place in the strip: carries the tab moved and its place among the strip’s, from 0.
detach: EventTold a pill was dragged out of the strip and let go: carries the tab
and where it was let go, as pack_point packs the window’s
coordinates. The shell puts the tab in the frame there, or makes one.
Implementations§
impl TabStripProps
The strip’s props again: what its view last said, its events left out.
Trait Implementations§
§impl Component for TabStripProps
impl Component for TabStripProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<TabStripProps, Error>
fn from_source(source: &mut dyn Source) -> Result<TabStripProps, Error>
source gives. Read more§impl Default for TabStripProps
impl Default for TabStripProps
§fn default() -> TabStripProps
fn default() -> TabStripProps
Auto Trait Implementations§
impl Freeze for TabStripProps
impl !RefUnwindSafe for TabStripProps
impl !Send for TabStripProps
impl !Sync for TabStripProps
impl Unpin for TabStripProps
impl UnsafeUnpin for TabStripProps
impl !UnwindSafe for TabStripProps
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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