pub struct Panel { /* private fields */ }Expand description
What the panel carries and how it stands. The application owns all of it, so it could be saved and given back exactly as it was left.
Implementations§
Source§impl Panel
impl Panel
Sourcepub fn order(&self) -> &[PanelWidget]
pub fn order(&self) -> &[PanelWidget]
The widgets the panel carries, in the order they are shown.
Sourcepub fn is_unfolded(&self, index: usize) -> bool
pub fn is_unfolded(&self, index: usize) -> bool
Whether the widget at index is unfolded.
Sourcepub fn set_width(&mut self, width: u16)
pub fn set_width(&mut self, width: u16)
Sets the panel’s width; the framework keeps it within the screen’s room.
Sourcepub fn move_widget(&mut self, from: usize, to: usize)
pub fn move_widget(&mut self, from: usize, to: usize)
Moves the widget at from so that its position becomes to.
Sourcepub fn show_chooser(&mut self, show: bool)
pub fn show_chooser(&mut self, show: bool)
Shows or dismisses the chooser of the widgets the panel does not carry; it always opens on its first row.
Sourcepub fn chooser_open(&self) -> bool
pub fn chooser_open(&self) -> bool
Whether the chooser is open.
Sourcepub fn add(&mut self, widget: PanelWidget)
pub fn add(&mut self, widget: PanelWidget)
Adds widget to the end of the panel, unfolded, which is where the person is looking when
they add it, and closes the chooser that offered it. A widget the panel already carries
stays where it is.
Sourcepub fn remove(&mut self, widget: PanelWidget)
pub fn remove(&mut self, widget: PanelWidget)
Takes widget off the panel; it keeps nothing, so adding it again starts it afresh.
Sourcepub fn missing(&self) -> Vec<PanelWidget>
pub fn missing(&self) -> Vec<PanelWidget>
The widgets the panel does not carry, in the order PanelWidget::ALL lists them.
Sourcepub fn carries(&self, widget: PanelWidget) -> bool
pub fn carries(&self, widget: PanelWidget) -> bool
Whether the panel carries widget.
Trait Implementations§
impl Eq for Panel
impl StructuralPartialEq for Panel
Auto Trait Implementations§
impl Freeze for Panel
impl RefUnwindSafe for Panel
impl Send for Panel
impl Sync for Panel
impl Unpin for Panel
impl UnsafeUnpin for Panel
impl UnwindSafe for Panel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&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> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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